]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20160827
[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/^.*[   ]\(-[^  ]\)/\1/'`
2192         CC=`echo "$CC " | sed -e 's/[   ]-[^    ].*$//' -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 (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*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
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 (osf[45]*)
8338         cf_xopen_source="-D_OSF_SOURCE"
8339         ;;
8340 (nto-qnx*)
8341         cf_xopen_source="-D_QNX_SOURCE"
8342         ;;
8343 (sco*)
8344         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8345         ;;
8346 (solaris2.*)
8347         cf_xopen_source="-D__EXTENSIONS__"
8348         cf_cv_xopen_source=broken
8349         ;;
8350 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8351         cf_XOPEN_SOURCE=
8352         cf_POSIX_C_SOURCE=
8353         ;;
8354 (*)
8355
8356 echo "$as_me:8356: checking if we should define _XOPEN_SOURCE" >&5
8357 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8358 if test "${cf_cv_xopen_source+set}" = set; then
8359   echo $ECHO_N "(cached) $ECHO_C" >&6
8360 else
8361
8362         cat >conftest.$ac_ext <<_ACEOF
8363 #line 8363 "configure"
8364 #include "confdefs.h"
8365
8366 #include <stdlib.h>
8367 #include <string.h>
8368 #include <sys/types.h>
8369
8370 int
8371 main ()
8372 {
8373
8374 #ifndef _XOPEN_SOURCE
8375 make an error
8376 #endif
8377   ;
8378   return 0;
8379 }
8380 _ACEOF
8381 rm -f conftest.$ac_objext
8382 if { (eval echo "$as_me:8382: \"$ac_compile\"") >&5
8383   (eval $ac_compile) 2>&5
8384   ac_status=$?
8385   echo "$as_me:8385: \$? = $ac_status" >&5
8386   (exit $ac_status); } &&
8387          { ac_try='test -s conftest.$ac_objext'
8388   { (eval echo "$as_me:8388: \"$ac_try\"") >&5
8389   (eval $ac_try) 2>&5
8390   ac_status=$?
8391   echo "$as_me:8391: \$? = $ac_status" >&5
8392   (exit $ac_status); }; }; then
8393   cf_cv_xopen_source=no
8394 else
8395   echo "$as_me: failed program was:" >&5
8396 cat conftest.$ac_ext >&5
8397 cf_save="$CPPFLAGS"
8398          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8399          cat >conftest.$ac_ext <<_ACEOF
8400 #line 8400 "configure"
8401 #include "confdefs.h"
8402
8403 #include <stdlib.h>
8404 #include <string.h>
8405 #include <sys/types.h>
8406
8407 int
8408 main ()
8409 {
8410
8411 #ifdef _XOPEN_SOURCE
8412 make an error
8413 #endif
8414   ;
8415   return 0;
8416 }
8417 _ACEOF
8418 rm -f conftest.$ac_objext
8419 if { (eval echo "$as_me:8419: \"$ac_compile\"") >&5
8420   (eval $ac_compile) 2>&5
8421   ac_status=$?
8422   echo "$as_me:8422: \$? = $ac_status" >&5
8423   (exit $ac_status); } &&
8424          { ac_try='test -s conftest.$ac_objext'
8425   { (eval echo "$as_me:8425: \"$ac_try\"") >&5
8426   (eval $ac_try) 2>&5
8427   ac_status=$?
8428   echo "$as_me:8428: \$? = $ac_status" >&5
8429   (exit $ac_status); }; }; then
8430   cf_cv_xopen_source=no
8431 else
8432   echo "$as_me: failed program was:" >&5
8433 cat conftest.$ac_ext >&5
8434 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8435 fi
8436 rm -f conftest.$ac_objext conftest.$ac_ext
8437         CPPFLAGS="$cf_save"
8438
8439 fi
8440 rm -f conftest.$ac_objext conftest.$ac_ext
8441
8442 fi
8443 echo "$as_me:8443: result: $cf_cv_xopen_source" >&5
8444 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8445
8446 if test "$cf_cv_xopen_source" != no ; then
8447
8448 CFLAGS=`echo "$CFLAGS" | \
8449         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8450                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8451
8452 CPPFLAGS=`echo "$CPPFLAGS" | \
8453         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8454                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8455
8456         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8457
8458 cf_fix_cppflags=no
8459 cf_new_cflags=
8460 cf_new_cppflags=
8461 cf_new_extra_cppflags=
8462
8463 for cf_add_cflags in $cf_temp_xopen_source
8464 do
8465 case $cf_fix_cppflags in
8466 (no)
8467         case $cf_add_cflags in
8468         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8469                 case $cf_add_cflags in
8470                 (-D*)
8471                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8472
8473                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8474                                 && test -z "${cf_tst_cflags}" \
8475                                 && cf_fix_cppflags=yes
8476
8477                         if test $cf_fix_cppflags = yes ; then
8478                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8479                                 continue
8480                         elif test "${cf_tst_cflags}" = "\"'" ; then
8481                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8482                                 continue
8483                         fi
8484                         ;;
8485                 esac
8486                 case "$CPPFLAGS" in
8487                 (*$cf_add_cflags)
8488                         ;;
8489                 (*)
8490                         case $cf_add_cflags in
8491                         (-D*)
8492                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8493
8494 CPPFLAGS=`echo "$CPPFLAGS" | \
8495         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8496                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8497
8498                                 ;;
8499                         esac
8500                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8501                         ;;
8502                 esac
8503                 ;;
8504         (*)
8505                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8506                 ;;
8507         esac
8508         ;;
8509 (yes)
8510         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8511
8512         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8513
8514         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8515                 && test -z "${cf_tst_cflags}" \
8516                 && cf_fix_cppflags=no
8517         ;;
8518 esac
8519 done
8520
8521 if test -n "$cf_new_cflags" ; then
8522
8523         CFLAGS="$CFLAGS $cf_new_cflags"
8524 fi
8525
8526 if test -n "$cf_new_cppflags" ; then
8527
8528         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8529 fi
8530
8531 if test -n "$cf_new_extra_cppflags" ; then
8532
8533         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8534 fi
8535
8536 fi
8537
8538 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8539
8540 cf_save_CFLAGS="$CFLAGS"
8541 cf_save_CPPFLAGS="$CPPFLAGS"
8542
8543 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8544         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8545                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8546
8547 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8548         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8549                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8550
8551 echo "$as_me:8551: checking if we should define _POSIX_C_SOURCE" >&5
8552 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8553 if test "${cf_cv_posix_c_source+set}" = set; then
8554   echo $ECHO_N "(cached) $ECHO_C" >&6
8555 else
8556
8557 echo "${as_me:-configure}:8557: testing if the symbol is already defined go no further ..." 1>&5
8558
8559         cat >conftest.$ac_ext <<_ACEOF
8560 #line 8560 "configure"
8561 #include "confdefs.h"
8562 #include <sys/types.h>
8563 int
8564 main ()
8565 {
8566
8567 #ifndef _POSIX_C_SOURCE
8568 make an error
8569 #endif
8570   ;
8571   return 0;
8572 }
8573 _ACEOF
8574 rm -f conftest.$ac_objext
8575 if { (eval echo "$as_me:8575: \"$ac_compile\"") >&5
8576   (eval $ac_compile) 2>&5
8577   ac_status=$?
8578   echo "$as_me:8578: \$? = $ac_status" >&5
8579   (exit $ac_status); } &&
8580          { ac_try='test -s conftest.$ac_objext'
8581   { (eval echo "$as_me:8581: \"$ac_try\"") >&5
8582   (eval $ac_try) 2>&5
8583   ac_status=$?
8584   echo "$as_me:8584: \$? = $ac_status" >&5
8585   (exit $ac_status); }; }; then
8586   cf_cv_posix_c_source=no
8587 else
8588   echo "$as_me: failed program was:" >&5
8589 cat conftest.$ac_ext >&5
8590 cf_want_posix_source=no
8591          case .$cf_POSIX_C_SOURCE in
8592          (.[12]??*)
8593                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8594                 ;;
8595          (.2)
8596                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8597                 cf_want_posix_source=yes
8598                 ;;
8599          (.*)
8600                 cf_want_posix_source=yes
8601                 ;;
8602          esac
8603          if test "$cf_want_posix_source" = yes ; then
8604                 cat >conftest.$ac_ext <<_ACEOF
8605 #line 8605 "configure"
8606 #include "confdefs.h"
8607 #include <sys/types.h>
8608 int
8609 main ()
8610 {
8611
8612 #ifdef _POSIX_SOURCE
8613 make an error
8614 #endif
8615   ;
8616   return 0;
8617 }
8618 _ACEOF
8619 rm -f conftest.$ac_objext
8620 if { (eval echo "$as_me:8620: \"$ac_compile\"") >&5
8621   (eval $ac_compile) 2>&5
8622   ac_status=$?
8623   echo "$as_me:8623: \$? = $ac_status" >&5
8624   (exit $ac_status); } &&
8625          { ac_try='test -s conftest.$ac_objext'
8626   { (eval echo "$as_me:8626: \"$ac_try\"") >&5
8627   (eval $ac_try) 2>&5
8628   ac_status=$?
8629   echo "$as_me:8629: \$? = $ac_status" >&5
8630   (exit $ac_status); }; }; then
8631   :
8632 else
8633   echo "$as_me: failed program was:" >&5
8634 cat conftest.$ac_ext >&5
8635 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8636 fi
8637 rm -f conftest.$ac_objext conftest.$ac_ext
8638          fi
8639
8640 echo "${as_me:-configure}:8640: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8641
8642          CFLAGS="$cf_trim_CFLAGS"
8643          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8644
8645 echo "${as_me:-configure}:8645: testing if the second compile does not leave our definition intact error ..." 1>&5
8646
8647          cat >conftest.$ac_ext <<_ACEOF
8648 #line 8648 "configure"
8649 #include "confdefs.h"
8650 #include <sys/types.h>
8651 int
8652 main ()
8653 {
8654
8655 #ifndef _POSIX_C_SOURCE
8656 make an error
8657 #endif
8658   ;
8659   return 0;
8660 }
8661 _ACEOF
8662 rm -f conftest.$ac_objext
8663 if { (eval echo "$as_me:8663: \"$ac_compile\"") >&5
8664   (eval $ac_compile) 2>&5
8665   ac_status=$?
8666   echo "$as_me:8666: \$? = $ac_status" >&5
8667   (exit $ac_status); } &&
8668          { ac_try='test -s conftest.$ac_objext'
8669   { (eval echo "$as_me:8669: \"$ac_try\"") >&5
8670   (eval $ac_try) 2>&5
8671   ac_status=$?
8672   echo "$as_me:8672: \$? = $ac_status" >&5
8673   (exit $ac_status); }; }; then
8674   :
8675 else
8676   echo "$as_me: failed program was:" >&5
8677 cat conftest.$ac_ext >&5
8678 cf_cv_posix_c_source=no
8679 fi
8680 rm -f conftest.$ac_objext conftest.$ac_ext
8681          CFLAGS="$cf_save_CFLAGS"
8682          CPPFLAGS="$cf_save_CPPFLAGS"
8683
8684 fi
8685 rm -f conftest.$ac_objext conftest.$ac_ext
8686
8687 fi
8688 echo "$as_me:8688: result: $cf_cv_posix_c_source" >&5
8689 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8690
8691 if test "$cf_cv_posix_c_source" != no ; then
8692         CFLAGS="$cf_trim_CFLAGS"
8693         CPPFLAGS="$cf_trim_CPPFLAGS"
8694
8695 cf_fix_cppflags=no
8696 cf_new_cflags=
8697 cf_new_cppflags=
8698 cf_new_extra_cppflags=
8699
8700 for cf_add_cflags in $cf_cv_posix_c_source
8701 do
8702 case $cf_fix_cppflags in
8703 (no)
8704         case $cf_add_cflags in
8705         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8706                 case $cf_add_cflags in
8707                 (-D*)
8708                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8709
8710                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8711                                 && test -z "${cf_tst_cflags}" \
8712                                 && cf_fix_cppflags=yes
8713
8714                         if test $cf_fix_cppflags = yes ; then
8715                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8716                                 continue
8717                         elif test "${cf_tst_cflags}" = "\"'" ; then
8718                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8719                                 continue
8720                         fi
8721                         ;;
8722                 esac
8723                 case "$CPPFLAGS" in
8724                 (*$cf_add_cflags)
8725                         ;;
8726                 (*)
8727                         case $cf_add_cflags in
8728                         (-D*)
8729                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8730
8731 CPPFLAGS=`echo "$CPPFLAGS" | \
8732         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8733                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8734
8735                                 ;;
8736                         esac
8737                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8738                         ;;
8739                 esac
8740                 ;;
8741         (*)
8742                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8743                 ;;
8744         esac
8745         ;;
8746 (yes)
8747         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8748
8749         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8750
8751         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8752                 && test -z "${cf_tst_cflags}" \
8753                 && cf_fix_cppflags=no
8754         ;;
8755 esac
8756 done
8757
8758 if test -n "$cf_new_cflags" ; then
8759
8760         CFLAGS="$CFLAGS $cf_new_cflags"
8761 fi
8762
8763 if test -n "$cf_new_cppflags" ; then
8764
8765         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8766 fi
8767
8768 if test -n "$cf_new_extra_cppflags" ; then
8769
8770         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8771 fi
8772
8773 fi
8774
8775         ;;
8776 esac
8777
8778 if test -n "$cf_xopen_source" ; then
8779
8780 cf_fix_cppflags=no
8781 cf_new_cflags=
8782 cf_new_cppflags=
8783 cf_new_extra_cppflags=
8784
8785 for cf_add_cflags in $cf_xopen_source
8786 do
8787 case $cf_fix_cppflags in
8788 (no)
8789         case $cf_add_cflags in
8790         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8791                 case $cf_add_cflags in
8792                 (-D*)
8793                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8794
8795                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8796                                 && test -z "${cf_tst_cflags}" \
8797                                 && cf_fix_cppflags=yes
8798
8799                         if test $cf_fix_cppflags = yes ; then
8800                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8801                                 continue
8802                         elif test "${cf_tst_cflags}" = "\"'" ; then
8803                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8804                                 continue
8805                         fi
8806                         ;;
8807                 esac
8808                 case "$CPPFLAGS" in
8809                 (*$cf_add_cflags)
8810                         ;;
8811                 (*)
8812                         case $cf_add_cflags in
8813                         (-D*)
8814                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8815
8816 CPPFLAGS=`echo "$CPPFLAGS" | \
8817         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8818                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8819
8820                                 ;;
8821                         esac
8822                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8823                         ;;
8824                 esac
8825                 ;;
8826         (*)
8827                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8828                 ;;
8829         esac
8830         ;;
8831 (yes)
8832         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8833
8834         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8835
8836         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8837                 && test -z "${cf_tst_cflags}" \
8838                 && cf_fix_cppflags=no
8839         ;;
8840 esac
8841 done
8842
8843 if test -n "$cf_new_cflags" ; then
8844         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8845
8846 echo "${as_me:-configure}:8846: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8847
8848         CFLAGS="$CFLAGS $cf_new_cflags"
8849 fi
8850
8851 if test -n "$cf_new_cppflags" ; then
8852         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8853
8854 echo "${as_me:-configure}:8854: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8855
8856         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8857 fi
8858
8859 if test -n "$cf_new_extra_cppflags" ; then
8860         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8861
8862 echo "${as_me:-configure}:8862: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8863
8864         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8865 fi
8866
8867 fi
8868
8869 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8870         echo "$as_me:8870: checking if _XOPEN_SOURCE really is set" >&5
8871 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8872         cat >conftest.$ac_ext <<_ACEOF
8873 #line 8873 "configure"
8874 #include "confdefs.h"
8875 #include <stdlib.h>
8876 int
8877 main ()
8878 {
8879
8880 #ifndef _XOPEN_SOURCE
8881 make an error
8882 #endif
8883   ;
8884   return 0;
8885 }
8886 _ACEOF
8887 rm -f conftest.$ac_objext
8888 if { (eval echo "$as_me:8888: \"$ac_compile\"") >&5
8889   (eval $ac_compile) 2>&5
8890   ac_status=$?
8891   echo "$as_me:8891: \$? = $ac_status" >&5
8892   (exit $ac_status); } &&
8893          { ac_try='test -s conftest.$ac_objext'
8894   { (eval echo "$as_me:8894: \"$ac_try\"") >&5
8895   (eval $ac_try) 2>&5
8896   ac_status=$?
8897   echo "$as_me:8897: \$? = $ac_status" >&5
8898   (exit $ac_status); }; }; then
8899   cf_XOPEN_SOURCE_set=yes
8900 else
8901   echo "$as_me: failed program was:" >&5
8902 cat conftest.$ac_ext >&5
8903 cf_XOPEN_SOURCE_set=no
8904 fi
8905 rm -f conftest.$ac_objext conftest.$ac_ext
8906         echo "$as_me:8906: result: $cf_XOPEN_SOURCE_set" >&5
8907 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8908         if test $cf_XOPEN_SOURCE_set = yes
8909         then
8910                 cat >conftest.$ac_ext <<_ACEOF
8911 #line 8911 "configure"
8912 #include "confdefs.h"
8913 #include <stdlib.h>
8914 int
8915 main ()
8916 {
8917
8918 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8919 make an error
8920 #endif
8921   ;
8922   return 0;
8923 }
8924 _ACEOF
8925 rm -f conftest.$ac_objext
8926 if { (eval echo "$as_me:8926: \"$ac_compile\"") >&5
8927   (eval $ac_compile) 2>&5
8928   ac_status=$?
8929   echo "$as_me:8929: \$? = $ac_status" >&5
8930   (exit $ac_status); } &&
8931          { ac_try='test -s conftest.$ac_objext'
8932   { (eval echo "$as_me:8932: \"$ac_try\"") >&5
8933   (eval $ac_try) 2>&5
8934   ac_status=$?
8935   echo "$as_me:8935: \$? = $ac_status" >&5
8936   (exit $ac_status); }; }; then
8937   cf_XOPEN_SOURCE_set_ok=yes
8938 else
8939   echo "$as_me: failed program was:" >&5
8940 cat conftest.$ac_ext >&5
8941 cf_XOPEN_SOURCE_set_ok=no
8942 fi
8943 rm -f conftest.$ac_objext conftest.$ac_ext
8944                 if test $cf_XOPEN_SOURCE_set_ok = no
8945                 then
8946                         { echo "$as_me:8946: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8947 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8948                 fi
8949         else
8950
8951 echo "$as_me:8951: checking if we should define _XOPEN_SOURCE" >&5
8952 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8953 if test "${cf_cv_xopen_source+set}" = set; then
8954   echo $ECHO_N "(cached) $ECHO_C" >&6
8955 else
8956
8957         cat >conftest.$ac_ext <<_ACEOF
8958 #line 8958 "configure"
8959 #include "confdefs.h"
8960
8961 #include <stdlib.h>
8962 #include <string.h>
8963 #include <sys/types.h>
8964
8965 int
8966 main ()
8967 {
8968
8969 #ifndef _XOPEN_SOURCE
8970 make an error
8971 #endif
8972   ;
8973   return 0;
8974 }
8975 _ACEOF
8976 rm -f conftest.$ac_objext
8977 if { (eval echo "$as_me:8977: \"$ac_compile\"") >&5
8978   (eval $ac_compile) 2>&5
8979   ac_status=$?
8980   echo "$as_me:8980: \$? = $ac_status" >&5
8981   (exit $ac_status); } &&
8982          { ac_try='test -s conftest.$ac_objext'
8983   { (eval echo "$as_me:8983: \"$ac_try\"") >&5
8984   (eval $ac_try) 2>&5
8985   ac_status=$?
8986   echo "$as_me:8986: \$? = $ac_status" >&5
8987   (exit $ac_status); }; }; then
8988   cf_cv_xopen_source=no
8989 else
8990   echo "$as_me: failed program was:" >&5
8991 cat conftest.$ac_ext >&5
8992 cf_save="$CPPFLAGS"
8993          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8994          cat >conftest.$ac_ext <<_ACEOF
8995 #line 8995 "configure"
8996 #include "confdefs.h"
8997
8998 #include <stdlib.h>
8999 #include <string.h>
9000 #include <sys/types.h>
9001
9002 int
9003 main ()
9004 {
9005
9006 #ifdef _XOPEN_SOURCE
9007 make an error
9008 #endif
9009   ;
9010   return 0;
9011 }
9012 _ACEOF
9013 rm -f conftest.$ac_objext
9014 if { (eval echo "$as_me:9014: \"$ac_compile\"") >&5
9015   (eval $ac_compile) 2>&5
9016   ac_status=$?
9017   echo "$as_me:9017: \$? = $ac_status" >&5
9018   (exit $ac_status); } &&
9019          { ac_try='test -s conftest.$ac_objext'
9020   { (eval echo "$as_me:9020: \"$ac_try\"") >&5
9021   (eval $ac_try) 2>&5
9022   ac_status=$?
9023   echo "$as_me:9023: \$? = $ac_status" >&5
9024   (exit $ac_status); }; }; then
9025   cf_cv_xopen_source=no
9026 else
9027   echo "$as_me: failed program was:" >&5
9028 cat conftest.$ac_ext >&5
9029 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9030 fi
9031 rm -f conftest.$ac_objext conftest.$ac_ext
9032         CPPFLAGS="$cf_save"
9033
9034 fi
9035 rm -f conftest.$ac_objext conftest.$ac_ext
9036
9037 fi
9038 echo "$as_me:9038: result: $cf_cv_xopen_source" >&5
9039 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9040
9041 if test "$cf_cv_xopen_source" != no ; then
9042
9043 CFLAGS=`echo "$CFLAGS" | \
9044         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9045                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9046
9047 CPPFLAGS=`echo "$CPPFLAGS" | \
9048         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9049                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9050
9051         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9052
9053 cf_fix_cppflags=no
9054 cf_new_cflags=
9055 cf_new_cppflags=
9056 cf_new_extra_cppflags=
9057
9058 for cf_add_cflags in $cf_temp_xopen_source
9059 do
9060 case $cf_fix_cppflags in
9061 (no)
9062         case $cf_add_cflags in
9063         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9064                 case $cf_add_cflags in
9065                 (-D*)
9066                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9067
9068                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9069                                 && test -z "${cf_tst_cflags}" \
9070                                 && cf_fix_cppflags=yes
9071
9072                         if test $cf_fix_cppflags = yes ; then
9073                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9074                                 continue
9075                         elif test "${cf_tst_cflags}" = "\"'" ; then
9076                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9077                                 continue
9078                         fi
9079                         ;;
9080                 esac
9081                 case "$CPPFLAGS" in
9082                 (*$cf_add_cflags)
9083                         ;;
9084                 (*)
9085                         case $cf_add_cflags in
9086                         (-D*)
9087                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9088
9089 CPPFLAGS=`echo "$CPPFLAGS" | \
9090         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9091                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9092
9093                                 ;;
9094                         esac
9095                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9096                         ;;
9097                 esac
9098                 ;;
9099         (*)
9100                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9101                 ;;
9102         esac
9103         ;;
9104 (yes)
9105         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9106
9107         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9108
9109         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9110                 && test -z "${cf_tst_cflags}" \
9111                 && cf_fix_cppflags=no
9112         ;;
9113 esac
9114 done
9115
9116 if test -n "$cf_new_cflags" ; then
9117
9118         CFLAGS="$CFLAGS $cf_new_cflags"
9119 fi
9120
9121 if test -n "$cf_new_cppflags" ; then
9122
9123         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9124 fi
9125
9126 if test -n "$cf_new_extra_cppflags" ; then
9127
9128         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9129 fi
9130
9131 fi
9132
9133         fi
9134 fi
9135
9136 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9137
9138 # Work around breakage on OS X
9139
9140 echo "$as_me:9140: checking if SIGWINCH is defined" >&5
9141 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9142 if test "${cf_cv_define_sigwinch+set}" = set; then
9143   echo $ECHO_N "(cached) $ECHO_C" >&6
9144 else
9145
9146         cat >conftest.$ac_ext <<_ACEOF
9147 #line 9147 "configure"
9148 #include "confdefs.h"
9149
9150 #include <sys/types.h>
9151 #include <sys/signal.h>
9152
9153 int
9154 main ()
9155 {
9156 int x = SIGWINCH
9157   ;
9158   return 0;
9159 }
9160 _ACEOF
9161 rm -f conftest.$ac_objext
9162 if { (eval echo "$as_me:9162: \"$ac_compile\"") >&5
9163   (eval $ac_compile) 2>&5
9164   ac_status=$?
9165   echo "$as_me:9165: \$? = $ac_status" >&5
9166   (exit $ac_status); } &&
9167          { ac_try='test -s conftest.$ac_objext'
9168   { (eval echo "$as_me:9168: \"$ac_try\"") >&5
9169   (eval $ac_try) 2>&5
9170   ac_status=$?
9171   echo "$as_me:9171: \$? = $ac_status" >&5
9172   (exit $ac_status); }; }; then
9173   cf_cv_define_sigwinch=yes
9174 else
9175   echo "$as_me: failed program was:" >&5
9176 cat conftest.$ac_ext >&5
9177 cat >conftest.$ac_ext <<_ACEOF
9178 #line 9178 "configure"
9179 #include "confdefs.h"
9180
9181 #undef _XOPEN_SOURCE
9182 #undef _POSIX_SOURCE
9183 #undef _POSIX_C_SOURCE
9184 #include <sys/types.h>
9185 #include <sys/signal.h>
9186
9187 int
9188 main ()
9189 {
9190 int x = SIGWINCH
9191   ;
9192   return 0;
9193 }
9194 _ACEOF
9195 rm -f conftest.$ac_objext
9196 if { (eval echo "$as_me:9196: \"$ac_compile\"") >&5
9197   (eval $ac_compile) 2>&5
9198   ac_status=$?
9199   echo "$as_me:9199: \$? = $ac_status" >&5
9200   (exit $ac_status); } &&
9201          { ac_try='test -s conftest.$ac_objext'
9202   { (eval echo "$as_me:9202: \"$ac_try\"") >&5
9203   (eval $ac_try) 2>&5
9204   ac_status=$?
9205   echo "$as_me:9205: \$? = $ac_status" >&5
9206   (exit $ac_status); }; }; then
9207   cf_cv_define_sigwinch=maybe
9208 else
9209   echo "$as_me: failed program was:" >&5
9210 cat conftest.$ac_ext >&5
9211 cf_cv_define_sigwinch=no
9212 fi
9213 rm -f conftest.$ac_objext conftest.$ac_ext
9214
9215 fi
9216 rm -f conftest.$ac_objext conftest.$ac_ext
9217
9218 fi
9219 echo "$as_me:9219: result: $cf_cv_define_sigwinch" >&5
9220 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9221
9222 if test "$cf_cv_define_sigwinch" = maybe ; then
9223 echo "$as_me:9223: checking for actual SIGWINCH definition" >&5
9224 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9225 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9226   echo $ECHO_N "(cached) $ECHO_C" >&6
9227 else
9228
9229 cf_cv_fixup_sigwinch=unknown
9230 cf_sigwinch=32
9231 while test $cf_sigwinch != 1
9232 do
9233         cat >conftest.$ac_ext <<_ACEOF
9234 #line 9234 "configure"
9235 #include "confdefs.h"
9236
9237 #undef _XOPEN_SOURCE
9238 #undef _POSIX_SOURCE
9239 #undef _POSIX_C_SOURCE
9240 #include <sys/types.h>
9241 #include <sys/signal.h>
9242
9243 int
9244 main ()
9245 {
9246
9247 #if SIGWINCH != $cf_sigwinch
9248 make an error
9249 #endif
9250 int x = SIGWINCH
9251   ;
9252   return 0;
9253 }
9254 _ACEOF
9255 rm -f conftest.$ac_objext
9256 if { (eval echo "$as_me:9256: \"$ac_compile\"") >&5
9257   (eval $ac_compile) 2>&5
9258   ac_status=$?
9259   echo "$as_me:9259: \$? = $ac_status" >&5
9260   (exit $ac_status); } &&
9261          { ac_try='test -s conftest.$ac_objext'
9262   { (eval echo "$as_me:9262: \"$ac_try\"") >&5
9263   (eval $ac_try) 2>&5
9264   ac_status=$?
9265   echo "$as_me:9265: \$? = $ac_status" >&5
9266   (exit $ac_status); }; }; then
9267   cf_cv_fixup_sigwinch=$cf_sigwinch
9268          break
9269 else
9270   echo "$as_me: failed program was:" >&5
9271 cat conftest.$ac_ext >&5
9272 fi
9273 rm -f conftest.$ac_objext conftest.$ac_ext
9274
9275 cf_sigwinch=`expr $cf_sigwinch - 1`
9276 done
9277
9278 fi
9279 echo "$as_me:9279: result: $cf_cv_fixup_sigwinch" >&5
9280 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9281
9282         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9283                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9284         fi
9285 fi
9286
9287 # Checks for CODESET support.
9288
9289 echo "$as_me:9289: checking for nl_langinfo and CODESET" >&5
9290 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9291 if test "${am_cv_langinfo_codeset+set}" = set; then
9292   echo $ECHO_N "(cached) $ECHO_C" >&6
9293 else
9294   cat >conftest.$ac_ext <<_ACEOF
9295 #line 9295 "configure"
9296 #include "confdefs.h"
9297 #include <langinfo.h>
9298 int
9299 main ()
9300 {
9301 char* cs = nl_langinfo(CODESET);
9302   ;
9303   return 0;
9304 }
9305 _ACEOF
9306 rm -f conftest.$ac_objext conftest$ac_exeext
9307 if { (eval echo "$as_me:9307: \"$ac_link\"") >&5
9308   (eval $ac_link) 2>&5
9309   ac_status=$?
9310   echo "$as_me:9310: \$? = $ac_status" >&5
9311   (exit $ac_status); } &&
9312          { ac_try='test -s conftest$ac_exeext'
9313   { (eval echo "$as_me:9313: \"$ac_try\"") >&5
9314   (eval $ac_try) 2>&5
9315   ac_status=$?
9316   echo "$as_me:9316: \$? = $ac_status" >&5
9317   (exit $ac_status); }; }; then
9318   am_cv_langinfo_codeset=yes
9319 else
9320   echo "$as_me: failed program was:" >&5
9321 cat conftest.$ac_ext >&5
9322 am_cv_langinfo_codeset=no
9323 fi
9324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9325
9326 fi
9327 echo "$as_me:9327: result: $am_cv_langinfo_codeset" >&5
9328 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9329         if test $am_cv_langinfo_codeset = yes; then
9330
9331 cat >>confdefs.h <<\EOF
9332 #define HAVE_LANGINFO_CODESET 1
9333 EOF
9334
9335         fi
9336
9337 # use these variables to work around a defect in gcc's fixincludes.
9338 NCURSES_OK_WCHAR_T=
9339 NCURSES_OK_WINT_T=
9340
9341 echo "$as_me:9341: checking if you want wide-character code" >&5
9342 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9343
9344 # Check whether --enable-widec or --disable-widec was given.
9345 if test "${enable_widec+set}" = set; then
9346   enableval="$enable_widec"
9347   with_widec=$enableval
9348 else
9349   with_widec=no
9350 fi;
9351 echo "$as_me:9351: result: $with_widec" >&5
9352 echo "${ECHO_T}$with_widec" >&6
9353
9354 NCURSES_WCWIDTH_GRAPHICS=1
9355
9356 if test "x$with_widec" = xyes ; then
9357         if test "x$disable_lib_suffixes" = xno ; then
9358                 LIB_SUFFIX="w${LIB_SUFFIX}"
9359         fi
9360
9361 cat >>confdefs.h <<\EOF
9362 #define USE_WIDEC_SUPPORT 1
9363 EOF
9364
9365 cat >>confdefs.h <<\EOF
9366 #define NCURSES_WIDECHAR 1
9367 EOF
9368
9369 echo "$as_me:9369: checking if wchar.h can be used as is" >&5
9370 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9371 if test "${cf_cv_wchar_h_okay+set}" = set; then
9372   echo $ECHO_N "(cached) $ECHO_C" >&6
9373 else
9374
9375 cat >conftest.$ac_ext <<_ACEOF
9376 #line 9376 "configure"
9377 #include "confdefs.h"
9378
9379 #include <stdlib.h>
9380 #include <wchar.h>
9381
9382 int
9383 main ()
9384 {
9385
9386         wint_t foo = 0;
9387         int bar = iswpunct(foo)
9388   ;
9389   return 0;
9390 }
9391 _ACEOF
9392 rm -f conftest.$ac_objext
9393 if { (eval echo "$as_me:9393: \"$ac_compile\"") >&5
9394   (eval $ac_compile) 2>&5
9395   ac_status=$?
9396   echo "$as_me:9396: \$? = $ac_status" >&5
9397   (exit $ac_status); } &&
9398          { ac_try='test -s conftest.$ac_objext'
9399   { (eval echo "$as_me:9399: \"$ac_try\"") >&5
9400   (eval $ac_try) 2>&5
9401   ac_status=$?
9402   echo "$as_me:9402: \$? = $ac_status" >&5
9403   (exit $ac_status); }; }; then
9404   cf_cv_wchar_h_okay=yes
9405 else
9406   echo "$as_me: failed program was:" >&5
9407 cat conftest.$ac_ext >&5
9408 cf_cv_wchar_h_okay=no
9409 fi
9410 rm -f conftest.$ac_objext conftest.$ac_ext
9411 fi
9412 echo "$as_me:9412: result: $cf_cv_wchar_h_okay" >&5
9413 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9414
9415 if test $cf_cv_wchar_h_okay = no
9416 then
9417
9418 echo "$as_me:9418: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9419 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9420 cat >conftest.$ac_ext <<_ACEOF
9421 #line 9421 "configure"
9422 #include "confdefs.h"
9423 #include <sys/types.h>
9424
9425 int
9426 main ()
9427 {
9428
9429 #ifndef _XOPEN_SOURCE_EXTENDED
9430 make an error
9431 #endif
9432   ;
9433   return 0;
9434 }
9435 _ACEOF
9436 rm -f conftest.$ac_objext
9437 if { (eval echo "$as_me:9437: \"$ac_compile\"") >&5
9438   (eval $ac_compile) 2>&5
9439   ac_status=$?
9440   echo "$as_me:9440: \$? = $ac_status" >&5
9441   (exit $ac_status); } &&
9442          { ac_try='test -s conftest.$ac_objext'
9443   { (eval echo "$as_me:9443: \"$ac_try\"") >&5
9444   (eval $ac_try) 2>&5
9445   ac_status=$?
9446   echo "$as_me:9446: \$? = $ac_status" >&5
9447   (exit $ac_status); }; }; then
9448   cf_result=no
9449 else
9450   echo "$as_me: failed program was:" >&5
9451 cat conftest.$ac_ext >&5
9452 cf_result=yes
9453 fi
9454 rm -f conftest.$ac_objext conftest.$ac_ext
9455 echo "$as_me:9455: result: $cf_result" >&5
9456 echo "${ECHO_T}$cf_result" >&6
9457
9458 if test "$cf_result" = yes ; then
9459         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9460 elif test "x" != "x" ; then
9461         echo "$as_me:9461: checking checking for compatible value versus " >&5
9462 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9463         cat >conftest.$ac_ext <<_ACEOF
9464 #line 9464 "configure"
9465 #include "confdefs.h"
9466 #include <sys/types.h>
9467
9468 int
9469 main ()
9470 {
9471
9472 #if _XOPEN_SOURCE_EXTENDED- < 0
9473 make an error
9474 #endif
9475   ;
9476   return 0;
9477 }
9478 _ACEOF
9479 rm -f conftest.$ac_objext
9480 if { (eval echo "$as_me:9480: \"$ac_compile\"") >&5
9481   (eval $ac_compile) 2>&5
9482   ac_status=$?
9483   echo "$as_me:9483: \$? = $ac_status" >&5
9484   (exit $ac_status); } &&
9485          { ac_try='test -s conftest.$ac_objext'
9486   { (eval echo "$as_me:9486: \"$ac_try\"") >&5
9487   (eval $ac_try) 2>&5
9488   ac_status=$?
9489   echo "$as_me:9489: \$? = $ac_status" >&5
9490   (exit $ac_status); }; }; then
9491   cf_result=yes
9492 else
9493   echo "$as_me: failed program was:" >&5
9494 cat conftest.$ac_ext >&5
9495 cf_result=no
9496 fi
9497 rm -f conftest.$ac_objext conftest.$ac_ext
9498         echo "$as_me:9498: result: $cf_result" >&5
9499 echo "${ECHO_T}$cf_result" >&6
9500         if test "$cf_result" = no ; then
9501                 # perhaps we can override it - try...
9502                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9503         fi
9504 fi
9505
9506 fi
9507
9508 echo "$as_me:9508: checking if wcwidth agrees graphics are single-width" >&5
9509 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9510 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9511   echo $ECHO_N "(cached) $ECHO_C" >&6
9512 else
9513
9514 cat >conftest.in <<CF_EOF
9515 -       VT100 symbols
9516 0x250c  upper left corner
9517 0x2514  lower left corner
9518 0x2510  upper right corner
9519 0x2518  lower right corner
9520 0x251c  tee pointing left
9521 0x2524  tee pointing right
9522 0x2534  tee pointing up
9523 0x252c  tee pointing down
9524 0x2500  horizontal line
9525 0x2502  vertical line
9526 0x253c  large plus or crossover
9527 0x23ba  scan line 1
9528 0x23bd  scan line 9
9529 0x25c6  diamond
9530 0x2592  checker board (stipple)
9531 0x00b0  degree symbol
9532 0x00b1  plus/minus
9533 0x00b7  bullet
9534 -       Teletype 5410v1 symbols
9535 0x2190  arrow pointing left
9536 0x2192  arrow pointing right
9537 0x2193  arrow pointing down
9538 0x2191  arrow pointing up
9539 0x2592  board of squares
9540 0x2603  lantern symbol
9541 0x25ae  solid square block
9542 -       these defaults were invented for ncurses
9543 0x23bb  scan line 3
9544 0x23bc  scan line 7
9545 0x2264  less-than-or-equal-to
9546 0x2265  greater-than-or-equal-to
9547 0x03c0  greek pi
9548 0x2260  not-equal
9549 0x00a3  pound-sterling symbol
9550 -       thick-line-drawing
9551 0x250f  upper left corner
9552 0x2517  lower left corner
9553 0x2513  upper right corner
9554 0x251b  lower right corner
9555 0x2523  tee pointing left
9556 0x252b  tee pointing right
9557 0x253b  tee pointing up
9558 0x2533  tee pointing down
9559 0x2501  horizontal line
9560 0x2503  vertical line
9561 0x254b  large plus or crossover
9562 -       double-line-drawing
9563 0x2554  upper left corner
9564 0x255a  lower left corner
9565 0x2557  upper right corner
9566 0x255d  lower right corner
9567 0x2563  tee pointing left
9568 0x2560  tee pointing right
9569 0x2569  tee pointing up
9570 0x2566  tee pointing down
9571 0x2550  horizontal line
9572 0x2551  vertical line
9573 0x256c  large plus or crossover
9574 CF_EOF
9575 if test "$cross_compiling" = yes; then
9576   cf_cv_wcwidth_graphics=unknown
9577 else
9578   cat >conftest.$ac_ext <<_ACEOF
9579 #line 9579 "configure"
9580 #include "confdefs.h"
9581
9582 #include <locale.h>
9583 #include <stdio.h>
9584 #include <wchar.h>
9585
9586 #define MY_LEN 80
9587
9588 int
9589 main(void)
9590 {
9591         FILE *fp;
9592         int value;
9593         char buffer[MY_LEN + 1];
9594         char notes[MY_LEN + 1];
9595         int totals = 0;
9596         int passed = 0;
9597
9598         if (setlocale(LC_ALL, "en_US.UTF8") ||
9599                 setlocale(LC_ALL, "en_US.UTF-8") ||
9600                 setlocale(LC_ALL, "en_US.utf8") ||
9601                 setlocale(LC_ALL, "en_US.utf-8")) {
9602                 if ((fp = fopen("conftest.in", "r")) != 0) {
9603                         while (fgets(buffer, MY_LEN, fp) != 0) {
9604                                 if (*buffer == '-') {
9605                                         fprintf(stderr, "\t%s", buffer);
9606                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9607                                         ++totals;
9608                                         if (wcwidth(value) == 1)
9609                                                 ++passed;
9610                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9611                                 } else {
9612                                         fprintf(stderr, "?\t%s", buffer);
9613                                 }
9614                         }
9615                 }
9616         }
9617         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9618         return (totals == passed) ? 0 : 1;
9619 }
9620
9621 _ACEOF
9622 rm -f conftest$ac_exeext
9623 if { (eval echo "$as_me:9623: \"$ac_link\"") >&5
9624   (eval $ac_link) 2>&5
9625   ac_status=$?
9626   echo "$as_me:9626: \$? = $ac_status" >&5
9627   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9628   { (eval echo "$as_me:9628: \"$ac_try\"") >&5
9629   (eval $ac_try) 2>&5
9630   ac_status=$?
9631   echo "$as_me:9631: \$? = $ac_status" >&5
9632   (exit $ac_status); }; }; then
9633   cf_cv_wcwidth_graphics=yes
9634 else
9635   echo "$as_me: program exited with status $ac_status" >&5
9636 echo "$as_me: failed program was:" >&5
9637 cat conftest.$ac_ext >&5
9638 cf_cv_wcwidth_graphics=no
9639 fi
9640 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9641 fi
9642
9643 fi
9644 echo "$as_me:9644: result: $cf_cv_wcwidth_graphics" >&5
9645 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9646
9647         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9648
9649         # with_overwrite=no
9650         NCURSES_CH_T=cchar_t
9651
9652 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9653 do
9654 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9655 echo "$as_me:9655: checking for $ac_func" >&5
9656 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9657 if eval "test \"\${$as_ac_var+set}\" = set"; then
9658   echo $ECHO_N "(cached) $ECHO_C" >&6
9659 else
9660   cat >conftest.$ac_ext <<_ACEOF
9661 #line 9661 "configure"
9662 #include "confdefs.h"
9663 /* System header to define __stub macros and hopefully few prototypes,
9664     which can conflict with char $ac_func (); below.  */
9665 #include <assert.h>
9666 /* Override any gcc2 internal prototype to avoid an error.  */
9667 #ifdef __cplusplus
9668 extern "C"
9669 #endif
9670 /* We use char because int might match the return type of a gcc2
9671    builtin and then its argument prototype would still apply.  */
9672 char $ac_func ();
9673 char (*f) ();
9674
9675 int
9676 main ()
9677 {
9678 /* The GNU C library defines this for functions which it implements
9679     to always fail with ENOSYS.  Some functions are actually named
9680     something starting with __ and the normal name is an alias.  */
9681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9682 choke me
9683 #else
9684 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9685 #endif
9686
9687   ;
9688   return 0;
9689 }
9690 _ACEOF
9691 rm -f conftest.$ac_objext conftest$ac_exeext
9692 if { (eval echo "$as_me:9692: \"$ac_link\"") >&5
9693   (eval $ac_link) 2>&5
9694   ac_status=$?
9695   echo "$as_me:9695: \$? = $ac_status" >&5
9696   (exit $ac_status); } &&
9697          { ac_try='test -s conftest$ac_exeext'
9698   { (eval echo "$as_me:9698: \"$ac_try\"") >&5
9699   (eval $ac_try) 2>&5
9700   ac_status=$?
9701   echo "$as_me:9701: \$? = $ac_status" >&5
9702   (exit $ac_status); }; }; then
9703   eval "$as_ac_var=yes"
9704 else
9705   echo "$as_me: failed program was:" >&5
9706 cat conftest.$ac_ext >&5
9707 eval "$as_ac_var=no"
9708 fi
9709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9710 fi
9711 echo "$as_me:9711: result: `eval echo '${'$as_ac_var'}'`" >&5
9712 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9713 if test `eval echo '${'$as_ac_var'}'` = yes; then
9714   cat >>confdefs.h <<EOF
9715 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9716 EOF
9717
9718 fi
9719 done
9720
9721         if test "x$ac_cv_func_putwc" != xyes ; then
9722
9723 echo "$as_me:9723: checking for multibyte character support" >&5
9724 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9725 if test "${cf_cv_utf8_lib+set}" = set; then
9726   echo $ECHO_N "(cached) $ECHO_C" >&6
9727 else
9728
9729         cf_save_LIBS="$LIBS"
9730         cat >conftest.$ac_ext <<_ACEOF
9731 #line 9731 "configure"
9732 #include "confdefs.h"
9733
9734 #include <stdlib.h>
9735 int
9736 main ()
9737 {
9738 putwc(0,0);
9739   ;
9740   return 0;
9741 }
9742 _ACEOF
9743 rm -f conftest.$ac_objext conftest$ac_exeext
9744 if { (eval echo "$as_me:9744: \"$ac_link\"") >&5
9745   (eval $ac_link) 2>&5
9746   ac_status=$?
9747   echo "$as_me:9747: \$? = $ac_status" >&5
9748   (exit $ac_status); } &&
9749          { ac_try='test -s conftest$ac_exeext'
9750   { (eval echo "$as_me:9750: \"$ac_try\"") >&5
9751   (eval $ac_try) 2>&5
9752   ac_status=$?
9753   echo "$as_me:9753: \$? = $ac_status" >&5
9754   (exit $ac_status); }; }; then
9755   cf_cv_utf8_lib=yes
9756 else
9757   echo "$as_me: failed program was:" >&5
9758 cat conftest.$ac_ext >&5
9759
9760 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9761 # will be set on completion of the AC_TRY_LINK below.
9762 cf_cv_header_path_utf8=
9763 cf_cv_library_path_utf8=
9764
9765 echo "${as_me:-configure}:9765: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9766
9767 cf_save_LIBS="$LIBS"
9768
9769 cat >conftest.$ac_ext <<_ACEOF
9770 #line 9770 "configure"
9771 #include "confdefs.h"
9772
9773 #include <libutf8.h>
9774 int
9775 main ()
9776 {
9777 putwc(0,0);
9778   ;
9779   return 0;
9780 }
9781 _ACEOF
9782 rm -f conftest.$ac_objext conftest$ac_exeext
9783 if { (eval echo "$as_me:9783: \"$ac_link\"") >&5
9784   (eval $ac_link) 2>&5
9785   ac_status=$?
9786   echo "$as_me:9786: \$? = $ac_status" >&5
9787   (exit $ac_status); } &&
9788          { ac_try='test -s conftest$ac_exeext'
9789   { (eval echo "$as_me:9789: \"$ac_try\"") >&5
9790   (eval $ac_try) 2>&5
9791   ac_status=$?
9792   echo "$as_me:9792: \$? = $ac_status" >&5
9793   (exit $ac_status); }; }; then
9794
9795         cf_cv_find_linkage_utf8=yes
9796         cf_cv_header_path_utf8=/usr/include
9797         cf_cv_library_path_utf8=/usr/lib
9798
9799 else
9800   echo "$as_me: failed program was:" >&5
9801 cat conftest.$ac_ext >&5
9802
9803 LIBS="-lutf8  $cf_save_LIBS"
9804
9805 cat >conftest.$ac_ext <<_ACEOF
9806 #line 9806 "configure"
9807 #include "confdefs.h"
9808
9809 #include <libutf8.h>
9810 int
9811 main ()
9812 {
9813 putwc(0,0);
9814   ;
9815   return 0;
9816 }
9817 _ACEOF
9818 rm -f conftest.$ac_objext conftest$ac_exeext
9819 if { (eval echo "$as_me:9819: \"$ac_link\"") >&5
9820   (eval $ac_link) 2>&5
9821   ac_status=$?
9822   echo "$as_me:9822: \$? = $ac_status" >&5
9823   (exit $ac_status); } &&
9824          { ac_try='test -s conftest$ac_exeext'
9825   { (eval echo "$as_me:9825: \"$ac_try\"") >&5
9826   (eval $ac_try) 2>&5
9827   ac_status=$?
9828   echo "$as_me:9828: \$? = $ac_status" >&5
9829   (exit $ac_status); }; }; then
9830
9831         cf_cv_find_linkage_utf8=yes
9832         cf_cv_header_path_utf8=/usr/include
9833         cf_cv_library_path_utf8=/usr/lib
9834         cf_cv_library_file_utf8="-lutf8"
9835
9836 else
9837   echo "$as_me: failed program was:" >&5
9838 cat conftest.$ac_ext >&5
9839
9840         cf_cv_find_linkage_utf8=no
9841         LIBS="$cf_save_LIBS"
9842
9843         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9844
9845 echo "${as_me:-configure}:9845: testing find linkage for utf8 library ..." 1>&5
9846
9847 echo "${as_me:-configure}:9847: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9848
9849         cf_save_CPPFLAGS="$CPPFLAGS"
9850         cf_test_CPPFLAGS="$CPPFLAGS"
9851
9852 cf_search=
9853
9854 # collect the current set of include-directories from compiler flags
9855 cf_header_path_list=""
9856 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9857         for cf_header_path in $CPPFLAGS $CFLAGS
9858         do
9859                 case $cf_header_path in
9860                 (-I*)
9861                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9862
9863 test "x$cf_header_path" != "xNONE" && \
9864 test -d "$cf_header_path" && \
9865  {
9866         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9867         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9868         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9869         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9870         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9871         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9872 }
9873
9874                         cf_header_path_list="$cf_header_path_list $cf_search"
9875                         ;;
9876                 esac
9877         done
9878 fi
9879
9880 # add the variations for the package we are looking for
9881
9882 cf_search=
9883
9884 test "x$prefix" != "xNONE" && \
9885 test -d "$prefix" && \
9886  {
9887         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9888         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9889         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9890         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9891         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9892         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9893 }
9894
9895 for cf_subdir_prefix in \
9896         /usr \
9897         /usr/local \
9898         /usr/pkg \
9899         /opt \
9900         /opt/local \
9901         $HOME
9902 do
9903
9904 test "x$cf_subdir_prefix" != "x$prefix" && \
9905 test -d "$cf_subdir_prefix" && \
9906 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9907         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9908         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9909         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9910         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9911         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9912         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9913 }
9914
9915 done
9916
9917 test "$includedir" != NONE && \
9918 test "$includedir" != "/usr/include" && \
9919 test -d "$includedir" && {
9920         test -d $includedir &&    cf_search="$cf_search $includedir"
9921         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9922 }
9923
9924 test "$oldincludedir" != NONE && \
9925 test "$oldincludedir" != "/usr/include" && \
9926 test -d "$oldincludedir" && {
9927         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9928         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9929 }
9930
9931 cf_search="$cf_search $cf_header_path_list"
9932
9933         for cf_cv_header_path_utf8 in $cf_search
9934         do
9935                 if test -d $cf_cv_header_path_utf8 ; then
9936                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9937
9938 echo "${as_me:-configure}:9938: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9939
9940                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9941                         cat >conftest.$ac_ext <<_ACEOF
9942 #line 9942 "configure"
9943 #include "confdefs.h"
9944
9945 #include <libutf8.h>
9946 int
9947 main ()
9948 {
9949 putwc(0,0);
9950   ;
9951   return 0;
9952 }
9953 _ACEOF
9954 rm -f conftest.$ac_objext
9955 if { (eval echo "$as_me:9955: \"$ac_compile\"") >&5
9956   (eval $ac_compile) 2>&5
9957   ac_status=$?
9958   echo "$as_me:9958: \$? = $ac_status" >&5
9959   (exit $ac_status); } &&
9960          { ac_try='test -s conftest.$ac_objext'
9961   { (eval echo "$as_me:9961: \"$ac_try\"") >&5
9962   (eval $ac_try) 2>&5
9963   ac_status=$?
9964   echo "$as_me:9964: \$? = $ac_status" >&5
9965   (exit $ac_status); }; }; then
9966
9967                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9968
9969 echo "${as_me:-configure}:9969: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9970
9971                                 cf_cv_find_linkage_utf8=maybe
9972                                 cf_test_CPPFLAGS="$CPPFLAGS"
9973                                 break
9974 else
9975   echo "$as_me: failed program was:" >&5
9976 cat conftest.$ac_ext >&5
9977
9978                                 CPPFLAGS="$cf_save_CPPFLAGS"
9979
9980 fi
9981 rm -f conftest.$ac_objext conftest.$ac_ext
9982                 fi
9983         done
9984
9985         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9986
9987 echo "${as_me:-configure}:9987: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9988
9989                 cf_save_LIBS="$LIBS"
9990                 cf_save_LDFLAGS="$LDFLAGS"
9991
9992                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9993
9994 cf_search=
9995 cf_library_path_list=""
9996 if test -n "${LDFLAGS}${LIBS}" ; then
9997         for cf_library_path in $LDFLAGS $LIBS
9998         do
9999                 case $cf_library_path in
10000                 (-L*)
10001                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10002
10003 test "x$cf_library_path" != "xNONE" && \
10004 test -d "$cf_library_path" && \
10005  {
10006         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10007         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10008         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10009         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10010         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10011         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10012 }
10013
10014                         cf_library_path_list="$cf_library_path_list $cf_search"
10015                         ;;
10016                 esac
10017         done
10018 fi
10019
10020 cf_search=
10021
10022 test "x$prefix" != "xNONE" && \
10023 test -d "$prefix" && \
10024  {
10025         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10026         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10027         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10028         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10029         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10030         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10031 }
10032
10033 for cf_subdir_prefix in \
10034         /usr \
10035         /usr/local \
10036         /usr/pkg \
10037         /opt \
10038         /opt/local \
10039         $HOME
10040 do
10041
10042 test "x$cf_subdir_prefix" != "x$prefix" && \
10043 test -d "$cf_subdir_prefix" && \
10044 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10045         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10046         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10047         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10048         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10049         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10050         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10051 }
10052
10053 done
10054
10055 cf_search="$cf_library_path_list $cf_search"
10056
10057                         for cf_cv_library_path_utf8 in $cf_search
10058                         do
10059                                 if test -d $cf_cv_library_path_utf8 ; then
10060                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10061
10062 echo "${as_me:-configure}:10062: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10063
10064                                         CPPFLAGS="$cf_test_CPPFLAGS"
10065                                         LIBS="-lutf8  $cf_save_LIBS"
10066                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10067                                         cat >conftest.$ac_ext <<_ACEOF
10068 #line 10068 "configure"
10069 #include "confdefs.h"
10070
10071 #include <libutf8.h>
10072 int
10073 main ()
10074 {
10075 putwc(0,0);
10076   ;
10077   return 0;
10078 }
10079 _ACEOF
10080 rm -f conftest.$ac_objext conftest$ac_exeext
10081 if { (eval echo "$as_me:10081: \"$ac_link\"") >&5
10082   (eval $ac_link) 2>&5
10083   ac_status=$?
10084   echo "$as_me:10084: \$? = $ac_status" >&5
10085   (exit $ac_status); } &&
10086          { ac_try='test -s conftest$ac_exeext'
10087   { (eval echo "$as_me:10087: \"$ac_try\"") >&5
10088   (eval $ac_try) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit $ac_status); }; }; then
10092
10093                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10094
10095 echo "${as_me:-configure}:10095: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10096
10097                                         cf_cv_find_linkage_utf8=yes
10098                                         cf_cv_library_file_utf8="-lutf8"
10099                                         break
10100 else
10101   echo "$as_me: failed program was:" >&5
10102 cat conftest.$ac_ext >&5
10103
10104                                         CPPFLAGS="$cf_save_CPPFLAGS"
10105                                         LIBS="$cf_save_LIBS"
10106                                         LDFLAGS="$cf_save_LDFLAGS"
10107
10108 fi
10109 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10110                                 fi
10111                         done
10112                         CPPFLAGS="$cf_save_CPPFLAGS"
10113                         LDFLAGS="$cf_save_LDFLAGS"
10114                 fi
10115
10116         else
10117                 cf_cv_find_linkage_utf8=no
10118         fi
10119
10120 fi
10121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10122
10123 fi
10124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10125
10126 LIBS="$cf_save_LIBS"
10127
10128 if test "$cf_cv_find_linkage_utf8" = yes ; then
10129 cf_cv_utf8_lib=add-on
10130 else
10131 cf_cv_utf8_lib=no
10132 fi
10133
10134 fi
10135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10136 fi
10137 echo "$as_me:10137: result: $cf_cv_utf8_lib" >&5
10138 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10139
10140 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10141 # ncurses/ncursesw:
10142 if test "$cf_cv_utf8_lib" = "add-on" ; then
10143
10144 cat >>confdefs.h <<\EOF
10145 #define HAVE_LIBUTF8_H 1
10146 EOF
10147
10148 if test -n "$cf_cv_header_path_utf8" ; then
10149   for cf_add_incdir in $cf_cv_header_path_utf8
10150   do
10151         while test $cf_add_incdir != /usr/include
10152         do
10153           if test -d $cf_add_incdir
10154           then
10155                 cf_have_incdir=no
10156                 if test -n "$CFLAGS$CPPFLAGS" ; then
10157                   # a loop is needed to ensure we can add subdirs of existing dirs
10158                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10159                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10160                           cf_have_incdir=yes; break
10161                         fi
10162                   done
10163                 fi
10164
10165                 if test "$cf_have_incdir" = no ; then
10166                   if test "$cf_add_incdir" = /usr/local/include ; then
10167                         if test "$GCC" = yes
10168                         then
10169                           cf_save_CPPFLAGS=$CPPFLAGS
10170                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10171                           cat >conftest.$ac_ext <<_ACEOF
10172 #line 10172 "configure"
10173 #include "confdefs.h"
10174 #include <stdio.h>
10175 int
10176 main ()
10177 {
10178 printf("Hello")
10179   ;
10180   return 0;
10181 }
10182 _ACEOF
10183 rm -f conftest.$ac_objext
10184 if { (eval echo "$as_me:10184: \"$ac_compile\"") >&5
10185   (eval $ac_compile) 2>&5
10186   ac_status=$?
10187   echo "$as_me:10187: \$? = $ac_status" >&5
10188   (exit $ac_status); } &&
10189          { ac_try='test -s conftest.$ac_objext'
10190   { (eval echo "$as_me:10190: \"$ac_try\"") >&5
10191   (eval $ac_try) 2>&5
10192   ac_status=$?
10193   echo "$as_me:10193: \$? = $ac_status" >&5
10194   (exit $ac_status); }; }; then
10195   :
10196 else
10197   echo "$as_me: failed program was:" >&5
10198 cat conftest.$ac_ext >&5
10199 cf_have_incdir=yes
10200 fi
10201 rm -f conftest.$ac_objext conftest.$ac_ext
10202                           CPPFLAGS=$cf_save_CPPFLAGS
10203                         fi
10204                   fi
10205                 fi
10206
10207                 if test "$cf_have_incdir" = no ; then
10208                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10209
10210 echo "${as_me:-configure}:10210: testing adding $cf_add_incdir to include-path ..." 1>&5
10211
10212                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10213
10214                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10215                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10216                   cf_add_incdir="$cf_top_incdir"
10217                 else
10218                   break
10219                 fi
10220           else
10221                 break
10222           fi
10223         done
10224   done
10225 fi
10226
10227 if test -n "$cf_cv_library_path_utf8" ; then
10228         for cf_add_libdir in $cf_cv_library_path_utf8
10229         do
10230                 if test $cf_add_libdir = /usr/lib ; then
10231                         :
10232                 elif test -d $cf_add_libdir
10233                 then
10234                         cf_have_libdir=no
10235                         if test -n "$LDFLAGS$LIBS" ; then
10236                                 # a loop is needed to ensure we can add subdirs of existing dirs
10237                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10238                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10239                                                 cf_have_libdir=yes; break
10240                                         fi
10241                                 done
10242                         fi
10243                         if test "$cf_have_libdir" = no ; then
10244                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10245
10246 echo "${as_me:-configure}:10246: testing adding $cf_add_libdir to library-path ..." 1>&5
10247
10248                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10249                         fi
10250                 fi
10251         done
10252 fi
10253
10254 cf_add_libs="$cf_cv_library_file_utf8"
10255 # Filter out duplicates - this happens with badly-designed ".pc" files...
10256 for cf_add_1lib in $LIBS
10257 do
10258         for cf_add_2lib in $cf_add_libs
10259         do
10260                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10261                 then
10262                         cf_add_1lib=
10263                         break
10264                 fi
10265         done
10266         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10267 done
10268 LIBS="$cf_add_libs"
10269
10270 fi
10271
10272                 if test "$cf_cv_utf8_lib" != no ; then
10273                         NCURSES_LIBUTF8=1
10274                 fi
10275         fi
10276
10277 # This is needed on Tru64 5.0 to declare mbstate_t
10278 echo "$as_me:10278: checking if we must include wchar.h to declare mbstate_t" >&5
10279 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10280 if test "${cf_cv_mbstate_t+set}" = set; then
10281   echo $ECHO_N "(cached) $ECHO_C" >&6
10282 else
10283
10284 cat >conftest.$ac_ext <<_ACEOF
10285 #line 10285 "configure"
10286 #include "confdefs.h"
10287
10288 #include <stdlib.h>
10289 #include <stdarg.h>
10290 #include <stdio.h>
10291 #ifdef HAVE_LIBUTF8_H
10292 #include <libutf8.h>
10293 #endif
10294 int
10295 main ()
10296 {
10297 mbstate_t state
10298   ;
10299   return 0;
10300 }
10301 _ACEOF
10302 rm -f conftest.$ac_objext
10303 if { (eval echo "$as_me:10303: \"$ac_compile\"") >&5
10304   (eval $ac_compile) 2>&5
10305   ac_status=$?
10306   echo "$as_me:10306: \$? = $ac_status" >&5
10307   (exit $ac_status); } &&
10308          { ac_try='test -s conftest.$ac_objext'
10309   { (eval echo "$as_me:10309: \"$ac_try\"") >&5
10310   (eval $ac_try) 2>&5
10311   ac_status=$?
10312   echo "$as_me:10312: \$? = $ac_status" >&5
10313   (exit $ac_status); }; }; then
10314   cf_cv_mbstate_t=no
10315 else
10316   echo "$as_me: failed program was:" >&5
10317 cat conftest.$ac_ext >&5
10318 cat >conftest.$ac_ext <<_ACEOF
10319 #line 10319 "configure"
10320 #include "confdefs.h"
10321
10322 #include <stdlib.h>
10323 #include <stdarg.h>
10324 #include <stdio.h>
10325 #include <wchar.h>
10326 #ifdef HAVE_LIBUTF8_H
10327 #include <libutf8.h>
10328 #endif
10329 int
10330 main ()
10331 {
10332 mbstate_t value
10333   ;
10334   return 0;
10335 }
10336 _ACEOF
10337 rm -f conftest.$ac_objext
10338 if { (eval echo "$as_me:10338: \"$ac_compile\"") >&5
10339   (eval $ac_compile) 2>&5
10340   ac_status=$?
10341   echo "$as_me:10341: \$? = $ac_status" >&5
10342   (exit $ac_status); } &&
10343          { ac_try='test -s conftest.$ac_objext'
10344   { (eval echo "$as_me:10344: \"$ac_try\"") >&5
10345   (eval $ac_try) 2>&5
10346   ac_status=$?
10347   echo "$as_me:10347: \$? = $ac_status" >&5
10348   (exit $ac_status); }; }; then
10349   cf_cv_mbstate_t=yes
10350 else
10351   echo "$as_me: failed program was:" >&5
10352 cat conftest.$ac_ext >&5
10353 cf_cv_mbstate_t=unknown
10354 fi
10355 rm -f conftest.$ac_objext conftest.$ac_ext
10356 fi
10357 rm -f conftest.$ac_objext conftest.$ac_ext
10358 fi
10359 echo "$as_me:10359: result: $cf_cv_mbstate_t" >&5
10360 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10361
10362 if test "$cf_cv_mbstate_t" = yes ; then
10363
10364 cat >>confdefs.h <<\EOF
10365 #define NEED_WCHAR_H 1
10366 EOF
10367
10368         NEED_WCHAR_H=1
10369 fi
10370
10371 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10372 if test "$cf_cv_mbstate_t" = unknown ; then
10373         NCURSES_MBSTATE_T=1
10374 fi
10375
10376 # This is needed on Tru64 5.0 to declare wchar_t
10377 echo "$as_me:10377: checking if we must include wchar.h to declare wchar_t" >&5
10378 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10379 if test "${cf_cv_wchar_t+set}" = set; then
10380   echo $ECHO_N "(cached) $ECHO_C" >&6
10381 else
10382
10383 cat >conftest.$ac_ext <<_ACEOF
10384 #line 10384 "configure"
10385 #include "confdefs.h"
10386
10387 #include <stdlib.h>
10388 #include <stdarg.h>
10389 #include <stdio.h>
10390 #ifdef HAVE_LIBUTF8_H
10391 #include <libutf8.h>
10392 #endif
10393 int
10394 main ()
10395 {
10396 wchar_t state
10397   ;
10398   return 0;
10399 }
10400 _ACEOF
10401 rm -f conftest.$ac_objext
10402 if { (eval echo "$as_me:10402: \"$ac_compile\"") >&5
10403   (eval $ac_compile) 2>&5
10404   ac_status=$?
10405   echo "$as_me:10405: \$? = $ac_status" >&5
10406   (exit $ac_status); } &&
10407          { ac_try='test -s conftest.$ac_objext'
10408   { (eval echo "$as_me:10408: \"$ac_try\"") >&5
10409   (eval $ac_try) 2>&5
10410   ac_status=$?
10411   echo "$as_me:10411: \$? = $ac_status" >&5
10412   (exit $ac_status); }; }; then
10413   cf_cv_wchar_t=no
10414 else
10415   echo "$as_me: failed program was:" >&5
10416 cat conftest.$ac_ext >&5
10417 cat >conftest.$ac_ext <<_ACEOF
10418 #line 10418 "configure"
10419 #include "confdefs.h"
10420
10421 #include <stdlib.h>
10422 #include <stdarg.h>
10423 #include <stdio.h>
10424 #include <wchar.h>
10425 #ifdef HAVE_LIBUTF8_H
10426 #include <libutf8.h>
10427 #endif
10428 int
10429 main ()
10430 {
10431 wchar_t value
10432   ;
10433   return 0;
10434 }
10435 _ACEOF
10436 rm -f conftest.$ac_objext
10437 if { (eval echo "$as_me:10437: \"$ac_compile\"") >&5
10438   (eval $ac_compile) 2>&5
10439   ac_status=$?
10440   echo "$as_me:10440: \$? = $ac_status" >&5
10441   (exit $ac_status); } &&
10442          { ac_try='test -s conftest.$ac_objext'
10443   { (eval echo "$as_me:10443: \"$ac_try\"") >&5
10444   (eval $ac_try) 2>&5
10445   ac_status=$?
10446   echo "$as_me:10446: \$? = $ac_status" >&5
10447   (exit $ac_status); }; }; then
10448   cf_cv_wchar_t=yes
10449 else
10450   echo "$as_me: failed program was:" >&5
10451 cat conftest.$ac_ext >&5
10452 cf_cv_wchar_t=unknown
10453 fi
10454 rm -f conftest.$ac_objext conftest.$ac_ext
10455 fi
10456 rm -f conftest.$ac_objext conftest.$ac_ext
10457 fi
10458 echo "$as_me:10458: result: $cf_cv_wchar_t" >&5
10459 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10460
10461 if test "$cf_cv_wchar_t" = yes ; then
10462
10463 cat >>confdefs.h <<\EOF
10464 #define NEED_WCHAR_H 1
10465 EOF
10466
10467         NEED_WCHAR_H=1
10468 fi
10469
10470 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10471 if test "$cf_cv_wchar_t" = unknown ; then
10472         NCURSES_WCHAR_T=1
10473 fi
10474
10475 # if we find wchar_t in either place, use substitution to provide a fallback.
10476 if test "$cf_cv_wchar_t" != unknown ; then
10477         NCURSES_OK_WCHAR_T=1
10478 fi
10479
10480 # This is needed on Tru64 5.0 to declare wint_t
10481 echo "$as_me:10481: checking if we must include wchar.h to declare wint_t" >&5
10482 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10483 if test "${cf_cv_wint_t+set}" = set; then
10484   echo $ECHO_N "(cached) $ECHO_C" >&6
10485 else
10486
10487 cat >conftest.$ac_ext <<_ACEOF
10488 #line 10488 "configure"
10489 #include "confdefs.h"
10490
10491 #include <stdlib.h>
10492 #include <stdarg.h>
10493 #include <stdio.h>
10494 #ifdef HAVE_LIBUTF8_H
10495 #include <libutf8.h>
10496 #endif
10497 int
10498 main ()
10499 {
10500 wint_t state
10501   ;
10502   return 0;
10503 }
10504 _ACEOF
10505 rm -f conftest.$ac_objext
10506 if { (eval echo "$as_me:10506: \"$ac_compile\"") >&5
10507   (eval $ac_compile) 2>&5
10508   ac_status=$?
10509   echo "$as_me:10509: \$? = $ac_status" >&5
10510   (exit $ac_status); } &&
10511          { ac_try='test -s conftest.$ac_objext'
10512   { (eval echo "$as_me:10512: \"$ac_try\"") >&5
10513   (eval $ac_try) 2>&5
10514   ac_status=$?
10515   echo "$as_me:10515: \$? = $ac_status" >&5
10516   (exit $ac_status); }; }; then
10517   cf_cv_wint_t=no
10518 else
10519   echo "$as_me: failed program was:" >&5
10520 cat conftest.$ac_ext >&5
10521 cat >conftest.$ac_ext <<_ACEOF
10522 #line 10522 "configure"
10523 #include "confdefs.h"
10524
10525 #include <stdlib.h>
10526 #include <stdarg.h>
10527 #include <stdio.h>
10528 #include <wchar.h>
10529 #ifdef HAVE_LIBUTF8_H
10530 #include <libutf8.h>
10531 #endif
10532 int
10533 main ()
10534 {
10535 wint_t value
10536   ;
10537   return 0;
10538 }
10539 _ACEOF
10540 rm -f conftest.$ac_objext
10541 if { (eval echo "$as_me:10541: \"$ac_compile\"") >&5
10542   (eval $ac_compile) 2>&5
10543   ac_status=$?
10544   echo "$as_me:10544: \$? = $ac_status" >&5
10545   (exit $ac_status); } &&
10546          { ac_try='test -s conftest.$ac_objext'
10547   { (eval echo "$as_me:10547: \"$ac_try\"") >&5
10548   (eval $ac_try) 2>&5
10549   ac_status=$?
10550   echo "$as_me:10550: \$? = $ac_status" >&5
10551   (exit $ac_status); }; }; then
10552   cf_cv_wint_t=yes
10553 else
10554   echo "$as_me: failed program was:" >&5
10555 cat conftest.$ac_ext >&5
10556 cf_cv_wint_t=unknown
10557 fi
10558 rm -f conftest.$ac_objext conftest.$ac_ext
10559 fi
10560 rm -f conftest.$ac_objext conftest.$ac_ext
10561 fi
10562 echo "$as_me:10562: result: $cf_cv_wint_t" >&5
10563 echo "${ECHO_T}$cf_cv_wint_t" >&6
10564
10565 if test "$cf_cv_wint_t" = yes ; then
10566
10567 cat >>confdefs.h <<\EOF
10568 #define NEED_WCHAR_H 1
10569 EOF
10570
10571         NEED_WCHAR_H=1
10572 fi
10573
10574 # if we do not find wint_t in either place, use substitution to provide a fallback.
10575 if test "$cf_cv_wint_t" = unknown ; then
10576         NCURSES_WINT_T=1
10577 fi
10578
10579 # if we find wint_t in either place, use substitution to provide a fallback.
10580 if test "$cf_cv_wint_t" != unknown ; then
10581         NCURSES_OK_WINT_T=1
10582 fi
10583
10584         if test "$NCURSES_MBSTATE_T" != 0; then
10585
10586 cat >>confdefs.h <<\EOF
10587 #define NEED_MBSTATE_T_DEF 1
10588 EOF
10589
10590         fi
10591 fi
10592
10593 ###   use option --disable-lp64 to allow long chtype
10594 echo "$as_me:10594: checking whether to enable _LP64 definition in curses.h" >&5
10595 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10596
10597 # Check whether --enable-lp64 or --disable-lp64 was given.
10598 if test "${enable_lp64+set}" = set; then
10599   enableval="$enable_lp64"
10600   with_lp64=$enableval
10601 else
10602   with_lp64=$cf_dft_with_lp64
10603 fi;
10604 echo "$as_me:10604: result: $with_lp64" >&5
10605 echo "${ECHO_T}$with_lp64" >&6
10606
10607 if test "x$with_lp64" = xyes ; then
10608         cf_cv_enable_lp64=1
10609 else
10610         cf_cv_enable_lp64=0
10611 fi
10612
10613 # Check whether --enable-largefile or --disable-largefile was given.
10614 if test "${enable_largefile+set}" = set; then
10615   enableval="$enable_largefile"
10616
10617 fi;
10618 if test "$enable_largefile" != no; then
10619
10620   echo "$as_me:10620: checking for special C compiler options needed for large files" >&5
10621 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10622 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10623   echo $ECHO_N "(cached) $ECHO_C" >&6
10624 else
10625   ac_cv_sys_largefile_CC=no
10626      if test "$GCC" != yes; then
10627        ac_save_CC=$CC
10628        while :; do
10629          # IRIX 6.2 and later do not support large files by default,
10630          # so use the C compiler's -n32 option if that helps.
10631          cat >conftest.$ac_ext <<_ACEOF
10632 #line 10632 "configure"
10633 #include "confdefs.h"
10634 #include <sys/types.h>
10635  /* Check that off_t can represent 2**63 - 1 correctly.
10636     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10637     since some C++ compilers masquerading as C compilers
10638     incorrectly reject 9223372036854775807.  */
10639 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10640   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10641                        && LARGE_OFF_T % 2147483647 == 1)
10642                       ? 1 : -1];
10643 int
10644 main ()
10645 {
10646
10647   ;
10648   return 0;
10649 }
10650 _ACEOF
10651          rm -f conftest.$ac_objext
10652 if { (eval echo "$as_me:10652: \"$ac_compile\"") >&5
10653   (eval $ac_compile) 2>&5
10654   ac_status=$?
10655   echo "$as_me:10655: \$? = $ac_status" >&5
10656   (exit $ac_status); } &&
10657          { ac_try='test -s conftest.$ac_objext'
10658   { (eval echo "$as_me:10658: \"$ac_try\"") >&5
10659   (eval $ac_try) 2>&5
10660   ac_status=$?
10661   echo "$as_me:10661: \$? = $ac_status" >&5
10662   (exit $ac_status); }; }; then
10663   break
10664 else
10665   echo "$as_me: failed program was:" >&5
10666 cat conftest.$ac_ext >&5
10667 fi
10668 rm -f conftest.$ac_objext
10669          CC="$CC -n32"
10670          rm -f conftest.$ac_objext
10671 if { (eval echo "$as_me:10671: \"$ac_compile\"") >&5
10672   (eval $ac_compile) 2>&5
10673   ac_status=$?
10674   echo "$as_me:10674: \$? = $ac_status" >&5
10675   (exit $ac_status); } &&
10676          { ac_try='test -s conftest.$ac_objext'
10677   { (eval echo "$as_me:10677: \"$ac_try\"") >&5
10678   (eval $ac_try) 2>&5
10679   ac_status=$?
10680   echo "$as_me:10680: \$? = $ac_status" >&5
10681   (exit $ac_status); }; }; then
10682   ac_cv_sys_largefile_CC=' -n32'; break
10683 else
10684   echo "$as_me: failed program was:" >&5
10685 cat conftest.$ac_ext >&5
10686 fi
10687 rm -f conftest.$ac_objext
10688          break
10689        done
10690        CC=$ac_save_CC
10691        rm -f conftest.$ac_ext
10692     fi
10693 fi
10694 echo "$as_me:10694: result: $ac_cv_sys_largefile_CC" >&5
10695 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10696   if test "$ac_cv_sys_largefile_CC" != no; then
10697     CC=$CC$ac_cv_sys_largefile_CC
10698   fi
10699
10700   echo "$as_me:10700: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10701 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10702 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10703   echo $ECHO_N "(cached) $ECHO_C" >&6
10704 else
10705   while :; do
10706   ac_cv_sys_file_offset_bits=no
10707   cat >conftest.$ac_ext <<_ACEOF
10708 #line 10708 "configure"
10709 #include "confdefs.h"
10710 #include <sys/types.h>
10711  /* Check that off_t can represent 2**63 - 1 correctly.
10712     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10713     since some C++ compilers masquerading as C compilers
10714     incorrectly reject 9223372036854775807.  */
10715 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10716   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10717                        && LARGE_OFF_T % 2147483647 == 1)
10718                       ? 1 : -1];
10719 int
10720 main ()
10721 {
10722
10723   ;
10724   return 0;
10725 }
10726 _ACEOF
10727 rm -f conftest.$ac_objext
10728 if { (eval echo "$as_me:10728: \"$ac_compile\"") >&5
10729   (eval $ac_compile) 2>&5
10730   ac_status=$?
10731   echo "$as_me:10731: \$? = $ac_status" >&5
10732   (exit $ac_status); } &&
10733          { ac_try='test -s conftest.$ac_objext'
10734   { (eval echo "$as_me:10734: \"$ac_try\"") >&5
10735   (eval $ac_try) 2>&5
10736   ac_status=$?
10737   echo "$as_me:10737: \$? = $ac_status" >&5
10738   (exit $ac_status); }; }; then
10739   break
10740 else
10741   echo "$as_me: failed program was:" >&5
10742 cat conftest.$ac_ext >&5
10743 fi
10744 rm -f conftest.$ac_objext conftest.$ac_ext
10745   cat >conftest.$ac_ext <<_ACEOF
10746 #line 10746 "configure"
10747 #include "confdefs.h"
10748 #define _FILE_OFFSET_BITS 64
10749 #include <sys/types.h>
10750  /* Check that off_t can represent 2**63 - 1 correctly.
10751     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10752     since some C++ compilers masquerading as C compilers
10753     incorrectly reject 9223372036854775807.  */
10754 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10755   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10756                        && LARGE_OFF_T % 2147483647 == 1)
10757                       ? 1 : -1];
10758 int
10759 main ()
10760 {
10761
10762   ;
10763   return 0;
10764 }
10765 _ACEOF
10766 rm -f conftest.$ac_objext
10767 if { (eval echo "$as_me:10767: \"$ac_compile\"") >&5
10768   (eval $ac_compile) 2>&5
10769   ac_status=$?
10770   echo "$as_me:10770: \$? = $ac_status" >&5
10771   (exit $ac_status); } &&
10772          { ac_try='test -s conftest.$ac_objext'
10773   { (eval echo "$as_me:10773: \"$ac_try\"") >&5
10774   (eval $ac_try) 2>&5
10775   ac_status=$?
10776   echo "$as_me:10776: \$? = $ac_status" >&5
10777   (exit $ac_status); }; }; then
10778   ac_cv_sys_file_offset_bits=64; break
10779 else
10780   echo "$as_me: failed program was:" >&5
10781 cat conftest.$ac_ext >&5
10782 fi
10783 rm -f conftest.$ac_objext conftest.$ac_ext
10784   break
10785 done
10786 fi
10787 echo "$as_me:10787: result: $ac_cv_sys_file_offset_bits" >&5
10788 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10789 if test "$ac_cv_sys_file_offset_bits" != no; then
10790
10791 cat >>confdefs.h <<EOF
10792 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10793 EOF
10794
10795 fi
10796 rm -rf conftest*
10797   echo "$as_me:10797: checking for _LARGE_FILES value needed for large files" >&5
10798 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10799 if test "${ac_cv_sys_large_files+set}" = set; then
10800   echo $ECHO_N "(cached) $ECHO_C" >&6
10801 else
10802   while :; do
10803   ac_cv_sys_large_files=no
10804   cat >conftest.$ac_ext <<_ACEOF
10805 #line 10805 "configure"
10806 #include "confdefs.h"
10807 #include <sys/types.h>
10808  /* Check that off_t can represent 2**63 - 1 correctly.
10809     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10810     since some C++ compilers masquerading as C compilers
10811     incorrectly reject 9223372036854775807.  */
10812 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10813   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10814                        && LARGE_OFF_T % 2147483647 == 1)
10815                       ? 1 : -1];
10816 int
10817 main ()
10818 {
10819
10820   ;
10821   return 0;
10822 }
10823 _ACEOF
10824 rm -f conftest.$ac_objext
10825 if { (eval echo "$as_me:10825: \"$ac_compile\"") >&5
10826   (eval $ac_compile) 2>&5
10827   ac_status=$?
10828   echo "$as_me:10828: \$? = $ac_status" >&5
10829   (exit $ac_status); } &&
10830          { ac_try='test -s conftest.$ac_objext'
10831   { (eval echo "$as_me:10831: \"$ac_try\"") >&5
10832   (eval $ac_try) 2>&5
10833   ac_status=$?
10834   echo "$as_me:10834: \$? = $ac_status" >&5
10835   (exit $ac_status); }; }; then
10836   break
10837 else
10838   echo "$as_me: failed program was:" >&5
10839 cat conftest.$ac_ext >&5
10840 fi
10841 rm -f conftest.$ac_objext conftest.$ac_ext
10842   cat >conftest.$ac_ext <<_ACEOF
10843 #line 10843 "configure"
10844 #include "confdefs.h"
10845 #define _LARGE_FILES 1
10846 #include <sys/types.h>
10847  /* Check that off_t can represent 2**63 - 1 correctly.
10848     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10849     since some C++ compilers masquerading as C compilers
10850     incorrectly reject 9223372036854775807.  */
10851 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10852   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10853                        && LARGE_OFF_T % 2147483647 == 1)
10854                       ? 1 : -1];
10855 int
10856 main ()
10857 {
10858
10859   ;
10860   return 0;
10861 }
10862 _ACEOF
10863 rm -f conftest.$ac_objext
10864 if { (eval echo "$as_me:10864: \"$ac_compile\"") >&5
10865   (eval $ac_compile) 2>&5
10866   ac_status=$?
10867   echo "$as_me:10867: \$? = $ac_status" >&5
10868   (exit $ac_status); } &&
10869          { ac_try='test -s conftest.$ac_objext'
10870   { (eval echo "$as_me:10870: \"$ac_try\"") >&5
10871   (eval $ac_try) 2>&5
10872   ac_status=$?
10873   echo "$as_me:10873: \$? = $ac_status" >&5
10874   (exit $ac_status); }; }; then
10875   ac_cv_sys_large_files=1; break
10876 else
10877   echo "$as_me: failed program was:" >&5
10878 cat conftest.$ac_ext >&5
10879 fi
10880 rm -f conftest.$ac_objext conftest.$ac_ext
10881   break
10882 done
10883 fi
10884 echo "$as_me:10884: result: $ac_cv_sys_large_files" >&5
10885 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10886 if test "$ac_cv_sys_large_files" != no; then
10887
10888 cat >>confdefs.h <<EOF
10889 #define _LARGE_FILES $ac_cv_sys_large_files
10890 EOF
10891
10892 fi
10893 rm -rf conftest*
10894 fi
10895
10896         if test "$enable_largefile" != no ; then
10897         echo "$as_me:10897: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10898 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10899 if test "${ac_cv_sys_largefile_source+set}" = set; then
10900   echo $ECHO_N "(cached) $ECHO_C" >&6
10901 else
10902   while :; do
10903   ac_cv_sys_largefile_source=no
10904   cat >conftest.$ac_ext <<_ACEOF
10905 #line 10905 "configure"
10906 #include "confdefs.h"
10907 #include <stdio.h>
10908 int
10909 main ()
10910 {
10911 return !fseeko;
10912   ;
10913   return 0;
10914 }
10915 _ACEOF
10916 rm -f conftest.$ac_objext
10917 if { (eval echo "$as_me:10917: \"$ac_compile\"") >&5
10918   (eval $ac_compile) 2>&5
10919   ac_status=$?
10920   echo "$as_me:10920: \$? = $ac_status" >&5
10921   (exit $ac_status); } &&
10922          { ac_try='test -s conftest.$ac_objext'
10923   { (eval echo "$as_me:10923: \"$ac_try\"") >&5
10924   (eval $ac_try) 2>&5
10925   ac_status=$?
10926   echo "$as_me:10926: \$? = $ac_status" >&5
10927   (exit $ac_status); }; }; then
10928   break
10929 else
10930   echo "$as_me: failed program was:" >&5
10931 cat conftest.$ac_ext >&5
10932 fi
10933 rm -f conftest.$ac_objext conftest.$ac_ext
10934   cat >conftest.$ac_ext <<_ACEOF
10935 #line 10935 "configure"
10936 #include "confdefs.h"
10937 #define _LARGEFILE_SOURCE 1
10938 #include <stdio.h>
10939 int
10940 main ()
10941 {
10942 return !fseeko;
10943   ;
10944   return 0;
10945 }
10946 _ACEOF
10947 rm -f conftest.$ac_objext
10948 if { (eval echo "$as_me:10948: \"$ac_compile\"") >&5
10949   (eval $ac_compile) 2>&5
10950   ac_status=$?
10951   echo "$as_me:10951: \$? = $ac_status" >&5
10952   (exit $ac_status); } &&
10953          { ac_try='test -s conftest.$ac_objext'
10954   { (eval echo "$as_me:10954: \"$ac_try\"") >&5
10955   (eval $ac_try) 2>&5
10956   ac_status=$?
10957   echo "$as_me:10957: \$? = $ac_status" >&5
10958   (exit $ac_status); }; }; then
10959   ac_cv_sys_largefile_source=1; break
10960 else
10961   echo "$as_me: failed program was:" >&5
10962 cat conftest.$ac_ext >&5
10963 fi
10964 rm -f conftest.$ac_objext conftest.$ac_ext
10965   break
10966 done
10967 fi
10968 echo "$as_me:10968: result: $ac_cv_sys_largefile_source" >&5
10969 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10970 if test "$ac_cv_sys_largefile_source" != no; then
10971
10972 cat >>confdefs.h <<EOF
10973 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10974 EOF
10975
10976 fi
10977 rm -rf conftest*
10978
10979 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10980 # in glibc 2.1.3, but that breaks too many other things.
10981 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10982 echo "$as_me:10982: checking for fseeko" >&5
10983 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10984 if test "${ac_cv_func_fseeko+set}" = set; then
10985   echo $ECHO_N "(cached) $ECHO_C" >&6
10986 else
10987   cat >conftest.$ac_ext <<_ACEOF
10988 #line 10988 "configure"
10989 #include "confdefs.h"
10990 #include <stdio.h>
10991 int
10992 main ()
10993 {
10994 return fseeko && fseeko (stdin, 0, 0);
10995   ;
10996   return 0;
10997 }
10998 _ACEOF
10999 rm -f conftest.$ac_objext conftest$ac_exeext
11000 if { (eval echo "$as_me:11000: \"$ac_link\"") >&5
11001   (eval $ac_link) 2>&5
11002   ac_status=$?
11003   echo "$as_me:11003: \$? = $ac_status" >&5
11004   (exit $ac_status); } &&
11005          { ac_try='test -s conftest$ac_exeext'
11006   { (eval echo "$as_me:11006: \"$ac_try\"") >&5
11007   (eval $ac_try) 2>&5
11008   ac_status=$?
11009   echo "$as_me:11009: \$? = $ac_status" >&5
11010   (exit $ac_status); }; }; then
11011   ac_cv_func_fseeko=yes
11012 else
11013   echo "$as_me: failed program was:" >&5
11014 cat conftest.$ac_ext >&5
11015 ac_cv_func_fseeko=no
11016 fi
11017 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11018 fi
11019 echo "$as_me:11019: result: $ac_cv_func_fseeko" >&5
11020 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11021 if test $ac_cv_func_fseeko = yes; then
11022
11023 cat >>confdefs.h <<\EOF
11024 #define HAVE_FSEEKO 1
11025 EOF
11026
11027 fi
11028
11029         # Normally we would collect these definitions in the config.h,
11030         # but (like _XOPEN_SOURCE), some environments rely on having these
11031         # defined before any of the system headers are included.  Another
11032         # case comes up with C++, e.g., on AIX the compiler compiles the
11033         # header files by themselves before looking at the body files it is
11034         # told to compile.  For ncurses, those header files do not include
11035         # the config.h
11036         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11037         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11038         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11039
11040         echo "$as_me:11040: checking whether to use struct dirent64" >&5
11041 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11042 if test "${cf_cv_struct_dirent64+set}" = set; then
11043   echo $ECHO_N "(cached) $ECHO_C" >&6
11044 else
11045
11046                 cat >conftest.$ac_ext <<_ACEOF
11047 #line 11047 "configure"
11048 #include "confdefs.h"
11049
11050 #include <sys/types.h>
11051 #include <dirent.h>
11052
11053 int
11054 main ()
11055 {
11056
11057                 /* if transitional largefile support is setup, this is true */
11058                 extern struct dirent64 * readdir(DIR *);
11059                 struct dirent64 *x = readdir((DIR *)0);
11060                 struct dirent *y = readdir((DIR *)0);
11061                 int z = x - y;
11062
11063   ;
11064   return 0;
11065 }
11066 _ACEOF
11067 rm -f conftest.$ac_objext
11068 if { (eval echo "$as_me:11068: \"$ac_compile\"") >&5
11069   (eval $ac_compile) 2>&5
11070   ac_status=$?
11071   echo "$as_me:11071: \$? = $ac_status" >&5
11072   (exit $ac_status); } &&
11073          { ac_try='test -s conftest.$ac_objext'
11074   { (eval echo "$as_me:11074: \"$ac_try\"") >&5
11075   (eval $ac_try) 2>&5
11076   ac_status=$?
11077   echo "$as_me:11077: \$? = $ac_status" >&5
11078   (exit $ac_status); }; }; then
11079   cf_cv_struct_dirent64=yes
11080 else
11081   echo "$as_me: failed program was:" >&5
11082 cat conftest.$ac_ext >&5
11083 cf_cv_struct_dirent64=no
11084 fi
11085 rm -f conftest.$ac_objext conftest.$ac_ext
11086
11087 fi
11088 echo "$as_me:11088: result: $cf_cv_struct_dirent64" >&5
11089 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11090         test "$cf_cv_struct_dirent64" = yes &&
11091 cat >>confdefs.h <<\EOF
11092 #define HAVE_STRUCT_DIRENT64 1
11093 EOF
11094
11095         fi
11096
11097 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11098 echo "$as_me:11098: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11099 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11100
11101 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11102 if test "${enable_tparm_varargs+set}" = set; then
11103   enableval="$enable_tparm_varargs"
11104   with_tparm_varargs=$enableval
11105 else
11106   with_tparm_varargs=yes
11107 fi;
11108 echo "$as_me:11108: result: $with_tparm_varargs" >&5
11109 echo "${ECHO_T}$with_tparm_varargs" >&6
11110 NCURSES_TPARM_VARARGS=0
11111 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11112
11113 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11114 if test "$with_ticlib" != no ; then
11115 echo "$as_me:11115: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11116 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11117
11118 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11119 if test "${enable_tic_depends+set}" = set; then
11120   enableval="$enable_tic_depends"
11121   with_tic_depends=$enableval
11122 else
11123   with_tic_depends=yes
11124 fi;
11125 echo "$as_me:11125: result: $with_tic_depends" >&5
11126 echo "${ECHO_T}$with_tic_depends" >&6
11127 else
11128         with_tic_depends=no
11129 fi
11130
11131 ###   use option --with-bool to override bool's type
11132 echo "$as_me:11132: checking for type of bool" >&5
11133 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11134
11135 # Check whether --with-bool or --without-bool was given.
11136 if test "${with_bool+set}" = set; then
11137   withval="$with_bool"
11138   NCURSES_BOOL="$withval"
11139 else
11140   NCURSES_BOOL=auto
11141 fi;
11142 echo "$as_me:11142: result: $NCURSES_BOOL" >&5
11143 echo "${ECHO_T}$NCURSES_BOOL" >&6
11144
11145 echo "$as_me:11145: checking for alternate terminal capabilities file" >&5
11146 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11147
11148 # Check whether --with-caps or --without-caps was given.
11149 if test "${with_caps+set}" = set; then
11150   withval="$with_caps"
11151   TERMINFO_CAPS=Caps.$withval
11152 else
11153   TERMINFO_CAPS=Caps
11154 fi;
11155 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11156 echo "$as_me:11156: result: $TERMINFO_CAPS" >&5
11157 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11158
11159 ###   use option --with-chtype to override chtype's type
11160 echo "$as_me:11160: checking for type of chtype" >&5
11161 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11162
11163 # Check whether --with-chtype or --without-chtype was given.
11164 if test "${with_chtype+set}" = set; then
11165   withval="$with_chtype"
11166   NCURSES_CHTYPE="$withval"
11167 else
11168   NCURSES_CHTYPE=$cf_dft_chtype
11169 fi;
11170 echo "$as_me:11170: result: $NCURSES_CHTYPE" >&5
11171 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11172
11173 ###   use option --with-ospeed to override ospeed's type
11174 echo "$as_me:11174: checking for type of ospeed" >&5
11175 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11176
11177 # Check whether --with-ospeed or --without-ospeed was given.
11178 if test "${with_ospeed+set}" = set; then
11179   withval="$with_ospeed"
11180   NCURSES_OSPEED="$withval"
11181 else
11182   NCURSES_OSPEED=short
11183 fi;
11184 echo "$as_me:11184: result: $NCURSES_OSPEED" >&5
11185 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11186
11187 ###   use option --with-mmask-t to override mmask_t's type
11188 echo "$as_me:11188: checking for type of mmask_t" >&5
11189 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11190
11191 # Check whether --with-mmask-t or --without-mmask-t was given.
11192 if test "${with_mmask_t+set}" = set; then
11193   withval="$with_mmask_t"
11194   NCURSES_MMASK_T="$withval"
11195 else
11196   NCURSES_MMASK_T=$cf_dft_mmask_t
11197 fi;
11198 echo "$as_me:11198: result: $NCURSES_MMASK_T" >&5
11199 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11200
11201 ###   use option --with-ccharw-max to override CCHARW_MAX size
11202 echo "$as_me:11202: checking for size CCHARW_MAX" >&5
11203 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11204
11205 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11206 if test "${with_ccharw_max+set}" = set; then
11207   withval="$with_ccharw_max"
11208   NCURSES_CCHARW_MAX="$withval"
11209 else
11210   NCURSES_CCHARW_MAX=5
11211 fi;
11212 echo "$as_me:11212: result: $NCURSES_CCHARW_MAX" >&5
11213 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11214
11215 ###   use option --with-tparm-arg to override tparm's argument type
11216 echo "$as_me:11216: checking for type of tparm args" >&5
11217 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11218
11219 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11220 if test "${with_tparm_arg+set}" = set; then
11221   withval="$with_tparm_arg"
11222   NCURSES_TPARM_ARG="$withval"
11223 else
11224   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11225 fi;
11226 echo "$as_me:11226: result: $NCURSES_TPARM_ARG" >&5
11227 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11228
11229 ### Enable compiling-in rcs id's
11230 echo "$as_me:11230: checking if RCS identifiers should be compiled-in" >&5
11231 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11232
11233 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11234 if test "${with_rcs_ids+set}" = set; then
11235   withval="$with_rcs_ids"
11236   with_rcs_ids=$withval
11237 else
11238   with_rcs_ids=no
11239 fi;
11240 echo "$as_me:11240: result: $with_rcs_ids" >&5
11241 echo "${ECHO_T}$with_rcs_ids" >&6
11242 test "x$with_rcs_ids" = xyes &&
11243 cat >>confdefs.h <<\EOF
11244 #define USE_RCS_IDS 1
11245 EOF
11246
11247 ###############################################################################
11248
11249 echo "$as_me:11249: checking format of man-pages" >&5
11250 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11251
11252 # Check whether --with-manpage-format or --without-manpage-format was given.
11253 if test "${with_manpage_format+set}" = set; then
11254   withval="$with_manpage_format"
11255   MANPAGE_FORMAT=$withval
11256 else
11257   MANPAGE_FORMAT=unknown
11258 fi;
11259
11260 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11261 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11262
11263 cf_unknown=
11264
11265 case $MANPAGE_FORMAT in
11266 (unknown)
11267         if test -z "$MANPATH" ; then
11268                 MANPATH="/usr/man:/usr/share/man"
11269         fi
11270
11271         # look for the 'date' man-page (it's most likely to be installed!)
11272         MANPAGE_FORMAT=
11273         cf_preform=no
11274         cf_catonly=yes
11275         cf_example=date
11276
11277         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11278         for cf_dir in $MANPATH; do
11279                 test -z "$cf_dir" && cf_dir=/usr/man
11280                 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
11281                 do
11282                         cf_test=`echo $cf_name | sed -e 's/*//'`
11283                         if test "x$cf_test" = "x$cf_name" ; then
11284
11285                                 case "$cf_name" in
11286                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11287                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11288                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11289                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11290                                 esac
11291
11292                                 case "$cf_name" in
11293                                 ($cf_dir/man*)
11294                                         cf_catonly=no
11295                                         ;;
11296                                 ($cf_dir/cat*)
11297                                         cf_preform=yes
11298                                         ;;
11299                                 esac
11300                                 break
11301                         fi
11302
11303                         # if we found a match in either man* or cat*, stop looking
11304                         if test -n "$MANPAGE_FORMAT" ; then
11305                                 cf_found=no
11306                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11307                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11308                                 case "$cf_name" in
11309                                 ($cf_dir/cat*)
11310                                         cf_found=yes
11311                                         ;;
11312                                 esac
11313                                 test $cf_found=yes && break
11314                         fi
11315                 done
11316                 # only check the first directory in $MANPATH where we find manpages
11317                 if test -n "$MANPAGE_FORMAT" ; then
11318                         break
11319                 fi
11320         done
11321         # if we did not find the example, just assume it is normal
11322         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11323         IFS="$ac_save_ifs"
11324         ;;
11325 (*)
11326         for cf_option in $MANPAGE_FORMAT; do
11327         case $cf_option in
11328         (gzip|compress|BSDI|normal|formatted|catonly)
11329                 ;;
11330         (*)
11331                 cf_unknown="$cf_unknown $cf_option"
11332                 ;;
11333         esac
11334         done
11335         ;;
11336 esac
11337
11338 echo "$as_me:11338: result: $MANPAGE_FORMAT" >&5
11339 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11340 if test -n "$cf_unknown" ; then
11341         { echo "$as_me:11341: WARNING: Unexpected manpage-format $cf_unknown" >&5
11342 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11343 fi
11344
11345 echo "$as_me:11345: checking for manpage renaming" >&5
11346 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11347
11348 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11349 if test "${with_manpage_renames+set}" = set; then
11350   withval="$with_manpage_renames"
11351   MANPAGE_RENAMES=$withval
11352 else
11353   MANPAGE_RENAMES=yes
11354 fi;
11355
11356 case ".$MANPAGE_RENAMES" in
11357 (.no)
11358         ;;
11359 (.|.yes)
11360         # Debian 'man' program?
11361         if test -f /etc/debian_version ; then
11362                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11363         else
11364                 MANPAGE_RENAMES=no
11365         fi
11366         ;;
11367 esac
11368
11369 if test "$MANPAGE_RENAMES" != no ; then
11370         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11371                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11372         elif test ! -f $MANPAGE_RENAMES ; then
11373                 { { echo "$as_me:11373: error: not a filename: $MANPAGE_RENAMES" >&5
11374 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11375    { (exit 1); exit 1; }; }
11376         fi
11377
11378         test ! -d man && mkdir man
11379
11380         # Construct a sed-script to perform renaming within man-pages
11381         if test -n "$MANPAGE_RENAMES" ; then
11382                 test ! -d man && mkdir man
11383                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11384         fi
11385 fi
11386
11387 echo "$as_me:11387: result: $MANPAGE_RENAMES" >&5
11388 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11389
11390 echo "$as_me:11390: checking if manpage aliases will be installed" >&5
11391 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11392
11393 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11394 if test "${with_manpage_aliases+set}" = set; then
11395   withval="$with_manpage_aliases"
11396   MANPAGE_ALIASES=$withval
11397 else
11398   MANPAGE_ALIASES=yes
11399 fi;
11400
11401 echo "$as_me:11401: result: $MANPAGE_ALIASES" >&5
11402 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11403
11404 case "x$LN_S" in
11405 (xln*)
11406         cf_use_symlinks=yes
11407         ;;
11408 (*)
11409         cf_use_symlinks=no
11410         ;;
11411 esac
11412
11413 MANPAGE_SYMLINKS=no
11414 if test "$MANPAGE_ALIASES" = yes ; then
11415 echo "$as_me:11415: checking if manpage symlinks should be used" >&5
11416 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11417
11418 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11419 if test "${with_manpage_symlinks+set}" = set; then
11420   withval="$with_manpage_symlinks"
11421   MANPAGE_SYMLINKS=$withval
11422 else
11423   MANPAGE_SYMLINKS=$cf_use_symlinks
11424 fi;
11425
11426 if test "$$cf_use_symlinks" = no; then
11427 if test "$MANPAGE_SYMLINKS" = yes ; then
11428         { echo "$as_me:11428: WARNING: cannot make symlinks" >&5
11429 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11430         MANPAGE_SYMLINKS=no
11431 fi
11432 fi
11433
11434 echo "$as_me:11434: result: $MANPAGE_SYMLINKS" >&5
11435 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11436 fi
11437
11438 echo "$as_me:11438: checking for manpage tbl" >&5
11439 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11440
11441 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11442 if test "${with_manpage_tbl+set}" = set; then
11443   withval="$with_manpage_tbl"
11444   MANPAGE_TBL=$withval
11445 else
11446   MANPAGE_TBL=no
11447 fi;
11448
11449 echo "$as_me:11449: result: $MANPAGE_TBL" >&5
11450 echo "${ECHO_T}$MANPAGE_TBL" >&6
11451
11452 if test "$prefix" = "NONE" ; then
11453         cf_prefix="$ac_default_prefix"
11454 else
11455         cf_prefix="$prefix"
11456 fi
11457
11458 case "$MANPAGE_FORMAT" in
11459 (*catonly*)
11460         cf_format=yes
11461         cf_inboth=no
11462         ;;
11463 (*formatted*)
11464         cf_format=yes
11465         cf_inboth=yes
11466         ;;
11467 (*)
11468         cf_format=no
11469         cf_inboth=no
11470         ;;
11471 esac
11472
11473 test ! -d man && mkdir man
11474
11475 cf_so_strip=
11476 cf_compress=
11477 case "$MANPAGE_FORMAT" in
11478 (*compress*)
11479         cf_so_strip="Z"
11480         cf_compress=compress
11481         ;;
11482 (*gzip*)
11483         cf_so_strip="gz"
11484         cf_compress=gzip
11485         ;;
11486 esac
11487
11488 cf_edit_man=./edit_man.sh
11489 cf_man_alias=`pwd`/man_alias.sed
11490
11491 cat >$cf_edit_man <<CF_EOF
11492 #! $SHELL
11493 # this script is generated by the configure-script CF_MAN_PAGES macro.
11494
11495 prefix="$cf_prefix"
11496 datarootdir="$datarootdir"
11497 datadir="$datadir"
11498
11499 NCURSES_MAJOR="$NCURSES_MAJOR"
11500 NCURSES_MINOR="$NCURSES_MINOR"
11501 NCURSES_PATCH="$NCURSES_PATCH"
11502
11503 NCURSES_OSPEED="$NCURSES_OSPEED"
11504 TERMINFO="$TERMINFO"
11505
11506 INSTALL="$INSTALL"
11507 INSTALL_DATA="$INSTALL_DATA"
11508
11509 transform="$program_transform_name"
11510
11511 TMP=\${TMPDIR:=/tmp}/man\$\$
11512 trap "rm -f \$TMP" 0 1 2 5 15
11513
11514 form=\$1
11515 shift || exit 1
11516
11517 verb=\$1
11518 shift || exit 1
11519
11520 mandir=\$1
11521 shift || exit 1
11522
11523 srcdir=\$1
11524 top_srcdir=\$srcdir/..
11525 shift || exit 1
11526
11527 if test "\$form" = normal ; then
11528         if test "$cf_format" = yes ; then
11529         if test "$cf_inboth" = no ; then
11530                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11531                 exit $?
11532         fi
11533         fi
11534         cf_subdir=\$mandir/man
11535         cf_tables=$MANPAGE_TBL
11536 else
11537         cf_subdir=\$mandir/cat
11538         cf_tables=yes
11539 fi
11540
11541 # process the list of source-files
11542 for i in \$* ; do
11543 case \$i in
11544 (*.orig|*.rej) ;;
11545 (*.[0-9]*)
11546         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11547         if test \$verb = installing ; then
11548         if test ! -d \$cf_subdir\${section} ; then
11549                 mkdir -p \$cf_subdir\$section
11550         fi
11551         fi
11552
11553         # replace variables in man page
11554         if test ! -f $cf_man_alias ; then
11555 cat >>$cf_man_alias <<-CF_EOF2
11556                 s,@DATADIR@,\$datadir,g
11557                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11558                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11559                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11560                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11561                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11562                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11563 CF_EOF
11564
11565         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11566         do
11567                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11568                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11569 cat >>$cf_edit_man <<-CF_EOF
11570                 s,@$cf_NAME@,$cf_name,g
11571 CF_EOF
11572         done
11573
11574 cat >>$cf_edit_man <<CF_EOF
11575 CF_EOF2
11576                 echo "...made $cf_man_alias"
11577         fi
11578
11579         aliases=
11580         cf_source=\`basename \$i\`
11581         inalias=\$cf_source
11582         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11583         if test ! -f \$inalias ; then
11584                 echo .. skipped \$cf_source
11585                 continue
11586         fi
11587 CF_EOF
11588
11589 if test "$MANPAGE_ALIASES" != no ; then
11590 cat >>$cf_edit_man <<CF_EOF
11591         nCurses=ignore.3x
11592         test $with_curses_h = yes && nCurses=ncurses.3x
11593         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11594 CF_EOF
11595 fi
11596
11597 if test "$MANPAGE_RENAMES" = no ; then
11598 cat >>$cf_edit_man <<CF_EOF
11599         # perform program transformations for section 1 man pages
11600         if test \$section = 1 ; then
11601                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11602         else
11603                 cf_target=\$cf_subdir\${section}/\$cf_source
11604         fi
11605 CF_EOF
11606 else
11607 cat >>$cf_edit_man <<CF_EOF
11608         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11609         if test -z "\$cf_target" ; then
11610                 echo '? missing rename for '\$cf_source
11611                 cf_target="\$cf_source"
11612         fi
11613         cf_target="\$cf_subdir\${section}/\${cf_target}"
11614
11615 CF_EOF
11616 fi
11617
11618 cat >>$cf_edit_man <<CF_EOF
11619         sed     -f $cf_man_alias \\
11620 CF_EOF
11621
11622 if test -f $MANPAGE_RENAMES ; then
11623 cat >>$cf_edit_man <<CF_EOF
11624                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11625 CF_EOF
11626 else
11627 cat >>$cf_edit_man <<CF_EOF
11628                 < \$i >\$TMP
11629 CF_EOF
11630 fi
11631
11632 cat >>$cf_edit_man <<CF_EOF
11633 if test \$cf_tables = yes ; then
11634         tbl \$TMP >\$TMP.out
11635         mv \$TMP.out \$TMP
11636 fi
11637 CF_EOF
11638
11639 if test $with_overwrite != yes ; then
11640 cat >>$cf_edit_man <<CF_EOF
11641         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11642         mv \$TMP.out \$TMP
11643 CF_EOF
11644 fi
11645
11646 if test $with_curses_h != yes ; then
11647 cat >>$cf_edit_man <<CF_EOF
11648         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11649         mv \$TMP.out \$TMP
11650 CF_EOF
11651 fi
11652
11653 cat >>$cf_edit_man <<CF_EOF
11654         if test \$form = format ; then
11655                 nroff -man \$TMP >\$TMP.out
11656                 mv \$TMP.out \$TMP
11657         fi
11658 CF_EOF
11659
11660 if test -n "$cf_compress" ; then
11661 cat >>$cf_edit_man <<CF_EOF
11662         if test \$verb = installing ; then
11663         if ( $cf_compress -f \$TMP )
11664         then
11665                 mv \$TMP.$cf_so_strip \$TMP
11666         fi
11667         fi
11668         cf_target="\$cf_target.$cf_so_strip"
11669 CF_EOF
11670 fi
11671
11672 case "$MANPAGE_FORMAT" in
11673 (*BSDI*)
11674 cat >>$cf_edit_man <<CF_EOF
11675         if test \$form = format ; then
11676                 # BSDI installs only .0 suffixes in the cat directories
11677                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11678         fi
11679 CF_EOF
11680   ;;
11681 esac
11682
11683 cat >>$cf_edit_man <<CF_EOF
11684         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11685         if test \$verb = installing ; then
11686                 echo \$verb \$cf_target
11687                 \$INSTALL_DATA \$TMP \$cf_target
11688                 test -d \$cf_subdir\${section} &&
11689                 test -n "\$aliases" && (
11690                         cd \$cf_subdir\${section} && (
11691                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11692                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11693                                 cf_target=\`basename \$cf_target\`
11694                                 for cf_alias in \$aliases
11695                                 do
11696                                         if test \$section = 1 ; then
11697                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11698                                         fi
11699
11700                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11701                                                 if test -f \$cf_alias\${suffix} ; then
11702                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11703                                                         then
11704                                                                 continue
11705                                                         fi
11706                                                 fi
11707                                                 echo .. \$verb alias \$cf_alias\${suffix}
11708 CF_EOF
11709 case "x$LN_S" in
11710 (*-f)
11711 cat >>$cf_edit_man <<CF_EOF
11712                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11713 CF_EOF
11714         ;;
11715 (*)
11716 cat >>$cf_edit_man <<CF_EOF
11717                                                 rm -f \$cf_alias\${suffix}
11718                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11719 CF_EOF
11720         ;;
11721 esac
11722 cat >>$cf_edit_man <<CF_EOF
11723                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11724                                                 echo ".so \$cf_source" >\$TMP
11725 CF_EOF
11726 if test -n "$cf_compress" ; then
11727 cat >>$cf_edit_man <<CF_EOF
11728                                                 if test -n "$cf_so_strip" ; then
11729                                                         $cf_compress -f \$TMP
11730                                                         mv \$TMP.$cf_so_strip \$TMP
11731                                                 fi
11732 CF_EOF
11733 fi
11734 cat >>$cf_edit_man <<CF_EOF
11735                                                 echo .. \$verb alias \$cf_alias\${suffix}
11736                                                 rm -f \$cf_alias\${suffix}
11737                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11738                                         fi
11739                                 done
11740                         )
11741                 )
11742         elif test \$verb = removing ; then
11743                 test -f \$cf_target && (
11744                         echo \$verb \$cf_target
11745                         rm -f \$cf_target
11746                 )
11747                 test -d \$cf_subdir\${section} &&
11748                 test -n "\$aliases" && (
11749                         cd \$cf_subdir\${section} && (
11750                                 for cf_alias in \$aliases
11751                                 do
11752                                         if test \$section = 1 ; then
11753                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11754                                         fi
11755
11756                                         echo .. \$verb alias \$cf_alias\${suffix}
11757                                         rm -f \$cf_alias\${suffix}
11758                                 done
11759                         )
11760                 )
11761         else
11762 #               echo ".hy 0"
11763                 cat \$TMP
11764         fi
11765         ;;
11766 esac
11767 done
11768
11769 if test $cf_inboth = yes ; then
11770 if test \$form != format ; then
11771         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11772 fi
11773 fi
11774
11775 exit 0
11776 CF_EOF
11777 chmod 755 $cf_edit_man
11778
11779 ###############################################################################
11780
11781 ### Note that some functions (such as const) are normally disabled anyway.
11782 echo "$as_me:11782: checking if you want to build with function extensions" >&5
11783 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11784
11785 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11786 if test "${enable_ext_funcs+set}" = set; then
11787   enableval="$enable_ext_funcs"
11788   with_ext_funcs=$enableval
11789 else
11790   with_ext_funcs=yes
11791 fi;
11792 echo "$as_me:11792: result: $with_ext_funcs" >&5
11793 echo "${ECHO_T}$with_ext_funcs" >&6
11794 if test "x$with_ext_funcs" = xyes ; then
11795         NCURSES_EXT_FUNCS=1
11796
11797 cat >>confdefs.h <<\EOF
11798 #define HAVE_ASSUME_DEFAULT_COLORS 1
11799 EOF
11800
11801 cat >>confdefs.h <<\EOF
11802 #define HAVE_CURSES_VERSION 1
11803 EOF
11804
11805 cat >>confdefs.h <<\EOF
11806 #define HAVE_HAS_KEY 1
11807 EOF
11808
11809 cat >>confdefs.h <<\EOF
11810 #define HAVE_RESIZETERM 1
11811 EOF
11812
11813 cat >>confdefs.h <<\EOF
11814 #define HAVE_RESIZE_TERM 1
11815 EOF
11816
11817 cat >>confdefs.h <<\EOF
11818 #define HAVE_TERM_ENTRY_H 1
11819 EOF
11820
11821 cat >>confdefs.h <<\EOF
11822 #define HAVE_USE_DEFAULT_COLORS 1
11823 EOF
11824
11825 cat >>confdefs.h <<\EOF
11826 #define HAVE_USE_EXTENDED_NAMES 1
11827 EOF
11828
11829 cat >>confdefs.h <<\EOF
11830 #define HAVE_USE_SCREEN 1
11831 EOF
11832
11833 cat >>confdefs.h <<\EOF
11834 #define HAVE_USE_WINDOW 1
11835 EOF
11836
11837 cat >>confdefs.h <<\EOF
11838 #define HAVE_WRESIZE 1
11839 EOF
11840
11841 cat >>confdefs.h <<\EOF
11842 #define NCURSES_EXT_FUNCS 1
11843 EOF
11844
11845         GENERATED_EXT_FUNCS=generated
11846 else
11847         NCURSES_EXT_FUNCS=0
11848         GENERATED_EXT_FUNCS=
11849 fi
11850
11851 echo "$as_me:11851: checking if you want to build with SCREEN extensions" >&5
11852 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11853
11854 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11855 if test "${enable_sp_funcs+set}" = set; then
11856   enableval="$enable_sp_funcs"
11857   with_sp_funcs=$enableval
11858 else
11859   with_sp_funcs=$cf_dft_ext_spfuncs
11860 fi;
11861 echo "$as_me:11861: result: $with_sp_funcs" >&5
11862 echo "${ECHO_T}$with_sp_funcs" >&6
11863 if test "x$with_sp_funcs" = xyes ; then
11864         NCURSES_SP_FUNCS=1
11865
11866 cat >>confdefs.h <<\EOF
11867 #define NCURSES_SP_FUNCS 1
11868 EOF
11869
11870         GENERATED_SP_FUNCS=generated
11871 else
11872         NCURSES_SP_FUNCS=0
11873         GENERATED_SP_FUNCS=
11874 fi
11875
11876 echo "$as_me:11876: checking if you want to build with terminal-driver" >&5
11877 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11878
11879 # Check whether --enable-term-driver or --disable-term-driver was given.
11880 if test "${enable_term_driver+set}" = set; then
11881   enableval="$enable_term_driver"
11882   with_term_driver=$enableval
11883 else
11884   with_term_driver=no
11885 fi;
11886 echo "$as_me:11886: result: $with_term_driver" >&5
11887 echo "${ECHO_T}$with_term_driver" >&6
11888 if test "x$with_term_driver" = xyes ; then
11889
11890 cat >>confdefs.h <<\EOF
11891 #define USE_TERM_DRIVER 1
11892 EOF
11893
11894         if test "x$with_termlib" != xno ; then
11895                 { { echo "$as_me:11895: error: The term-driver option conflicts with the termlib option" >&5
11896 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11897    { (exit 1); exit 1; }; }
11898         fi
11899         if test "x$with_sp_funcs" != xyes ; then
11900                 { { echo "$as_me:11900: error: The term-driver option relies upon sp-funcs" >&5
11901 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11902    { (exit 1); exit 1; }; }
11903         fi
11904 fi
11905
11906 ###   use option --enable-const to turn on use of const beyond that in XSI.
11907 echo "$as_me:11907: checking for extended use of const keyword" >&5
11908 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11909
11910 # Check whether --enable-const or --disable-const was given.
11911 if test "${enable_const+set}" = set; then
11912   enableval="$enable_const"
11913   with_ext_const=$enableval
11914 else
11915   with_ext_const=$cf_dft_ext_const
11916 fi;
11917 echo "$as_me:11917: result: $with_ext_const" >&5
11918 echo "${ECHO_T}$with_ext_const" >&6
11919 NCURSES_CONST='/*nothing*/'
11920 if test "x$with_ext_const" = xyes ; then
11921         NCURSES_CONST=const
11922 fi
11923
11924 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11925 echo "$as_me:11925: checking if you want to use extended colors" >&5
11926 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11927
11928 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11929 if test "${enable_ext_colors+set}" = set; then
11930   enableval="$enable_ext_colors"
11931   with_ext_colors=$enableval
11932 else
11933   with_ext_colors=$cf_dft_ext_colors
11934 fi;
11935 echo "$as_me:11935: result: $with_ext_colors" >&5
11936 echo "${ECHO_T}$with_ext_colors" >&6
11937 NCURSES_EXT_COLORS=0
11938 if test "x$with_ext_colors" = xyes ; then
11939         if test "x$with_widec" != xyes ; then
11940                 { echo "$as_me:11940: WARNING: This option applies only to wide-character library" >&5
11941 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11942         else
11943                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11944
11945 if test "${with_abi_version+set}" != set; then
11946         case $cf_cv_rel_version in
11947         (5.*)
11948                 cf_cv_rel_version=6.0
11949                 cf_cv_abi_version=6
11950                 { echo "$as_me:11950: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11951 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11952                 ;;
11953         esac
11954 fi
11955
11956                 NCURSES_EXT_COLORS=1
11957
11958 cat >>confdefs.h <<\EOF
11959 #define NCURSES_EXT_COLORS 1
11960 EOF
11961
11962         fi
11963 fi
11964
11965 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11966 echo "$as_me:11966: checking if you want to use extended mouse encoding" >&5
11967 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11968
11969 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11970 if test "${enable_ext_mouse+set}" = set; then
11971   enableval="$enable_ext_mouse"
11972   with_ext_mouse=$enableval
11973 else
11974   with_ext_mouse=$cf_dft_ext_mouse
11975 fi;
11976 echo "$as_me:11976: result: $with_ext_mouse" >&5
11977 echo "${ECHO_T}$with_ext_mouse" >&6
11978 NCURSES_MOUSE_VERSION=1
11979 if test "x$with_ext_mouse" = xyes ; then
11980         NCURSES_MOUSE_VERSION=2
11981
11982 if test "${with_abi_version+set}" != set; then
11983         case $cf_cv_rel_version in
11984         (5.*)
11985                 cf_cv_rel_version=6.0
11986                 cf_cv_abi_version=6
11987                 { echo "$as_me:11987: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11988 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11989                 ;;
11990         esac
11991 fi
11992
11993 fi
11994
11995 ###   use option --enable-ext-putwin to turn on extended screendumps
11996 echo "$as_me:11996: checking if you want to use extended putwin/screendump" >&5
11997 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11998
11999 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12000 if test "${enable_ext_putwin+set}" = set; then
12001   enableval="$enable_ext_putwin"
12002   with_ext_putwin=$enableval
12003 else
12004   with_ext_putwin=$cf_dft_ext_putwin
12005 fi;
12006 echo "$as_me:12006: result: $with_ext_putwin" >&5
12007 echo "${ECHO_T}$with_ext_putwin" >&6
12008 if test "x$with_ext_putwin" = xyes ; then
12009
12010 cat >>confdefs.h <<\EOF
12011 #define NCURSES_EXT_PUTWIN 1
12012 EOF
12013
12014 fi
12015
12016 echo "$as_me:12016: checking if you want \$NCURSES_NO_PADDING code" >&5
12017 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12018
12019 # Check whether --enable-no-padding or --disable-no-padding was given.
12020 if test "${enable_no_padding+set}" = set; then
12021   enableval="$enable_no_padding"
12022   with_no_padding=$enableval
12023 else
12024   with_no_padding=$with_ext_funcs
12025 fi;
12026 echo "$as_me:12026: result: $with_no_padding" >&5
12027 echo "${ECHO_T}$with_no_padding" >&6
12028 test "x$with_no_padding" = xyes &&
12029 cat >>confdefs.h <<\EOF
12030 #define NCURSES_NO_PADDING 1
12031 EOF
12032
12033 echo "$as_me:12033: checking for ANSI C header files" >&5
12034 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12035 if test "${ac_cv_header_stdc+set}" = set; then
12036   echo $ECHO_N "(cached) $ECHO_C" >&6
12037 else
12038   cat >conftest.$ac_ext <<_ACEOF
12039 #line 12039 "configure"
12040 #include "confdefs.h"
12041 #include <stdlib.h>
12042 #include <stdarg.h>
12043 #include <string.h>
12044 #include <float.h>
12045
12046 _ACEOF
12047 if { (eval echo "$as_me:12047: \"$ac_cpp conftest.$ac_ext\"") >&5
12048   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12049   ac_status=$?
12050   egrep -v '^ *\+' conftest.er1 >conftest.err
12051   rm -f conftest.er1
12052   cat conftest.err >&5
12053   echo "$as_me:12053: \$? = $ac_status" >&5
12054   (exit $ac_status); } >/dev/null; then
12055   if test -s conftest.err; then
12056     ac_cpp_err=$ac_c_preproc_warn_flag
12057   else
12058     ac_cpp_err=
12059   fi
12060 else
12061   ac_cpp_err=yes
12062 fi
12063 if test -z "$ac_cpp_err"; then
12064   ac_cv_header_stdc=yes
12065 else
12066   echo "$as_me: failed program was:" >&5
12067   cat conftest.$ac_ext >&5
12068   ac_cv_header_stdc=no
12069 fi
12070 rm -f conftest.err conftest.$ac_ext
12071
12072 if test $ac_cv_header_stdc = yes; then
12073   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12074   cat >conftest.$ac_ext <<_ACEOF
12075 #line 12075 "configure"
12076 #include "confdefs.h"
12077 #include <string.h>
12078
12079 _ACEOF
12080 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12081   egrep "memchr" >/dev/null 2>&1; then
12082   :
12083 else
12084   ac_cv_header_stdc=no
12085 fi
12086 rm -rf conftest*
12087
12088 fi
12089
12090 if test $ac_cv_header_stdc = yes; then
12091   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12092   cat >conftest.$ac_ext <<_ACEOF
12093 #line 12093 "configure"
12094 #include "confdefs.h"
12095 #include <stdlib.h>
12096
12097 _ACEOF
12098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12099   egrep "free" >/dev/null 2>&1; then
12100   :
12101 else
12102   ac_cv_header_stdc=no
12103 fi
12104 rm -rf conftest*
12105
12106 fi
12107
12108 if test $ac_cv_header_stdc = yes; then
12109   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12110   if test "$cross_compiling" = yes; then
12111   :
12112 else
12113   cat >conftest.$ac_ext <<_ACEOF
12114 #line 12114 "configure"
12115 #include "confdefs.h"
12116 #include <ctype.h>
12117 #if ((' ' & 0x0FF) == 0x020)
12118 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12119 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12120 #else
12121 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12122                      || ('j' <= (c) && (c) <= 'r') \
12123                      || ('s' <= (c) && (c) <= 'z'))
12124 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12125 #endif
12126
12127 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12128 int
12129 main ()
12130 {
12131   int i;
12132   for (i = 0; i < 256; i++)
12133     if (XOR (islower (i), ISLOWER (i))
12134         || toupper (i) != TOUPPER (i))
12135       $ac_main_return(2);
12136   $ac_main_return (0);
12137 }
12138 _ACEOF
12139 rm -f conftest$ac_exeext
12140 if { (eval echo "$as_me:12140: \"$ac_link\"") >&5
12141   (eval $ac_link) 2>&5
12142   ac_status=$?
12143   echo "$as_me:12143: \$? = $ac_status" >&5
12144   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12145   { (eval echo "$as_me:12145: \"$ac_try\"") >&5
12146   (eval $ac_try) 2>&5
12147   ac_status=$?
12148   echo "$as_me:12148: \$? = $ac_status" >&5
12149   (exit $ac_status); }; }; then
12150   :
12151 else
12152   echo "$as_me: program exited with status $ac_status" >&5
12153 echo "$as_me: failed program was:" >&5
12154 cat conftest.$ac_ext >&5
12155 ac_cv_header_stdc=no
12156 fi
12157 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12158 fi
12159 fi
12160 fi
12161 echo "$as_me:12161: result: $ac_cv_header_stdc" >&5
12162 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12163 if test $ac_cv_header_stdc = yes; then
12164
12165 cat >>confdefs.h <<\EOF
12166 #define STDC_HEADERS 1
12167 EOF
12168
12169 fi
12170
12171 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12172
12173 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12174                   inttypes.h stdint.h unistd.h
12175 do
12176 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12177 echo "$as_me:12177: checking for $ac_header" >&5
12178 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12179 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12180   echo $ECHO_N "(cached) $ECHO_C" >&6
12181 else
12182   cat >conftest.$ac_ext <<_ACEOF
12183 #line 12183 "configure"
12184 #include "confdefs.h"
12185 $ac_includes_default
12186 #include <$ac_header>
12187 _ACEOF
12188 rm -f conftest.$ac_objext
12189 if { (eval echo "$as_me:12189: \"$ac_compile\"") >&5
12190   (eval $ac_compile) 2>&5
12191   ac_status=$?
12192   echo "$as_me:12192: \$? = $ac_status" >&5
12193   (exit $ac_status); } &&
12194          { ac_try='test -s conftest.$ac_objext'
12195   { (eval echo "$as_me:12195: \"$ac_try\"") >&5
12196   (eval $ac_try) 2>&5
12197   ac_status=$?
12198   echo "$as_me:12198: \$? = $ac_status" >&5
12199   (exit $ac_status); }; }; then
12200   eval "$as_ac_Header=yes"
12201 else
12202   echo "$as_me: failed program was:" >&5
12203 cat conftest.$ac_ext >&5
12204 eval "$as_ac_Header=no"
12205 fi
12206 rm -f conftest.$ac_objext conftest.$ac_ext
12207 fi
12208 echo "$as_me:12208: result: `eval echo '${'$as_ac_Header'}'`" >&5
12209 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12210 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12211   cat >>confdefs.h <<EOF
12212 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12213 EOF
12214
12215 fi
12216 done
12217
12218 echo "$as_me:12218: checking for signed char" >&5
12219 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12220 if test "${ac_cv_type_signed_char+set}" = set; then
12221   echo $ECHO_N "(cached) $ECHO_C" >&6
12222 else
12223   cat >conftest.$ac_ext <<_ACEOF
12224 #line 12224 "configure"
12225 #include "confdefs.h"
12226 $ac_includes_default
12227 int
12228 main ()
12229 {
12230 if ((signed char *) 0)
12231   return 0;
12232 if (sizeof (signed char))
12233   return 0;
12234   ;
12235   return 0;
12236 }
12237 _ACEOF
12238 rm -f conftest.$ac_objext
12239 if { (eval echo "$as_me:12239: \"$ac_compile\"") >&5
12240   (eval $ac_compile) 2>&5
12241   ac_status=$?
12242   echo "$as_me:12242: \$? = $ac_status" >&5
12243   (exit $ac_status); } &&
12244          { ac_try='test -s conftest.$ac_objext'
12245   { (eval echo "$as_me:12245: \"$ac_try\"") >&5
12246   (eval $ac_try) 2>&5
12247   ac_status=$?
12248   echo "$as_me:12248: \$? = $ac_status" >&5
12249   (exit $ac_status); }; }; then
12250   ac_cv_type_signed_char=yes
12251 else
12252   echo "$as_me: failed program was:" >&5
12253 cat conftest.$ac_ext >&5
12254 ac_cv_type_signed_char=no
12255 fi
12256 rm -f conftest.$ac_objext conftest.$ac_ext
12257 fi
12258 echo "$as_me:12258: result: $ac_cv_type_signed_char" >&5
12259 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12260
12261 echo "$as_me:12261: checking size of signed char" >&5
12262 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12263 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12264   echo $ECHO_N "(cached) $ECHO_C" >&6
12265 else
12266   if test "$ac_cv_type_signed_char" = yes; then
12267   if test "$cross_compiling" = yes; then
12268   # Depending upon the size, compute the lo and hi bounds.
12269 cat >conftest.$ac_ext <<_ACEOF
12270 #line 12270 "configure"
12271 #include "confdefs.h"
12272 $ac_includes_default
12273 int
12274 main ()
12275 {
12276 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12277   ;
12278   return 0;
12279 }
12280 _ACEOF
12281 rm -f conftest.$ac_objext
12282 if { (eval echo "$as_me:12282: \"$ac_compile\"") >&5
12283   (eval $ac_compile) 2>&5
12284   ac_status=$?
12285   echo "$as_me:12285: \$? = $ac_status" >&5
12286   (exit $ac_status); } &&
12287          { ac_try='test -s conftest.$ac_objext'
12288   { (eval echo "$as_me:12288: \"$ac_try\"") >&5
12289   (eval $ac_try) 2>&5
12290   ac_status=$?
12291   echo "$as_me:12291: \$? = $ac_status" >&5
12292   (exit $ac_status); }; }; then
12293   ac_lo=0 ac_mid=0
12294   while :; do
12295     cat >conftest.$ac_ext <<_ACEOF
12296 #line 12296 "configure"
12297 #include "confdefs.h"
12298 $ac_includes_default
12299 int
12300 main ()
12301 {
12302 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12303   ;
12304   return 0;
12305 }
12306 _ACEOF
12307 rm -f conftest.$ac_objext
12308 if { (eval echo "$as_me:12308: \"$ac_compile\"") >&5
12309   (eval $ac_compile) 2>&5
12310   ac_status=$?
12311   echo "$as_me:12311: \$? = $ac_status" >&5
12312   (exit $ac_status); } &&
12313          { ac_try='test -s conftest.$ac_objext'
12314   { (eval echo "$as_me:12314: \"$ac_try\"") >&5
12315   (eval $ac_try) 2>&5
12316   ac_status=$?
12317   echo "$as_me:12317: \$? = $ac_status" >&5
12318   (exit $ac_status); }; }; then
12319   ac_hi=$ac_mid; break
12320 else
12321   echo "$as_me: failed program was:" >&5
12322 cat conftest.$ac_ext >&5
12323 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12324 fi
12325 rm -f conftest.$ac_objext conftest.$ac_ext
12326   done
12327 else
12328   echo "$as_me: failed program was:" >&5
12329 cat conftest.$ac_ext >&5
12330 ac_hi=-1 ac_mid=-1
12331   while :; do
12332     cat >conftest.$ac_ext <<_ACEOF
12333 #line 12333 "configure"
12334 #include "confdefs.h"
12335 $ac_includes_default
12336 int
12337 main ()
12338 {
12339 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12340   ;
12341   return 0;
12342 }
12343 _ACEOF
12344 rm -f conftest.$ac_objext
12345 if { (eval echo "$as_me:12345: \"$ac_compile\"") >&5
12346   (eval $ac_compile) 2>&5
12347   ac_status=$?
12348   echo "$as_me:12348: \$? = $ac_status" >&5
12349   (exit $ac_status); } &&
12350          { ac_try='test -s conftest.$ac_objext'
12351   { (eval echo "$as_me:12351: \"$ac_try\"") >&5
12352   (eval $ac_try) 2>&5
12353   ac_status=$?
12354   echo "$as_me:12354: \$? = $ac_status" >&5
12355   (exit $ac_status); }; }; then
12356   ac_lo=$ac_mid; break
12357 else
12358   echo "$as_me: failed program was:" >&5
12359 cat conftest.$ac_ext >&5
12360 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12361 fi
12362 rm -f conftest.$ac_objext conftest.$ac_ext
12363   done
12364 fi
12365 rm -f conftest.$ac_objext conftest.$ac_ext
12366 # Binary search between lo and hi bounds.
12367 while test "x$ac_lo" != "x$ac_hi"; do
12368   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12369   cat >conftest.$ac_ext <<_ACEOF
12370 #line 12370 "configure"
12371 #include "confdefs.h"
12372 $ac_includes_default
12373 int
12374 main ()
12375 {
12376 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12377   ;
12378   return 0;
12379 }
12380 _ACEOF
12381 rm -f conftest.$ac_objext
12382 if { (eval echo "$as_me:12382: \"$ac_compile\"") >&5
12383   (eval $ac_compile) 2>&5
12384   ac_status=$?
12385   echo "$as_me:12385: \$? = $ac_status" >&5
12386   (exit $ac_status); } &&
12387          { ac_try='test -s conftest.$ac_objext'
12388   { (eval echo "$as_me:12388: \"$ac_try\"") >&5
12389   (eval $ac_try) 2>&5
12390   ac_status=$?
12391   echo "$as_me:12391: \$? = $ac_status" >&5
12392   (exit $ac_status); }; }; then
12393   ac_hi=$ac_mid
12394 else
12395   echo "$as_me: failed program was:" >&5
12396 cat conftest.$ac_ext >&5
12397 ac_lo=`expr $ac_mid + 1`
12398 fi
12399 rm -f conftest.$ac_objext conftest.$ac_ext
12400 done
12401 ac_cv_sizeof_signed_char=$ac_lo
12402 else
12403   if test "$cross_compiling" = yes; then
12404   { { echo "$as_me:12404: error: cannot run test program while cross compiling" >&5
12405 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12406    { (exit 1); exit 1; }; }
12407 else
12408   cat >conftest.$ac_ext <<_ACEOF
12409 #line 12409 "configure"
12410 #include "confdefs.h"
12411 $ac_includes_default
12412 int
12413 main ()
12414 {
12415 FILE *f = fopen ("conftest.val", "w");
12416 if (!f)
12417   $ac_main_return (1);
12418 fprintf (f, "%d", (sizeof (signed char)));
12419 fclose (f);
12420   ;
12421   return 0;
12422 }
12423 _ACEOF
12424 rm -f conftest$ac_exeext
12425 if { (eval echo "$as_me:12425: \"$ac_link\"") >&5
12426   (eval $ac_link) 2>&5
12427   ac_status=$?
12428   echo "$as_me:12428: \$? = $ac_status" >&5
12429   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12430   { (eval echo "$as_me:12430: \"$ac_try\"") >&5
12431   (eval $ac_try) 2>&5
12432   ac_status=$?
12433   echo "$as_me:12433: \$? = $ac_status" >&5
12434   (exit $ac_status); }; }; then
12435   ac_cv_sizeof_signed_char=`cat conftest.val`
12436 else
12437   echo "$as_me: program exited with status $ac_status" >&5
12438 echo "$as_me: failed program was:" >&5
12439 cat conftest.$ac_ext >&5
12440 fi
12441 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12442 fi
12443 fi
12444 rm -f conftest.val
12445 else
12446   ac_cv_sizeof_signed_char=0
12447 fi
12448 fi
12449 echo "$as_me:12449: result: $ac_cv_sizeof_signed_char" >&5
12450 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12451 cat >>confdefs.h <<EOF
12452 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12453 EOF
12454
12455 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12456         NCURSES_SBOOL="signed char"
12457 else
12458         NCURSES_SBOOL="char"
12459 fi
12460 echo "$as_me:12460: checking if you want to use signed Boolean array in term.h" >&5
12461 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12462
12463 # Check whether --enable-signed-char or --disable-signed-char was given.
12464 if test "${enable_signed_char+set}" = set; then
12465   enableval="$enable_signed_char"
12466   with_signed_char=$enableval
12467 else
12468   with_signed_char=no
12469 fi;
12470 echo "$as_me:12470: result: $with_signed_char" >&5
12471 echo "${ECHO_T}$with_signed_char" >&6
12472 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12473
12474 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12475 echo "$as_me:12475: checking if you want SIGWINCH handler" >&5
12476 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12477
12478 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12479 if test "${enable_sigwinch+set}" = set; then
12480   enableval="$enable_sigwinch"
12481   with_sigwinch=$enableval
12482 else
12483   with_sigwinch=$with_ext_funcs
12484 fi;
12485 echo "$as_me:12485: result: $with_sigwinch" >&5
12486 echo "${ECHO_T}$with_sigwinch" >&6
12487 test "x$with_sigwinch" = xyes &&
12488 cat >>confdefs.h <<\EOF
12489 #define USE_SIGWINCH 1
12490 EOF
12491
12492 ###   use option --enable-tcap-names to allow user to define new capabilities
12493 echo "$as_me:12493: checking if you want user-definable terminal capabilities like termcap" >&5
12494 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12495
12496 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12497 if test "${enable_tcap_names+set}" = set; then
12498   enableval="$enable_tcap_names"
12499   with_tcap_names=$enableval
12500 else
12501   with_tcap_names=$with_ext_funcs
12502 fi;
12503 echo "$as_me:12503: result: $with_tcap_names" >&5
12504 echo "${ECHO_T}$with_tcap_names" >&6
12505 NCURSES_XNAMES=0
12506 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12507
12508 ###############################################################################
12509 # These options are relatively safe to experiment with.
12510
12511 echo "$as_me:12511: checking if you want all development code" >&5
12512 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12513
12514 # Check whether --with-develop or --without-develop was given.
12515 if test "${with_develop+set}" = set; then
12516   withval="$with_develop"
12517   with_develop=$withval
12518 else
12519   with_develop=no
12520 fi;
12521 echo "$as_me:12521: result: $with_develop" >&5
12522 echo "${ECHO_T}$with_develop" >&6
12523
12524 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12525 echo "$as_me:12525: checking if you want hard-tabs code" >&5
12526 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12527
12528 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12529 if test "${enable_hard_tabs+set}" = set; then
12530   enableval="$enable_hard_tabs"
12531
12532 else
12533   enable_hard_tabs=$with_develop
12534 fi;
12535 echo "$as_me:12535: result: $enable_hard_tabs" >&5
12536 echo "${ECHO_T}$enable_hard_tabs" >&6
12537 test "x$enable_hard_tabs" = xyes &&
12538 cat >>confdefs.h <<\EOF
12539 #define USE_HARD_TABS 1
12540 EOF
12541
12542 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12543 echo "$as_me:12543: checking if you want limited support for xmc" >&5
12544 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12545
12546 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12547 if test "${enable_xmc_glitch+set}" = set; then
12548   enableval="$enable_xmc_glitch"
12549
12550 else
12551   enable_xmc_glitch=$with_develop
12552 fi;
12553 echo "$as_me:12553: result: $enable_xmc_glitch" >&5
12554 echo "${ECHO_T}$enable_xmc_glitch" >&6
12555 test "x$enable_xmc_glitch" = xyes &&
12556 cat >>confdefs.h <<\EOF
12557 #define USE_XMC_SUPPORT 1
12558 EOF
12559
12560 ###############################################################################
12561 # These are just experimental, probably should not be in a package:
12562
12563 echo "$as_me:12563: checking if you do not want to assume colors are white-on-black" >&5
12564 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12565
12566 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12567 if test "${enable_assumed_color+set}" = set; then
12568   enableval="$enable_assumed_color"
12569   with_assumed_color=$enableval
12570 else
12571   with_assumed_color=yes
12572 fi;
12573 echo "$as_me:12573: result: $with_assumed_color" >&5
12574 echo "${ECHO_T}$with_assumed_color" >&6
12575 test "x$with_assumed_color" = xyes &&
12576 cat >>confdefs.h <<\EOF
12577 #define USE_ASSUMED_COLOR 1
12578 EOF
12579
12580 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12581 echo "$as_me:12581: checking if you want hashmap scrolling-optimization code" >&5
12582 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12583
12584 # Check whether --enable-hashmap or --disable-hashmap was given.
12585 if test "${enable_hashmap+set}" = set; then
12586   enableval="$enable_hashmap"
12587   with_hashmap=$enableval
12588 else
12589   with_hashmap=yes
12590 fi;
12591 echo "$as_me:12591: result: $with_hashmap" >&5
12592 echo "${ECHO_T}$with_hashmap" >&6
12593 test "x$with_hashmap" = xyes &&
12594 cat >>confdefs.h <<\EOF
12595 #define USE_HASHMAP 1
12596 EOF
12597
12598 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12599 echo "$as_me:12599: checking if you want colorfgbg code" >&5
12600 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12601
12602 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12603 if test "${enable_colorfgbg+set}" = set; then
12604   enableval="$enable_colorfgbg"
12605   with_colorfgbg=$enableval
12606 else
12607   with_colorfgbg=no
12608 fi;
12609 echo "$as_me:12609: result: $with_colorfgbg" >&5
12610 echo "${ECHO_T}$with_colorfgbg" >&6
12611 test "x$with_colorfgbg" = xyes &&
12612 cat >>confdefs.h <<\EOF
12613 #define USE_COLORFGBG 1
12614 EOF
12615
12616 ###   use option --enable-interop to turn on use of bindings used for interop
12617 echo "$as_me:12617: checking if you want interop bindings" >&5
12618 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12619
12620 # Check whether --enable-interop or --disable-interop was given.
12621 if test "${enable_interop+set}" = set; then
12622   enableval="$enable_interop"
12623   with_exp_interop=$enableval
12624 else
12625   with_exp_interop=$cf_dft_interop
12626 fi;
12627 echo "$as_me:12627: result: $with_exp_interop" >&5
12628 echo "${ECHO_T}$with_exp_interop" >&6
12629
12630 NCURSES_INTEROP_FUNCS=0
12631 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12632
12633 # This is still experimental (20080329), but should ultimately be moved to
12634 # the script-block --with-normal, etc.
12635
12636 echo "$as_me:12636: checking if you want to link with the pthread library" >&5
12637 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12638
12639 # Check whether --with-pthread or --without-pthread was given.
12640 if test "${with_pthread+set}" = set; then
12641   withval="$with_pthread"
12642   with_pthread=$withval
12643 else
12644   with_pthread=no
12645 fi;
12646 echo "$as_me:12646: result: $with_pthread" >&5
12647 echo "${ECHO_T}$with_pthread" >&6
12648
12649 if test "$with_pthread" != no ; then
12650         echo "$as_me:12650: checking for pthread.h" >&5
12651 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12652 if test "${ac_cv_header_pthread_h+set}" = set; then
12653   echo $ECHO_N "(cached) $ECHO_C" >&6
12654 else
12655   cat >conftest.$ac_ext <<_ACEOF
12656 #line 12656 "configure"
12657 #include "confdefs.h"
12658 #include <pthread.h>
12659 _ACEOF
12660 if { (eval echo "$as_me:12660: \"$ac_cpp conftest.$ac_ext\"") >&5
12661   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12662   ac_status=$?
12663   egrep -v '^ *\+' conftest.er1 >conftest.err
12664   rm -f conftest.er1
12665   cat conftest.err >&5
12666   echo "$as_me:12666: \$? = $ac_status" >&5
12667   (exit $ac_status); } >/dev/null; then
12668   if test -s conftest.err; then
12669     ac_cpp_err=$ac_c_preproc_warn_flag
12670   else
12671     ac_cpp_err=
12672   fi
12673 else
12674   ac_cpp_err=yes
12675 fi
12676 if test -z "$ac_cpp_err"; then
12677   ac_cv_header_pthread_h=yes
12678 else
12679   echo "$as_me: failed program was:" >&5
12680   cat conftest.$ac_ext >&5
12681   ac_cv_header_pthread_h=no
12682 fi
12683 rm -f conftest.err conftest.$ac_ext
12684 fi
12685 echo "$as_me:12685: result: $ac_cv_header_pthread_h" >&5
12686 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12687 if test $ac_cv_header_pthread_h = yes; then
12688
12689 cat >>confdefs.h <<\EOF
12690 #define HAVE_PTHREADS_H 1
12691 EOF
12692
12693         for cf_lib_pthread in pthread c_r
12694         do
12695             echo "$as_me:12695: checking if we can link with the $cf_lib_pthread library" >&5
12696 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12697             cf_save_LIBS="$LIBS"
12698
12699 cf_add_libs="-l$cf_lib_pthread"
12700 # Filter out duplicates - this happens with badly-designed ".pc" files...
12701 for cf_add_1lib in $LIBS
12702 do
12703         for cf_add_2lib in $cf_add_libs
12704         do
12705                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12706                 then
12707                         cf_add_1lib=
12708                         break
12709                 fi
12710         done
12711         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12712 done
12713 LIBS="$cf_add_libs"
12714
12715             cat >conftest.$ac_ext <<_ACEOF
12716 #line 12716 "configure"
12717 #include "confdefs.h"
12718
12719 #include <pthread.h>
12720
12721 int
12722 main ()
12723 {
12724
12725                 int rc = pthread_create(0,0,0,0);
12726                 int r2 = pthread_mutexattr_settype(0, 0);
12727
12728   ;
12729   return 0;
12730 }
12731 _ACEOF
12732 rm -f conftest.$ac_objext conftest$ac_exeext
12733 if { (eval echo "$as_me:12733: \"$ac_link\"") >&5
12734   (eval $ac_link) 2>&5
12735   ac_status=$?
12736   echo "$as_me:12736: \$? = $ac_status" >&5
12737   (exit $ac_status); } &&
12738          { ac_try='test -s conftest$ac_exeext'
12739   { (eval echo "$as_me:12739: \"$ac_try\"") >&5
12740   (eval $ac_try) 2>&5
12741   ac_status=$?
12742   echo "$as_me:12742: \$? = $ac_status" >&5
12743   (exit $ac_status); }; }; then
12744   with_pthread=yes
12745 else
12746   echo "$as_me: failed program was:" >&5
12747 cat conftest.$ac_ext >&5
12748 with_pthread=no
12749 fi
12750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12751             LIBS="$cf_save_LIBS"
12752             echo "$as_me:12752: result: $with_pthread" >&5
12753 echo "${ECHO_T}$with_pthread" >&6
12754             test "$with_pthread" = yes && break
12755         done
12756
12757         if test "$with_pthread" = yes ; then
12758
12759 cf_add_libs="-l$cf_lib_pthread"
12760 # Filter out duplicates - this happens with badly-designed ".pc" files...
12761 for cf_add_1lib in $LIBS
12762 do
12763         for cf_add_2lib in $cf_add_libs
12764         do
12765                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12766                 then
12767                         cf_add_1lib=
12768                         break
12769                 fi
12770         done
12771         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12772 done
12773 LIBS="$cf_add_libs"
12774
12775 cat >>confdefs.h <<\EOF
12776 #define HAVE_LIBPTHREADS 1
12777 EOF
12778
12779         else
12780             { { echo "$as_me:12780: error: Cannot link with pthread library" >&5
12781 echo "$as_me: error: Cannot link with pthread library" >&2;}
12782    { (exit 1); exit 1; }; }
12783         fi
12784
12785 fi
12786
12787 fi
12788
12789 if test "x$with_pthread" != xno; then
12790         echo "$as_me:12790: checking for pthread_kill" >&5
12791 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12792 if test "${ac_cv_func_pthread_kill+set}" = set; then
12793   echo $ECHO_N "(cached) $ECHO_C" >&6
12794 else
12795   cat >conftest.$ac_ext <<_ACEOF
12796 #line 12796 "configure"
12797 #include "confdefs.h"
12798 /* System header to define __stub macros and hopefully few prototypes,
12799     which can conflict with char pthread_kill (); below.  */
12800 #include <assert.h>
12801 /* Override any gcc2 internal prototype to avoid an error.  */
12802 #ifdef __cplusplus
12803 extern "C"
12804 #endif
12805 /* We use char because int might match the return type of a gcc2
12806    builtin and then its argument prototype would still apply.  */
12807 char pthread_kill ();
12808 char (*f) ();
12809
12810 int
12811 main ()
12812 {
12813 /* The GNU C library defines this for functions which it implements
12814     to always fail with ENOSYS.  Some functions are actually named
12815     something starting with __ and the normal name is an alias.  */
12816 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12817 choke me
12818 #else
12819 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12820 #endif
12821
12822   ;
12823   return 0;
12824 }
12825 _ACEOF
12826 rm -f conftest.$ac_objext conftest$ac_exeext
12827 if { (eval echo "$as_me:12827: \"$ac_link\"") >&5
12828   (eval $ac_link) 2>&5
12829   ac_status=$?
12830   echo "$as_me:12830: \$? = $ac_status" >&5
12831   (exit $ac_status); } &&
12832          { ac_try='test -s conftest$ac_exeext'
12833   { (eval echo "$as_me:12833: \"$ac_try\"") >&5
12834   (eval $ac_try) 2>&5
12835   ac_status=$?
12836   echo "$as_me:12836: \$? = $ac_status" >&5
12837   (exit $ac_status); }; }; then
12838   ac_cv_func_pthread_kill=yes
12839 else
12840   echo "$as_me: failed program was:" >&5
12841 cat conftest.$ac_ext >&5
12842 ac_cv_func_pthread_kill=no
12843 fi
12844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12845 fi
12846 echo "$as_me:12846: result: $ac_cv_func_pthread_kill" >&5
12847 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12848 if test $ac_cv_func_pthread_kill = yes; then
12849
12850                 echo "$as_me:12850: checking if you want to allow EINTR in wgetch with pthreads" >&5
12851 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12852
12853 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12854 if test "${enable_pthreads_eintr+set}" = set; then
12855   enableval="$enable_pthreads_eintr"
12856   use_pthreads_eintr=$enableval
12857 else
12858   use_pthreads_eintr=no
12859 fi;
12860                 echo "$as_me:12860: result: $use_pthreads_eintr" >&5
12861 echo "${ECHO_T}$use_pthreads_eintr" >&6
12862                 if test "x$use_pthreads_eintr" = xyes ; then
12863
12864 cat >>confdefs.h <<\EOF
12865 #define USE_PTHREADS_EINTR 1
12866 EOF
12867
12868                 fi
12869 fi
12870
12871         echo "$as_me:12871: checking if you want to use weak-symbols for pthreads" >&5
12872 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12873
12874 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12875 if test "${enable_weak_symbols+set}" = set; then
12876   enableval="$enable_weak_symbols"
12877   use_weak_symbols=$enableval
12878 else
12879   use_weak_symbols=no
12880 fi;
12881         echo "$as_me:12881: result: $use_weak_symbols" >&5
12882 echo "${ECHO_T}$use_weak_symbols" >&6
12883         if test "x$use_weak_symbols" = xyes ; then
12884
12885 echo "$as_me:12885: checking if $CC supports weak symbols" >&5
12886 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12887 if test "${cf_cv_weak_symbols+set}" = set; then
12888   echo $ECHO_N "(cached) $ECHO_C" >&6
12889 else
12890
12891 cat >conftest.$ac_ext <<_ACEOF
12892 #line 12892 "configure"
12893 #include "confdefs.h"
12894
12895 #include <stdio.h>
12896 int
12897 main ()
12898 {
12899
12900 #if defined(__GNUC__)
12901 #  if defined __USE_ISOC99
12902 #    define _cat_pragma(exp)    _Pragma(#exp)
12903 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12904 #  else
12905 #    define _weak_pragma(exp)
12906 #  endif
12907 #  define _declare(name)        __extension__ extern __typeof__(name) name
12908 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12909 #endif
12910
12911 weak_symbol(fopen);
12912
12913   ;
12914   return 0;
12915 }
12916 _ACEOF
12917 rm -f conftest.$ac_objext
12918 if { (eval echo "$as_me:12918: \"$ac_compile\"") >&5
12919   (eval $ac_compile) 2>&5
12920   ac_status=$?
12921   echo "$as_me:12921: \$? = $ac_status" >&5
12922   (exit $ac_status); } &&
12923          { ac_try='test -s conftest.$ac_objext'
12924   { (eval echo "$as_me:12924: \"$ac_try\"") >&5
12925   (eval $ac_try) 2>&5
12926   ac_status=$?
12927   echo "$as_me:12927: \$? = $ac_status" >&5
12928   (exit $ac_status); }; }; then
12929   cf_cv_weak_symbols=yes
12930 else
12931   echo "$as_me: failed program was:" >&5
12932 cat conftest.$ac_ext >&5
12933 cf_cv_weak_symbols=no
12934 fi
12935 rm -f conftest.$ac_objext conftest.$ac_ext
12936
12937 fi
12938 echo "$as_me:12938: result: $cf_cv_weak_symbols" >&5
12939 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12940
12941         else
12942                 cf_cv_weak_symbols=no
12943         fi
12944
12945         if test "x$cf_cv_weak_symbols" = xyes ; then
12946
12947 cat >>confdefs.h <<\EOF
12948 #define USE_WEAK_SYMBOLS 1
12949 EOF
12950
12951         fi
12952 fi
12953
12954 PTHREAD=
12955 if test "x$with_pthread" = "xyes" ; then
12956
12957 cat >>confdefs.h <<\EOF
12958 #define USE_PTHREADS 1
12959 EOF
12960
12961         enable_reentrant=yes
12962         if test "x$cf_cv_weak_symbols" = xyes ; then
12963                 PTHREAD=-lpthread
12964         fi
12965 fi
12966
12967 # Reentrant code has to be opaque; there's little advantage to making ncurses
12968 # opaque outside of that, so there is no --enable-opaque option.  We can use
12969 # this option without --with-pthreads, but this will be always set for
12970 # pthreads.
12971 echo "$as_me:12971: checking if you want reentrant code" >&5
12972 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12973
12974 # Check whether --enable-reentrant or --disable-reentrant was given.
12975 if test "${enable_reentrant+set}" = set; then
12976   enableval="$enable_reentrant"
12977   with_reentrant=$enableval
12978 else
12979   with_reentrant=no
12980 fi;
12981 echo "$as_me:12981: result: $with_reentrant" >&5
12982 echo "${ECHO_T}$with_reentrant" >&6
12983 if test "x$with_reentrant" = xyes ; then
12984         cf_cv_enable_reentrant=1
12985         cf_cv_enable_opaque="NCURSES_INTERNALS"
12986         NCURSES_OPAQUE=1
12987         NCURSES_SIZE_T=int
12988         if test "x$cf_cv_weak_symbols" = xyes ; then
12989
12990 # remove pthread library from $LIBS
12991 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12992
12993 cf_add_libs="-lpthread"
12994 # Filter out duplicates - this happens with badly-designed ".pc" files...
12995 for cf_add_1lib in $TEST_LIBS
12996 do
12997         for cf_add_2lib in $cf_add_libs
12998         do
12999                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13000                 then
13001                         cf_add_1lib=
13002                         break
13003                 fi
13004         done
13005         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13006 done
13007 TEST_LIBS="$cf_add_libs"
13008
13009 cf_add_libs="-lpthread"
13010 # Filter out duplicates - this happens with badly-designed ".pc" files...
13011 for cf_add_1lib in $TEST_LIBS2
13012 do
13013         for cf_add_2lib in $cf_add_libs
13014         do
13015                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13016                 then
13017                         cf_add_1lib=
13018                         break
13019                 fi
13020         done
13021         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13022 done
13023 TEST_LIBS2="$cf_add_libs"
13024
13025         else
13026                 # when not using weak symbols but with_reentrant,
13027                 # add 't' to the library suffix on all platforms
13028                 # except cygwin, where we only do that if ALSO
13029                 # compiling with full thread support.
13030                 case "$host" in
13031                 (*cygwin* | *msys*)
13032                         if test "$with_pthread" = "yes" ; then
13033                                 if test "x$disable_lib_suffixes" = "xno" ; then
13034                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13035                                 fi
13036                         fi ;;
13037                 (*)
13038                         if test "x$disable_lib_suffixes" = "xno" ; then
13039                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13040                         fi
13041                         ;;
13042                 esac
13043         fi
13044
13045 cat >>confdefs.h <<\EOF
13046 #define USE_REENTRANT 1
13047 EOF
13048
13049 if test "${with_abi_version+set}" != set; then
13050         case $cf_cv_rel_version in
13051         (5.*)
13052                 cf_cv_rel_version=6.0
13053                 cf_cv_abi_version=6
13054                 { echo "$as_me:13054: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13055 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13056                 ;;
13057         esac
13058 fi
13059
13060 else
13061         cf_cv_enable_reentrant=0
13062         cf_cv_enable_opaque="NCURSES_OPAQUE"
13063         NCURSES_OPAQUE=0
13064         NCURSES_SIZE_T=short
13065 fi
13066
13067 ### Allow using a different wrap-prefix
13068 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13069         echo "$as_me:13069: checking for prefix used to wrap public variables" >&5
13070 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13071
13072 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13073 if test "${with_wrap_prefix+set}" = set; then
13074   withval="$with_wrap_prefix"
13075   NCURSES_WRAP_PREFIX=$withval
13076 else
13077   NCURSES_WRAP_PREFIX=_nc_
13078 fi;
13079         echo "$as_me:13079: result: $NCURSES_WRAP_PREFIX" >&5
13080 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13081 else
13082         NCURSES_WRAP_PREFIX=_nc_
13083 fi
13084
13085 cat >>confdefs.h <<EOF
13086 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13087 EOF
13088
13089 echo "$as_me:13089: checking if you want experimental safe-sprintf code" >&5
13090 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13091
13092 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13093 if test "${enable_safe_sprintf+set}" = set; then
13094   enableval="$enable_safe_sprintf"
13095   with_safe_sprintf=$enableval
13096 else
13097   with_safe_sprintf=no
13098 fi;
13099 echo "$as_me:13099: result: $with_safe_sprintf" >&5
13100 echo "${ECHO_T}$with_safe_sprintf" >&6
13101 test "x$with_safe_sprintf" = xyes &&
13102 cat >>confdefs.h <<\EOF
13103 #define USE_SAFE_SPRINTF 1
13104 EOF
13105
13106 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13107 # when hashmap is used scroll hints are useless
13108 if test "$with_hashmap" = no ; then
13109 echo "$as_me:13109: checking if you want to experiment without scrolling-hints code" >&5
13110 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13111
13112 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13113 if test "${enable_scroll_hints+set}" = set; then
13114   enableval="$enable_scroll_hints"
13115   with_scroll_hints=$enableval
13116 else
13117   with_scroll_hints=yes
13118 fi;
13119 echo "$as_me:13119: result: $with_scroll_hints" >&5
13120 echo "${ECHO_T}$with_scroll_hints" >&6
13121 test "x$with_scroll_hints" = xyes &&
13122 cat >>confdefs.h <<\EOF
13123 #define USE_SCROLL_HINTS 1
13124 EOF
13125
13126 fi
13127
13128 echo "$as_me:13128: checking if you want wgetch-events code" >&5
13129 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13130
13131 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13132 if test "${enable_wgetch_events+set}" = set; then
13133   enableval="$enable_wgetch_events"
13134   with_wgetch_events=$enableval
13135 else
13136   with_wgetch_events=no
13137 fi;
13138 echo "$as_me:13138: result: $with_wgetch_events" >&5
13139 echo "${ECHO_T}$with_wgetch_events" >&6
13140 test "x$with_wgetch_events" = xyes &&
13141 cat >>confdefs.h <<\EOF
13142 #define NCURSES_WGETCH_EVENTS 1
13143 EOF
13144
13145 ###############################################################################
13146
13147 ###     use option --disable-echo to suppress full display compiling commands
13148
13149 echo "$as_me:13149: checking if you want to see long compiling messages" >&5
13150 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13151
13152 # Check whether --enable-echo or --disable-echo was given.
13153 if test "${enable_echo+set}" = set; then
13154   enableval="$enable_echo"
13155   test "$enableval" != no && enableval=yes
13156         if test "$enableval" != "yes" ; then
13157
13158         ECHO_LT='--silent'
13159         ECHO_LD='@echo linking $@;'
13160         RULE_CC='@echo compiling $<'
13161         SHOW_CC='@echo compiling $@'
13162         ECHO_CC='@'
13163
13164         else
13165
13166         ECHO_LT=''
13167         ECHO_LD=''
13168         RULE_CC=''
13169         SHOW_CC=''
13170         ECHO_CC=''
13171
13172         fi
13173 else
13174   enableval=yes
13175
13176         ECHO_LT=''
13177         ECHO_LD=''
13178         RULE_CC=''
13179         SHOW_CC=''
13180         ECHO_CC=''
13181
13182 fi;
13183 echo "$as_me:13183: result: $enableval" >&5
13184 echo "${ECHO_T}$enableval" >&6
13185
13186 if test "x$enable_echo" = xyes; then
13187         ECHO_LINK=
13188 else
13189         ECHO_LINK='@ echo linking $@ ... ;'
13190         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13191         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13192 fi
13193
13194 ###     use option --enable-warnings to turn on all gcc warnings
13195 echo "$as_me:13195: checking if you want to see compiler warnings" >&5
13196 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13197
13198 # Check whether --enable-warnings or --disable-warnings was given.
13199 if test "${enable_warnings+set}" = set; then
13200   enableval="$enable_warnings"
13201   with_warnings=$enableval
13202 fi;
13203 echo "$as_me:13203: result: $with_warnings" >&5
13204 echo "${ECHO_T}$with_warnings" >&6
13205
13206 if test "x$with_warnings" = "xyes"; then
13207
13208         ADAFLAGS="$ADAFLAGS -gnatg"
13209
13210 INTEL_COMPILER=no
13211
13212 if test "$GCC" = yes ; then
13213         case $host_os in
13214         (linux*|gnu*)
13215                 echo "$as_me:13215: checking if this is really Intel C compiler" >&5
13216 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13217                 cf_save_CFLAGS="$CFLAGS"
13218                 CFLAGS="$CFLAGS -no-gcc"
13219                 cat >conftest.$ac_ext <<_ACEOF
13220 #line 13220 "configure"
13221 #include "confdefs.h"
13222
13223 int
13224 main ()
13225 {
13226
13227 #ifdef __INTEL_COMPILER
13228 #else
13229 make an error
13230 #endif
13231
13232   ;
13233   return 0;
13234 }
13235 _ACEOF
13236 rm -f conftest.$ac_objext
13237 if { (eval echo "$as_me:13237: \"$ac_compile\"") >&5
13238   (eval $ac_compile) 2>&5
13239   ac_status=$?
13240   echo "$as_me:13240: \$? = $ac_status" >&5
13241   (exit $ac_status); } &&
13242          { ac_try='test -s conftest.$ac_objext'
13243   { (eval echo "$as_me:13243: \"$ac_try\"") >&5
13244   (eval $ac_try) 2>&5
13245   ac_status=$?
13246   echo "$as_me:13246: \$? = $ac_status" >&5
13247   (exit $ac_status); }; }; then
13248   INTEL_COMPILER=yes
13249 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13250
13251 else
13252   echo "$as_me: failed program was:" >&5
13253 cat conftest.$ac_ext >&5
13254 fi
13255 rm -f conftest.$ac_objext conftest.$ac_ext
13256                 CFLAGS="$cf_save_CFLAGS"
13257                 echo "$as_me:13257: result: $INTEL_COMPILER" >&5
13258 echo "${ECHO_T}$INTEL_COMPILER" >&6
13259                 ;;
13260         esac
13261 fi
13262
13263 CLANG_COMPILER=no
13264
13265 if test "$GCC" = yes ; then
13266         echo "$as_me:13266: checking if this is really Clang C compiler" >&5
13267 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13268         cf_save_CFLAGS="$CFLAGS"
13269         CFLAGS="$CFLAGS -Qunused-arguments"
13270         cat >conftest.$ac_ext <<_ACEOF
13271 #line 13271 "configure"
13272 #include "confdefs.h"
13273
13274 int
13275 main ()
13276 {
13277
13278 #ifdef __clang__
13279 #else
13280 make an error
13281 #endif
13282
13283   ;
13284   return 0;
13285 }
13286 _ACEOF
13287 rm -f conftest.$ac_objext
13288 if { (eval echo "$as_me:13288: \"$ac_compile\"") >&5
13289   (eval $ac_compile) 2>&5
13290   ac_status=$?
13291   echo "$as_me:13291: \$? = $ac_status" >&5
13292   (exit $ac_status); } &&
13293          { ac_try='test -s conftest.$ac_objext'
13294   { (eval echo "$as_me:13294: \"$ac_try\"") >&5
13295   (eval $ac_try) 2>&5
13296   ac_status=$?
13297   echo "$as_me:13297: \$? = $ac_status" >&5
13298   (exit $ac_status); }; }; then
13299   CLANG_COMPILER=yes
13300 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13301
13302 else
13303   echo "$as_me: failed program was:" >&5
13304 cat conftest.$ac_ext >&5
13305 fi
13306 rm -f conftest.$ac_objext conftest.$ac_ext
13307         CFLAGS="$cf_save_CFLAGS"
13308         echo "$as_me:13308: result: $CLANG_COMPILER" >&5
13309 echo "${ECHO_T}$CLANG_COMPILER" >&6
13310 fi
13311
13312 cat > conftest.$ac_ext <<EOF
13313 #line 13313 "${as_me:-configure}"
13314 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13315 EOF
13316
13317 if test "$INTEL_COMPILER" = yes
13318 then
13319 # The "-wdXXX" options suppress warnings:
13320 # remark #1419: external declaration in primary source file
13321 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13322 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13323 # remark #193: zero used for undefined preprocessing identifier
13324 # remark #593: variable "curs_sb_left_arrow" was set but never used
13325 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13326 # remark #869: parameter "tw" was never referenced
13327 # remark #981: operands are evaluated in unspecified order
13328 # warning #279: controlling expression is constant
13329
13330         { echo "$as_me:13330: checking for $CC warning options..." >&5
13331 echo "$as_me: checking for $CC warning options..." >&6;}
13332         cf_save_CFLAGS="$CFLAGS"
13333         EXTRA_CFLAGS="-Wall"
13334         for cf_opt in \
13335                 wd1419 \
13336                 wd1683 \
13337                 wd1684 \
13338                 wd193 \
13339                 wd593 \
13340                 wd279 \
13341                 wd810 \
13342                 wd869 \
13343                 wd981
13344         do
13345                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13346                 if { (eval echo "$as_me:13346: \"$ac_compile\"") >&5
13347   (eval $ac_compile) 2>&5
13348   ac_status=$?
13349   echo "$as_me:13349: \$? = $ac_status" >&5
13350   (exit $ac_status); }; then
13351                         test -n "$verbose" && echo "$as_me:13351: result: ... -$cf_opt" >&5
13352 echo "${ECHO_T}... -$cf_opt" >&6
13353                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13354                 fi
13355         done
13356         CFLAGS="$cf_save_CFLAGS"
13357
13358 elif test "$GCC" = yes
13359 then
13360         { echo "$as_me:13360: checking for $CC warning options..." >&5
13361 echo "$as_me: checking for $CC warning options..." >&6;}
13362         cf_save_CFLAGS="$CFLAGS"
13363         EXTRA_CFLAGS=
13364         cf_warn_CONST=""
13365         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13366         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13367         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13368         for cf_opt in W Wall \
13369                 Wbad-function-cast \
13370                 Wcast-align \
13371                 Wcast-qual \
13372                 Wdeclaration-after-statement \
13373                 Wextra \
13374                 Winline \
13375                 Wmissing-declarations \
13376                 Wmissing-prototypes \
13377                 Wnested-externs \
13378                 Wpointer-arith \
13379                 Wshadow \
13380                 Wstrict-prototypes \
13381                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13382         do
13383                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13384                 if { (eval echo "$as_me:13384: \"$ac_compile\"") >&5
13385   (eval $ac_compile) 2>&5
13386   ac_status=$?
13387   echo "$as_me:13387: \$? = $ac_status" >&5
13388   (exit $ac_status); }; then
13389                         test -n "$verbose" && echo "$as_me:13389: result: ... -$cf_opt" >&5
13390 echo "${ECHO_T}... -$cf_opt" >&6
13391                         case $cf_opt in
13392                         (Wcast-qual)
13393                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13394                                 ;;
13395                         (Winline)
13396                                 case $GCC_VERSION in
13397                                 ([34].*)
13398                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13399
13400 echo "${as_me:-configure}:13400: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13401
13402                                         continue;;
13403                                 esac
13404                                 ;;
13405                         (Wpointer-arith)
13406                                 case $GCC_VERSION in
13407                                 ([12].*)
13408                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13409
13410 echo "${as_me:-configure}:13410: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13411
13412                                         continue;;
13413                                 esac
13414                                 ;;
13415                         esac
13416                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13417                 fi
13418         done
13419         CFLAGS="$cf_save_CFLAGS"
13420 fi
13421 rm -rf conftest*
13422
13423         if test "x$cf_with_cxx" = xyes ; then
13424
13425 INTEL_CPLUSPLUS=no
13426
13427 if test "$GCC" = yes ; then
13428         case $host_os in
13429         (linux*|gnu*)
13430                 echo "$as_me:13430: checking if this is really Intel C++ compiler" >&5
13431 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13432                 cf_save_CFLAGS="$CXXFLAGS"
13433                 CXXFLAGS="$CXXFLAGS -no-gcc"
13434                 cat >conftest.$ac_ext <<_ACEOF
13435 #line 13435 "configure"
13436 #include "confdefs.h"
13437
13438 int
13439 main ()
13440 {
13441
13442 #ifdef __INTEL_COMPILER
13443 #else
13444 make an error
13445 #endif
13446
13447   ;
13448   return 0;
13449 }
13450 _ACEOF
13451 rm -f conftest.$ac_objext
13452 if { (eval echo "$as_me:13452: \"$ac_compile\"") >&5
13453   (eval $ac_compile) 2>&5
13454   ac_status=$?
13455   echo "$as_me:13455: \$? = $ac_status" >&5
13456   (exit $ac_status); } &&
13457          { ac_try='test -s conftest.$ac_objext'
13458   { (eval echo "$as_me:13458: \"$ac_try\"") >&5
13459   (eval $ac_try) 2>&5
13460   ac_status=$?
13461   echo "$as_me:13461: \$? = $ac_status" >&5
13462   (exit $ac_status); }; }; then
13463   INTEL_CPLUSPLUS=yes
13464 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13465
13466 else
13467   echo "$as_me: failed program was:" >&5
13468 cat conftest.$ac_ext >&5
13469 fi
13470 rm -f conftest.$ac_objext conftest.$ac_ext
13471                 CXXFLAGS="$cf_save_CFLAGS"
13472                 echo "$as_me:13472: result: $INTEL_CPLUSPLUS" >&5
13473 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13474                 ;;
13475         esac
13476 fi
13477
13478 CLANG_CPLUSPLUS=no
13479
13480 if test "$GCC" = yes ; then
13481         echo "$as_me:13481: checking if this is really Clang C++ compiler" >&5
13482 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13483         cf_save_CFLAGS="$CXXFLAGS"
13484         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13485         cat >conftest.$ac_ext <<_ACEOF
13486 #line 13486 "configure"
13487 #include "confdefs.h"
13488
13489 int
13490 main ()
13491 {
13492
13493 #ifdef __clang__
13494 #else
13495 make an error
13496 #endif
13497
13498   ;
13499   return 0;
13500 }
13501 _ACEOF
13502 rm -f conftest.$ac_objext
13503 if { (eval echo "$as_me:13503: \"$ac_compile\"") >&5
13504   (eval $ac_compile) 2>&5
13505   ac_status=$?
13506   echo "$as_me:13506: \$? = $ac_status" >&5
13507   (exit $ac_status); } &&
13508          { ac_try='test -s conftest.$ac_objext'
13509   { (eval echo "$as_me:13509: \"$ac_try\"") >&5
13510   (eval $ac_try) 2>&5
13511   ac_status=$?
13512   echo "$as_me:13512: \$? = $ac_status" >&5
13513   (exit $ac_status); }; }; then
13514   CLANG_CPLUSPLUS=yes
13515 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13516
13517 else
13518   echo "$as_me: failed program was:" >&5
13519 cat conftest.$ac_ext >&5
13520 fi
13521 rm -f conftest.$ac_objext conftest.$ac_ext
13522         CXXFLAGS="$cf_save_CFLAGS"
13523         echo "$as_me:13523: result: $CLANG_CPLUSPLUS" >&5
13524 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13525 fi
13526
13527 ac_ext=cc
13528 ac_cpp='$CXXCPP $CPPFLAGS'
13529 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13530 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13531 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13532 ac_main_return=return
13533
13534 cat > conftest.$ac_ext <<EOF
13535 #line 13535 "configure"
13536 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13537 EOF
13538
13539 if test "$INTEL_CPLUSPLUS" = yes
13540 then
13541 # The "-wdXXX" options suppress warnings:
13542 # remark #1419: external declaration in primary source file
13543 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13544 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13545 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13546 # remark #193: zero used for undefined preprocessing identifier
13547 # remark #593: variable "curs_sb_left_arrow" was set but never used
13548 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13549 # remark #869: parameter "tw" was never referenced
13550 # remark #981: operands are evaluated in unspecified order
13551 # warning #269: invalid format string conversion
13552
13553         { echo "$as_me:13553: checking for $CC warning options..." >&5
13554 echo "$as_me: checking for $CC warning options..." >&6;}
13555         cf_save_CXXFLAGS="$CXXFLAGS"
13556         EXTRA_CXXFLAGS="-Wall"
13557         for cf_opt in \
13558                 wd1419 \
13559                 wd1682 \
13560                 wd1683 \
13561                 wd1684 \
13562                 wd193 \
13563                 wd279 \
13564                 wd593 \
13565                 wd810 \
13566                 wd869 \
13567                 wd981
13568         do
13569                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13570                 if { (eval echo "$as_me:13570: \"$ac_compile\"") >&5
13571   (eval $ac_compile) 2>&5
13572   ac_status=$?
13573   echo "$as_me:13573: \$? = $ac_status" >&5
13574   (exit $ac_status); }; then
13575                         test -n "$verbose" && echo "$as_me:13575: result: ... -$cf_opt" >&5
13576 echo "${ECHO_T}... -$cf_opt" >&6
13577                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13578                 fi
13579         done
13580         CXXFLAGS="$cf_save_CXXFLAGS"
13581
13582 elif test "$GXX" = yes
13583 then
13584         { echo "$as_me:13584: checking for $CXX warning options..." >&5
13585 echo "$as_me: checking for $CXX warning options..." >&6;}
13586         cf_save_CXXFLAGS="$CXXFLAGS"
13587         EXTRA_CXXFLAGS="-W -Wall"
13588         cf_gxx_extra_warnings=""
13589         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13590         case "$GCC_VERSION" in
13591         ([1-2].*)
13592                 ;;
13593         (*)
13594                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13595                 ;;
13596         esac
13597         for cf_opt in \
13598                 Wabi \
13599                 fabi-version=0 \
13600                 Wextra \
13601                 Wignored-qualifiers \
13602                 Wlogical-op \
13603                 Woverloaded-virtual \
13604                 Wsign-promo \
13605                 Wsynth \
13606                 Wold-style-cast \
13607                 Wcast-align \
13608                 Wcast-qual \
13609                 Wpointer-arith \
13610                 Wshadow \
13611                 Wundef $cf_gxx_extra_warnings Wno-unused
13612         do
13613                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13614                 if { (eval echo "$as_me:13614: \"$ac_compile\"") >&5
13615   (eval $ac_compile) 2>&5
13616   ac_status=$?
13617   echo "$as_me:13617: \$? = $ac_status" >&5
13618   (exit $ac_status); }; then
13619                         test -n "$verbose" && echo "$as_me:13619: result: ... -$cf_opt" >&5
13620 echo "${ECHO_T}... -$cf_opt" >&6
13621                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13622                 else
13623                         test -n "$verbose" && echo "$as_me:13623: result: ... no -$cf_opt" >&5
13624 echo "${ECHO_T}... no -$cf_opt" >&6
13625                 fi
13626         done
13627         CXXFLAGS="$cf_save_CXXFLAGS"
13628 fi
13629
13630 rm -rf conftest*
13631 ac_ext=c
13632 ac_cpp='$CPP $CPPFLAGS'
13633 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13634 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13635 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13636 ac_main_return=return
13637
13638         fi
13639 fi
13640
13641 if test "$GCC" = yes
13642 then
13643 cat > conftest.i <<EOF
13644 #ifndef GCC_PRINTF
13645 #define GCC_PRINTF 0
13646 #endif
13647 #ifndef GCC_SCANF
13648 #define GCC_SCANF 0
13649 #endif
13650 #ifndef GCC_NORETURN
13651 #define GCC_NORETURN /* nothing */
13652 #endif
13653 #ifndef GCC_UNUSED
13654 #define GCC_UNUSED /* nothing */
13655 #endif
13656 EOF
13657 if test "$GCC" = yes
13658 then
13659         { echo "$as_me:13659: checking for $CC __attribute__ directives..." >&5
13660 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13661 cat > conftest.$ac_ext <<EOF
13662 #line 13662 "${as_me:-configure}"
13663 #include "confdefs.h"
13664 #include "conftest.h"
13665 #include "conftest.i"
13666 #if     GCC_PRINTF
13667 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13668 #else
13669 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13670 #endif
13671 #if     GCC_SCANF
13672 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13673 #else
13674 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13675 #endif
13676 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13677 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13678 extern void foo(void) GCC_NORETURN;
13679 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13680 EOF
13681         cf_printf_attribute=no
13682         cf_scanf_attribute=no
13683         for cf_attribute in scanf printf unused noreturn
13684         do
13685
13686 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13687
13688                 cf_directive="__attribute__(($cf_attribute))"
13689                 echo "checking for $CC $cf_directive" 1>&5
13690
13691                 case $cf_attribute in
13692                 (printf)
13693                         cf_printf_attribute=yes
13694                         cat >conftest.h <<EOF
13695 #define GCC_$cf_ATTRIBUTE 1
13696 EOF
13697                         ;;
13698                 (scanf)
13699                         cf_scanf_attribute=yes
13700                         cat >conftest.h <<EOF
13701 #define GCC_$cf_ATTRIBUTE 1
13702 EOF
13703                         ;;
13704                 (*)
13705                         cat >conftest.h <<EOF
13706 #define GCC_$cf_ATTRIBUTE $cf_directive
13707 EOF
13708                         ;;
13709                 esac
13710
13711                 if { (eval echo "$as_me:13711: \"$ac_compile\"") >&5
13712   (eval $ac_compile) 2>&5
13713   ac_status=$?
13714   echo "$as_me:13714: \$? = $ac_status" >&5
13715   (exit $ac_status); }; then
13716                         test -n "$verbose" && echo "$as_me:13716: result: ... $cf_attribute" >&5
13717 echo "${ECHO_T}... $cf_attribute" >&6
13718                         cat conftest.h >>confdefs.h
13719                         case $cf_attribute in
13720                         (noreturn)
13721
13722 cat >>confdefs.h <<EOF
13723 #define GCC_NORETURN $cf_directive
13724 EOF
13725
13726                                 ;;
13727                         (printf)
13728                                 cf_value='/* nothing */'
13729                                 if test "$cf_printf_attribute" != no ; then
13730                                         cf_value='__attribute__((format(printf,fmt,var)))'
13731
13732 cat >>confdefs.h <<\EOF
13733 #define GCC_PRINTF 1
13734 EOF
13735
13736                                 fi
13737
13738 cat >>confdefs.h <<EOF
13739 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13740 EOF
13741
13742                                 ;;
13743                         (scanf)
13744                                 cf_value='/* nothing */'
13745                                 if test "$cf_scanf_attribute" != no ; then
13746                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13747
13748 cat >>confdefs.h <<\EOF
13749 #define GCC_SCANF 1
13750 EOF
13751
13752                                 fi
13753
13754 cat >>confdefs.h <<EOF
13755 #define GCC_SCANFLIKE(fmt,var) $cf_value
13756 EOF
13757
13758                                 ;;
13759                         (unused)
13760
13761 cat >>confdefs.h <<EOF
13762 #define GCC_UNUSED $cf_directive
13763 EOF
13764
13765                                 ;;
13766                         esac
13767                 fi
13768         done
13769 else
13770         fgrep define conftest.i >>confdefs.h
13771 fi
13772 rm -rf conftest*
13773 fi
13774
13775 echo "$as_me:13775: checking if you want to work around bogus compiler/loader warnings" >&5
13776 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13777
13778 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13779 if test "${enable_string_hacks+set}" = set; then
13780   enableval="$enable_string_hacks"
13781   with_string_hacks=$enableval
13782 else
13783   with_string_hacks=no
13784 fi;
13785 echo "$as_me:13785: result: $with_string_hacks" >&5
13786 echo "${ECHO_T}$with_string_hacks" >&6
13787
13788 if test "x$with_string_hacks" = "xyes"; then
13789
13790 cat >>confdefs.h <<\EOF
13791 #define USE_STRING_HACKS 1
13792 EOF
13793
13794         { echo "$as_me:13794: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13795 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13796
13797 for ac_func in strlcat strlcpy snprintf
13798 do
13799 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13800 echo "$as_me:13800: checking for $ac_func" >&5
13801 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13802 if eval "test \"\${$as_ac_var+set}\" = set"; then
13803   echo $ECHO_N "(cached) $ECHO_C" >&6
13804 else
13805   cat >conftest.$ac_ext <<_ACEOF
13806 #line 13806 "configure"
13807 #include "confdefs.h"
13808 /* System header to define __stub macros and hopefully few prototypes,
13809     which can conflict with char $ac_func (); below.  */
13810 #include <assert.h>
13811 /* Override any gcc2 internal prototype to avoid an error.  */
13812 #ifdef __cplusplus
13813 extern "C"
13814 #endif
13815 /* We use char because int might match the return type of a gcc2
13816    builtin and then its argument prototype would still apply.  */
13817 char $ac_func ();
13818 char (*f) ();
13819
13820 int
13821 main ()
13822 {
13823 /* The GNU C library defines this for functions which it implements
13824     to always fail with ENOSYS.  Some functions are actually named
13825     something starting with __ and the normal name is an alias.  */
13826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13827 choke me
13828 #else
13829 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13830 #endif
13831
13832   ;
13833   return 0;
13834 }
13835 _ACEOF
13836 rm -f conftest.$ac_objext conftest$ac_exeext
13837 if { (eval echo "$as_me:13837: \"$ac_link\"") >&5
13838   (eval $ac_link) 2>&5
13839   ac_status=$?
13840   echo "$as_me:13840: \$? = $ac_status" >&5
13841   (exit $ac_status); } &&
13842          { ac_try='test -s conftest$ac_exeext'
13843   { (eval echo "$as_me:13843: \"$ac_try\"") >&5
13844   (eval $ac_try) 2>&5
13845   ac_status=$?
13846   echo "$as_me:13846: \$? = $ac_status" >&5
13847   (exit $ac_status); }; }; then
13848   eval "$as_ac_var=yes"
13849 else
13850   echo "$as_me: failed program was:" >&5
13851 cat conftest.$ac_ext >&5
13852 eval "$as_ac_var=no"
13853 fi
13854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13855 fi
13856 echo "$as_me:13856: result: `eval echo '${'$as_ac_var'}'`" >&5
13857 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13858 if test `eval echo '${'$as_ac_var'}'` = yes; then
13859   cat >>confdefs.h <<EOF
13860 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13861 EOF
13862
13863 fi
13864 done
13865
13866 fi
13867
13868 ###     use option --enable-assertions to turn on generation of assertion code
13869 echo "$as_me:13869: checking if you want to enable runtime assertions" >&5
13870 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13871
13872 # Check whether --enable-assertions or --disable-assertions was given.
13873 if test "${enable_assertions+set}" = set; then
13874   enableval="$enable_assertions"
13875   with_assertions=$enableval
13876 else
13877   with_assertions=no
13878 fi;
13879 echo "$as_me:13879: result: $with_assertions" >&5
13880 echo "${ECHO_T}$with_assertions" >&6
13881 if test -n "$GCC"
13882 then
13883         if test "$with_assertions" = no
13884         then
13885                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13886         else
13887
13888         ADAFLAGS="$ADAFLAGS -gnata"
13889
13890         fi
13891 fi
13892
13893 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13894
13895 echo "$as_me:13895: checking if you want to use dmalloc for testing" >&5
13896 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13897
13898 # Check whether --with-dmalloc or --without-dmalloc was given.
13899 if test "${with_dmalloc+set}" = set; then
13900   withval="$with_dmalloc"
13901
13902 cat >>confdefs.h <<EOF
13903 #define USE_DMALLOC 1
13904 EOF
13905
13906         : ${with_cflags:=-g}
13907         : ${with_no_leaks:=yes}
13908          with_dmalloc=yes
13909 else
13910   with_dmalloc=
13911 fi;
13912 echo "$as_me:13912: result: ${with_dmalloc:-no}" >&5
13913 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13914
13915 case .$with_cflags in
13916 (.*-g*)
13917         case .$CFLAGS in
13918         (.*-g*)
13919                 ;;
13920         (*)
13921
13922 cf_fix_cppflags=no
13923 cf_new_cflags=
13924 cf_new_cppflags=
13925 cf_new_extra_cppflags=
13926
13927 for cf_add_cflags in -g
13928 do
13929 case $cf_fix_cppflags in
13930 (no)
13931         case $cf_add_cflags in
13932         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13933                 case $cf_add_cflags in
13934                 (-D*)
13935                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13936
13937                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13938                                 && test -z "${cf_tst_cflags}" \
13939                                 && cf_fix_cppflags=yes
13940
13941                         if test $cf_fix_cppflags = yes ; then
13942                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13943                                 continue
13944                         elif test "${cf_tst_cflags}" = "\"'" ; then
13945                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13946                                 continue
13947                         fi
13948                         ;;
13949                 esac
13950                 case "$CPPFLAGS" in
13951                 (*$cf_add_cflags)
13952                         ;;
13953                 (*)
13954                         case $cf_add_cflags in
13955                         (-D*)
13956                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13957
13958 CPPFLAGS=`echo "$CPPFLAGS" | \
13959         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13960                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13961
13962                                 ;;
13963                         esac
13964                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13965                         ;;
13966                 esac
13967                 ;;
13968         (*)
13969                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13970                 ;;
13971         esac
13972         ;;
13973 (yes)
13974         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13975
13976         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13977
13978         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13979                 && test -z "${cf_tst_cflags}" \
13980                 && cf_fix_cppflags=no
13981         ;;
13982 esac
13983 done
13984
13985 if test -n "$cf_new_cflags" ; then
13986
13987         CFLAGS="$CFLAGS $cf_new_cflags"
13988 fi
13989
13990 if test -n "$cf_new_cppflags" ; then
13991
13992         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13993 fi
13994
13995 if test -n "$cf_new_extra_cppflags" ; then
13996
13997         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13998 fi
13999
14000                 ;;
14001         esac
14002         ;;
14003 esac
14004
14005 if test "$with_dmalloc" = yes ; then
14006         echo "$as_me:14006: checking for dmalloc.h" >&5
14007 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14008 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14009   echo $ECHO_N "(cached) $ECHO_C" >&6
14010 else
14011   cat >conftest.$ac_ext <<_ACEOF
14012 #line 14012 "configure"
14013 #include "confdefs.h"
14014 #include <dmalloc.h>
14015 _ACEOF
14016 if { (eval echo "$as_me:14016: \"$ac_cpp conftest.$ac_ext\"") >&5
14017   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14018   ac_status=$?
14019   egrep -v '^ *\+' conftest.er1 >conftest.err
14020   rm -f conftest.er1
14021   cat conftest.err >&5
14022   echo "$as_me:14022: \$? = $ac_status" >&5
14023   (exit $ac_status); } >/dev/null; then
14024   if test -s conftest.err; then
14025     ac_cpp_err=$ac_c_preproc_warn_flag
14026   else
14027     ac_cpp_err=
14028   fi
14029 else
14030   ac_cpp_err=yes
14031 fi
14032 if test -z "$ac_cpp_err"; then
14033   ac_cv_header_dmalloc_h=yes
14034 else
14035   echo "$as_me: failed program was:" >&5
14036   cat conftest.$ac_ext >&5
14037   ac_cv_header_dmalloc_h=no
14038 fi
14039 rm -f conftest.err conftest.$ac_ext
14040 fi
14041 echo "$as_me:14041: result: $ac_cv_header_dmalloc_h" >&5
14042 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14043 if test $ac_cv_header_dmalloc_h = yes; then
14044
14045 echo "$as_me:14045: checking for dmalloc_debug in -ldmalloc" >&5
14046 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14047 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14048   echo $ECHO_N "(cached) $ECHO_C" >&6
14049 else
14050   ac_check_lib_save_LIBS=$LIBS
14051 LIBS="-ldmalloc  $LIBS"
14052 cat >conftest.$ac_ext <<_ACEOF
14053 #line 14053 "configure"
14054 #include "confdefs.h"
14055
14056 /* Override any gcc2 internal prototype to avoid an error.  */
14057 #ifdef __cplusplus
14058 extern "C"
14059 #endif
14060 /* We use char because int might match the return type of a gcc2
14061    builtin and then its argument prototype would still apply.  */
14062 char dmalloc_debug ();
14063 int
14064 main ()
14065 {
14066 dmalloc_debug ();
14067   ;
14068   return 0;
14069 }
14070 _ACEOF
14071 rm -f conftest.$ac_objext conftest$ac_exeext
14072 if { (eval echo "$as_me:14072: \"$ac_link\"") >&5
14073   (eval $ac_link) 2>&5
14074   ac_status=$?
14075   echo "$as_me:14075: \$? = $ac_status" >&5
14076   (exit $ac_status); } &&
14077          { ac_try='test -s conftest$ac_exeext'
14078   { (eval echo "$as_me:14078: \"$ac_try\"") >&5
14079   (eval $ac_try) 2>&5
14080   ac_status=$?
14081   echo "$as_me:14081: \$? = $ac_status" >&5
14082   (exit $ac_status); }; }; then
14083   ac_cv_lib_dmalloc_dmalloc_debug=yes
14084 else
14085   echo "$as_me: failed program was:" >&5
14086 cat conftest.$ac_ext >&5
14087 ac_cv_lib_dmalloc_dmalloc_debug=no
14088 fi
14089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14090 LIBS=$ac_check_lib_save_LIBS
14091 fi
14092 echo "$as_me:14092: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14093 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14094 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14095   cat >>confdefs.h <<EOF
14096 #define HAVE_LIBDMALLOC 1
14097 EOF
14098
14099   LIBS="-ldmalloc $LIBS"
14100
14101 fi
14102
14103 fi
14104
14105 fi
14106
14107 echo "$as_me:14107: checking if you want to use dbmalloc for testing" >&5
14108 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14109
14110 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14111 if test "${with_dbmalloc+set}" = set; then
14112   withval="$with_dbmalloc"
14113
14114 cat >>confdefs.h <<EOF
14115 #define USE_DBMALLOC 1
14116 EOF
14117
14118         : ${with_cflags:=-g}
14119         : ${with_no_leaks:=yes}
14120          with_dbmalloc=yes
14121 else
14122   with_dbmalloc=
14123 fi;
14124 echo "$as_me:14124: result: ${with_dbmalloc:-no}" >&5
14125 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14126
14127 case .$with_cflags in
14128 (.*-g*)
14129         case .$CFLAGS in
14130         (.*-g*)
14131                 ;;
14132         (*)
14133
14134 cf_fix_cppflags=no
14135 cf_new_cflags=
14136 cf_new_cppflags=
14137 cf_new_extra_cppflags=
14138
14139 for cf_add_cflags in -g
14140 do
14141 case $cf_fix_cppflags in
14142 (no)
14143         case $cf_add_cflags in
14144         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14145                 case $cf_add_cflags in
14146                 (-D*)
14147                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14148
14149                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14150                                 && test -z "${cf_tst_cflags}" \
14151                                 && cf_fix_cppflags=yes
14152
14153                         if test $cf_fix_cppflags = yes ; then
14154                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14155                                 continue
14156                         elif test "${cf_tst_cflags}" = "\"'" ; then
14157                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14158                                 continue
14159                         fi
14160                         ;;
14161                 esac
14162                 case "$CPPFLAGS" in
14163                 (*$cf_add_cflags)
14164                         ;;
14165                 (*)
14166                         case $cf_add_cflags in
14167                         (-D*)
14168                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14169
14170 CPPFLAGS=`echo "$CPPFLAGS" | \
14171         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14172                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14173
14174                                 ;;
14175                         esac
14176                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14177                         ;;
14178                 esac
14179                 ;;
14180         (*)
14181                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14182                 ;;
14183         esac
14184         ;;
14185 (yes)
14186         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14187
14188         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14189
14190         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14191                 && test -z "${cf_tst_cflags}" \
14192                 && cf_fix_cppflags=no
14193         ;;
14194 esac
14195 done
14196
14197 if test -n "$cf_new_cflags" ; then
14198
14199         CFLAGS="$CFLAGS $cf_new_cflags"
14200 fi
14201
14202 if test -n "$cf_new_cppflags" ; then
14203
14204         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14205 fi
14206
14207 if test -n "$cf_new_extra_cppflags" ; then
14208
14209         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14210 fi
14211
14212                 ;;
14213         esac
14214         ;;
14215 esac
14216
14217 if test "$with_dbmalloc" = yes ; then
14218         echo "$as_me:14218: checking for dbmalloc.h" >&5
14219 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14220 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14221   echo $ECHO_N "(cached) $ECHO_C" >&6
14222 else
14223   cat >conftest.$ac_ext <<_ACEOF
14224 #line 14224 "configure"
14225 #include "confdefs.h"
14226 #include <dbmalloc.h>
14227 _ACEOF
14228 if { (eval echo "$as_me:14228: \"$ac_cpp conftest.$ac_ext\"") >&5
14229   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14230   ac_status=$?
14231   egrep -v '^ *\+' conftest.er1 >conftest.err
14232   rm -f conftest.er1
14233   cat conftest.err >&5
14234   echo "$as_me:14234: \$? = $ac_status" >&5
14235   (exit $ac_status); } >/dev/null; then
14236   if test -s conftest.err; then
14237     ac_cpp_err=$ac_c_preproc_warn_flag
14238   else
14239     ac_cpp_err=
14240   fi
14241 else
14242   ac_cpp_err=yes
14243 fi
14244 if test -z "$ac_cpp_err"; then
14245   ac_cv_header_dbmalloc_h=yes
14246 else
14247   echo "$as_me: failed program was:" >&5
14248   cat conftest.$ac_ext >&5
14249   ac_cv_header_dbmalloc_h=no
14250 fi
14251 rm -f conftest.err conftest.$ac_ext
14252 fi
14253 echo "$as_me:14253: result: $ac_cv_header_dbmalloc_h" >&5
14254 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14255 if test $ac_cv_header_dbmalloc_h = yes; then
14256
14257 echo "$as_me:14257: checking for debug_malloc in -ldbmalloc" >&5
14258 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14259 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14260   echo $ECHO_N "(cached) $ECHO_C" >&6
14261 else
14262   ac_check_lib_save_LIBS=$LIBS
14263 LIBS="-ldbmalloc  $LIBS"
14264 cat >conftest.$ac_ext <<_ACEOF
14265 #line 14265 "configure"
14266 #include "confdefs.h"
14267
14268 /* Override any gcc2 internal prototype to avoid an error.  */
14269 #ifdef __cplusplus
14270 extern "C"
14271 #endif
14272 /* We use char because int might match the return type of a gcc2
14273    builtin and then its argument prototype would still apply.  */
14274 char debug_malloc ();
14275 int
14276 main ()
14277 {
14278 debug_malloc ();
14279   ;
14280   return 0;
14281 }
14282 _ACEOF
14283 rm -f conftest.$ac_objext conftest$ac_exeext
14284 if { (eval echo "$as_me:14284: \"$ac_link\"") >&5
14285   (eval $ac_link) 2>&5
14286   ac_status=$?
14287   echo "$as_me:14287: \$? = $ac_status" >&5
14288   (exit $ac_status); } &&
14289          { ac_try='test -s conftest$ac_exeext'
14290   { (eval echo "$as_me:14290: \"$ac_try\"") >&5
14291   (eval $ac_try) 2>&5
14292   ac_status=$?
14293   echo "$as_me:14293: \$? = $ac_status" >&5
14294   (exit $ac_status); }; }; then
14295   ac_cv_lib_dbmalloc_debug_malloc=yes
14296 else
14297   echo "$as_me: failed program was:" >&5
14298 cat conftest.$ac_ext >&5
14299 ac_cv_lib_dbmalloc_debug_malloc=no
14300 fi
14301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14302 LIBS=$ac_check_lib_save_LIBS
14303 fi
14304 echo "$as_me:14304: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14305 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14306 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14307   cat >>confdefs.h <<EOF
14308 #define HAVE_LIBDBMALLOC 1
14309 EOF
14310
14311   LIBS="-ldbmalloc $LIBS"
14312
14313 fi
14314
14315 fi
14316
14317 fi
14318
14319 echo "$as_me:14319: checking if you want to use valgrind for testing" >&5
14320 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14321
14322 # Check whether --with-valgrind or --without-valgrind was given.
14323 if test "${with_valgrind+set}" = set; then
14324   withval="$with_valgrind"
14325
14326 cat >>confdefs.h <<EOF
14327 #define USE_VALGRIND 1
14328 EOF
14329
14330         : ${with_cflags:=-g}
14331         : ${with_no_leaks:=yes}
14332          with_valgrind=yes
14333 else
14334   with_valgrind=
14335 fi;
14336 echo "$as_me:14336: result: ${with_valgrind:-no}" >&5
14337 echo "${ECHO_T}${with_valgrind:-no}" >&6
14338
14339 case .$with_cflags in
14340 (.*-g*)
14341         case .$CFLAGS in
14342         (.*-g*)
14343                 ;;
14344         (*)
14345
14346 cf_fix_cppflags=no
14347 cf_new_cflags=
14348 cf_new_cppflags=
14349 cf_new_extra_cppflags=
14350
14351 for cf_add_cflags in -g
14352 do
14353 case $cf_fix_cppflags in
14354 (no)
14355         case $cf_add_cflags in
14356         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14357                 case $cf_add_cflags in
14358                 (-D*)
14359                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14360
14361                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14362                                 && test -z "${cf_tst_cflags}" \
14363                                 && cf_fix_cppflags=yes
14364
14365                         if test $cf_fix_cppflags = yes ; then
14366                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14367                                 continue
14368                         elif test "${cf_tst_cflags}" = "\"'" ; then
14369                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14370                                 continue
14371                         fi
14372                         ;;
14373                 esac
14374                 case "$CPPFLAGS" in
14375                 (*$cf_add_cflags)
14376                         ;;
14377                 (*)
14378                         case $cf_add_cflags in
14379                         (-D*)
14380                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14381
14382 CPPFLAGS=`echo "$CPPFLAGS" | \
14383         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14384                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14385
14386                                 ;;
14387                         esac
14388                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14389                         ;;
14390                 esac
14391                 ;;
14392         (*)
14393                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14394                 ;;
14395         esac
14396         ;;
14397 (yes)
14398         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14399
14400         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14401
14402         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14403                 && test -z "${cf_tst_cflags}" \
14404                 && cf_fix_cppflags=no
14405         ;;
14406 esac
14407 done
14408
14409 if test -n "$cf_new_cflags" ; then
14410
14411         CFLAGS="$CFLAGS $cf_new_cflags"
14412 fi
14413
14414 if test -n "$cf_new_cppflags" ; then
14415
14416         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14417 fi
14418
14419 if test -n "$cf_new_extra_cppflags" ; then
14420
14421         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14422 fi
14423
14424                 ;;
14425         esac
14426         ;;
14427 esac
14428
14429 echo "$as_me:14429: checking if you want to perform memory-leak testing" >&5
14430 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14431
14432 # Check whether --enable-leaks or --disable-leaks was given.
14433 if test "${enable_leaks+set}" = set; then
14434   enableval="$enable_leaks"
14435   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14436 else
14437   : ${with_no_leaks:=no}
14438 fi;
14439 echo "$as_me:14439: result: $with_no_leaks" >&5
14440 echo "${ECHO_T}$with_no_leaks" >&6
14441
14442 if test "$with_no_leaks" = yes ; then
14443
14444 cat >>confdefs.h <<\EOF
14445 #define NO_LEAKS 1
14446 EOF
14447
14448 cat >>confdefs.h <<\EOF
14449 #define YY_NO_LEAKS 1
14450 EOF
14451
14452 fi
14453
14454 cat >>confdefs.h <<\EOF
14455 #define HAVE_NC_ALLOC_H 1
14456 EOF
14457
14458 ###     use option --enable-expanded to generate certain macros as functions
14459
14460 # Check whether --enable-expanded or --disable-expanded was given.
14461 if test "${enable_expanded+set}" = set; then
14462   enableval="$enable_expanded"
14463   test "x$enableval" = xyes &&
14464 cat >>confdefs.h <<\EOF
14465 #define NCURSES_EXPANDED 1
14466 EOF
14467
14468 fi;
14469
14470 ###     use option --disable-macros to suppress macros in favor of functions
14471
14472 # Check whether --enable-macros or --disable-macros was given.
14473 if test "${enable_macros+set}" = set; then
14474   enableval="$enable_macros"
14475   test "$enableval" = no &&
14476 cat >>confdefs.h <<\EOF
14477 #define NCURSES_NOMACROS 1
14478 EOF
14479
14480 fi;
14481
14482 # Normally we only add trace() to the debug-library.  Allow this to be
14483 # extended to all models of the ncurses library:
14484 cf_all_traces=no
14485 case "$CFLAGS $CPPFLAGS" in
14486 (*-DTRACE*)
14487         cf_all_traces=yes
14488         ;;
14489 esac
14490
14491 echo "$as_me:14491: checking whether to add trace feature to all models" >&5
14492 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14493
14494 # Check whether --with-trace or --without-trace was given.
14495 if test "${with_trace+set}" = set; then
14496   withval="$with_trace"
14497   cf_with_trace=$withval
14498 else
14499   cf_with_trace=$cf_all_traces
14500 fi;
14501 echo "$as_me:14501: result: $cf_with_trace" >&5
14502 echo "${ECHO_T}$cf_with_trace" >&6
14503
14504 if test "x$cf_with_trace" = xyes ; then
14505         LIB_TRACING=all
14506         ADA_TRACE=TRUE
14507
14508 cf_fix_cppflags=no
14509 cf_new_cflags=
14510 cf_new_cppflags=
14511 cf_new_extra_cppflags=
14512
14513 for cf_add_cflags in -DTRACE
14514 do
14515 case $cf_fix_cppflags in
14516 (no)
14517         case $cf_add_cflags in
14518         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14519                 case $cf_add_cflags in
14520                 (-D*)
14521                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14522
14523                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14524                                 && test -z "${cf_tst_cflags}" \
14525                                 && cf_fix_cppflags=yes
14526
14527                         if test $cf_fix_cppflags = yes ; then
14528                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14529                                 continue
14530                         elif test "${cf_tst_cflags}" = "\"'" ; then
14531                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14532                                 continue
14533                         fi
14534                         ;;
14535                 esac
14536                 case "$CPPFLAGS" in
14537                 (*$cf_add_cflags)
14538                         ;;
14539                 (*)
14540                         case $cf_add_cflags in
14541                         (-D*)
14542                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14543
14544 CPPFLAGS=`echo "$CPPFLAGS" | \
14545         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14546                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14547
14548                                 ;;
14549                         esac
14550                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14551                         ;;
14552                 esac
14553                 ;;
14554         (*)
14555                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14556                 ;;
14557         esac
14558         ;;
14559 (yes)
14560         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14561
14562         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14563
14564         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14565                 && test -z "${cf_tst_cflags}" \
14566                 && cf_fix_cppflags=no
14567         ;;
14568 esac
14569 done
14570
14571 if test -n "$cf_new_cflags" ; then
14572
14573         CFLAGS="$CFLAGS $cf_new_cflags"
14574 fi
14575
14576 if test -n "$cf_new_cppflags" ; then
14577
14578         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14579 fi
14580
14581 if test -n "$cf_new_extra_cppflags" ; then
14582
14583         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14584 fi
14585
14586 else
14587         LIB_TRACING=DEBUG
14588         ADA_TRACE=FALSE
14589 fi
14590
14591 echo "$as_me:14591: checking if we want to use GNAT projects" >&5
14592 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14593
14594 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14595 if test "${enable_gnat_projects+set}" = set; then
14596   enableval="$enable_gnat_projects"
14597   test "$enableval" != no && enableval=yes
14598         if test "$enableval" != "yes" ; then
14599     enable_gnat_projects=no
14600         else
14601                 enable_gnat_projects=yes
14602         fi
14603 else
14604   enableval=yes
14605         enable_gnat_projects=yes
14606
14607 fi;
14608 echo "$as_me:14608: result: $enable_gnat_projects" >&5
14609 echo "${ECHO_T}$enable_gnat_projects" >&6
14610
14611 ###     Checks for libraries.
14612 case $cf_cv_system_name in
14613 (*mingw32*|*mingw64*)
14614         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
14615         LIBS=" -lpsapi $LIBS"
14616         ;;
14617 (*)
14618 echo "$as_me:14618: checking for gettimeofday" >&5
14619 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14620 if test "${ac_cv_func_gettimeofday+set}" = set; then
14621   echo $ECHO_N "(cached) $ECHO_C" >&6
14622 else
14623   cat >conftest.$ac_ext <<_ACEOF
14624 #line 14624 "configure"
14625 #include "confdefs.h"
14626 /* System header to define __stub macros and hopefully few prototypes,
14627     which can conflict with char gettimeofday (); below.  */
14628 #include <assert.h>
14629 /* Override any gcc2 internal prototype to avoid an error.  */
14630 #ifdef __cplusplus
14631 extern "C"
14632 #endif
14633 /* We use char because int might match the return type of a gcc2
14634    builtin and then its argument prototype would still apply.  */
14635 char gettimeofday ();
14636 char (*f) ();
14637
14638 int
14639 main ()
14640 {
14641 /* The GNU C library defines this for functions which it implements
14642     to always fail with ENOSYS.  Some functions are actually named
14643     something starting with __ and the normal name is an alias.  */
14644 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14645 choke me
14646 #else
14647 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14648 #endif
14649
14650   ;
14651   return 0;
14652 }
14653 _ACEOF
14654 rm -f conftest.$ac_objext conftest$ac_exeext
14655 if { (eval echo "$as_me:14655: \"$ac_link\"") >&5
14656   (eval $ac_link) 2>&5
14657   ac_status=$?
14658   echo "$as_me:14658: \$? = $ac_status" >&5
14659   (exit $ac_status); } &&
14660          { ac_try='test -s conftest$ac_exeext'
14661   { (eval echo "$as_me:14661: \"$ac_try\"") >&5
14662   (eval $ac_try) 2>&5
14663   ac_status=$?
14664   echo "$as_me:14664: \$? = $ac_status" >&5
14665   (exit $ac_status); }; }; then
14666   ac_cv_func_gettimeofday=yes
14667 else
14668   echo "$as_me: failed program was:" >&5
14669 cat conftest.$ac_ext >&5
14670 ac_cv_func_gettimeofday=no
14671 fi
14672 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14673 fi
14674 echo "$as_me:14674: result: $ac_cv_func_gettimeofday" >&5
14675 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14676 if test $ac_cv_func_gettimeofday = yes; then
14677
14678 cat >>confdefs.h <<\EOF
14679 #define HAVE_GETTIMEOFDAY 1
14680 EOF
14681
14682 else
14683
14684 echo "$as_me:14684: checking for gettimeofday in -lbsd" >&5
14685 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14686 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14687   echo $ECHO_N "(cached) $ECHO_C" >&6
14688 else
14689   ac_check_lib_save_LIBS=$LIBS
14690 LIBS="-lbsd  $LIBS"
14691 cat >conftest.$ac_ext <<_ACEOF
14692 #line 14692 "configure"
14693 #include "confdefs.h"
14694
14695 /* Override any gcc2 internal prototype to avoid an error.  */
14696 #ifdef __cplusplus
14697 extern "C"
14698 #endif
14699 /* We use char because int might match the return type of a gcc2
14700    builtin and then its argument prototype would still apply.  */
14701 char gettimeofday ();
14702 int
14703 main ()
14704 {
14705 gettimeofday ();
14706   ;
14707   return 0;
14708 }
14709 _ACEOF
14710 rm -f conftest.$ac_objext conftest$ac_exeext
14711 if { (eval echo "$as_me:14711: \"$ac_link\"") >&5
14712   (eval $ac_link) 2>&5
14713   ac_status=$?
14714   echo "$as_me:14714: \$? = $ac_status" >&5
14715   (exit $ac_status); } &&
14716          { ac_try='test -s conftest$ac_exeext'
14717   { (eval echo "$as_me:14717: \"$ac_try\"") >&5
14718   (eval $ac_try) 2>&5
14719   ac_status=$?
14720   echo "$as_me:14720: \$? = $ac_status" >&5
14721   (exit $ac_status); }; }; then
14722   ac_cv_lib_bsd_gettimeofday=yes
14723 else
14724   echo "$as_me: failed program was:" >&5
14725 cat conftest.$ac_ext >&5
14726 ac_cv_lib_bsd_gettimeofday=no
14727 fi
14728 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14729 LIBS=$ac_check_lib_save_LIBS
14730 fi
14731 echo "$as_me:14731: result: $ac_cv_lib_bsd_gettimeofday" >&5
14732 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14733 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14734
14735 cat >>confdefs.h <<\EOF
14736 #define HAVE_GETTIMEOFDAY 1
14737 EOF
14738
14739 cf_add_libs="-lbsd"
14740 # Filter out duplicates - this happens with badly-designed ".pc" files...
14741 for cf_add_1lib in $LIBS
14742 do
14743         for cf_add_2lib in $cf_add_libs
14744         do
14745                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14746                 then
14747                         cf_add_1lib=
14748                         break
14749                 fi
14750         done
14751         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14752 done
14753 LIBS="$cf_add_libs"
14754
14755 fi
14756
14757 fi
14758         ;;
14759 esac
14760
14761 echo "$as_me:14761: checking if -lm needed for math functions" >&5
14762 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14763 if test "${cf_cv_need_libm+set}" = set; then
14764   echo $ECHO_N "(cached) $ECHO_C" >&6
14765 else
14766
14767         cat >conftest.$ac_ext <<_ACEOF
14768 #line 14768 "configure"
14769 #include "confdefs.h"
14770
14771         #include <stdio.h>
14772         #include <math.h>
14773
14774 int
14775 main ()
14776 {
14777 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14778   ;
14779   return 0;
14780 }
14781 _ACEOF
14782 rm -f conftest.$ac_objext conftest$ac_exeext
14783 if { (eval echo "$as_me:14783: \"$ac_link\"") >&5
14784   (eval $ac_link) 2>&5
14785   ac_status=$?
14786   echo "$as_me:14786: \$? = $ac_status" >&5
14787   (exit $ac_status); } &&
14788          { ac_try='test -s conftest$ac_exeext'
14789   { (eval echo "$as_me:14789: \"$ac_try\"") >&5
14790   (eval $ac_try) 2>&5
14791   ac_status=$?
14792   echo "$as_me:14792: \$? = $ac_status" >&5
14793   (exit $ac_status); }; }; then
14794   cf_cv_need_libm=no
14795 else
14796   echo "$as_me: failed program was:" >&5
14797 cat conftest.$ac_ext >&5
14798 cf_cv_need_libm=yes
14799 fi
14800 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14801 fi
14802 echo "$as_me:14802: result: $cf_cv_need_libm" >&5
14803 echo "${ECHO_T}$cf_cv_need_libm" >&6
14804 if test "$cf_cv_need_libm" = yes
14805 then
14806 MATH_LIB=-lm
14807 fi
14808
14809 ###     Checks for header files.
14810 echo "$as_me:14810: checking for ANSI C header files" >&5
14811 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14812 if test "${ac_cv_header_stdc+set}" = set; then
14813   echo $ECHO_N "(cached) $ECHO_C" >&6
14814 else
14815   cat >conftest.$ac_ext <<_ACEOF
14816 #line 14816 "configure"
14817 #include "confdefs.h"
14818 #include <stdlib.h>
14819 #include <stdarg.h>
14820 #include <string.h>
14821 #include <float.h>
14822
14823 _ACEOF
14824 if { (eval echo "$as_me:14824: \"$ac_cpp conftest.$ac_ext\"") >&5
14825   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14826   ac_status=$?
14827   egrep -v '^ *\+' conftest.er1 >conftest.err
14828   rm -f conftest.er1
14829   cat conftest.err >&5
14830   echo "$as_me:14830: \$? = $ac_status" >&5
14831   (exit $ac_status); } >/dev/null; then
14832   if test -s conftest.err; then
14833     ac_cpp_err=$ac_c_preproc_warn_flag
14834   else
14835     ac_cpp_err=
14836   fi
14837 else
14838   ac_cpp_err=yes
14839 fi
14840 if test -z "$ac_cpp_err"; then
14841   ac_cv_header_stdc=yes
14842 else
14843   echo "$as_me: failed program was:" >&5
14844   cat conftest.$ac_ext >&5
14845   ac_cv_header_stdc=no
14846 fi
14847 rm -f conftest.err conftest.$ac_ext
14848
14849 if test $ac_cv_header_stdc = yes; then
14850   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14851   cat >conftest.$ac_ext <<_ACEOF
14852 #line 14852 "configure"
14853 #include "confdefs.h"
14854 #include <string.h>
14855
14856 _ACEOF
14857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14858   egrep "memchr" >/dev/null 2>&1; then
14859   :
14860 else
14861   ac_cv_header_stdc=no
14862 fi
14863 rm -rf conftest*
14864
14865 fi
14866
14867 if test $ac_cv_header_stdc = yes; then
14868   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14869   cat >conftest.$ac_ext <<_ACEOF
14870 #line 14870 "configure"
14871 #include "confdefs.h"
14872 #include <stdlib.h>
14873
14874 _ACEOF
14875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14876   egrep "free" >/dev/null 2>&1; then
14877   :
14878 else
14879   ac_cv_header_stdc=no
14880 fi
14881 rm -rf conftest*
14882
14883 fi
14884
14885 if test $ac_cv_header_stdc = yes; then
14886   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14887   if test "$cross_compiling" = yes; then
14888   :
14889 else
14890   cat >conftest.$ac_ext <<_ACEOF
14891 #line 14891 "configure"
14892 #include "confdefs.h"
14893 #include <ctype.h>
14894 #if ((' ' & 0x0FF) == 0x020)
14895 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14896 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14897 #else
14898 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14899                      || ('j' <= (c) && (c) <= 'r') \
14900                      || ('s' <= (c) && (c) <= 'z'))
14901 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14902 #endif
14903
14904 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14905 int
14906 main ()
14907 {
14908   int i;
14909   for (i = 0; i < 256; i++)
14910     if (XOR (islower (i), ISLOWER (i))
14911         || toupper (i) != TOUPPER (i))
14912       $ac_main_return(2);
14913   $ac_main_return (0);
14914 }
14915 _ACEOF
14916 rm -f conftest$ac_exeext
14917 if { (eval echo "$as_me:14917: \"$ac_link\"") >&5
14918   (eval $ac_link) 2>&5
14919   ac_status=$?
14920   echo "$as_me:14920: \$? = $ac_status" >&5
14921   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14922   { (eval echo "$as_me:14922: \"$ac_try\"") >&5
14923   (eval $ac_try) 2>&5
14924   ac_status=$?
14925   echo "$as_me:14925: \$? = $ac_status" >&5
14926   (exit $ac_status); }; }; then
14927   :
14928 else
14929   echo "$as_me: program exited with status $ac_status" >&5
14930 echo "$as_me: failed program was:" >&5
14931 cat conftest.$ac_ext >&5
14932 ac_cv_header_stdc=no
14933 fi
14934 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14935 fi
14936 fi
14937 fi
14938 echo "$as_me:14938: result: $ac_cv_header_stdc" >&5
14939 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14940 if test $ac_cv_header_stdc = yes; then
14941
14942 cat >>confdefs.h <<\EOF
14943 #define STDC_HEADERS 1
14944 EOF
14945
14946 fi
14947
14948 ac_header_dirent=no
14949 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14950   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14951 echo "$as_me:14951: checking for $ac_hdr that defines DIR" >&5
14952 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14953 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14954   echo $ECHO_N "(cached) $ECHO_C" >&6
14955 else
14956   cat >conftest.$ac_ext <<_ACEOF
14957 #line 14957 "configure"
14958 #include "confdefs.h"
14959 #include <sys/types.h>
14960 #include <$ac_hdr>
14961
14962 int
14963 main ()
14964 {
14965 if ((DIR *) 0)
14966 return 0;
14967   ;
14968   return 0;
14969 }
14970 _ACEOF
14971 rm -f conftest.$ac_objext
14972 if { (eval echo "$as_me:14972: \"$ac_compile\"") >&5
14973   (eval $ac_compile) 2>&5
14974   ac_status=$?
14975   echo "$as_me:14975: \$? = $ac_status" >&5
14976   (exit $ac_status); } &&
14977          { ac_try='test -s conftest.$ac_objext'
14978   { (eval echo "$as_me:14978: \"$ac_try\"") >&5
14979   (eval $ac_try) 2>&5
14980   ac_status=$?
14981   echo "$as_me:14981: \$? = $ac_status" >&5
14982   (exit $ac_status); }; }; then
14983   eval "$as_ac_Header=yes"
14984 else
14985   echo "$as_me: failed program was:" >&5
14986 cat conftest.$ac_ext >&5
14987 eval "$as_ac_Header=no"
14988 fi
14989 rm -f conftest.$ac_objext conftest.$ac_ext
14990 fi
14991 echo "$as_me:14991: result: `eval echo '${'$as_ac_Header'}'`" >&5
14992 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14993 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14994   cat >>confdefs.h <<EOF
14995 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14996 EOF
14997
14998 ac_header_dirent=$ac_hdr; break
14999 fi
15000
15001 done
15002 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15003 if test $ac_header_dirent = dirent.h; then
15004   echo "$as_me:15004: checking for opendir in -ldir" >&5
15005 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15006 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15007   echo $ECHO_N "(cached) $ECHO_C" >&6
15008 else
15009   ac_check_lib_save_LIBS=$LIBS
15010 LIBS="-ldir  $LIBS"
15011 cat >conftest.$ac_ext <<_ACEOF
15012 #line 15012 "configure"
15013 #include "confdefs.h"
15014
15015 /* Override any gcc2 internal prototype to avoid an error.  */
15016 #ifdef __cplusplus
15017 extern "C"
15018 #endif
15019 /* We use char because int might match the return type of a gcc2
15020    builtin and then its argument prototype would still apply.  */
15021 char opendir ();
15022 int
15023 main ()
15024 {
15025 opendir ();
15026   ;
15027   return 0;
15028 }
15029 _ACEOF
15030 rm -f conftest.$ac_objext conftest$ac_exeext
15031 if { (eval echo "$as_me:15031: \"$ac_link\"") >&5
15032   (eval $ac_link) 2>&5
15033   ac_status=$?
15034   echo "$as_me:15034: \$? = $ac_status" >&5
15035   (exit $ac_status); } &&
15036          { ac_try='test -s conftest$ac_exeext'
15037   { (eval echo "$as_me:15037: \"$ac_try\"") >&5
15038   (eval $ac_try) 2>&5
15039   ac_status=$?
15040   echo "$as_me:15040: \$? = $ac_status" >&5
15041   (exit $ac_status); }; }; then
15042   ac_cv_lib_dir_opendir=yes
15043 else
15044   echo "$as_me: failed program was:" >&5
15045 cat conftest.$ac_ext >&5
15046 ac_cv_lib_dir_opendir=no
15047 fi
15048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15049 LIBS=$ac_check_lib_save_LIBS
15050 fi
15051 echo "$as_me:15051: result: $ac_cv_lib_dir_opendir" >&5
15052 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15053 if test $ac_cv_lib_dir_opendir = yes; then
15054   LIBS="$LIBS -ldir"
15055 fi
15056
15057 else
15058   echo "$as_me:15058: checking for opendir in -lx" >&5
15059 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15060 if test "${ac_cv_lib_x_opendir+set}" = set; then
15061   echo $ECHO_N "(cached) $ECHO_C" >&6
15062 else
15063   ac_check_lib_save_LIBS=$LIBS
15064 LIBS="-lx  $LIBS"
15065 cat >conftest.$ac_ext <<_ACEOF
15066 #line 15066 "configure"
15067 #include "confdefs.h"
15068
15069 /* Override any gcc2 internal prototype to avoid an error.  */
15070 #ifdef __cplusplus
15071 extern "C"
15072 #endif
15073 /* We use char because int might match the return type of a gcc2
15074    builtin and then its argument prototype would still apply.  */
15075 char opendir ();
15076 int
15077 main ()
15078 {
15079 opendir ();
15080   ;
15081   return 0;
15082 }
15083 _ACEOF
15084 rm -f conftest.$ac_objext conftest$ac_exeext
15085 if { (eval echo "$as_me:15085: \"$ac_link\"") >&5
15086   (eval $ac_link) 2>&5
15087   ac_status=$?
15088   echo "$as_me:15088: \$? = $ac_status" >&5
15089   (exit $ac_status); } &&
15090          { ac_try='test -s conftest$ac_exeext'
15091   { (eval echo "$as_me:15091: \"$ac_try\"") >&5
15092   (eval $ac_try) 2>&5
15093   ac_status=$?
15094   echo "$as_me:15094: \$? = $ac_status" >&5
15095   (exit $ac_status); }; }; then
15096   ac_cv_lib_x_opendir=yes
15097 else
15098   echo "$as_me: failed program was:" >&5
15099 cat conftest.$ac_ext >&5
15100 ac_cv_lib_x_opendir=no
15101 fi
15102 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15103 LIBS=$ac_check_lib_save_LIBS
15104 fi
15105 echo "$as_me:15105: result: $ac_cv_lib_x_opendir" >&5
15106 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15107 if test $ac_cv_lib_x_opendir = yes; then
15108   LIBS="$LIBS -lx"
15109 fi
15110
15111 fi
15112
15113 echo "$as_me:15113: checking whether time.h and sys/time.h may both be included" >&5
15114 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15115 if test "${ac_cv_header_time+set}" = set; then
15116   echo $ECHO_N "(cached) $ECHO_C" >&6
15117 else
15118   cat >conftest.$ac_ext <<_ACEOF
15119 #line 15119 "configure"
15120 #include "confdefs.h"
15121 #include <sys/types.h>
15122 #include <sys/time.h>
15123 #include <time.h>
15124
15125 int
15126 main ()
15127 {
15128 if ((struct tm *) 0)
15129 return 0;
15130   ;
15131   return 0;
15132 }
15133 _ACEOF
15134 rm -f conftest.$ac_objext
15135 if { (eval echo "$as_me:15135: \"$ac_compile\"") >&5
15136   (eval $ac_compile) 2>&5
15137   ac_status=$?
15138   echo "$as_me:15138: \$? = $ac_status" >&5
15139   (exit $ac_status); } &&
15140          { ac_try='test -s conftest.$ac_objext'
15141   { (eval echo "$as_me:15141: \"$ac_try\"") >&5
15142   (eval $ac_try) 2>&5
15143   ac_status=$?
15144   echo "$as_me:15144: \$? = $ac_status" >&5
15145   (exit $ac_status); }; }; then
15146   ac_cv_header_time=yes
15147 else
15148   echo "$as_me: failed program was:" >&5
15149 cat conftest.$ac_ext >&5
15150 ac_cv_header_time=no
15151 fi
15152 rm -f conftest.$ac_objext conftest.$ac_ext
15153 fi
15154 echo "$as_me:15154: result: $ac_cv_header_time" >&5
15155 echo "${ECHO_T}$ac_cv_header_time" >&6
15156 if test $ac_cv_header_time = yes; then
15157
15158 cat >>confdefs.h <<\EOF
15159 #define TIME_WITH_SYS_TIME 1
15160 EOF
15161
15162 fi
15163
15164 cf_regex_func=no
15165
15166 cf_regex_libs="regex re"
15167 case $host_os in
15168 (mingw*)
15169         cf_regex_libs="gnurx $cf_regex_libs"
15170         ;;
15171 esac
15172
15173 echo "$as_me:15173: checking for regcomp" >&5
15174 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15175 if test "${ac_cv_func_regcomp+set}" = set; then
15176   echo $ECHO_N "(cached) $ECHO_C" >&6
15177 else
15178   cat >conftest.$ac_ext <<_ACEOF
15179 #line 15179 "configure"
15180 #include "confdefs.h"
15181 /* System header to define __stub macros and hopefully few prototypes,
15182     which can conflict with char regcomp (); below.  */
15183 #include <assert.h>
15184 /* Override any gcc2 internal prototype to avoid an error.  */
15185 #ifdef __cplusplus
15186 extern "C"
15187 #endif
15188 /* We use char because int might match the return type of a gcc2
15189    builtin and then its argument prototype would still apply.  */
15190 char regcomp ();
15191 char (*f) ();
15192
15193 int
15194 main ()
15195 {
15196 /* The GNU C library defines this for functions which it implements
15197     to always fail with ENOSYS.  Some functions are actually named
15198     something starting with __ and the normal name is an alias.  */
15199 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15200 choke me
15201 #else
15202 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15203 #endif
15204
15205   ;
15206   return 0;
15207 }
15208 _ACEOF
15209 rm -f conftest.$ac_objext conftest$ac_exeext
15210 if { (eval echo "$as_me:15210: \"$ac_link\"") >&5
15211   (eval $ac_link) 2>&5
15212   ac_status=$?
15213   echo "$as_me:15213: \$? = $ac_status" >&5
15214   (exit $ac_status); } &&
15215          { ac_try='test -s conftest$ac_exeext'
15216   { (eval echo "$as_me:15216: \"$ac_try\"") >&5
15217   (eval $ac_try) 2>&5
15218   ac_status=$?
15219   echo "$as_me:15219: \$? = $ac_status" >&5
15220   (exit $ac_status); }; }; then
15221   ac_cv_func_regcomp=yes
15222 else
15223   echo "$as_me: failed program was:" >&5
15224 cat conftest.$ac_ext >&5
15225 ac_cv_func_regcomp=no
15226 fi
15227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15228 fi
15229 echo "$as_me:15229: result: $ac_cv_func_regcomp" >&5
15230 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15231 if test $ac_cv_func_regcomp = yes; then
15232   cf_regex_func=regcomp
15233 else
15234
15235         for cf_regex_lib in $cf_regex_libs
15236         do
15237                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15238 echo "$as_me:15238: checking for regcomp in -l$cf_regex_lib" >&5
15239 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15240 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15241   echo $ECHO_N "(cached) $ECHO_C" >&6
15242 else
15243   ac_check_lib_save_LIBS=$LIBS
15244 LIBS="-l$cf_regex_lib  $LIBS"
15245 cat >conftest.$ac_ext <<_ACEOF
15246 #line 15246 "configure"
15247 #include "confdefs.h"
15248
15249 /* Override any gcc2 internal prototype to avoid an error.  */
15250 #ifdef __cplusplus
15251 extern "C"
15252 #endif
15253 /* We use char because int might match the return type of a gcc2
15254    builtin and then its argument prototype would still apply.  */
15255 char regcomp ();
15256 int
15257 main ()
15258 {
15259 regcomp ();
15260   ;
15261   return 0;
15262 }
15263 _ACEOF
15264 rm -f conftest.$ac_objext conftest$ac_exeext
15265 if { (eval echo "$as_me:15265: \"$ac_link\"") >&5
15266   (eval $ac_link) 2>&5
15267   ac_status=$?
15268   echo "$as_me:15268: \$? = $ac_status" >&5
15269   (exit $ac_status); } &&
15270          { ac_try='test -s conftest$ac_exeext'
15271   { (eval echo "$as_me:15271: \"$ac_try\"") >&5
15272   (eval $ac_try) 2>&5
15273   ac_status=$?
15274   echo "$as_me:15274: \$? = $ac_status" >&5
15275   (exit $ac_status); }; }; then
15276   eval "$as_ac_Lib=yes"
15277 else
15278   echo "$as_me: failed program was:" >&5
15279 cat conftest.$ac_ext >&5
15280 eval "$as_ac_Lib=no"
15281 fi
15282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15283 LIBS=$ac_check_lib_save_LIBS
15284 fi
15285 echo "$as_me:15285: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15286 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15287 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15288
15289 cf_add_libs="-l$cf_regex_lib"
15290 # Filter out duplicates - this happens with badly-designed ".pc" files...
15291 for cf_add_1lib in $LIBS
15292 do
15293         for cf_add_2lib in $cf_add_libs
15294         do
15295                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15296                 then
15297                         cf_add_1lib=
15298                         break
15299                 fi
15300         done
15301         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15302 done
15303 LIBS="$cf_add_libs"
15304
15305                                 cf_regex_func=regcomp
15306                                 break
15307 fi
15308
15309         done
15310
15311 fi
15312
15313 if test "$cf_regex_func" = no ; then
15314         echo "$as_me:15314: checking for compile" >&5
15315 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15316 if test "${ac_cv_func_compile+set}" = set; then
15317   echo $ECHO_N "(cached) $ECHO_C" >&6
15318 else
15319   cat >conftest.$ac_ext <<_ACEOF
15320 #line 15320 "configure"
15321 #include "confdefs.h"
15322 /* System header to define __stub macros and hopefully few prototypes,
15323     which can conflict with char compile (); below.  */
15324 #include <assert.h>
15325 /* Override any gcc2 internal prototype to avoid an error.  */
15326 #ifdef __cplusplus
15327 extern "C"
15328 #endif
15329 /* We use char because int might match the return type of a gcc2
15330    builtin and then its argument prototype would still apply.  */
15331 char compile ();
15332 char (*f) ();
15333
15334 int
15335 main ()
15336 {
15337 /* The GNU C library defines this for functions which it implements
15338     to always fail with ENOSYS.  Some functions are actually named
15339     something starting with __ and the normal name is an alias.  */
15340 #if defined (__stub_compile) || defined (__stub___compile)
15341 choke me
15342 #else
15343 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15344 #endif
15345
15346   ;
15347   return 0;
15348 }
15349 _ACEOF
15350 rm -f conftest.$ac_objext conftest$ac_exeext
15351 if { (eval echo "$as_me:15351: \"$ac_link\"") >&5
15352   (eval $ac_link) 2>&5
15353   ac_status=$?
15354   echo "$as_me:15354: \$? = $ac_status" >&5
15355   (exit $ac_status); } &&
15356          { ac_try='test -s conftest$ac_exeext'
15357   { (eval echo "$as_me:15357: \"$ac_try\"") >&5
15358   (eval $ac_try) 2>&5
15359   ac_status=$?
15360   echo "$as_me:15360: \$? = $ac_status" >&5
15361   (exit $ac_status); }; }; then
15362   ac_cv_func_compile=yes
15363 else
15364   echo "$as_me: failed program was:" >&5
15365 cat conftest.$ac_ext >&5
15366 ac_cv_func_compile=no
15367 fi
15368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15369 fi
15370 echo "$as_me:15370: result: $ac_cv_func_compile" >&5
15371 echo "${ECHO_T}$ac_cv_func_compile" >&6
15372 if test $ac_cv_func_compile = yes; then
15373   cf_regex_func=compile
15374 else
15375
15376                 echo "$as_me:15376: checking for compile in -lgen" >&5
15377 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15378 if test "${ac_cv_lib_gen_compile+set}" = set; then
15379   echo $ECHO_N "(cached) $ECHO_C" >&6
15380 else
15381   ac_check_lib_save_LIBS=$LIBS
15382 LIBS="-lgen  $LIBS"
15383 cat >conftest.$ac_ext <<_ACEOF
15384 #line 15384 "configure"
15385 #include "confdefs.h"
15386
15387 /* Override any gcc2 internal prototype to avoid an error.  */
15388 #ifdef __cplusplus
15389 extern "C"
15390 #endif
15391 /* We use char because int might match the return type of a gcc2
15392    builtin and then its argument prototype would still apply.  */
15393 char compile ();
15394 int
15395 main ()
15396 {
15397 compile ();
15398   ;
15399   return 0;
15400 }
15401 _ACEOF
15402 rm -f conftest.$ac_objext conftest$ac_exeext
15403 if { (eval echo "$as_me:15403: \"$ac_link\"") >&5
15404   (eval $ac_link) 2>&5
15405   ac_status=$?
15406   echo "$as_me:15406: \$? = $ac_status" >&5
15407   (exit $ac_status); } &&
15408          { ac_try='test -s conftest$ac_exeext'
15409   { (eval echo "$as_me:15409: \"$ac_try\"") >&5
15410   (eval $ac_try) 2>&5
15411   ac_status=$?
15412   echo "$as_me:15412: \$? = $ac_status" >&5
15413   (exit $ac_status); }; }; then
15414   ac_cv_lib_gen_compile=yes
15415 else
15416   echo "$as_me: failed program was:" >&5
15417 cat conftest.$ac_ext >&5
15418 ac_cv_lib_gen_compile=no
15419 fi
15420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15421 LIBS=$ac_check_lib_save_LIBS
15422 fi
15423 echo "$as_me:15423: result: $ac_cv_lib_gen_compile" >&5
15424 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15425 if test $ac_cv_lib_gen_compile = yes; then
15426
15427 cf_add_libs="-lgen"
15428 # Filter out duplicates - this happens with badly-designed ".pc" files...
15429 for cf_add_1lib in $LIBS
15430 do
15431         for cf_add_2lib in $cf_add_libs
15432         do
15433                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15434                 then
15435                         cf_add_1lib=
15436                         break
15437                 fi
15438         done
15439         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15440 done
15441 LIBS="$cf_add_libs"
15442
15443                                 cf_regex_func=compile
15444 fi
15445
15446 fi
15447
15448 fi
15449
15450 if test "$cf_regex_func" = no ; then
15451         { echo "$as_me:15451: WARNING: cannot find regular expression library" >&5
15452 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15453 fi
15454
15455 echo "$as_me:15455: checking for regular-expression headers" >&5
15456 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15457 if test "${cf_cv_regex_hdrs+set}" = set; then
15458   echo $ECHO_N "(cached) $ECHO_C" >&6
15459 else
15460
15461 cf_cv_regex_hdrs=no
15462 case $cf_regex_func in
15463 (compile)
15464         for cf_regex_hdr in regexp.h regexpr.h
15465         do
15466                 cat >conftest.$ac_ext <<_ACEOF
15467 #line 15467 "configure"
15468 #include "confdefs.h"
15469 #include <$cf_regex_hdr>
15470 int
15471 main ()
15472 {
15473
15474                         char *p = compile("", "", "", 0);
15475                         int x = step("", "");
15476
15477   ;
15478   return 0;
15479 }
15480 _ACEOF
15481 rm -f conftest.$ac_objext conftest$ac_exeext
15482 if { (eval echo "$as_me:15482: \"$ac_link\"") >&5
15483   (eval $ac_link) 2>&5
15484   ac_status=$?
15485   echo "$as_me:15485: \$? = $ac_status" >&5
15486   (exit $ac_status); } &&
15487          { ac_try='test -s conftest$ac_exeext'
15488   { (eval echo "$as_me:15488: \"$ac_try\"") >&5
15489   (eval $ac_try) 2>&5
15490   ac_status=$?
15491   echo "$as_me:15491: \$? = $ac_status" >&5
15492   (exit $ac_status); }; }; then
15493
15494                         cf_cv_regex_hdrs=$cf_regex_hdr
15495                         break
15496
15497 else
15498   echo "$as_me: failed program was:" >&5
15499 cat conftest.$ac_ext >&5
15500 fi
15501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15502         done
15503         ;;
15504 (*)
15505         for cf_regex_hdr in regex.h
15506         do
15507                 cat >conftest.$ac_ext <<_ACEOF
15508 #line 15508 "configure"
15509 #include "confdefs.h"
15510 #include <sys/types.h>
15511 #include <$cf_regex_hdr>
15512 int
15513 main ()
15514 {
15515
15516                         regex_t *p;
15517                         int x = regcomp(p, "", 0);
15518                         int y = regexec(p, "", 0, 0, 0);
15519                         regfree(p);
15520
15521   ;
15522   return 0;
15523 }
15524 _ACEOF
15525 rm -f conftest.$ac_objext conftest$ac_exeext
15526 if { (eval echo "$as_me:15526: \"$ac_link\"") >&5
15527   (eval $ac_link) 2>&5
15528   ac_status=$?
15529   echo "$as_me:15529: \$? = $ac_status" >&5
15530   (exit $ac_status); } &&
15531          { ac_try='test -s conftest$ac_exeext'
15532   { (eval echo "$as_me:15532: \"$ac_try\"") >&5
15533   (eval $ac_try) 2>&5
15534   ac_status=$?
15535   echo "$as_me:15535: \$? = $ac_status" >&5
15536   (exit $ac_status); }; }; then
15537
15538                         cf_cv_regex_hdrs=$cf_regex_hdr
15539                         break
15540
15541 else
15542   echo "$as_me: failed program was:" >&5
15543 cat conftest.$ac_ext >&5
15544 fi
15545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15546         done
15547         ;;
15548 esac
15549
15550 fi
15551 echo "$as_me:15551: result: $cf_cv_regex_hdrs" >&5
15552 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15553
15554 case $cf_cv_regex_hdrs in
15555         (no)            { echo "$as_me:15555: WARNING: no regular expression header found" >&5
15556 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15557         (regex.h)
15558 cat >>confdefs.h <<\EOF
15559 #define HAVE_REGEX_H_FUNCS 1
15560 EOF
15561  ;;
15562         (regexp.h)
15563 cat >>confdefs.h <<\EOF
15564 #define HAVE_REGEXP_H_FUNCS 1
15565 EOF
15566  ;;
15567         (regexpr.h)
15568 cat >>confdefs.h <<\EOF
15569 #define HAVE_REGEXPR_H_FUNCS 1
15570 EOF
15571  ;;
15572 esac
15573
15574 for ac_header in \
15575 fcntl.h \
15576 getopt.h \
15577 limits.h \
15578 locale.h \
15579 math.h \
15580 poll.h \
15581 sys/bsdtypes.h \
15582 sys/ioctl.h \
15583 sys/param.h \
15584 sys/poll.h \
15585 sys/select.h \
15586 sys/time.h \
15587 sys/times.h \
15588 ttyent.h \
15589 unistd.h \
15590 wctype.h \
15591
15592 do
15593 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15594 echo "$as_me:15594: checking for $ac_header" >&5
15595 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15596 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15597   echo $ECHO_N "(cached) $ECHO_C" >&6
15598 else
15599   cat >conftest.$ac_ext <<_ACEOF
15600 #line 15600 "configure"
15601 #include "confdefs.h"
15602 #include <$ac_header>
15603 _ACEOF
15604 if { (eval echo "$as_me:15604: \"$ac_cpp conftest.$ac_ext\"") >&5
15605   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15606   ac_status=$?
15607   egrep -v '^ *\+' conftest.er1 >conftest.err
15608   rm -f conftest.er1
15609   cat conftest.err >&5
15610   echo "$as_me:15610: \$? = $ac_status" >&5
15611   (exit $ac_status); } >/dev/null; then
15612   if test -s conftest.err; then
15613     ac_cpp_err=$ac_c_preproc_warn_flag
15614   else
15615     ac_cpp_err=
15616   fi
15617 else
15618   ac_cpp_err=yes
15619 fi
15620 if test -z "$ac_cpp_err"; then
15621   eval "$as_ac_Header=yes"
15622 else
15623   echo "$as_me: failed program was:" >&5
15624   cat conftest.$ac_ext >&5
15625   eval "$as_ac_Header=no"
15626 fi
15627 rm -f conftest.err conftest.$ac_ext
15628 fi
15629 echo "$as_me:15629: result: `eval echo '${'$as_ac_Header'}'`" >&5
15630 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15631 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15632   cat >>confdefs.h <<EOF
15633 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15634 EOF
15635
15636 fi
15637 done
15638
15639 for ac_header in unistd.h getopt.h
15640 do
15641 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15642 echo "$as_me:15642: checking for $ac_header" >&5
15643 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15644 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15645   echo $ECHO_N "(cached) $ECHO_C" >&6
15646 else
15647   cat >conftest.$ac_ext <<_ACEOF
15648 #line 15648 "configure"
15649 #include "confdefs.h"
15650 #include <$ac_header>
15651 _ACEOF
15652 if { (eval echo "$as_me:15652: \"$ac_cpp conftest.$ac_ext\"") >&5
15653   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15654   ac_status=$?
15655   egrep -v '^ *\+' conftest.er1 >conftest.err
15656   rm -f conftest.er1
15657   cat conftest.err >&5
15658   echo "$as_me:15658: \$? = $ac_status" >&5
15659   (exit $ac_status); } >/dev/null; then
15660   if test -s conftest.err; then
15661     ac_cpp_err=$ac_c_preproc_warn_flag
15662   else
15663     ac_cpp_err=
15664   fi
15665 else
15666   ac_cpp_err=yes
15667 fi
15668 if test -z "$ac_cpp_err"; then
15669   eval "$as_ac_Header=yes"
15670 else
15671   echo "$as_me: failed program was:" >&5
15672   cat conftest.$ac_ext >&5
15673   eval "$as_ac_Header=no"
15674 fi
15675 rm -f conftest.err conftest.$ac_ext
15676 fi
15677 echo "$as_me:15677: result: `eval echo '${'$as_ac_Header'}'`" >&5
15678 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15679 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15680   cat >>confdefs.h <<EOF
15681 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15682 EOF
15683
15684 fi
15685 done
15686
15687 echo "$as_me:15687: checking for header declaring getopt variables" >&5
15688 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15689 if test "${cf_cv_getopt_header+set}" = set; then
15690   echo $ECHO_N "(cached) $ECHO_C" >&6
15691 else
15692
15693 cf_cv_getopt_header=none
15694 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15695 do
15696 cat >conftest.$ac_ext <<_ACEOF
15697 #line 15697 "configure"
15698 #include "confdefs.h"
15699
15700 #include <$cf_header>
15701 int
15702 main ()
15703 {
15704 int x = optind; char *y = optarg
15705   ;
15706   return 0;
15707 }
15708 _ACEOF
15709 rm -f conftest.$ac_objext
15710 if { (eval echo "$as_me:15710: \"$ac_compile\"") >&5
15711   (eval $ac_compile) 2>&5
15712   ac_status=$?
15713   echo "$as_me:15713: \$? = $ac_status" >&5
15714   (exit $ac_status); } &&
15715          { ac_try='test -s conftest.$ac_objext'
15716   { (eval echo "$as_me:15716: \"$ac_try\"") >&5
15717   (eval $ac_try) 2>&5
15718   ac_status=$?
15719   echo "$as_me:15719: \$? = $ac_status" >&5
15720   (exit $ac_status); }; }; then
15721   cf_cv_getopt_header=$cf_header
15722  break
15723 else
15724   echo "$as_me: failed program was:" >&5
15725 cat conftest.$ac_ext >&5
15726 fi
15727 rm -f conftest.$ac_objext conftest.$ac_ext
15728 done
15729
15730 fi
15731 echo "$as_me:15731: result: $cf_cv_getopt_header" >&5
15732 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15733 if test $cf_cv_getopt_header != none ; then
15734
15735 cat >>confdefs.h <<\EOF
15736 #define HAVE_GETOPT_HEADER 1
15737 EOF
15738
15739 fi
15740 if test $cf_cv_getopt_header = getopt.h ; then
15741
15742 cat >>confdefs.h <<\EOF
15743 #define NEED_GETOPT_H 1
15744 EOF
15745
15746 fi
15747
15748 # check for ISC (this may also define _POSIX_SOURCE)
15749 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15750 if test "x$ISC" = xyes ; then
15751
15752 echo "$as_me:15752: checking for main in -lcposix" >&5
15753 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15754 if test "${ac_cv_lib_cposix_main+set}" = set; then
15755   echo $ECHO_N "(cached) $ECHO_C" >&6
15756 else
15757   ac_check_lib_save_LIBS=$LIBS
15758 LIBS="-lcposix  $LIBS"
15759 cat >conftest.$ac_ext <<_ACEOF
15760 #line 15760 "configure"
15761 #include "confdefs.h"
15762
15763 int
15764 main ()
15765 {
15766 main ();
15767   ;
15768   return 0;
15769 }
15770 _ACEOF
15771 rm -f conftest.$ac_objext conftest$ac_exeext
15772 if { (eval echo "$as_me:15772: \"$ac_link\"") >&5
15773   (eval $ac_link) 2>&5
15774   ac_status=$?
15775   echo "$as_me:15775: \$? = $ac_status" >&5
15776   (exit $ac_status); } &&
15777          { ac_try='test -s conftest$ac_exeext'
15778   { (eval echo "$as_me:15778: \"$ac_try\"") >&5
15779   (eval $ac_try) 2>&5
15780   ac_status=$?
15781   echo "$as_me:15781: \$? = $ac_status" >&5
15782   (exit $ac_status); }; }; then
15783   ac_cv_lib_cposix_main=yes
15784 else
15785   echo "$as_me: failed program was:" >&5
15786 cat conftest.$ac_ext >&5
15787 ac_cv_lib_cposix_main=no
15788 fi
15789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15790 LIBS=$ac_check_lib_save_LIBS
15791 fi
15792 echo "$as_me:15792: result: $ac_cv_lib_cposix_main" >&5
15793 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15794 if test $ac_cv_lib_cposix_main = yes; then
15795   cat >>confdefs.h <<EOF
15796 #define HAVE_LIBCPOSIX 1
15797 EOF
15798
15799   LIBS="-lcposix $LIBS"
15800
15801 fi
15802
15803         echo "$as_me:15803: checking for bzero in -linet" >&5
15804 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15805 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15806   echo $ECHO_N "(cached) $ECHO_C" >&6
15807 else
15808   ac_check_lib_save_LIBS=$LIBS
15809 LIBS="-linet  $LIBS"
15810 cat >conftest.$ac_ext <<_ACEOF
15811 #line 15811 "configure"
15812 #include "confdefs.h"
15813
15814 /* Override any gcc2 internal prototype to avoid an error.  */
15815 #ifdef __cplusplus
15816 extern "C"
15817 #endif
15818 /* We use char because int might match the return type of a gcc2
15819    builtin and then its argument prototype would still apply.  */
15820 char bzero ();
15821 int
15822 main ()
15823 {
15824 bzero ();
15825   ;
15826   return 0;
15827 }
15828 _ACEOF
15829 rm -f conftest.$ac_objext conftest$ac_exeext
15830 if { (eval echo "$as_me:15830: \"$ac_link\"") >&5
15831   (eval $ac_link) 2>&5
15832   ac_status=$?
15833   echo "$as_me:15833: \$? = $ac_status" >&5
15834   (exit $ac_status); } &&
15835          { ac_try='test -s conftest$ac_exeext'
15836   { (eval echo "$as_me:15836: \"$ac_try\"") >&5
15837   (eval $ac_try) 2>&5
15838   ac_status=$?
15839   echo "$as_me:15839: \$? = $ac_status" >&5
15840   (exit $ac_status); }; }; then
15841   ac_cv_lib_inet_bzero=yes
15842 else
15843   echo "$as_me: failed program was:" >&5
15844 cat conftest.$ac_ext >&5
15845 ac_cv_lib_inet_bzero=no
15846 fi
15847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15848 LIBS=$ac_check_lib_save_LIBS
15849 fi
15850 echo "$as_me:15850: result: $ac_cv_lib_inet_bzero" >&5
15851 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15852 if test $ac_cv_lib_inet_bzero = yes; then
15853
15854 cf_add_libs="-linet"
15855 # Filter out duplicates - this happens with badly-designed ".pc" files...
15856 for cf_add_1lib in $LIBS
15857 do
15858         for cf_add_2lib in $cf_add_libs
15859         do
15860                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15861                 then
15862                         cf_add_1lib=
15863                         break
15864                 fi
15865         done
15866         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15867 done
15868 LIBS="$cf_add_libs"
15869
15870 fi
15871 fi
15872
15873 echo "$as_me:15873: checking if sys/time.h works with sys/select.h" >&5
15874 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15875 if test "${cf_cv_sys_time_select+set}" = set; then
15876   echo $ECHO_N "(cached) $ECHO_C" >&6
15877 else
15878
15879 cat >conftest.$ac_ext <<_ACEOF
15880 #line 15880 "configure"
15881 #include "confdefs.h"
15882
15883 #include <sys/types.h>
15884 #ifdef HAVE_SYS_TIME_H
15885 #include <sys/time.h>
15886 #endif
15887 #ifdef HAVE_SYS_SELECT_H
15888 #include <sys/select.h>
15889 #endif
15890
15891 int
15892 main ()
15893 {
15894
15895   ;
15896   return 0;
15897 }
15898 _ACEOF
15899 rm -f conftest.$ac_objext
15900 if { (eval echo "$as_me:15900: \"$ac_compile\"") >&5
15901   (eval $ac_compile) 2>&5
15902   ac_status=$?
15903   echo "$as_me:15903: \$? = $ac_status" >&5
15904   (exit $ac_status); } &&
15905          { ac_try='test -s conftest.$ac_objext'
15906   { (eval echo "$as_me:15906: \"$ac_try\"") >&5
15907   (eval $ac_try) 2>&5
15908   ac_status=$?
15909   echo "$as_me:15909: \$? = $ac_status" >&5
15910   (exit $ac_status); }; }; then
15911   cf_cv_sys_time_select=yes
15912 else
15913   echo "$as_me: failed program was:" >&5
15914 cat conftest.$ac_ext >&5
15915 cf_cv_sys_time_select=no
15916 fi
15917 rm -f conftest.$ac_objext conftest.$ac_ext
15918
15919 fi
15920
15921 echo "$as_me:15921: result: $cf_cv_sys_time_select" >&5
15922 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15923 test "$cf_cv_sys_time_select" = yes &&
15924 cat >>confdefs.h <<\EOF
15925 #define HAVE_SYS_TIME_SELECT 1
15926 EOF
15927
15928 ###     checks for compiler characteristics
15929 ac_ext=c
15930 ac_cpp='$CPP $CPPFLAGS'
15931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15934 ac_main_return=return
15935
15936 echo "$as_me:15936: checking for an ANSI C-conforming const" >&5
15937 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15938 if test "${ac_cv_c_const+set}" = set; then
15939   echo $ECHO_N "(cached) $ECHO_C" >&6
15940 else
15941   cat >conftest.$ac_ext <<_ACEOF
15942 #line 15942 "configure"
15943 #include "confdefs.h"
15944
15945 int
15946 main ()
15947 {
15948 /* FIXME: Include the comments suggested by Paul. */
15949 #ifndef __cplusplus
15950   /* Ultrix mips cc rejects this.  */
15951   typedef int charset[2];
15952   const charset x;
15953   /* SunOS 4.1.1 cc rejects this.  */
15954   char const *const *ccp;
15955   char **p;
15956   /* NEC SVR4.0.2 mips cc rejects this.  */
15957   struct point {int x, y;};
15958   static struct point const zero = {0,0};
15959   /* AIX XL C 1.02.0.0 rejects this.
15960      It does not let you subtract one const X* pointer from another in
15961      an arm of an if-expression whose if-part is not a constant
15962      expression */
15963   const char *g = "string";
15964   ccp = &g + (g ? g-g : 0);
15965   /* HPUX 7.0 cc rejects these. */
15966   ++ccp;
15967   p = (char**) ccp;
15968   ccp = (char const *const *) p;
15969   { /* SCO 3.2v4 cc rejects this.  */
15970     char *t;
15971     char const *s = 0 ? (char *) 0 : (char const *) 0;
15972
15973     *t++ = 0;
15974   }
15975   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15976     int x[] = {25, 17};
15977     const int *foo = &x[0];
15978     ++foo;
15979   }
15980   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15981     typedef const int *iptr;
15982     iptr p = 0;
15983     ++p;
15984   }
15985   { /* AIX XL C 1.02.0.0 rejects this saying
15986        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15987     struct s { int j; const int *ap[3]; };
15988     struct s *b; b->j = 5;
15989   }
15990   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15991     const int foo = 10;
15992   }
15993 #endif
15994
15995   ;
15996   return 0;
15997 }
15998 _ACEOF
15999 rm -f conftest.$ac_objext
16000 if { (eval echo "$as_me:16000: \"$ac_compile\"") >&5
16001   (eval $ac_compile) 2>&5
16002   ac_status=$?
16003   echo "$as_me:16003: \$? = $ac_status" >&5
16004   (exit $ac_status); } &&
16005          { ac_try='test -s conftest.$ac_objext'
16006   { (eval echo "$as_me:16006: \"$ac_try\"") >&5
16007   (eval $ac_try) 2>&5
16008   ac_status=$?
16009   echo "$as_me:16009: \$? = $ac_status" >&5
16010   (exit $ac_status); }; }; then
16011   ac_cv_c_const=yes
16012 else
16013   echo "$as_me: failed program was:" >&5
16014 cat conftest.$ac_ext >&5
16015 ac_cv_c_const=no
16016 fi
16017 rm -f conftest.$ac_objext conftest.$ac_ext
16018 fi
16019 echo "$as_me:16019: result: $ac_cv_c_const" >&5
16020 echo "${ECHO_T}$ac_cv_c_const" >&6
16021 if test $ac_cv_c_const = no; then
16022
16023 cat >>confdefs.h <<\EOF
16024 #define const
16025 EOF
16026
16027 fi
16028
16029 echo "$as_me:16029: checking for inline" >&5
16030 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16031 if test "${ac_cv_c_inline+set}" = set; then
16032   echo $ECHO_N "(cached) $ECHO_C" >&6
16033 else
16034   ac_cv_c_inline=no
16035 for ac_kw in inline __inline__ __inline; do
16036   cat >conftest.$ac_ext <<_ACEOF
16037 #line 16037 "configure"
16038 #include "confdefs.h"
16039 #ifndef __cplusplus
16040 static $ac_kw int static_foo () {return 0; }
16041 $ac_kw int foo () {return 0; }
16042 #endif
16043
16044 _ACEOF
16045 rm -f conftest.$ac_objext
16046 if { (eval echo "$as_me:16046: \"$ac_compile\"") >&5
16047   (eval $ac_compile) 2>&5
16048   ac_status=$?
16049   echo "$as_me:16049: \$? = $ac_status" >&5
16050   (exit $ac_status); } &&
16051          { ac_try='test -s conftest.$ac_objext'
16052   { (eval echo "$as_me:16052: \"$ac_try\"") >&5
16053   (eval $ac_try) 2>&5
16054   ac_status=$?
16055   echo "$as_me:16055: \$? = $ac_status" >&5
16056   (exit $ac_status); }; }; then
16057   ac_cv_c_inline=$ac_kw; break
16058 else
16059   echo "$as_me: failed program was:" >&5
16060 cat conftest.$ac_ext >&5
16061 fi
16062 rm -f conftest.$ac_objext conftest.$ac_ext
16063 done
16064
16065 fi
16066 echo "$as_me:16066: result: $ac_cv_c_inline" >&5
16067 echo "${ECHO_T}$ac_cv_c_inline" >&6
16068 case $ac_cv_c_inline in
16069   inline | yes) ;;
16070   no)
16071 cat >>confdefs.h <<\EOF
16072 #define inline
16073 EOF
16074  ;;
16075   *)  cat >>confdefs.h <<EOF
16076 #define inline $ac_cv_c_inline
16077 EOF
16078  ;;
16079 esac
16080
16081 NCURSES_INLINE=
16082 if test "$ac_cv_c_inline" != no ; then
16083         NCURSES_INLINE=inline
16084         if test "$INTEL_COMPILER" = yes
16085         then
16086                 :
16087         elif test "$CLANG_COMPILER" = yes
16088         then
16089                 :
16090         elif test "$GCC" = yes
16091         then
16092                 echo "$as_me:16092: checking if $CC supports options to tune inlining" >&5
16093 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16094 if test "${cf_cv_gcc_inline+set}" = set; then
16095   echo $ECHO_N "(cached) $ECHO_C" >&6
16096 else
16097
16098                 cf_save_CFLAGS=$CFLAGS
16099                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16100                 cat >conftest.$ac_ext <<_ACEOF
16101 #line 16101 "configure"
16102 #include "confdefs.h"
16103 inline int foo(void) { return 1; }
16104 int
16105 main ()
16106 {
16107 ${cf_cv_main_return:-return} foo()
16108   ;
16109   return 0;
16110 }
16111 _ACEOF
16112 rm -f conftest.$ac_objext
16113 if { (eval echo "$as_me:16113: \"$ac_compile\"") >&5
16114   (eval $ac_compile) 2>&5
16115   ac_status=$?
16116   echo "$as_me:16116: \$? = $ac_status" >&5
16117   (exit $ac_status); } &&
16118          { ac_try='test -s conftest.$ac_objext'
16119   { (eval echo "$as_me:16119: \"$ac_try\"") >&5
16120   (eval $ac_try) 2>&5
16121   ac_status=$?
16122   echo "$as_me:16122: \$? = $ac_status" >&5
16123   (exit $ac_status); }; }; then
16124   cf_cv_gcc_inline=yes
16125 else
16126   echo "$as_me: failed program was:" >&5
16127 cat conftest.$ac_ext >&5
16128 cf_cv_gcc_inline=no
16129 fi
16130 rm -f conftest.$ac_objext conftest.$ac_ext
16131                 CFLAGS=$cf_save_CFLAGS
16132
16133 fi
16134 echo "$as_me:16134: result: $cf_cv_gcc_inline" >&5
16135 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16136                 if test "$cf_cv_gcc_inline" = yes ; then
16137
16138 cf_fix_cppflags=no
16139 cf_new_cflags=
16140 cf_new_cppflags=
16141 cf_new_extra_cppflags=
16142
16143 for cf_add_cflags in --param max-inline-insns-single=1200
16144 do
16145 case $cf_fix_cppflags in
16146 (no)
16147         case $cf_add_cflags in
16148         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16149                 case $cf_add_cflags in
16150                 (-D*)
16151                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16152
16153                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16154                                 && test -z "${cf_tst_cflags}" \
16155                                 && cf_fix_cppflags=yes
16156
16157                         if test $cf_fix_cppflags = yes ; then
16158                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16159                                 continue
16160                         elif test "${cf_tst_cflags}" = "\"'" ; then
16161                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16162                                 continue
16163                         fi
16164                         ;;
16165                 esac
16166                 case "$CPPFLAGS" in
16167                 (*$cf_add_cflags)
16168                         ;;
16169                 (*)
16170                         case $cf_add_cflags in
16171                         (-D*)
16172                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16173
16174 CPPFLAGS=`echo "$CPPFLAGS" | \
16175         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16176                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16177
16178                                 ;;
16179                         esac
16180                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16181                         ;;
16182                 esac
16183                 ;;
16184         (*)
16185                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16186                 ;;
16187         esac
16188         ;;
16189 (yes)
16190         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16191
16192         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16193
16194         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16195                 && test -z "${cf_tst_cflags}" \
16196                 && cf_fix_cppflags=no
16197         ;;
16198 esac
16199 done
16200
16201 if test -n "$cf_new_cflags" ; then
16202
16203         CFLAGS="$CFLAGS $cf_new_cflags"
16204 fi
16205
16206 if test -n "$cf_new_cppflags" ; then
16207
16208         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16209 fi
16210
16211 if test -n "$cf_new_extra_cppflags" ; then
16212
16213         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16214 fi
16215
16216                 fi
16217         fi
16218 fi
16219
16220 echo "$as_me:16220: checking for signal global datatype" >&5
16221 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16222 if test "${cf_cv_sig_atomic_t+set}" = set; then
16223   echo $ECHO_N "(cached) $ECHO_C" >&6
16224 else
16225
16226         for cf_type in \
16227                 "volatile sig_atomic_t" \
16228                 "sig_atomic_t" \
16229                 "int"
16230         do
16231         cat >conftest.$ac_ext <<_ACEOF
16232 #line 16232 "configure"
16233 #include "confdefs.h"
16234
16235 #include <sys/types.h>
16236 #include <signal.h>
16237 #include <stdio.h>
16238
16239 extern $cf_type x;
16240 $cf_type x;
16241 static void handler(int sig)
16242 {
16243         x = 5;
16244 }
16245 int
16246 main ()
16247 {
16248 signal(SIGINT, handler);
16249                  x = 1
16250   ;
16251   return 0;
16252 }
16253 _ACEOF
16254 rm -f conftest.$ac_objext
16255 if { (eval echo "$as_me:16255: \"$ac_compile\"") >&5
16256   (eval $ac_compile) 2>&5
16257   ac_status=$?
16258   echo "$as_me:16258: \$? = $ac_status" >&5
16259   (exit $ac_status); } &&
16260          { ac_try='test -s conftest.$ac_objext'
16261   { (eval echo "$as_me:16261: \"$ac_try\"") >&5
16262   (eval $ac_try) 2>&5
16263   ac_status=$?
16264   echo "$as_me:16264: \$? = $ac_status" >&5
16265   (exit $ac_status); }; }; then
16266   cf_cv_sig_atomic_t=$cf_type
16267 else
16268   echo "$as_me: failed program was:" >&5
16269 cat conftest.$ac_ext >&5
16270 cf_cv_sig_atomic_t=no
16271 fi
16272 rm -f conftest.$ac_objext conftest.$ac_ext
16273                 test "$cf_cv_sig_atomic_t" != no && break
16274         done
16275
16276 fi
16277
16278 echo "$as_me:16278: result: $cf_cv_sig_atomic_t" >&5
16279 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16280 test "$cf_cv_sig_atomic_t" != no &&
16281 cat >>confdefs.h <<EOF
16282 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16283 EOF
16284
16285 if test $NCURSES_CHTYPE = auto ; then
16286
16287 echo "$as_me:16287: checking for type of chtype" >&5
16288 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16289 if test "${cf_cv_typeof_chtype+set}" = set; then
16290   echo $ECHO_N "(cached) $ECHO_C" >&6
16291 else
16292
16293                 if test "$cross_compiling" = yes; then
16294   cf_cv_typeof_chtype=long
16295 else
16296   cat >conftest.$ac_ext <<_ACEOF
16297 #line 16297 "configure"
16298 #include "confdefs.h"
16299
16300 #define WANT_BITS 31
16301 #include <stdio.h>
16302 int main()
16303 {
16304         FILE *fp = fopen("cf_test.out", "w");
16305         if (fp != 0) {
16306                 char *result = "long";
16307                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16308                         int n;
16309                         unsigned int x, y;
16310                         for (n = 0; n < WANT_BITS; n++) {
16311                                 x = (1 << n);
16312                                 y = (x >> n);
16313                                 if (y != 1 || x == 0) {
16314                                         x = 0;
16315                                         break;
16316                                 }
16317                         }
16318                         /*
16319                          * If x is nonzero, an int is big enough for the bits
16320                          * that we want.
16321                          */
16322                         result = (x != 0) ? "int" : "long";
16323                 }
16324                 fputs(result, fp);
16325                 fclose(fp);
16326         }
16327         ${cf_cv_main_return:-return}(0);
16328 }
16329
16330 _ACEOF
16331 rm -f conftest$ac_exeext
16332 if { (eval echo "$as_me:16332: \"$ac_link\"") >&5
16333   (eval $ac_link) 2>&5
16334   ac_status=$?
16335   echo "$as_me:16335: \$? = $ac_status" >&5
16336   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16337   { (eval echo "$as_me:16337: \"$ac_try\"") >&5
16338   (eval $ac_try) 2>&5
16339   ac_status=$?
16340   echo "$as_me:16340: \$? = $ac_status" >&5
16341   (exit $ac_status); }; }; then
16342   cf_cv_typeof_chtype=`cat cf_test.out`
16343 else
16344   echo "$as_me: program exited with status $ac_status" >&5
16345 echo "$as_me: failed program was:" >&5
16346 cat conftest.$ac_ext >&5
16347 cf_cv_typeof_chtype=long
16348 fi
16349 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16350 fi
16351                 rm -f cf_test.out
16352
16353 fi
16354
16355 echo "$as_me:16355: result: $cf_cv_typeof_chtype" >&5
16356 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16357
16358 cat >>confdefs.h <<EOF
16359 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16360 EOF
16361
16362 else
16363         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16364 fi
16365 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16366
16367 echo "$as_me:16367: checking if unsigned literals are legal" >&5
16368 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16369 if test "${cf_cv_unsigned_literals+set}" = set; then
16370   echo $ECHO_N "(cached) $ECHO_C" >&6
16371 else
16372
16373         cat >conftest.$ac_ext <<_ACEOF
16374 #line 16374 "configure"
16375 #include "confdefs.h"
16376
16377 int
16378 main ()
16379 {
16380 long x = 1L + 1UL + 1U + 1
16381   ;
16382   return 0;
16383 }
16384 _ACEOF
16385 rm -f conftest.$ac_objext
16386 if { (eval echo "$as_me:16386: \"$ac_compile\"") >&5
16387   (eval $ac_compile) 2>&5
16388   ac_status=$?
16389   echo "$as_me:16389: \$? = $ac_status" >&5
16390   (exit $ac_status); } &&
16391          { ac_try='test -s conftest.$ac_objext'
16392   { (eval echo "$as_me:16392: \"$ac_try\"") >&5
16393   (eval $ac_try) 2>&5
16394   ac_status=$?
16395   echo "$as_me:16395: \$? = $ac_status" >&5
16396   (exit $ac_status); }; }; then
16397   cf_cv_unsigned_literals=yes
16398 else
16399   echo "$as_me: failed program was:" >&5
16400 cat conftest.$ac_ext >&5
16401 cf_cv_unsigned_literals=no
16402 fi
16403 rm -f conftest.$ac_objext conftest.$ac_ext
16404
16405 fi
16406
16407 echo "$as_me:16407: result: $cf_cv_unsigned_literals" >&5
16408 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16409
16410 cf_cv_1UL="1"
16411 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16412 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16413
16414 if test $NCURSES_MMASK_T = auto ; then
16415         cf_cv_typeof_mmask_t=long
16416 else
16417         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16418 fi
16419 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16420
16421 ###     Checks for external-data
16422
16423 echo "$as_me:16423: checking if external errno is declared" >&5
16424 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16425 if test "${cf_cv_dcl_errno+set}" = set; then
16426   echo $ECHO_N "(cached) $ECHO_C" >&6
16427 else
16428
16429         cat >conftest.$ac_ext <<_ACEOF
16430 #line 16430 "configure"
16431 #include "confdefs.h"
16432
16433 #ifdef HAVE_STDLIB_H
16434 #include <stdlib.h>
16435 #endif
16436 #include <stdio.h>
16437 #include <sys/types.h>
16438 #include <errno.h>
16439 int
16440 main ()
16441 {
16442 int x = (int) errno
16443   ;
16444   return 0;
16445 }
16446 _ACEOF
16447 rm -f conftest.$ac_objext
16448 if { (eval echo "$as_me:16448: \"$ac_compile\"") >&5
16449   (eval $ac_compile) 2>&5
16450   ac_status=$?
16451   echo "$as_me:16451: \$? = $ac_status" >&5
16452   (exit $ac_status); } &&
16453          { ac_try='test -s conftest.$ac_objext'
16454   { (eval echo "$as_me:16454: \"$ac_try\"") >&5
16455   (eval $ac_try) 2>&5
16456   ac_status=$?
16457   echo "$as_me:16457: \$? = $ac_status" >&5
16458   (exit $ac_status); }; }; then
16459   cf_cv_dcl_errno=yes
16460 else
16461   echo "$as_me: failed program was:" >&5
16462 cat conftest.$ac_ext >&5
16463 cf_cv_dcl_errno=no
16464 fi
16465 rm -f conftest.$ac_objext conftest.$ac_ext
16466
16467 fi
16468 echo "$as_me:16468: result: $cf_cv_dcl_errno" >&5
16469 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16470
16471 if test "$cf_cv_dcl_errno" = no ; then
16472
16473 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16474
16475         cat >>confdefs.h <<EOF
16476 #define $cf_result 1
16477 EOF
16478
16479 fi
16480
16481 # It's possible (for near-UNIX clones) that the data doesn't exist
16482
16483 echo "$as_me:16483: checking if external errno exists" >&5
16484 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16485 if test "${cf_cv_have_errno+set}" = set; then
16486   echo $ECHO_N "(cached) $ECHO_C" >&6
16487 else
16488
16489         cat >conftest.$ac_ext <<_ACEOF
16490 #line 16490 "configure"
16491 #include "confdefs.h"
16492
16493 #undef errno
16494 extern int errno;
16495
16496 int
16497 main ()
16498 {
16499 errno = 2
16500   ;
16501   return 0;
16502 }
16503 _ACEOF
16504 rm -f conftest.$ac_objext conftest$ac_exeext
16505 if { (eval echo "$as_me:16505: \"$ac_link\"") >&5
16506   (eval $ac_link) 2>&5
16507   ac_status=$?
16508   echo "$as_me:16508: \$? = $ac_status" >&5
16509   (exit $ac_status); } &&
16510          { ac_try='test -s conftest$ac_exeext'
16511   { (eval echo "$as_me:16511: \"$ac_try\"") >&5
16512   (eval $ac_try) 2>&5
16513   ac_status=$?
16514   echo "$as_me:16514: \$? = $ac_status" >&5
16515   (exit $ac_status); }; }; then
16516   cf_cv_have_errno=yes
16517 else
16518   echo "$as_me: failed program was:" >&5
16519 cat conftest.$ac_ext >&5
16520 cf_cv_have_errno=no
16521 fi
16522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16523
16524 fi
16525 echo "$as_me:16525: result: $cf_cv_have_errno" >&5
16526 echo "${ECHO_T}$cf_cv_have_errno" >&6
16527
16528 if test "$cf_cv_have_errno" = yes ; then
16529
16530 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16531
16532         cat >>confdefs.h <<EOF
16533 #define $cf_result 1
16534 EOF
16535
16536 fi
16537
16538 echo "$as_me:16538: checking if data-only library module links" >&5
16539 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16540 if test "${cf_cv_link_dataonly+set}" = set; then
16541   echo $ECHO_N "(cached) $ECHO_C" >&6
16542 else
16543
16544         rm -f conftest.a
16545         cat >conftest.$ac_ext <<EOF
16546 #line 16546 "configure"
16547 int     testdata[3] = { 123, 456, 789 };
16548 EOF
16549         if { (eval echo "$as_me:16549: \"$ac_compile\"") >&5
16550   (eval $ac_compile) 2>&5
16551   ac_status=$?
16552   echo "$as_me:16552: \$? = $ac_status" >&5
16553   (exit $ac_status); } ; then
16554                 mv conftest.o data.o && \
16555                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16556         fi
16557         rm -f conftest.$ac_ext data.o
16558         cat >conftest.$ac_ext <<EOF
16559 #line 16559 "configure"
16560 int     testfunc()
16561 {
16562 #if defined(NeXT)
16563         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16564 #else
16565         extern int testdata[3];
16566         return testdata[0] == 123
16567            &&  testdata[1] == 456
16568            &&  testdata[2] == 789;
16569 #endif
16570 }
16571 EOF
16572         if { (eval echo "$as_me:16572: \"$ac_compile\"") >&5
16573   (eval $ac_compile) 2>&5
16574   ac_status=$?
16575   echo "$as_me:16575: \$? = $ac_status" >&5
16576   (exit $ac_status); }; then
16577                 mv conftest.o func.o && \
16578                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16579         fi
16580         rm -f conftest.$ac_ext func.o
16581         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16582         cf_saveLIBS="$LIBS"
16583         LIBS="conftest.a $LIBS"
16584         if test "$cross_compiling" = yes; then
16585   cf_cv_link_dataonly=unknown
16586 else
16587   cat >conftest.$ac_ext <<_ACEOF
16588 #line 16588 "configure"
16589 #include "confdefs.h"
16590
16591         int main()
16592         {
16593                 extern int testfunc();
16594                 ${cf_cv_main_return:-return} (!testfunc());
16595         }
16596
16597 _ACEOF
16598 rm -f conftest$ac_exeext
16599 if { (eval echo "$as_me:16599: \"$ac_link\"") >&5
16600   (eval $ac_link) 2>&5
16601   ac_status=$?
16602   echo "$as_me:16602: \$? = $ac_status" >&5
16603   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16604   { (eval echo "$as_me:16604: \"$ac_try\"") >&5
16605   (eval $ac_try) 2>&5
16606   ac_status=$?
16607   echo "$as_me:16607: \$? = $ac_status" >&5
16608   (exit $ac_status); }; }; then
16609   cf_cv_link_dataonly=yes
16610 else
16611   echo "$as_me: program exited with status $ac_status" >&5
16612 echo "$as_me: failed program was:" >&5
16613 cat conftest.$ac_ext >&5
16614 cf_cv_link_dataonly=no
16615 fi
16616 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16617 fi
16618         LIBS="$cf_saveLIBS"
16619
16620 fi
16621
16622 echo "$as_me:16622: result: $cf_cv_link_dataonly" >&5
16623 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16624
16625 if test "$cf_cv_link_dataonly" = no ; then
16626
16627 cat >>confdefs.h <<\EOF
16628 #define BROKEN_LINKER 1
16629 EOF
16630
16631         BROKEN_LINKER=1
16632 fi
16633
16634 ###     Checks for library functions.
16635
16636 for ac_func in \
16637 getcwd \
16638 getegid \
16639 geteuid \
16640 getopt \
16641 getttynam \
16642 issetugid \
16643 poll \
16644 putenv \
16645 remove \
16646 select \
16647 setbuf \
16648 setbuffer \
16649 setenv \
16650 setvbuf \
16651 sigaction \
16652 sigvec \
16653 strdup \
16654 strstr \
16655 tcgetpgrp \
16656 times \
16657 vsnprintf \
16658
16659 do
16660 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16661 echo "$as_me:16661: checking for $ac_func" >&5
16662 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16663 if eval "test \"\${$as_ac_var+set}\" = set"; then
16664   echo $ECHO_N "(cached) $ECHO_C" >&6
16665 else
16666   cat >conftest.$ac_ext <<_ACEOF
16667 #line 16667 "configure"
16668 #include "confdefs.h"
16669 /* System header to define __stub macros and hopefully few prototypes,
16670     which can conflict with char $ac_func (); below.  */
16671 #include <assert.h>
16672 /* Override any gcc2 internal prototype to avoid an error.  */
16673 #ifdef __cplusplus
16674 extern "C"
16675 #endif
16676 /* We use char because int might match the return type of a gcc2
16677    builtin and then its argument prototype would still apply.  */
16678 char $ac_func ();
16679 char (*f) ();
16680
16681 int
16682 main ()
16683 {
16684 /* The GNU C library defines this for functions which it implements
16685     to always fail with ENOSYS.  Some functions are actually named
16686     something starting with __ and the normal name is an alias.  */
16687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16688 choke me
16689 #else
16690 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16691 #endif
16692
16693   ;
16694   return 0;
16695 }
16696 _ACEOF
16697 rm -f conftest.$ac_objext conftest$ac_exeext
16698 if { (eval echo "$as_me:16698: \"$ac_link\"") >&5
16699   (eval $ac_link) 2>&5
16700   ac_status=$?
16701   echo "$as_me:16701: \$? = $ac_status" >&5
16702   (exit $ac_status); } &&
16703          { ac_try='test -s conftest$ac_exeext'
16704   { (eval echo "$as_me:16704: \"$ac_try\"") >&5
16705   (eval $ac_try) 2>&5
16706   ac_status=$?
16707   echo "$as_me:16707: \$? = $ac_status" >&5
16708   (exit $ac_status); }; }; then
16709   eval "$as_ac_var=yes"
16710 else
16711   echo "$as_me: failed program was:" >&5
16712 cat conftest.$ac_ext >&5
16713 eval "$as_ac_var=no"
16714 fi
16715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16716 fi
16717 echo "$as_me:16717: result: `eval echo '${'$as_ac_var'}'`" >&5
16718 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16719 if test `eval echo '${'$as_ac_var'}'` = yes; then
16720   cat >>confdefs.h <<EOF
16721 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16722 EOF
16723
16724 fi
16725 done
16726
16727 if test "x$ac_cv_func_getopt" = xno &&
16728    test "x$cf_with_progs$cf_with_tests" != xnono; then
16729         { { echo "$as_me:16729: error: getopt is required for building programs" >&5
16730 echo "$as_me: error: getopt is required for building programs" >&2;}
16731    { (exit 1); exit 1; }; }
16732 fi
16733
16734 if test "x$with_getcap" = "xyes" ; then
16735
16736 echo "$as_me:16736: checking for terminal-capability database functions" >&5
16737 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16738 if test "${cf_cv_cgetent+set}" = set; then
16739   echo $ECHO_N "(cached) $ECHO_C" >&6
16740 else
16741
16742 cat >conftest.$ac_ext <<_ACEOF
16743 #line 16743 "configure"
16744 #include "confdefs.h"
16745
16746 #include <stdlib.h>
16747 int
16748 main ()
16749 {
16750
16751         char temp[128];
16752         char *buf = temp;
16753         char *db_array = temp;
16754         cgetent(&buf, &db_array, "vt100");
16755         cgetcap(buf, "tc", '=');
16756         cgetmatch(buf, "tc");
16757
16758   ;
16759   return 0;
16760 }
16761 _ACEOF
16762 rm -f conftest.$ac_objext conftest$ac_exeext
16763 if { (eval echo "$as_me:16763: \"$ac_link\"") >&5
16764   (eval $ac_link) 2>&5
16765   ac_status=$?
16766   echo "$as_me:16766: \$? = $ac_status" >&5
16767   (exit $ac_status); } &&
16768          { ac_try='test -s conftest$ac_exeext'
16769   { (eval echo "$as_me:16769: \"$ac_try\"") >&5
16770   (eval $ac_try) 2>&5
16771   ac_status=$?
16772   echo "$as_me:16772: \$? = $ac_status" >&5
16773   (exit $ac_status); }; }; then
16774   cf_cv_cgetent=yes
16775 else
16776   echo "$as_me: failed program was:" >&5
16777 cat conftest.$ac_ext >&5
16778 cf_cv_cgetent=no
16779 fi
16780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16781
16782 fi
16783 echo "$as_me:16783: result: $cf_cv_cgetent" >&5
16784 echo "${ECHO_T}$cf_cv_cgetent" >&6
16785
16786 if test "$cf_cv_cgetent" = yes
16787 then
16788
16789 cat >>confdefs.h <<\EOF
16790 #define HAVE_BSD_CGETENT 1
16791 EOF
16792
16793 echo "$as_me:16793: checking if cgetent uses const parameter" >&5
16794 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16795 if test "${cf_cv_cgetent_const+set}" = set; then
16796   echo $ECHO_N "(cached) $ECHO_C" >&6
16797 else
16798
16799 cat >conftest.$ac_ext <<_ACEOF
16800 #line 16800 "configure"
16801 #include "confdefs.h"
16802
16803 #include <stdlib.h>
16804 int
16805 main ()
16806 {
16807
16808         char temp[128];
16809         char *buf = temp;
16810 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16811         const char *db_array = temp;
16812         cgetent(&buf, &db_array, "vt100");
16813 #endif
16814         cgetcap(buf, "tc", '=');
16815         cgetmatch(buf, "tc");
16816
16817   ;
16818   return 0;
16819 }
16820 _ACEOF
16821 rm -f conftest.$ac_objext conftest$ac_exeext
16822 if { (eval echo "$as_me:16822: \"$ac_link\"") >&5
16823   (eval $ac_link) 2>&5
16824   ac_status=$?
16825   echo "$as_me:16825: \$? = $ac_status" >&5
16826   (exit $ac_status); } &&
16827          { ac_try='test -s conftest$ac_exeext'
16828   { (eval echo "$as_me:16828: \"$ac_try\"") >&5
16829   (eval $ac_try) 2>&5
16830   ac_status=$?
16831   echo "$as_me:16831: \$? = $ac_status" >&5
16832   (exit $ac_status); }; }; then
16833   cf_cv_cgetent_const=yes
16834 else
16835   echo "$as_me: failed program was:" >&5
16836 cat conftest.$ac_ext >&5
16837 cf_cv_cgetent_const=no
16838 fi
16839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16840
16841 fi
16842 echo "$as_me:16842: result: $cf_cv_cgetent_const" >&5
16843 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16844         if test "$cf_cv_cgetent_const" = yes
16845         then
16846
16847 cat >>confdefs.h <<EOF
16848 #define CGETENT_CONST const
16849 EOF
16850
16851         fi
16852 fi
16853
16854 fi
16855
16856 echo "$as_me:16856: checking for isascii" >&5
16857 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16858 if test "${cf_cv_have_isascii+set}" = set; then
16859   echo $ECHO_N "(cached) $ECHO_C" >&6
16860 else
16861
16862         cat >conftest.$ac_ext <<_ACEOF
16863 #line 16863 "configure"
16864 #include "confdefs.h"
16865 #include <ctype.h>
16866 int
16867 main ()
16868 {
16869 int x = isascii(' ')
16870   ;
16871   return 0;
16872 }
16873 _ACEOF
16874 rm -f conftest.$ac_objext conftest$ac_exeext
16875 if { (eval echo "$as_me:16875: \"$ac_link\"") >&5
16876   (eval $ac_link) 2>&5
16877   ac_status=$?
16878   echo "$as_me:16878: \$? = $ac_status" >&5
16879   (exit $ac_status); } &&
16880          { ac_try='test -s conftest$ac_exeext'
16881   { (eval echo "$as_me:16881: \"$ac_try\"") >&5
16882   (eval $ac_try) 2>&5
16883   ac_status=$?
16884   echo "$as_me:16884: \$? = $ac_status" >&5
16885   (exit $ac_status); }; }; then
16886   cf_cv_have_isascii=yes
16887 else
16888   echo "$as_me: failed program was:" >&5
16889 cat conftest.$ac_ext >&5
16890 cf_cv_have_isascii=no
16891 fi
16892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16893
16894 fi
16895 echo "$as_me:16895: result: $cf_cv_have_isascii" >&5
16896 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16897 test "$cf_cv_have_isascii" = yes &&
16898 cat >>confdefs.h <<\EOF
16899 #define HAVE_ISASCII 1
16900 EOF
16901
16902 if test "$ac_cv_func_sigaction" = yes; then
16903 echo "$as_me:16903: checking whether sigaction needs _POSIX_SOURCE" >&5
16904 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16905 cat >conftest.$ac_ext <<_ACEOF
16906 #line 16906 "configure"
16907 #include "confdefs.h"
16908
16909 #include <sys/types.h>
16910 #include <signal.h>
16911 int
16912 main ()
16913 {
16914 struct sigaction act
16915   ;
16916   return 0;
16917 }
16918 _ACEOF
16919 rm -f conftest.$ac_objext
16920 if { (eval echo "$as_me:16920: \"$ac_compile\"") >&5
16921   (eval $ac_compile) 2>&5
16922   ac_status=$?
16923   echo "$as_me:16923: \$? = $ac_status" >&5
16924   (exit $ac_status); } &&
16925          { ac_try='test -s conftest.$ac_objext'
16926   { (eval echo "$as_me:16926: \"$ac_try\"") >&5
16927   (eval $ac_try) 2>&5
16928   ac_status=$?
16929   echo "$as_me:16929: \$? = $ac_status" >&5
16930   (exit $ac_status); }; }; then
16931   sigact_bad=no
16932 else
16933   echo "$as_me: failed program was:" >&5
16934 cat conftest.$ac_ext >&5
16935
16936 cat >conftest.$ac_ext <<_ACEOF
16937 #line 16937 "configure"
16938 #include "confdefs.h"
16939
16940 #define _POSIX_SOURCE
16941 #include <sys/types.h>
16942 #include <signal.h>
16943 int
16944 main ()
16945 {
16946 struct sigaction act
16947   ;
16948   return 0;
16949 }
16950 _ACEOF
16951 rm -f conftest.$ac_objext
16952 if { (eval echo "$as_me:16952: \"$ac_compile\"") >&5
16953   (eval $ac_compile) 2>&5
16954   ac_status=$?
16955   echo "$as_me:16955: \$? = $ac_status" >&5
16956   (exit $ac_status); } &&
16957          { ac_try='test -s conftest.$ac_objext'
16958   { (eval echo "$as_me:16958: \"$ac_try\"") >&5
16959   (eval $ac_try) 2>&5
16960   ac_status=$?
16961   echo "$as_me:16961: \$? = $ac_status" >&5
16962   (exit $ac_status); }; }; then
16963   sigact_bad=yes
16964
16965 cat >>confdefs.h <<\EOF
16966 #define _POSIX_SOURCE 1
16967 EOF
16968
16969 else
16970   echo "$as_me: failed program was:" >&5
16971 cat conftest.$ac_ext >&5
16972 sigact_bad=unknown
16973 fi
16974 rm -f conftest.$ac_objext conftest.$ac_ext
16975 fi
16976 rm -f conftest.$ac_objext conftest.$ac_ext
16977 echo "$as_me:16977: result: $sigact_bad" >&5
16978 echo "${ECHO_T}$sigact_bad" >&6
16979 fi
16980
16981 echo "$as_me:16981: checking if nanosleep really works" >&5
16982 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16983 if test "${cf_cv_func_nanosleep+set}" = set; then
16984   echo $ECHO_N "(cached) $ECHO_C" >&6
16985 else
16986
16987 if test "$cross_compiling" = yes; then
16988   cf_cv_func_nanosleep=unknown
16989 else
16990   cat >conftest.$ac_ext <<_ACEOF
16991 #line 16991 "configure"
16992 #include "confdefs.h"
16993
16994 #include <stdio.h>
16995 #include <errno.h>
16996 #include <time.h>
16997
16998 #ifdef HAVE_SYS_TIME_H
16999 #include <sys/time.h>
17000 #endif
17001
17002 int main() {
17003         struct timespec ts1, ts2;
17004         int code;
17005         ts1.tv_sec  = 0;
17006         ts1.tv_nsec = 750000000;
17007         ts2.tv_sec  = 0;
17008         ts2.tv_nsec = 0;
17009         errno = 0;
17010         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17011         ${cf_cv_main_return:-return}(code != 0);
17012 }
17013
17014 _ACEOF
17015 rm -f conftest$ac_exeext
17016 if { (eval echo "$as_me:17016: \"$ac_link\"") >&5
17017   (eval $ac_link) 2>&5
17018   ac_status=$?
17019   echo "$as_me:17019: \$? = $ac_status" >&5
17020   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17021   { (eval echo "$as_me:17021: \"$ac_try\"") >&5
17022   (eval $ac_try) 2>&5
17023   ac_status=$?
17024   echo "$as_me:17024: \$? = $ac_status" >&5
17025   (exit $ac_status); }; }; then
17026   cf_cv_func_nanosleep=yes
17027 else
17028   echo "$as_me: program exited with status $ac_status" >&5
17029 echo "$as_me: failed program was:" >&5
17030 cat conftest.$ac_ext >&5
17031 cf_cv_func_nanosleep=no
17032 fi
17033 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17034 fi
17035 fi
17036 echo "$as_me:17036: result: $cf_cv_func_nanosleep" >&5
17037 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17038
17039 test "$cf_cv_func_nanosleep" = "yes" &&
17040 cat >>confdefs.h <<\EOF
17041 #define HAVE_NANOSLEEP 1
17042 EOF
17043
17044 for ac_header in \
17045 termio.h \
17046 termios.h \
17047 unistd.h \
17048
17049 do
17050 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17051 echo "$as_me:17051: checking for $ac_header" >&5
17052 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17053 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17054   echo $ECHO_N "(cached) $ECHO_C" >&6
17055 else
17056   cat >conftest.$ac_ext <<_ACEOF
17057 #line 17057 "configure"
17058 #include "confdefs.h"
17059 #include <$ac_header>
17060 _ACEOF
17061 if { (eval echo "$as_me:17061: \"$ac_cpp conftest.$ac_ext\"") >&5
17062   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17063   ac_status=$?
17064   egrep -v '^ *\+' conftest.er1 >conftest.err
17065   rm -f conftest.er1
17066   cat conftest.err >&5
17067   echo "$as_me:17067: \$? = $ac_status" >&5
17068   (exit $ac_status); } >/dev/null; then
17069   if test -s conftest.err; then
17070     ac_cpp_err=$ac_c_preproc_warn_flag
17071   else
17072     ac_cpp_err=
17073   fi
17074 else
17075   ac_cpp_err=yes
17076 fi
17077 if test -z "$ac_cpp_err"; then
17078   eval "$as_ac_Header=yes"
17079 else
17080   echo "$as_me: failed program was:" >&5
17081   cat conftest.$ac_ext >&5
17082   eval "$as_ac_Header=no"
17083 fi
17084 rm -f conftest.err conftest.$ac_ext
17085 fi
17086 echo "$as_me:17086: result: `eval echo '${'$as_ac_Header'}'`" >&5
17087 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17088 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17089   cat >>confdefs.h <<EOF
17090 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17091 EOF
17092
17093 fi
17094 done
17095
17096 if test "$ISC" = yes ; then
17097
17098 for ac_header in sys/termio.h
17099 do
17100 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17101 echo "$as_me:17101: checking for $ac_header" >&5
17102 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17103 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17104   echo $ECHO_N "(cached) $ECHO_C" >&6
17105 else
17106   cat >conftest.$ac_ext <<_ACEOF
17107 #line 17107 "configure"
17108 #include "confdefs.h"
17109 #include <$ac_header>
17110 _ACEOF
17111 if { (eval echo "$as_me:17111: \"$ac_cpp conftest.$ac_ext\"") >&5
17112   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17113   ac_status=$?
17114   egrep -v '^ *\+' conftest.er1 >conftest.err
17115   rm -f conftest.er1
17116   cat conftest.err >&5
17117   echo "$as_me:17117: \$? = $ac_status" >&5
17118   (exit $ac_status); } >/dev/null; then
17119   if test -s conftest.err; then
17120     ac_cpp_err=$ac_c_preproc_warn_flag
17121   else
17122     ac_cpp_err=
17123   fi
17124 else
17125   ac_cpp_err=yes
17126 fi
17127 if test -z "$ac_cpp_err"; then
17128   eval "$as_ac_Header=yes"
17129 else
17130   echo "$as_me: failed program was:" >&5
17131   cat conftest.$ac_ext >&5
17132   eval "$as_ac_Header=no"
17133 fi
17134 rm -f conftest.err conftest.$ac_ext
17135 fi
17136 echo "$as_me:17136: result: `eval echo '${'$as_ac_Header'}'`" >&5
17137 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17138 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17139   cat >>confdefs.h <<EOF
17140 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17141 EOF
17142
17143 fi
17144 done
17145
17146 fi
17147 if test "$ac_cv_header_termios_h" = yes ; then
17148         case "$CFLAGS $CPPFLAGS" in
17149         (*-D_POSIX_SOURCE*)
17150                 termios_bad=dunno ;;
17151         (*)     termios_bad=maybe ;;
17152         esac
17153         if test "$termios_bad" = maybe ; then
17154         echo "$as_me:17154: checking whether termios.h needs _POSIX_SOURCE" >&5
17155 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17156         cat >conftest.$ac_ext <<_ACEOF
17157 #line 17157 "configure"
17158 #include "confdefs.h"
17159 #include <termios.h>
17160 int
17161 main ()
17162 {
17163 struct termios foo; int x = foo.c_iflag
17164   ;
17165   return 0;
17166 }
17167 _ACEOF
17168 rm -f conftest.$ac_objext
17169 if { (eval echo "$as_me:17169: \"$ac_compile\"") >&5
17170   (eval $ac_compile) 2>&5
17171   ac_status=$?
17172   echo "$as_me:17172: \$? = $ac_status" >&5
17173   (exit $ac_status); } &&
17174          { ac_try='test -s conftest.$ac_objext'
17175   { (eval echo "$as_me:17175: \"$ac_try\"") >&5
17176   (eval $ac_try) 2>&5
17177   ac_status=$?
17178   echo "$as_me:17178: \$? = $ac_status" >&5
17179   (exit $ac_status); }; }; then
17180   termios_bad=no
17181 else
17182   echo "$as_me: failed program was:" >&5
17183 cat conftest.$ac_ext >&5
17184
17185                 cat >conftest.$ac_ext <<_ACEOF
17186 #line 17186 "configure"
17187 #include "confdefs.h"
17188
17189 #define _POSIX_SOURCE
17190 #include <termios.h>
17191 int
17192 main ()
17193 {
17194 struct termios foo; int x = foo.c_iflag
17195   ;
17196   return 0;
17197 }
17198 _ACEOF
17199 rm -f conftest.$ac_objext
17200 if { (eval echo "$as_me:17200: \"$ac_compile\"") >&5
17201   (eval $ac_compile) 2>&5
17202   ac_status=$?
17203   echo "$as_me:17203: \$? = $ac_status" >&5
17204   (exit $ac_status); } &&
17205          { ac_try='test -s conftest.$ac_objext'
17206   { (eval echo "$as_me:17206: \"$ac_try\"") >&5
17207   (eval $ac_try) 2>&5
17208   ac_status=$?
17209   echo "$as_me:17209: \$? = $ac_status" >&5
17210   (exit $ac_status); }; }; then
17211   termios_bad=unknown
17212 else
17213   echo "$as_me: failed program was:" >&5
17214 cat conftest.$ac_ext >&5
17215 termios_bad=yes
17216 cat >>confdefs.h <<\EOF
17217 #define _POSIX_SOURCE 1
17218 EOF
17219
17220 fi
17221 rm -f conftest.$ac_objext conftest.$ac_ext
17222
17223 fi
17224 rm -f conftest.$ac_objext conftest.$ac_ext
17225         echo "$as_me:17225: result: $termios_bad" >&5
17226 echo "${ECHO_T}$termios_bad" >&6
17227         fi
17228 fi
17229
17230 echo "$as_me:17230: checking for tcgetattr" >&5
17231 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17232 if test "${cf_cv_have_tcgetattr+set}" = set; then
17233   echo $ECHO_N "(cached) $ECHO_C" >&6
17234 else
17235
17236 cat >conftest.$ac_ext <<_ACEOF
17237 #line 17237 "configure"
17238 #include "confdefs.h"
17239
17240 #include <sys/types.h>
17241 #ifdef HAVE_UNISTD_H
17242 #include <unistd.h>
17243 #endif
17244 #ifdef HAVE_TERMIOS_H
17245 #include <termios.h>
17246 #define TTY struct termios
17247 #else
17248 #ifdef HAVE_TERMIO_H
17249 #include <termio.h>
17250 #define TTY struct termio
17251 #endif
17252 #endif
17253
17254 int
17255 main ()
17256 {
17257
17258 TTY foo;
17259 tcgetattr(1, &foo);
17260   ;
17261   return 0;
17262 }
17263 _ACEOF
17264 rm -f conftest.$ac_objext conftest$ac_exeext
17265 if { (eval echo "$as_me:17265: \"$ac_link\"") >&5
17266   (eval $ac_link) 2>&5
17267   ac_status=$?
17268   echo "$as_me:17268: \$? = $ac_status" >&5
17269   (exit $ac_status); } &&
17270          { ac_try='test -s conftest$ac_exeext'
17271   { (eval echo "$as_me:17271: \"$ac_try\"") >&5
17272   (eval $ac_try) 2>&5
17273   ac_status=$?
17274   echo "$as_me:17274: \$? = $ac_status" >&5
17275   (exit $ac_status); }; }; then
17276   cf_cv_have_tcgetattr=yes
17277 else
17278   echo "$as_me: failed program was:" >&5
17279 cat conftest.$ac_ext >&5
17280 cf_cv_have_tcgetattr=no
17281 fi
17282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17283 fi
17284 echo "$as_me:17284: result: $cf_cv_have_tcgetattr" >&5
17285 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17286 test "$cf_cv_have_tcgetattr" = yes &&
17287 cat >>confdefs.h <<\EOF
17288 #define HAVE_TCGETATTR 1
17289 EOF
17290
17291 echo "$as_me:17291: checking for vsscanf function or workaround" >&5
17292 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17293 if test "${cf_cv_func_vsscanf+set}" = set; then
17294   echo $ECHO_N "(cached) $ECHO_C" >&6
17295 else
17296
17297 cat >conftest.$ac_ext <<_ACEOF
17298 #line 17298 "configure"
17299 #include "confdefs.h"
17300
17301 #include <stdarg.h>
17302 #include <stdio.h>
17303 int
17304 main ()
17305 {
17306
17307         va_list ap;
17308         vsscanf("from", "%d", ap)
17309   ;
17310   return 0;
17311 }
17312 _ACEOF
17313 rm -f conftest.$ac_objext conftest$ac_exeext
17314 if { (eval echo "$as_me:17314: \"$ac_link\"") >&5
17315   (eval $ac_link) 2>&5
17316   ac_status=$?
17317   echo "$as_me:17317: \$? = $ac_status" >&5
17318   (exit $ac_status); } &&
17319          { ac_try='test -s conftest$ac_exeext'
17320   { (eval echo "$as_me:17320: \"$ac_try\"") >&5
17321   (eval $ac_try) 2>&5
17322   ac_status=$?
17323   echo "$as_me:17323: \$? = $ac_status" >&5
17324   (exit $ac_status); }; }; then
17325   cf_cv_func_vsscanf=vsscanf
17326 else
17327   echo "$as_me: failed program was:" >&5
17328 cat conftest.$ac_ext >&5
17329
17330 cat >conftest.$ac_ext <<_ACEOF
17331 #line 17331 "configure"
17332 #include "confdefs.h"
17333
17334 #include <stdarg.h>
17335 #include <stdio.h>
17336 int
17337 main ()
17338 {
17339
17340         FILE strbuf;
17341         char *str = "from";
17342
17343         strbuf._flag = _IOREAD;
17344         strbuf._ptr = strbuf._base = (unsigned char *) str;
17345         strbuf._cnt = strlen(str);
17346         strbuf._file = _NFILE;
17347         return (vfscanf(&strbuf, "%d", ap))
17348   ;
17349   return 0;
17350 }
17351 _ACEOF
17352 rm -f conftest.$ac_objext conftest$ac_exeext
17353 if { (eval echo "$as_me:17353: \"$ac_link\"") >&5
17354   (eval $ac_link) 2>&5
17355   ac_status=$?
17356   echo "$as_me:17356: \$? = $ac_status" >&5
17357   (exit $ac_status); } &&
17358          { ac_try='test -s conftest$ac_exeext'
17359   { (eval echo "$as_me:17359: \"$ac_try\"") >&5
17360   (eval $ac_try) 2>&5
17361   ac_status=$?
17362   echo "$as_me:17362: \$? = $ac_status" >&5
17363   (exit $ac_status); }; }; then
17364   cf_cv_func_vsscanf=vfscanf
17365 else
17366   echo "$as_me: failed program was:" >&5
17367 cat conftest.$ac_ext >&5
17368
17369 cat >conftest.$ac_ext <<_ACEOF
17370 #line 17370 "configure"
17371 #include "confdefs.h"
17372
17373 #include <stdarg.h>
17374 #include <stdio.h>
17375 int
17376 main ()
17377 {
17378
17379         FILE strbuf;
17380         char *str = "from";
17381
17382         strbuf._flag = _IOREAD;
17383         strbuf._ptr = strbuf._base = (unsigned char *) str;
17384         strbuf._cnt = strlen(str);
17385         strbuf._file = _NFILE;
17386         return (_doscan(&strbuf, "%d", ap))
17387   ;
17388   return 0;
17389 }
17390 _ACEOF
17391 rm -f conftest.$ac_objext conftest$ac_exeext
17392 if { (eval echo "$as_me:17392: \"$ac_link\"") >&5
17393   (eval $ac_link) 2>&5
17394   ac_status=$?
17395   echo "$as_me:17395: \$? = $ac_status" >&5
17396   (exit $ac_status); } &&
17397          { ac_try='test -s conftest$ac_exeext'
17398   { (eval echo "$as_me:17398: \"$ac_try\"") >&5
17399   (eval $ac_try) 2>&5
17400   ac_status=$?
17401   echo "$as_me:17401: \$? = $ac_status" >&5
17402   (exit $ac_status); }; }; then
17403   cf_cv_func_vsscanf=_doscan
17404 else
17405   echo "$as_me: failed program was:" >&5
17406 cat conftest.$ac_ext >&5
17407
17408 cf_cv_func_vsscanf=no
17409 fi
17410 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17411 fi
17412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17413 fi
17414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17415 fi
17416 echo "$as_me:17416: result: $cf_cv_func_vsscanf" >&5
17417 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17418
17419 case $cf_cv_func_vsscanf in
17420 (vsscanf)
17421 cat >>confdefs.h <<\EOF
17422 #define HAVE_VSSCANF 1
17423 EOF
17424 ;;
17425 (vfscanf)
17426 cat >>confdefs.h <<\EOF
17427 #define HAVE_VFSCANF 1
17428 EOF
17429 ;;
17430 (_doscan)
17431 cat >>confdefs.h <<\EOF
17432 #define HAVE__DOSCAN 1
17433 EOF
17434 ;;
17435 esac
17436
17437 echo "$as_me:17437: checking for working mkstemp" >&5
17438 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17439 if test "${cf_cv_func_mkstemp+set}" = set; then
17440   echo $ECHO_N "(cached) $ECHO_C" >&6
17441 else
17442
17443 rm -rf conftest*
17444 if test "$cross_compiling" = yes; then
17445   cf_cv_func_mkstemp=maybe
17446 else
17447   cat >conftest.$ac_ext <<_ACEOF
17448 #line 17448 "configure"
17449 #include "confdefs.h"
17450
17451 #include <sys/types.h>
17452 #include <stdlib.h>
17453 #include <stdio.h>
17454 #include <string.h>
17455 #include <sys/stat.h>
17456 int main()
17457 {
17458         char *tmpl = "conftestXXXXXX";
17459         char name[2][80];
17460         int n;
17461         int result = 0;
17462         int fd;
17463         struct stat sb;
17464
17465         umask(077);
17466         for (n = 0; n < 2; ++n) {
17467                 strcpy(name[n], tmpl);
17468                 if ((fd = mkstemp(name[n])) >= 0) {
17469                         if (!strcmp(name[n], tmpl)
17470                          || stat(name[n], &sb) != 0
17471                          || (sb.st_mode & S_IFMT) != S_IFREG
17472                          || (sb.st_mode & 077) != 0) {
17473                                 result = 1;
17474                         }
17475                         close(fd);
17476                 }
17477         }
17478         if (result == 0
17479          && !strcmp(name[0], name[1]))
17480                 result = 1;
17481         ${cf_cv_main_return:-return}(result);
17482 }
17483
17484 _ACEOF
17485 rm -f conftest$ac_exeext
17486 if { (eval echo "$as_me:17486: \"$ac_link\"") >&5
17487   (eval $ac_link) 2>&5
17488   ac_status=$?
17489   echo "$as_me:17489: \$? = $ac_status" >&5
17490   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17491   { (eval echo "$as_me:17491: \"$ac_try\"") >&5
17492   (eval $ac_try) 2>&5
17493   ac_status=$?
17494   echo "$as_me:17494: \$? = $ac_status" >&5
17495   (exit $ac_status); }; }; then
17496   cf_cv_func_mkstemp=yes
17497
17498 else
17499   echo "$as_me: program exited with status $ac_status" >&5
17500 echo "$as_me: failed program was:" >&5
17501 cat conftest.$ac_ext >&5
17502 cf_cv_func_mkstemp=no
17503
17504 fi
17505 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17506 fi
17507
17508 fi
17509 echo "$as_me:17509: result: $cf_cv_func_mkstemp" >&5
17510 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17511 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17512         echo "$as_me:17512: checking for mkstemp" >&5
17513 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17514 if test "${ac_cv_func_mkstemp+set}" = set; then
17515   echo $ECHO_N "(cached) $ECHO_C" >&6
17516 else
17517   cat >conftest.$ac_ext <<_ACEOF
17518 #line 17518 "configure"
17519 #include "confdefs.h"
17520 /* System header to define __stub macros and hopefully few prototypes,
17521     which can conflict with char mkstemp (); below.  */
17522 #include <assert.h>
17523 /* Override any gcc2 internal prototype to avoid an error.  */
17524 #ifdef __cplusplus
17525 extern "C"
17526 #endif
17527 /* We use char because int might match the return type of a gcc2
17528    builtin and then its argument prototype would still apply.  */
17529 char mkstemp ();
17530 char (*f) ();
17531
17532 int
17533 main ()
17534 {
17535 /* The GNU C library defines this for functions which it implements
17536     to always fail with ENOSYS.  Some functions are actually named
17537     something starting with __ and the normal name is an alias.  */
17538 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17539 choke me
17540 #else
17541 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17542 #endif
17543
17544   ;
17545   return 0;
17546 }
17547 _ACEOF
17548 rm -f conftest.$ac_objext conftest$ac_exeext
17549 if { (eval echo "$as_me:17549: \"$ac_link\"") >&5
17550   (eval $ac_link) 2>&5
17551   ac_status=$?
17552   echo "$as_me:17552: \$? = $ac_status" >&5
17553   (exit $ac_status); } &&
17554          { ac_try='test -s conftest$ac_exeext'
17555   { (eval echo "$as_me:17555: \"$ac_try\"") >&5
17556   (eval $ac_try) 2>&5
17557   ac_status=$?
17558   echo "$as_me:17558: \$? = $ac_status" >&5
17559   (exit $ac_status); }; }; then
17560   ac_cv_func_mkstemp=yes
17561 else
17562   echo "$as_me: failed program was:" >&5
17563 cat conftest.$ac_ext >&5
17564 ac_cv_func_mkstemp=no
17565 fi
17566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17567 fi
17568 echo "$as_me:17568: result: $ac_cv_func_mkstemp" >&5
17569 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17570
17571 fi
17572 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17573
17574 cat >>confdefs.h <<\EOF
17575 #define HAVE_MKSTEMP 1
17576 EOF
17577
17578 fi
17579
17580 # setup for prototype of fallback for vsscanf()
17581
17582 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17583         HAVE_VSSCANF=1
17584 else
17585         HAVE_VSSCANF=0
17586 fi
17587
17588 if test "x$cross_compiling" = xyes ; then
17589         { echo "$as_me:17589: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17590 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17591 else
17592         echo "$as_me:17592: checking whether setvbuf arguments are reversed" >&5
17593 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17594 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17595   echo $ECHO_N "(cached) $ECHO_C" >&6
17596 else
17597   if test "$cross_compiling" = yes; then
17598   { { echo "$as_me:17598: error: cannot run test program while cross compiling" >&5
17599 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17600    { (exit 1); exit 1; }; }
17601 else
17602   cat >conftest.$ac_ext <<_ACEOF
17603 #line 17603 "configure"
17604 #include "confdefs.h"
17605 #include <stdio.h>
17606 /* If setvbuf has the reversed format, exit 0. */
17607 int
17608 main ()
17609 {
17610   /* This call has the arguments reversed.
17611      A reversed system may check and see that the address of main
17612      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17613   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17614     $ac_main_return(1);
17615   putc('\r', stdout);
17616   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17617 }
17618 _ACEOF
17619 rm -f conftest$ac_exeext
17620 if { (eval echo "$as_me:17620: \"$ac_link\"") >&5
17621   (eval $ac_link) 2>&5
17622   ac_status=$?
17623   echo "$as_me:17623: \$? = $ac_status" >&5
17624   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17625   { (eval echo "$as_me:17625: \"$ac_try\"") >&5
17626   (eval $ac_try) 2>&5
17627   ac_status=$?
17628   echo "$as_me:17628: \$? = $ac_status" >&5
17629   (exit $ac_status); }; }; then
17630   ac_cv_func_setvbuf_reversed=yes
17631 else
17632   echo "$as_me: program exited with status $ac_status" >&5
17633 echo "$as_me: failed program was:" >&5
17634 cat conftest.$ac_ext >&5
17635 ac_cv_func_setvbuf_reversed=no
17636 fi
17637 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17638 fi
17639 rm -f core core.* *.core
17640 fi
17641 echo "$as_me:17641: result: $ac_cv_func_setvbuf_reversed" >&5
17642 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17643 if test $ac_cv_func_setvbuf_reversed = yes; then
17644
17645 cat >>confdefs.h <<\EOF
17646 #define SETVBUF_REVERSED 1
17647 EOF
17648
17649 fi
17650
17651 fi
17652 echo "$as_me:17652: checking for intptr_t" >&5
17653 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17654 if test "${ac_cv_type_intptr_t+set}" = set; then
17655   echo $ECHO_N "(cached) $ECHO_C" >&6
17656 else
17657   cat >conftest.$ac_ext <<_ACEOF
17658 #line 17658 "configure"
17659 #include "confdefs.h"
17660 $ac_includes_default
17661 int
17662 main ()
17663 {
17664 if ((intptr_t *) 0)
17665   return 0;
17666 if (sizeof (intptr_t))
17667   return 0;
17668   ;
17669   return 0;
17670 }
17671 _ACEOF
17672 rm -f conftest.$ac_objext
17673 if { (eval echo "$as_me:17673: \"$ac_compile\"") >&5
17674   (eval $ac_compile) 2>&5
17675   ac_status=$?
17676   echo "$as_me:17676: \$? = $ac_status" >&5
17677   (exit $ac_status); } &&
17678          { ac_try='test -s conftest.$ac_objext'
17679   { (eval echo "$as_me:17679: \"$ac_try\"") >&5
17680   (eval $ac_try) 2>&5
17681   ac_status=$?
17682   echo "$as_me:17682: \$? = $ac_status" >&5
17683   (exit $ac_status); }; }; then
17684   ac_cv_type_intptr_t=yes
17685 else
17686   echo "$as_me: failed program was:" >&5
17687 cat conftest.$ac_ext >&5
17688 ac_cv_type_intptr_t=no
17689 fi
17690 rm -f conftest.$ac_objext conftest.$ac_ext
17691 fi
17692 echo "$as_me:17692: result: $ac_cv_type_intptr_t" >&5
17693 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17694 if test $ac_cv_type_intptr_t = yes; then
17695   :
17696 else
17697
17698 cat >>confdefs.h <<EOF
17699 #define intptr_t long
17700 EOF
17701
17702 fi
17703
17704 echo "$as_me:17704: checking for ssize_t" >&5
17705 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17706 if test "${ac_cv_type_ssize_t+set}" = set; then
17707   echo $ECHO_N "(cached) $ECHO_C" >&6
17708 else
17709   cat >conftest.$ac_ext <<_ACEOF
17710 #line 17710 "configure"
17711 #include "confdefs.h"
17712 $ac_includes_default
17713 int
17714 main ()
17715 {
17716 if ((ssize_t *) 0)
17717   return 0;
17718 if (sizeof (ssize_t))
17719   return 0;
17720   ;
17721   return 0;
17722 }
17723 _ACEOF
17724 rm -f conftest.$ac_objext
17725 if { (eval echo "$as_me:17725: \"$ac_compile\"") >&5
17726   (eval $ac_compile) 2>&5
17727   ac_status=$?
17728   echo "$as_me:17728: \$? = $ac_status" >&5
17729   (exit $ac_status); } &&
17730          { ac_try='test -s conftest.$ac_objext'
17731   { (eval echo "$as_me:17731: \"$ac_try\"") >&5
17732   (eval $ac_try) 2>&5
17733   ac_status=$?
17734   echo "$as_me:17734: \$? = $ac_status" >&5
17735   (exit $ac_status); }; }; then
17736   ac_cv_type_ssize_t=yes
17737 else
17738   echo "$as_me: failed program was:" >&5
17739 cat conftest.$ac_ext >&5
17740 ac_cv_type_ssize_t=no
17741 fi
17742 rm -f conftest.$ac_objext conftest.$ac_ext
17743 fi
17744 echo "$as_me:17744: result: $ac_cv_type_ssize_t" >&5
17745 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17746 if test $ac_cv_type_ssize_t = yes; then
17747   :
17748 else
17749
17750 cat >>confdefs.h <<EOF
17751 #define ssize_t int
17752 EOF
17753
17754 fi
17755
17756 echo "$as_me:17756: checking for type sigaction_t" >&5
17757 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17758 if test "${cf_cv_type_sigaction+set}" = set; then
17759   echo $ECHO_N "(cached) $ECHO_C" >&6
17760 else
17761
17762         cat >conftest.$ac_ext <<_ACEOF
17763 #line 17763 "configure"
17764 #include "confdefs.h"
17765
17766 #include <signal.h>
17767 int
17768 main ()
17769 {
17770 sigaction_t x
17771   ;
17772   return 0;
17773 }
17774 _ACEOF
17775 rm -f conftest.$ac_objext
17776 if { (eval echo "$as_me:17776: \"$ac_compile\"") >&5
17777   (eval $ac_compile) 2>&5
17778   ac_status=$?
17779   echo "$as_me:17779: \$? = $ac_status" >&5
17780   (exit $ac_status); } &&
17781          { ac_try='test -s conftest.$ac_objext'
17782   { (eval echo "$as_me:17782: \"$ac_try\"") >&5
17783   (eval $ac_try) 2>&5
17784   ac_status=$?
17785   echo "$as_me:17785: \$? = $ac_status" >&5
17786   (exit $ac_status); }; }; then
17787   cf_cv_type_sigaction=yes
17788 else
17789   echo "$as_me: failed program was:" >&5
17790 cat conftest.$ac_ext >&5
17791 cf_cv_type_sigaction=no
17792 fi
17793 rm -f conftest.$ac_objext conftest.$ac_ext
17794 fi
17795
17796 echo "$as_me:17796: result: $cf_cv_type_sigaction" >&5
17797 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17798 test "$cf_cv_type_sigaction" = yes &&
17799 cat >>confdefs.h <<\EOF
17800 #define HAVE_TYPE_SIGACTION 1
17801 EOF
17802
17803 echo "$as_me:17803: checking declaration of size-change" >&5
17804 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17805 if test "${cf_cv_sizechange+set}" = set; then
17806   echo $ECHO_N "(cached) $ECHO_C" >&6
17807 else
17808
17809         cf_cv_sizechange=unknown
17810         cf_save_CPPFLAGS="$CPPFLAGS"
17811
17812 for cf_opts in "" "NEED_PTEM_H"
17813 do
17814
17815         CPPFLAGS="$cf_save_CPPFLAGS"
17816         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17817         cat >conftest.$ac_ext <<_ACEOF
17818 #line 17818 "configure"
17819 #include "confdefs.h"
17820 #include <sys/types.h>
17821 #ifdef HAVE_TERMIOS_H
17822 #include <termios.h>
17823 #else
17824 #ifdef HAVE_TERMIO_H
17825 #include <termio.h>
17826 #endif
17827 #endif
17828 #ifdef NEED_PTEM_H
17829 /* This is a workaround for SCO:  they neglected to define struct winsize in
17830  * termios.h -- it's only in termio.h and ptem.h
17831  */
17832 #include        <sys/stream.h>
17833 #include        <sys/ptem.h>
17834 #endif
17835 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17836 #include <sys/ioctl.h>
17837 #endif
17838
17839 int
17840 main ()
17841 {
17842
17843 #ifdef TIOCGSIZE
17844         struct ttysize win;     /* FIXME: what system is this? */
17845         int y = win.ts_lines;
17846         int x = win.ts_cols;
17847 #else
17848 #ifdef TIOCGWINSZ
17849         struct winsize win;
17850         int y = win.ws_row;
17851         int x = win.ws_col;
17852 #else
17853         no TIOCGSIZE or TIOCGWINSZ
17854 #endif /* TIOCGWINSZ */
17855 #endif /* TIOCGSIZE */
17856
17857   ;
17858   return 0;
17859 }
17860 _ACEOF
17861 rm -f conftest.$ac_objext
17862 if { (eval echo "$as_me:17862: \"$ac_compile\"") >&5
17863   (eval $ac_compile) 2>&5
17864   ac_status=$?
17865   echo "$as_me:17865: \$? = $ac_status" >&5
17866   (exit $ac_status); } &&
17867          { ac_try='test -s conftest.$ac_objext'
17868   { (eval echo "$as_me:17868: \"$ac_try\"") >&5
17869   (eval $ac_try) 2>&5
17870   ac_status=$?
17871   echo "$as_me:17871: \$? = $ac_status" >&5
17872   (exit $ac_status); }; }; then
17873   cf_cv_sizechange=yes
17874 else
17875   echo "$as_me: failed program was:" >&5
17876 cat conftest.$ac_ext >&5
17877 cf_cv_sizechange=no
17878 fi
17879 rm -f conftest.$ac_objext conftest.$ac_ext
17880
17881         CPPFLAGS="$cf_save_CPPFLAGS"
17882         if test "$cf_cv_sizechange" = yes ; then
17883                 echo "size-change succeeded ($cf_opts)" >&5
17884                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17885                 break
17886         fi
17887 done
17888
17889 fi
17890 echo "$as_me:17890: result: $cf_cv_sizechange" >&5
17891 echo "${ECHO_T}$cf_cv_sizechange" >&6
17892 if test "$cf_cv_sizechange" != no ; then
17893
17894 cat >>confdefs.h <<\EOF
17895 #define HAVE_SIZECHANGE 1
17896 EOF
17897
17898         case $cf_cv_sizechange in
17899         (NEED*)
17900                 cat >>confdefs.h <<EOF
17901 #define $cf_cv_sizechange  1
17902 EOF
17903
17904                 ;;
17905         esac
17906 fi
17907
17908 echo "$as_me:17908: checking for memmove" >&5
17909 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17910 if test "${ac_cv_func_memmove+set}" = set; then
17911   echo $ECHO_N "(cached) $ECHO_C" >&6
17912 else
17913   cat >conftest.$ac_ext <<_ACEOF
17914 #line 17914 "configure"
17915 #include "confdefs.h"
17916 /* System header to define __stub macros and hopefully few prototypes,
17917     which can conflict with char memmove (); below.  */
17918 #include <assert.h>
17919 /* Override any gcc2 internal prototype to avoid an error.  */
17920 #ifdef __cplusplus
17921 extern "C"
17922 #endif
17923 /* We use char because int might match the return type of a gcc2
17924    builtin and then its argument prototype would still apply.  */
17925 char memmove ();
17926 char (*f) ();
17927
17928 int
17929 main ()
17930 {
17931 /* The GNU C library defines this for functions which it implements
17932     to always fail with ENOSYS.  Some functions are actually named
17933     something starting with __ and the normal name is an alias.  */
17934 #if defined (__stub_memmove) || defined (__stub___memmove)
17935 choke me
17936 #else
17937 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17938 #endif
17939
17940   ;
17941   return 0;
17942 }
17943 _ACEOF
17944 rm -f conftest.$ac_objext conftest$ac_exeext
17945 if { (eval echo "$as_me:17945: \"$ac_link\"") >&5
17946   (eval $ac_link) 2>&5
17947   ac_status=$?
17948   echo "$as_me:17948: \$? = $ac_status" >&5
17949   (exit $ac_status); } &&
17950          { ac_try='test -s conftest$ac_exeext'
17951   { (eval echo "$as_me:17951: \"$ac_try\"") >&5
17952   (eval $ac_try) 2>&5
17953   ac_status=$?
17954   echo "$as_me:17954: \$? = $ac_status" >&5
17955   (exit $ac_status); }; }; then
17956   ac_cv_func_memmove=yes
17957 else
17958   echo "$as_me: failed program was:" >&5
17959 cat conftest.$ac_ext >&5
17960 ac_cv_func_memmove=no
17961 fi
17962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17963 fi
17964 echo "$as_me:17964: result: $ac_cv_func_memmove" >&5
17965 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17966 if test $ac_cv_func_memmove = yes; then
17967   :
17968 else
17969
17970 echo "$as_me:17970: checking for bcopy" >&5
17971 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17972 if test "${ac_cv_func_bcopy+set}" = set; then
17973   echo $ECHO_N "(cached) $ECHO_C" >&6
17974 else
17975   cat >conftest.$ac_ext <<_ACEOF
17976 #line 17976 "configure"
17977 #include "confdefs.h"
17978 /* System header to define __stub macros and hopefully few prototypes,
17979     which can conflict with char bcopy (); below.  */
17980 #include <assert.h>
17981 /* Override any gcc2 internal prototype to avoid an error.  */
17982 #ifdef __cplusplus
17983 extern "C"
17984 #endif
17985 /* We use char because int might match the return type of a gcc2
17986    builtin and then its argument prototype would still apply.  */
17987 char bcopy ();
17988 char (*f) ();
17989
17990 int
17991 main ()
17992 {
17993 /* The GNU C library defines this for functions which it implements
17994     to always fail with ENOSYS.  Some functions are actually named
17995     something starting with __ and the normal name is an alias.  */
17996 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17997 choke me
17998 #else
17999 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18000 #endif
18001
18002   ;
18003   return 0;
18004 }
18005 _ACEOF
18006 rm -f conftest.$ac_objext conftest$ac_exeext
18007 if { (eval echo "$as_me:18007: \"$ac_link\"") >&5
18008   (eval $ac_link) 2>&5
18009   ac_status=$?
18010   echo "$as_me:18010: \$? = $ac_status" >&5
18011   (exit $ac_status); } &&
18012          { ac_try='test -s conftest$ac_exeext'
18013   { (eval echo "$as_me:18013: \"$ac_try\"") >&5
18014   (eval $ac_try) 2>&5
18015   ac_status=$?
18016   echo "$as_me:18016: \$? = $ac_status" >&5
18017   (exit $ac_status); }; }; then
18018   ac_cv_func_bcopy=yes
18019 else
18020   echo "$as_me: failed program was:" >&5
18021 cat conftest.$ac_ext >&5
18022 ac_cv_func_bcopy=no
18023 fi
18024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18025 fi
18026 echo "$as_me:18026: result: $ac_cv_func_bcopy" >&5
18027 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18028 if test $ac_cv_func_bcopy = yes; then
18029
18030         echo "$as_me:18030: checking if bcopy does overlapping moves" >&5
18031 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18032 if test "${cf_cv_good_bcopy+set}" = set; then
18033   echo $ECHO_N "(cached) $ECHO_C" >&6
18034 else
18035
18036                 if test "$cross_compiling" = yes; then
18037   cf_cv_good_bcopy=unknown
18038 else
18039   cat >conftest.$ac_ext <<_ACEOF
18040 #line 18040 "configure"
18041 #include "confdefs.h"
18042
18043 int main() {
18044         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18045         char temp[40];
18046         bcopy(data, temp, sizeof(data));
18047         bcopy(temp+10, temp, 15);
18048         bcopy(temp+5, temp+15, 10);
18049         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18050 }
18051
18052 _ACEOF
18053 rm -f conftest$ac_exeext
18054 if { (eval echo "$as_me:18054: \"$ac_link\"") >&5
18055   (eval $ac_link) 2>&5
18056   ac_status=$?
18057   echo "$as_me:18057: \$? = $ac_status" >&5
18058   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18059   { (eval echo "$as_me:18059: \"$ac_try\"") >&5
18060   (eval $ac_try) 2>&5
18061   ac_status=$?
18062   echo "$as_me:18062: \$? = $ac_status" >&5
18063   (exit $ac_status); }; }; then
18064   cf_cv_good_bcopy=yes
18065 else
18066   echo "$as_me: program exited with status $ac_status" >&5
18067 echo "$as_me: failed program was:" >&5
18068 cat conftest.$ac_ext >&5
18069 cf_cv_good_bcopy=no
18070 fi
18071 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18072 fi
18073
18074 fi
18075 echo "$as_me:18075: result: $cf_cv_good_bcopy" >&5
18076 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18077
18078 else
18079   cf_cv_good_bcopy=no
18080 fi
18081
18082         if test "$cf_cv_good_bcopy" = yes ; then
18083
18084 cat >>confdefs.h <<\EOF
18085 #define USE_OK_BCOPY 1
18086 EOF
18087
18088         else
18089
18090 cat >>confdefs.h <<\EOF
18091 #define USE_MY_MEMMOVE 1
18092 EOF
18093
18094         fi
18095
18096 fi
18097
18098 tty 2>&1 >/dev/null || {
18099 for ac_func in posix_openpt
18100 do
18101 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18102 echo "$as_me:18102: checking for $ac_func" >&5
18103 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18104 if eval "test \"\${$as_ac_var+set}\" = set"; then
18105   echo $ECHO_N "(cached) $ECHO_C" >&6
18106 else
18107   cat >conftest.$ac_ext <<_ACEOF
18108 #line 18108 "configure"
18109 #include "confdefs.h"
18110 /* System header to define __stub macros and hopefully few prototypes,
18111     which can conflict with char $ac_func (); below.  */
18112 #include <assert.h>
18113 /* Override any gcc2 internal prototype to avoid an error.  */
18114 #ifdef __cplusplus
18115 extern "C"
18116 #endif
18117 /* We use char because int might match the return type of a gcc2
18118    builtin and then its argument prototype would still apply.  */
18119 char $ac_func ();
18120 char (*f) ();
18121
18122 int
18123 main ()
18124 {
18125 /* The GNU C library defines this for functions which it implements
18126     to always fail with ENOSYS.  Some functions are actually named
18127     something starting with __ and the normal name is an alias.  */
18128 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18129 choke me
18130 #else
18131 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18132 #endif
18133
18134   ;
18135   return 0;
18136 }
18137 _ACEOF
18138 rm -f conftest.$ac_objext conftest$ac_exeext
18139 if { (eval echo "$as_me:18139: \"$ac_link\"") >&5
18140   (eval $ac_link) 2>&5
18141   ac_status=$?
18142   echo "$as_me:18142: \$? = $ac_status" >&5
18143   (exit $ac_status); } &&
18144          { ac_try='test -s conftest$ac_exeext'
18145   { (eval echo "$as_me:18145: \"$ac_try\"") >&5
18146   (eval $ac_try) 2>&5
18147   ac_status=$?
18148   echo "$as_me:18148: \$? = $ac_status" >&5
18149   (exit $ac_status); }; }; then
18150   eval "$as_ac_var=yes"
18151 else
18152   echo "$as_me: failed program was:" >&5
18153 cat conftest.$ac_ext >&5
18154 eval "$as_ac_var=no"
18155 fi
18156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18157 fi
18158 echo "$as_me:18158: result: `eval echo '${'$as_ac_var'}'`" >&5
18159 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18160 if test `eval echo '${'$as_ac_var'}'` = yes; then
18161   cat >>confdefs.h <<EOF
18162 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18163 EOF
18164
18165 fi
18166 done
18167  }
18168 echo "$as_me:18168: checking if poll really works" >&5
18169 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18170 if test "${cf_cv_working_poll+set}" = set; then
18171   echo $ECHO_N "(cached) $ECHO_C" >&6
18172 else
18173
18174 if test "$cross_compiling" = yes; then
18175   cf_cv_working_poll=unknown
18176 else
18177   cat >conftest.$ac_ext <<_ACEOF
18178 #line 18178 "configure"
18179 #include "confdefs.h"
18180
18181 #include <stdlib.h>
18182 #include <stdio.h>
18183 #include <unistd.h>
18184 #include <fcntl.h>
18185 #ifdef HAVE_POLL_H
18186 #include <poll.h>
18187 #else
18188 #include <sys/poll.h>
18189 #endif
18190 int main(void) {
18191         struct pollfd myfds;
18192         int ret;
18193
18194         /* check for Darwin bug with respect to "devices" */
18195         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18196         if (myfds.fd < 0)
18197                 myfds.fd = 0;
18198         myfds.events = POLLIN;
18199         myfds.revents = 0;
18200
18201         ret = poll(&myfds, 1, 100);
18202
18203         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18204                 ret = -1;
18205         } else {
18206                 int fd = 0;
18207                 if (!isatty(fd)) {
18208                         fd = open("/dev/tty", 2);       /* O_RDWR */
18209                 }
18210 #ifdef HAVE_POSIX_OPENPT
18211                 if (fd < 0) {
18212                         fd = posix_openpt(O_RDWR);
18213                 }
18214 #endif
18215
18216                 if (fd >= 0) {
18217                         /* also check with standard input */
18218                         myfds.fd = fd;
18219                         myfds.events = POLLIN;
18220                         myfds.revents = 0;
18221                         ret = poll(&myfds, 1, 100);
18222                 } else {
18223                         ret = -1;
18224                 }
18225         }
18226         ${cf_cv_main_return:-return}(ret < 0);
18227 }
18228 _ACEOF
18229 rm -f conftest$ac_exeext
18230 if { (eval echo "$as_me:18230: \"$ac_link\"") >&5
18231   (eval $ac_link) 2>&5
18232   ac_status=$?
18233   echo "$as_me:18233: \$? = $ac_status" >&5
18234   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18235   { (eval echo "$as_me:18235: \"$ac_try\"") >&5
18236   (eval $ac_try) 2>&5
18237   ac_status=$?
18238   echo "$as_me:18238: \$? = $ac_status" >&5
18239   (exit $ac_status); }; }; then
18240   cf_cv_working_poll=yes
18241 else
18242   echo "$as_me: program exited with status $ac_status" >&5
18243 echo "$as_me: failed program was:" >&5
18244 cat conftest.$ac_ext >&5
18245 cf_cv_working_poll=no
18246 fi
18247 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18248 fi
18249 fi
18250 echo "$as_me:18250: result: $cf_cv_working_poll" >&5
18251 echo "${ECHO_T}$cf_cv_working_poll" >&6
18252 test "$cf_cv_working_poll" = "yes" &&
18253 cat >>confdefs.h <<\EOF
18254 #define HAVE_WORKING_POLL 1
18255 EOF
18256
18257 echo "$as_me:18257: checking for va_copy" >&5
18258 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18259 if test "${cf_cv_have_va_copy+set}" = set; then
18260   echo $ECHO_N "(cached) $ECHO_C" >&6
18261 else
18262
18263 cat >conftest.$ac_ext <<_ACEOF
18264 #line 18264 "configure"
18265 #include "confdefs.h"
18266
18267 #include <stdarg.h>
18268
18269 int
18270 main ()
18271 {
18272
18273         static va_list dst;
18274         static va_list src;
18275         va_copy(dst, src)
18276   ;
18277   return 0;
18278 }
18279 _ACEOF
18280 rm -f conftest.$ac_objext conftest$ac_exeext
18281 if { (eval echo "$as_me:18281: \"$ac_link\"") >&5
18282   (eval $ac_link) 2>&5
18283   ac_status=$?
18284   echo "$as_me:18284: \$? = $ac_status" >&5
18285   (exit $ac_status); } &&
18286          { ac_try='test -s conftest$ac_exeext'
18287   { (eval echo "$as_me:18287: \"$ac_try\"") >&5
18288   (eval $ac_try) 2>&5
18289   ac_status=$?
18290   echo "$as_me:18290: \$? = $ac_status" >&5
18291   (exit $ac_status); }; }; then
18292   cf_cv_have_va_copy=yes
18293 else
18294   echo "$as_me: failed program was:" >&5
18295 cat conftest.$ac_ext >&5
18296 cf_cv_have_va_copy=no
18297 fi
18298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18299 fi
18300 echo "$as_me:18300: result: $cf_cv_have_va_copy" >&5
18301 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18302
18303 test "$cf_cv_have_va_copy" = yes &&
18304 cat >>confdefs.h <<\EOF
18305 #define HAVE_VA_COPY 1
18306 EOF
18307
18308 echo "$as_me:18308: checking for __va_copy" >&5
18309 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18310 if test "${cf_cv_have___va_copy+set}" = set; then
18311   echo $ECHO_N "(cached) $ECHO_C" >&6
18312 else
18313
18314 cat >conftest.$ac_ext <<_ACEOF
18315 #line 18315 "configure"
18316 #include "confdefs.h"
18317
18318 #include <stdarg.h>
18319
18320 int
18321 main ()
18322 {
18323
18324         static va_list dst;
18325         static va_list src;
18326         __va_copy(dst, src)
18327   ;
18328   return 0;
18329 }
18330 _ACEOF
18331 rm -f conftest.$ac_objext conftest$ac_exeext
18332 if { (eval echo "$as_me:18332: \"$ac_link\"") >&5
18333   (eval $ac_link) 2>&5
18334   ac_status=$?
18335   echo "$as_me:18335: \$? = $ac_status" >&5
18336   (exit $ac_status); } &&
18337          { ac_try='test -s conftest$ac_exeext'
18338   { (eval echo "$as_me:18338: \"$ac_try\"") >&5
18339   (eval $ac_try) 2>&5
18340   ac_status=$?
18341   echo "$as_me:18341: \$? = $ac_status" >&5
18342   (exit $ac_status); }; }; then
18343   cf_cv_have___va_copy=yes
18344 else
18345   echo "$as_me: failed program was:" >&5
18346 cat conftest.$ac_ext >&5
18347 cf_cv_have___va_copy=no
18348 fi
18349 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18350 fi
18351 echo "$as_me:18351: result: $cf_cv_have___va_copy" >&5
18352 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18353
18354 test "$cf_cv_have___va_copy" = yes &&
18355 cat >>confdefs.h <<\EOF
18356 #define HAVE___VA_COPY 1
18357 EOF
18358
18359 echo "$as_me:18359: checking for pid_t" >&5
18360 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18361 if test "${ac_cv_type_pid_t+set}" = set; then
18362   echo $ECHO_N "(cached) $ECHO_C" >&6
18363 else
18364   cat >conftest.$ac_ext <<_ACEOF
18365 #line 18365 "configure"
18366 #include "confdefs.h"
18367 $ac_includes_default
18368 int
18369 main ()
18370 {
18371 if ((pid_t *) 0)
18372   return 0;
18373 if (sizeof (pid_t))
18374   return 0;
18375   ;
18376   return 0;
18377 }
18378 _ACEOF
18379 rm -f conftest.$ac_objext
18380 if { (eval echo "$as_me:18380: \"$ac_compile\"") >&5
18381   (eval $ac_compile) 2>&5
18382   ac_status=$?
18383   echo "$as_me:18383: \$? = $ac_status" >&5
18384   (exit $ac_status); } &&
18385          { ac_try='test -s conftest.$ac_objext'
18386   { (eval echo "$as_me:18386: \"$ac_try\"") >&5
18387   (eval $ac_try) 2>&5
18388   ac_status=$?
18389   echo "$as_me:18389: \$? = $ac_status" >&5
18390   (exit $ac_status); }; }; then
18391   ac_cv_type_pid_t=yes
18392 else
18393   echo "$as_me: failed program was:" >&5
18394 cat conftest.$ac_ext >&5
18395 ac_cv_type_pid_t=no
18396 fi
18397 rm -f conftest.$ac_objext conftest.$ac_ext
18398 fi
18399 echo "$as_me:18399: result: $ac_cv_type_pid_t" >&5
18400 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18401 if test $ac_cv_type_pid_t = yes; then
18402   :
18403 else
18404
18405 cat >>confdefs.h <<EOF
18406 #define pid_t int
18407 EOF
18408
18409 fi
18410
18411 for ac_header in unistd.h vfork.h
18412 do
18413 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18414 echo "$as_me:18414: checking for $ac_header" >&5
18415 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18416 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18417   echo $ECHO_N "(cached) $ECHO_C" >&6
18418 else
18419   cat >conftest.$ac_ext <<_ACEOF
18420 #line 18420 "configure"
18421 #include "confdefs.h"
18422 #include <$ac_header>
18423 _ACEOF
18424 if { (eval echo "$as_me:18424: \"$ac_cpp conftest.$ac_ext\"") >&5
18425   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18426   ac_status=$?
18427   egrep -v '^ *\+' conftest.er1 >conftest.err
18428   rm -f conftest.er1
18429   cat conftest.err >&5
18430   echo "$as_me:18430: \$? = $ac_status" >&5
18431   (exit $ac_status); } >/dev/null; then
18432   if test -s conftest.err; then
18433     ac_cpp_err=$ac_c_preproc_warn_flag
18434   else
18435     ac_cpp_err=
18436   fi
18437 else
18438   ac_cpp_err=yes
18439 fi
18440 if test -z "$ac_cpp_err"; then
18441   eval "$as_ac_Header=yes"
18442 else
18443   echo "$as_me: failed program was:" >&5
18444   cat conftest.$ac_ext >&5
18445   eval "$as_ac_Header=no"
18446 fi
18447 rm -f conftest.err conftest.$ac_ext
18448 fi
18449 echo "$as_me:18449: result: `eval echo '${'$as_ac_Header'}'`" >&5
18450 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18451 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18452   cat >>confdefs.h <<EOF
18453 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18454 EOF
18455
18456 fi
18457 done
18458
18459 for ac_func in fork vfork
18460 do
18461 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18462 echo "$as_me:18462: checking for $ac_func" >&5
18463 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18464 if eval "test \"\${$as_ac_var+set}\" = set"; then
18465   echo $ECHO_N "(cached) $ECHO_C" >&6
18466 else
18467   cat >conftest.$ac_ext <<_ACEOF
18468 #line 18468 "configure"
18469 #include "confdefs.h"
18470 /* System header to define __stub macros and hopefully few prototypes,
18471     which can conflict with char $ac_func (); below.  */
18472 #include <assert.h>
18473 /* Override any gcc2 internal prototype to avoid an error.  */
18474 #ifdef __cplusplus
18475 extern "C"
18476 #endif
18477 /* We use char because int might match the return type of a gcc2
18478    builtin and then its argument prototype would still apply.  */
18479 char $ac_func ();
18480 char (*f) ();
18481
18482 int
18483 main ()
18484 {
18485 /* The GNU C library defines this for functions which it implements
18486     to always fail with ENOSYS.  Some functions are actually named
18487     something starting with __ and the normal name is an alias.  */
18488 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18489 choke me
18490 #else
18491 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18492 #endif
18493
18494   ;
18495   return 0;
18496 }
18497 _ACEOF
18498 rm -f conftest.$ac_objext conftest$ac_exeext
18499 if { (eval echo "$as_me:18499: \"$ac_link\"") >&5
18500   (eval $ac_link) 2>&5
18501   ac_status=$?
18502   echo "$as_me:18502: \$? = $ac_status" >&5
18503   (exit $ac_status); } &&
18504          { ac_try='test -s conftest$ac_exeext'
18505   { (eval echo "$as_me:18505: \"$ac_try\"") >&5
18506   (eval $ac_try) 2>&5
18507   ac_status=$?
18508   echo "$as_me:18508: \$? = $ac_status" >&5
18509   (exit $ac_status); }; }; then
18510   eval "$as_ac_var=yes"
18511 else
18512   echo "$as_me: failed program was:" >&5
18513 cat conftest.$ac_ext >&5
18514 eval "$as_ac_var=no"
18515 fi
18516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18517 fi
18518 echo "$as_me:18518: result: `eval echo '${'$as_ac_var'}'`" >&5
18519 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18520 if test `eval echo '${'$as_ac_var'}'` = yes; then
18521   cat >>confdefs.h <<EOF
18522 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18523 EOF
18524
18525 fi
18526 done
18527
18528 ac_cv_func_fork_works=$ac_cv_func_fork
18529 if test "x$ac_cv_func_fork" = xyes; then
18530   echo "$as_me:18530: checking for working fork" >&5
18531 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18532 if test "${ac_cv_func_fork_works+set}" = set; then
18533   echo $ECHO_N "(cached) $ECHO_C" >&6
18534 else
18535   if test "$cross_compiling" = yes; then
18536   ac_cv_func_fork_works=cross
18537 else
18538   cat >conftest.$ac_ext <<_ACEOF
18539 /* By Rüdiger Kuhlmann. */
18540       #include <sys/types.h>
18541       #if HAVE_UNISTD_H
18542       # include <unistd.h>
18543       #endif
18544       /* Some systems only have a dummy stub for fork() */
18545       int main ()
18546       {
18547         if (fork() < 0)
18548           $ac_main_return (1);
18549         $ac_main_return (0);
18550       }
18551 _ACEOF
18552 rm -f conftest$ac_exeext
18553 if { (eval echo "$as_me:18553: \"$ac_link\"") >&5
18554   (eval $ac_link) 2>&5
18555   ac_status=$?
18556   echo "$as_me:18556: \$? = $ac_status" >&5
18557   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18558   { (eval echo "$as_me:18558: \"$ac_try\"") >&5
18559   (eval $ac_try) 2>&5
18560   ac_status=$?
18561   echo "$as_me:18561: \$? = $ac_status" >&5
18562   (exit $ac_status); }; }; then
18563   ac_cv_func_fork_works=yes
18564 else
18565   echo "$as_me: program exited with status $ac_status" >&5
18566 echo "$as_me: failed program was:" >&5
18567 cat conftest.$ac_ext >&5
18568 ac_cv_func_fork_works=no
18569 fi
18570 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18571 fi
18572 fi
18573 echo "$as_me:18573: result: $ac_cv_func_fork_works" >&5
18574 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18575
18576 fi
18577 if test "x$ac_cv_func_fork_works" = xcross; then
18578   case $host in
18579     *-*-amigaos* | *-*-msdosdjgpp*)
18580       # Override, as these systems have only a dummy fork() stub
18581       ac_cv_func_fork_works=no
18582       ;;
18583     *)
18584       ac_cv_func_fork_works=yes
18585       ;;
18586   esac
18587   { echo "$as_me:18587: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18588 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18589 fi
18590 ac_cv_func_vfork_works=$ac_cv_func_vfork
18591 if test "x$ac_cv_func_vfork" = xyes; then
18592   echo "$as_me:18592: checking for working vfork" >&5
18593 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18594 if test "${ac_cv_func_vfork_works+set}" = set; then
18595   echo $ECHO_N "(cached) $ECHO_C" >&6
18596 else
18597   if test "$cross_compiling" = yes; then
18598   ac_cv_func_vfork_works=cross
18599 else
18600   cat >conftest.$ac_ext <<_ACEOF
18601 #line 18601 "configure"
18602 #include "confdefs.h"
18603 /* Thanks to Paul Eggert for this test.  */
18604 #include <stdio.h>
18605 #include <sys/types.h>
18606 #include <sys/stat.h>
18607 #if HAVE_UNISTD_H
18608 # include <unistd.h>
18609 #endif
18610 #if HAVE_VFORK_H
18611 # include <vfork.h>
18612 #endif
18613 /* On some sparc systems, changes by the child to local and incoming
18614    argument registers are propagated back to the parent.  The compiler
18615    is told about this with #include <vfork.h>, but some compilers
18616    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18617    static variable whose address is put into a register that is
18618    clobbered by the vfork.  */
18619 static
18620 #ifdef __cplusplus
18621 sparc_address_test (int arg)
18622 # else
18623 sparc_address_test (arg) int arg;
18624 #endif
18625 {
18626   static pid_t child;
18627   if (!child) {
18628     child = vfork ();
18629     if (child < 0) {
18630       perror ("vfork");
18631       _exit(2);
18632     }
18633     if (!child) {
18634       arg = getpid();
18635       write(-1, "", 0);
18636       _exit (arg);
18637     }
18638   }
18639 }
18640
18641 int
18642 main ()
18643 {
18644   pid_t parent = getpid ();
18645   pid_t child;
18646
18647   sparc_address_test ();
18648
18649   child = vfork ();
18650
18651   if (child == 0) {
18652     /* Here is another test for sparc vfork register problems.  This
18653        test uses lots of local variables, at least as many local
18654        variables as main has allocated so far including compiler
18655        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18656        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18657        reuse the register of parent for one of the local variables,
18658        since it will think that parent can't possibly be used any more
18659        in this routine.  Assigning to the local variable will thus
18660        munge parent in the parent process.  */
18661     pid_t
18662       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18663       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18664     /* Convince the compiler that p..p7 are live; otherwise, it might
18665        use the same hardware register for all 8 local variables.  */
18666     if (p != p1 || p != p2 || p != p3 || p != p4
18667         || p != p5 || p != p6 || p != p7)
18668       _exit(1);
18669
18670     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18671        from child file descriptors.  If the child closes a descriptor
18672        before it execs or exits, this munges the parent's descriptor
18673        as well.  Test for this by closing stdout in the child.  */
18674     _exit(close(fileno(stdout)) != 0);
18675   } else {
18676     int status;
18677     struct stat st;
18678
18679     while (wait(&status) != child)
18680       ;
18681     $ac_main_return(
18682          /* Was there some problem with vforking?  */
18683          child < 0
18684
18685          /* Did the child fail?  (This shouldn't happen.)  */
18686          || status
18687
18688          /* Did the vfork/compiler bug occur?  */
18689          || parent != getpid()
18690
18691          /* Did the file descriptor bug occur?  */
18692          || fstat(fileno(stdout), &st) != 0
18693          );
18694   }
18695 }
18696 _ACEOF
18697 rm -f conftest$ac_exeext
18698 if { (eval echo "$as_me:18698: \"$ac_link\"") >&5
18699   (eval $ac_link) 2>&5
18700   ac_status=$?
18701   echo "$as_me:18701: \$? = $ac_status" >&5
18702   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18703   { (eval echo "$as_me:18703: \"$ac_try\"") >&5
18704   (eval $ac_try) 2>&5
18705   ac_status=$?
18706   echo "$as_me:18706: \$? = $ac_status" >&5
18707   (exit $ac_status); }; }; then
18708   ac_cv_func_vfork_works=yes
18709 else
18710   echo "$as_me: program exited with status $ac_status" >&5
18711 echo "$as_me: failed program was:" >&5
18712 cat conftest.$ac_ext >&5
18713 ac_cv_func_vfork_works=no
18714 fi
18715 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18716 fi
18717 fi
18718 echo "$as_me:18718: result: $ac_cv_func_vfork_works" >&5
18719 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18720
18721 fi;
18722 if test "x$ac_cv_func_fork_works" = xcross; then
18723   ac_cv_func_vfork_works=ac_cv_func_vfork
18724   { echo "$as_me:18724: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18725 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18726 fi
18727
18728 if test "x$ac_cv_func_vfork_works" = xyes; then
18729
18730 cat >>confdefs.h <<\EOF
18731 #define HAVE_WORKING_VFORK 1
18732 EOF
18733
18734 else
18735
18736 cat >>confdefs.h <<\EOF
18737 #define vfork fork
18738 EOF
18739
18740 fi
18741 if test "x$ac_cv_func_fork_works" = xyes; then
18742
18743 cat >>confdefs.h <<\EOF
18744 #define HAVE_WORKING_FORK 1
18745 EOF
18746
18747 fi
18748
18749 # special check for test/ditto.c
18750
18751 echo "$as_me:18751: checking for openpty in -lutil" >&5
18752 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18753 if test "${ac_cv_lib_util_openpty+set}" = set; then
18754   echo $ECHO_N "(cached) $ECHO_C" >&6
18755 else
18756   ac_check_lib_save_LIBS=$LIBS
18757 LIBS="-lutil  $LIBS"
18758 cat >conftest.$ac_ext <<_ACEOF
18759 #line 18759 "configure"
18760 #include "confdefs.h"
18761
18762 /* Override any gcc2 internal prototype to avoid an error.  */
18763 #ifdef __cplusplus
18764 extern "C"
18765 #endif
18766 /* We use char because int might match the return type of a gcc2
18767    builtin and then its argument prototype would still apply.  */
18768 char openpty ();
18769 int
18770 main ()
18771 {
18772 openpty ();
18773   ;
18774   return 0;
18775 }
18776 _ACEOF
18777 rm -f conftest.$ac_objext conftest$ac_exeext
18778 if { (eval echo "$as_me:18778: \"$ac_link\"") >&5
18779   (eval $ac_link) 2>&5
18780   ac_status=$?
18781   echo "$as_me:18781: \$? = $ac_status" >&5
18782   (exit $ac_status); } &&
18783          { ac_try='test -s conftest$ac_exeext'
18784   { (eval echo "$as_me:18784: \"$ac_try\"") >&5
18785   (eval $ac_try) 2>&5
18786   ac_status=$?
18787   echo "$as_me:18787: \$? = $ac_status" >&5
18788   (exit $ac_status); }; }; then
18789   ac_cv_lib_util_openpty=yes
18790 else
18791   echo "$as_me: failed program was:" >&5
18792 cat conftest.$ac_ext >&5
18793 ac_cv_lib_util_openpty=no
18794 fi
18795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18796 LIBS=$ac_check_lib_save_LIBS
18797 fi
18798 echo "$as_me:18798: result: $ac_cv_lib_util_openpty" >&5
18799 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18800 if test $ac_cv_lib_util_openpty = yes; then
18801   cf_cv_lib_util=yes
18802 else
18803   cf_cv_lib_util=no
18804 fi
18805
18806 echo "$as_me:18806: checking for openpty header" >&5
18807 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18808 if test "${cf_cv_func_openpty+set}" = set; then
18809   echo $ECHO_N "(cached) $ECHO_C" >&6
18810 else
18811
18812         cf_save_LIBS="$LIBS"
18813         test $cf_cv_lib_util = yes && {
18814 cf_add_libs="-lutil"
18815 # Filter out duplicates - this happens with badly-designed ".pc" files...
18816 for cf_add_1lib in $LIBS
18817 do
18818         for cf_add_2lib in $cf_add_libs
18819         do
18820                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18821                 then
18822                         cf_add_1lib=
18823                         break
18824                 fi
18825         done
18826         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18827 done
18828 LIBS="$cf_add_libs"
18829  }
18830         for cf_header in pty.h libutil.h util.h
18831         do
18832         cat >conftest.$ac_ext <<_ACEOF
18833 #line 18833 "configure"
18834 #include "confdefs.h"
18835
18836 #include <$cf_header>
18837
18838 int
18839 main ()
18840 {
18841
18842         int x = openpty((int *)0, (int *)0, (char *)0,
18843                                    (struct termios *)0, (struct winsize *)0);
18844
18845   ;
18846   return 0;
18847 }
18848 _ACEOF
18849 rm -f conftest.$ac_objext conftest$ac_exeext
18850 if { (eval echo "$as_me:18850: \"$ac_link\"") >&5
18851   (eval $ac_link) 2>&5
18852   ac_status=$?
18853   echo "$as_me:18853: \$? = $ac_status" >&5
18854   (exit $ac_status); } &&
18855          { ac_try='test -s conftest$ac_exeext'
18856   { (eval echo "$as_me:18856: \"$ac_try\"") >&5
18857   (eval $ac_try) 2>&5
18858   ac_status=$?
18859   echo "$as_me:18859: \$? = $ac_status" >&5
18860   (exit $ac_status); }; }; then
18861
18862                 cf_cv_func_openpty=$cf_header
18863                 break
18864
18865 else
18866   echo "$as_me: failed program was:" >&5
18867 cat conftest.$ac_ext >&5
18868
18869                 cf_cv_func_openpty=no
18870
18871 fi
18872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18873         done
18874         LIBS="$cf_save_LIBS"
18875
18876 fi
18877 echo "$as_me:18877: result: $cf_cv_func_openpty" >&5
18878 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18879
18880 if test "$cf_cv_func_openpty" != no ; then
18881
18882 cat >>confdefs.h <<EOF
18883 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18884 EOF
18885
18886 cat >>confdefs.h <<\EOF
18887 #define USE_XTERM_PTY 1
18888 EOF
18889
18890         if test "x$cf_cv_lib_util" = xyes ; then
18891
18892 cf_add_libs="-lutil"
18893 # Filter out duplicates - this happens with badly-designed ".pc" files...
18894 for cf_add_1lib in $TEST_LIBS
18895 do
18896         for cf_add_2lib in $cf_add_libs
18897         do
18898                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18899                 then
18900                         cf_add_1lib=
18901                         break
18902                 fi
18903         done
18904         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18905 done
18906 TEST_LIBS="$cf_add_libs"
18907
18908         fi
18909 fi
18910
18911 if test "$with_hashed_db" != no ; then
18912
18913 cat >>confdefs.h <<\EOF
18914 #define USE_HASHED_DB 1
18915 EOF
18916
18917 case $with_hashed_db in
18918 (yes|*able*)
18919         ;;
18920 (*)
18921         if test -d "$with_hashed_db" ; then
18922
18923 if test -n "$with_hashed_db/include" ; then
18924   for cf_add_incdir in $with_hashed_db/include
18925   do
18926         while test $cf_add_incdir != /usr/include
18927         do
18928           if test -d $cf_add_incdir
18929           then
18930                 cf_have_incdir=no
18931                 if test -n "$CFLAGS$CPPFLAGS" ; then
18932                   # a loop is needed to ensure we can add subdirs of existing dirs
18933                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18934                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18935                           cf_have_incdir=yes; break
18936                         fi
18937                   done
18938                 fi
18939
18940                 if test "$cf_have_incdir" = no ; then
18941                   if test "$cf_add_incdir" = /usr/local/include ; then
18942                         if test "$GCC" = yes
18943                         then
18944                           cf_save_CPPFLAGS=$CPPFLAGS
18945                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18946                           cat >conftest.$ac_ext <<_ACEOF
18947 #line 18947 "configure"
18948 #include "confdefs.h"
18949 #include <stdio.h>
18950 int
18951 main ()
18952 {
18953 printf("Hello")
18954   ;
18955   return 0;
18956 }
18957 _ACEOF
18958 rm -f conftest.$ac_objext
18959 if { (eval echo "$as_me:18959: \"$ac_compile\"") >&5
18960   (eval $ac_compile) 2>&5
18961   ac_status=$?
18962   echo "$as_me:18962: \$? = $ac_status" >&5
18963   (exit $ac_status); } &&
18964          { ac_try='test -s conftest.$ac_objext'
18965   { (eval echo "$as_me:18965: \"$ac_try\"") >&5
18966   (eval $ac_try) 2>&5
18967   ac_status=$?
18968   echo "$as_me:18968: \$? = $ac_status" >&5
18969   (exit $ac_status); }; }; then
18970   :
18971 else
18972   echo "$as_me: failed program was:" >&5
18973 cat conftest.$ac_ext >&5
18974 cf_have_incdir=yes
18975 fi
18976 rm -f conftest.$ac_objext conftest.$ac_ext
18977                           CPPFLAGS=$cf_save_CPPFLAGS
18978                         fi
18979                   fi
18980                 fi
18981
18982                 if test "$cf_have_incdir" = no ; then
18983                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18984
18985 echo "${as_me:-configure}:18985: testing adding $cf_add_incdir to include-path ..." 1>&5
18986
18987                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18988
18989                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18990                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18991                   cf_add_incdir="$cf_top_incdir"
18992                 else
18993                   break
18994                 fi
18995           else
18996                 break
18997           fi
18998         done
18999   done
19000 fi
19001
19002 if test -n "$with_hashed_db/lib" ; then
19003         for cf_add_libdir in $with_hashed_db/lib
19004         do
19005                 if test $cf_add_libdir = /usr/lib ; then
19006                         :
19007                 elif test -d $cf_add_libdir
19008                 then
19009                         cf_have_libdir=no
19010                         if test -n "$LDFLAGS$LIBS" ; then
19011                                 # a loop is needed to ensure we can add subdirs of existing dirs
19012                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19013                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19014                                                 cf_have_libdir=yes; break
19015                                         fi
19016                                 done
19017                         fi
19018                         if test "$cf_have_libdir" = no ; then
19019                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19020
19021 echo "${as_me:-configure}:19021: testing adding $cf_add_libdir to library-path ..." 1>&5
19022
19023                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19024                         fi
19025                 fi
19026         done
19027 fi
19028
19029         else
19030                 case "$with_hashed_db" in
19031                 (./*|../*|/*)
19032                         { echo "$as_me:19032: WARNING: no such directory $with_hashed_db" >&5
19033 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19034                         ;;
19035                 (*)
19036
19037 cf_search=
19038
19039 test "x$prefix" != "xNONE" && \
19040 test -d "$prefix" && \
19041  {
19042         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19043         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19044         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19045         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19046         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19047         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19048 }
19049
19050 for cf_subdir_prefix in \
19051         /usr \
19052         /usr/local \
19053         /usr/pkg \
19054         /opt \
19055         /opt/local \
19056         $HOME
19057 do
19058
19059 test "x$cf_subdir_prefix" != "x$prefix" && \
19060 test -d "$cf_subdir_prefix" && \
19061 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19062         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19063         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19064         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19065         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19066         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19067         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"
19068 }
19069
19070 done
19071
19072         for cf_item in $cf_search
19073         do
19074                 case $cf_item in
19075                 (*/$with_hashed_db)
19076
19077 if test -n "$cf_item" ; then
19078   for cf_add_incdir in $cf_item
19079   do
19080         while test $cf_add_incdir != /usr/include
19081         do
19082           if test -d $cf_add_incdir
19083           then
19084                 cf_have_incdir=no
19085                 if test -n "$CFLAGS$CPPFLAGS" ; then
19086                   # a loop is needed to ensure we can add subdirs of existing dirs
19087                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19088                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19089                           cf_have_incdir=yes; break
19090                         fi
19091                   done
19092                 fi
19093
19094                 if test "$cf_have_incdir" = no ; then
19095                   if test "$cf_add_incdir" = /usr/local/include ; then
19096                         if test "$GCC" = yes
19097                         then
19098                           cf_save_CPPFLAGS=$CPPFLAGS
19099                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19100                           cat >conftest.$ac_ext <<_ACEOF
19101 #line 19101 "configure"
19102 #include "confdefs.h"
19103 #include <stdio.h>
19104 int
19105 main ()
19106 {
19107 printf("Hello")
19108   ;
19109   return 0;
19110 }
19111 _ACEOF
19112 rm -f conftest.$ac_objext
19113 if { (eval echo "$as_me:19113: \"$ac_compile\"") >&5
19114   (eval $ac_compile) 2>&5
19115   ac_status=$?
19116   echo "$as_me:19116: \$? = $ac_status" >&5
19117   (exit $ac_status); } &&
19118          { ac_try='test -s conftest.$ac_objext'
19119   { (eval echo "$as_me:19119: \"$ac_try\"") >&5
19120   (eval $ac_try) 2>&5
19121   ac_status=$?
19122   echo "$as_me:19122: \$? = $ac_status" >&5
19123   (exit $ac_status); }; }; then
19124   :
19125 else
19126   echo "$as_me: failed program was:" >&5
19127 cat conftest.$ac_ext >&5
19128 cf_have_incdir=yes
19129 fi
19130 rm -f conftest.$ac_objext conftest.$ac_ext
19131                           CPPFLAGS=$cf_save_CPPFLAGS
19132                         fi
19133                   fi
19134                 fi
19135
19136                 if test "$cf_have_incdir" = no ; then
19137                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19138
19139 echo "${as_me:-configure}:19139: testing adding $cf_add_incdir to include-path ..." 1>&5
19140
19141                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19142
19143                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19144                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19145                   cf_add_incdir="$cf_top_incdir"
19146                 else
19147                   break
19148                 fi
19149           else
19150                 break
19151           fi
19152         done
19153   done
19154 fi
19155
19156                         ;;
19157                 esac
19158         done
19159
19160 cf_search=
19161
19162 test "x$prefix" != "xNONE" && \
19163 test -d "$prefix" && \
19164  {
19165         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19166         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19167         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19168         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19169         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19170         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19171 }
19172
19173 for cf_subdir_prefix in \
19174         /usr \
19175         /usr/local \
19176         /usr/pkg \
19177         /opt \
19178         /opt/local \
19179         $HOME
19180 do
19181
19182 test "x$cf_subdir_prefix" != "x$prefix" && \
19183 test -d "$cf_subdir_prefix" && \
19184 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19185         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19186         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19187         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19188         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19189         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19190         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"
19191 }
19192
19193 done
19194
19195         for cf_item in $cf_search
19196         do
19197                 case $cf_item in
19198                 (*/$with_hashed_db)
19199
19200 if test -n "$cf_item" ; then
19201         for cf_add_libdir in $cf_item
19202         do
19203                 if test $cf_add_libdir = /usr/lib ; then
19204                         :
19205                 elif test -d $cf_add_libdir
19206                 then
19207                         cf_have_libdir=no
19208                         if test -n "$LDFLAGS$LIBS" ; then
19209                                 # a loop is needed to ensure we can add subdirs of existing dirs
19210                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19211                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19212                                                 cf_have_libdir=yes; break
19213                                         fi
19214                                 done
19215                         fi
19216                         if test "$cf_have_libdir" = no ; then
19217                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19218
19219 echo "${as_me:-configure}:19219: testing adding $cf_add_libdir to library-path ..." 1>&5
19220
19221                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19222                         fi
19223                 fi
19224         done
19225 fi
19226
19227                         ;;
19228                 esac
19229         done
19230
19231                         ;;
19232                 esac
19233         fi
19234 esac
19235
19236 echo "$as_me:19236: checking for db.h" >&5
19237 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19238 if test "${ac_cv_header_db_h+set}" = set; then
19239   echo $ECHO_N "(cached) $ECHO_C" >&6
19240 else
19241   cat >conftest.$ac_ext <<_ACEOF
19242 #line 19242 "configure"
19243 #include "confdefs.h"
19244 #include <db.h>
19245 _ACEOF
19246 if { (eval echo "$as_me:19246: \"$ac_cpp conftest.$ac_ext\"") >&5
19247   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19248   ac_status=$?
19249   egrep -v '^ *\+' conftest.er1 >conftest.err
19250   rm -f conftest.er1
19251   cat conftest.err >&5
19252   echo "$as_me:19252: \$? = $ac_status" >&5
19253   (exit $ac_status); } >/dev/null; then
19254   if test -s conftest.err; then
19255     ac_cpp_err=$ac_c_preproc_warn_flag
19256   else
19257     ac_cpp_err=
19258   fi
19259 else
19260   ac_cpp_err=yes
19261 fi
19262 if test -z "$ac_cpp_err"; then
19263   ac_cv_header_db_h=yes
19264 else
19265   echo "$as_me: failed program was:" >&5
19266   cat conftest.$ac_ext >&5
19267   ac_cv_header_db_h=no
19268 fi
19269 rm -f conftest.err conftest.$ac_ext
19270 fi
19271 echo "$as_me:19271: result: $ac_cv_header_db_h" >&5
19272 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19273 if test $ac_cv_header_db_h = yes; then
19274
19275 echo "$as_me:19275: checking for version of db" >&5
19276 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19277 if test "${cf_cv_hashed_db_version+set}" = set; then
19278   echo $ECHO_N "(cached) $ECHO_C" >&6
19279 else
19280
19281 cf_cv_hashed_db_version=unknown
19282
19283 for cf_db_version in 1 2 3 4 5 6
19284 do
19285
19286 echo "${as_me:-configure}:19286: testing checking for db version $cf_db_version ..." 1>&5
19287
19288         cat >conftest.$ac_ext <<_ACEOF
19289 #line 19289 "configure"
19290 #include "confdefs.h"
19291
19292 $ac_includes_default
19293 #include <db.h>
19294
19295 #ifdef DB_VERSION_MAJOR
19296         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19297 #if $cf_db_version == DB_VERSION_MAJOR
19298         /* ok */
19299 #else
19300         make an error
19301 #endif
19302 #else
19303 #if $cf_db_version == 1
19304         /* ok: assuming this is DB 1.8.5 */
19305 #else
19306         make an error
19307 #endif
19308 #endif
19309
19310 int
19311 main ()
19312 {
19313 DBT *foo = 0
19314   ;
19315   return 0;
19316 }
19317 _ACEOF
19318 rm -f conftest.$ac_objext
19319 if { (eval echo "$as_me:19319: \"$ac_compile\"") >&5
19320   (eval $ac_compile) 2>&5
19321   ac_status=$?
19322   echo "$as_me:19322: \$? = $ac_status" >&5
19323   (exit $ac_status); } &&
19324          { ac_try='test -s conftest.$ac_objext'
19325   { (eval echo "$as_me:19325: \"$ac_try\"") >&5
19326   (eval $ac_try) 2>&5
19327   ac_status=$?
19328   echo "$as_me:19328: \$? = $ac_status" >&5
19329   (exit $ac_status); }; }; then
19330
19331         cf_cv_hashed_db_version=$cf_db_version
19332         break
19333
19334 else
19335   echo "$as_me: failed program was:" >&5
19336 cat conftest.$ac_ext >&5
19337 fi
19338 rm -f conftest.$ac_objext conftest.$ac_ext
19339 done
19340
19341 fi
19342 echo "$as_me:19342: result: $cf_cv_hashed_db_version" >&5
19343 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19344
19345 if test "$cf_cv_hashed_db_version" = unknown ; then
19346         { { echo "$as_me:19346: error: Cannot determine version of db" >&5
19347 echo "$as_me: error: Cannot determine version of db" >&2;}
19348    { (exit 1); exit 1; }; }
19349 else
19350
19351 echo "$as_me:19351: checking for db libraries" >&5
19352 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19353 if test "${cf_cv_hashed_db_libs+set}" = set; then
19354   echo $ECHO_N "(cached) $ECHO_C" >&6
19355 else
19356
19357 cf_cv_hashed_db_libs=unknown
19358 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19359 do
19360         cf_save_libs="$LIBS"
19361         if test -n "$cf_db_libs"; then
19362
19363 cf_add_libs="-l$cf_db_libs"
19364 # Filter out duplicates - this happens with badly-designed ".pc" files...
19365 for cf_add_1lib in $LIBS
19366 do
19367         for cf_add_2lib in $cf_add_libs
19368         do
19369                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19370                 then
19371                         cf_add_1lib=
19372                         break
19373                 fi
19374         done
19375         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19376 done
19377 LIBS="$cf_add_libs"
19378
19379         fi
19380
19381 echo "${as_me:-configure}:19381: testing checking for library "$cf_db_libs" ..." 1>&5
19382
19383         cat >conftest.$ac_ext <<_ACEOF
19384 #line 19384 "configure"
19385 #include "confdefs.h"
19386
19387 $ac_includes_default
19388 #include <db.h>
19389
19390 int
19391 main ()
19392 {
19393
19394         char *path = "/tmp/foo";
19395 #ifdef DB_VERSION_MAJOR
19396 #if DB_VERSION_MAJOR >= 4
19397         DB *result = 0;
19398         db_create(&result, NULL, 0);
19399         result->open(result,
19400                 NULL,
19401                 path,
19402                 path,
19403                 DB_HASH,
19404                 DB_CREATE,
19405                 0644);
19406 #elif DB_VERSION_MAJOR >= 3
19407         DB *result = 0;
19408         db_create(&result, NULL, 0);
19409         result->open(result,
19410                 path,
19411                 path,
19412                 DB_HASH,
19413                 DB_CREATE,
19414                 0644);
19415 #elif DB_VERSION_MAJOR >= 2
19416         DB *result = 0;
19417         db_open(path,
19418                 DB_HASH,
19419                 DB_CREATE,
19420                 0644,
19421                 (DB_ENV *) 0,
19422                 (DB_INFO *) 0,
19423                 &result);
19424 #endif /* DB_VERSION_MAJOR */
19425 #else
19426         DB *result = dbopen(path,
19427                      2,
19428                      0644,
19429                      DB_HASH,
19430                      0);
19431 #endif
19432         ${cf_cv_main_return:-return}(result != 0)
19433
19434   ;
19435   return 0;
19436 }
19437 _ACEOF
19438 rm -f conftest.$ac_objext conftest$ac_exeext
19439 if { (eval echo "$as_me:19439: \"$ac_link\"") >&5
19440   (eval $ac_link) 2>&5
19441   ac_status=$?
19442   echo "$as_me:19442: \$? = $ac_status" >&5
19443   (exit $ac_status); } &&
19444          { ac_try='test -s conftest$ac_exeext'
19445   { (eval echo "$as_me:19445: \"$ac_try\"") >&5
19446   (eval $ac_try) 2>&5
19447   ac_status=$?
19448   echo "$as_me:19448: \$? = $ac_status" >&5
19449   (exit $ac_status); }; }; then
19450
19451         if test -n "$cf_db_libs" ; then
19452                 cf_cv_hashed_db_libs=$cf_db_libs
19453         else
19454                 cf_cv_hashed_db_libs=default
19455         fi
19456         LIBS="$cf_save_libs"
19457         break
19458
19459 else
19460   echo "$as_me: failed program was:" >&5
19461 cat conftest.$ac_ext >&5
19462 fi
19463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19464         LIBS="$cf_save_libs"
19465 done
19466
19467 fi
19468 echo "$as_me:19468: result: $cf_cv_hashed_db_libs" >&5
19469 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19470
19471         if test "$cf_cv_hashed_db_libs" = unknown ; then
19472                 { { echo "$as_me:19472: error: Cannot determine library for db" >&5
19473 echo "$as_me: error: Cannot determine library for db" >&2;}
19474    { (exit 1); exit 1; }; }
19475         elif test "$cf_cv_hashed_db_libs" != default ; then
19476
19477 cf_add_libs="-l$cf_cv_hashed_db_libs"
19478 # Filter out duplicates - this happens with badly-designed ".pc" files...
19479 for cf_add_1lib in $LIBS
19480 do
19481         for cf_add_2lib in $cf_add_libs
19482         do
19483                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19484                 then
19485                         cf_add_1lib=
19486                         break
19487                 fi
19488         done
19489         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19490 done
19491 LIBS="$cf_add_libs"
19492
19493         fi
19494 fi
19495
19496 else
19497
19498         { { echo "$as_me:19498: error: Cannot find db.h" >&5
19499 echo "$as_me: error: Cannot find db.h" >&2;}
19500    { (exit 1); exit 1; }; }
19501
19502 fi
19503
19504 fi
19505
19506 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19507         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19508         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19509 fi
19510
19511 # Just in case, check if the C compiler has a bool type.
19512
19513 echo "$as_me:19513: checking if we should include stdbool.h" >&5
19514 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19515
19516 if test "${cf_cv_header_stdbool_h+set}" = set; then
19517   echo $ECHO_N "(cached) $ECHO_C" >&6
19518 else
19519
19520         cat >conftest.$ac_ext <<_ACEOF
19521 #line 19521 "configure"
19522 #include "confdefs.h"
19523
19524 int
19525 main ()
19526 {
19527 bool foo = false
19528   ;
19529   return 0;
19530 }
19531 _ACEOF
19532 rm -f conftest.$ac_objext
19533 if { (eval echo "$as_me:19533: \"$ac_compile\"") >&5
19534   (eval $ac_compile) 2>&5
19535   ac_status=$?
19536   echo "$as_me:19536: \$? = $ac_status" >&5
19537   (exit $ac_status); } &&
19538          { ac_try='test -s conftest.$ac_objext'
19539   { (eval echo "$as_me:19539: \"$ac_try\"") >&5
19540   (eval $ac_try) 2>&5
19541   ac_status=$?
19542   echo "$as_me:19542: \$? = $ac_status" >&5
19543   (exit $ac_status); }; }; then
19544   cf_cv_header_stdbool_h=0
19545 else
19546   echo "$as_me: failed program was:" >&5
19547 cat conftest.$ac_ext >&5
19548 cat >conftest.$ac_ext <<_ACEOF
19549 #line 19549 "configure"
19550 #include "confdefs.h"
19551
19552 #ifndef __BEOS__
19553 #include <stdbool.h>
19554 #endif
19555
19556 int
19557 main ()
19558 {
19559 bool foo = false
19560   ;
19561   return 0;
19562 }
19563 _ACEOF
19564 rm -f conftest.$ac_objext
19565 if { (eval echo "$as_me:19565: \"$ac_compile\"") >&5
19566   (eval $ac_compile) 2>&5
19567   ac_status=$?
19568   echo "$as_me:19568: \$? = $ac_status" >&5
19569   (exit $ac_status); } &&
19570          { ac_try='test -s conftest.$ac_objext'
19571   { (eval echo "$as_me:19571: \"$ac_try\"") >&5
19572   (eval $ac_try) 2>&5
19573   ac_status=$?
19574   echo "$as_me:19574: \$? = $ac_status" >&5
19575   (exit $ac_status); }; }; then
19576   cf_cv_header_stdbool_h=1
19577 else
19578   echo "$as_me: failed program was:" >&5
19579 cat conftest.$ac_ext >&5
19580 cf_cv_header_stdbool_h=0
19581 fi
19582 rm -f conftest.$ac_objext conftest.$ac_ext
19583 fi
19584 rm -f conftest.$ac_objext conftest.$ac_ext
19585 fi
19586
19587 if test "$cf_cv_header_stdbool_h" = 1
19588 then    echo "$as_me:19588: result: yes" >&5
19589 echo "${ECHO_T}yes" >&6
19590 else    echo "$as_me:19590: result: no" >&5
19591 echo "${ECHO_T}no" >&6
19592 fi
19593
19594 echo "$as_me:19594: checking for builtin bool type" >&5
19595 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19596
19597 if test "${cf_cv_cc_bool_type+set}" = set; then
19598   echo $ECHO_N "(cached) $ECHO_C" >&6
19599 else
19600
19601         cat >conftest.$ac_ext <<_ACEOF
19602 #line 19602 "configure"
19603 #include "confdefs.h"
19604
19605 #include <stdio.h>
19606 #include <sys/types.h>
19607
19608 int
19609 main ()
19610 {
19611 bool x = false
19612   ;
19613   return 0;
19614 }
19615 _ACEOF
19616 rm -f conftest.$ac_objext
19617 if { (eval echo "$as_me:19617: \"$ac_compile\"") >&5
19618   (eval $ac_compile) 2>&5
19619   ac_status=$?
19620   echo "$as_me:19620: \$? = $ac_status" >&5
19621   (exit $ac_status); } &&
19622          { ac_try='test -s conftest.$ac_objext'
19623   { (eval echo "$as_me:19623: \"$ac_try\"") >&5
19624   (eval $ac_try) 2>&5
19625   ac_status=$?
19626   echo "$as_me:19626: \$? = $ac_status" >&5
19627   (exit $ac_status); }; }; then
19628   cf_cv_cc_bool_type=1
19629 else
19630   echo "$as_me: failed program was:" >&5
19631 cat conftest.$ac_ext >&5
19632 cf_cv_cc_bool_type=0
19633 fi
19634 rm -f conftest.$ac_objext conftest.$ac_ext
19635
19636 fi
19637
19638 if test "$cf_cv_cc_bool_type" = 1
19639 then    echo "$as_me:19639: result: yes" >&5
19640 echo "${ECHO_T}yes" >&6
19641 else    echo "$as_me:19641: result: no" >&5
19642 echo "${ECHO_T}no" >&6
19643 fi
19644
19645 # Check for C++ compiler characteristics (and ensure that it's there!)
19646 if test -n "$CXX" ; then
19647         ac_ext=cc
19648 ac_cpp='$CXXCPP $CPPFLAGS'
19649 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19650 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19651 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19652 ac_main_return=return
19653
19654 if test -n "$GXX" ; then
19655
19656         cf_save="$LIBS"
19657         LIBS="$LIBS $CXXLIBS"
19658         echo "$as_me:19658: checking if we already have C++ library" >&5
19659 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19660         cat >conftest.$ac_ext <<_ACEOF
19661 #line 19661 "configure"
19662 #include "confdefs.h"
19663
19664                         #include <iostream>
19665 int
19666 main ()
19667 {
19668
19669                         std::cout << "Hello World!" << std::endl;
19670   ;
19671   return 0;
19672 }
19673 _ACEOF
19674 rm -f conftest.$ac_objext conftest$ac_exeext
19675 if { (eval echo "$as_me:19675: \"$ac_link\"") >&5
19676   (eval $ac_link) 2>&5
19677   ac_status=$?
19678   echo "$as_me:19678: \$? = $ac_status" >&5
19679   (exit $ac_status); } &&
19680          { ac_try='test -s conftest$ac_exeext'
19681   { (eval echo "$as_me:19681: \"$ac_try\"") >&5
19682   (eval $ac_try) 2>&5
19683   ac_status=$?
19684   echo "$as_me:19684: \$? = $ac_status" >&5
19685   (exit $ac_status); }; }; then
19686   cf_have_libstdcpp=yes
19687 else
19688   echo "$as_me: failed program was:" >&5
19689 cat conftest.$ac_ext >&5
19690 cf_have_libstdcpp=no
19691 fi
19692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19693         echo "$as_me:19693: result: $cf_have_libstdcpp" >&5
19694 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19695         LIBS="$cf_save"
19696
19697         if test $cf_have_libstdcpp != yes
19698         then
19699                 case $cf_cv_system_name in
19700                 (os2*)
19701                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
19702                                 cf_stdcpp_libname=stdcpp
19703                         else
19704                                 cf_stdcpp_libname=stdc++
19705                         fi
19706                         ;;
19707                 (*)
19708                         cf_stdcpp_libname=stdc++
19709                         ;;
19710                 esac
19711
19712                 echo "$as_me:19712: checking for library $cf_stdcpp_libname" >&5
19713 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19714 if test "${cf_cv_libstdcpp+set}" = set; then
19715   echo $ECHO_N "(cached) $ECHO_C" >&6
19716 else
19717
19718                         cf_save="$LIBS"
19719                         LIBS="$LIBS $CXXLIBS"
19720
19721 cf_add_libs="-l$cf_stdcpp_libname"
19722 # Filter out duplicates - this happens with badly-designed ".pc" files...
19723 for cf_add_1lib in $LIBS
19724 do
19725         for cf_add_2lib in $cf_add_libs
19726         do
19727                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19728                 then
19729                         cf_add_1lib=
19730                         break
19731                 fi
19732         done
19733         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19734 done
19735 LIBS="$cf_add_libs"
19736
19737                 cat >conftest.$ac_ext <<_ACEOF
19738 #line 19738 "configure"
19739 #include "confdefs.h"
19740
19741                                 #include <iostream>
19742 int
19743 main ()
19744 {
19745
19746                                 std::cout << "Hello World!" << std::endl;
19747   ;
19748   return 0;
19749 }
19750 _ACEOF
19751 rm -f conftest.$ac_objext conftest$ac_exeext
19752 if { (eval echo "$as_me:19752: \"$ac_link\"") >&5
19753   (eval $ac_link) 2>&5
19754   ac_status=$?
19755   echo "$as_me:19755: \$? = $ac_status" >&5
19756   (exit $ac_status); } &&
19757          { ac_try='test -s conftest$ac_exeext'
19758   { (eval echo "$as_me:19758: \"$ac_try\"") >&5
19759   (eval $ac_try) 2>&5
19760   ac_status=$?
19761   echo "$as_me:19761: \$? = $ac_status" >&5
19762   (exit $ac_status); }; }; then
19763   cf_cv_libstdcpp=yes
19764 else
19765   echo "$as_me: failed program was:" >&5
19766 cat conftest.$ac_ext >&5
19767 cf_cv_libstdcpp=no
19768 fi
19769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19770                         LIBS="$cf_save"
19771
19772 fi
19773 echo "$as_me:19773: result: $cf_cv_libstdcpp" >&5
19774 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19775                 test "$cf_cv_libstdcpp" = yes && {
19776 cf_add_libs="-l$cf_stdcpp_libname"
19777 # Filter out duplicates - this happens with badly-designed ".pc" files...
19778 for cf_add_1lib in $CXXLIBS
19779 do
19780         for cf_add_2lib in $cf_add_libs
19781         do
19782                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19783                 then
19784                         cf_add_1lib=
19785                         break
19786                 fi
19787         done
19788         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19789 done
19790 CXXLIBS="$cf_add_libs"
19791  }
19792         fi
19793 fi
19794
19795         echo "$as_me:19795: checking whether $CXX understands -c and -o together" >&5
19796 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19797 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19798   echo $ECHO_N "(cached) $ECHO_C" >&6
19799 else
19800
19801 cat > conftest.$ac_ext <<CF_EOF
19802 int main()
19803 {
19804         ${cf_cv_main_return:-return}(0);
19805 }
19806 CF_EOF
19807 # We do the test twice because some compilers refuse to overwrite an
19808 # existing .o file with -o, though they will create one.
19809 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19810 if { (eval echo "$as_me:19810: \"$ac_try\"") >&5
19811   (eval $ac_try) 2>&5
19812   ac_status=$?
19813   echo "$as_me:19813: \$? = $ac_status" >&5
19814   (exit $ac_status); } &&
19815   test -f conftest2.$ac_objext && { (eval echo "$as_me:19815: \"$ac_try\"") >&5
19816   (eval $ac_try) 2>&5
19817   ac_status=$?
19818   echo "$as_me:19818: \$? = $ac_status" >&5
19819   (exit $ac_status); };
19820 then
19821   eval cf_cv_prog_CXX_c_o=yes
19822 else
19823   eval cf_cv_prog_CXX_c_o=no
19824 fi
19825 rm -rf conftest*
19826
19827 fi
19828 if test $cf_cv_prog_CXX_c_o = yes; then
19829   echo "$as_me:19829: result: yes" >&5
19830 echo "${ECHO_T}yes" >&6
19831 else
19832   echo "$as_me:19832: result: no" >&5
19833 echo "${ECHO_T}no" >&6
19834 fi
19835
19836         case $GXX_VERSION in
19837         (1*|2.0-6*)
19838                 cf_cxx_library=yes
19839                 ;;
19840         (*-2.7*|2.7*)
19841
19842 cf_cxx_library=unknown
19843 case $cf_cv_system_name in
19844 (os2*)
19845         cf_gpp_libname=gpp
19846         ;;
19847 (*)
19848         cf_gpp_libname=g++
19849         ;;
19850 esac
19851 if test "$GXX" = yes; then
19852         echo "$as_me:19852: checking for lib$cf_gpp_libname" >&5
19853 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19854         cf_save="$LIBS"
19855
19856 cf_add_libs="-l$cf_gpp_libname"
19857 # Filter out duplicates - this happens with badly-designed ".pc" files...
19858 for cf_add_1lib in $LIBS
19859 do
19860         for cf_add_2lib in $cf_add_libs
19861         do
19862                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19863                 then
19864                         cf_add_1lib=
19865                         break
19866                 fi
19867         done
19868         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19869 done
19870 LIBS="$cf_add_libs"
19871
19872         cat >conftest.$ac_ext <<_ACEOF
19873 #line 19873 "configure"
19874 #include "confdefs.h"
19875
19876 #include <$cf_gpp_libname/builtin.h>
19877
19878 int
19879 main ()
19880 {
19881 two_arg_error_handler_t foo2 = lib_error_handler
19882   ;
19883   return 0;
19884 }
19885 _ACEOF
19886 rm -f conftest.$ac_objext conftest$ac_exeext
19887 if { (eval echo "$as_me:19887: \"$ac_link\"") >&5
19888   (eval $ac_link) 2>&5
19889   ac_status=$?
19890   echo "$as_me:19890: \$? = $ac_status" >&5
19891   (exit $ac_status); } &&
19892          { ac_try='test -s conftest$ac_exeext'
19893   { (eval echo "$as_me:19893: \"$ac_try\"") >&5
19894   (eval $ac_try) 2>&5
19895   ac_status=$?
19896   echo "$as_me:19896: \$? = $ac_status" >&5
19897   (exit $ac_status); }; }; then
19898   cf_cxx_library=yes
19899
19900 cf_add_libs="-l$cf_gpp_libname"
19901 # Filter out duplicates - this happens with badly-designed ".pc" files...
19902 for cf_add_1lib in $CXXLIBS
19903 do
19904         for cf_add_2lib in $cf_add_libs
19905         do
19906                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19907                 then
19908                         cf_add_1lib=
19909                         break
19910                 fi
19911         done
19912         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19913 done
19914 CXXLIBS="$cf_add_libs"
19915
19916          if test "$cf_gpp_libname" = cpp ; then
19917
19918 cat >>confdefs.h <<\EOF
19919 #define HAVE_GPP_BUILTIN_H 1
19920 EOF
19921
19922          else
19923
19924 cat >>confdefs.h <<\EOF
19925 #define HAVE_GXX_BUILTIN_H 1
19926 EOF
19927
19928          fi
19929 else
19930   echo "$as_me: failed program was:" >&5
19931 cat conftest.$ac_ext >&5
19932 cat >conftest.$ac_ext <<_ACEOF
19933 #line 19933 "configure"
19934 #include "confdefs.h"
19935
19936 #include <builtin.h>
19937
19938 int
19939 main ()
19940 {
19941 two_arg_error_handler_t foo2 = lib_error_handler
19942   ;
19943   return 0;
19944 }
19945 _ACEOF
19946 rm -f conftest.$ac_objext conftest$ac_exeext
19947 if { (eval echo "$as_me:19947: \"$ac_link\"") >&5
19948   (eval $ac_link) 2>&5
19949   ac_status=$?
19950   echo "$as_me:19950: \$? = $ac_status" >&5
19951   (exit $ac_status); } &&
19952          { ac_try='test -s conftest$ac_exeext'
19953   { (eval echo "$as_me:19953: \"$ac_try\"") >&5
19954   (eval $ac_try) 2>&5
19955   ac_status=$?
19956   echo "$as_me:19956: \$? = $ac_status" >&5
19957   (exit $ac_status); }; }; then
19958   cf_cxx_library=yes
19959
19960 cf_add_libs="-l$cf_gpp_libname"
19961 # Filter out duplicates - this happens with badly-designed ".pc" files...
19962 for cf_add_1lib in $CXXLIBS
19963 do
19964         for cf_add_2lib in $cf_add_libs
19965         do
19966                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19967                 then
19968                         cf_add_1lib=
19969                         break
19970                 fi
19971         done
19972         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19973 done
19974 CXXLIBS="$cf_add_libs"
19975
19976 cat >>confdefs.h <<\EOF
19977 #define HAVE_BUILTIN_H 1
19978 EOF
19979
19980 else
19981   echo "$as_me: failed program was:" >&5
19982 cat conftest.$ac_ext >&5
19983 cf_cxx_library=no
19984 fi
19985 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19986 fi
19987 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19988         LIBS="$cf_save"
19989         echo "$as_me:19989: result: $cf_cxx_library" >&5
19990 echo "${ECHO_T}$cf_cxx_library" >&6
19991 fi
19992
19993                 ;;
19994         (*)
19995                 cf_cxx_library=no
19996                 ;;
19997         esac
19998
19999         ac_ext=cc
20000 ac_cpp='$CXXCPP $CPPFLAGS'
20001 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20002 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20003 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20004 ac_main_return=return
20005 echo "$as_me:20005: checking how to run the C++ preprocessor" >&5
20006 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20007 if test -z "$CXXCPP"; then
20008   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20009   echo $ECHO_N "(cached) $ECHO_C" >&6
20010 else
20011       # Double quotes because CXXCPP needs to be expanded
20012     for CXXCPP in "$CXX -E" "/lib/cpp"
20013     do
20014       ac_preproc_ok=false
20015 for ac_cxx_preproc_warn_flag in '' yes
20016 do
20017   # Use a header file that comes with gcc, so configuring glibc
20018   # with a fresh cross-compiler works.
20019   # On the NeXT, cc -E runs the code through the compiler's parser,
20020   # not just through cpp. "Syntax error" is here to catch this case.
20021   cat >conftest.$ac_ext <<_ACEOF
20022 #line 20022 "configure"
20023 #include "confdefs.h"
20024 #include <assert.h>
20025                      Syntax error
20026 _ACEOF
20027 if { (eval echo "$as_me:20027: \"$ac_cpp conftest.$ac_ext\"") >&5
20028   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20029   ac_status=$?
20030   egrep -v '^ *\+' conftest.er1 >conftest.err
20031   rm -f conftest.er1
20032   cat conftest.err >&5
20033   echo "$as_me:20033: \$? = $ac_status" >&5
20034   (exit $ac_status); } >/dev/null; then
20035   if test -s conftest.err; then
20036     ac_cpp_err=$ac_cxx_preproc_warn_flag
20037   else
20038     ac_cpp_err=
20039   fi
20040 else
20041   ac_cpp_err=yes
20042 fi
20043 if test -z "$ac_cpp_err"; then
20044   :
20045 else
20046   echo "$as_me: failed program was:" >&5
20047   cat conftest.$ac_ext >&5
20048   # Broken: fails on valid input.
20049 continue
20050 fi
20051 rm -f conftest.err conftest.$ac_ext
20052
20053   # OK, works on sane cases.  Now check whether non-existent headers
20054   # can be detected and how.
20055   cat >conftest.$ac_ext <<_ACEOF
20056 #line 20056 "configure"
20057 #include "confdefs.h"
20058 #include <ac_nonexistent.h>
20059 _ACEOF
20060 if { (eval echo "$as_me:20060: \"$ac_cpp conftest.$ac_ext\"") >&5
20061   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20062   ac_status=$?
20063   egrep -v '^ *\+' conftest.er1 >conftest.err
20064   rm -f conftest.er1
20065   cat conftest.err >&5
20066   echo "$as_me:20066: \$? = $ac_status" >&5
20067   (exit $ac_status); } >/dev/null; then
20068   if test -s conftest.err; then
20069     ac_cpp_err=$ac_cxx_preproc_warn_flag
20070   else
20071     ac_cpp_err=
20072   fi
20073 else
20074   ac_cpp_err=yes
20075 fi
20076 if test -z "$ac_cpp_err"; then
20077   # Broken: success on invalid input.
20078 continue
20079 else
20080   echo "$as_me: failed program was:" >&5
20081   cat conftest.$ac_ext >&5
20082   # Passes both tests.
20083 ac_preproc_ok=:
20084 break
20085 fi
20086 rm -f conftest.err conftest.$ac_ext
20087
20088 done
20089 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20090 rm -f conftest.err conftest.$ac_ext
20091 if $ac_preproc_ok; then
20092   break
20093 fi
20094
20095     done
20096     ac_cv_prog_CXXCPP=$CXXCPP
20097
20098 fi
20099   CXXCPP=$ac_cv_prog_CXXCPP
20100 else
20101   ac_cv_prog_CXXCPP=$CXXCPP
20102 fi
20103 echo "$as_me:20103: result: $CXXCPP" >&5
20104 echo "${ECHO_T}$CXXCPP" >&6
20105 ac_preproc_ok=false
20106 for ac_cxx_preproc_warn_flag in '' yes
20107 do
20108   # Use a header file that comes with gcc, so configuring glibc
20109   # with a fresh cross-compiler works.
20110   # On the NeXT, cc -E runs the code through the compiler's parser,
20111   # not just through cpp. "Syntax error" is here to catch this case.
20112   cat >conftest.$ac_ext <<_ACEOF
20113 #line 20113 "configure"
20114 #include "confdefs.h"
20115 #include <assert.h>
20116                      Syntax error
20117 _ACEOF
20118 if { (eval echo "$as_me:20118: \"$ac_cpp conftest.$ac_ext\"") >&5
20119   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20120   ac_status=$?
20121   egrep -v '^ *\+' conftest.er1 >conftest.err
20122   rm -f conftest.er1
20123   cat conftest.err >&5
20124   echo "$as_me:20124: \$? = $ac_status" >&5
20125   (exit $ac_status); } >/dev/null; then
20126   if test -s conftest.err; then
20127     ac_cpp_err=$ac_cxx_preproc_warn_flag
20128   else
20129     ac_cpp_err=
20130   fi
20131 else
20132   ac_cpp_err=yes
20133 fi
20134 if test -z "$ac_cpp_err"; then
20135   :
20136 else
20137   echo "$as_me: failed program was:" >&5
20138   cat conftest.$ac_ext >&5
20139   # Broken: fails on valid input.
20140 continue
20141 fi
20142 rm -f conftest.err conftest.$ac_ext
20143
20144   # OK, works on sane cases.  Now check whether non-existent headers
20145   # can be detected and how.
20146   cat >conftest.$ac_ext <<_ACEOF
20147 #line 20147 "configure"
20148 #include "confdefs.h"
20149 #include <ac_nonexistent.h>
20150 _ACEOF
20151 if { (eval echo "$as_me:20151: \"$ac_cpp conftest.$ac_ext\"") >&5
20152   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20153   ac_status=$?
20154   egrep -v '^ *\+' conftest.er1 >conftest.err
20155   rm -f conftest.er1
20156   cat conftest.err >&5
20157   echo "$as_me:20157: \$? = $ac_status" >&5
20158   (exit $ac_status); } >/dev/null; then
20159   if test -s conftest.err; then
20160     ac_cpp_err=$ac_cxx_preproc_warn_flag
20161   else
20162     ac_cpp_err=
20163   fi
20164 else
20165   ac_cpp_err=yes
20166 fi
20167 if test -z "$ac_cpp_err"; then
20168   # Broken: success on invalid input.
20169 continue
20170 else
20171   echo "$as_me: failed program was:" >&5
20172   cat conftest.$ac_ext >&5
20173   # Passes both tests.
20174 ac_preproc_ok=:
20175 break
20176 fi
20177 rm -f conftest.err conftest.$ac_ext
20178
20179 done
20180 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20181 rm -f conftest.err conftest.$ac_ext
20182 if $ac_preproc_ok; then
20183   :
20184 else
20185   { { echo "$as_me:20185: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20186 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20187    { (exit 1); exit 1; }; }
20188 fi
20189
20190 ac_ext=cc
20191 ac_cpp='$CXXCPP $CPPFLAGS'
20192 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20193 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20194 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20195 ac_main_return=return
20196
20197 for ac_header in typeinfo
20198 do
20199 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20200 echo "$as_me:20200: checking for $ac_header" >&5
20201 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20202 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20203   echo $ECHO_N "(cached) $ECHO_C" >&6
20204 else
20205   cat >conftest.$ac_ext <<_ACEOF
20206 #line 20206 "configure"
20207 #include "confdefs.h"
20208 #include <$ac_header>
20209 _ACEOF
20210 if { (eval echo "$as_me:20210: \"$ac_cpp conftest.$ac_ext\"") >&5
20211   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20212   ac_status=$?
20213   egrep -v '^ *\+' conftest.er1 >conftest.err
20214   rm -f conftest.er1
20215   cat conftest.err >&5
20216   echo "$as_me:20216: \$? = $ac_status" >&5
20217   (exit $ac_status); } >/dev/null; then
20218   if test -s conftest.err; then
20219     ac_cpp_err=$ac_cxx_preproc_warn_flag
20220   else
20221     ac_cpp_err=
20222   fi
20223 else
20224   ac_cpp_err=yes
20225 fi
20226 if test -z "$ac_cpp_err"; then
20227   eval "$as_ac_Header=yes"
20228 else
20229   echo "$as_me: failed program was:" >&5
20230   cat conftest.$ac_ext >&5
20231   eval "$as_ac_Header=no"
20232 fi
20233 rm -f conftest.err conftest.$ac_ext
20234 fi
20235 echo "$as_me:20235: result: `eval echo '${'$as_ac_Header'}'`" >&5
20236 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20237 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20238   cat >>confdefs.h <<EOF
20239 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20240 EOF
20241
20242 fi
20243 done
20244
20245 for ac_header in iostream
20246 do
20247 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20248 echo "$as_me:20248: checking for $ac_header" >&5
20249 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20250 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20251   echo $ECHO_N "(cached) $ECHO_C" >&6
20252 else
20253   cat >conftest.$ac_ext <<_ACEOF
20254 #line 20254 "configure"
20255 #include "confdefs.h"
20256 #include <$ac_header>
20257 _ACEOF
20258 if { (eval echo "$as_me:20258: \"$ac_cpp conftest.$ac_ext\"") >&5
20259   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20260   ac_status=$?
20261   egrep -v '^ *\+' conftest.er1 >conftest.err
20262   rm -f conftest.er1
20263   cat conftest.err >&5
20264   echo "$as_me:20264: \$? = $ac_status" >&5
20265   (exit $ac_status); } >/dev/null; then
20266   if test -s conftest.err; then
20267     ac_cpp_err=$ac_cxx_preproc_warn_flag
20268   else
20269     ac_cpp_err=
20270   fi
20271 else
20272   ac_cpp_err=yes
20273 fi
20274 if test -z "$ac_cpp_err"; then
20275   eval "$as_ac_Header=yes"
20276 else
20277   echo "$as_me: failed program was:" >&5
20278   cat conftest.$ac_ext >&5
20279   eval "$as_ac_Header=no"
20280 fi
20281 rm -f conftest.err conftest.$ac_ext
20282 fi
20283 echo "$as_me:20283: result: `eval echo '${'$as_ac_Header'}'`" >&5
20284 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20285 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20286   cat >>confdefs.h <<EOF
20287 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20288 EOF
20289
20290 fi
20291 done
20292
20293 if test x"$ac_cv_header_iostream" = xyes ; then
20294         echo "$as_me:20294: checking if iostream uses std-namespace" >&5
20295 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20296         cat >conftest.$ac_ext <<_ACEOF
20297 #line 20297 "configure"
20298 #include "confdefs.h"
20299
20300 #include <iostream>
20301 using std::endl;
20302 using std::cerr;
20303 int
20304 main ()
20305 {
20306
20307 cerr << "testing" << endl;
20308
20309   ;
20310   return 0;
20311 }
20312 _ACEOF
20313 rm -f conftest.$ac_objext
20314 if { (eval echo "$as_me:20314: \"$ac_compile\"") >&5
20315   (eval $ac_compile) 2>&5
20316   ac_status=$?
20317   echo "$as_me:20317: \$? = $ac_status" >&5
20318   (exit $ac_status); } &&
20319          { ac_try='test -s conftest.$ac_objext'
20320   { (eval echo "$as_me:20320: \"$ac_try\"") >&5
20321   (eval $ac_try) 2>&5
20322   ac_status=$?
20323   echo "$as_me:20323: \$? = $ac_status" >&5
20324   (exit $ac_status); }; }; then
20325   cf_iostream_namespace=yes
20326 else
20327   echo "$as_me: failed program was:" >&5
20328 cat conftest.$ac_ext >&5
20329 cf_iostream_namespace=no
20330 fi
20331 rm -f conftest.$ac_objext conftest.$ac_ext
20332         echo "$as_me:20332: result: $cf_iostream_namespace" >&5
20333 echo "${ECHO_T}$cf_iostream_namespace" >&6
20334         if test "$cf_iostream_namespace" = yes ; then
20335
20336 cat >>confdefs.h <<\EOF
20337 #define IOSTREAM_NAMESPACE 1
20338 EOF
20339
20340         fi
20341 fi
20342
20343 echo "$as_me:20343: checking if we should include stdbool.h" >&5
20344 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20345
20346 if test "${cf_cv_header_stdbool_h+set}" = set; then
20347   echo $ECHO_N "(cached) $ECHO_C" >&6
20348 else
20349
20350         cat >conftest.$ac_ext <<_ACEOF
20351 #line 20351 "configure"
20352 #include "confdefs.h"
20353
20354 int
20355 main ()
20356 {
20357 bool foo = false
20358   ;
20359   return 0;
20360 }
20361 _ACEOF
20362 rm -f conftest.$ac_objext
20363 if { (eval echo "$as_me:20363: \"$ac_compile\"") >&5
20364   (eval $ac_compile) 2>&5
20365   ac_status=$?
20366   echo "$as_me:20366: \$? = $ac_status" >&5
20367   (exit $ac_status); } &&
20368          { ac_try='test -s conftest.$ac_objext'
20369   { (eval echo "$as_me:20369: \"$ac_try\"") >&5
20370   (eval $ac_try) 2>&5
20371   ac_status=$?
20372   echo "$as_me:20372: \$? = $ac_status" >&5
20373   (exit $ac_status); }; }; then
20374   cf_cv_header_stdbool_h=0
20375 else
20376   echo "$as_me: failed program was:" >&5
20377 cat conftest.$ac_ext >&5
20378 cat >conftest.$ac_ext <<_ACEOF
20379 #line 20379 "configure"
20380 #include "confdefs.h"
20381
20382 #ifndef __BEOS__
20383 #include <stdbool.h>
20384 #endif
20385
20386 int
20387 main ()
20388 {
20389 bool foo = false
20390   ;
20391   return 0;
20392 }
20393 _ACEOF
20394 rm -f conftest.$ac_objext
20395 if { (eval echo "$as_me:20395: \"$ac_compile\"") >&5
20396   (eval $ac_compile) 2>&5
20397   ac_status=$?
20398   echo "$as_me:20398: \$? = $ac_status" >&5
20399   (exit $ac_status); } &&
20400          { ac_try='test -s conftest.$ac_objext'
20401   { (eval echo "$as_me:20401: \"$ac_try\"") >&5
20402   (eval $ac_try) 2>&5
20403   ac_status=$?
20404   echo "$as_me:20404: \$? = $ac_status" >&5
20405   (exit $ac_status); }; }; then
20406   cf_cv_header_stdbool_h=1
20407 else
20408   echo "$as_me: failed program was:" >&5
20409 cat conftest.$ac_ext >&5
20410 cf_cv_header_stdbool_h=0
20411 fi
20412 rm -f conftest.$ac_objext conftest.$ac_ext
20413 fi
20414 rm -f conftest.$ac_objext conftest.$ac_ext
20415 fi
20416
20417 if test "$cf_cv_header_stdbool_h" = 1
20418 then    echo "$as_me:20418: result: yes" >&5
20419 echo "${ECHO_T}yes" >&6
20420 else    echo "$as_me:20420: result: no" >&5
20421 echo "${ECHO_T}no" >&6
20422 fi
20423
20424 echo "$as_me:20424: checking for builtin bool type" >&5
20425 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20426
20427 if test "${cf_cv_builtin_bool+set}" = set; then
20428   echo $ECHO_N "(cached) $ECHO_C" >&6
20429 else
20430
20431         cat >conftest.$ac_ext <<_ACEOF
20432 #line 20432 "configure"
20433 #include "confdefs.h"
20434
20435 #include <stdio.h>
20436 #include <sys/types.h>
20437
20438 int
20439 main ()
20440 {
20441 bool x = false
20442   ;
20443   return 0;
20444 }
20445 _ACEOF
20446 rm -f conftest.$ac_objext
20447 if { (eval echo "$as_me:20447: \"$ac_compile\"") >&5
20448   (eval $ac_compile) 2>&5
20449   ac_status=$?
20450   echo "$as_me:20450: \$? = $ac_status" >&5
20451   (exit $ac_status); } &&
20452          { ac_try='test -s conftest.$ac_objext'
20453   { (eval echo "$as_me:20453: \"$ac_try\"") >&5
20454   (eval $ac_try) 2>&5
20455   ac_status=$?
20456   echo "$as_me:20456: \$? = $ac_status" >&5
20457   (exit $ac_status); }; }; then
20458   cf_cv_builtin_bool=1
20459 else
20460   echo "$as_me: failed program was:" >&5
20461 cat conftest.$ac_ext >&5
20462 cf_cv_builtin_bool=0
20463 fi
20464 rm -f conftest.$ac_objext conftest.$ac_ext
20465
20466 fi
20467
20468 if test "$cf_cv_builtin_bool" = 1
20469 then    echo "$as_me:20469: result: yes" >&5
20470 echo "${ECHO_T}yes" >&6
20471 else    echo "$as_me:20471: result: no" >&5
20472 echo "${ECHO_T}no" >&6
20473 fi
20474
20475 echo "$as_me:20475: checking for size of bool" >&5
20476 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20477 if test "${cf_cv_type_of_bool+set}" = set; then
20478   echo $ECHO_N "(cached) $ECHO_C" >&6
20479 else
20480
20481         rm -f cf_test.out
20482         if test "$cross_compiling" = yes; then
20483   cf_cv_type_of_bool=unknown
20484 else
20485   cat >conftest.$ac_ext <<_ACEOF
20486 #line 20486 "configure"
20487 #include "confdefs.h"
20488
20489 #include <stdlib.h>
20490 #include <stdio.h>
20491
20492 #if defined(__cplusplus)
20493
20494 #ifdef HAVE_GXX_BUILTIN_H
20495 #include <g++/builtin.h>
20496 #elif HAVE_GPP_BUILTIN_H
20497 #include <gpp/builtin.h>
20498 #elif HAVE_BUILTIN_H
20499 #include <builtin.h>
20500 #endif
20501
20502 #else
20503
20504 #if $cf_cv_header_stdbool_h
20505 #include <stdbool.h>
20506 #endif
20507
20508 #endif
20509
20510 int main()
20511 {
20512         FILE *fp = fopen("cf_test.out", "w");
20513         if (fp != 0) {
20514                 bool x = true;
20515                 if ((bool)(-x) >= 0)
20516                         fputs("unsigned ", fp);
20517                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20518                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20519                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20520                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20521                 fclose(fp);
20522         }
20523         ${cf_cv_main_return:-return}(0);
20524 }
20525
20526 _ACEOF
20527 rm -f conftest$ac_exeext
20528 if { (eval echo "$as_me:20528: \"$ac_link\"") >&5
20529   (eval $ac_link) 2>&5
20530   ac_status=$?
20531   echo "$as_me:20531: \$? = $ac_status" >&5
20532   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20533   { (eval echo "$as_me:20533: \"$ac_try\"") >&5
20534   (eval $ac_try) 2>&5
20535   ac_status=$?
20536   echo "$as_me:20536: \$? = $ac_status" >&5
20537   (exit $ac_status); }; }; then
20538   cf_cv_type_of_bool=`cat cf_test.out`
20539                  if test -z "$cf_cv_type_of_bool"; then
20540                    cf_cv_type_of_bool=unknown
20541                  fi
20542 else
20543   echo "$as_me: program exited with status $ac_status" >&5
20544 echo "$as_me: failed program was:" >&5
20545 cat conftest.$ac_ext >&5
20546 cf_cv_type_of_bool=unknown
20547 fi
20548 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20549 fi
20550
20551 fi
20552
20553         rm -f cf_test.out
20554 echo "$as_me:20554: result: $cf_cv_type_of_bool" >&5
20555 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20556 if test "$cf_cv_type_of_bool" = unknown ; then
20557         case .$NCURSES_BOOL in
20558         (.auto|.) NCURSES_BOOL=unsigned;;
20559         esac
20560         { echo "$as_me:20560: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20561 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20562         cf_cv_type_of_bool=$NCURSES_BOOL
20563 fi
20564
20565 echo "$as_me:20565: checking for special defines needed for etip.h" >&5
20566 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20567 cf_save_CXXFLAGS="$CXXFLAGS"
20568 cf_result="none"
20569
20570 # etip.h includes ncurses.h which includes ncurses_dll.h
20571 # But ncurses_dll.h is generated - fix here.
20572 test -d include || mkdir include
20573 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
20574
20575 for cf_math in "" MATH_H
20576 do
20577 for cf_excp in "" MATH_EXCEPTION
20578 do
20579         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20580         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20581         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20582 cat >conftest.$ac_ext <<_ACEOF
20583 #line 20583 "configure"
20584 #include "confdefs.h"
20585
20586 #include <etip.h.in>
20587
20588 int
20589 main ()
20590 {
20591
20592   ;
20593   return 0;
20594 }
20595 _ACEOF
20596 rm -f conftest.$ac_objext
20597 if { (eval echo "$as_me:20597: \"$ac_compile\"") >&5
20598   (eval $ac_compile) 2>&5
20599   ac_status=$?
20600   echo "$as_me:20600: \$? = $ac_status" >&5
20601   (exit $ac_status); } &&
20602          { ac_try='test -s conftest.$ac_objext'
20603   { (eval echo "$as_me:20603: \"$ac_try\"") >&5
20604   (eval $ac_try) 2>&5
20605   ac_status=$?
20606   echo "$as_me:20606: \$? = $ac_status" >&5
20607   (exit $ac_status); }; }; then
20608
20609         test -n "$cf_math" && cat >>confdefs.h <<EOF
20610 #define ETIP_NEEDS_${cf_math} 1
20611 EOF
20612
20613         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20614 #define ETIP_NEEDS_${cf_excp} 1
20615 EOF
20616
20617         cf_result="$cf_math $cf_excp"
20618         break 2
20619
20620 else
20621   echo "$as_me: failed program was:" >&5
20622 cat conftest.$ac_ext >&5
20623 fi
20624 rm -f conftest.$ac_objext conftest.$ac_ext
20625 done
20626 done
20627 echo "$as_me:20627: result: $cf_result" >&5
20628 echo "${ECHO_T}$cf_result" >&6
20629 CXXFLAGS="$cf_save_CXXFLAGS"
20630
20631 if test -n "$CXX"; then
20632 echo "$as_me:20632: checking if $CXX accepts parameter initialization" >&5
20633 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20634 if test "${cf_cv_cpp_param_init+set}" = set; then
20635   echo $ECHO_N "(cached) $ECHO_C" >&6
20636 else
20637
20638         ac_ext=cc
20639 ac_cpp='$CXXCPP $CPPFLAGS'
20640 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20641 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20642 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20643 ac_main_return=return
20644
20645         if test "$cross_compiling" = yes; then
20646   cf_cv_cpp_param_init=unknown
20647 else
20648   cat >conftest.$ac_ext <<_ACEOF
20649 #line 20649 "configure"
20650 #include "confdefs.h"
20651
20652 class TEST {
20653 private:
20654         int value;
20655 public:
20656         TEST(int x = 1);
20657         ~TEST();
20658 };
20659
20660 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20661 {
20662         value = x;
20663 }
20664 int main() { }
20665
20666 _ACEOF
20667 rm -f conftest$ac_exeext
20668 if { (eval echo "$as_me:20668: \"$ac_link\"") >&5
20669   (eval $ac_link) 2>&5
20670   ac_status=$?
20671   echo "$as_me:20671: \$? = $ac_status" >&5
20672   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20673   { (eval echo "$as_me:20673: \"$ac_try\"") >&5
20674   (eval $ac_try) 2>&5
20675   ac_status=$?
20676   echo "$as_me:20676: \$? = $ac_status" >&5
20677   (exit $ac_status); }; }; then
20678   cf_cv_cpp_param_init=yes
20679 else
20680   echo "$as_me: program exited with status $ac_status" >&5
20681 echo "$as_me: failed program was:" >&5
20682 cat conftest.$ac_ext >&5
20683 cf_cv_cpp_param_init=no
20684 fi
20685 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20686 fi
20687         ac_ext=cc
20688 ac_cpp='$CXXCPP $CPPFLAGS'
20689 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20690 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20691 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20692 ac_main_return=return
20693
20694 fi
20695 echo "$as_me:20695: result: $cf_cv_cpp_param_init" >&5
20696 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20697 fi
20698 test "$cf_cv_cpp_param_init" = yes &&
20699 cat >>confdefs.h <<\EOF
20700 #define CPP_HAS_PARAM_INIT 1
20701 EOF
20702
20703 if test -n "$CXX"; then
20704
20705 echo "$as_me:20705: checking if $CXX accepts static_cast" >&5
20706 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20707 if test "${cf_cv_cpp_static_cast+set}" = set; then
20708   echo $ECHO_N "(cached) $ECHO_C" >&6
20709 else
20710
20711         ac_ext=cc
20712 ac_cpp='$CXXCPP $CPPFLAGS'
20713 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20714 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20715 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20716 ac_main_return=return
20717
20718         cat >conftest.$ac_ext <<_ACEOF
20719 #line 20719 "configure"
20720 #include "confdefs.h"
20721
20722 class NCursesPanel
20723 {
20724 public:
20725   NCursesPanel(int nlines,
20726                int ncols,
20727                int begin_y = 0,
20728                int begin_x = 0)
20729   {
20730   }
20731   NCursesPanel();
20732   ~NCursesPanel();
20733 };
20734
20735 template<class T> class NCursesUserPanel : public NCursesPanel
20736 {
20737 public:
20738   NCursesUserPanel (int nlines,
20739                     int ncols,
20740                     int begin_y = 0,
20741                     int begin_x = 0,
20742                     const T* p_UserData = static_cast<T*>(0))
20743     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20744   {
20745   };
20746   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20747   {
20748   };
20749
20750   virtual ~NCursesUserPanel() {};
20751 };
20752
20753 int
20754 main ()
20755 {
20756
20757         const char* p_UserData = static_cast<char*>(0)
20758   ;
20759   return 0;
20760 }
20761 _ACEOF
20762 rm -f conftest.$ac_objext
20763 if { (eval echo "$as_me:20763: \"$ac_compile\"") >&5
20764   (eval $ac_compile) 2>&5
20765   ac_status=$?
20766   echo "$as_me:20766: \$? = $ac_status" >&5
20767   (exit $ac_status); } &&
20768          { ac_try='test -s conftest.$ac_objext'
20769   { (eval echo "$as_me:20769: \"$ac_try\"") >&5
20770   (eval $ac_try) 2>&5
20771   ac_status=$?
20772   echo "$as_me:20772: \$? = $ac_status" >&5
20773   (exit $ac_status); }; }; then
20774   cf_cv_cpp_static_cast=yes
20775 else
20776   echo "$as_me: failed program was:" >&5
20777 cat conftest.$ac_ext >&5
20778 cf_cv_cpp_static_cast=no
20779 fi
20780 rm -f conftest.$ac_objext conftest.$ac_ext
20781
20782         ac_ext=cc
20783 ac_cpp='$CXXCPP $CPPFLAGS'
20784 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20785 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20786 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20787 ac_main_return=return
20788
20789 fi
20790 echo "$as_me:20790: result: $cf_cv_cpp_static_cast" >&5
20791 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20792
20793 fi
20794
20795 test "$cf_cv_cpp_static_cast" = yes &&
20796 cat >>confdefs.h <<\EOF
20797 #define CPP_HAS_STATIC_CAST 1
20798 EOF
20799
20800         CXX_AR='$(AR)'
20801         CXX_ARFLAGS='$(ARFLAGS)'
20802         case $cf_cv_system_name in
20803         (irix*)
20804             if test "$GXX" != yes ; then
20805                 CXX_AR='$(CXX)'
20806                 CXX_ARFLAGS='-ar -o'
20807             fi
20808             ;;
20809         (sco3.2v5*)
20810             CXXLDFLAGS="-u main"
20811             ;;
20812         (solaris2*)
20813             if test "$GXX" != yes ; then
20814                 CXX_AR='$(CXX)'
20815                 CXX_ARFLAGS='-xar -o'
20816             fi
20817             ;;
20818         esac
20819
20820 else
20821         cf_cxx_library=no
20822         cf_cv_builtin_bool=1
20823
20824         # Just because we are not configuring against C++ right now does not
20825         # mean that a user will not want to use C++.  Some distributors disable
20826         # the C++ portion of this configuration as a shortcut (or just to avoid
20827         # compiling the demo in the c++ directory).  So we need a reasonable
20828         # default for the 'bool' type.
20829         #
20830         # Caveat: since the storage of the bool type is not standardized, it
20831         # may change.
20832
20833         if test "$NCURSES_BOOL" != auto ; then
20834                 cf_cv_type_of_bool=$NCURSES_BOOL
20835                 cf_cv_header_stdbool_h=0
20836         else
20837                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20838
20839 echo "$as_me:20839: checking for size of bool" >&5
20840 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20841 if test "${cf_cv_type_of_bool+set}" = set; then
20842   echo $ECHO_N "(cached) $ECHO_C" >&6
20843 else
20844
20845         rm -f cf_test.out
20846         if test "$cross_compiling" = yes; then
20847   cf_cv_type_of_bool=unknown
20848 else
20849   cat >conftest.$ac_ext <<_ACEOF
20850 #line 20850 "configure"
20851 #include "confdefs.h"
20852
20853 #include <stdlib.h>
20854 #include <stdio.h>
20855
20856 #if defined(__cplusplus)
20857
20858 #ifdef HAVE_GXX_BUILTIN_H
20859 #include <g++/builtin.h>
20860 #elif HAVE_GPP_BUILTIN_H
20861 #include <gpp/builtin.h>
20862 #elif HAVE_BUILTIN_H
20863 #include <builtin.h>
20864 #endif
20865
20866 #else
20867
20868 #if $cf_cv_header_stdbool_h
20869 #include <stdbool.h>
20870 #endif
20871
20872 #endif
20873
20874 int main()
20875 {
20876         FILE *fp = fopen("cf_test.out", "w");
20877         if (fp != 0) {
20878                 bool x = true;
20879                 if ((bool)(-x) >= 0)
20880                         fputs("unsigned ", fp);
20881                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20882                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20883                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20884                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20885                 fclose(fp);
20886         }
20887         ${cf_cv_main_return:-return}(0);
20888 }
20889
20890 _ACEOF
20891 rm -f conftest$ac_exeext
20892 if { (eval echo "$as_me:20892: \"$ac_link\"") >&5
20893   (eval $ac_link) 2>&5
20894   ac_status=$?
20895   echo "$as_me:20895: \$? = $ac_status" >&5
20896   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20897   { (eval echo "$as_me:20897: \"$ac_try\"") >&5
20898   (eval $ac_try) 2>&5
20899   ac_status=$?
20900   echo "$as_me:20900: \$? = $ac_status" >&5
20901   (exit $ac_status); }; }; then
20902   cf_cv_type_of_bool=`cat cf_test.out`
20903                  if test -z "$cf_cv_type_of_bool"; then
20904                    cf_cv_type_of_bool=unknown
20905                  fi
20906 else
20907   echo "$as_me: program exited with status $ac_status" >&5
20908 echo "$as_me: failed program was:" >&5
20909 cat conftest.$ac_ext >&5
20910 cf_cv_type_of_bool=unknown
20911 fi
20912 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20913 fi
20914
20915 fi
20916
20917         rm -f cf_test.out
20918 echo "$as_me:20918: result: $cf_cv_type_of_bool" >&5
20919 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20920 if test "$cf_cv_type_of_bool" = unknown ; then
20921         case .$NCURSES_BOOL in
20922         (.auto|.) NCURSES_BOOL=unsigned;;
20923         esac
20924         { echo "$as_me:20924: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20925 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20926         cf_cv_type_of_bool=$NCURSES_BOOL
20927 fi
20928
20929                 else
20930                         echo "$as_me:20930: checking for fallback type of bool" >&5
20931 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20932                         case "$host_cpu" in
20933                         (i?86)  cf_cv_type_of_bool=char ;;
20934                         (*)     cf_cv_type_of_bool=int  ;;
20935                         esac
20936                         echo "$as_me:20936: result: $cf_cv_type_of_bool" >&5
20937 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20938                 fi
20939         fi
20940 fi
20941
20942 # If the C compiler did not declare bool, and we did not determine that the C++
20943 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20944 # ncurses library use the same type as C++ bool.  Note that this allows one to
20945 # specify the type of bool in a configure-script option and postpone
20946 # integration with the C++ compiler provided that the types are compatible.
20947 USE_CXX_BOOL=1
20948 if test $cf_cv_cc_bool_type = 1
20949 then
20950         # oops: C has a bool.  Unlikely, but C++ could differ.
20951         USE_CXX_BOOL=0
20952 elif test $cf_cv_builtin_bool = 0
20953 then
20954         # C++ has no bool
20955         USE_CXX_BOOL=0
20956 else
20957         # this is the normal case
20958         USE_CXX_BOOL='defined(__cplusplus)'
20959 fi
20960
20961 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20962
20963         if test "$cf_with_ada" != "no" ; then
20964                 if test "$with_libtool" != "no"; then
20965                         { echo "$as_me:20965: WARNING: libtool does not support Ada - disabling feature" >&5
20966 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20967                         cf_with_ada=no
20968                 fi
20969         fi
20970
20971         if test "$cf_with_ada" != "no" ; then
20972
20973 cf_ada_make=gnatmake
20974 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20975 set dummy $cf_ada_make; ac_word=$2
20976 echo "$as_me:20976: checking for $ac_word" >&5
20977 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20978 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20979   echo $ECHO_N "(cached) $ECHO_C" >&6
20980 else
20981   if test -n "$gnat_exists"; then
20982   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20983 else
20984   ac_save_IFS=$IFS; IFS=$ac_path_separator
20985 ac_dummy="$PATH"
20986 for ac_dir in $ac_dummy; do
20987   IFS=$ac_save_IFS
20988   test -z "$ac_dir" && ac_dir=.
20989   $as_executable_p "$ac_dir/$ac_word" || continue
20990 ac_cv_prog_gnat_exists="yes"
20991 echo "$as_me:20991: found $ac_dir/$ac_word" >&5
20992 break
20993 done
20994
20995   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20996 fi
20997 fi
20998 gnat_exists=$ac_cv_prog_gnat_exists
20999 if test -n "$gnat_exists"; then
21000   echo "$as_me:21000: result: $gnat_exists" >&5
21001 echo "${ECHO_T}$gnat_exists" >&6
21002 else
21003   echo "$as_me:21003: result: no" >&5
21004 echo "${ECHO_T}no" >&6
21005 fi
21006
21007 if test "$ac_cv_prog_gnat_exists" = no; then
21008         cf_ada_make=
21009         cf_cv_prog_gnat_correct=no
21010 else
21011
21012 echo "$as_me:21012: checking for gnat version" >&5
21013 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21014 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21015         grep '[0-9].[0-9][0-9]*' |\
21016         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21017 echo "$as_me:21017: result: $cf_gnat_version" >&5
21018 echo "${ECHO_T}$cf_gnat_version" >&6
21019
21020 case $cf_gnat_version in
21021 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21022         cf_cv_prog_gnat_correct=yes
21023         ;;
21024 (*)
21025         { echo "$as_me:21025: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21026 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21027         cf_cv_prog_gnat_correct=no
21028         ;;
21029 esac
21030
21031         # Extract the first word of "m4", so it can be a program name with args.
21032 set dummy m4; ac_word=$2
21033 echo "$as_me:21033: checking for $ac_word" >&5
21034 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21035 if test "${ac_cv_prog_M4_exists+set}" = set; then
21036   echo $ECHO_N "(cached) $ECHO_C" >&6
21037 else
21038   if test -n "$M4_exists"; then
21039   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21040 else
21041   ac_save_IFS=$IFS; IFS=$ac_path_separator
21042 ac_dummy="$PATH"
21043 for ac_dir in $ac_dummy; do
21044   IFS=$ac_save_IFS
21045   test -z "$ac_dir" && ac_dir=.
21046   $as_executable_p "$ac_dir/$ac_word" || continue
21047 ac_cv_prog_M4_exists="yes"
21048 echo "$as_me:21048: found $ac_dir/$ac_word" >&5
21049 break
21050 done
21051
21052   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21053 fi
21054 fi
21055 M4_exists=$ac_cv_prog_M4_exists
21056 if test -n "$M4_exists"; then
21057   echo "$as_me:21057: result: $M4_exists" >&5
21058 echo "${ECHO_T}$M4_exists" >&6
21059 else
21060   echo "$as_me:21060: result: no" >&5
21061 echo "${ECHO_T}no" >&6
21062 fi
21063
21064         if test "$ac_cv_prog_M4_exists" = no; then
21065                 cf_cv_prog_gnat_correct=no
21066                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21067         fi
21068         if test "$cf_cv_prog_gnat_correct" = yes; then
21069                 echo "$as_me:21069: checking if GNAT works" >&5
21070 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21071
21072 rm -rf conftest* *~conftest*
21073 cat >>conftest.ads <<CF_EOF
21074 procedure conftest;
21075 CF_EOF
21076 cat >>conftest.adb <<CF_EOF
21077 with Text_IO;
21078 with GNAT.OS_Lib;
21079 procedure conftest is
21080 begin
21081    Text_IO.Put ("Hello World");
21082    Text_IO.New_Line;
21083    GNAT.OS_Lib.OS_Exit (0);
21084 end conftest;
21085 CF_EOF
21086 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21087    if ( ./conftest 1>&5 2>&1 ) ; then
21088       cf_cv_prog_gnat_correct=yes
21089    else
21090       cf_cv_prog_gnat_correct=no
21091    fi
21092 else
21093    cf_cv_prog_gnat_correct=no
21094 fi
21095 rm -rf conftest* *~conftest*
21096
21097                 echo "$as_me:21097: result: $cf_cv_prog_gnat_correct" >&5
21098 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21099         fi
21100 fi
21101
21102                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21103
21104         ADAFLAGS="$ADAFLAGS -gnatpn"
21105
21106         echo "$as_me:21106: checking optimization options for ADAFLAGS" >&5
21107 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21108         case "$CFLAGS" in
21109         (*-g*)
21110
21111         ADAFLAGS="$ADAFLAGS -g"
21112
21113                 ;;
21114         esac
21115         case "$CFLAGS" in
21116         (*-O*)
21117                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21118
21119         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21120
21121                 ;;
21122         esac
21123         echo "$as_me:21123: result: $ADAFLAGS" >&5
21124 echo "${ECHO_T}$ADAFLAGS" >&6
21125
21126 echo "$as_me:21126: checking if GNATPREP supports -T option" >&5
21127 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21128 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21129   echo $ECHO_N "(cached) $ECHO_C" >&6
21130 else
21131
21132 cf_cv_gnatprep_opt_t=no
21133 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21134
21135 fi
21136 echo "$as_me:21136: result: $cf_cv_gnatprep_opt_t" >&5
21137 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21138 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21139
21140 echo "$as_me:21140: checking if GNAT supports generics" >&5
21141 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21142 case $cf_gnat_version in
21143 (3.[1-9]*|[4-9].*)
21144         cf_gnat_generics=yes
21145         ;;
21146 (*)
21147         cf_gnat_generics=no
21148         ;;
21149 esac
21150 echo "$as_me:21150: result: $cf_gnat_generics" >&5
21151 echo "${ECHO_T}$cf_gnat_generics" >&6
21152
21153 if test "$cf_gnat_generics" = yes
21154 then
21155         cf_compile_generics=generics
21156         cf_generic_objects="\${GENOBJS}"
21157 else
21158         cf_compile_generics=
21159         cf_generic_objects=
21160 fi
21161
21162 echo "$as_me:21162: checking if GNAT supports SIGINT" >&5
21163 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21164 if test "${cf_cv_gnat_sigint+set}" = set; then
21165   echo $ECHO_N "(cached) $ECHO_C" >&6
21166 else
21167
21168 rm -rf conftest* *~conftest*
21169 cat >>conftest.ads <<CF_EOF
21170 with Ada.Interrupts.Names;
21171
21172 package ConfTest is
21173
21174    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21175    pragma Unreserve_All_Interrupts;
21176    pragma Warnings (On);
21177
21178    protected Process is
21179       procedure Stop;
21180       function Continue return Boolean;
21181       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21182    private
21183       Done : Boolean := False;
21184    end Process;
21185
21186 end ConfTest;
21187 CF_EOF
21188 cat >>conftest.adb <<CF_EOF
21189 package body ConfTest is
21190    protected body Process is
21191       procedure Stop is
21192       begin
21193          Done := True;
21194       end Stop;
21195       function Continue return Boolean is
21196       begin
21197          return not Done;
21198       end Continue;
21199    end Process;
21200 end ConfTest;
21201 CF_EOF
21202 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21203       cf_cv_gnat_sigint=yes
21204 else
21205    cf_cv_gnat_sigint=no
21206 fi
21207 rm -rf conftest* *~conftest*
21208
21209 fi
21210 echo "$as_me:21210: result: $cf_cv_gnat_sigint" >&5
21211 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21212
21213 if test $cf_cv_gnat_sigint = yes ; then
21214         USE_GNAT_SIGINT=""
21215 else
21216         USE_GNAT_SIGINT="#"
21217 fi
21218
21219 cf_gnat_libraries=no
21220 cf_gnat_projects=no
21221
21222 if test "$enable_gnat_projects" != no ; then
21223 echo "$as_me:21223: checking if GNAT supports project files" >&5
21224 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21225 case $cf_gnat_version in
21226 (3.[0-9]*)
21227         ;;
21228 (*)
21229         case $cf_cv_system_name in
21230         (cygwin*|msys*)
21231                 ;;
21232         (*)
21233                 mkdir conftest.src conftest.bin conftest.lib
21234                 cd conftest.src
21235                 rm -rf conftest* *~conftest*
21236                 cat >>library.gpr <<CF_EOF
21237 project Library is
21238   Kind := External ("LIB_KIND");
21239   for Library_Name use "ConfTest";
21240   for Object_Dir use ".";
21241   for Library_ALI_Dir use External("LIBRARY_DIR");
21242   for Library_Version use External ("SONAME");
21243   for Library_Kind use Kind;
21244   for Library_Dir use External("BUILD_DIR");
21245   Source_Dir := External ("SOURCE_DIR");
21246   for Source_Dirs use (Source_Dir);
21247 end Library;
21248 CF_EOF
21249                 cat >>confpackage.ads <<CF_EOF
21250 package ConfPackage is
21251    procedure conftest;
21252 end ConfPackage;
21253 CF_EOF
21254                 cat >>confpackage.adb <<CF_EOF
21255 with Text_IO;
21256 package body ConfPackage is
21257    procedure conftest is
21258    begin
21259       Text_IO.Put ("Hello World");
21260       Text_IO.New_Line;
21261    end conftest;
21262 end ConfPackage;
21263 CF_EOF
21264                 if ( $cf_ada_make $ADAFLAGS \
21265                                 -Plibrary.gpr \
21266                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21267                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21268                                 -XSOURCE_DIR=`pwd` \
21269                                 -XSONAME=libConfTest.so.1 \
21270                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21271                         cf_gnat_projects=yes
21272                 fi
21273                 cd ..
21274                 if test -f conftest.lib/confpackage.ali
21275                 then
21276                         cf_gnat_libraries=yes
21277                 fi
21278                 rm -rf conftest* *~conftest*
21279                 ;;
21280         esac
21281         ;;
21282 esac
21283 echo "$as_me:21283: result: $cf_gnat_projects" >&5
21284 echo "${ECHO_T}$cf_gnat_projects" >&6
21285 fi # enable_gnat_projects
21286
21287 if test $cf_gnat_projects = yes
21288 then
21289         echo "$as_me:21289: checking if GNAT supports libraries" >&5
21290 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21291         echo "$as_me:21291: result: $cf_gnat_libraries" >&5
21292 echo "${ECHO_T}$cf_gnat_libraries" >&6
21293 fi
21294
21295 if test "$cf_gnat_projects" = yes
21296 then
21297         USE_OLD_MAKERULES="#"
21298         USE_GNAT_PROJECTS=""
21299 else
21300         USE_OLD_MAKERULES=""
21301         USE_GNAT_PROJECTS="#"
21302 fi
21303
21304 if test "$cf_gnat_libraries" = yes
21305 then
21306         USE_GNAT_LIBRARIES=""
21307 else
21308         USE_GNAT_LIBRARIES="#"
21309 fi
21310
21311 echo "$as_me:21311: checking for ada-compiler" >&5
21312 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21313
21314 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21315 if test "${with_ada_compiler+set}" = set; then
21316   withval="$with_ada_compiler"
21317   cf_ada_compiler=$withval
21318 else
21319   cf_ada_compiler=gnatmake
21320 fi;
21321
21322 echo "$as_me:21322: result: $cf_ada_compiler" >&5
21323 echo "${ECHO_T}$cf_ada_compiler" >&6
21324
21325                         cf_ada_package=terminal_interface
21326
21327 echo "$as_me:21327: checking for ada-include" >&5
21328 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21329
21330 # Check whether --with-ada-include or --without-ada-include was given.
21331 if test "${with_ada_include+set}" = set; then
21332   withval="$with_ada_include"
21333
21334 else
21335   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21336 fi; if test -n "$prefix/share/ada/adainclude" ; then
21337
21338 if test "x$prefix" != xNONE; then
21339         cf_path_syntax="$prefix"
21340 else
21341         cf_path_syntax="$ac_default_prefix"
21342 fi
21343
21344 case ".$withval" in
21345 (.\$\(*\)*|.\'*\'*)
21346         ;;
21347 (..|./*|.\\*)
21348         ;;
21349 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21350         ;;
21351 (.\${*prefix}*|.\${*dir}*)
21352         eval withval="$withval"
21353         case ".$withval" in
21354         (.NONE/*)
21355                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21356                 ;;
21357         esac
21358         ;;
21359 (.no|.NONE/*)
21360         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21361         ;;
21362 (*)
21363         { { echo "$as_me:21363: error: expected a pathname, not \"$withval\"" >&5
21364 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21365    { (exit 1); exit 1; }; }
21366         ;;
21367 esac
21368
21369 fi
21370 eval ADA_INCLUDE="$withval"
21371
21372 echo "$as_me:21372: result: $ADA_INCLUDE" >&5
21373 echo "${ECHO_T}$ADA_INCLUDE" >&6
21374
21375 echo "$as_me:21375: checking for ada-objects" >&5
21376 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21377
21378 # Check whether --with-ada-objects or --without-ada-objects was given.
21379 if test "${with_ada_objects+set}" = set; then
21380   withval="$with_ada_objects"
21381
21382 else
21383   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21384 fi; if test -n "$prefix/lib/ada/adalib" ; then
21385
21386 if test "x$prefix" != xNONE; then
21387         cf_path_syntax="$prefix"
21388 else
21389         cf_path_syntax="$ac_default_prefix"
21390 fi
21391
21392 case ".$withval" in
21393 (.\$\(*\)*|.\'*\'*)
21394         ;;
21395 (..|./*|.\\*)
21396         ;;
21397 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21398         ;;
21399 (.\${*prefix}*|.\${*dir}*)
21400         eval withval="$withval"
21401         case ".$withval" in
21402         (.NONE/*)
21403                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21404                 ;;
21405         esac
21406         ;;
21407 (.no|.NONE/*)
21408         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21409         ;;
21410 (*)
21411         { { echo "$as_me:21411: error: expected a pathname, not \"$withval\"" >&5
21412 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21413    { (exit 1); exit 1; }; }
21414         ;;
21415 esac
21416
21417 fi
21418 eval ADA_OBJECTS="$withval"
21419
21420 echo "$as_me:21420: result: $ADA_OBJECTS" >&5
21421 echo "${ECHO_T}$ADA_OBJECTS" >&6
21422
21423 echo "$as_me:21423: checking if an Ada95 shared-library should be built" >&5
21424 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21425
21426 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21427 if test "${with_ada_sharedlib+set}" = set; then
21428   withval="$with_ada_sharedlib"
21429   with_ada_sharedlib=$withval
21430 else
21431   with_ada_sharedlib=no
21432 fi;
21433 echo "$as_me:21433: result: $with_ada_sharedlib" >&5
21434 echo "${ECHO_T}$with_ada_sharedlib" >&6
21435
21436 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21437 MAKE_ADA_SHAREDLIB="#"
21438
21439 if test "x$with_ada_sharedlib" != xno
21440 then
21441         MAKE_ADA_SHAREDLIB=
21442         if test "x$with_ada_sharedlib" != xyes
21443         then
21444                 ADA_SHAREDLIB="$with_ada_sharedlib"
21445         fi
21446 fi
21447
21448                 fi
21449         fi
21450 else
21451         cf_with_ada=no
21452 fi
21453
21454 # do this "late" to avoid conflict with header-checks
21455 if test "x$with_widec" = xyes ; then
21456         echo "$as_me:21456: checking for wchar_t" >&5
21457 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21458 if test "${ac_cv_type_wchar_t+set}" = set; then
21459   echo $ECHO_N "(cached) $ECHO_C" >&6
21460 else
21461   cat >conftest.$ac_ext <<_ACEOF
21462 #line 21462 "configure"
21463 #include "confdefs.h"
21464 $ac_includes_default
21465 int
21466 main ()
21467 {
21468 if ((wchar_t *) 0)
21469   return 0;
21470 if (sizeof (wchar_t))
21471   return 0;
21472   ;
21473   return 0;
21474 }
21475 _ACEOF
21476 rm -f conftest.$ac_objext
21477 if { (eval echo "$as_me:21477: \"$ac_compile\"") >&5
21478   (eval $ac_compile) 2>&5
21479   ac_status=$?
21480   echo "$as_me:21480: \$? = $ac_status" >&5
21481   (exit $ac_status); } &&
21482          { ac_try='test -s conftest.$ac_objext'
21483   { (eval echo "$as_me:21483: \"$ac_try\"") >&5
21484   (eval $ac_try) 2>&5
21485   ac_status=$?
21486   echo "$as_me:21486: \$? = $ac_status" >&5
21487   (exit $ac_status); }; }; then
21488   ac_cv_type_wchar_t=yes
21489 else
21490   echo "$as_me: failed program was:" >&5
21491 cat conftest.$ac_ext >&5
21492 ac_cv_type_wchar_t=no
21493 fi
21494 rm -f conftest.$ac_objext conftest.$ac_ext
21495 fi
21496 echo "$as_me:21496: result: $ac_cv_type_wchar_t" >&5
21497 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21498
21499 echo "$as_me:21499: checking size of wchar_t" >&5
21500 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21501 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21502   echo $ECHO_N "(cached) $ECHO_C" >&6
21503 else
21504   if test "$ac_cv_type_wchar_t" = yes; then
21505   if test "$cross_compiling" = yes; then
21506   # Depending upon the size, compute the lo and hi bounds.
21507 cat >conftest.$ac_ext <<_ACEOF
21508 #line 21508 "configure"
21509 #include "confdefs.h"
21510 $ac_includes_default
21511 int
21512 main ()
21513 {
21514 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21515   ;
21516   return 0;
21517 }
21518 _ACEOF
21519 rm -f conftest.$ac_objext
21520 if { (eval echo "$as_me:21520: \"$ac_compile\"") >&5
21521   (eval $ac_compile) 2>&5
21522   ac_status=$?
21523   echo "$as_me:21523: \$? = $ac_status" >&5
21524   (exit $ac_status); } &&
21525          { ac_try='test -s conftest.$ac_objext'
21526   { (eval echo "$as_me:21526: \"$ac_try\"") >&5
21527   (eval $ac_try) 2>&5
21528   ac_status=$?
21529   echo "$as_me:21529: \$? = $ac_status" >&5
21530   (exit $ac_status); }; }; then
21531   ac_lo=0 ac_mid=0
21532   while :; do
21533     cat >conftest.$ac_ext <<_ACEOF
21534 #line 21534 "configure"
21535 #include "confdefs.h"
21536 $ac_includes_default
21537 int
21538 main ()
21539 {
21540 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21541   ;
21542   return 0;
21543 }
21544 _ACEOF
21545 rm -f conftest.$ac_objext
21546 if { (eval echo "$as_me:21546: \"$ac_compile\"") >&5
21547   (eval $ac_compile) 2>&5
21548   ac_status=$?
21549   echo "$as_me:21549: \$? = $ac_status" >&5
21550   (exit $ac_status); } &&
21551          { ac_try='test -s conftest.$ac_objext'
21552   { (eval echo "$as_me:21552: \"$ac_try\"") >&5
21553   (eval $ac_try) 2>&5
21554   ac_status=$?
21555   echo "$as_me:21555: \$? = $ac_status" >&5
21556   (exit $ac_status); }; }; then
21557   ac_hi=$ac_mid; break
21558 else
21559   echo "$as_me: failed program was:" >&5
21560 cat conftest.$ac_ext >&5
21561 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21562 fi
21563 rm -f conftest.$ac_objext conftest.$ac_ext
21564   done
21565 else
21566   echo "$as_me: failed program was:" >&5
21567 cat conftest.$ac_ext >&5
21568 ac_hi=-1 ac_mid=-1
21569   while :; do
21570     cat >conftest.$ac_ext <<_ACEOF
21571 #line 21571 "configure"
21572 #include "confdefs.h"
21573 $ac_includes_default
21574 int
21575 main ()
21576 {
21577 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21578   ;
21579   return 0;
21580 }
21581 _ACEOF
21582 rm -f conftest.$ac_objext
21583 if { (eval echo "$as_me:21583: \"$ac_compile\"") >&5
21584   (eval $ac_compile) 2>&5
21585   ac_status=$?
21586   echo "$as_me:21586: \$? = $ac_status" >&5
21587   (exit $ac_status); } &&
21588          { ac_try='test -s conftest.$ac_objext'
21589   { (eval echo "$as_me:21589: \"$ac_try\"") >&5
21590   (eval $ac_try) 2>&5
21591   ac_status=$?
21592   echo "$as_me:21592: \$? = $ac_status" >&5
21593   (exit $ac_status); }; }; then
21594   ac_lo=$ac_mid; break
21595 else
21596   echo "$as_me: failed program was:" >&5
21597 cat conftest.$ac_ext >&5
21598 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21599 fi
21600 rm -f conftest.$ac_objext conftest.$ac_ext
21601   done
21602 fi
21603 rm -f conftest.$ac_objext conftest.$ac_ext
21604 # Binary search between lo and hi bounds.
21605 while test "x$ac_lo" != "x$ac_hi"; do
21606   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21607   cat >conftest.$ac_ext <<_ACEOF
21608 #line 21608 "configure"
21609 #include "confdefs.h"
21610 $ac_includes_default
21611 int
21612 main ()
21613 {
21614 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21615   ;
21616   return 0;
21617 }
21618 _ACEOF
21619 rm -f conftest.$ac_objext
21620 if { (eval echo "$as_me:21620: \"$ac_compile\"") >&5
21621   (eval $ac_compile) 2>&5
21622   ac_status=$?
21623   echo "$as_me:21623: \$? = $ac_status" >&5
21624   (exit $ac_status); } &&
21625          { ac_try='test -s conftest.$ac_objext'
21626   { (eval echo "$as_me:21626: \"$ac_try\"") >&5
21627   (eval $ac_try) 2>&5
21628   ac_status=$?
21629   echo "$as_me:21629: \$? = $ac_status" >&5
21630   (exit $ac_status); }; }; then
21631   ac_hi=$ac_mid
21632 else
21633   echo "$as_me: failed program was:" >&5
21634 cat conftest.$ac_ext >&5
21635 ac_lo=`expr $ac_mid + 1`
21636 fi
21637 rm -f conftest.$ac_objext conftest.$ac_ext
21638 done
21639 ac_cv_sizeof_wchar_t=$ac_lo
21640 else
21641   if test "$cross_compiling" = yes; then
21642   { { echo "$as_me:21642: error: cannot run test program while cross compiling" >&5
21643 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21644    { (exit 1); exit 1; }; }
21645 else
21646   cat >conftest.$ac_ext <<_ACEOF
21647 #line 21647 "configure"
21648 #include "confdefs.h"
21649 $ac_includes_default
21650 int
21651 main ()
21652 {
21653 FILE *f = fopen ("conftest.val", "w");
21654 if (!f)
21655   $ac_main_return (1);
21656 fprintf (f, "%d", (sizeof (wchar_t)));
21657 fclose (f);
21658   ;
21659   return 0;
21660 }
21661 _ACEOF
21662 rm -f conftest$ac_exeext
21663 if { (eval echo "$as_me:21663: \"$ac_link\"") >&5
21664   (eval $ac_link) 2>&5
21665   ac_status=$?
21666   echo "$as_me:21666: \$? = $ac_status" >&5
21667   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21668   { (eval echo "$as_me:21668: \"$ac_try\"") >&5
21669   (eval $ac_try) 2>&5
21670   ac_status=$?
21671   echo "$as_me:21671: \$? = $ac_status" >&5
21672   (exit $ac_status); }; }; then
21673   ac_cv_sizeof_wchar_t=`cat conftest.val`
21674 else
21675   echo "$as_me: program exited with status $ac_status" >&5
21676 echo "$as_me: failed program was:" >&5
21677 cat conftest.$ac_ext >&5
21678 fi
21679 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21680 fi
21681 fi
21682 rm -f conftest.val
21683 else
21684   ac_cv_sizeof_wchar_t=0
21685 fi
21686 fi
21687 echo "$as_me:21687: result: $ac_cv_sizeof_wchar_t" >&5
21688 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21689 cat >>confdefs.h <<EOF
21690 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21691 EOF
21692
21693 fi
21694
21695 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21696 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21697 ###
21698 ### ticlib modules may be a separate library, otherwise contained in termlib.
21699 ### termlib modules may be a separate library, otherwise contained in ncurses.
21700 ###
21701 ### The of "+" or " " between the tokens controls the way the script
21702 ### chooses to split module lists into libraries.
21703 ###
21704 ### (see CF_LIB_RULES).
21705 echo "$as_me:21705: checking for library subsets" >&5
21706 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21707 LIB_SUBSETS=
21708
21709 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21710         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21711         if test "$with_ticlib" != no ; then
21712                 LIB_SUBSETS="${LIB_SUBSETS} "
21713         else
21714                 LIB_SUBSETS="${LIB_SUBSETS}+"
21715         fi
21716 fi
21717
21718 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21719 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21720
21721 if test "$with_termlib" != no ; then
21722         LIB_SUBSETS="${LIB_SUBSETS} "
21723 else
21724         LIB_SUBSETS="${LIB_SUBSETS}+"
21725 fi
21726
21727 LIB_SUBSETS="${LIB_SUBSETS}base"
21728
21729 # Most term-driver calls are to tinfo, but some like init_pair are to the
21730 # base library (so it resides in base).
21731 if test "$with_term_driver" != no ; then
21732         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21733         case $cf_cv_system_name in
21734         (*mingw32*|*mingw64*)
21735                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21736                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21737                 ;;
21738         (*)
21739                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21740                 ;;
21741         esac
21742 fi
21743
21744 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21745 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21746
21747 echo "$as_me:21747: result: $LIB_SUBSETS" >&5
21748 echo "${ECHO_T}$LIB_SUBSETS" >&6
21749
21750 ### Construct the list of include-directories to be generated
21751
21752 if test "$srcdir" != "."; then
21753         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21754 fi
21755 CPPFLAGS="-I../include $CPPFLAGS"
21756 if test "$srcdir" != "."; then
21757         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21758 fi
21759 CPPFLAGS="-I. $CPPFLAGS"
21760
21761 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21762 if test "$srcdir" != "."; then
21763         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21764 fi
21765 if test "$GCC" != yes; then
21766         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21767 elif test "$includedir" != "/usr/include"; then
21768         if test "$includedir" = '${prefix}/include' ; then
21769                 if test x$prefix != x/usr ; then
21770                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21771                 fi
21772         else
21773                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21774         fi
21775 fi
21776
21777 ### Build up pieces for makefile rules
21778 echo "$as_me:21778: checking default library suffix" >&5
21779 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21780
21781         case $DFT_LWR_MODEL in
21782         (libtool) DFT_ARG_SUFFIX=''   ;;
21783         (normal)  DFT_ARG_SUFFIX=''   ;;
21784         (debug)   DFT_ARG_SUFFIX='_g' ;;
21785         (profile) DFT_ARG_SUFFIX='_p' ;;
21786         (shared)  DFT_ARG_SUFFIX=''   ;;
21787         esac
21788         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21789 echo "$as_me:21789: result: $DFT_ARG_SUFFIX" >&5
21790 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21791
21792 echo "$as_me:21792: checking default library-dependency suffix" >&5
21793 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21794
21795         case X$DFT_LWR_MODEL in
21796         (Xlibtool)
21797                 DFT_LIB_SUFFIX='.la'
21798                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21799                 ;;
21800         (Xdebug)
21801                 DFT_LIB_SUFFIX='_g.a'
21802                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21803                 ;;
21804         (Xprofile)
21805                 DFT_LIB_SUFFIX='_p.a'
21806                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21807                 ;;
21808         (Xshared)
21809                 case $cf_cv_system_name in
21810                 (aix[5-7]*)
21811                         DFT_LIB_SUFFIX='.so'
21812                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21813                         ;;
21814                 (cygwin*|msys*|mingw*)
21815                         DFT_LIB_SUFFIX='.dll'
21816                         DFT_DEP_SUFFIX='.dll.a'
21817                         ;;
21818                 (darwin*)
21819                         DFT_LIB_SUFFIX='.dylib'
21820                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21821                         ;;
21822                 (hpux*)
21823                         case $target in
21824                         (ia64*)
21825                                 DFT_LIB_SUFFIX='.so'
21826                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21827                                 ;;
21828                         (*)
21829                                 DFT_LIB_SUFFIX='.sl'
21830                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21831                                 ;;
21832                         esac
21833                         ;;
21834                 (*)
21835                         DFT_LIB_SUFFIX='.so'
21836                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21837                         ;;
21838                 esac
21839                 ;;
21840         (*)
21841                 DFT_LIB_SUFFIX='.a'
21842                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21843                 ;;
21844         esac
21845         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21846         then
21847                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21848                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21849         fi
21850 echo "$as_me:21850: result: $DFT_DEP_SUFFIX" >&5
21851 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21852
21853 echo "$as_me:21853: checking default object directory" >&5
21854 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21855
21856         case $DFT_LWR_MODEL in
21857         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21858         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21859         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21860         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21861         (shared)
21862                 case $cf_cv_system_name in
21863                 (cygwin|msys)
21864                         DFT_OBJ_SUBDIR='objects' ;;
21865                 (*)
21866                         DFT_OBJ_SUBDIR='obj_s' ;;
21867                 esac
21868         esac
21869 echo "$as_me:21869: result: $DFT_OBJ_SUBDIR" >&5
21870 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21871
21872 if test "x$cf_with_cxx" = xyes ; then
21873 echo "$as_me:21873: checking c++ library-dependency suffix" >&5
21874 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21875 if test "$with_libtool" != "no"; then
21876         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21877         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21878 elif test "$with_shared_cxx" != "no"; then
21879         # also for g++ users...
21880         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21881 else
21882         # we normally make a static library because C/C++ library rules differ
21883
21884         case Xnormal in
21885         (Xlibtool)
21886                 CXX_LIB_SUFFIX='.la'
21887                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21888                 ;;
21889         (Xdebug)
21890                 CXX_LIB_SUFFIX='_g.a'
21891                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21892                 ;;
21893         (Xprofile)
21894                 CXX_LIB_SUFFIX='_p.a'
21895                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21896                 ;;
21897         (Xshared)
21898                 case $cf_cv_system_name in
21899                 (aix[5-7]*)
21900                         CXX_LIB_SUFFIX='.so'
21901                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21902                         ;;
21903                 (cygwin*|msys*|mingw*)
21904                         CXX_LIB_SUFFIX='.dll'
21905                         CXX_DEP_SUFFIX='.dll.a'
21906                         ;;
21907                 (darwin*)
21908                         CXX_LIB_SUFFIX='.dylib'
21909                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21910                         ;;
21911                 (hpux*)
21912                         case $target in
21913                         (ia64*)
21914                                 CXX_LIB_SUFFIX='.so'
21915                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21916                                 ;;
21917                         (*)
21918                                 CXX_LIB_SUFFIX='.sl'
21919                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21920                                 ;;
21921                         esac
21922                         ;;
21923                 (*)
21924                         CXX_LIB_SUFFIX='.so'
21925                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21926                         ;;
21927                 esac
21928                 ;;
21929         (*)
21930                 CXX_LIB_SUFFIX='.a'
21931                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21932                 ;;
21933         esac
21934         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21935         then
21936                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21937                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21938         fi
21939
21940 fi
21941 echo "$as_me:21941: result: $CXX_LIB_SUFFIX" >&5
21942 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21943
21944 fi
21945
21946 # do not want -ldl in build except as needed for -lncurses dependency
21947 if test "x$with_dlsym" = xyes ; then
21948 if test $DFT_LWR_MODEL = shared || \
21949    test $DFT_LWR_MODEL = libtool ; then
21950
21951 # remove dl library from $LIBS
21952 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21953
21954 fi
21955 fi
21956 ### Set up low-level terminfo dependencies for makefiles.
21957
21958 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21959 # do not need libdl
21960 TICS_LIST=
21961 if test "x$with_dlsym" = xyes ; then
21962
21963 # remove dl library from $SHLIB_LIST
21964 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21965
21966 fi
21967
21968 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21969 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21970 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21971 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21972 then
21973         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21974 fi
21975
21976 if test "$with_ticlib" != no ; then
21977
21978         if test "x$with_ticlib" != xyes ; then
21979                 TICS_NAME=$with_ticlib
21980                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21981                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21982                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21983                 TICS_LIB_SUFFIX="${with_ticlib}"
21984         else
21985                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
21986                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21987                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21988                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21989         fi
21990         TICS_LDFLAGS="-L${LIB_DIR}"
21991         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
21992 else
21993         TICS_SUFFIX=${DFT_LIB_SUFFIX}
21994         TICS_LDFLAGS="-L${LIB_DIR}"
21995         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21996 fi
21997
21998 if test "$with_termlib" != no ; then
21999
22000         if test "x$with_termlib" != xyes ; then
22001                 TINFO_NAME=$with_termlib
22002                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22003                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22004                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22005                 TINFO_LIB_SUFFIX="${with_termlib}"
22006         else
22007                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22008                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22009                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22010                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22011         fi
22012
22013         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22014         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22015         if test "$DFT_LWR_MODEL" = "libtool"; then
22016                 TEST_ARGS="${TEST_DEPS}"
22017                 TEST_ARG2="${TEST_DEP2}"
22018                 TINFO_LDFLAGS="-L${LIB_DIR}"
22019                 TINFO_LIBS="$TEST_ARGS"
22020                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22021                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22022         else
22023                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22024                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22025                 if test "x$with_term_driver" != xno ; then
22026                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22027                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22028                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22029                 else
22030                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22031                         TINFO_LIBS="$TEST_ARGS"
22032                 fi
22033                 TINFO_LDFLAGS="-L${LIB_DIR}"
22034                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22035         fi
22036 else
22037         # the next lines are needed for linking libtic over libncurses
22038         TINFO_NAME=${LIB_NAME}
22039         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22040         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22041         if test "x$with_tic_depends" = xyes ; then
22042                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22043         else
22044                 TICS_LIST="$SHLIB_LIST"
22045         fi
22046
22047         TINFO_LDFLAGS="-L${LIB_DIR}"
22048         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22049 fi
22050
22051 if test "$DFT_LWR_MODEL" = shared ; then
22052         case $cf_cv_system_name in
22053         (cygwin*|msys*)
22054                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22055                 TINFO_SUFFIX=.dll
22056                 ;;
22057         esac
22058 fi
22059
22060 if test "x$with_dlsym" = xyes ; then
22061
22062 # remove dl library from $TICS_LIST
22063 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22064
22065 fi
22066
22067 if test "$DFT_LWR_MODEL" = "libtool"; then
22068         OBJEXT=lo
22069 fi
22070
22071 # needed for Ada95
22072 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22073
22074 case $DFT_LWR_MODEL in
22075 (normal|debug|profile)
22076
22077 if test "$GCC" = yes ; then
22078         case $cf_cv_system_name in
22079         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22080                 LDFLAGS_STATIC=
22081                 LDFLAGS_SHARED=
22082                 ;;
22083         (*)     # normally, except when broken
22084                 LDFLAGS_STATIC=-static
22085                 LDFLAGS_SHARED=-dynamic
22086                 ;;
22087         esac
22088 else
22089         case $cf_cv_system_name in
22090         (aix[4-7]*)     # from ld manpage
22091                 LDFLAGS_STATIC=-bstatic
22092                 LDFLAGS_SHARED=-bdynamic
22093                 ;;
22094         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22095                 # We could also use just "archive" and "shared".
22096                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22097                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22098                 ;;
22099         (irix*)         # from ld manpage IRIX64
22100                 LDFLAGS_STATIC=-Bstatic
22101                 LDFLAGS_SHARED=-Bdynamic
22102                 ;;
22103         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22104                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22105                 LDFLAGS_STATIC=-noso
22106                 LDFLAGS_SHARED=-so_archive
22107                 ;;
22108         (solaris2*)
22109                 LDFLAGS_STATIC=-Bstatic
22110                 LDFLAGS_SHARED=-Bdynamic
22111                 ;;
22112         esac
22113 fi
22114
22115 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22116 then
22117         echo "$as_me:22117: checking if linker supports switching between static/dynamic" >&5
22118 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22119
22120         rm -f libconftest.a
22121         cat >conftest.$ac_ext <<EOF
22122 #line 22122 "configure"
22123 #include <stdio.h>
22124 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22125 EOF
22126         if { (eval echo "$as_me:22126: \"$ac_compile\"") >&5
22127   (eval $ac_compile) 2>&5
22128   ac_status=$?
22129   echo "$as_me:22129: \$? = $ac_status" >&5
22130   (exit $ac_status); } ; then
22131                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22132                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22133         fi
22134         rm -f conftest.*
22135
22136         cf_save_LIBS="$LIBS"
22137
22138         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22139         cat >conftest.$ac_ext <<_ACEOF
22140 #line 22140 "configure"
22141 #include "confdefs.h"
22142
22143 #line 22143 "configure"
22144 #include <stdio.h>
22145 int cf_ldflags_static(FILE *fp);
22146
22147 int
22148 main ()
22149 {
22150
22151         return cf_ldflags_static(stdin);
22152
22153   ;
22154   return 0;
22155 }
22156 _ACEOF
22157 rm -f conftest.$ac_objext conftest$ac_exeext
22158 if { (eval echo "$as_me:22158: \"$ac_link\"") >&5
22159   (eval $ac_link) 2>&5
22160   ac_status=$?
22161   echo "$as_me:22161: \$? = $ac_status" >&5
22162   (exit $ac_status); } &&
22163          { ac_try='test -s conftest$ac_exeext'
22164   { (eval echo "$as_me:22164: \"$ac_try\"") >&5
22165   (eval $ac_try) 2>&5
22166   ac_status=$?
22167   echo "$as_me:22167: \$? = $ac_status" >&5
22168   (exit $ac_status); }; }; then
22169
22170         # some linkers simply ignore the -dynamic
22171         case x`file conftest$ac_exeext 2>/dev/null` in
22172         (*static*)
22173                 cf_ldflags_static=no
22174                 ;;
22175         (*)
22176                 cf_ldflags_static=yes
22177                 ;;
22178         esac
22179
22180 else
22181   echo "$as_me: failed program was:" >&5
22182 cat conftest.$ac_ext >&5
22183 cf_ldflags_static=no
22184 fi
22185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22186
22187         rm -f libconftest.*
22188         LIBS="$cf_save_LIBS"
22189
22190         echo "$as_me:22190: result: $cf_ldflags_static" >&5
22191 echo "${ECHO_T}$cf_ldflags_static" >&6
22192
22193         if test $cf_ldflags_static != yes
22194         then
22195                 LDFLAGS_STATIC=
22196                 LDFLAGS_SHARED=
22197         fi
22198 else
22199         LDFLAGS_STATIC=
22200         LDFLAGS_SHARED=
22201 fi
22202
22203         ;;
22204 esac
22205
22206 echo "$as_me:22206: checking where we will install curses.h" >&5
22207 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22208
22209 includesubdir=
22210 if test "$with_overwrite" = no && \
22211  ( test "x$includedir" = 'x${prefix}/include' || \
22212    test "x$includedir" = "x${prefix}/include" )
22213 then
22214         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22215 fi
22216 echo "$as_me:22216: result: ${includedir}${includesubdir}" >&5
22217 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22218
22219 ### Resolve a conflict between normal and wide-curses by forcing applications
22220 ### that will need libutf8 to add it to their configure script.
22221 if test "$with_overwrite" != no ; then
22222 if test "$NCURSES_LIBUTF8" = 1 ; then
22223         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22224         { echo "$as_me:22224: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22225 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22226 fi
22227 fi
22228 WITH_OVERWRITE=$with_overwrite
22229
22230 # used to separate tack out of the tree
22231 NCURSES_TREE=
22232
22233 ### predefined stuff for the test programs
22234
22235 cat >>confdefs.h <<\EOF
22236 #define HAVE_SLK_COLOR 1
22237 EOF
22238
22239 ### Construct the list of subdirectories for which we'll customize makefiles
22240 ### with the appropriate compile-rules.
22241
22242 echo "$as_me:22242: checking for src modules" >&5
22243 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22244
22245 # dependencies and linker-arguments for test-programs
22246 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22247 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22248 if test "$DFT_LWR_MODEL" = "libtool"; then
22249         TEST_ARGS="${TEST_DEPS}"
22250         TEST_ARG2="${TEST_DEP2}"
22251 else
22252         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22253         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22254 fi
22255
22256 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22257 cf_cv_src_modules=
22258 for cf_dir in $modules_to_build
22259 do
22260         if test -f $srcdir/$cf_dir/modules; then
22261
22262                 # We may/may not have tack in the distribution, though the
22263                 # makefile is.
22264                 if test $cf_dir = tack ; then
22265                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22266                                 continue
22267                         fi
22268                 fi
22269
22270                 if test -z "$cf_cv_src_modules"; then
22271                         cf_cv_src_modules=$cf_dir
22272                 else
22273                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22274                 fi
22275
22276                 # Make the ncurses_cfg.h file record the library interface files as
22277                 # well.  These are header files that are the same name as their
22278                 # directory.  Ncurses is the only library that does not follow
22279                 # that pattern.
22280                 if test $cf_dir = tack ; then
22281                         continue
22282                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22283
22284 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22285
22286                         cat >>confdefs.h <<EOF
22287 #define HAVE_${cf_have_include}_H 1
22288 EOF
22289
22290                         cat >>confdefs.h <<EOF
22291 #define HAVE_LIB${cf_have_include} 1
22292 EOF
22293
22294                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22295                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22296                         if test "$DFT_LWR_MODEL" = "libtool"; then
22297                                 TEST_ARGS="${TEST_DEPS}"
22298                                 TEST_ARG2="${TEST_DEP2}"
22299                         else
22300                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22301                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22302                         fi
22303                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22304                 fi
22305         fi
22306 done
22307 echo "$as_me:22307: result: $cf_cv_src_modules" >&5
22308 echo "${ECHO_T}$cf_cv_src_modules" >&6
22309
22310 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22311 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22312
22313 SRC_SUBDIRS=
22314 if test "x$cf_with_manpages" != xno ; then
22315         SRC_SUBDIRS="$SRC_SUBDIRS man"
22316 fi
22317 SRC_SUBDIRS="$SRC_SUBDIRS include"
22318 for cf_dir in $cf_cv_src_modules
22319 do
22320         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22321 done
22322 if test "x$cf_with_tests" != "xno" ; then
22323         SRC_SUBDIRS="$SRC_SUBDIRS test"
22324 fi
22325 # always make this, to install the ncurses-config script
22326 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22327 if test "$cf_with_cxx_binding" != no; then
22328         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22329         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22330 fi
22331
22332 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22333 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22334
22335 ADA_SUBDIRS=
22336 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22337         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22338         ADA_SUBDIRS="gen src"
22339         if test "x$cf_with_tests" != "xno" ; then
22340                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22341         fi
22342 fi
22343
22344 SUB_MAKEFILES=
22345 for cf_dir in $SRC_SUBDIRS
22346 do
22347         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22348 done
22349
22350 if test -n "$ADA_SUBDIRS"; then
22351         for cf_dir in $ADA_SUBDIRS
22352         do
22353                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22354         done
22355
22356 fi
22357
22358 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22359    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22360    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22361 fi
22362
22363 DIRS_TO_MAKE="lib"
22364 for cf_item in $cf_list_models
22365 do
22366
22367         case $cf_item in
22368         (libtool) cf_subdir='obj_lo'  ;;
22369         (normal)  cf_subdir='objects' ;;
22370         (debug)   cf_subdir='obj_g' ;;
22371         (profile) cf_subdir='obj_p' ;;
22372         (shared)
22373                 case $cf_cv_system_name in
22374                 (cygwin|msys)
22375                         cf_subdir='objects' ;;
22376                 (*)
22377                         cf_subdir='obj_s' ;;
22378                 esac
22379         esac
22380
22381         for cf_item2 in $DIRS_TO_MAKE
22382         do
22383                 test $cf_item2 = $cf_subdir && break
22384         done
22385         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22386 done
22387 for cf_dir in $DIRS_TO_MAKE
22388 do
22389         test ! -d $cf_dir && mkdir $cf_dir
22390 done
22391
22392 # symbols that differ when compiling Ada95 by itself.
22393 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22394
22395 # values to use as strings
22396
22397 cat >>confdefs.h <<EOF
22398 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22399 EOF
22400
22401 cat >>confdefs.h <<EOF
22402 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22403 EOF
22404
22405 ### Now that we're done running tests, add the compiler-warnings, if any
22406
22407 cf_fix_cppflags=no
22408 cf_new_cflags=
22409 cf_new_cppflags=
22410 cf_new_extra_cppflags=
22411
22412 for cf_add_cflags in $EXTRA_CFLAGS
22413 do
22414 case $cf_fix_cppflags in
22415 (no)
22416         case $cf_add_cflags in
22417         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22418                 case $cf_add_cflags in
22419                 (-D*)
22420                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22421
22422                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22423                                 && test -z "${cf_tst_cflags}" \
22424                                 && cf_fix_cppflags=yes
22425
22426                         if test $cf_fix_cppflags = yes ; then
22427                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22428                                 continue
22429                         elif test "${cf_tst_cflags}" = "\"'" ; then
22430                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22431                                 continue
22432                         fi
22433                         ;;
22434                 esac
22435                 case "$CPPFLAGS" in
22436                 (*$cf_add_cflags)
22437                         ;;
22438                 (*)
22439                         case $cf_add_cflags in
22440                         (-D*)
22441                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22442
22443 CPPFLAGS=`echo "$CPPFLAGS" | \
22444         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22445                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22446
22447                                 ;;
22448                         esac
22449                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22450                         ;;
22451                 esac
22452                 ;;
22453         (*)
22454                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22455                 ;;
22456         esac
22457         ;;
22458 (yes)
22459         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22460
22461         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22462
22463         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22464                 && test -z "${cf_tst_cflags}" \
22465                 && cf_fix_cppflags=no
22466         ;;
22467 esac
22468 done
22469
22470 if test -n "$cf_new_cflags" ; then
22471
22472         CFLAGS="$CFLAGS $cf_new_cflags"
22473 fi
22474
22475 if test -n "$cf_new_cppflags" ; then
22476
22477         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22478 fi
22479
22480 if test -n "$cf_new_extra_cppflags" ; then
22481
22482         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22483 fi
22484
22485 ### Define substitutions for header files to avoid name-pollution
22486
22487 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22488         HAVE_TCGETATTR=1
22489 else
22490         HAVE_TCGETATTR=0
22491 fi
22492
22493 if test "x$ac_cv_header_stdint_h" = xyes ; then
22494         HAVE_STDINT_H=1
22495 else
22496         HAVE_STDINT_H=0
22497 fi
22498
22499 if test "x$ac_cv_header_termio_h" = xyes ; then
22500         HAVE_TERMIO_H=1
22501 else
22502         HAVE_TERMIO_H=0
22503 fi
22504
22505 if test "x$ac_cv_header_termios_h" = xyes ; then
22506         HAVE_TERMIOS_H=1
22507 else
22508         HAVE_TERMIOS_H=0
22509 fi
22510
22511 ################################################################################
22512 test "x$use_database" = xyes && \
22513 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22514
22515 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22516 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22517
22518 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
22519 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22520 fi
22521
22522 # Extract the first word of "tic", so it can be a program name with args.
22523 set dummy tic; ac_word=$2
22524 echo "$as_me:22524: checking for $ac_word" >&5
22525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22526 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22527   echo $ECHO_N "(cached) $ECHO_C" >&6
22528 else
22529   case $TIC_PATH in
22530   [\\/]* | ?:[\\/]*)
22531   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22532   ;;
22533   *)
22534   ac_save_IFS=$IFS; IFS=$ac_path_separator
22535 ac_dummy="$PATH:/usr/local/ncurses/bin"
22536 for ac_dir in $ac_dummy; do
22537   IFS=$ac_save_IFS
22538   test -z "$ac_dir" && ac_dir=.
22539   if $as_executable_p "$ac_dir/$ac_word"; then
22540    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22541    echo "$as_me:22541: found $ac_dir/$ac_word" >&5
22542    break
22543 fi
22544 done
22545
22546   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22547   ;;
22548 esac
22549 fi
22550 TIC_PATH=$ac_cv_path_TIC_PATH
22551
22552 if test -n "$TIC_PATH"; then
22553   echo "$as_me:22553: result: $TIC_PATH" >&5
22554 echo "${ECHO_T}$TIC_PATH" >&6
22555 else
22556   echo "$as_me:22556: result: no" >&5
22557 echo "${ECHO_T}no" >&6
22558 fi
22559
22560 if test -n "$FALLBACK_LIST"
22561 then
22562         if test "$TIC_PATH" = unknown
22563         then
22564                 { echo "$as_me:22564: WARNING: no tic program found for fallbacks" >&5
22565 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22566         fi
22567 fi
22568
22569 if test "x$cf_with_tests" != xno ; then
22570         MAKE_TESTS=
22571 else
22572         MAKE_TESTS="#"
22573 fi
22574
22575 ADAHTML_DIR=../../doc/html/ada
22576
22577 # these could be configurable, but are not currently
22578 PANEL_NAME=panel
22579 MENU_NAME=menu
22580 FORM_NAME=form
22581 CXX_NAME=ncurses++
22582
22583 # workaround for OS/2 (20151017)
22584 case $cf_cv_system_name in
22585 (os2*)
22586         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
22587         ;;
22588 (*)
22589         LIBTOOL_OPTS_CXX=
22590         ;;
22591 esac
22592
22593 # workaround for g++ versus Solaris (20131116)
22594 case $cf_cv_system_name in
22595 (solaris2*)
22596         case "x$CPPFLAGS" in
22597         (*-D_XOPEN_SOURCE_EXTENDED*)
22598                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22599
22600 echo "${as_me:-configure}:22600: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22601
22602                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22603                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22604                 ;;
22605         esac
22606         ;;
22607 esac
22608
22609 # Help to automatically enable the extended curses features when using either
22610 # the *-config or the ".pc" files by adding defines.
22611 echo "$as_me:22611: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22612 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22613 PKG_CFLAGS=
22614 for cf_loop1 in $CPPFLAGS_after_XOPEN
22615 do
22616         cf_found=no
22617         for cf_loop2 in $CPPFLAGS_before_XOPEN
22618         do
22619                 if test "x$cf_loop1" = "x$cf_loop2"
22620                 then
22621                         cf_found=yes
22622                         break
22623                 fi
22624         done
22625         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22626 done
22627 echo "$as_me:22627: result: $PKG_CFLAGS" >&5
22628 echo "${ECHO_T}$PKG_CFLAGS" >&6
22629
22630 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22631 case "x$NCURSES_OSPEED" in
22632 (*short*)
22633         cf_compatible=1
22634         ;;
22635 (*)
22636         cf_compatible=0
22637         ;;
22638 esac
22639
22640 cat >>confdefs.h <<EOF
22641 #define NCURSES_OSPEED_COMPAT $cf_compatible
22642 EOF
22643
22644 case "x$cf_cv_typeof_chtype" in
22645 (xshort|xint|xlong)
22646         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22647         ;;
22648 esac
22649
22650 case "x$cf_cv_typeof_mmask_t" in
22651 (xshort|xint|xlong)
22652         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22653         ;;
22654 esac
22655
22656 # substitute into misc/Makefile to suppress
22657 # (un)install.data from the
22658 # (un)install rules.
22659 if test "x$cf_with_db_install" = "xno"; then
22660         MISC_INSTALL_DATA=
22661         MISC_UNINSTALL_DATA=
22662 else
22663         MISC_INSTALL_DATA=install.data
22664         MISC_UNINSTALL_DATA=uninstall.data
22665 fi
22666
22667 SUB_SCRIPTS=
22668
22669 if test -n "$PACKAGE"
22670 then
22671         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22672         export PACKAGE
22673         echo "package: $PACKAGE"
22674 fi
22675
22676 UNALTERED_SYMS=
22677 cf_filter_syms=no
22678
22679 if test -n "$RESULTING_SYMS"
22680 then
22681         cf_filter_syms=$cf_dft_filter_syms
22682         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22683
22684 echo "${as_me:-configure}:22684: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22685
22686 fi
22687
22688 if test "x$WILDCARD_SYMS" = xno
22689 then
22690         cf_filter_syms=yes
22691 fi
22692
22693 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
22694
22695 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22696 if test $cf_filter_syms = yes
22697 then
22698         RESULTING_SYMS=resulting.map
22699 fi
22700
22701 if test "x$cross_compiling" = xyes ; then
22702         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22703 else
22704         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22705 fi
22706
22707 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"
22708 ac_config_commands="$ac_config_commands default"
22709 cat >confcache <<\_ACEOF
22710 # This file is a shell script that caches the results of configure
22711 # tests run on this system so they can be shared between configure
22712 # scripts and configure runs, see configure's option --config-cache.
22713 # It is not useful on other systems.  If it contains results you don't
22714 # want to keep, you may remove or edit it.
22715 #
22716 # config.status only pays attention to the cache file if you give it
22717 # the --recheck option to rerun configure.
22718 #
22719 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22720 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22721 # following values.
22722
22723 _ACEOF
22724
22725 # The following way of writing the cache mishandles newlines in values,
22726 # but we know of no workaround that is simple, portable, and efficient.
22727 # So, don't put newlines in cache variables' values.
22728 # Ultrix sh set writes to stderr and can't be redirected directly,
22729 # and sets the high bit in the cache file unless we assign to the vars.
22730 {
22731   (set) 2>&1 |
22732     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22733     *ac_space=\ *)
22734       # `set' does not quote correctly, so add quotes (double-quote
22735       # substitution turns \\\\ into \\, and sed turns \\ into \).
22736       sed -n \
22737         "s/'/'\\\\''/g;
22738           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22739       ;;
22740     *)
22741       # `set' quotes correctly as required by POSIX, so do not add quotes.
22742       sed -n \
22743         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22744       ;;
22745     esac;
22746 } |
22747   sed '
22748      t clear
22749      : clear
22750      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22751      t end
22752      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22753      : end' >>confcache
22754 if cmp -s $cache_file confcache; then :; else
22755   if test -w $cache_file; then
22756     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22757     cat confcache >$cache_file
22758   else
22759     echo "not updating unwritable cache $cache_file"
22760   fi
22761 fi
22762 rm -f confcache
22763
22764 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22765 # Let make expand exec_prefix.
22766 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22767
22768 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22769 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22770 # trailing colons and then remove the whole line if VPATH becomes empty
22771 # (actually we leave an empty line to preserve line numbers).
22772 if test "x$srcdir" = x.; then
22773   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22774 s/:*\$(srcdir):*/:/;
22775 s/:*\${srcdir}:*/:/;
22776 s/:*@srcdir@:*/:/;
22777 s/^\([^=]*=[    ]*\):*/\1/;
22778 s/:*$//;
22779 s/^[^=]*=[      ]*$//;
22780 }'
22781 fi
22782
22783 DEFS=-DHAVE_CONFIG_H
22784
22785 : ${CONFIG_STATUS=./config.status}
22786 ac_clean_files_save=$ac_clean_files
22787 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22788 { echo "$as_me:22788: creating $CONFIG_STATUS" >&5
22789 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22790 cat >$CONFIG_STATUS <<_ACEOF
22791 #! $SHELL
22792 # Generated automatically by configure.
22793 # Run this file to recreate the current configuration.
22794 # Compiler output produced by configure, useful for debugging
22795 # configure, is in config.log if it exists.
22796
22797 debug=false
22798 SHELL=\${CONFIG_SHELL-$SHELL}
22799 ac_cs_invocation="\$0 \$@"
22800
22801 _ACEOF
22802
22803 cat >>$CONFIG_STATUS <<\_ACEOF
22804 # Be Bourne compatible
22805 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22806   emulate sh
22807   NULLCMD=:
22808 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22809   set -o posix
22810 fi
22811
22812 # Name of the executable.
22813 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22814
22815 if expr a : '\(a\)' >/dev/null 2>&1; then
22816   as_expr=expr
22817 else
22818   as_expr=false
22819 fi
22820
22821 rm -f conf$$ conf$$.exe conf$$.file
22822 echo >conf$$.file
22823 if ln -s conf$$.file conf$$ 2>/dev/null; then
22824   # We could just check for DJGPP; but this test a) works b) is more generic
22825   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22826   if test -f conf$$.exe; then
22827     # Don't use ln at all; we don't have any links
22828     as_ln_s='cp -p'
22829   else
22830     as_ln_s='ln -s'
22831   fi
22832 elif ln conf$$.file conf$$ 2>/dev/null; then
22833   as_ln_s=ln
22834 else
22835   as_ln_s='cp -p'
22836 fi
22837 rm -f conf$$ conf$$.exe conf$$.file
22838
22839 as_executable_p="test -f"
22840
22841 # Support unset when possible.
22842 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22843   as_unset=unset
22844 else
22845   as_unset=false
22846 fi
22847
22848 # NLS nuisances.
22849 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22850 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22851 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22852 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22853 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22854 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22855 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22856 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22857
22858 # IFS
22859 # We need space, tab and new line, in precisely that order.
22860 as_nl='
22861 '
22862 IFS="   $as_nl"
22863
22864 # CDPATH.
22865 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22866
22867 exec 6>&1
22868
22869 _ACEOF
22870
22871 # Files that config.status was made for.
22872 if test -n "$ac_config_files"; then
22873   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22874 fi
22875
22876 if test -n "$ac_config_headers"; then
22877   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22878 fi
22879
22880 if test -n "$ac_config_links"; then
22881   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22882 fi
22883
22884 if test -n "$ac_config_commands"; then
22885   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22886 fi
22887
22888 cat >>$CONFIG_STATUS <<\EOF
22889
22890 ac_cs_usage="\
22891 \`$as_me' instantiates files from templates according to the
22892 current configuration.
22893
22894 Usage: $0 [OPTIONS] [FILE]...
22895
22896   -h, --help       print this help, then exit
22897   -V, --version    print version number, then exit
22898   -d, --debug      don't remove temporary files
22899       --recheck    update $as_me by reconfiguring in the same conditions
22900   --file=FILE[:TEMPLATE]
22901                    instantiate the configuration file FILE
22902   --header=FILE[:TEMPLATE]
22903                    instantiate the configuration header FILE
22904
22905 Configuration files:
22906 $config_files
22907
22908 Configuration headers:
22909 $config_headers
22910
22911 Configuration commands:
22912 $config_commands
22913
22914 Report bugs to <dickey@invisible-island.net>."
22915 EOF
22916
22917 cat >>$CONFIG_STATUS <<EOF
22918 ac_cs_version="\\
22919 config.status
22920 configured by $0, generated by GNU Autoconf 2.52.20150926,
22921   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22922
22923 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22924 Free Software Foundation, Inc.
22925 This config.status script is free software; the Free Software Foundation
22926 gives unlimited permission to copy, distribute and modify it."
22927 srcdir=$srcdir
22928 INSTALL="$INSTALL"
22929 EOF
22930
22931 cat >>$CONFIG_STATUS <<\EOF
22932 # If no file are specified by the user, then we need to provide default
22933 # value.  By we need to know if files were specified by the user.
22934 ac_need_defaults=:
22935 while test $# != 0
22936 do
22937   case $1 in
22938   --*=*)
22939     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22940     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22941     shift
22942     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22943     shift
22944     ;;
22945   -*);;
22946   *) # This is not an option, so the user has probably given explicit
22947      # arguments.
22948      ac_need_defaults=false;;
22949   esac
22950
22951   case $1 in
22952   # Handling of the options.
22953 EOF
22954 cat >>$CONFIG_STATUS <<EOF
22955   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22956     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22957     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22958 EOF
22959 cat >>$CONFIG_STATUS <<\EOF
22960   --version | --vers* | -V )
22961     echo "$ac_cs_version"; exit 0 ;;
22962   --he | --h)
22963     # Conflict between --help and --header
22964     { { echo "$as_me:22964: error: ambiguous option: $1
22965 Try \`$0 --help' for more information." >&5
22966 echo "$as_me: error: ambiguous option: $1
22967 Try \`$0 --help' for more information." >&2;}
22968    { (exit 1); exit 1; }; };;
22969   --help | --hel | -h )
22970     echo "$ac_cs_usage"; exit 0 ;;
22971   --debug | --d* | -d )
22972     debug=: ;;
22973   --file | --fil | --fi | --f )
22974     shift
22975     CONFIG_FILES="$CONFIG_FILES $1"
22976     ac_need_defaults=false;;
22977   --header | --heade | --head | --hea )
22978     shift
22979     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22980     ac_need_defaults=false;;
22981
22982   # This is an error.
22983   -*) { { echo "$as_me:22983: error: unrecognized option: $1
22984 Try \`$0 --help' for more information." >&5
22985 echo "$as_me: error: unrecognized option: $1
22986 Try \`$0 --help' for more information." >&2;}
22987    { (exit 1); exit 1; }; } ;;
22988
22989   *) ac_config_targets="$ac_config_targets $1" ;;
22990
22991   esac
22992   shift
22993 done
22994
22995 exec 5>>config.log
22996 cat >&5 << _ACEOF
22997
22998 ## ----------------------- ##
22999 ## Running config.status.  ##
23000 ## ----------------------- ##
23001
23002 This file was extended by $as_me 2.52.20150926, executed with
23003   CONFIG_FILES    = $CONFIG_FILES
23004   CONFIG_HEADERS  = $CONFIG_HEADERS
23005   CONFIG_LINKS    = $CONFIG_LINKS
23006   CONFIG_COMMANDS = $CONFIG_COMMANDS
23007   > $ac_cs_invocation
23008 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23009
23010 _ACEOF
23011 EOF
23012
23013 cat >>$CONFIG_STATUS <<EOF
23014 #
23015 # INIT-COMMANDS section.
23016 #
23017
23018 ### Special initialization commands, used to pass information from the
23019 ### configuration-run into config.status
23020
23021 AWK="$AWK"
23022 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23023 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23024 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23025 ECHO_LD="$ECHO_LD"
23026 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23027 LDCONFIG="$LDCONFIG"
23028 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23029 LIB_NAME="$LIB_NAME"
23030 LIB_PREFIX="$LIB_PREFIX"
23031 LIB_SUBSETS="$LIB_SUBSETS"
23032 LIB_SUFFIX="$LIB_SUFFIX"
23033 LIB_TRACING="$LIB_TRACING"
23034 LN_S="$LN_S"
23035 MAKE_TERMINFO="$MAKE_TERMINFO"
23036 NCURSES_MAJOR="$NCURSES_MAJOR"
23037 NCURSES_MINOR="$NCURSES_MINOR"
23038 NCURSES_OSPEED="$NCURSES_OSPEED"
23039 NCURSES_PATCH="$NCURSES_PATCH"
23040 SRC_SUBDIRS="$SRC_SUBDIRS"
23041 TERMINFO="$TERMINFO"
23042 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23043 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23044 TICS_NAME="$TICS_NAME"
23045 TICS_SUFFIX="$TICS_SUFFIX"
23046 TIC_PATH="$TIC_PATH"
23047 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23048 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23049 TINFO_NAME="$TINFO_NAME"
23050 TINFO_SUFFIX="$TINFO_SUFFIX"
23051 UNALTERED_SYMS="$UNALTERED_SYMS"
23052 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23053 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23054 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23055 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23056 WILDCARD_SYMS="$WILDCARD_SYMS"
23057 WITH_CURSES_H="$with_curses_h"
23058 WITH_ECHO="${enable_echo:=yes}"
23059 WITH_OVERWRITE="$with_overwrite"
23060 cf_LIST_MODELS="$cf_list_models"
23061 cf_cv_abi_version="$cf_cv_abi_version"
23062 cf_cv_do_relink="$cf_cv_do_relink"
23063 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23064 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23065 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23066 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23067 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23068 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23069 cf_cv_rel_version="$cf_cv_rel_version"
23070 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23071 cf_cv_shared_soname='$cf_cv_shared_soname'
23072 cf_cv_shlib_version="$cf_cv_shlib_version"
23073 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23074 cf_cv_system_name="$cf_cv_system_name"
23075 cf_cv_term_driver="$with_term_driver"
23076 cf_with_ada="$cf_with_ada"
23077 cf_with_cxx_binding="$cf_with_cxx_binding"
23078 cf_with_db_install="$cf_with_db_install"
23079 cf_with_manpages="$cf_with_manpages"
23080 cf_with_tests="$cf_with_tests"
23081 host="$host"
23082 target="$target"
23083 with_shared_cxx="$with_shared_cxx"
23084
23085 EOF
23086
23087 cat >>$CONFIG_STATUS <<\EOF
23088 for ac_config_target in $ac_config_targets
23089 do
23090   case "$ac_config_target" in
23091   # Handling of arguments.
23092   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23093   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23094   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23095   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23096   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23097   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23098   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23099   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23100   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23101   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23102   *) { { echo "$as_me:23102: error: invalid argument: $ac_config_target" >&5
23103 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23104    { (exit 1); exit 1; }; };;
23105   esac
23106 done
23107
23108 # If the user did not use the arguments to specify the items to instantiate,
23109 # then the envvar interface is used.  Set only those that are not.
23110 # We use the long form for the default assignment because of an extremely
23111 # bizarre bug on SunOS 4.1.3.
23112 if $ac_need_defaults; then
23113   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23114   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23115   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23116 fi
23117
23118 # Create a temporary directory, and hook for its removal unless debugging.
23119 $debug ||
23120 {
23121   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23122   trap '{ (exit 1); exit 1; }' 1 2 13 15
23123 }
23124
23125 # Create a (secure) tmp directory for tmp files.
23126 : ${TMPDIR=/tmp}
23127 {
23128   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23129   test -n "$tmp" && test -d "$tmp"
23130 }  ||
23131 {
23132   tmp=$TMPDIR/cs$$-$RANDOM
23133   (umask 077 && mkdir $tmp)
23134 } ||
23135 {
23136    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23137    { (exit 1); exit 1; }
23138 }
23139
23140 EOF
23141
23142 cat >>$CONFIG_STATUS <<EOF
23143
23144 #
23145 # CONFIG_FILES section.
23146 #
23147
23148 # No need to generate the scripts if there are no CONFIG_FILES.
23149 # This happens for instance when ./config.status config.h
23150 if test -n "\$CONFIG_FILES"; then
23151   # Protect against being on the right side of a sed subst in config.status.
23152   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23153    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23154 s,@SHELL@,$SHELL,;t t
23155 s,@exec_prefix@,$exec_prefix,;t t
23156 s,@prefix@,$prefix,;t t
23157 s,@program_transform_name@,$program_transform_name,;t t
23158 s,@bindir@,$bindir,;t t
23159 s,@sbindir@,$sbindir,;t t
23160 s,@libexecdir@,$libexecdir,;t t
23161 s,@datarootdir@,$datarootdir,;t t
23162 s,@datadir@,$datadir,;t t
23163 s,@sysconfdir@,$sysconfdir,;t t
23164 s,@sharedstatedir@,$sharedstatedir,;t t
23165 s,@localstatedir@,$localstatedir,;t t
23166 s,@libdir@,$libdir,;t t
23167 s,@includedir@,$includedir,;t t
23168 s,@oldincludedir@,$oldincludedir,;t t
23169 s,@infodir@,$infodir,;t t
23170 s,@mandir@,$mandir,;t t
23171 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23172 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23173 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23174 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23175 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23176 s,@build_alias@,$build_alias,;t t
23177 s,@host_alias@,$host_alias,;t t
23178 s,@target_alias@,$target_alias,;t t
23179 s,@ECHO_C@,$ECHO_C,;t t
23180 s,@ECHO_N@,$ECHO_N,;t t
23181 s,@ECHO_T@,$ECHO_T,;t t
23182 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23183 s,@DEFS@,$DEFS,;t t
23184 s,@LIBS@,$LIBS,;t t
23185 s,@top_builddir@,$top_builddir,;t t
23186 s,@EGREP@,$EGREP,;t t
23187 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23188 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23189 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23190 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23191 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23192 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23193 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23194 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23195 s,@VERSION@,$VERSION,;t t
23196 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23197 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23198 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23199 s,@PACKAGE@,$PACKAGE,;t t
23200 s,@build@,$build,;t t
23201 s,@build_cpu@,$build_cpu,;t t
23202 s,@build_vendor@,$build_vendor,;t t
23203 s,@build_os@,$build_os,;t t
23204 s,@host@,$host,;t t
23205 s,@host_cpu@,$host_cpu,;t t
23206 s,@host_vendor@,$host_vendor,;t t
23207 s,@host_os@,$host_os,;t t
23208 s,@target@,$target,;t t
23209 s,@target_cpu@,$target_cpu,;t t
23210 s,@target_vendor@,$target_vendor,;t t
23211 s,@target_os@,$target_os,;t t
23212 s,@CC@,$CC,;t t
23213 s,@CFLAGS@,$CFLAGS,;t t
23214 s,@LDFLAGS@,$LDFLAGS,;t t
23215 s,@CPPFLAGS@,$CPPFLAGS,;t t
23216 s,@ac_ct_CC@,$ac_ct_CC,;t t
23217 s,@EXEEXT@,$EXEEXT,;t t
23218 s,@OBJEXT@,$OBJEXT,;t t
23219 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23220 s,@CPP@,$CPP,;t t
23221 s,@LDCONFIG@,$LDCONFIG,;t t
23222 s,@CXX@,$CXX,;t t
23223 s,@CXXFLAGS@,$CXXFLAGS,;t t
23224 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23225 s,@AWK@,$AWK,;t t
23226 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23227 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23228 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23229 s,@LINT@,$LINT,;t t
23230 s,@LINT_OPTS@,$LINT_OPTS,;t t
23231 s,@LN_S@,$LN_S,;t t
23232 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23233 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23234 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23235 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
23236 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
23237 s,@SET_MAKE@,$SET_MAKE,;t t
23238 s,@CTAGS@,$CTAGS,;t t
23239 s,@ETAGS@,$ETAGS,;t t
23240 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23241 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23242 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
23243 s,@RANLIB@,$RANLIB,;t t
23244 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23245 s,@LD@,$LD,;t t
23246 s,@ac_ct_LD@,$ac_ct_LD,;t t
23247 s,@AR@,$AR,;t t
23248 s,@ac_ct_AR@,$ac_ct_AR,;t t
23249 s,@NM@,$NM,;t t
23250 s,@ac_ct_NM@,$ac_ct_NM,;t t
23251 s,@ARFLAGS@,$ARFLAGS,;t t
23252 s,@DESTDIR@,$DESTDIR,;t t
23253 s,@BUILD_CC@,$BUILD_CC,;t t
23254 s,@BUILD_CPP@,$BUILD_CPP,;t t
23255 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
23256 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23257 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23258 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23259 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23260 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23261 s,@cf_list_models@,$cf_list_models,;t t
23262 s,@ABI_VERSION@,$ABI_VERSION,;t t
23263 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23264 s,@LIBTOOL@,$LIBTOOL,;t t
23265 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23266 s,@LT_UNDEF@,$LT_UNDEF,;t t
23267 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23268 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23269 s,@LIB_CREATE@,$LIB_CREATE,;t t
23270 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23271 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23272 s,@LIB_PREP@,$LIB_PREP,;t t
23273 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23274 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23275 s,@LIB_LINK@,$LIB_LINK,;t t
23276 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23277 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23278 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23279 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23280 s,@TICS_NAME@,$TICS_NAME,;t t
23281 s,@TINFO_NAME@,$TINFO_NAME,;t t
23282 s,@LIB_NAME@,$LIB_NAME,;t t
23283 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23284 s,@CC_G_OPT@,$CC_G_OPT,;t t
23285 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23286 s,@LD_MODEL@,$LD_MODEL,;t t
23287 s,@shlibdir@,$shlibdir,;t t
23288 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23289 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23290 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23291 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23292 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23293 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23294 s,@LINK_PROGS@,$LINK_PROGS,;t t
23295 s,@LINK_TESTS@,$LINK_TESTS,;t t
23296 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23297 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23298 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23299 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23300 s,@RPATH_LIST@,$RPATH_LIST,;t t
23301 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23302 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23303 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23304 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23305 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23306 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23307 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23308 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23309 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23310 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23311 s,@XTERM_KBS@,$XTERM_KBS,;t t
23312 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23313 s,@TERMINFO@,$TERMINFO,;t t
23314 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23315 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23316 s,@TERMPATH@,$TERMPATH,;t t
23317 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23318 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23319 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
23320 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23321 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23322 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23323 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23324 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23325 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23326 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23327 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23328 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23329 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23330 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23331 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23332 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23333 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23334 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23335 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23336 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23337 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23338 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23339 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23340 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23341 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23342 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23343 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23344 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23345 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23346 s,@PTHREAD@,$PTHREAD,;t t
23347 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23348 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23349 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23350 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23351 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23352 s,@ECHO_LT@,$ECHO_LT,;t t
23353 s,@ECHO_LD@,$ECHO_LD,;t t
23354 s,@RULE_CC@,$RULE_CC,;t t
23355 s,@SHOW_CC@,$SHOW_CC,;t t
23356 s,@ECHO_CC@,$ECHO_CC,;t t
23357 s,@ECHO_LINK@,$ECHO_LINK,;t t
23358 s,@ADAFLAGS@,$ADAFLAGS,;t t
23359 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23360 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23361 s,@ADA_TRACE@,$ADA_TRACE,;t t
23362 s,@MATH_LIB@,$MATH_LIB,;t t
23363 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23364 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23365 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23366 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23367 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23368 s,@TEST_LIBS@,$TEST_LIBS,;t t
23369 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23370 s,@CXXCPP@,$CXXCPP,;t t
23371 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23372 s,@CXX_AR@,$CXX_AR,;t t
23373 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23374 s,@CXXLIBS@,$CXXLIBS,;t t
23375 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23376 s,@gnat_exists@,$gnat_exists,;t t
23377 s,@M4_exists@,$M4_exists,;t t
23378 s,@cf_ada_make@,$cf_ada_make,;t t
23379 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23380 s,@cf_compile_generics@,$cf_compile_generics,;t t
23381 s,@cf_generic_objects@,$cf_generic_objects,;t t
23382 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23383 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23384 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23385 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23386 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23387 s,@cf_ada_package@,$cf_ada_package,;t t
23388 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23389 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23390 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23391 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23392 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23393 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23394 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23395 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23396 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23397 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23398 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23399 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23400 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23401 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23402 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23403 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23404 s,@TICS_LIBS@,$TICS_LIBS,;t t
23405 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23406 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23407 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23408 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23409 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23410 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23411 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23412 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23413 s,@includesubdir@,$includesubdir,;t t
23414 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23415 s,@TICS_LIST@,$TICS_LIST,;t t
23416 s,@TINFO_LIST@,$TINFO_LIST,;t t
23417 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23418 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23419 s,@TEST_ARGS@,$TEST_ARGS,;t t
23420 s,@TEST_DEPS@,$TEST_DEPS,;t t
23421 s,@TEST_ARG2@,$TEST_ARG2,;t t
23422 s,@TEST_DEP2@,$TEST_DEP2,;t t
23423 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23424 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23425 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23426 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23427 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23428 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23429 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23430 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23431 s,@cross_compiling@,$cross_compiling,;t t
23432 s,@TIC_PATH@,$TIC_PATH,;t t
23433 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23434 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23435 s,@PANEL_NAME@,$PANEL_NAME,;t t
23436 s,@MENU_NAME@,$MENU_NAME,;t t
23437 s,@FORM_NAME@,$FORM_NAME,;t t
23438 s,@CXX_NAME@,$CXX_NAME,;t t
23439 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23440 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23441 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23442 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23443 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23444 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23445 CEOF
23446
23447 EOF
23448
23449   cat >>$CONFIG_STATUS <<\EOF
23450   # Split the substitutions into bite-sized pieces for seds with
23451   # small command number limits, like on Digital OSF/1 and HP-UX.
23452   ac_max_sed_lines=48
23453   ac_sed_frag=1 # Number of current file.
23454   ac_beg=1 # First line for current file.
23455   ac_end=$ac_max_sed_lines # Line after last line for current file.
23456   ac_more_lines=:
23457   ac_sed_cmds=
23458   while $ac_more_lines; do
23459     if test $ac_beg -gt 1; then
23460       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23461     else
23462       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23463     fi
23464     if test ! -s $tmp/subs.frag; then
23465       ac_more_lines=false
23466     else
23467       # The purpose of the label and of the branching condition is to
23468       # speed up the sed processing (if there are no `@' at all, there
23469       # is no need to browse any of the substitutions).
23470       # These are the two extra sed commands mentioned above.
23471       (echo ':t
23472   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23473       # It is possible to make a multiline substitution using escaped newlines.
23474       # Ensure that we do not split the substitution between script fragments.
23475       ac_BEG=$ac_end
23476       ac_END=`expr $ac_end + $ac_max_sed_lines`
23477       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23478       if test -s $tmp/subs.next; then
23479         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23480         if test ! -s $tmp/subs.edit; then
23481           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23482           if test ! -s $tmp/subs.edit; then
23483             if test $ac_beg -gt 1; then
23484               ac_end=`expr $ac_end - 1`
23485               continue
23486             fi
23487           fi
23488         fi
23489       fi
23490
23491       if test -z "$ac_sed_cmds"; then
23492         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23493       else
23494         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23495       fi
23496       ac_sed_frag=`expr $ac_sed_frag + 1`
23497       ac_beg=$ac_end
23498       ac_end=`expr $ac_end + $ac_max_sed_lines`
23499     fi
23500   done
23501   if test -z "$ac_sed_cmds"; then
23502     ac_sed_cmds=cat
23503   fi
23504 fi # test -n "$CONFIG_FILES"
23505
23506 EOF
23507 cat >>$CONFIG_STATUS <<\EOF
23508 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23509   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23510   case $ac_file in
23511   - | *:- | *:-:* ) # input from stdin
23512         cat >$tmp/stdin
23513         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23514         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23515   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23516         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23517   * )   ac_file_in=$ac_file.in ;;
23518   esac
23519
23520   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23521   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23522          X"$ac_file" : 'X\(//\)[^/]' \| \
23523          X"$ac_file" : 'X\(//\)$' \| \
23524          X"$ac_file" : 'X\(/\)' \| \
23525          .     : '\(.\)' 2>/dev/null ||
23526 echo X"$ac_file" |
23527     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23528           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23529           /^X\(\/\/\)$/{ s//\1/; q; }
23530           /^X\(\/\).*/{ s//\1/; q; }
23531           s/.*/./; q'`
23532   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23533     { case "$ac_dir" in
23534   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23535   *)                      as_incr_dir=.;;
23536 esac
23537 as_dummy="$ac_dir"
23538 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23539   case $as_mkdir_dir in
23540     # Skip DOS drivespec
23541     ?:) as_incr_dir=$as_mkdir_dir ;;
23542     *)
23543       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23544       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23545     ;;
23546   esac
23547 done; }
23548
23549     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23550     # A "../" for each directory in $ac_dir_suffix.
23551     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23552   else
23553     ac_dir_suffix= ac_dots=
23554   fi
23555
23556   case $srcdir in
23557   .)  ac_srcdir=.
23558       if test -z "$ac_dots"; then
23559          ac_top_srcdir=.
23560       else
23561          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23562       fi ;;
23563   [\\/]* | ?:[\\/]* )
23564       ac_srcdir=$srcdir$ac_dir_suffix;
23565       ac_top_srcdir=$srcdir ;;
23566   *) # Relative path.
23567     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23568     ac_top_srcdir=$ac_dots$srcdir ;;
23569   esac
23570
23571   case $INSTALL in
23572   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23573   *) ac_INSTALL=$ac_dots$INSTALL ;;
23574   esac
23575
23576   if test x"$ac_file" != x-; then
23577     { echo "$as_me:23577: creating $ac_file" >&5
23578 echo "$as_me: creating $ac_file" >&6;}
23579     rm -f "$ac_file"
23580   fi
23581   # Let's still pretend it is `configure' which instantiates (i.e., don't
23582   # use $as_me), people would be surprised to read:
23583   #    /* config.h.  Generated automatically by config.status.  */
23584   configure_input="Generated automatically from `echo $ac_file_in |
23585                                                  sed 's,.*/,,'` by configure."
23586
23587   # First look for the input files in the build tree, otherwise in the
23588   # src tree.
23589   ac_file_inputs=`IFS=:
23590     for f in $ac_file_in; do
23591       case $f in
23592       -) echo $tmp/stdin ;;
23593       [\\/$]*)
23594          # Absolute (can't be DOS-style, as IFS=:)
23595          test -f "$f" || { { echo "$as_me:23595: error: cannot find input file: $f" >&5
23596 echo "$as_me: error: cannot find input file: $f" >&2;}
23597    { (exit 1); exit 1; }; }
23598          echo $f;;
23599       *) # Relative
23600          if test -f "$f"; then
23601            # Build tree
23602            echo $f
23603          elif test -f "$srcdir/$f"; then
23604            # Source tree
23605            echo $srcdir/$f
23606          else
23607            # /dev/null tree
23608            { { echo "$as_me:23608: error: cannot find input file: $f" >&5
23609 echo "$as_me: error: cannot find input file: $f" >&2;}
23610    { (exit 1); exit 1; }; }
23611          fi;;
23612       esac
23613     done` || { (exit 1); exit 1; }
23614 EOF
23615 cat >>$CONFIG_STATUS <<\EOF
23616   ac_warn_datarootdir=no
23617   if test x"$ac_file" != x-; then
23618     for ac_item in $ac_file_inputs
23619     do
23620       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23621       if test -n "$ac_seen"; then
23622         ac_used=`grep '@datarootdir@' $ac_item`
23623         if test -z "$ac_used"; then
23624           { echo "$as_me:23624: WARNING: datarootdir was used implicitly but not set:
23625 $ac_seen" >&5
23626 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23627 $ac_seen" >&2;}
23628           ac_warn_datarootdir=yes
23629         fi
23630       fi
23631       ac_seen=`grep '${datarootdir}' $ac_item`
23632       if test -n "$ac_seen"; then
23633         { echo "$as_me:23633: WARNING: datarootdir was used explicitly but not set:
23634 $ac_seen" >&5
23635 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23636 $ac_seen" >&2;}
23637         ac_warn_datarootdir=yes
23638       fi
23639     done
23640   fi
23641
23642 if test "x$ac_warn_datarootdir" = xyes; then
23643   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23644 fi
23645
23646 EOF
23647 cat >>$CONFIG_STATUS <<EOF
23648   sed "$ac_vpsub
23649 $extrasub
23650 EOF
23651 cat >>$CONFIG_STATUS <<\EOF
23652 :t
23653 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23654 s,@configure_input@,$configure_input,;t t
23655 s,@srcdir@,$ac_srcdir,;t t
23656 s,@top_srcdir@,$ac_top_srcdir,;t t
23657 s,@INSTALL@,$ac_INSTALL,;t t
23658 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23659   rm -f $tmp/stdin
23660   if test x"$ac_file" != x-; then
23661     cp $tmp/out $ac_file
23662
23663     for ac_name in prefix exec_prefix datarootdir
23664     do
23665         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23666         if test -n "$ac_seen"; then
23667             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23668             if test -z "$ac_init"; then
23669               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23670               { echo "$as_me:23670: WARNING: Variable $ac_name is used but was not set:
23671 $ac_seen" >&5
23672 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23673 $ac_seen" >&2;}
23674             fi
23675         fi
23676     done
23677     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23678     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23679     if test -s $tmp/out; then
23680       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23681       { echo "$as_me:23681: WARNING: Some variables may not be substituted:
23682 $ac_seen" >&5
23683 echo "$as_me: WARNING: Some variables may not be substituted:
23684 $ac_seen" >&2;}
23685     fi
23686   else
23687     cat $tmp/out
23688   fi
23689   rm -f $tmp/out
23690
23691 done
23692 EOF
23693 cat >>$CONFIG_STATUS <<\EOF
23694
23695 #
23696 # CONFIG_HEADER section.
23697 #
23698
23699 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23700 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23701 #
23702 # ac_d sets the value in "#define NAME VALUE" lines.
23703 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23704 ac_dB='[        ].*$,\1#\2'
23705 ac_dC=' '
23706 ac_dD=',;t'
23707 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23708 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23709 ac_iB='\([      ]\),\1#\2define\3'
23710 ac_iC=' '
23711 ac_iD='\4,;t'
23712 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23713 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23714 ac_uB='$,\1#\2define\3'
23715 ac_uC=' '
23716 ac_uD=',;t'
23717
23718 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23719   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23720   case $ac_file in
23721   - | *:- | *:-:* ) # input from stdin
23722         cat >$tmp/stdin
23723         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23724         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23725   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23726         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23727   * )   ac_file_in=$ac_file.in ;;
23728   esac
23729
23730   test x"$ac_file" != x- && { echo "$as_me:23730: creating $ac_file" >&5
23731 echo "$as_me: creating $ac_file" >&6;}
23732
23733   # First look for the input files in the build tree, otherwise in the
23734   # src tree.
23735   ac_file_inputs=`IFS=:
23736     for f in $ac_file_in; do
23737       case $f in
23738       -) echo $tmp/stdin ;;
23739       [\\/$]*)
23740          # Absolute (can't be DOS-style, as IFS=:)
23741          test -f "$f" || { { echo "$as_me:23741: error: cannot find input file: $f" >&5
23742 echo "$as_me: error: cannot find input file: $f" >&2;}
23743    { (exit 1); exit 1; }; }
23744          echo $f;;
23745       *) # Relative
23746          if test -f "$f"; then
23747            # Build tree
23748            echo $f
23749          elif test -f "$srcdir/$f"; then
23750            # Source tree
23751            echo $srcdir/$f
23752          else
23753            # /dev/null tree
23754            { { echo "$as_me:23754: error: cannot find input file: $f" >&5
23755 echo "$as_me: error: cannot find input file: $f" >&2;}
23756    { (exit 1); exit 1; }; }
23757          fi;;
23758       esac
23759     done` || { (exit 1); exit 1; }
23760   # Remove the trailing spaces.
23761   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23762
23763 EOF
23764
23765 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23766 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23767 # be either 'cat' or 'sort'.
23768 cat confdefs.h | uniq >conftest.vals
23769
23770 # Break up conftest.vals because some shells have a limit on
23771 # the size of here documents, and old seds have small limits too.
23772
23773 rm -f conftest.tail
23774 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23775 while grep . conftest.vals >/dev/null
23776 do
23777   # Write chunks of a limited-size here document to conftest.frag.
23778   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23779   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23780   echo 'CEOF' >> $CONFIG_STATUS
23781   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23782   rm -f conftest.vals
23783   mv conftest.tail conftest.vals
23784 done
23785 rm -f conftest.vals
23786
23787 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23788 # marker @DEFS@.
23789 echo '  cat >> conftest.edit <<CEOF
23790 /@DEFS@/r conftest.frag
23791 /@DEFS@/d
23792 CEOF
23793 sed -f conftest.edit $tmp/in > $tmp/out
23794 rm -f $tmp/in
23795 mv $tmp/out $tmp/in
23796 rm -f conftest.edit conftest.frag
23797 ' >> $CONFIG_STATUS
23798
23799 cat >>$CONFIG_STATUS <<\EOF
23800   # Let's still pretend it is `configure' which instantiates (i.e., don't
23801   # use $as_me), people would be surprised to read:
23802   #    /* config.h.  Generated automatically by config.status.  */
23803   if test x"$ac_file" = x-; then
23804     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23805   else
23806     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23807   fi
23808   cat $tmp/in >>$tmp/config.h
23809   rm -f $tmp/in
23810   if test x"$ac_file" != x-; then
23811     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23812       { echo "$as_me:23812: $ac_file is unchanged" >&5
23813 echo "$as_me: $ac_file is unchanged" >&6;}
23814     else
23815       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23816          X"$ac_file" : 'X\(//\)[^/]' \| \
23817          X"$ac_file" : 'X\(//\)$' \| \
23818          X"$ac_file" : 'X\(/\)' \| \
23819          .     : '\(.\)' 2>/dev/null ||
23820 echo X"$ac_file" |
23821     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23822           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23823           /^X\(\/\/\)$/{ s//\1/; q; }
23824           /^X\(\/\).*/{ s//\1/; q; }
23825           s/.*/./; q'`
23826       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23827         { case "$ac_dir" in
23828   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23829   *)                      as_incr_dir=.;;
23830 esac
23831 as_dummy="$ac_dir"
23832 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23833   case $as_mkdir_dir in
23834     # Skip DOS drivespec
23835     ?:) as_incr_dir=$as_mkdir_dir ;;
23836     *)
23837       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23838       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23839     ;;
23840   esac
23841 done; }
23842
23843       fi
23844       rm -f $ac_file
23845       mv $tmp/config.h $ac_file
23846     fi
23847   else
23848     cat $tmp/config.h
23849     rm -f $tmp/config.h
23850   fi
23851 done
23852 EOF
23853 cat >>$CONFIG_STATUS <<\EOF
23854 #
23855 # CONFIG_COMMANDS section.
23856 #
23857 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23858   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23859   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23860
23861   case $ac_dest in
23862     default )
23863 if test "x$cf_with_tests" != xno ; then
23864
23865 for cf_dir in test
23866 do
23867         if test ! -d $srcdir/$cf_dir; then
23868                 continue
23869         elif test -f $srcdir/$cf_dir/programs; then
23870                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23871         fi
23872 done
23873
23874 fi
23875
23876 cf_prefix=$LIB_PREFIX
23877
23878 case $cf_cv_shlib_version in
23879 (cygdll|msysdll|mingw)
23880         TINFO_NAME=$TINFO_ARG_SUFFIX
23881         TINFO_SUFFIX=.dll
23882         ;;
23883 esac
23884
23885 if test -n "$TINFO_SUFFIX" ; then
23886         case $TINFO_SUFFIX in
23887         (tw*)
23888                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23889                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23890                 ;;
23891         (t*)
23892                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23893                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23894                 ;;
23895         (w*)
23896                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23897                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23898                 ;;
23899         esac
23900 fi
23901
23902 for cf_dir in $SRC_SUBDIRS
23903 do
23904         if test ! -d $srcdir/$cf_dir ; then
23905                 continue
23906         elif test -f $srcdir/$cf_dir/modules; then
23907
23908                 SHARED_LIB=
23909                 Libs_To_Make=
23910                 cf_awk_program=
23911                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23912                 then
23913                         cf_awk_program="$cf_awk_program\
23914 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
23915 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
23916 "
23917                 fi
23918
23919                 if test "x$WILDCARD_SYMS" = xno
23920                 then
23921                         cf_awk_program="$cf_awk_program\
23922 /[      ]_\\*;/ { skip=1; next; }\
23923 "
23924                 fi
23925
23926                 if test "x$cf_awk_program" != "x"
23927                 then
23928                         cat >>$cf_dir/Makefile <<CF_EOF
23929
23930 # Generated by CF_LIB_RULES
23931 resulting.map: $UNALTERED_SYMS
23932         $AWK 'BEGIN { skip = 1; last=""; } \
23933 $cf_awk_program \
23934 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
23935  skip = 0; last = \$\$0; } \
23936 END { print last; }' < $UNALTERED_SYMS >\$@
23937
23938 distclean::
23939         rm -f resulting.map
23940 CF_EOF
23941                 fi
23942
23943                 for cf_item in $cf_LIST_MODELS
23944                 do
23945
23946         case X$cf_item in
23947         (Xlibtool)
23948                 cf_suffix='.la'
23949                 cf_depsuf=$cf_suffix
23950                 ;;
23951         (Xdebug)
23952                 cf_suffix='_g.a'
23953                 cf_depsuf=$cf_suffix
23954                 ;;
23955         (Xprofile)
23956                 cf_suffix='_p.a'
23957                 cf_depsuf=$cf_suffix
23958                 ;;
23959         (Xshared)
23960                 case $cf_cv_system_name in
23961                 (aix[5-7]*)
23962                         cf_suffix='.so'
23963                         cf_depsuf=$cf_suffix
23964                         ;;
23965                 (cygwin*|msys*|mingw*)
23966                         cf_suffix='.dll'
23967                         cf_depsuf='.dll.a'
23968                         ;;
23969                 (darwin*)
23970                         cf_suffix='.dylib'
23971                         cf_depsuf=$cf_suffix
23972                         ;;
23973                 (hpux*)
23974                         case $target in
23975                         (ia64*)
23976                                 cf_suffix='.so'
23977                                 cf_depsuf=$cf_suffix
23978                                 ;;
23979                         (*)
23980                                 cf_suffix='.sl'
23981                                 cf_depsuf=$cf_suffix
23982                                 ;;
23983                         esac
23984                         ;;
23985                 (*)
23986                         cf_suffix='.so'
23987                         cf_depsuf=$cf_suffix
23988                         ;;
23989                 esac
23990                 ;;
23991         (*)
23992                 cf_suffix='.a'
23993                 cf_depsuf=$cf_suffix
23994                 ;;
23995         esac
23996         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23997         then
23998                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23999                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24000         fi
24001
24002                         cf_libname=$cf_dir
24003                         test "$cf_dir" = c++ && cf_libname=ncurses++
24004                         if test $cf_item = shared ; then
24005                                 if test -n "${LIB_SUFFIX}"
24006                                 then
24007                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24008                                 else
24009                                         cf_shared_suffix="$cf_suffix"
24010                                 fi
24011                                 if test "$cf_cv_do_symlinks" = yes ; then
24012                                         cf_version_name=
24013
24014                                         case "$cf_cv_shlib_version" in
24015                                         (rel)
24016                                                 cf_version_name=REL_VERSION
24017                                                 ;;
24018                                         (abi)
24019                                                 cf_version_name=ABI_VERSION
24020                                                 ;;
24021                                         esac
24022
24023                                         if test -n "$cf_version_name"
24024                                         then
24025                                                 case "$cf_cv_system_name" in
24026                                                 (darwin*)
24027                                                         # "w", etc?
24028                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24029                                                         ;;
24030                                                 (*)
24031                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24032                                                         ;;
24033                                                 esac
24034                                         fi
24035                                         if test -n "${USE_LIB_SUFFIX}"
24036                                         then
24037                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24038                                         else
24039                                                 cf_shared_suffix="$cf_suffix"
24040                                         fi
24041                                 fi
24042                                 # cygwin needs import library, and has unique naming convention
24043                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24044                                 # use 'cyg' prefix for shared lib.
24045                                 case $cf_cv_shlib_version in
24046                                 (cygdll)
24047                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24048                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24049                                         ;;
24050                                 (msysdll)
24051                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24052                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24053                                         ;;
24054                                 (mingw)
24055                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24056                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24057                                         ;;
24058                                 (*)
24059                                         cf_add_lib=
24060                                         ;;
24061                                 esac
24062                                 if test -n "$cf_add_lib"
24063                                 then
24064                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24065                                         continue
24066                                 fi
24067                         fi
24068                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24069                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24070                 done
24071
24072                 if test $cf_dir = ncurses ; then
24073                         cf_subsets="$LIB_SUBSETS"
24074                         cf_r_parts="$cf_subsets"
24075                         cf_liblist="$Libs_To_Make"
24076
24077                         while test -n "$cf_r_parts"
24078                         do
24079                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24080                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24081                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24082                                         cf_add_lib=
24083                                         case $cf_l_parts in
24084                                         (*termlib*)
24085                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24086                                                 ;;
24087                                         (*ticlib*)
24088                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24089                                                 ;;
24090                                         (*)
24091                                                 break
24092                                                 ;;
24093                                         esac
24094                                         if test -n "$cf_add_lib"; then
24095                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24096                                         fi
24097                                 else
24098                                         break
24099                                 fi
24100                         done
24101                 else
24102                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24103                 fi
24104
24105                 if test $cf_dir = c++; then
24106                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24107                                 cf_list=
24108                                 for cf_item in $Libs_To_Make
24109                                 do
24110                                         case $cf_item in
24111                                         (*.a)
24112                                                 ;;
24113                                         (*)
24114                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24115                                                 ;;
24116                                         esac
24117                                         for cf_test in $cf_list
24118                                         do
24119                                                 if test "$cf_test" = "$cf_item"
24120                                                 then
24121                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24122                                                         cf_item=
24123                                                         break
24124                                                 fi
24125                                         done
24126                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24127                                 done
24128                                 Libs_To_Make="$cf_list"
24129                         fi
24130                 fi
24131
24132                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24133                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24134                         $cf_dir/Makefile >$cf_dir/Makefile.out
24135                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24136
24137                 $AWK -f $srcdir/mk-0th.awk \
24138                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24139                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24140
24141                 for cf_subset in $cf_subsets
24142                 do
24143                         cf_subdirs=
24144                         for cf_item in $cf_LIST_MODELS
24145                         do
24146
24147                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24148
24149 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24150
24151                         CXX_MODEL=$cf_ITEM
24152                         if test "$CXX_MODEL" = SHARED; then
24153                                 case $cf_cv_shlib_version in
24154                                 (cygdll|msysdll|mingw)
24155                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24156
24157 echo "${as_me:-configure}:24157: testing overriding CXX_MODEL to SHARED ..." 1>&5
24158
24159                                         with_shared_cxx=yes
24160                                         ;;
24161                                 (*)
24162                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24163                                         ;;
24164                                 esac
24165                         fi
24166
24167         case X$cf_item in
24168         (Xlibtool)
24169                 cf_suffix='.la'
24170                 cf_depsuf=$cf_suffix
24171                 ;;
24172         (Xdebug)
24173                 cf_suffix='_g.a'
24174                 cf_depsuf=$cf_suffix
24175                 ;;
24176         (Xprofile)
24177                 cf_suffix='_p.a'
24178                 cf_depsuf=$cf_suffix
24179                 ;;
24180         (Xshared)
24181                 case $cf_cv_system_name in
24182                 (aix[5-7]*)
24183                         cf_suffix='.so'
24184                         cf_depsuf=$cf_suffix
24185                         ;;
24186                 (cygwin*|msys*|mingw*)
24187                         cf_suffix='.dll'
24188                         cf_depsuf='.dll.a'
24189                         ;;
24190                 (darwin*)
24191                         cf_suffix='.dylib'
24192                         cf_depsuf=$cf_suffix
24193                         ;;
24194                 (hpux*)
24195                         case $target in
24196                         (ia64*)
24197                                 cf_suffix='.so'
24198                                 cf_depsuf=$cf_suffix
24199                                 ;;
24200                         (*)
24201                                 cf_suffix='.sl'
24202                                 cf_depsuf=$cf_suffix
24203                                 ;;
24204                         esac
24205                         ;;
24206                 (*)
24207                         cf_suffix='.so'
24208                         cf_depsuf=$cf_suffix
24209                         ;;
24210                 esac
24211                 ;;
24212         (*)
24213                 cf_suffix='.a'
24214                 cf_depsuf=$cf_suffix
24215                 ;;
24216         esac
24217         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24218         then
24219                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24220                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24221         fi
24222
24223         case $cf_item in
24224         (libtool) cf_subdir='obj_lo'  ;;
24225         (normal)  cf_subdir='objects' ;;
24226         (debug)   cf_subdir='obj_g' ;;
24227         (profile) cf_subdir='obj_p' ;;
24228         (shared)
24229                 case $cf_cv_system_name in
24230                 (cygwin|msys)
24231                         cf_subdir='objects' ;;
24232                 (*)
24233                         cf_subdir='obj_s' ;;
24234                 esac
24235         esac
24236
24237                         # Test for case where we build libtinfo with a different name.
24238                         cf_libname=$cf_dir
24239                         if test $cf_dir = ncurses ; then
24240                                 case $cf_subset in
24241                                 (*base*)
24242                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
24243                                         ;;
24244                                 (*termlib*)
24245                                         cf_libname=$TINFO_LIB_SUFFIX
24246                                         ;;
24247                                 (ticlib*)
24248                                         cf_libname=$TICS_LIB_SUFFIX
24249                                         ;;
24250                                 esac
24251                         elif test $cf_dir = c++ ; then
24252                                 cf_libname=ncurses++$USE_LIB_SUFFIX
24253                         else
24254                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
24255                         fi
24256                         if test -n "${USE_ARG_SUFFIX}" ; then
24257                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
24258                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
24259                         fi
24260
24261                         # These dependencies really are for development, not
24262                         # builds, but they are useful in porting, too.
24263                         cf_depend="../include/ncurses_cfg.h"
24264                         if test "$srcdir" = "."; then
24265                                 cf_reldir="."
24266                         else
24267                                 cf_reldir="\${srcdir}"
24268                         fi
24269
24270                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24271                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24272                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24273                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24274                         fi
24275
24276                         cf_dir_suffix=
24277                         old_cf_suffix="$cf_suffix"
24278                         if test "$cf_cv_shlib_version_infix" = yes ; then
24279                         if test -n "$USE_LIB_SUFFIX" ; then
24280                                 case $USE_LIB_SUFFIX in
24281                                 (tw*)
24282                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24283                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24284                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24285                                         ;;
24286                                 (t*)
24287                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24288                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24289                                         cf_dir_suffix=t$EXTRA_SUFFIX
24290                                         ;;
24291                                 (w*)
24292                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24293                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24294                                         cf_dir_suffix=w$EXTRA_SUFFIX
24295                                         ;;
24296                                 (*)
24297                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24298                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24299                                         cf_dir_suffix=$EXTRA_SUFFIX
24300                                         ;;
24301                                 esac
24302                         fi
24303                         fi
24304
24305                         $AWK -f $srcdir/mk-1st.awk \
24306                                 name=${cf_libname}${cf_dir_suffix} \
24307                                 traces=$LIB_TRACING \
24308                                 MODEL=$cf_ITEM \
24309                                 CXX_MODEL=$CXX_MODEL \
24310                                 model=$cf_subdir \
24311                                 prefix=$cf_prefix \
24312                                 suffix=$cf_suffix \
24313                                 subset=$cf_subset \
24314                                 driver=$cf_cv_term_driver \
24315                                 SymLink="$LN_S" \
24316                                 TermlibRoot=$TINFO_NAME \
24317                                 TermlibSuffix=$TINFO_SUFFIX \
24318                                 ShlibVer=$cf_cv_shlib_version \
24319                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24320                                 ReLink=${cf_cv_do_relink:-no} \
24321                                 DoLinks=$cf_cv_do_symlinks \
24322                                 rmSoLocs=$cf_cv_rm_so_locs \
24323                                 ldconfig="$LDCONFIG" \
24324                                 overwrite=$WITH_OVERWRITE \
24325                                 depend="$cf_depend" \
24326                                 host="$host" \
24327                                 libtool_version="$LIBTOOL_VERSION" \
24328                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24329
24330                         cf_suffix="$old_cf_suffix"
24331
24332                         for cf_subdir2 in $cf_subdirs lib
24333                         do
24334                                 test $cf_subdir = $cf_subdir2 && break
24335                         done
24336                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24337                         $AWK -f $srcdir/mk-2nd.awk \
24338                                 name=$cf_dir \
24339                                 traces=$LIB_TRACING \
24340                                 MODEL=$cf_ITEM \
24341                                 model=$cf_subdir \
24342                                 subset=$cf_subset \
24343                                 srcdir=$srcdir \
24344                                 echo=$WITH_ECHO \
24345                                 crenames=$cf_cv_prog_CC_c_o \
24346                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24347                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24348                         cf_subdirs="$cf_subdirs $cf_subdir"
24349                         done
24350                 done
24351         fi
24352
24353         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24354 done
24355
24356 for cf_dir in $SRC_SUBDIRS
24357 do
24358         if test ! -d $srcdir/$cf_dir ; then
24359                 continue
24360         fi
24361
24362         if test -f $cf_dir/Makefile ; then
24363                 case "$cf_dir" in
24364                 (Ada95)
24365                         echo 'libs \' >> Makefile
24366                         echo 'install.libs \' >> Makefile
24367                         echo 'uninstall.libs ::' >> Makefile
24368                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24369                         ;;
24370                 esac
24371         fi
24372
24373         if test -f $srcdir/$cf_dir/modules; then
24374                 echo >> Makefile
24375                 if test -f $srcdir/$cf_dir/headers; then
24376 cat >> Makefile <<CF_EOF
24377 install.includes \\
24378 uninstall.includes \\
24379 CF_EOF
24380                 fi
24381 if test "$cf_dir" != "c++" ; then
24382 echo 'lint \' >> Makefile
24383 fi
24384 cat >> Makefile <<CF_EOF
24385 libs \\
24386 lintlib \\
24387 install.libs \\
24388 uninstall.libs \\
24389 install.$cf_dir \\
24390 uninstall.$cf_dir ::
24391         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24392 CF_EOF
24393         elif test -f $srcdir/$cf_dir/headers; then
24394 cat >> Makefile <<CF_EOF
24395
24396 libs \\
24397 install.libs \\
24398 uninstall.libs \\
24399 install.includes \\
24400 uninstall.includes ::
24401         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24402 CF_EOF
24403 fi
24404 done
24405
24406 if test "x$cf_with_db_install" = xyes; then
24407 cat >> Makefile <<CF_EOF
24408
24409 install.libs uninstall.libs \\
24410 install.data uninstall.data ::
24411 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24412 CF_EOF
24413 else
24414 cat >> Makefile <<CF_EOF
24415
24416 install.libs uninstall.libs ::
24417         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24418 CF_EOF
24419 fi
24420
24421 if test "x$cf_with_manpages" = xyes; then
24422 cat >> Makefile <<CF_EOF
24423
24424 install.man \\
24425 uninstall.man ::
24426         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24427 CF_EOF
24428 fi
24429
24430 cat >> Makefile <<CF_EOF
24431
24432 distclean ::
24433         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24434         rm -f headers.sh headers.sed mk_shared_lib.sh
24435         rm -f edit_man.* man_alias.*
24436         rm -rf \${DIRS_TO_MAKE}
24437 CF_EOF
24438
24439 # Special case: tack's manpage lives in its own directory.
24440 if test "x$cf_with_manpages" = xyes; then
24441 if test -d tack ; then
24442 if test -f $srcdir/$tack.h; then
24443 cat >> Makefile <<CF_EOF
24444
24445 install.man \\
24446 uninstall.man ::
24447         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24448 CF_EOF
24449 fi
24450 fi
24451 fi
24452
24453 rm -f headers.sed headers.sh
24454
24455 echo creating headers.sh
24456 cat >headers.sh <<CF_EOF
24457 #! $SHELL
24458 # This shell script is generated by the 'configure' script.  It is invoked in a
24459 # subdirectory of the build tree.  It generates a sed-script in the parent
24460 # directory that is used to adjust includes for header files that reside in a
24461 # subdirectory of /usr/include, etc.
24462 PRG=""
24463 while test \$# != 3
24464 do
24465 PRG="\$PRG \$1"; shift
24466 done
24467 DST=\$1
24468 REF=\$2
24469 SRC=\$3
24470 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24471 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24472 echo installing \$SRC in \$DST
24473 CF_EOF
24474
24475 if test $WITH_CURSES_H = yes; then
24476         cat >>headers.sh <<CF_EOF
24477 case \$DST in
24478 (/*/include/*)
24479         END=\`basename \$DST\`
24480         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24481         do
24482                 NAME=\`basename \$i\`
24483                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24484         done
24485         ;;
24486 (*)
24487         echo "" >> \$TMPSED
24488         ;;
24489 esac
24490 CF_EOF
24491
24492 else
24493         cat >>headers.sh <<CF_EOF
24494 case \$DST in
24495 (/*/include/*)
24496         END=\`basename \$DST\`
24497         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24498         do
24499                 NAME=\`basename \$i\`
24500                 if test "\$NAME" = "curses.h"
24501                 then
24502                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24503                         NAME=ncurses.h
24504                 fi
24505                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24506         done
24507         ;;
24508 (*)
24509         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24510         ;;
24511 esac
24512 CF_EOF
24513 fi
24514 cat >>headers.sh <<CF_EOF
24515 rm -f \$TMPSRC
24516 sed -f \$TMPSED \$SRC > \$TMPSRC
24517 NAME=\`basename \$SRC\`
24518 CF_EOF
24519 if test $WITH_CURSES_H != yes; then
24520         cat >>headers.sh <<CF_EOF
24521 test "\$NAME" = "curses.h" && NAME=ncurses.h
24522 CF_EOF
24523 fi
24524 cat >>headers.sh <<CF_EOF
24525 # Just in case someone gzip'd manpages, remove the conflicting copy.
24526 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24527
24528 eval \$PRG \$TMPSRC \$DST/\$NAME
24529 rm -f \$TMPSRC \$TMPSED
24530 CF_EOF
24531
24532 chmod 0755 headers.sh
24533
24534 for cf_dir in $SRC_SUBDIRS
24535 do
24536         if test ! -d $srcdir/$cf_dir ; then
24537                 continue
24538         fi
24539
24540         if test -f $srcdir/$cf_dir/headers; then
24541                 $AWK -f $srcdir/mk-hdr.awk \
24542                         subset="$LIB_SUBSETS" \
24543                         compat="$WITH_CURSES_H" \
24544                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24545         fi
24546
24547         if test -f $srcdir/$cf_dir/modules; then
24548                 if test "$cf_dir" != "c++" ; then
24549                         cat >>$cf_dir/Makefile <<"CF_EOF"
24550 depend : ${AUTO_SRC}
24551         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24552
24553 # DO NOT DELETE THIS LINE -- make depend depends on it.
24554 CF_EOF
24555                 fi
24556         fi
24557 done
24558
24559 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24560 if test -z "$USE_OLD_MAKERULES" ; then
24561         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24562 fi
24563 fi
24564  ;;
24565   esac
24566 done
24567 EOF
24568
24569 cat >>$CONFIG_STATUS <<\EOF
24570
24571 { (exit 0); exit 0; }
24572 EOF
24573 chmod +x $CONFIG_STATUS
24574 ac_clean_files=$ac_clean_files_save
24575
24576 # configure is writing to config.log, and then calls config.status.
24577 # config.status does its own redirection, appending to config.log.
24578 # Unfortunately, on DOS this fails, as config.log is still kept open
24579 # by configure, so config.status won't be able to write to it; its
24580 # output is simply discarded.  So we exec the FD to /dev/null,
24581 # effectively closing config.log, so it can be properly (re)opened and
24582 # appended to by config.status.  When coming back to configure, we
24583 # need to make the FD available again.
24584 if test "$no_create" != yes; then
24585   ac_cs_success=:
24586   exec 5>/dev/null
24587   $SHELL $CONFIG_STATUS || ac_cs_success=false
24588   exec 5>>config.log
24589   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24590   # would make configure fail if this is the last instruction.
24591   $ac_cs_success || { (exit 1); exit 1; }
24592 fi
24593 ${MAKE:-make} preinstall