]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20171230
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.649 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20170501.
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-tack          suppress build/install with tack program
713   --without-tests         suppress build/install with test-programs
714   --without-curses-h      install curses.h as ncurses.h only
715   --with-config-suffix=X  suffixes pc-files
716   --with-pkg-config{=path} enable/disable use of pkg-config
717   --with-pkg-config-libdir=XXX use given directory for installing pc-files
718   --enable-pc-files       generate and install .pc files for pkg-config
719   --with-pc-suffix        suffixes pc-files
720   --enable-mixed-case     tic should assume mixed-case filenames
721   --with-install-prefix   prefixes actual install-location ($DESTDIR)
722 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
723   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
724   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
725   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
726   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
727   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
728   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
729 Options to Specify the Libraries Built/Used:
730   --disable-libtool-version  enable to use libtool's incompatible naming scheme
731   --with-libtool          generate libraries with libtool
732   --with-shared           generate shared-libraries
733   --with-normal           generate normal-libraries (default)
734   --with-debug            generate debug-libraries (default)
735   --with-profile          generate profile-libraries
736   --with-cxx-shared       generate C++ shared-libraries
737   --with-lib-prefix       override library-prefix
738   --with-termlib          generate separate terminfo library
739   --with-ticlib           generate separate tic library
740   --with-gpm              use Alessandro Rubini's GPM library
741   --without-dlsym         do not use dlsym() to load GPM dynamically
742   --with-sysmouse         use sysmouse (FreeBSD console)
743   --enable-rpath          use rpath option when generating shared libraries
744   --disable-relink        relink shared libraries during install
745   --with-shlib-version=X  Specify rel or abi version for shared libs
746   --with-libtool-opts=XXX specify additional libtool options
747   --with-export-syms=XXX  limit exported symbols using libtool
748   --with-versioned-syms=X markup versioned symbols using ld
749   --disable-lib-suffixes  disable library suffixes
750   --disable-rpath-hack    don't add rpath options for additional libraries
751 Fine-Tuning Your Configuration:
752   --with-extra-suffix=X   append extra suffix to header/library paths
753   --disable-overwrite     put headers in subdir, omit link to -lcurses
754   --disable-database      do not use terminfo, only fallbacks/termcap
755   --with-database=XXX     specify terminfo source to install
756   --with-hashed-db        specify hashed-database library
757   --with-fallbacks=XXX    specify list of fallback terminal descriptions
758   --without-xterm-new     specify if xterm terminfo should be old version
759   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
760   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
761   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
762   --disable-big-core      assume machine has little memory
763   --disable-big-strings   assume compiler has only standard-size strings
764   --enable-termcap        compile in termcap fallback support
765   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
766   --enable-getcap         fast termcap load, no xrefs to terminfo
767   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
768   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
769   --disable-root-environ  restrict environment when running as root
770   --enable-symlinks       make tic use symbolic links not hard links
771   --enable-broken_linker  compile with broken-linker support code
772   --enable-bsdpad         recognize BSD-style prefix padding
773   --enable-widec          compile with wide-char/UTF-8 code
774   --disable-lp64          allow chtype to be long (ignore _LP64)
775   --disable-largefile     omit support for large files
776   --disable-tparm-varargs compile tparm() without varargs interface
777   --disable-tic-depends   link tic library without explicit dependency on ncurses library
778   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
779   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
780   --with-bool=TYPE        override fallback type of bool variable
781   --with-caps=alt         compile with alternate Caps file
782   --with-chtype=TYPE      override type of chtype
783   --with-ospeed=TYPE      override type of ospeed variable
784   --with-mmask-t=TYPE     override type of mmask_t
785   --with-ccharw-max=XXX   override size CCHARW_MAX
786   --with-tparm-arg=TYPE   override parameter type of tparm
787   --with-rcs-ids          compile-in RCS identifiers
788 Options to Specify How Manpages are Installed:
789   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
790                           optionally formatted/catonly, e.g., gzip,formatted
791   --with-manpage-renames  specify manpage-renaming
792   --with-manpage-aliases  specify manpage-aliases using .so
793   --with-manpage-symlinks specify manpage-aliases using symlinks
794   --with-manpage-tbl      specify manpage processing with tbl
795 Extensions:
796   --disable-ext-funcs     disable function-extensions
797   --enable-sp-funcs       enable SCREEN-extensions
798   --enable-term-driver    enable terminal-driver
799   --enable-const          compile with extra/non-standard const
800   --enable-ext-colors     compile for 256-color support
801   --enable-ext-mouse      compile for extended mouse-encoding
802   --enable-ext-putwin     compile with extended putwin/screendump
803   --enable-no-padding     compile with $NCURSES_NO_PADDING code
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --enable-sigwinch       compile with SIGWINCH handler
806   --enable-tcap-names     compile with user-definable terminal capabilities
807   --with-pthread          use POSIX thread library
808   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
809   --enable-weak-symbols   enable weak-symbols for pthreads
810   --enable-reentrant      compile with reentrant code
811   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
812   --enable-opaque-form    make form-library structures "opaque"
813   --enable-opaque-menu    make menu-library structures "opaque"
814   --enable-opaque-panel   make panel-library structures "opaque"
815   --with-wrap-prefix=XXX  override prefix used for public variables
816 Development Code:
817   --without-develop       disable development options
818   --enable-hard-tabs      compile with hard-tabs code
819   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
820 Experimental Code:
821   --disable-assumed-color do not assume anything about default-colors
822   --disable-hashmap       compile without hashmap scrolling-optimization
823   --enable-colorfgbg      compile-in experimental $COLORFGBG code
824   --enable-interop        compile-in interop bindings
825   --enable-safe-sprintf   compile with experimental safe-sprintf code
826   --disable-scroll-hints  compile without scroll-hints code
827   --enable-wgetch-events  compile with wgetch-events code
828 Testing/development Options:
829   --disable-echo          do not display "compiling" commands
830   --enable-warnings       build: turn on GCC compiler warnings
831   --enable-string-hacks   work around bogus compiler/loader warnings
832   --enable-assertions     test: turn on generation of assertion code
833   --with-dmalloc          test: use Gray Watson's dmalloc library
834   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
835   --with-valgrind         test: use valgrind
836   --disable-leaks         test: free permanent memory, analyze leaks
837   --enable-expanded       test: generate functions for certain macros
838   --disable-macros        test: use functions rather than macros
839   --with-trace            test: add trace() function to all models of ncurses
840   --disable-gnat-projects test: disable GNAT projects even if usable
841 Ada95 Binding Options:
842   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
843   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
844   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
845   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
846
847 Some influential environment variables:
848   CC          C compiler command
849   CFLAGS      C compiler flags
850   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
851               nonstandard directory <lib dir>
852   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
853               headers in a nonstandard directory <include dir>
854   CPP         C preprocessor
855   CXX         C++ compiler command
856   CXXFLAGS    C++ compiler flags
857   CXXCPP      C++ preprocessor
858
859 Use these variables to override the choices made by `configure' or to help
860 it to find libraries and programs with nonstandard names/locations.
861
862 EOF
863 fi
864
865 if test "$ac_init_help" = "recursive"; then
866   # If there are subdirs, report their specific --help.
867   ac_popdir=`pwd`
868   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
869     cd $ac_subdir
870     # A "../" for each directory in /$ac_subdir.
871     ac_dots=`echo $ac_subdir |
872              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
873
874     case $srcdir in
875     .) # No --srcdir option.  We are building in place.
876       ac_sub_srcdir=$srcdir ;;
877     [\\/]* | ?:[\\/]* ) # Absolute path.
878       ac_sub_srcdir=$srcdir/$ac_subdir ;;
879     *) # Relative path.
880       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
881     esac
882
883     # Check for guested configure; otherwise get Cygnus style configure.
884     if test -f $ac_sub_srcdir/configure.gnu; then
885       echo
886       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
887     elif test -f $ac_sub_srcdir/configure; then
888       echo
889       $SHELL $ac_sub_srcdir/configure  --help=recursive
890     elif test -f $ac_sub_srcdir/configure.ac ||
891            test -f $ac_sub_srcdir/configure.in; then
892       echo
893       $ac_configure --help
894     else
895       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
896     fi
897     cd $ac_popdir
898   done
899 fi
900
901 test -n "$ac_init_help" && exit 0
902 if $ac_init_version; then
903   cat <<\EOF
904
905 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
906 Free Software Foundation, Inc.
907 This configure script is free software; the Free Software Foundation
908 gives unlimited permission to copy, distribute and modify it.
909 EOF
910   exit 0
911 fi
912 exec 5>config.log
913 cat >&5 <<EOF
914 This file contains any messages produced by compilers while
915 running configure, to aid debugging if configure makes a mistake.
916
917 It was created by $as_me, which was
918 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
919
920   $ $0 $@
921
922 EOF
923 {
924 cat <<_ASUNAME
925 ## ---------- ##
926 ## Platform.  ##
927 ## ---------- ##
928
929 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
930 uname -m = `(uname -m) 2>/dev/null || echo unknown`
931 uname -r = `(uname -r) 2>/dev/null || echo unknown`
932 uname -s = `(uname -s) 2>/dev/null || echo unknown`
933 uname -v = `(uname -v) 2>/dev/null || echo unknown`
934
935 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
936 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
937
938 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
939 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
940 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
941 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
942 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
943 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
944 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
945
946 PATH = $PATH
947
948 _ASUNAME
949 } >&5
950
951 cat >&5 <<EOF
952 ## ------------ ##
953 ## Core tests.  ##
954 ## ------------ ##
955
956 EOF
957
958 # Keep a trace of the command line.
959 # Strip out --no-create and --no-recursion so they do not pile up.
960 # Also quote any args containing shell meta-characters.
961 ac_configure_args=
962 ac_sep=
963 for ac_arg
964 do
965   case $ac_arg in
966   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
967   | --no-cr | --no-c) ;;
968   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
969   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
970   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
971     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
972     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
973     ac_sep=" " ;;
974   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
975      ac_sep=" " ;;
976   esac
977   # Get rid of the leading space.
978 done
979
980 # When interrupted or exit'd, cleanup temporary files, and complete
981 # config.log.  We remove comments because anyway the quotes in there
982 # would cause problems or look ugly.
983 trap 'exit_status=$?
984   # Save into config.log some information that might help in debugging.
985   echo >&5
986   echo "## ----------------- ##" >&5
987   echo "## Cache variables.  ##" >&5
988   echo "## ----------------- ##" >&5
989   echo >&5
990   # The following way of writing the cache mishandles newlines in values,
991 {
992   (set) 2>&1 |
993     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
994     *ac_space=\ *)
995       sed -n \
996         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
997           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
998       ;;
999     *)
1000       sed -n \
1001         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1002       ;;
1003     esac;
1004 } >&5
1005   sed "/^$/d" confdefs.h >conftest.log
1006   if test -s conftest.log; then
1007     echo >&5
1008     echo "## ------------ ##" >&5
1009     echo "## confdefs.h.  ##" >&5
1010     echo "## ------------ ##" >&5
1011     echo >&5
1012     cat conftest.log >&5
1013   fi
1014   (echo; echo) >&5
1015   test "$ac_signal" != 0 &&
1016     echo "$as_me: caught signal $ac_signal" >&5
1017   echo "$as_me: exit $exit_status" >&5
1018   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1019     exit $exit_status
1020      ' 0
1021 for ac_signal in 1 2 13 15; do
1022   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1023 done
1024 ac_signal=0
1025
1026 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1027 rm -rf conftest* confdefs.h
1028 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1029 echo >confdefs.h
1030
1031 # Let the site file select an alternate cache file if it wants to.
1032 # Prefer explicitly selected file to automatically selected ones.
1033 if test -z "$CONFIG_SITE"; then
1034   if test "x$prefix" != xNONE; then
1035     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1036   else
1037     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1038   fi
1039 fi
1040 for ac_site_file in $CONFIG_SITE; do
1041   if test -r "$ac_site_file"; then
1042     { echo "$as_me:1042: loading site script $ac_site_file" >&5
1043 echo "$as_me: loading site script $ac_site_file" >&6;}
1044     cat "$ac_site_file" >&5
1045     . "$ac_site_file"
1046   fi
1047 done
1048
1049 if test -r "$cache_file"; then
1050   # Some versions of bash will fail to source /dev/null (special
1051   # files actually), so we avoid doing that.
1052   if test -f "$cache_file"; then
1053     { echo "$as_me:1053: loading cache $cache_file" >&5
1054 echo "$as_me: loading cache $cache_file" >&6;}
1055     case $cache_file in
1056       [\\/]* | ?:[\\/]* ) . $cache_file;;
1057       *)                      . ./$cache_file;;
1058     esac
1059   fi
1060 else
1061   { echo "$as_me:1061: creating cache $cache_file" >&5
1062 echo "$as_me: creating cache $cache_file" >&6;}
1063   >$cache_file
1064 fi
1065
1066 # Check that the precious variables saved in the cache have kept the same
1067 # value.
1068 ac_cache_corrupted=false
1069 for ac_var in `(set) 2>&1 |
1070                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1071   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1072   eval ac_new_set=\$ac_env_${ac_var}_set
1073   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1074   eval ac_new_val="\$ac_env_${ac_var}_value"
1075   case $ac_old_set,$ac_new_set in
1076     set,)
1077       { echo "$as_me:1077: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1078 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1079       ac_cache_corrupted=: ;;
1080     ,set)
1081       { echo "$as_me:1081: error: \`$ac_var' was not set in the previous run" >&5
1082 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1083       ac_cache_corrupted=: ;;
1084     ,);;
1085     *)
1086       if test "x$ac_old_val" != "x$ac_new_val"; then
1087         { echo "$as_me:1087: error: \`$ac_var' has changed since the previous run:" >&5
1088 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1089         { echo "$as_me:1089:   former value:  $ac_old_val" >&5
1090 echo "$as_me:   former value:  $ac_old_val" >&2;}
1091         { echo "$as_me:1091:   current value: $ac_new_val" >&5
1092 echo "$as_me:   current value: $ac_new_val" >&2;}
1093         ac_cache_corrupted=:
1094       fi;;
1095   esac
1096   # Pass precious variables to config.status.  It doesn't matter if
1097   # we pass some twice (in addition to the command line arguments).
1098   if test "$ac_new_set" = set; then
1099     case $ac_new_val in
1100     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1101       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1102       ac_configure_args="$ac_configure_args '$ac_arg'"
1103       ;;
1104     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1105        ;;
1106     esac
1107   fi
1108 done
1109 if $ac_cache_corrupted; then
1110   { echo "$as_me:1110: error: changes in the environment can compromise the build" >&5
1111 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1112   { { echo "$as_me:1112: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1113 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1114    { (exit 1); exit 1; }; }
1115 fi
1116
1117 ac_ext=c
1118 ac_cpp='$CPP $CPPFLAGS'
1119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1122 ac_main_return=return
1123
1124 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1125   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1126                    ECHO_T='     ' ;;
1127   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1128   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1129 esac
1130 echo "#! $SHELL" >conftest.sh
1131 echo  "exit 0"   >>conftest.sh
1132 chmod +x conftest.sh
1133 if { (echo "$as_me:1133: PATH=\".;.\"; conftest.sh") >&5
1134   (PATH=".;."; conftest.sh) 2>&5
1135   ac_status=$?
1136   echo "$as_me:1136: \$? = $ac_status" >&5
1137   (exit $ac_status); }; then
1138   ac_path_separator=';'
1139 else
1140   ac_path_separator=:
1141 fi
1142 PATH_SEPARATOR="$ac_path_separator"
1143 rm -f conftest.sh
1144
1145 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1146
1147 top_builddir=`pwd`
1148
1149 echo "$as_me:1149: checking for egrep" >&5
1150 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1151 if test "${ac_cv_prog_egrep+set}" = set; then
1152   echo $ECHO_N "(cached) $ECHO_C" >&6
1153 else
1154   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1155                 then ac_cv_prog_egrep='grep -E'
1156                 else ac_cv_prog_egrep='egrep'
1157         fi
1158 fi
1159 echo "$as_me:1159: result: $ac_cv_prog_egrep" >&5
1160 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1161         EGREP=$ac_cv_prog_egrep
1162
1163         test -z "$EGREP" && { { echo "$as_me:1163: error: No egrep program found" >&5
1164 echo "$as_me: error: No egrep program found" >&2;}
1165    { (exit 1); exit 1; }; }
1166
1167 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1168 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1169 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1170 cf_cv_abi_version=${NCURSES_MAJOR}
1171 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1172 cf_cv_timestamp=`date`
1173 echo "$as_me:1173: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1174 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1175
1176 if test -f $srcdir/VERSION ; then
1177         echo "$as_me:1177: checking for package version" >&5
1178 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1179
1180         # if there are not enough fields, cut returns the last one...
1181         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1182         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1183         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1184
1185         # this is how CF_BUNDLED_INTL uses $VERSION:
1186         VERSION="$cf_field1"
1187
1188         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1189         test -z "$VERSION_MAJOR" && { { echo "$as_me:1189: error: missing major-version" >&5
1190 echo "$as_me: error: missing major-version" >&2;}
1191    { (exit 1); exit 1; }; }
1192
1193         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1194         test -z "$VERSION_MINOR" && { { echo "$as_me:1194: error: missing minor-version" >&5
1195 echo "$as_me: error: missing minor-version" >&2;}
1196    { (exit 1); exit 1; }; }
1197
1198         echo "$as_me:1198: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1199 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1200
1201         echo "$as_me:1201: checking for package patch date" >&5
1202 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1203         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1204         case .$VERSION_PATCH in
1205         (.)
1206                 { { echo "$as_me:1206: error: missing patch-date $VERSION_PATCH" >&5
1207 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1208    { (exit 1); exit 1; }; }
1209                 ;;
1210         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1211                 ;;
1212         (*)
1213                 { { echo "$as_me:1213: error: illegal patch-date $VERSION_PATCH" >&5
1214 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1215    { (exit 1); exit 1; }; }
1216                 ;;
1217         esac
1218         echo "$as_me:1218: result: $VERSION_PATCH" >&5
1219 echo "${ECHO_T}$VERSION_PATCH" >&6
1220 else
1221         { { echo "$as_me:1221: error: did not find $srcdir/VERSION" >&5
1222 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1223    { (exit 1); exit 1; }; }
1224 fi
1225
1226 # show the actual data that we have for versions:
1227 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1228
1229 echo "${as_me:-configure}:1229: testing ABI VERSION $VERSION ..." 1>&5
1230
1231 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1232
1233 echo "${as_me:-configure}:1233: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1234
1235 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1236
1237 echo "${as_me:-configure}:1237: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1238
1239 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1240
1241 echo "${as_me:-configure}:1241: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1242
1243         cf_PACKAGE=NCURSES
1244         PACKAGE=ncurses
1245
1246 cat >>confdefs.h <<EOF
1247 #define PACKAGE "$PACKAGE"
1248 EOF
1249
1250 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1251
1252         cat >>confdefs.h <<EOF
1253 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1254 EOF
1255
1256         cat >>confdefs.h <<EOF
1257 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1258 EOF
1259
1260 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1261
1262 # Check whether --with-rel-version or --without-rel-version was given.
1263 if test "${with_rel_version+set}" = set; then
1264   withval="$with_rel_version"
1265   { echo "$as_me:1265: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1266 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1267  cf_cv_rel_version=$withval
1268 fi;
1269
1270  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1271  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1272
1273 if test -n "$NCURSES_MAJOR" ; then
1274   case $NCURSES_MAJOR in
1275   ([0-9]*)
1276         ;;
1277   (*)
1278         { { echo "$as_me:1278: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1279 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1280    { (exit 1); exit 1; }; }
1281         ;;
1282   esac
1283 else
1284   { { echo "$as_me:1284: error: Release major-version value is empty" >&5
1285 echo "$as_me: error: Release major-version value is empty" >&2;}
1286    { (exit 1); exit 1; }; }
1287 fi
1288
1289 if test -n "$NCURSES_MINOR" ; then
1290   case $NCURSES_MINOR in
1291   ([0-9]*)
1292         ;;
1293   (*)
1294         { { echo "$as_me:1294: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1295 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1296    { (exit 1); exit 1; }; }
1297         ;;
1298   esac
1299 else
1300   { { echo "$as_me:1300: error: Release minor-version value is empty" >&5
1301 echo "$as_me: error: Release minor-version value is empty" >&2;}
1302    { (exit 1); exit 1; }; }
1303 fi
1304
1305 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1306
1307 # Check whether --with-abi-version or --without-abi-version was given.
1308 if test "${with_abi_version+set}" = set; then
1309   withval="$with_abi_version"
1310
1311         if test "x$cf_cv_abi_version" != "x$withval"
1312         then
1313                 { echo "$as_me:1313: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1314 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1315                 case $cf_cv_rel_version in
1316                 (5.*)
1317                         cf_cv_rel_version=$withval.0
1318                         ;;
1319                 (6.*)
1320                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1321                         ;;
1322                 esac
1323         fi
1324         cf_cv_abi_version=$withval
1325 fi;
1326
1327 if test -n "$cf_cv_abi_version" ; then
1328   case $cf_cv_abi_version in
1329   ([0-9]*)
1330         ;;
1331   (*)
1332         { { echo "$as_me:1332: error: ABI version is not a number: $cf_cv_abi_version" >&5
1333 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1334    { (exit 1); exit 1; }; }
1335         ;;
1336   esac
1337 else
1338   { { echo "$as_me:1338: error: ABI version value is empty" >&5
1339 echo "$as_me: error: ABI version value is empty" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1344 then
1345         case $cf_cv_rel_version in
1346         (5.*)
1347                 cf_cv_rel_version=$with_abi_version.0
1348                 ;;
1349         esac
1350 fi
1351
1352 ac_aux_dir=
1353 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1354   if test -f $ac_dir/install-sh; then
1355     ac_aux_dir=$ac_dir
1356     ac_install_sh="$ac_aux_dir/install-sh -c"
1357     break
1358   elif test -f $ac_dir/install.sh; then
1359     ac_aux_dir=$ac_dir
1360     ac_install_sh="$ac_aux_dir/install.sh -c"
1361     break
1362   elif test -f $ac_dir/shtool; then
1363     ac_aux_dir=$ac_dir
1364     ac_install_sh="$ac_aux_dir/shtool install -c"
1365     break
1366   fi
1367 done
1368 if test -z "$ac_aux_dir"; then
1369   { { echo "$as_me:1369: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1370 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1371    { (exit 1); exit 1; }; }
1372 fi
1373 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1374 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1375 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1376
1377 # Make sure we can run config.sub.
1378 $ac_config_sub sun4 >/dev/null 2>&1 ||
1379   { { echo "$as_me:1379: error: cannot run $ac_config_sub" >&5
1380 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1381    { (exit 1); exit 1; }; }
1382
1383 echo "$as_me:1383: checking build system type" >&5
1384 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1385 if test "${ac_cv_build+set}" = set; then
1386   echo $ECHO_N "(cached) $ECHO_C" >&6
1387 else
1388   ac_cv_build_alias=$build_alias
1389 test -z "$ac_cv_build_alias" &&
1390   ac_cv_build_alias=`$ac_config_guess`
1391 test -z "$ac_cv_build_alias" &&
1392   { { echo "$as_me:1392: error: cannot guess build type; you must specify one" >&5
1393 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1394    { (exit 1); exit 1; }; }
1395 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1396   { { echo "$as_me:1396: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1397 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1398    { (exit 1); exit 1; }; }
1399
1400 fi
1401 echo "$as_me:1401: result: $ac_cv_build" >&5
1402 echo "${ECHO_T}$ac_cv_build" >&6
1403 build=$ac_cv_build
1404 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1405 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1406 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1407
1408 echo "$as_me:1408: checking host system type" >&5
1409 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1410 if test "${ac_cv_host+set}" = set; then
1411   echo $ECHO_N "(cached) $ECHO_C" >&6
1412 else
1413   ac_cv_host_alias=$host_alias
1414 test -z "$ac_cv_host_alias" &&
1415   ac_cv_host_alias=$ac_cv_build_alias
1416 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1417   { { echo "$as_me:1417: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1418 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1419    { (exit 1); exit 1; }; }
1420
1421 fi
1422 echo "$as_me:1422: result: $ac_cv_host" >&5
1423 echo "${ECHO_T}$ac_cv_host" >&6
1424 host=$ac_cv_host
1425 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1426 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1427 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1428
1429 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1430         echo "$as_me:1430: checking target system type" >&5
1431 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1432 if test "${ac_cv_target+set}" = set; then
1433   echo $ECHO_N "(cached) $ECHO_C" >&6
1434 else
1435   ac_cv_target_alias=$target_alias
1436 test "x$ac_cv_target_alias" = "x" &&
1437   ac_cv_target_alias=$ac_cv_host_alias
1438 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1439   { { echo "$as_me:1439: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1440 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1441    { (exit 1); exit 1; }; }
1442
1443 fi
1444 echo "$as_me:1444: result: $ac_cv_target" >&5
1445 echo "${ECHO_T}$ac_cv_target" >&6
1446 target=$ac_cv_target
1447 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1448 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1449 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1450
1451 # The aliases save the names the user supplied, while $host etc.
1452 # will get canonicalized.
1453 test -n "$target_alias" &&
1454   test "$program_prefix$program_suffix$program_transform_name" = \
1455     NONENONEs,x,x, &&
1456   program_prefix=${target_alias}-
1457         system_name="$host_os"
1458 else
1459         system_name="`(uname -s -r) 2>/dev/null`"
1460         if test -z "$system_name" ; then
1461                 system_name="`(hostname) 2>/dev/null`"
1462         fi
1463 fi
1464 test -n "$system_name" &&
1465 cat >>confdefs.h <<EOF
1466 #define SYSTEM_NAME "$system_name"
1467 EOF
1468
1469 if test "${cf_cv_system_name+set}" = set; then
1470   echo $ECHO_N "(cached) $ECHO_C" >&6
1471 else
1472   cf_cv_system_name="$system_name"
1473 fi
1474
1475 test -z "$system_name" && system_name="$cf_cv_system_name"
1476 test -n "$cf_cv_system_name" && echo "$as_me:1476: result: Configuring for $cf_cv_system_name" >&5
1477 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1478
1479 if test ".$system_name" != ".$cf_cv_system_name" ; then
1480         echo "$as_me:1480: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1481 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1482         { { echo "$as_me:1482: error: \"Please remove config.cache and try again.\"" >&5
1483 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1484    { (exit 1); exit 1; }; }
1485 fi
1486
1487 # Check whether --with-system-type or --without-system-type was given.
1488 if test "${with_system_type+set}" = set; then
1489   withval="$with_system_type"
1490   { echo "$as_me:1490: WARNING: overriding system type to $withval" >&5
1491 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1492         cf_cv_system_name=$withval
1493         host_os=$withval
1494
1495 fi;
1496
1497 ###     Save the given $CFLAGS to allow user-override.
1498 cf_user_CFLAGS="$CFLAGS"
1499
1500 ###     Default install-location
1501
1502 echo "$as_me:1502: checking for prefix" >&5
1503 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1504 if test "x$prefix" = "xNONE" ; then
1505         case "$cf_cv_system_name" in
1506                 # non-vendor systems don't have a conflict
1507         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1508                 prefix=/usr
1509                 ;;
1510         (*)     prefix=$ac_default_prefix
1511                 ;;
1512         esac
1513 fi
1514 echo "$as_me:1514: result: $prefix" >&5
1515 echo "${ECHO_T}$prefix" >&6
1516
1517 if test "x$prefix" = "xNONE" ; then
1518 echo "$as_me:1518: checking for default include-directory" >&5
1519 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1520 test -n "$verbose" && echo 1>&6
1521 for cf_symbol in \
1522         $includedir \
1523         $includedir/ncurses \
1524         $prefix/include \
1525         $prefix/include/ncurses \
1526         /usr/local/include \
1527         /usr/local/include/ncurses \
1528         /usr/include \
1529         /usr/include/ncurses
1530 do
1531         cf_dir=`eval echo $cf_symbol`
1532         if test -f $cf_dir/curses.h ; then
1533         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1534                 includedir="$cf_symbol"
1535                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1536                 break
1537         fi
1538         fi
1539         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1540 done
1541 echo "$as_me:1541: result: $includedir" >&5
1542 echo "${ECHO_T}$includedir" >&6
1543 fi
1544
1545 ### Defaults for ncurses ABI
1546
1547 case x$cf_cv_abi_version in
1548 (x[6789])
1549         cf_dft_ext_colors=yes
1550         cf_dft_ext_const=yes
1551         cf_dft_ext_mouse=yes
1552         cf_dft_ext_putwin=yes
1553         cf_dft_ext_spfuncs=yes
1554         cf_dft_filter_syms=yes
1555         cf_dft_chtype=uint32_t
1556         cf_dft_mmask_t=uint32_t
1557         cf_dft_interop=yes
1558         cf_dft_tparm_arg=intptr_t
1559         cf_dft_with_lp64=yes
1560         ;;
1561 (*)
1562         cf_dft_ext_colors=no
1563         cf_dft_ext_const=no
1564         cf_dft_ext_mouse=no
1565         cf_dft_ext_putwin=no
1566         cf_dft_ext_spfuncs=no
1567         cf_dft_filter_syms=no
1568         cf_dft_chtype=auto
1569         cf_dft_mmask_t=auto
1570         cf_dft_interop=no
1571         cf_dft_tparm_arg=long
1572         cf_dft_with_lp64=no
1573         ;;
1574 esac
1575
1576 ###     Checks for programs.
1577
1578 # Check whether --with-ada or --without-ada was given.
1579 if test "${with_ada+set}" = set; then
1580   withval="$with_ada"
1581   cf_with_ada=$withval
1582 else
1583   cf_with_ada=yes
1584 fi;
1585 if test "x$cf_with_ada" = xyes
1586 then
1587         cf_PROG_CC="gnatgcc gcc cc"
1588 else
1589         cf_PROG_CC="gcc cc"
1590 fi
1591
1592 ac_ext=c
1593 ac_cpp='$CPP $CPPFLAGS'
1594 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1595 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1596 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1597 ac_main_return=return
1598 if test -n "$ac_tool_prefix"; then
1599   for ac_prog in $cf_PROG_CC
1600   do
1601     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1602 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1603 echo "$as_me:1603: checking for $ac_word" >&5
1604 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1605 if test "${ac_cv_prog_CC+set}" = set; then
1606   echo $ECHO_N "(cached) $ECHO_C" >&6
1607 else
1608   if test -n "$CC"; then
1609   ac_cv_prog_CC="$CC" # Let the user override the test.
1610 else
1611   ac_save_IFS=$IFS; IFS=$ac_path_separator
1612 ac_dummy="$PATH"
1613 for ac_dir in $ac_dummy; do
1614   IFS=$ac_save_IFS
1615   test -z "$ac_dir" && ac_dir=.
1616   $as_executable_p "$ac_dir/$ac_word" || continue
1617 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1618 echo "$as_me:1618: found $ac_dir/$ac_word" >&5
1619 break
1620 done
1621
1622 fi
1623 fi
1624 CC=$ac_cv_prog_CC
1625 if test -n "$CC"; then
1626   echo "$as_me:1626: result: $CC" >&5
1627 echo "${ECHO_T}$CC" >&6
1628 else
1629   echo "$as_me:1629: result: no" >&5
1630 echo "${ECHO_T}no" >&6
1631 fi
1632
1633     test -n "$CC" && break
1634   done
1635 fi
1636 if test -z "$CC"; then
1637   ac_ct_CC=$CC
1638   for ac_prog in $cf_PROG_CC
1639 do
1640   # Extract the first word of "$ac_prog", so it can be a program name with args.
1641 set dummy $ac_prog; ac_word=$2
1642 echo "$as_me:1642: checking for $ac_word" >&5
1643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1644 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1645   echo $ECHO_N "(cached) $ECHO_C" >&6
1646 else
1647   if test -n "$ac_ct_CC"; then
1648   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1649 else
1650   ac_save_IFS=$IFS; IFS=$ac_path_separator
1651 ac_dummy="$PATH"
1652 for ac_dir in $ac_dummy; do
1653   IFS=$ac_save_IFS
1654   test -z "$ac_dir" && ac_dir=.
1655   $as_executable_p "$ac_dir/$ac_word" || continue
1656 ac_cv_prog_ac_ct_CC="$ac_prog"
1657 echo "$as_me:1657: found $ac_dir/$ac_word" >&5
1658 break
1659 done
1660
1661 fi
1662 fi
1663 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1664 if test -n "$ac_ct_CC"; then
1665   echo "$as_me:1665: result: $ac_ct_CC" >&5
1666 echo "${ECHO_T}$ac_ct_CC" >&6
1667 else
1668   echo "$as_me:1668: result: no" >&5
1669 echo "${ECHO_T}no" >&6
1670 fi
1671
1672   test -n "$ac_ct_CC" && break
1673 done
1674
1675   CC=$ac_ct_CC
1676 fi
1677
1678 test -z "$CC" && { { echo "$as_me:1678: error: no acceptable cc found in \$PATH" >&5
1679 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1680    { (exit 1); exit 1; }; }
1681
1682 # Provide some information about the compiler.
1683 echo "$as_me:1683:" \
1684      "checking for C compiler version" >&5
1685 ac_compiler=`set X $ac_compile; echo $2`
1686 { (eval echo "$as_me:1686: \"$ac_compiler --version </dev/null >&5\"") >&5
1687   (eval $ac_compiler --version </dev/null >&5) 2>&5
1688   ac_status=$?
1689   echo "$as_me:1689: \$? = $ac_status" >&5
1690   (exit $ac_status); }
1691 { (eval echo "$as_me:1691: \"$ac_compiler -v </dev/null >&5\"") >&5
1692   (eval $ac_compiler -v </dev/null >&5) 2>&5
1693   ac_status=$?
1694   echo "$as_me:1694: \$? = $ac_status" >&5
1695   (exit $ac_status); }
1696 { (eval echo "$as_me:1696: \"$ac_compiler -V </dev/null >&5\"") >&5
1697   (eval $ac_compiler -V </dev/null >&5) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }
1701
1702 cat >conftest.$ac_ext <<_ACEOF
1703 #line 1703 "configure"
1704 #include "confdefs.h"
1705
1706 int
1707 main (void)
1708 {
1709
1710   ;
1711   return 0;
1712 }
1713 _ACEOF
1714 ac_clean_files_save=$ac_clean_files
1715 ac_clean_files="$ac_clean_files a.out a.exe"
1716 # Try to create an executable without -o first, disregard a.out.
1717 # It will help us diagnose broken compilers, and finding out an intuition
1718 # of exeext.
1719 echo "$as_me:1719: checking for C compiler default output" >&5
1720 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1721 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1722 if { (eval echo "$as_me:1722: \"$ac_link_default\"") >&5
1723   (eval $ac_link_default) 2>&5
1724   ac_status=$?
1725   echo "$as_me:1725: \$? = $ac_status" >&5
1726   (exit $ac_status); }; then
1727   # Find the output, starting from the most likely.  This scheme is
1728 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1729 # resort.
1730 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1731                 ls a.out conftest 2>/dev/null;
1732                 ls a.* conftest.* 2>/dev/null`; do
1733   case $ac_file in
1734     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1735     a.out ) # We found the default executable, but exeext='' is most
1736             # certainly right.
1737             break;;
1738     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1739           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1740           export ac_cv_exeext
1741           break;;
1742     * ) break;;
1743   esac
1744 done
1745 else
1746   echo "$as_me: failed program was:" >&5
1747 cat conftest.$ac_ext >&5
1748 { { echo "$as_me:1748: error: C compiler cannot create executables" >&5
1749 echo "$as_me: error: C compiler cannot create executables" >&2;}
1750    { (exit 77); exit 77; }; }
1751 fi
1752
1753 ac_exeext=$ac_cv_exeext
1754 echo "$as_me:1754: result: $ac_file" >&5
1755 echo "${ECHO_T}$ac_file" >&6
1756
1757 # Check the compiler produces executables we can run.  If not, either
1758 # the compiler is broken, or we cross compile.
1759 echo "$as_me:1759: checking whether the C compiler works" >&5
1760 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1761 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1762 # If not cross compiling, check that we can run a simple program.
1763 if test "$cross_compiling" != yes; then
1764   if { ac_try='./$ac_file'
1765   { (eval echo "$as_me:1765: \"$ac_try\"") >&5
1766   (eval $ac_try) 2>&5
1767   ac_status=$?
1768   echo "$as_me:1768: \$? = $ac_status" >&5
1769   (exit $ac_status); }; }; then
1770     cross_compiling=no
1771   else
1772     if test "$cross_compiling" = maybe; then
1773         cross_compiling=yes
1774     else
1775         { { echo "$as_me:1775: error: cannot run C compiled programs.
1776 If you meant to cross compile, use \`--host'." >&5
1777 echo "$as_me: error: cannot run C compiled programs.
1778 If you meant to cross compile, use \`--host'." >&2;}
1779    { (exit 1); exit 1; }; }
1780     fi
1781   fi
1782 fi
1783 echo "$as_me:1783: result: yes" >&5
1784 echo "${ECHO_T}yes" >&6
1785
1786 rm -f a.out a.exe conftest$ac_cv_exeext
1787 ac_clean_files=$ac_clean_files_save
1788 # Check the compiler produces executables we can run.  If not, either
1789 # the compiler is broken, or we cross compile.
1790 echo "$as_me:1790: checking whether we are cross compiling" >&5
1791 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1792 echo "$as_me:1792: result: $cross_compiling" >&5
1793 echo "${ECHO_T}$cross_compiling" >&6
1794
1795 echo "$as_me:1795: checking for executable suffix" >&5
1796 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1797 if { (eval echo "$as_me:1797: \"$ac_link\"") >&5
1798   (eval $ac_link) 2>&5
1799   ac_status=$?
1800   echo "$as_me:1800: \$? = $ac_status" >&5
1801   (exit $ac_status); }; then
1802   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1803 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1804 # work properly (i.e., refer to `conftest.exe'), while it won't with
1805 # `rm'.
1806 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1807   case $ac_file in
1808     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1809     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1810           export ac_cv_exeext
1811           break;;
1812     * ) break;;
1813   esac
1814 done
1815 else
1816   { { echo "$as_me:1816: error: cannot compute EXEEXT: cannot compile and link" >&5
1817 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1818    { (exit 1); exit 1; }; }
1819 fi
1820
1821 rm -f conftest$ac_cv_exeext
1822 echo "$as_me:1822: result: $ac_cv_exeext" >&5
1823 echo "${ECHO_T}$ac_cv_exeext" >&6
1824
1825 rm -f conftest.$ac_ext
1826 EXEEXT=$ac_cv_exeext
1827 ac_exeext=$EXEEXT
1828 echo "$as_me:1828: checking for object suffix" >&5
1829 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1830 if test "${ac_cv_objext+set}" = set; then
1831   echo $ECHO_N "(cached) $ECHO_C" >&6
1832 else
1833   cat >conftest.$ac_ext <<_ACEOF
1834 #line 1834 "configure"
1835 #include "confdefs.h"
1836
1837 int
1838 main (void)
1839 {
1840
1841   ;
1842   return 0;
1843 }
1844 _ACEOF
1845 rm -f conftest.o conftest.obj
1846 if { (eval echo "$as_me:1846: \"$ac_compile\"") >&5
1847   (eval $ac_compile) 2>&5
1848   ac_status=$?
1849   echo "$as_me:1849: \$? = $ac_status" >&5
1850   (exit $ac_status); }; then
1851   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1852   case $ac_file in
1853     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1854     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1855        break;;
1856   esac
1857 done
1858 else
1859   echo "$as_me: failed program was:" >&5
1860 cat conftest.$ac_ext >&5
1861 { { echo "$as_me:1861: error: cannot compute OBJEXT: cannot compile" >&5
1862 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1863    { (exit 1); exit 1; }; }
1864 fi
1865
1866 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1867 fi
1868 echo "$as_me:1868: result: $ac_cv_objext" >&5
1869 echo "${ECHO_T}$ac_cv_objext" >&6
1870 OBJEXT=$ac_cv_objext
1871 ac_objext=$OBJEXT
1872 echo "$as_me:1872: checking whether we are using the GNU C compiler" >&5
1873 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1874 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1875   echo $ECHO_N "(cached) $ECHO_C" >&6
1876 else
1877   cat >conftest.$ac_ext <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880
1881 int
1882 main (void)
1883 {
1884 #ifndef __GNUC__
1885        choke me
1886 #endif
1887
1888   ;
1889   return 0;
1890 }
1891 _ACEOF
1892 rm -f conftest.$ac_objext
1893 if { (eval echo "$as_me:1893: \"$ac_compile\"") >&5
1894   (eval $ac_compile) 2>&5
1895   ac_status=$?
1896   echo "$as_me:1896: \$? = $ac_status" >&5
1897   (exit $ac_status); } &&
1898          { ac_try='test -s conftest.$ac_objext'
1899   { (eval echo "$as_me:1899: \"$ac_try\"") >&5
1900   (eval $ac_try) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); }; }; then
1904   ac_compiler_gnu=yes
1905 else
1906   echo "$as_me: failed program was:" >&5
1907 cat conftest.$ac_ext >&5
1908 ac_compiler_gnu=no
1909 fi
1910 rm -f conftest.$ac_objext conftest.$ac_ext
1911 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1912
1913 fi
1914 echo "$as_me:1914: result: $ac_cv_c_compiler_gnu" >&5
1915 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1916 GCC=`test $ac_compiler_gnu = yes && echo yes`
1917 ac_test_CFLAGS=${CFLAGS+set}
1918 ac_save_CFLAGS=$CFLAGS
1919 CFLAGS="-g"
1920 echo "$as_me:1920: checking whether $CC accepts -g" >&5
1921 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1922 if test "${ac_cv_prog_cc_g+set}" = set; then
1923   echo $ECHO_N "(cached) $ECHO_C" >&6
1924 else
1925   cat >conftest.$ac_ext <<_ACEOF
1926 #line 1926 "configure"
1927 #include "confdefs.h"
1928
1929 int
1930 main (void)
1931 {
1932
1933   ;
1934   return 0;
1935 }
1936 _ACEOF
1937 rm -f conftest.$ac_objext
1938 if { (eval echo "$as_me:1938: \"$ac_compile\"") >&5
1939   (eval $ac_compile) 2>&5
1940   ac_status=$?
1941   echo "$as_me:1941: \$? = $ac_status" >&5
1942   (exit $ac_status); } &&
1943          { ac_try='test -s conftest.$ac_objext'
1944   { (eval echo "$as_me:1944: \"$ac_try\"") >&5
1945   (eval $ac_try) 2>&5
1946   ac_status=$?
1947   echo "$as_me:1947: \$? = $ac_status" >&5
1948   (exit $ac_status); }; }; then
1949   ac_cv_prog_cc_g=yes
1950 else
1951   echo "$as_me: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
1953 ac_cv_prog_cc_g=no
1954 fi
1955 rm -f conftest.$ac_objext conftest.$ac_ext
1956 fi
1957 echo "$as_me:1957: result: $ac_cv_prog_cc_g" >&5
1958 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1959 if test "$ac_test_CFLAGS" = set; then
1960   CFLAGS=$ac_save_CFLAGS
1961 elif test $ac_cv_prog_cc_g = yes; then
1962   if test "$GCC" = yes; then
1963     CFLAGS="-g -O2"
1964   else
1965     CFLAGS="-g"
1966   fi
1967 else
1968   if test "$GCC" = yes; then
1969     CFLAGS="-O2"
1970   else
1971     CFLAGS=
1972   fi
1973 fi
1974 # Some people use a C++ compiler to compile C.  Since we use `exit',
1975 # in C++ we need to declare it.  In case someone uses the same compiler
1976 # for both compiling C and C++ we need to have the C++ compiler decide
1977 # the declaration of exit, since it's the most demanding environment.
1978 cat >conftest.$ac_ext <<_ACEOF
1979 #ifndef __cplusplus
1980   choke me
1981 #endif
1982 _ACEOF
1983 rm -f conftest.$ac_objext
1984 if { (eval echo "$as_me:1984: \"$ac_compile\"") >&5
1985   (eval $ac_compile) 2>&5
1986   ac_status=$?
1987   echo "$as_me:1987: \$? = $ac_status" >&5
1988   (exit $ac_status); } &&
1989          { ac_try='test -s conftest.$ac_objext'
1990   { (eval echo "$as_me:1990: \"$ac_try\"") >&5
1991   (eval $ac_try) 2>&5
1992   ac_status=$?
1993   echo "$as_me:1993: \$? = $ac_status" >&5
1994   (exit $ac_status); }; }; then
1995   for ac_declaration in \
1996    ''\
1997    '#include <stdlib.h>' \
1998    'extern "C" void std::exit (int) throw (); using std::exit;' \
1999    'extern "C" void std::exit (int); using std::exit;' \
2000    'extern "C" void exit (int) throw ();' \
2001    'extern "C" void exit (int);' \
2002    'void exit (int);'
2003 do
2004   cat >conftest.$ac_ext <<_ACEOF
2005 #line 2005 "configure"
2006 #include "confdefs.h"
2007 #include <stdlib.h>
2008 $ac_declaration
2009 int
2010 main (void)
2011 {
2012 exit (42);
2013   ;
2014   return 0;
2015 }
2016 _ACEOF
2017 rm -f conftest.$ac_objext
2018 if { (eval echo "$as_me:2018: \"$ac_compile\"") >&5
2019   (eval $ac_compile) 2>&5
2020   ac_status=$?
2021   echo "$as_me:2021: \$? = $ac_status" >&5
2022   (exit $ac_status); } &&
2023          { ac_try='test -s conftest.$ac_objext'
2024   { (eval echo "$as_me:2024: \"$ac_try\"") >&5
2025   (eval $ac_try) 2>&5
2026   ac_status=$?
2027   echo "$as_me:2027: \$? = $ac_status" >&5
2028   (exit $ac_status); }; }; then
2029   :
2030 else
2031   echo "$as_me: failed program was:" >&5
2032 cat conftest.$ac_ext >&5
2033 continue
2034 fi
2035 rm -f conftest.$ac_objext conftest.$ac_ext
2036   cat >conftest.$ac_ext <<_ACEOF
2037 #line 2037 "configure"
2038 #include "confdefs.h"
2039 $ac_declaration
2040 int
2041 main (void)
2042 {
2043 exit (42);
2044   ;
2045   return 0;
2046 }
2047 _ACEOF
2048 rm -f conftest.$ac_objext
2049 if { (eval echo "$as_me:2049: \"$ac_compile\"") >&5
2050   (eval $ac_compile) 2>&5
2051   ac_status=$?
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); } &&
2054          { ac_try='test -s conftest.$ac_objext'
2055   { (eval echo "$as_me:2055: \"$ac_try\"") >&5
2056   (eval $ac_try) 2>&5
2057   ac_status=$?
2058   echo "$as_me:2058: \$? = $ac_status" >&5
2059   (exit $ac_status); }; }; then
2060   break
2061 else
2062   echo "$as_me: failed program was:" >&5
2063 cat conftest.$ac_ext >&5
2064 fi
2065 rm -f conftest.$ac_objext conftest.$ac_ext
2066 done
2067 rm -rf conftest*
2068 if test -n "$ac_declaration"; then
2069   echo '#ifdef __cplusplus' >>confdefs.h
2070   echo $ac_declaration      >>confdefs.h
2071   echo '#endif'             >>confdefs.h
2072 fi
2073
2074 else
2075   echo "$as_me: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2077 fi
2078 rm -f conftest.$ac_objext conftest.$ac_ext
2079 ac_ext=c
2080 ac_cpp='$CPP $CPPFLAGS'
2081 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2082 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2083 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2084 ac_main_return=return
2085
2086 GCC_VERSION=none
2087 if test "$GCC" = yes ; then
2088         echo "$as_me:2088: checking version of $CC" >&5
2089 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2090         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.].*//'`"
2091         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2092         echo "$as_me:2092: result: $GCC_VERSION" >&5
2093 echo "${ECHO_T}$GCC_VERSION" >&6
2094 fi
2095
2096 echo "$as_me:2096: checking for $CC option to accept ANSI C" >&5
2097 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2098 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2099   echo $ECHO_N "(cached) $ECHO_C" >&6
2100 else
2101   ac_cv_prog_cc_stdc=no
2102 ac_save_CC=$CC
2103 cat >conftest.$ac_ext <<_ACEOF
2104 #line 2104 "configure"
2105 #include "confdefs.h"
2106 #include <stdarg.h>
2107 #include <stdio.h>
2108 #include <sys/types.h>
2109 #include <sys/stat.h>
2110 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2111 struct buf { int x; };
2112 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2113 static char *e (p, i)
2114      char **p;
2115      int i;
2116 {
2117   return p[i];
2118 }
2119 static char *f (char * (*g) (char **, int), char **p, ...)
2120 {
2121   char *s;
2122   va_list v;
2123   va_start (v,p);
2124   s = g (p, va_arg (v,int));
2125   va_end (v);
2126   return s;
2127 }
2128 int test (int i, double x);
2129 struct s1 {int (*f) (int a);};
2130 struct s2 {int (*f) (double a);};
2131 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2132 int argc;
2133 char **argv;
2134 int
2135 main (void)
2136 {
2137 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2138   ;
2139   return 0;
2140 }
2141 _ACEOF
2142 # Don't try gcc -ansi; that turns off useful extensions and
2143 # breaks some systems' header files.
2144 # AIX                   -qlanglvl=ansi
2145 # Ultrix and OSF/1      -std1
2146 # HP-UX 10.20 and later -Ae
2147 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2148 # SVR4                  -Xc -D__EXTENSIONS__
2149 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2150 do
2151   CC="$ac_save_CC $ac_arg"
2152   rm -f conftest.$ac_objext
2153 if { (eval echo "$as_me:2153: \"$ac_compile\"") >&5
2154   (eval $ac_compile) 2>&5
2155   ac_status=$?
2156   echo "$as_me:2156: \$? = $ac_status" >&5
2157   (exit $ac_status); } &&
2158          { ac_try='test -s conftest.$ac_objext'
2159   { (eval echo "$as_me:2159: \"$ac_try\"") >&5
2160   (eval $ac_try) 2>&5
2161   ac_status=$?
2162   echo "$as_me:2162: \$? = $ac_status" >&5
2163   (exit $ac_status); }; }; then
2164   ac_cv_prog_cc_stdc=$ac_arg
2165 break
2166 else
2167   echo "$as_me: failed program was:" >&5
2168 cat conftest.$ac_ext >&5
2169 fi
2170 rm -f conftest.$ac_objext
2171 done
2172 rm -f conftest.$ac_ext conftest.$ac_objext
2173 CC=$ac_save_CC
2174
2175 fi
2176
2177 case "x$ac_cv_prog_cc_stdc" in
2178   x|xno)
2179     echo "$as_me:2179: result: none needed" >&5
2180 echo "${ECHO_T}none needed" >&6 ;;
2181   *)
2182     echo "$as_me:2182: result: $ac_cv_prog_cc_stdc" >&5
2183 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2184     CC="$CC $ac_cv_prog_cc_stdc" ;;
2185 esac
2186
2187 # This should have been defined by AC_PROG_CC
2188 : ${CC:=cc}
2189
2190 echo "$as_me:2190: checking \$CC variable" >&5
2191 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2192 case "$CC" in
2193 (*[\ \  ]-*)
2194         echo "$as_me:2194: result: broken" >&5
2195 echo "${ECHO_T}broken" >&6
2196         { echo "$as_me:2196: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2197 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2198         # humor him...
2199         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2200         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2201         CC="$cf_prog"
2202         for cf_arg in $cf_flags
2203         do
2204                 case "x$cf_arg" in
2205                 (x-[IUDfgOW]*)
2206
2207 cf_fix_cppflags=no
2208 cf_new_cflags=
2209 cf_new_cppflags=
2210 cf_new_extra_cppflags=
2211
2212 for cf_add_cflags in $cf_arg
2213 do
2214 case $cf_fix_cppflags in
2215 (no)
2216         case $cf_add_cflags in
2217         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2218                 case $cf_add_cflags in
2219                 (-D*)
2220                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2221
2222                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2223                                 && test -z "${cf_tst_cflags}" \
2224                                 && cf_fix_cppflags=yes
2225
2226                         if test $cf_fix_cppflags = yes ; then
2227
2228         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2229         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2230
2231                                 continue
2232                         elif test "${cf_tst_cflags}" = "\"'" ; then
2233
2234         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2235         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2236
2237                                 continue
2238                         fi
2239                         ;;
2240                 esac
2241                 case "$CPPFLAGS" in
2242                 (*$cf_add_cflags)
2243                         ;;
2244                 (*)
2245                         case $cf_add_cflags in
2246                         (-D*)
2247                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2248
2249 CPPFLAGS=`echo "$CPPFLAGS" | \
2250         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2251                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2252
2253                                 ;;
2254                         esac
2255
2256         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2257         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2258
2259                         ;;
2260                 esac
2261                 ;;
2262         (*)
2263
2264         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2265         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2266
2267                 ;;
2268         esac
2269         ;;
2270 (yes)
2271
2272         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2273         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2274
2275         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2276
2277         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2278                 && test -z "${cf_tst_cflags}" \
2279                 && cf_fix_cppflags=no
2280         ;;
2281 esac
2282 done
2283
2284 if test -n "$cf_new_cflags" ; then
2285
2286         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2287         CFLAGS="${CFLAGS}$cf_new_cflags"
2288
2289 fi
2290
2291 if test -n "$cf_new_cppflags" ; then
2292
2293         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2294         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2295
2296 fi
2297
2298 if test -n "$cf_new_extra_cppflags" ; then
2299
2300         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2301         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2302
2303 fi
2304
2305                         ;;
2306                 (*)
2307                         CC="$CC $cf_arg"
2308                         ;;
2309                 esac
2310         done
2311         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2312
2313 echo "${as_me:-configure}:2313: testing resulting CC: '$CC' ..." 1>&5
2314
2315         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2316
2317 echo "${as_me:-configure}:2317: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2318
2319         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2320
2321 echo "${as_me:-configure}:2321: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2322
2323         ;;
2324 (*)
2325         echo "$as_me:2325: result: ok" >&5
2326 echo "${ECHO_T}ok" >&6
2327         ;;
2328 esac
2329
2330 ac_ext=c
2331 ac_cpp='$CPP $CPPFLAGS'
2332 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2333 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2334 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2335 ac_main_return=return
2336 echo "$as_me:2336: checking how to run the C preprocessor" >&5
2337 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2338 # On Suns, sometimes $CPP names a directory.
2339 if test -n "$CPP" && test -d "$CPP"; then
2340   CPP=
2341 fi
2342 if test -z "$CPP"; then
2343   if test "${ac_cv_prog_CPP+set}" = set; then
2344   echo $ECHO_N "(cached) $ECHO_C" >&6
2345 else
2346       # Double quotes because CPP needs to be expanded
2347     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2348     do
2349       ac_preproc_ok=false
2350 for ac_c_preproc_warn_flag in '' yes
2351 do
2352   # Use a header file that comes with gcc, so configuring glibc
2353   # with a fresh cross-compiler works.
2354   # On the NeXT, cc -E runs the code through the compiler's parser,
2355   # not just through cpp. "Syntax error" is here to catch this case.
2356   cat >conftest.$ac_ext <<_ACEOF
2357 #line 2357 "configure"
2358 #include "confdefs.h"
2359 #include <assert.h>
2360                      Syntax error
2361 _ACEOF
2362 if { (eval echo "$as_me:2362: \"$ac_cpp conftest.$ac_ext\"") >&5
2363   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2364   ac_status=$?
2365   egrep -v '^ *\+' conftest.er1 >conftest.err
2366   rm -f conftest.er1
2367   cat conftest.err >&5
2368   echo "$as_me:2368: \$? = $ac_status" >&5
2369   (exit $ac_status); } >/dev/null; then
2370   if test -s conftest.err; then
2371     ac_cpp_err=$ac_c_preproc_warn_flag
2372   else
2373     ac_cpp_err=
2374   fi
2375 else
2376   ac_cpp_err=yes
2377 fi
2378 if test -z "$ac_cpp_err"; then
2379   :
2380 else
2381   echo "$as_me: failed program was:" >&5
2382   cat conftest.$ac_ext >&5
2383   # Broken: fails on valid input.
2384 continue
2385 fi
2386 rm -f conftest.err conftest.$ac_ext
2387
2388   # OK, works on sane cases.  Now check whether non-existent headers
2389   # can be detected and how.
2390   cat >conftest.$ac_ext <<_ACEOF
2391 #line 2391 "configure"
2392 #include "confdefs.h"
2393 #include <ac_nonexistent.h>
2394 _ACEOF
2395 if { (eval echo "$as_me:2395: \"$ac_cpp conftest.$ac_ext\"") >&5
2396   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2397   ac_status=$?
2398   egrep -v '^ *\+' conftest.er1 >conftest.err
2399   rm -f conftest.er1
2400   cat conftest.err >&5
2401   echo "$as_me:2401: \$? = $ac_status" >&5
2402   (exit $ac_status); } >/dev/null; then
2403   if test -s conftest.err; then
2404     ac_cpp_err=$ac_c_preproc_warn_flag
2405   else
2406     ac_cpp_err=
2407   fi
2408 else
2409   ac_cpp_err=yes
2410 fi
2411 if test -z "$ac_cpp_err"; then
2412   # Broken: success on invalid input.
2413 continue
2414 else
2415   echo "$as_me: failed program was:" >&5
2416   cat conftest.$ac_ext >&5
2417   # Passes both tests.
2418 ac_preproc_ok=:
2419 break
2420 fi
2421 rm -f conftest.err conftest.$ac_ext
2422
2423 done
2424 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2425 rm -f conftest.err conftest.$ac_ext
2426 if $ac_preproc_ok; then
2427   break
2428 fi
2429
2430     done
2431     ac_cv_prog_CPP=$CPP
2432
2433 fi
2434   CPP=$ac_cv_prog_CPP
2435 else
2436   ac_cv_prog_CPP=$CPP
2437 fi
2438 echo "$as_me:2438: result: $CPP" >&5
2439 echo "${ECHO_T}$CPP" >&6
2440 ac_preproc_ok=false
2441 for ac_c_preproc_warn_flag in '' yes
2442 do
2443   # Use a header file that comes with gcc, so configuring glibc
2444   # with a fresh cross-compiler works.
2445   # On the NeXT, cc -E runs the code through the compiler's parser,
2446   # not just through cpp. "Syntax error" is here to catch this case.
2447   cat >conftest.$ac_ext <<_ACEOF
2448 #line 2448 "configure"
2449 #include "confdefs.h"
2450 #include <assert.h>
2451                      Syntax error
2452 _ACEOF
2453 if { (eval echo "$as_me:2453: \"$ac_cpp conftest.$ac_ext\"") >&5
2454   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2455   ac_status=$?
2456   egrep -v '^ *\+' conftest.er1 >conftest.err
2457   rm -f conftest.er1
2458   cat conftest.err >&5
2459   echo "$as_me:2459: \$? = $ac_status" >&5
2460   (exit $ac_status); } >/dev/null; then
2461   if test -s conftest.err; then
2462     ac_cpp_err=$ac_c_preproc_warn_flag
2463   else
2464     ac_cpp_err=
2465   fi
2466 else
2467   ac_cpp_err=yes
2468 fi
2469 if test -z "$ac_cpp_err"; then
2470   :
2471 else
2472   echo "$as_me: failed program was:" >&5
2473   cat conftest.$ac_ext >&5
2474   # Broken: fails on valid input.
2475 continue
2476 fi
2477 rm -f conftest.err conftest.$ac_ext
2478
2479   # OK, works on sane cases.  Now check whether non-existent headers
2480   # can be detected and how.
2481   cat >conftest.$ac_ext <<_ACEOF
2482 #line 2482 "configure"
2483 #include "confdefs.h"
2484 #include <ac_nonexistent.h>
2485 _ACEOF
2486 if { (eval echo "$as_me:2486: \"$ac_cpp conftest.$ac_ext\"") >&5
2487   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2488   ac_status=$?
2489   egrep -v '^ *\+' conftest.er1 >conftest.err
2490   rm -f conftest.er1
2491   cat conftest.err >&5
2492   echo "$as_me:2492: \$? = $ac_status" >&5
2493   (exit $ac_status); } >/dev/null; then
2494   if test -s conftest.err; then
2495     ac_cpp_err=$ac_c_preproc_warn_flag
2496   else
2497     ac_cpp_err=
2498   fi
2499 else
2500   ac_cpp_err=yes
2501 fi
2502 if test -z "$ac_cpp_err"; then
2503   # Broken: success on invalid input.
2504 continue
2505 else
2506   echo "$as_me: failed program was:" >&5
2507   cat conftest.$ac_ext >&5
2508   # Passes both tests.
2509 ac_preproc_ok=:
2510 break
2511 fi
2512 rm -f conftest.err conftest.$ac_ext
2513
2514 done
2515 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2516 rm -f conftest.err conftest.$ac_ext
2517 if $ac_preproc_ok; then
2518   :
2519 else
2520   { { echo "$as_me:2520: error: C preprocessor \"$CPP\" fails sanity check" >&5
2521 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2522    { (exit 1); exit 1; }; }
2523 fi
2524
2525 ac_ext=c
2526 ac_cpp='$CPP $CPPFLAGS'
2527 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2528 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2529 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2530 ac_main_return=return
2531
2532 if test $ac_cv_c_compiler_gnu = yes; then
2533     echo "$as_me:2533: checking whether $CC needs -traditional" >&5
2534 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2535 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2536   echo $ECHO_N "(cached) $ECHO_C" >&6
2537 else
2538     ac_pattern="Autoconf.*'x'"
2539   cat >conftest.$ac_ext <<_ACEOF
2540 #line 2540 "configure"
2541 #include "confdefs.h"
2542 #include <sgtty.h>
2543 int Autoconf = TIOCGETP;
2544 _ACEOF
2545 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2546   egrep "$ac_pattern" >/dev/null 2>&1; then
2547   ac_cv_prog_gcc_traditional=yes
2548 else
2549   ac_cv_prog_gcc_traditional=no
2550 fi
2551 rm -rf conftest*
2552
2553   if test $ac_cv_prog_gcc_traditional = no; then
2554     cat >conftest.$ac_ext <<_ACEOF
2555 #line 2555 "configure"
2556 #include "confdefs.h"
2557 #include <termio.h>
2558 int Autoconf = TCGETA;
2559 _ACEOF
2560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2561   egrep "$ac_pattern" >/dev/null 2>&1; then
2562   ac_cv_prog_gcc_traditional=yes
2563 fi
2564 rm -rf conftest*
2565
2566   fi
2567 fi
2568 echo "$as_me:2568: result: $ac_cv_prog_gcc_traditional" >&5
2569 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2570   if test $ac_cv_prog_gcc_traditional = yes; then
2571     CC="$CC -traditional"
2572   fi
2573 fi
2574
2575 echo "$as_me:2575: checking whether $CC understands -c and -o together" >&5
2576 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2577 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2578   echo $ECHO_N "(cached) $ECHO_C" >&6
2579 else
2580
2581 cat > conftest.$ac_ext <<CF_EOF
2582 int main(void)
2583 {
2584         ${cf_cv_main_return:-return}(0);
2585 }
2586 CF_EOF
2587 # We do the test twice because some compilers refuse to overwrite an
2588 # existing .o file with -o, though they will create one.
2589 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2590 if { (eval echo "$as_me:2590: \"$ac_try\"") >&5
2591   (eval $ac_try) 2>&5
2592   ac_status=$?
2593   echo "$as_me:2593: \$? = $ac_status" >&5
2594   (exit $ac_status); } &&
2595   test -f conftest2.$ac_objext && { (eval echo "$as_me:2595: \"$ac_try\"") >&5
2596   (eval $ac_try) 2>&5
2597   ac_status=$?
2598   echo "$as_me:2598: \$? = $ac_status" >&5
2599   (exit $ac_status); };
2600 then
2601   eval cf_cv_prog_CC_c_o=yes
2602 else
2603   eval cf_cv_prog_CC_c_o=no
2604 fi
2605 rm -rf conftest*
2606
2607 fi
2608 if test $cf_cv_prog_CC_c_o = yes; then
2609   echo "$as_me:2609: result: yes" >&5
2610 echo "${ECHO_T}yes" >&6
2611 else
2612   echo "$as_me:2612: result: no" >&5
2613 echo "${ECHO_T}no" >&6
2614 fi
2615
2616 if test "$cross_compiling" = yes ; then
2617         LDCONFIG=:
2618 else
2619         case "$cf_cv_system_name" in
2620         (dragonfly*|mirbsd*|freebsd*)
2621                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2622                 ;;
2623         (*) LDPATH=$PATH:/sbin:/usr/sbin
2624                 # Extract the first word of "ldconfig", so it can be a program name with args.
2625 set dummy ldconfig; ac_word=$2
2626 echo "$as_me:2626: checking for $ac_word" >&5
2627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2628 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2629   echo $ECHO_N "(cached) $ECHO_C" >&6
2630 else
2631   case $LDCONFIG in
2632   [\\/]* | ?:[\\/]*)
2633   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2634   ;;
2635   *)
2636   ac_save_IFS=$IFS; IFS=$ac_path_separator
2637 ac_dummy="$LDPATH"
2638 for ac_dir in $ac_dummy; do
2639   IFS=$ac_save_IFS
2640   test -z "$ac_dir" && ac_dir=.
2641   if $as_executable_p "$ac_dir/$ac_word"; then
2642    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2643    echo "$as_me:2643: found $ac_dir/$ac_word" >&5
2644    break
2645 fi
2646 done
2647
2648   ;;
2649 esac
2650 fi
2651 LDCONFIG=$ac_cv_path_LDCONFIG
2652
2653 if test -n "$LDCONFIG"; then
2654   echo "$as_me:2654: result: $LDCONFIG" >&5
2655 echo "${ECHO_T}$LDCONFIG" >&6
2656 else
2657   echo "$as_me:2657: result: no" >&5
2658 echo "${ECHO_T}no" >&6
2659 fi
2660
2661                 ;;
2662         esac
2663 fi
2664
2665 echo "$as_me:2665: checking if you want to ensure bool is consistent with C++" >&5
2666 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2667
2668 # Check whether --with-cxx or --without-cxx was given.
2669 if test "${with_cxx+set}" = set; then
2670   withval="$with_cxx"
2671   cf_with_cxx=$withval
2672 else
2673   cf_with_cxx=yes
2674 fi;
2675 echo "$as_me:2675: result: $cf_with_cxx" >&5
2676 echo "${ECHO_T}$cf_with_cxx" >&6
2677 if test "X$cf_with_cxx" = Xno ; then
2678         CXX=""
2679         GXX=""
2680 else
2681         # with autoconf 2.13, we can change the error to a warning:
2682                 ac_ext=cc
2683 ac_cpp='$CXXCPP $CPPFLAGS'
2684 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2687 ac_main_return=return
2688 if test -n "$ac_tool_prefix"; then
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_tool_prefix$ac_prog", so it can be a program name with args.
2692 set dummy $ac_tool_prefix$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_CXX+set}" = set; then
2696   echo $ECHO_N "(cached) $ECHO_C" >&6
2697 else
2698   if test -n "$CXX"; then
2699   ac_cv_prog_CXX="$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_CXX="$ac_tool_prefix$ac_prog"
2708 echo "$as_me:2708: found $ac_dir/$ac_word" >&5
2709 break
2710 done
2711
2712 fi
2713 fi
2714 CXX=$ac_cv_prog_CXX
2715 if test -n "$CXX"; then
2716   echo "$as_me:2716: result: $CXX" >&5
2717 echo "${ECHO_T}$CXX" >&6
2718 else
2719   echo "$as_me:2719: result: no" >&5
2720 echo "${ECHO_T}no" >&6
2721 fi
2722
2723     test -n "$CXX" && break
2724   done
2725 fi
2726 if test -z "$CXX"; then
2727   ac_ct_CXX=$CXX
2728   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2729 do
2730   # Extract the first word of "$ac_prog", so it can be a program name with args.
2731 set dummy $ac_prog; ac_word=$2
2732 echo "$as_me:2732: checking for $ac_word" >&5
2733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2734 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2735   echo $ECHO_N "(cached) $ECHO_C" >&6
2736 else
2737   if test -n "$ac_ct_CXX"; then
2738   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2739 else
2740   ac_save_IFS=$IFS; IFS=$ac_path_separator
2741 ac_dummy="$PATH"
2742 for ac_dir in $ac_dummy; do
2743   IFS=$ac_save_IFS
2744   test -z "$ac_dir" && ac_dir=.
2745   $as_executable_p "$ac_dir/$ac_word" || continue
2746 ac_cv_prog_ac_ct_CXX="$ac_prog"
2747 echo "$as_me:2747: found $ac_dir/$ac_word" >&5
2748 break
2749 done
2750
2751 fi
2752 fi
2753 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2754 if test -n "$ac_ct_CXX"; then
2755   echo "$as_me:2755: result: $ac_ct_CXX" >&5
2756 echo "${ECHO_T}$ac_ct_CXX" >&6
2757 else
2758   echo "$as_me:2758: result: no" >&5
2759 echo "${ECHO_T}no" >&6
2760 fi
2761
2762   test -n "$ac_ct_CXX" && break
2763 done
2764 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2765
2766   CXX=$ac_ct_CXX
2767 fi
2768
2769 # Provide some information about the compiler.
2770 echo "$as_me:2770:" \
2771      "checking for C++ compiler version" >&5
2772 ac_compiler=`set X $ac_compile; echo $2`
2773 { (eval echo "$as_me:2773: \"$ac_compiler --version </dev/null >&5\"") >&5
2774   (eval $ac_compiler --version </dev/null >&5) 2>&5
2775   ac_status=$?
2776   echo "$as_me:2776: \$? = $ac_status" >&5
2777   (exit $ac_status); }
2778 { (eval echo "$as_me:2778: \"$ac_compiler -v </dev/null >&5\"") >&5
2779   (eval $ac_compiler -v </dev/null >&5) 2>&5
2780   ac_status=$?
2781   echo "$as_me:2781: \$? = $ac_status" >&5
2782   (exit $ac_status); }
2783 { (eval echo "$as_me:2783: \"$ac_compiler -V </dev/null >&5\"") >&5
2784   (eval $ac_compiler -V </dev/null >&5) 2>&5
2785   ac_status=$?
2786   echo "$as_me:2786: \$? = $ac_status" >&5
2787   (exit $ac_status); }
2788
2789 echo "$as_me:2789: checking whether we are using the GNU C++ compiler" >&5
2790 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2791 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2792   echo $ECHO_N "(cached) $ECHO_C" >&6
2793 else
2794   cat >conftest.$ac_ext <<_ACEOF
2795 #line 2795 "configure"
2796 #include "confdefs.h"
2797
2798 int
2799 main (void)
2800 {
2801 #ifndef __GNUC__
2802        choke me
2803 #endif
2804
2805   ;
2806   return 0;
2807 }
2808 _ACEOF
2809 rm -f conftest.$ac_objext
2810 if { (eval echo "$as_me:2810: \"$ac_compile\"") >&5
2811   (eval $ac_compile) 2>&5
2812   ac_status=$?
2813   echo "$as_me:2813: \$? = $ac_status" >&5
2814   (exit $ac_status); } &&
2815          { ac_try='test -s conftest.$ac_objext'
2816   { (eval echo "$as_me:2816: \"$ac_try\"") >&5
2817   (eval $ac_try) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); }; }; then
2821   ac_compiler_gnu=yes
2822 else
2823   echo "$as_me: failed program was:" >&5
2824 cat conftest.$ac_ext >&5
2825 ac_compiler_gnu=no
2826 fi
2827 rm -f conftest.$ac_objext conftest.$ac_ext
2828 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2829
2830 fi
2831 echo "$as_me:2831: result: $ac_cv_cxx_compiler_gnu" >&5
2832 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2833 GXX=`test $ac_compiler_gnu = yes && echo yes`
2834 ac_test_CXXFLAGS=${CXXFLAGS+set}
2835 ac_save_CXXFLAGS=$CXXFLAGS
2836 CXXFLAGS="-g"
2837 echo "$as_me:2837: checking whether $CXX accepts -g" >&5
2838 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2839 if test "${ac_cv_prog_cxx_g+set}" = set; then
2840   echo $ECHO_N "(cached) $ECHO_C" >&6
2841 else
2842   cat >conftest.$ac_ext <<_ACEOF
2843 #line 2843 "configure"
2844 #include "confdefs.h"
2845
2846 int
2847 main (void)
2848 {
2849
2850   ;
2851   return 0;
2852 }
2853 _ACEOF
2854 rm -f conftest.$ac_objext
2855 if { (eval echo "$as_me:2855: \"$ac_compile\"") >&5
2856   (eval $ac_compile) 2>&5
2857   ac_status=$?
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit $ac_status); } &&
2860          { ac_try='test -s conftest.$ac_objext'
2861   { (eval echo "$as_me:2861: \"$ac_try\"") >&5
2862   (eval $ac_try) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); }; }; then
2866   ac_cv_prog_cxx_g=yes
2867 else
2868   echo "$as_me: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
2870 ac_cv_prog_cxx_g=no
2871 fi
2872 rm -f conftest.$ac_objext conftest.$ac_ext
2873 fi
2874 echo "$as_me:2874: result: $ac_cv_prog_cxx_g" >&5
2875 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2876 if test "$ac_test_CXXFLAGS" = set; then
2877   CXXFLAGS=$ac_save_CXXFLAGS
2878 elif test $ac_cv_prog_cxx_g = yes; then
2879   if test "$GXX" = yes; then
2880     CXXFLAGS="-g -O2"
2881   else
2882     CXXFLAGS="-g"
2883   fi
2884 else
2885   if test "$GXX" = yes; then
2886     CXXFLAGS="-O2"
2887   else
2888     CXXFLAGS=
2889   fi
2890 fi
2891 for ac_declaration in \
2892    ''\
2893    '#include <stdlib.h>' \
2894    'extern "C" void std::exit (int) throw (); using std::exit;' \
2895    'extern "C" void std::exit (int); using std::exit;' \
2896    'extern "C" void exit (int) throw ();' \
2897    'extern "C" void exit (int);' \
2898    'void exit (int);'
2899 do
2900   cat >conftest.$ac_ext <<_ACEOF
2901 #line 2901 "configure"
2902 #include "confdefs.h"
2903 #include <stdlib.h>
2904 $ac_declaration
2905 int
2906 main (void)
2907 {
2908 exit (42);
2909   ;
2910   return 0;
2911 }
2912 _ACEOF
2913 rm -f conftest.$ac_objext
2914 if { (eval echo "$as_me:2914: \"$ac_compile\"") >&5
2915   (eval $ac_compile) 2>&5
2916   ac_status=$?
2917   echo "$as_me:2917: \$? = $ac_status" >&5
2918   (exit $ac_status); } &&
2919          { ac_try='test -s conftest.$ac_objext'
2920   { (eval echo "$as_me:2920: \"$ac_try\"") >&5
2921   (eval $ac_try) 2>&5
2922   ac_status=$?
2923   echo "$as_me:2923: \$? = $ac_status" >&5
2924   (exit $ac_status); }; }; then
2925   :
2926 else
2927   echo "$as_me: failed program was:" >&5
2928 cat conftest.$ac_ext >&5
2929 continue
2930 fi
2931 rm -f conftest.$ac_objext conftest.$ac_ext
2932   cat >conftest.$ac_ext <<_ACEOF
2933 #line 2933 "configure"
2934 #include "confdefs.h"
2935 $ac_declaration
2936 int
2937 main (void)
2938 {
2939 exit (42);
2940   ;
2941   return 0;
2942 }
2943 _ACEOF
2944 rm -f conftest.$ac_objext
2945 if { (eval echo "$as_me:2945: \"$ac_compile\"") >&5
2946   (eval $ac_compile) 2>&5
2947   ac_status=$?
2948   echo "$as_me:2948: \$? = $ac_status" >&5
2949   (exit $ac_status); } &&
2950          { ac_try='test -s conftest.$ac_objext'
2951   { (eval echo "$as_me:2951: \"$ac_try\"") >&5
2952   (eval $ac_try) 2>&5
2953   ac_status=$?
2954   echo "$as_me:2954: \$? = $ac_status" >&5
2955   (exit $ac_status); }; }; then
2956   break
2957 else
2958   echo "$as_me: failed program was:" >&5
2959 cat conftest.$ac_ext >&5
2960 fi
2961 rm -f conftest.$ac_objext conftest.$ac_ext
2962 done
2963 rm -rf conftest*
2964 if test -n "$ac_declaration"; then
2965   echo '#ifdef __cplusplus' >>confdefs.h
2966   echo $ac_declaration      >>confdefs.h
2967   echo '#endif'             >>confdefs.h
2968 fi
2969
2970 ac_ext=c
2971 ac_cpp='$CPP $CPPFLAGS'
2972 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2973 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2974 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2975 ac_main_return=return
2976
2977         ac_ext=cc
2978 ac_cpp='$CXXCPP $CPPFLAGS'
2979 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2980 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2981 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2982 ac_main_return=return
2983
2984         if test "x$cf_with_cxx" != xno
2985         then
2986                 # Several of the C++ configurations do not work, particularly when
2987                 # cross-compiling (20140913 -TD)
2988                 echo "$as_me:2988: checking if $CXX works" >&5
2989 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2990
2991                 save_CPPFLAGS="$CPPFLAGS"
2992                 eval cf_includedir=${includedir}
2993                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2994
2995 cat >conftest.$ac_ext <<_ACEOF
2996 #line 2996 "configure"
2997 #include "confdefs.h"
2998
2999 #include <stdlib.h>
3000 #include <stdio.h>
3001
3002 int
3003 main (void)
3004 {
3005
3006                 printf("Hello world!\n")
3007
3008   ;
3009   return 0;
3010 }
3011 _ACEOF
3012 rm -f conftest.$ac_objext
3013 if { (eval echo "$as_me:3013: \"$ac_compile\"") >&5
3014   (eval $ac_compile) 2>&5
3015   ac_status=$?
3016   echo "$as_me:3016: \$? = $ac_status" >&5
3017   (exit $ac_status); } &&
3018          { ac_try='test -s conftest.$ac_objext'
3019   { (eval echo "$as_me:3019: \"$ac_try\"") >&5
3020   (eval $ac_try) 2>&5
3021   ac_status=$?
3022   echo "$as_me:3022: \$? = $ac_status" >&5
3023   (exit $ac_status); }; }; then
3024   cf_cxx_works=yes
3025 else
3026   echo "$as_me: failed program was:" >&5
3027 cat conftest.$ac_ext >&5
3028 cf_cxx_works=no
3029 fi
3030 rm -f conftest.$ac_objext conftest.$ac_ext
3031                 CPPFLAGS="$save_CPPFLAGS"
3032
3033                 echo "$as_me:3033: result: $cf_cxx_works" >&5
3034 echo "${ECHO_T}$cf_cxx_works" >&6
3035                 if test "x$cf_cxx_works" = xno
3036                 then
3037                         { echo "$as_me:3037: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3038 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3039                         cf_with_cxx=no; CXX=""; GXX="";
3040                 fi
3041         fi
3042         ac_ext=c
3043 ac_cpp='$CPP $CPPFLAGS'
3044 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3045 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3046 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3047 ac_main_return=return
3048
3049         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3050         if test "$CXX" = "g++" ; then
3051                 # Extract the first word of "g++", so it can be a program name with args.
3052 set dummy g++; ac_word=$2
3053 echo "$as_me:3053: checking for $ac_word" >&5
3054 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3055 if test "${ac_cv_path_CXX+set}" = set; then
3056   echo $ECHO_N "(cached) $ECHO_C" >&6
3057 else
3058   case $CXX in
3059   [\\/]* | ?:[\\/]*)
3060   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3061   ;;
3062   *)
3063   ac_save_IFS=$IFS; IFS=$ac_path_separator
3064 ac_dummy="$PATH"
3065 for ac_dir in $ac_dummy; do
3066   IFS=$ac_save_IFS
3067   test -z "$ac_dir" && ac_dir=.
3068   if $as_executable_p "$ac_dir/$ac_word"; then
3069    ac_cv_path_CXX="$ac_dir/$ac_word"
3070    echo "$as_me:3070: found $ac_dir/$ac_word" >&5
3071    break
3072 fi
3073 done
3074
3075   ;;
3076 esac
3077 fi
3078 CXX=$ac_cv_path_CXX
3079
3080 if test -n "$CXX"; then
3081   echo "$as_me:3081: result: $CXX" >&5
3082 echo "${ECHO_T}$CXX" >&6
3083 else
3084   echo "$as_me:3084: result: no" >&5
3085 echo "${ECHO_T}no" >&6
3086 fi
3087
3088         fi
3089         case "x$CXX" in
3090         (x|xg++)
3091                 { echo "$as_me:3091: WARNING: You don't have any C++ compiler, too bad" >&5
3092 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3093                 cf_with_cxx=no; CXX=""; GXX="";
3094                 ;;
3095         esac
3096 fi
3097
3098 GXX_VERSION=none
3099 if test "$GXX" = yes; then
3100         echo "$as_me:3100: checking version of ${CXX:-g++}" >&5
3101 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3102         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3103         if test -z "$GXX_VERSION"
3104         then
3105                 GXX_VERSION=unknown
3106                 GXX=no
3107         fi
3108         echo "$as_me:3108: result: $GXX_VERSION" >&5
3109 echo "${ECHO_T}$GXX_VERSION" >&6
3110 fi
3111
3112 case $GXX_VERSION in
3113 (1*|2.[0-6]*)
3114         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3115         # cf_cxx_library=no
3116         { echo "$as_me:3116: WARNING: templates do not work" >&5
3117 echo "$as_me: WARNING: templates do not work" >&2;}
3118         ;;
3119 esac
3120
3121 echo "$as_me:3121: checking if you want to build C++ binding and demo" >&5
3122 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3123
3124 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3125 if test "${with_cxx_binding+set}" = set; then
3126   withval="$with_cxx_binding"
3127   cf_with_cxx_binding=$withval
3128 else
3129   cf_with_cxx_binding=$cf_with_cxx
3130 fi;
3131 echo "$as_me:3131: result: $cf_with_cxx_binding" >&5
3132 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3133
3134 echo "$as_me:3134: checking if you want to build with Ada95" >&5
3135 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3136 echo "$as_me:3136: result: $cf_with_ada" >&5
3137 echo "${ECHO_T}$cf_with_ada" >&6
3138
3139 echo "$as_me:3139: checking if you want to install terminal database" >&5
3140 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3141
3142 # Check whether --enable-db-install or --disable-db-install was given.
3143 if test "${enable_db_install+set}" = set; then
3144   enableval="$enable_db_install"
3145   cf_with_db_install=$enableval
3146 else
3147   cf_with_db_install=yes
3148 fi;
3149 echo "$as_me:3149: result: $cf_with_db_install" >&5
3150 echo "${ECHO_T}$cf_with_db_install" >&6
3151
3152 echo "$as_me:3152: checking if you want to install manpages" >&5
3153 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3154
3155 # Check whether --with-manpages or --without-manpages was given.
3156 if test "${with_manpages+set}" = set; then
3157   withval="$with_manpages"
3158   cf_with_manpages=$withval
3159 else
3160   cf_with_manpages=yes
3161 fi;
3162 echo "$as_me:3162: result: $cf_with_manpages" >&5
3163 echo "${ECHO_T}$cf_with_manpages" >&6
3164
3165 echo "$as_me:3165: checking if you want to build programs such as tic" >&5
3166 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3167
3168 # Check whether --with-progs or --without-progs was given.
3169 if test "${with_progs+set}" = set; then
3170   withval="$with_progs"
3171   cf_with_progs=$withval
3172 else
3173   cf_with_progs=yes
3174 fi;
3175 echo "$as_me:3175: result: $cf_with_progs" >&5
3176 echo "${ECHO_T}$cf_with_progs" >&6
3177
3178 if test -f $srcdir/tack/tack.h; then
3179         if test "x$cross_compiling" = xyes ; then
3180                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3181
3182 echo "${as_me:-configure}:3182: testing ignoring tack because we are cross-compiling ..." 1>&5
3183
3184                 cf_with_tack=no
3185         else
3186                 echo "$as_me:3186: checking if you want to build the tack program" >&5
3187 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3188
3189 # Check whether --with-tack or --without-tack was given.
3190 if test "${with_tack+set}" = set; then
3191   withval="$with_tack"
3192   cf_with_tack=$withval
3193 else
3194   cf_with_tack=$cf_with_progs
3195 fi;
3196                 echo "$as_me:3196: result: $cf_with_tack" >&5
3197 echo "${ECHO_T}$cf_with_tack" >&6
3198         fi
3199 else
3200         cf_with_tack=no
3201 fi
3202
3203 echo "$as_me:3203: checking if you want to build test-programs" >&5
3204 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3205
3206 # Check whether --with-tests or --without-tests was given.
3207 if test "${with_tests+set}" = set; then
3208   withval="$with_tests"
3209   cf_with_tests=$withval
3210 else
3211   cf_with_tests=yes
3212 fi;
3213 echo "$as_me:3213: result: $cf_with_tests" >&5
3214 echo "${ECHO_T}$cf_with_tests" >&6
3215
3216 echo "$as_me:3216: checking if you wish to install curses.h" >&5
3217 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3218
3219 # Check whether --with-curses-h or --without-curses-h was given.
3220 if test "${with_curses_h+set}" = set; then
3221   withval="$with_curses_h"
3222   with_curses_h=$withval
3223 else
3224   with_curses_h=yes
3225 fi;
3226 echo "$as_me:3226: result: $with_curses_h" >&5
3227 echo "${ECHO_T}$with_curses_h" >&6
3228
3229 modules_to_build="ncurses"
3230 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3231 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3232 modules_to_build="$modules_to_build panel menu form"
3233
3234 test "$program_prefix" != NONE &&
3235   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3236 # Use a double $ so make ignores it.
3237 test "$program_suffix" != NONE &&
3238   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3239 # Double any \ or $.  echo might interpret backslashes.
3240 # By default was `s,x,x', remove it if useless.
3241 cat <<\_ACEOF >conftest.sed
3242 s/[\\$]/&&/g;s/;s,x,x,$//
3243 _ACEOF
3244 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3245 rm conftest.sed
3246
3247 for ac_prog in mawk gawk nawk awk
3248 do
3249   # Extract the first word of "$ac_prog", so it can be a program name with args.
3250 set dummy $ac_prog; ac_word=$2
3251 echo "$as_me:3251: checking for $ac_word" >&5
3252 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3253 if test "${ac_cv_prog_AWK+set}" = set; then
3254   echo $ECHO_N "(cached) $ECHO_C" >&6
3255 else
3256   if test -n "$AWK"; then
3257   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3258 else
3259   ac_save_IFS=$IFS; IFS=$ac_path_separator
3260 ac_dummy="$PATH"
3261 for ac_dir in $ac_dummy; do
3262   IFS=$ac_save_IFS
3263   test -z "$ac_dir" && ac_dir=.
3264   $as_executable_p "$ac_dir/$ac_word" || continue
3265 ac_cv_prog_AWK="$ac_prog"
3266 echo "$as_me:3266: found $ac_dir/$ac_word" >&5
3267 break
3268 done
3269
3270 fi
3271 fi
3272 AWK=$ac_cv_prog_AWK
3273 if test -n "$AWK"; then
3274   echo "$as_me:3274: result: $AWK" >&5
3275 echo "${ECHO_T}$AWK" >&6
3276 else
3277   echo "$as_me:3277: result: no" >&5
3278 echo "${ECHO_T}no" >&6
3279 fi
3280
3281   test -n "$AWK" && break
3282 done
3283
3284 test -z "$AWK" && { { echo "$as_me:3284: error: No awk program found" >&5
3285 echo "$as_me: error: No awk program found" >&2;}
3286    { (exit 1); exit 1; }; }
3287
3288 echo "$as_me:3288: checking for egrep" >&5
3289 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3290 if test "${ac_cv_prog_egrep+set}" = set; then
3291   echo $ECHO_N "(cached) $ECHO_C" >&6
3292 else
3293   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3294                 then ac_cv_prog_egrep='grep -E'
3295                 else ac_cv_prog_egrep='egrep'
3296         fi
3297 fi
3298 echo "$as_me:3298: result: $ac_cv_prog_egrep" >&5
3299 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3300         EGREP=$ac_cv_prog_egrep
3301
3302         test -z "$EGREP" && { { echo "$as_me:3302: error: No egrep program found" >&5
3303 echo "$as_me: error: No egrep program found" >&2;}
3304    { (exit 1); exit 1; }; }
3305
3306 # Find a good install program.  We prefer a C program (faster),
3307 # so one script is as good as another.  But avoid the broken or
3308 # incompatible versions:
3309 # SysV /etc/install, /usr/sbin/install
3310 # SunOS /usr/etc/install
3311 # IRIX /sbin/install
3312 # AIX /bin/install
3313 # AmigaOS /C/install, which installs bootblocks on floppy discs
3314 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3315 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3316 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3317 # ./install, which can be erroneously created by make from ./install.sh.
3318 echo "$as_me:3318: checking for a BSD compatible install" >&5
3319 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3320 if test -z "$INSTALL"; then
3321 if test "${ac_cv_path_install+set}" = set; then
3322   echo $ECHO_N "(cached) $ECHO_C" >&6
3323 else
3324     ac_save_IFS=$IFS; IFS=$ac_path_separator
3325   for ac_dir in $PATH; do
3326     IFS=$ac_save_IFS
3327     # Account for people who put trailing slashes in PATH elements.
3328     case $ac_dir/ in
3329     / | ./ | .// | /cC/* \
3330     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3331     | /usr/ucb/* ) ;;
3332     *)
3333       # OSF1 and SCO ODT 3.0 have their own names for install.
3334       # Don't use installbsd from OSF since it installs stuff as root
3335       # by default.
3336       for ac_prog in ginstall scoinst install; do
3337         if $as_executable_p "$ac_dir/$ac_prog"; then
3338           if test $ac_prog = install &&
3339             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3340             # AIX install.  It has an incompatible calling convention.
3341             :
3342           elif test $ac_prog = install &&
3343             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3344             # program-specific install script used by HP pwplus--don't use.
3345             :
3346           else
3347             ac_cv_path_install="$ac_dir/$ac_prog -c"
3348             break 2
3349           fi
3350         fi
3351       done
3352       ;;
3353     esac
3354   done
3355
3356 fi
3357   if test "${ac_cv_path_install+set}" = set; then
3358     INSTALL=$ac_cv_path_install
3359   else
3360     # As a last resort, use the slow shell script.  We don't cache a
3361     # path for INSTALL within a source directory, because that will
3362     # break other packages using the cache if that directory is
3363     # removed, or if the path is relative.
3364     INSTALL=$ac_install_sh
3365   fi
3366 fi
3367 echo "$as_me:3367: result: $INSTALL" >&5
3368 echo "${ECHO_T}$INSTALL" >&6
3369
3370 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3371 # It thinks the first close brace ends the variable substitution.
3372 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3373
3374 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3375
3376 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3377
3378 case $INSTALL in
3379 (/*)
3380         ;;
3381 (*)
3382         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3383         test -z "$cf_dir" && cf_dir=.
3384         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3385         ;;
3386 esac
3387
3388 for ac_prog in lint cppcheck splint
3389 do
3390   # Extract the first word of "$ac_prog", so it can be a program name with args.
3391 set dummy $ac_prog; ac_word=$2
3392 echo "$as_me:3392: checking for $ac_word" >&5
3393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3394 if test "${ac_cv_prog_LINT+set}" = set; then
3395   echo $ECHO_N "(cached) $ECHO_C" >&6
3396 else
3397   if test -n "$LINT"; then
3398   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3399 else
3400   ac_save_IFS=$IFS; IFS=$ac_path_separator
3401 ac_dummy="$PATH"
3402 for ac_dir in $ac_dummy; do
3403   IFS=$ac_save_IFS
3404   test -z "$ac_dir" && ac_dir=.
3405   $as_executable_p "$ac_dir/$ac_word" || continue
3406 ac_cv_prog_LINT="$ac_prog"
3407 echo "$as_me:3407: found $ac_dir/$ac_word" >&5
3408 break
3409 done
3410
3411 fi
3412 fi
3413 LINT=$ac_cv_prog_LINT
3414 if test -n "$LINT"; then
3415   echo "$as_me:3415: result: $LINT" >&5
3416 echo "${ECHO_T}$LINT" >&6
3417 else
3418   echo "$as_me:3418: result: no" >&5
3419 echo "${ECHO_T}no" >&6
3420 fi
3421
3422   test -n "$LINT" && break
3423 done
3424
3425 echo "$as_me:3425: checking whether ln -s works" >&5
3426 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3427 LN_S=$as_ln_s
3428 if test "$LN_S" = "ln -s"; then
3429   echo "$as_me:3429: result: yes" >&5
3430 echo "${ECHO_T}yes" >&6
3431 else
3432   echo "$as_me:3432: result: no, using $LN_S" >&5
3433 echo "${ECHO_T}no, using $LN_S" >&6
3434 fi
3435
3436 echo "$as_me:3436: checking if $LN_S -f options work" >&5
3437 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3438
3439 rm -f conf$$.src conf$$dst
3440 echo >conf$$.dst
3441 echo first >conf$$.src
3442 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3443         cf_prog_ln_sf=yes
3444 else
3445         cf_prog_ln_sf=no
3446 fi
3447 rm -f conf$$.dst conf$$src
3448 echo "$as_me:3448: result: $cf_prog_ln_sf" >&5
3449 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3450
3451 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3452
3453 echo "$as_me:3453: checking for long file names" >&5
3454 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3455 if test "${ac_cv_sys_long_file_names+set}" = set; then
3456   echo $ECHO_N "(cached) $ECHO_C" >&6
3457 else
3458   ac_cv_sys_long_file_names=yes
3459 # Test for long file names in all the places we know might matter:
3460 #      .                the current directory, where building will happen
3461 #      $prefix/lib      where we will be installing things
3462 #      $exec_prefix/lib likewise
3463 # eval it to expand exec_prefix.
3464 #      $TMPDIR          if set, where it might want to write temporary files
3465 # if $TMPDIR is not set:
3466 #      /tmp             where it might want to write temporary files
3467 #      /var/tmp         likewise
3468 #      /usr/tmp         likewise
3469 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3470   ac_tmpdirs=$TMPDIR
3471 else
3472   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3473 fi
3474 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3475   test -d $ac_dir || continue
3476   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3477   ac_xdir=$ac_dir/cf$$
3478   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3479   ac_tf1=$ac_xdir/conftest9012345
3480   ac_tf2=$ac_xdir/conftest9012346
3481   (echo 1 >$ac_tf1) 2>/dev/null
3482   (echo 2 >$ac_tf2) 2>/dev/null
3483   ac_val=`cat $ac_tf1 2>/dev/null`
3484   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3485     ac_cv_sys_long_file_names=no
3486     rm -rf $ac_xdir 2>/dev/null
3487     break
3488   fi
3489   rm -rf $ac_xdir 2>/dev/null
3490 done
3491 fi
3492 echo "$as_me:3492: result: $ac_cv_sys_long_file_names" >&5
3493 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3494 if test $ac_cv_sys_long_file_names = yes; then
3495
3496 cat >>confdefs.h <<\EOF
3497 #define HAVE_LONG_FILE_NAMES 1
3498 EOF
3499
3500 fi
3501
3502 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3503 # of package conflict.
3504 cf_config_suffix=
3505
3506 # Check whether --with-config-suffix or --without-config-suffix was given.
3507 if test "${with_config_suffix+set}" = set; then
3508   withval="$with_config_suffix"
3509   case "x$withval" in
3510         (xyes|xno)
3511                 { echo "$as_me:3511: WARNING: expected a value for config-suffix option" >&5
3512 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3513                 ;;
3514         (*)     cf_config_suffix="$withval"
3515                 ;;
3516         esac
3517 fi;
3518
3519 # If we find pkg-config, check if we should install the ".pc" files.
3520
3521 echo "$as_me:3521: checking if you want to use pkg-config" >&5
3522 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3523
3524 # Check whether --with-pkg-config or --without-pkg-config was given.
3525 if test "${with_pkg_config+set}" = set; then
3526   withval="$with_pkg_config"
3527   cf_pkg_config=$withval
3528 else
3529   cf_pkg_config=yes
3530 fi;
3531 echo "$as_me:3531: result: $cf_pkg_config" >&5
3532 echo "${ECHO_T}$cf_pkg_config" >&6
3533
3534 case $cf_pkg_config in
3535 (no)
3536         PKG_CONFIG=none
3537         ;;
3538 (yes)
3539
3540 if test -n "$ac_tool_prefix"; then
3541   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3542 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3543 echo "$as_me:3543: checking for $ac_word" >&5
3544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3545 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3546   echo $ECHO_N "(cached) $ECHO_C" >&6
3547 else
3548   case $PKG_CONFIG in
3549   [\\/]* | ?:[\\/]*)
3550   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3551   ;;
3552   *)
3553   ac_save_IFS=$IFS; IFS=$ac_path_separator
3554 ac_dummy="$PATH"
3555 for ac_dir in $ac_dummy; do
3556   IFS=$ac_save_IFS
3557   test -z "$ac_dir" && ac_dir=.
3558   if $as_executable_p "$ac_dir/$ac_word"; then
3559    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3560    echo "$as_me:3560: found $ac_dir/$ac_word" >&5
3561    break
3562 fi
3563 done
3564
3565   ;;
3566 esac
3567 fi
3568 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3569
3570 if test -n "$PKG_CONFIG"; then
3571   echo "$as_me:3571: result: $PKG_CONFIG" >&5
3572 echo "${ECHO_T}$PKG_CONFIG" >&6
3573 else
3574   echo "$as_me:3574: result: no" >&5
3575 echo "${ECHO_T}no" >&6
3576 fi
3577
3578 fi
3579 if test -z "$ac_cv_path_PKG_CONFIG"; then
3580   ac_pt_PKG_CONFIG=$PKG_CONFIG
3581   # Extract the first word of "pkg-config", so it can be a program name with args.
3582 set dummy pkg-config; ac_word=$2
3583 echo "$as_me:3583: checking for $ac_word" >&5
3584 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3585 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3586   echo $ECHO_N "(cached) $ECHO_C" >&6
3587 else
3588   case $ac_pt_PKG_CONFIG in
3589   [\\/]* | ?:[\\/]*)
3590   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3591   ;;
3592   *)
3593   ac_save_IFS=$IFS; IFS=$ac_path_separator
3594 ac_dummy="$PATH"
3595 for ac_dir in $ac_dummy; do
3596   IFS=$ac_save_IFS
3597   test -z "$ac_dir" && ac_dir=.
3598   if $as_executable_p "$ac_dir/$ac_word"; then
3599    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3600    echo "$as_me:3600: found $ac_dir/$ac_word" >&5
3601    break
3602 fi
3603 done
3604
3605   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3606   ;;
3607 esac
3608 fi
3609 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3610
3611 if test -n "$ac_pt_PKG_CONFIG"; then
3612   echo "$as_me:3612: result: $ac_pt_PKG_CONFIG" >&5
3613 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3614 else
3615   echo "$as_me:3615: result: no" >&5
3616 echo "${ECHO_T}no" >&6
3617 fi
3618
3619   PKG_CONFIG=$ac_pt_PKG_CONFIG
3620 else
3621   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3622 fi
3623
3624         ;;
3625 (*)
3626         PKG_CONFIG=$withval
3627         ;;
3628 esac
3629
3630 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3631 if test "$PKG_CONFIG" != none ; then
3632
3633 if test "x$prefix" != xNONE; then
3634         cf_path_syntax="$prefix"
3635 else
3636         cf_path_syntax="$ac_default_prefix"
3637 fi
3638
3639 case ".$PKG_CONFIG" in
3640 (.\$\(*\)*|.\'*\'*)
3641         ;;
3642 (..|./*|.\\*)
3643         ;;
3644 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3645         ;;
3646 (.\${*prefix}*|.\${*dir}*)
3647         eval PKG_CONFIG="$PKG_CONFIG"
3648         case ".$PKG_CONFIG" in
3649         (.NONE/*)
3650                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3651                 ;;
3652         esac
3653         ;;
3654 (.no|.NONE/*)
3655         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3656         ;;
3657 (*)
3658         { { echo "$as_me:3658: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3659 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3660    { (exit 1); exit 1; }; }
3661         ;;
3662 esac
3663
3664 elif test "x$cf_pkg_config" != xno ; then
3665         { echo "$as_me:3665: WARNING: pkg-config is not installed" >&5
3666 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3667 fi
3668
3669 case $PKG_CONFIG in
3670 (no|none|yes)
3671         echo "$as_me:3671: checking for pkg-config library directory" >&5
3672 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3673         ;;
3674 (*)
3675         echo "$as_me:3675: checking for $PKG_CONFIG library directory" >&5
3676 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3677         ;;
3678 esac
3679
3680 PKG_CONFIG_LIBDIR=no
3681
3682 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3683 if test "${with_pkg_config_libdir+set}" = set; then
3684   withval="$with_pkg_config_libdir"
3685   PKG_CONFIG_LIBDIR=$withval
3686 else
3687   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3688 fi;
3689
3690 case x$PKG_CONFIG_LIBDIR in
3691 (x/*)
3692         ;;
3693 (xyes)
3694         # Look for the library directory using the same prefix as the executable
3695         if test "x$PKG_CONFIG" = xnone
3696         then
3697                 cf_path=$prefix
3698         else
3699                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3700         fi
3701
3702         # If you don't like using the default architecture, you have to specify the
3703         # intended library directory and corresponding compiler/linker options.
3704         #
3705         # This case allows for Debian's 2014-flavor of multiarch, along with the
3706         # most common variations before that point.  Some other variants spell the
3707         # directory differently, e.g., "pkg-config", and put it in unusual places.
3708         # pkg-config has always been poorly standardized, which is ironic...
3709         case x`(arch) 2>/dev/null` in
3710         (*64)
3711                 cf_search_path="\
3712                         $cf_path/lib/*64-linux-gnu \
3713                         $cf_path/share \
3714                         $cf_path/lib64 \
3715                         $cf_path/lib32 \
3716                         $cf_path/lib"
3717                 ;;
3718         (*)
3719                 cf_search_path="\
3720                         $cf_path/lib/*-linux-gnu \
3721                         $cf_path/share \
3722                         $cf_path/lib32 \
3723                         $cf_path/lib \
3724                         $cf_path/libdata"
3725                 ;;
3726         esac
3727
3728         test -n "$verbose" && echo "    list..." 1>&6
3729
3730 echo "${as_me:-configure}:3730: testing list... ..." 1>&5
3731
3732         for cf_config in $cf_search_path
3733         do
3734                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3735
3736 echo "${as_me:-configure}:3736: testing checking $cf_config/pkgconfig ..." 1>&5
3737
3738                 if test -d $cf_config/pkgconfig
3739                 then
3740                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3741                         echo "$as_me:3741: checking done" >&5
3742 echo $ECHO_N "checking done... $ECHO_C" >&6
3743                         break
3744                 fi
3745         done
3746         ;;
3747 (*)
3748         ;;
3749 esac
3750
3751 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3752         echo "$as_me:3752: result: $PKG_CONFIG_LIBDIR" >&5
3753 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3754 fi
3755
3756 if test "x$PKG_CONFIG" != xnone
3757 then
3758         echo "$as_me:3758: checking if we should install .pc files for $PKG_CONFIG" >&5
3759 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3760 else
3761         echo "$as_me:3761: checking if we should install .pc files" >&5
3762 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3763 fi
3764
3765 # Check whether --enable-pc-files or --disable-pc-files was given.
3766 if test "${enable_pc_files+set}" = set; then
3767   enableval="$enable_pc_files"
3768   enable_pc_files=$enableval
3769 else
3770   enable_pc_files=no
3771 fi;
3772 echo "$as_me:3772: result: $enable_pc_files" >&5
3773 echo "${ECHO_T}$enable_pc_files" >&6
3774
3775 if test "x$enable_pc_files" != xno
3776 then
3777         MAKE_PC_FILES=
3778         case "x$PKG_CONFIG_LIBDIR" in
3779         (xno|xyes)
3780                 { echo "$as_me:3780: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3781 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3782                 ;;
3783         (*)
3784
3785 if test "x$prefix" != xNONE; then
3786         cf_path_syntax="$prefix"
3787 else
3788         cf_path_syntax="$ac_default_prefix"
3789 fi
3790
3791 case ".$PKG_CONFIG_LIBDIR" in
3792 (.\$\(*\)*|.\'*\'*)
3793         ;;
3794 (..|./*|.\\*)
3795         ;;
3796 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3797         ;;
3798 (.\${*prefix}*|.\${*dir}*)
3799         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3800         case ".$PKG_CONFIG_LIBDIR" in
3801         (.NONE/*)
3802                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3803                 ;;
3804         esac
3805         ;;
3806 (.no|.NONE/*)
3807         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3808         ;;
3809 (*)
3810         { { echo "$as_me:3810: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3811 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3812    { (exit 1); exit 1; }; }
3813         ;;
3814 esac
3815
3816                 ;;
3817         esac
3818 else
3819         MAKE_PC_FILES="#"
3820 fi
3821
3822 if test -z "$MAKE_PC_FILES"
3823 then
3824         echo "$as_me:3824: checking for suffix to add to pc-files" >&5
3825 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3826
3827 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3828 if test "${with_pc_suffix+set}" = set; then
3829   withval="$with_pc_suffix"
3830   case "x$withval" in
3831         (xyes|xno)
3832                 PC_MODULE_SUFFIX=
3833                 ;;
3834         (*)     PC_MODULE_SUFFIX="$withval"
3835                 ;;
3836         esac
3837 fi;
3838         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3839         echo "$as_me:3839: result: $PC_MODULE_SUFFIX" >&5
3840 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3841         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3842
3843 fi
3844
3845 echo "$as_me:3845: checking if we should assume mixed-case filenames" >&5
3846 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3847
3848 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3849 if test "${enable_mixed_case+set}" = set; then
3850   enableval="$enable_mixed_case"
3851   enable_mixedcase=$enableval
3852 else
3853   enable_mixedcase=auto
3854 fi;
3855 echo "$as_me:3855: result: $enable_mixedcase" >&5
3856 echo "${ECHO_T}$enable_mixedcase" >&6
3857 if test "$enable_mixedcase" = "auto" ; then
3858
3859 echo "$as_me:3859: checking if filesystem supports mixed-case filenames" >&5
3860 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3861 if test "${cf_cv_mixedcase+set}" = set; then
3862   echo $ECHO_N "(cached) $ECHO_C" >&6
3863 else
3864
3865 if test "$cross_compiling" = yes ; then
3866         case $target_alias in
3867         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3868                 cf_cv_mixedcase=no
3869                 ;;
3870         (*)
3871                 cf_cv_mixedcase=yes
3872                 ;;
3873         esac
3874 else
3875         rm -f conftest CONFTEST
3876         echo test >conftest
3877         if test -f CONFTEST ; then
3878                 cf_cv_mixedcase=no
3879         else
3880                 cf_cv_mixedcase=yes
3881         fi
3882         rm -f conftest CONFTEST
3883 fi
3884
3885 fi
3886 echo "$as_me:3886: result: $cf_cv_mixedcase" >&5
3887 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3888 test "$cf_cv_mixedcase" = yes &&
3889 cat >>confdefs.h <<\EOF
3890 #define MIXEDCASE_FILENAMES 1
3891 EOF
3892
3893 else
3894         cf_cv_mixedcase=$enable_mixedcase
3895         if test "x$enable_mixedcase" = "xyes" ; then
3896
3897 cat >>confdefs.h <<\EOF
3898 #define MIXEDCASE_FILENAMES 1
3899 EOF
3900
3901         fi
3902 fi
3903
3904 # do this after mixed-case option (tags/TAGS is not as important as tic).
3905 echo "$as_me:3905: checking whether ${MAKE-make} sets \${MAKE}" >&5
3906 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3907 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3908 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3909   echo $ECHO_N "(cached) $ECHO_C" >&6
3910 else
3911   cat >conftest.make <<\EOF
3912 all:
3913         @echo 'ac_maketemp="${MAKE}"'
3914 EOF
3915 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3916 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3917 if test -n "$ac_maketemp"; then
3918   eval ac_cv_prog_make_${ac_make}_set=yes
3919 else
3920   eval ac_cv_prog_make_${ac_make}_set=no
3921 fi
3922 rm -f conftest.make
3923 fi
3924 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3925   echo "$as_me:3925: result: yes" >&5
3926 echo "${ECHO_T}yes" >&6
3927   SET_MAKE=
3928 else
3929   echo "$as_me:3929: result: no" >&5
3930 echo "${ECHO_T}no" >&6
3931   SET_MAKE="MAKE=${MAKE-make}"
3932 fi
3933
3934 for ac_prog in exctags ctags
3935 do
3936   # Extract the first word of "$ac_prog", so it can be a program name with args.
3937 set dummy $ac_prog; ac_word=$2
3938 echo "$as_me:3938: checking for $ac_word" >&5
3939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3940 if test "${ac_cv_prog_CTAGS+set}" = set; then
3941   echo $ECHO_N "(cached) $ECHO_C" >&6
3942 else
3943   if test -n "$CTAGS"; then
3944   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3945 else
3946   ac_save_IFS=$IFS; IFS=$ac_path_separator
3947 ac_dummy="$PATH"
3948 for ac_dir in $ac_dummy; do
3949   IFS=$ac_save_IFS
3950   test -z "$ac_dir" && ac_dir=.
3951   $as_executable_p "$ac_dir/$ac_word" || continue
3952 ac_cv_prog_CTAGS="$ac_prog"
3953 echo "$as_me:3953: found $ac_dir/$ac_word" >&5
3954 break
3955 done
3956
3957 fi
3958 fi
3959 CTAGS=$ac_cv_prog_CTAGS
3960 if test -n "$CTAGS"; then
3961   echo "$as_me:3961: result: $CTAGS" >&5
3962 echo "${ECHO_T}$CTAGS" >&6
3963 else
3964   echo "$as_me:3964: result: no" >&5
3965 echo "${ECHO_T}no" >&6
3966 fi
3967
3968   test -n "$CTAGS" && break
3969 done
3970
3971 for ac_prog in exetags etags
3972 do
3973   # Extract the first word of "$ac_prog", so it can be a program name with args.
3974 set dummy $ac_prog; ac_word=$2
3975 echo "$as_me:3975: checking for $ac_word" >&5
3976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3977 if test "${ac_cv_prog_ETAGS+set}" = set; then
3978   echo $ECHO_N "(cached) $ECHO_C" >&6
3979 else
3980   if test -n "$ETAGS"; then
3981   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3982 else
3983   ac_save_IFS=$IFS; IFS=$ac_path_separator
3984 ac_dummy="$PATH"
3985 for ac_dir in $ac_dummy; do
3986   IFS=$ac_save_IFS
3987   test -z "$ac_dir" && ac_dir=.
3988   $as_executable_p "$ac_dir/$ac_word" || continue
3989 ac_cv_prog_ETAGS="$ac_prog"
3990 echo "$as_me:3990: found $ac_dir/$ac_word" >&5
3991 break
3992 done
3993
3994 fi
3995 fi
3996 ETAGS=$ac_cv_prog_ETAGS
3997 if test -n "$ETAGS"; then
3998   echo "$as_me:3998: result: $ETAGS" >&5
3999 echo "${ECHO_T}$ETAGS" >&6
4000 else
4001   echo "$as_me:4001: result: no" >&5
4002 echo "${ECHO_T}no" >&6
4003 fi
4004
4005   test -n "$ETAGS" && break
4006 done
4007
4008 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4009 set dummy ${CTAGS:-ctags}; ac_word=$2
4010 echo "$as_me:4010: checking for $ac_word" >&5
4011 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4012 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4013   echo $ECHO_N "(cached) $ECHO_C" >&6
4014 else
4015   if test -n "$MAKE_LOWER_TAGS"; then
4016   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4017 else
4018   ac_save_IFS=$IFS; IFS=$ac_path_separator
4019 ac_dummy="$PATH"
4020 for ac_dir in $ac_dummy; do
4021   IFS=$ac_save_IFS
4022   test -z "$ac_dir" && ac_dir=.
4023   $as_executable_p "$ac_dir/$ac_word" || continue
4024 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4025 echo "$as_me:4025: found $ac_dir/$ac_word" >&5
4026 break
4027 done
4028
4029   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4030 fi
4031 fi
4032 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4033 if test -n "$MAKE_LOWER_TAGS"; then
4034   echo "$as_me:4034: result: $MAKE_LOWER_TAGS" >&5
4035 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4036 else
4037   echo "$as_me:4037: result: no" >&5
4038 echo "${ECHO_T}no" >&6
4039 fi
4040
4041 if test "$cf_cv_mixedcase" = yes ; then
4042         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4043 set dummy ${ETAGS:-etags}; ac_word=$2
4044 echo "$as_me:4044: checking for $ac_word" >&5
4045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4046 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4047   echo $ECHO_N "(cached) $ECHO_C" >&6
4048 else
4049   if test -n "$MAKE_UPPER_TAGS"; then
4050   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4051 else
4052   ac_save_IFS=$IFS; IFS=$ac_path_separator
4053 ac_dummy="$PATH"
4054 for ac_dir in $ac_dummy; do
4055   IFS=$ac_save_IFS
4056   test -z "$ac_dir" && ac_dir=.
4057   $as_executable_p "$ac_dir/$ac_word" || continue
4058 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4059 echo "$as_me:4059: found $ac_dir/$ac_word" >&5
4060 break
4061 done
4062
4063   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4064 fi
4065 fi
4066 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4067 if test -n "$MAKE_UPPER_TAGS"; then
4068   echo "$as_me:4068: result: $MAKE_UPPER_TAGS" >&5
4069 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4070 else
4071   echo "$as_me:4071: result: no" >&5
4072 echo "${ECHO_T}no" >&6
4073 fi
4074
4075 else
4076         MAKE_UPPER_TAGS=no
4077 fi
4078
4079 if test "$MAKE_UPPER_TAGS" = yes ; then
4080         MAKE_UPPER_TAGS=
4081 else
4082         MAKE_UPPER_TAGS="#"
4083 fi
4084
4085 if test "$MAKE_LOWER_TAGS" = yes ; then
4086         MAKE_LOWER_TAGS=
4087 else
4088         MAKE_LOWER_TAGS="#"
4089 fi
4090
4091 echo "$as_me:4091: checking for makeflags variable" >&5
4092 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4093 if test "${cf_cv_makeflags+set}" = set; then
4094   echo $ECHO_N "(cached) $ECHO_C" >&6
4095 else
4096
4097         cf_cv_makeflags=''
4098         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4099         do
4100                 cat >cf_makeflags.tmp <<CF_EOF
4101 SHELL = $SHELL
4102 all :
4103         @ echo '.$cf_option'
4104 CF_EOF
4105                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4106                 case "$cf_result" in
4107                 (.*k|.*kw)
4108                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4109                         case "$cf_result" in
4110                         (.*CC=*)        cf_cv_makeflags=
4111                                 ;;
4112                         (*)     cf_cv_makeflags=$cf_option
4113                                 ;;
4114                         esac
4115                         break
4116                         ;;
4117                 (.-)    ;;
4118                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4119                         ;;
4120                 esac
4121         done
4122         rm -f cf_makeflags.tmp
4123
4124 fi
4125 echo "$as_me:4125: result: $cf_cv_makeflags" >&5
4126 echo "${ECHO_T}$cf_cv_makeflags" >&6
4127
4128 if test -n "$ac_tool_prefix"; then
4129   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4130 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4131 echo "$as_me:4131: checking for $ac_word" >&5
4132 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4133 if test "${ac_cv_prog_RANLIB+set}" = set; then
4134   echo $ECHO_N "(cached) $ECHO_C" >&6
4135 else
4136   if test -n "$RANLIB"; then
4137   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4138 else
4139   ac_save_IFS=$IFS; IFS=$ac_path_separator
4140 ac_dummy="$PATH"
4141 for ac_dir in $ac_dummy; do
4142   IFS=$ac_save_IFS
4143   test -z "$ac_dir" && ac_dir=.
4144   $as_executable_p "$ac_dir/$ac_word" || continue
4145 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4146 echo "$as_me:4146: found $ac_dir/$ac_word" >&5
4147 break
4148 done
4149
4150 fi
4151 fi
4152 RANLIB=$ac_cv_prog_RANLIB
4153 if test -n "$RANLIB"; then
4154   echo "$as_me:4154: result: $RANLIB" >&5
4155 echo "${ECHO_T}$RANLIB" >&6
4156 else
4157   echo "$as_me:4157: result: no" >&5
4158 echo "${ECHO_T}no" >&6
4159 fi
4160
4161 fi
4162 if test -z "$ac_cv_prog_RANLIB"; then
4163   ac_ct_RANLIB=$RANLIB
4164   # Extract the first word of "ranlib", so it can be a program name with args.
4165 set dummy ranlib; ac_word=$2
4166 echo "$as_me:4166: checking for $ac_word" >&5
4167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4168 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4169   echo $ECHO_N "(cached) $ECHO_C" >&6
4170 else
4171   if test -n "$ac_ct_RANLIB"; then
4172   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4173 else
4174   ac_save_IFS=$IFS; IFS=$ac_path_separator
4175 ac_dummy="$PATH"
4176 for ac_dir in $ac_dummy; do
4177   IFS=$ac_save_IFS
4178   test -z "$ac_dir" && ac_dir=.
4179   $as_executable_p "$ac_dir/$ac_word" || continue
4180 ac_cv_prog_ac_ct_RANLIB="ranlib"
4181 echo "$as_me:4181: found $ac_dir/$ac_word" >&5
4182 break
4183 done
4184
4185   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4186 fi
4187 fi
4188 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4189 if test -n "$ac_ct_RANLIB"; then
4190   echo "$as_me:4190: result: $ac_ct_RANLIB" >&5
4191 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4192 else
4193   echo "$as_me:4193: result: no" >&5
4194 echo "${ECHO_T}no" >&6
4195 fi
4196
4197   RANLIB=$ac_ct_RANLIB
4198 else
4199   RANLIB="$ac_cv_prog_RANLIB"
4200 fi
4201
4202 if test -n "$ac_tool_prefix"; then
4203   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4204 set dummy ${ac_tool_prefix}ld; ac_word=$2
4205 echo "$as_me:4205: checking for $ac_word" >&5
4206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4207 if test "${ac_cv_prog_LD+set}" = set; then
4208   echo $ECHO_N "(cached) $ECHO_C" >&6
4209 else
4210   if test -n "$LD"; then
4211   ac_cv_prog_LD="$LD" # Let the user override the test.
4212 else
4213   ac_save_IFS=$IFS; IFS=$ac_path_separator
4214 ac_dummy="$PATH"
4215 for ac_dir in $ac_dummy; do
4216   IFS=$ac_save_IFS
4217   test -z "$ac_dir" && ac_dir=.
4218   $as_executable_p "$ac_dir/$ac_word" || continue
4219 ac_cv_prog_LD="${ac_tool_prefix}ld"
4220 echo "$as_me:4220: found $ac_dir/$ac_word" >&5
4221 break
4222 done
4223
4224 fi
4225 fi
4226 LD=$ac_cv_prog_LD
4227 if test -n "$LD"; then
4228   echo "$as_me:4228: result: $LD" >&5
4229 echo "${ECHO_T}$LD" >&6
4230 else
4231   echo "$as_me:4231: result: no" >&5
4232 echo "${ECHO_T}no" >&6
4233 fi
4234
4235 fi
4236 if test -z "$ac_cv_prog_LD"; then
4237   ac_ct_LD=$LD
4238   # Extract the first word of "ld", so it can be a program name with args.
4239 set dummy ld; ac_word=$2
4240 echo "$as_me:4240: checking for $ac_word" >&5
4241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4242 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4243   echo $ECHO_N "(cached) $ECHO_C" >&6
4244 else
4245   if test -n "$ac_ct_LD"; then
4246   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4247 else
4248   ac_save_IFS=$IFS; IFS=$ac_path_separator
4249 ac_dummy="$PATH"
4250 for ac_dir in $ac_dummy; do
4251   IFS=$ac_save_IFS
4252   test -z "$ac_dir" && ac_dir=.
4253   $as_executable_p "$ac_dir/$ac_word" || continue
4254 ac_cv_prog_ac_ct_LD="ld"
4255 echo "$as_me:4255: found $ac_dir/$ac_word" >&5
4256 break
4257 done
4258
4259   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4260 fi
4261 fi
4262 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4263 if test -n "$ac_ct_LD"; then
4264   echo "$as_me:4264: result: $ac_ct_LD" >&5
4265 echo "${ECHO_T}$ac_ct_LD" >&6
4266 else
4267   echo "$as_me:4267: result: no" >&5
4268 echo "${ECHO_T}no" >&6
4269 fi
4270
4271   LD=$ac_ct_LD
4272 else
4273   LD="$ac_cv_prog_LD"
4274 fi
4275
4276 if test -n "$ac_tool_prefix"; then
4277   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4278 set dummy ${ac_tool_prefix}ar; ac_word=$2
4279 echo "$as_me:4279: checking for $ac_word" >&5
4280 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4281 if test "${ac_cv_prog_AR+set}" = set; then
4282   echo $ECHO_N "(cached) $ECHO_C" >&6
4283 else
4284   if test -n "$AR"; then
4285   ac_cv_prog_AR="$AR" # Let the user override the test.
4286 else
4287   ac_save_IFS=$IFS; IFS=$ac_path_separator
4288 ac_dummy="$PATH"
4289 for ac_dir in $ac_dummy; do
4290   IFS=$ac_save_IFS
4291   test -z "$ac_dir" && ac_dir=.
4292   $as_executable_p "$ac_dir/$ac_word" || continue
4293 ac_cv_prog_AR="${ac_tool_prefix}ar"
4294 echo "$as_me:4294: found $ac_dir/$ac_word" >&5
4295 break
4296 done
4297
4298 fi
4299 fi
4300 AR=$ac_cv_prog_AR
4301 if test -n "$AR"; then
4302   echo "$as_me:4302: result: $AR" >&5
4303 echo "${ECHO_T}$AR" >&6
4304 else
4305   echo "$as_me:4305: result: no" >&5
4306 echo "${ECHO_T}no" >&6
4307 fi
4308
4309 fi
4310 if test -z "$ac_cv_prog_AR"; then
4311   ac_ct_AR=$AR
4312   # Extract the first word of "ar", so it can be a program name with args.
4313 set dummy ar; ac_word=$2
4314 echo "$as_me:4314: checking for $ac_word" >&5
4315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4316 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4317   echo $ECHO_N "(cached) $ECHO_C" >&6
4318 else
4319   if test -n "$ac_ct_AR"; then
4320   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4321 else
4322   ac_save_IFS=$IFS; IFS=$ac_path_separator
4323 ac_dummy="$PATH"
4324 for ac_dir in $ac_dummy; do
4325   IFS=$ac_save_IFS
4326   test -z "$ac_dir" && ac_dir=.
4327   $as_executable_p "$ac_dir/$ac_word" || continue
4328 ac_cv_prog_ac_ct_AR="ar"
4329 echo "$as_me:4329: found $ac_dir/$ac_word" >&5
4330 break
4331 done
4332
4333   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4334 fi
4335 fi
4336 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4337 if test -n "$ac_ct_AR"; then
4338   echo "$as_me:4338: result: $ac_ct_AR" >&5
4339 echo "${ECHO_T}$ac_ct_AR" >&6
4340 else
4341   echo "$as_me:4341: result: no" >&5
4342 echo "${ECHO_T}no" >&6
4343 fi
4344
4345   AR=$ac_ct_AR
4346 else
4347   AR="$ac_cv_prog_AR"
4348 fi
4349
4350 if test -n "$ac_tool_prefix"; then
4351   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4352 set dummy ${ac_tool_prefix}nm; ac_word=$2
4353 echo "$as_me:4353: checking for $ac_word" >&5
4354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4355 if test "${ac_cv_prog_NM+set}" = set; then
4356   echo $ECHO_N "(cached) $ECHO_C" >&6
4357 else
4358   if test -n "$NM"; then
4359   ac_cv_prog_NM="$NM" # Let the user override the test.
4360 else
4361   ac_save_IFS=$IFS; IFS=$ac_path_separator
4362 ac_dummy="$PATH"
4363 for ac_dir in $ac_dummy; do
4364   IFS=$ac_save_IFS
4365   test -z "$ac_dir" && ac_dir=.
4366   $as_executable_p "$ac_dir/$ac_word" || continue
4367 ac_cv_prog_NM="${ac_tool_prefix}nm"
4368 echo "$as_me:4368: found $ac_dir/$ac_word" >&5
4369 break
4370 done
4371
4372 fi
4373 fi
4374 NM=$ac_cv_prog_NM
4375 if test -n "$NM"; then
4376   echo "$as_me:4376: result: $NM" >&5
4377 echo "${ECHO_T}$NM" >&6
4378 else
4379   echo "$as_me:4379: result: no" >&5
4380 echo "${ECHO_T}no" >&6
4381 fi
4382
4383 fi
4384 if test -z "$ac_cv_prog_NM"; then
4385   ac_ct_NM=$NM
4386   # Extract the first word of "nm", so it can be a program name with args.
4387 set dummy nm; ac_word=$2
4388 echo "$as_me:4388: checking for $ac_word" >&5
4389 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4390 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4391   echo $ECHO_N "(cached) $ECHO_C" >&6
4392 else
4393   if test -n "$ac_ct_NM"; then
4394   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4395 else
4396   ac_save_IFS=$IFS; IFS=$ac_path_separator
4397 ac_dummy="$PATH"
4398 for ac_dir in $ac_dummy; do
4399   IFS=$ac_save_IFS
4400   test -z "$ac_dir" && ac_dir=.
4401   $as_executable_p "$ac_dir/$ac_word" || continue
4402 ac_cv_prog_ac_ct_NM="nm"
4403 echo "$as_me:4403: found $ac_dir/$ac_word" >&5
4404 break
4405 done
4406
4407   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4408 fi
4409 fi
4410 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4411 if test -n "$ac_ct_NM"; then
4412   echo "$as_me:4412: result: $ac_ct_NM" >&5
4413 echo "${ECHO_T}$ac_ct_NM" >&6
4414 else
4415   echo "$as_me:4415: result: no" >&5
4416 echo "${ECHO_T}no" >&6
4417 fi
4418
4419   NM=$ac_ct_NM
4420 else
4421   NM="$ac_cv_prog_NM"
4422 fi
4423
4424 if test -n "$ac_tool_prefix"; then
4425   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4426 set dummy ${ac_tool_prefix}ar; ac_word=$2
4427 echo "$as_me:4427: checking for $ac_word" >&5
4428 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4429 if test "${ac_cv_prog_AR+set}" = set; then
4430   echo $ECHO_N "(cached) $ECHO_C" >&6
4431 else
4432   if test -n "$AR"; then
4433   ac_cv_prog_AR="$AR" # Let the user override the test.
4434 else
4435   ac_save_IFS=$IFS; IFS=$ac_path_separator
4436 ac_dummy="$PATH"
4437 for ac_dir in $ac_dummy; do
4438   IFS=$ac_save_IFS
4439   test -z "$ac_dir" && ac_dir=.
4440   $as_executable_p "$ac_dir/$ac_word" || continue
4441 ac_cv_prog_AR="${ac_tool_prefix}ar"
4442 echo "$as_me:4442: found $ac_dir/$ac_word" >&5
4443 break
4444 done
4445
4446 fi
4447 fi
4448 AR=$ac_cv_prog_AR
4449 if test -n "$AR"; then
4450   echo "$as_me:4450: result: $AR" >&5
4451 echo "${ECHO_T}$AR" >&6
4452 else
4453   echo "$as_me:4453: result: no" >&5
4454 echo "${ECHO_T}no" >&6
4455 fi
4456
4457 fi
4458 if test -z "$ac_cv_prog_AR"; then
4459   ac_ct_AR=$AR
4460   # Extract the first word of "ar", so it can be a program name with args.
4461 set dummy ar; ac_word=$2
4462 echo "$as_me:4462: checking for $ac_word" >&5
4463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4464 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4465   echo $ECHO_N "(cached) $ECHO_C" >&6
4466 else
4467   if test -n "$ac_ct_AR"; then
4468   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4469 else
4470   ac_save_IFS=$IFS; IFS=$ac_path_separator
4471 ac_dummy="$PATH"
4472 for ac_dir in $ac_dummy; do
4473   IFS=$ac_save_IFS
4474   test -z "$ac_dir" && ac_dir=.
4475   $as_executable_p "$ac_dir/$ac_word" || continue
4476 ac_cv_prog_ac_ct_AR="ar"
4477 echo "$as_me:4477: found $ac_dir/$ac_word" >&5
4478 break
4479 done
4480
4481   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4482 fi
4483 fi
4484 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4485 if test -n "$ac_ct_AR"; then
4486   echo "$as_me:4486: result: $ac_ct_AR" >&5
4487 echo "${ECHO_T}$ac_ct_AR" >&6
4488 else
4489   echo "$as_me:4489: result: no" >&5
4490 echo "${ECHO_T}no" >&6
4491 fi
4492
4493   AR=$ac_ct_AR
4494 else
4495   AR="$ac_cv_prog_AR"
4496 fi
4497
4498 echo "$as_me:4498: checking for options to update archives" >&5
4499 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4500 if test "${cf_cv_ar_flags+set}" = set; then
4501   echo $ECHO_N "(cached) $ECHO_C" >&6
4502 else
4503
4504         cf_cv_ar_flags=unknown
4505         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4506         do
4507
4508                 # check if $ARFLAGS already contains this choice
4509                 if test "x$ARFLAGS" != "x" ; then
4510                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4511                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4512                                 cf_cv_ar_flags=
4513                                 break
4514                         fi
4515                 fi
4516
4517                 rm -f conftest.$ac_cv_objext
4518                 rm -f conftest.a
4519
4520                 cat >conftest.$ac_ext <<EOF
4521 #line 4521 "configure"
4522 int     testdata[3] = { 123, 456, 789 };
4523 EOF
4524                 if { (eval echo "$as_me:4524: \"$ac_compile\"") >&5
4525   (eval $ac_compile) 2>&5
4526   ac_status=$?
4527   echo "$as_me:4527: \$? = $ac_status" >&5
4528   (exit $ac_status); } ; then
4529                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4530                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4531                         if test -f conftest.a ; then
4532                                 cf_cv_ar_flags=$cf_ar_flags
4533                                 break
4534                         fi
4535                 else
4536                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4537
4538 echo "${as_me:-configure}:4538: testing cannot compile test-program ..." 1>&5
4539
4540                         break
4541                 fi
4542         done
4543         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4544
4545 fi
4546 echo "$as_me:4546: result: $cf_cv_ar_flags" >&5
4547 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4548
4549 if test -n "$ARFLAGS" ; then
4550         if test -n "$cf_cv_ar_flags" ; then
4551                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4552         fi
4553 else
4554         ARFLAGS=$cf_cv_ar_flags
4555 fi
4556
4557 echo "$as_me:4557: checking if you have specified an install-prefix" >&5
4558 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4559
4560 # Check whether --with-install-prefix or --without-install-prefix was given.
4561 if test "${with_install_prefix+set}" = set; then
4562   withval="$with_install_prefix"
4563   case "x$withval" in
4564         (xyes|xno)
4565                 ;;
4566         (*)     DESTDIR="$withval"
4567                 ;;
4568         esac
4569 fi;
4570 echo "$as_me:4570: result: $DESTDIR" >&5
4571 echo "${ECHO_T}$DESTDIR" >&6
4572
4573 ###############################################################################
4574
4575 # If we're cross-compiling, allow the user to override the tools and their
4576 # options.  The configure script is oriented toward identifying the host
4577 # compiler, etc., but we need a build compiler to generate parts of the source.
4578
4579 if test "$cross_compiling" = yes ; then
4580
4581         # defaults that we might want to override
4582         : ${BUILD_CFLAGS:=''}
4583         : ${BUILD_CPPFLAGS:=''}
4584         : ${BUILD_LDFLAGS:=''}
4585         : ${BUILD_LIBS:=''}
4586         : ${BUILD_EXEEXT:='$x'}
4587         : ${BUILD_OBJEXT:='o'}
4588
4589 # Check whether --with-build-cc or --without-build-cc was given.
4590 if test "${with_build_cc+set}" = set; then
4591   withval="$with_build_cc"
4592   BUILD_CC="$withval"
4593 else
4594   for ac_prog in gcc cc cl
4595 do
4596   # Extract the first word of "$ac_prog", so it can be a program name with args.
4597 set dummy $ac_prog; ac_word=$2
4598 echo "$as_me:4598: checking for $ac_word" >&5
4599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4600 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4601   echo $ECHO_N "(cached) $ECHO_C" >&6
4602 else
4603   if test -n "$BUILD_CC"; then
4604   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4605 else
4606   ac_save_IFS=$IFS; IFS=$ac_path_separator
4607 ac_dummy="$PATH"
4608 for ac_dir in $ac_dummy; do
4609   IFS=$ac_save_IFS
4610   test -z "$ac_dir" && ac_dir=.
4611   $as_executable_p "$ac_dir/$ac_word" || continue
4612 ac_cv_prog_BUILD_CC="$ac_prog"
4613 echo "$as_me:4613: found $ac_dir/$ac_word" >&5
4614 break
4615 done
4616
4617 fi
4618 fi
4619 BUILD_CC=$ac_cv_prog_BUILD_CC
4620 if test -n "$BUILD_CC"; then
4621   echo "$as_me:4621: result: $BUILD_CC" >&5
4622 echo "${ECHO_T}$BUILD_CC" >&6
4623 else
4624   echo "$as_me:4624: result: no" >&5
4625 echo "${ECHO_T}no" >&6
4626 fi
4627
4628   test -n "$BUILD_CC" && break
4629 done
4630
4631 fi;
4632         echo "$as_me:4632: checking for native build C compiler" >&5
4633 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4634         echo "$as_me:4634: result: $BUILD_CC" >&5
4635 echo "${ECHO_T}$BUILD_CC" >&6
4636
4637         echo "$as_me:4637: checking for native build C preprocessor" >&5
4638 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4639
4640 # Check whether --with-build-cpp or --without-build-cpp was given.
4641 if test "${with_build_cpp+set}" = set; then
4642   withval="$with_build_cpp"
4643   BUILD_CPP="$withval"
4644 else
4645   BUILD_CPP='${BUILD_CC} -E'
4646 fi;
4647         echo "$as_me:4647: result: $BUILD_CPP" >&5
4648 echo "${ECHO_T}$BUILD_CPP" >&6
4649
4650         echo "$as_me:4650: checking for native build C flags" >&5
4651 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4652
4653 # Check whether --with-build-cflags or --without-build-cflags was given.
4654 if test "${with_build_cflags+set}" = set; then
4655   withval="$with_build_cflags"
4656   BUILD_CFLAGS="$withval"
4657 fi;
4658         echo "$as_me:4658: result: $BUILD_CFLAGS" >&5
4659 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4660
4661         echo "$as_me:4661: checking for native build C preprocessor-flags" >&5
4662 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4663
4664 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4665 if test "${with_build_cppflags+set}" = set; then
4666   withval="$with_build_cppflags"
4667   BUILD_CPPFLAGS="$withval"
4668 fi;
4669         echo "$as_me:4669: result: $BUILD_CPPFLAGS" >&5
4670 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4671
4672         echo "$as_me:4672: checking for native build linker-flags" >&5
4673 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4674
4675 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4676 if test "${with_build_ldflags+set}" = set; then
4677   withval="$with_build_ldflags"
4678   BUILD_LDFLAGS="$withval"
4679 fi;
4680         echo "$as_me:4680: result: $BUILD_LDFLAGS" >&5
4681 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4682
4683         echo "$as_me:4683: checking for native build linker-libraries" >&5
4684 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4685
4686 # Check whether --with-build-libs or --without-build-libs was given.
4687 if test "${with_build_libs+set}" = set; then
4688   withval="$with_build_libs"
4689   BUILD_LIBS="$withval"
4690 fi;
4691         echo "$as_me:4691: result: $BUILD_LIBS" >&5
4692 echo "${ECHO_T}$BUILD_LIBS" >&6
4693
4694         # this assumes we're on Unix.
4695         BUILD_EXEEXT=
4696         BUILD_OBJEXT=o
4697
4698         : ${BUILD_CC:='${CC}'}
4699
4700         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4701                 { { echo "$as_me:4701: error: Cross-build requires two compilers.
4702 Use --with-build-cc to specify the native compiler." >&5
4703 echo "$as_me: error: Cross-build requires two compilers.
4704 Use --with-build-cc to specify the native compiler." >&2;}
4705    { (exit 1); exit 1; }; }
4706         fi
4707
4708 else
4709         : ${BUILD_CC:='${CC}'}
4710         : ${BUILD_CPP:='${CPP}'}
4711         : ${BUILD_CFLAGS:='${CFLAGS}'}
4712         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4713         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4714         : ${BUILD_LIBS:='${LIBS}'}
4715         : ${BUILD_EXEEXT:='$x'}
4716         : ${BUILD_OBJEXT:='o'}
4717 fi
4718
4719 ###############################################################################
4720
4721 ### Options to allow the user to specify the set of libraries which are used.
4722 ### Use "--without-normal --with-shared" to allow the default model to be
4723 ### shared, for example.
4724 cf_list_models=""
4725
4726 echo "$as_me:4726: checking if libtool -version-number should be used" >&5
4727 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4728
4729 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4730 if test "${enable_libtool_version+set}" = set; then
4731   enableval="$enable_libtool_version"
4732   test "$enableval" != no && enableval=yes
4733         if test "$enableval" != "yes" ; then
4734     cf_libtool_version=no
4735         else
4736                 cf_libtool_version=yes
4737         fi
4738 else
4739   enableval=yes
4740         cf_libtool_version=yes
4741
4742 fi;
4743 echo "$as_me:4743: result: $cf_libtool_version" >&5
4744 echo "${ECHO_T}$cf_libtool_version" >&6
4745
4746 if test "$cf_libtool_version" = yes ; then
4747         LIBTOOL_VERSION="-version-number"
4748 else
4749         LIBTOOL_VERSION="-version-info"
4750         case "x$VERSION" in
4751         (x)
4752                 { echo "$as_me:4752: WARNING: VERSION was not set" >&5
4753 echo "$as_me: WARNING: VERSION was not set" >&2;}
4754                 ;;
4755         (x*.*.*)
4756                 ABI_VERSION="$VERSION"
4757                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4758
4759 echo "${as_me:-configure}:4759: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4760
4761                 ;;
4762         (x*:*:*)
4763                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4764                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4765
4766 echo "${as_me:-configure}:4766: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4767
4768                 ;;
4769         (*)
4770                 { echo "$as_me:4770: WARNING: unexpected VERSION value: $VERSION" >&5
4771 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4772                 ;;
4773         esac
4774 fi
4775
4776 LIBTOOL=
4777
4778 # common library maintenance symbols that are convenient for libtool scripts:
4779 LIB_CREATE='${AR} -cr'
4780 LIB_OBJECT='${OBJECTS}'
4781 LIB_SUFFIX=.a
4782 LIB_PREP="$RANLIB"
4783
4784 # symbols used to prop libtool up to enable it to determine what it should be
4785 # doing:
4786 LIB_CLEAN=
4787 LIB_COMPILE=
4788 LIB_LINK='${CC}'
4789 LIB_INSTALL=
4790 LIB_UNINSTALL=
4791
4792 echo "$as_me:4792: checking if you want to build libraries with libtool" >&5
4793 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4794
4795 # Check whether --with-libtool or --without-libtool was given.
4796 if test "${with_libtool+set}" = set; then
4797   withval="$with_libtool"
4798   with_libtool=$withval
4799 else
4800   with_libtool=no
4801 fi;
4802 echo "$as_me:4802: result: $with_libtool" >&5
4803 echo "${ECHO_T}$with_libtool" >&6
4804 if test "$with_libtool" != "no"; then
4805
4806         if test "$with_libtool" != "yes" ; then
4807
4808 if test "x$prefix" != xNONE; then
4809         cf_path_syntax="$prefix"
4810 else
4811         cf_path_syntax="$ac_default_prefix"
4812 fi
4813
4814 case ".$with_libtool" in
4815 (.\$\(*\)*|.\'*\'*)
4816         ;;
4817 (..|./*|.\\*)
4818         ;;
4819 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4820         ;;
4821 (.\${*prefix}*|.\${*dir}*)
4822         eval with_libtool="$with_libtool"
4823         case ".$with_libtool" in
4824         (.NONE/*)
4825                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4826                 ;;
4827         esac
4828         ;;
4829 (.no|.NONE/*)
4830         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4831         ;;
4832 (*)
4833         { { echo "$as_me:4833: error: expected a pathname, not \"$with_libtool\"" >&5
4834 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4835    { (exit 1); exit 1; }; }
4836         ;;
4837 esac
4838
4839                 LIBTOOL=$with_libtool
4840         else
4841                 if test -n "$ac_tool_prefix"; then
4842   for ac_prog in libtool glibtool
4843   do
4844     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4845 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4846 echo "$as_me:4846: checking for $ac_word" >&5
4847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4848 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4849   echo $ECHO_N "(cached) $ECHO_C" >&6
4850 else
4851   if test -n "$LIBTOOL"; then
4852   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4853 else
4854   ac_save_IFS=$IFS; IFS=$ac_path_separator
4855 ac_dummy="$PATH"
4856 for ac_dir in $ac_dummy; do
4857   IFS=$ac_save_IFS
4858   test -z "$ac_dir" && ac_dir=.
4859   $as_executable_p "$ac_dir/$ac_word" || continue
4860 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4861 echo "$as_me:4861: found $ac_dir/$ac_word" >&5
4862 break
4863 done
4864
4865 fi
4866 fi
4867 LIBTOOL=$ac_cv_prog_LIBTOOL
4868 if test -n "$LIBTOOL"; then
4869   echo "$as_me:4869: result: $LIBTOOL" >&5
4870 echo "${ECHO_T}$LIBTOOL" >&6
4871 else
4872   echo "$as_me:4872: result: no" >&5
4873 echo "${ECHO_T}no" >&6
4874 fi
4875
4876     test -n "$LIBTOOL" && break
4877   done
4878 fi
4879 if test -z "$LIBTOOL"; then
4880   ac_ct_LIBTOOL=$LIBTOOL
4881   for ac_prog in libtool glibtool
4882 do
4883   # Extract the first word of "$ac_prog", so it can be a program name with args.
4884 set dummy $ac_prog; ac_word=$2
4885 echo "$as_me:4885: checking for $ac_word" >&5
4886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4887 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4888   echo $ECHO_N "(cached) $ECHO_C" >&6
4889 else
4890   if test -n "$ac_ct_LIBTOOL"; then
4891   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4892 else
4893   ac_save_IFS=$IFS; IFS=$ac_path_separator
4894 ac_dummy="$PATH"
4895 for ac_dir in $ac_dummy; do
4896   IFS=$ac_save_IFS
4897   test -z "$ac_dir" && ac_dir=.
4898   $as_executable_p "$ac_dir/$ac_word" || continue
4899 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4900 echo "$as_me:4900: found $ac_dir/$ac_word" >&5
4901 break
4902 done
4903
4904 fi
4905 fi
4906 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4907 if test -n "$ac_ct_LIBTOOL"; then
4908   echo "$as_me:4908: result: $ac_ct_LIBTOOL" >&5
4909 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4910 else
4911   echo "$as_me:4911: result: no" >&5
4912 echo "${ECHO_T}no" >&6
4913 fi
4914
4915   test -n "$ac_ct_LIBTOOL" && break
4916 done
4917 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4918
4919   LIBTOOL=$ac_ct_LIBTOOL
4920 fi
4921
4922 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4923 then
4924         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.].*//'`
4925 else
4926         cf_cv_libtool_version=
4927 fi
4928 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4929
4930                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4931                 then
4932
4933 unset ac_cv_prog_ac_ct_LIBTOOL
4934 unset ac_ct_LIBTOOL
4935 unset LIBTOOL
4936
4937                         if test -n "$ac_tool_prefix"; then
4938   for ac_prog in glibtool
4939   do
4940     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4941 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4942 echo "$as_me:4942: checking for $ac_word" >&5
4943 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4944 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4945   echo $ECHO_N "(cached) $ECHO_C" >&6
4946 else
4947   if test -n "$LIBTOOL"; then
4948   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4949 else
4950   ac_save_IFS=$IFS; IFS=$ac_path_separator
4951 ac_dummy="$PATH"
4952 for ac_dir in $ac_dummy; do
4953   IFS=$ac_save_IFS
4954   test -z "$ac_dir" && ac_dir=.
4955   $as_executable_p "$ac_dir/$ac_word" || continue
4956 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4957 echo "$as_me:4957: found $ac_dir/$ac_word" >&5
4958 break
4959 done
4960
4961 fi
4962 fi
4963 LIBTOOL=$ac_cv_prog_LIBTOOL
4964 if test -n "$LIBTOOL"; then
4965   echo "$as_me:4965: result: $LIBTOOL" >&5
4966 echo "${ECHO_T}$LIBTOOL" >&6
4967 else
4968   echo "$as_me:4968: result: no" >&5
4969 echo "${ECHO_T}no" >&6
4970 fi
4971
4972     test -n "$LIBTOOL" && break
4973   done
4974 fi
4975 if test -z "$LIBTOOL"; then
4976   ac_ct_LIBTOOL=$LIBTOOL
4977   for ac_prog in glibtool
4978 do
4979   # Extract the first word of "$ac_prog", so it can be a program name with args.
4980 set dummy $ac_prog; ac_word=$2
4981 echo "$as_me:4981: checking for $ac_word" >&5
4982 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4983 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4984   echo $ECHO_N "(cached) $ECHO_C" >&6
4985 else
4986   if test -n "$ac_ct_LIBTOOL"; then
4987   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4988 else
4989   ac_save_IFS=$IFS; IFS=$ac_path_separator
4990 ac_dummy="$PATH"
4991 for ac_dir in $ac_dummy; do
4992   IFS=$ac_save_IFS
4993   test -z "$ac_dir" && ac_dir=.
4994   $as_executable_p "$ac_dir/$ac_word" || continue
4995 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4996 echo "$as_me:4996: found $ac_dir/$ac_word" >&5
4997 break
4998 done
4999
5000 fi
5001 fi
5002 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5003 if test -n "$ac_ct_LIBTOOL"; then
5004   echo "$as_me:5004: result: $ac_ct_LIBTOOL" >&5
5005 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5006 else
5007   echo "$as_me:5007: result: no" >&5
5008 echo "${ECHO_T}no" >&6
5009 fi
5010
5011   test -n "$ac_ct_LIBTOOL" && break
5012 done
5013 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5014
5015   LIBTOOL=$ac_ct_LIBTOOL
5016 fi
5017
5018 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5019 then
5020         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.].*//'`
5021 else
5022         cf_cv_libtool_version=
5023 fi
5024 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5025
5026                 fi
5027         fi
5028         if test -z "$LIBTOOL" ; then
5029                 { { echo "$as_me:5029: error: Cannot find libtool" >&5
5030 echo "$as_me: error: Cannot find libtool" >&2;}
5031    { (exit 1); exit 1; }; }
5032         fi
5033         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5034         LIB_OBJECT='${OBJECTS:.o=.lo}'
5035         LIB_SUFFIX=.la
5036         LIB_CLEAN='${LIBTOOL} --mode=clean'
5037         LIB_COMPILE='${LIBTOOL} --mode=compile'
5038         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5039         LIB_INSTALL='${LIBTOOL} --mode=install'
5040         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5041         LIB_PREP=:
5042
5043 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5044 then
5045         echo "$as_me:5045: checking version of $LIBTOOL" >&5
5046 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5047
5048 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5049 then
5050         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.].*//'`
5051 else
5052         cf_cv_libtool_version=
5053 fi
5054 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5055
5056         echo "$as_me:5056: result: $cf_cv_libtool_version" >&5
5057 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5058         if test -z "$cf_cv_libtool_version" ; then
5059                 { { echo "$as_me:5059: error: This is not GNU libtool" >&5
5060 echo "$as_me: error: This is not GNU libtool" >&2;}
5061    { (exit 1); exit 1; }; }
5062         fi
5063 else
5064         { { echo "$as_me:5064: error: GNU libtool has not been found" >&5
5065 echo "$as_me: error: GNU libtool has not been found" >&2;}
5066    { (exit 1); exit 1; }; }
5067 fi
5068
5069         # special hack to add -no-undefined (which libtool should do for itself)
5070         LT_UNDEF=
5071         case "$cf_cv_system_name" in
5072         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5073                 LT_UNDEF=-no-undefined
5074                 ;;
5075         esac
5076
5077         # special hack to add --tag option for C++ compiler
5078         case $cf_cv_libtool_version in
5079         (1.[5-9]*|[2-9].[0-9.a-z]*)
5080                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5081                 LIBTOOL="$LIBTOOL --tag=CC"
5082                 ;;
5083         (*)
5084                 LIBTOOL_CXX="$LIBTOOL"
5085                 ;;
5086         esac
5087 else
5088         LIBTOOL=""
5089         LIBTOOL_CXX=""
5090 fi
5091
5092 test -z "$LIBTOOL" && ECHO_LT=
5093
5094 if test "$with_libtool" != "no" ; then
5095
5096 cf_list_models="$cf_list_models libtool"
5097
5098 else
5099
5100 echo "$as_me:5100: checking if you want to build shared libraries" >&5
5101 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5102
5103 # Check whether --with-shared or --without-shared was given.
5104 if test "${with_shared+set}" = set; then
5105   withval="$with_shared"
5106   with_shared=$withval
5107 else
5108   with_shared=no
5109 fi;
5110 echo "$as_me:5110: result: $with_shared" >&5
5111 echo "${ECHO_T}$with_shared" >&6
5112 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5113
5114 echo "$as_me:5114: checking if you want to build static libraries" >&5
5115 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5116
5117 # Check whether --with-normal or --without-normal was given.
5118 if test "${with_normal+set}" = set; then
5119   withval="$with_normal"
5120   with_normal=$withval
5121 else
5122   with_normal=yes
5123 fi;
5124 echo "$as_me:5124: result: $with_normal" >&5
5125 echo "${ECHO_T}$with_normal" >&6
5126 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5127
5128 echo "$as_me:5128: checking if you want to build debug libraries" >&5
5129 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5130
5131 # Check whether --with-debug or --without-debug was given.
5132 if test "${with_debug+set}" = set; then
5133   withval="$with_debug"
5134   with_debug=$withval
5135 else
5136   with_debug=yes
5137 fi;
5138 echo "$as_me:5138: result: $with_debug" >&5
5139 echo "${ECHO_T}$with_debug" >&6
5140 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5141
5142 echo "$as_me:5142: checking if you want to build profiling libraries" >&5
5143 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5144
5145 # Check whether --with-profile or --without-profile was given.
5146 if test "${with_profile+set}" = set; then
5147   withval="$with_profile"
5148   with_profile=$withval
5149 else
5150   with_profile=no
5151 fi;
5152 echo "$as_me:5152: result: $with_profile" >&5
5153 echo "${ECHO_T}$with_profile" >&6
5154 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5155
5156 fi
5157
5158 if test "X$cf_with_cxx_binding" != Xno; then
5159 if test "x$with_shared" = "xyes"; then
5160 echo "$as_me:5160: checking if you want to build C++ shared libraries" >&5
5161 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5162
5163 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5164 if test "${with_cxx_shared+set}" = set; then
5165   withval="$with_cxx_shared"
5166   with_shared_cxx=$withval
5167 else
5168   with_shared_cxx=no
5169 fi;
5170 echo "$as_me:5170: result: $with_shared_cxx" >&5
5171 echo "${ECHO_T}$with_shared_cxx" >&6
5172 fi
5173 fi
5174
5175 ###############################################################################
5176
5177 echo "$as_me:5177: checking for specified models" >&5
5178 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5179 test -z "$cf_list_models" && cf_list_models=normal
5180 test "$with_libtool" != "no" && cf_list_models=libtool
5181 echo "$as_me:5181: result: $cf_list_models" >&5
5182 echo "${ECHO_T}$cf_list_models" >&6
5183
5184 ### Use the first model as the default, and save its suffix for use in building
5185 ### up test-applications.
5186 echo "$as_me:5186: checking for default model" >&5
5187 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5188 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5189 echo "$as_me:5189: result: $DFT_LWR_MODEL" >&5
5190 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5191
5192 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5193
5194 TICS_NAME=tic
5195
5196 TINFO_NAME=tinfo
5197
5198 LIB_NAME=ncurses
5199
5200 LIB_DIR=../lib
5201 LIB_2ND=../../lib
5202
5203 echo "$as_me:5203: checking if you want to have a library-prefix" >&5
5204 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5205
5206 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5207 if test "${with_lib_prefix+set}" = set; then
5208   withval="$with_lib_prefix"
5209   with_lib_prefix=$withval
5210 else
5211   with_lib_prefix=auto
5212 fi;
5213 echo "$as_me:5213: result: $with_lib_prefix" >&5
5214 echo "${ECHO_T}$with_lib_prefix" >&6
5215
5216 if test $with_lib_prefix = auto
5217 then
5218
5219         case $cf_cv_system_name in
5220         (OS/2*|os2*)
5221                 if test "$DFT_LWR_MODEL" = libtool; then
5222                         LIB_PREFIX='lib'
5223                 else
5224                         LIB_PREFIX=''
5225                 fi
5226                 ;;
5227         (*)     LIB_PREFIX='lib'
5228                 ;;
5229         esac
5230 cf_prefix=$LIB_PREFIX
5231
5232 elif test $with_lib_prefix = no
5233 then
5234         LIB_PREFIX=
5235 else
5236         LIB_PREFIX=$with_lib_prefix
5237 fi
5238
5239 LIB_SUFFIX=
5240
5241         echo "$as_me:5241: checking for PATH separator" >&5
5242 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5243         case $cf_cv_system_name in
5244         (os2*)  PATH_SEPARATOR=';'  ;;
5245         (*)     ${PATH_SEPARATOR:=':'}  ;;
5246         esac
5247
5248         echo "$as_me:5248: result: $PATH_SEPARATOR" >&5
5249 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5250
5251 ###############################################################################
5252
5253 echo "$as_me:5253: checking if you want to build a separate terminfo library" >&5
5254 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5255
5256 # Check whether --with-termlib or --without-termlib was given.
5257 if test "${with_termlib+set}" = set; then
5258   withval="$with_termlib"
5259   with_termlib=$withval
5260 else
5261   with_termlib=no
5262 fi;
5263 echo "$as_me:5263: result: $with_termlib" >&5
5264 echo "${ECHO_T}$with_termlib" >&6
5265
5266 echo "$as_me:5266: checking if you want to build a separate tic library" >&5
5267 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5268
5269 # Check whether --with-ticlib or --without-ticlib was given.
5270 if test "${with_ticlib+set}" = set; then
5271   withval="$with_ticlib"
5272   with_ticlib=$withval
5273 else
5274   with_ticlib=no
5275 fi;
5276 echo "$as_me:5276: result: $with_ticlib" >&5
5277 echo "${ECHO_T}$with_ticlib" >&6
5278
5279 ### Checks for special libraries, must be done up-front.
5280 SHLIB_LIST=""
5281
5282 echo "$as_me:5282: checking if you want to link with the GPM mouse library" >&5
5283 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5284
5285 # Check whether --with-gpm or --without-gpm was given.
5286 if test "${with_gpm+set}" = set; then
5287   withval="$with_gpm"
5288   with_gpm=$withval
5289 else
5290   with_gpm=maybe
5291 fi;
5292 echo "$as_me:5292: result: $with_gpm" >&5
5293 echo "${ECHO_T}$with_gpm" >&6
5294
5295 if test "$with_gpm" != no ; then
5296         echo "$as_me:5296: checking for gpm.h" >&5
5297 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5298 if test "${ac_cv_header_gpm_h+set}" = set; then
5299   echo $ECHO_N "(cached) $ECHO_C" >&6
5300 else
5301   cat >conftest.$ac_ext <<_ACEOF
5302 #line 5302 "configure"
5303 #include "confdefs.h"
5304 #include <gpm.h>
5305 _ACEOF
5306 if { (eval echo "$as_me:5306: \"$ac_cpp conftest.$ac_ext\"") >&5
5307   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5308   ac_status=$?
5309   egrep -v '^ *\+' conftest.er1 >conftest.err
5310   rm -f conftest.er1
5311   cat conftest.err >&5
5312   echo "$as_me:5312: \$? = $ac_status" >&5
5313   (exit $ac_status); } >/dev/null; then
5314   if test -s conftest.err; then
5315     ac_cpp_err=$ac_c_preproc_warn_flag
5316   else
5317     ac_cpp_err=
5318   fi
5319 else
5320   ac_cpp_err=yes
5321 fi
5322 if test -z "$ac_cpp_err"; then
5323   ac_cv_header_gpm_h=yes
5324 else
5325   echo "$as_me: failed program was:" >&5
5326   cat conftest.$ac_ext >&5
5327   ac_cv_header_gpm_h=no
5328 fi
5329 rm -f conftest.err conftest.$ac_ext
5330 fi
5331 echo "$as_me:5331: result: $ac_cv_header_gpm_h" >&5
5332 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5333 if test $ac_cv_header_gpm_h = yes; then
5334
5335 cat >>confdefs.h <<\EOF
5336 #define HAVE_GPM_H 1
5337 EOF
5338
5339                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5340                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5341
5342 echo "${as_me:-configure}:5342: testing assuming we really have GPM library ..." 1>&5
5343
5344 cat >>confdefs.h <<\EOF
5345 #define HAVE_LIBGPM 1
5346 EOF
5347
5348                         with_gpm=yes
5349                 else
5350                         echo "$as_me:5350: checking for Gpm_Open in -lgpm" >&5
5351 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5352 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5353   echo $ECHO_N "(cached) $ECHO_C" >&6
5354 else
5355   ac_check_lib_save_LIBS=$LIBS
5356 LIBS="-lgpm  $LIBS"
5357 cat >conftest.$ac_ext <<_ACEOF
5358 #line 5358 "configure"
5359 #include "confdefs.h"
5360
5361 /* Override any gcc2 internal prototype to avoid an error.  */
5362 #ifdef __cplusplus
5363 extern "C"
5364 #endif
5365 /* We use char because int might match the return type of a gcc2
5366    builtin and then its argument prototype would still apply.  */
5367 char Gpm_Open ();
5368 int
5369 main (void)
5370 {
5371 Gpm_Open ();
5372   ;
5373   return 0;
5374 }
5375 _ACEOF
5376 rm -f conftest.$ac_objext conftest$ac_exeext
5377 if { (eval echo "$as_me:5377: \"$ac_link\"") >&5
5378   (eval $ac_link) 2>&5
5379   ac_status=$?
5380   echo "$as_me:5380: \$? = $ac_status" >&5
5381   (exit $ac_status); } &&
5382          { ac_try='test -s conftest$ac_exeext'
5383   { (eval echo "$as_me:5383: \"$ac_try\"") >&5
5384   (eval $ac_try) 2>&5
5385   ac_status=$?
5386   echo "$as_me:5386: \$? = $ac_status" >&5
5387   (exit $ac_status); }; }; then
5388   ac_cv_lib_gpm_Gpm_Open=yes
5389 else
5390   echo "$as_me: failed program was:" >&5
5391 cat conftest.$ac_ext >&5
5392 ac_cv_lib_gpm_Gpm_Open=no
5393 fi
5394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5395 LIBS=$ac_check_lib_save_LIBS
5396 fi
5397 echo "$as_me:5397: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5398 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5399 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5400   with_gpm=yes
5401 else
5402
5403                                 if test "$with_gpm" = maybe; then
5404                                         { echo "$as_me:5404: WARNING: Cannot link with GPM library" >&5
5405 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5406                                         with_gpm=no
5407                                 else
5408                                         { { echo "$as_me:5408: error: Cannot link with GPM library" >&5
5409 echo "$as_me: error: Cannot link with GPM library" >&2;}
5410    { (exit 1); exit 1; }; }
5411                                 fi
5412
5413 fi
5414
5415                 fi
5416
5417 else
5418
5419                 test "$with_gpm" != maybe && { echo "$as_me:5419: WARNING: Cannot find GPM header" >&5
5420 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5421                 with_gpm=no
5422
5423 fi
5424
5425 fi
5426
5427 if test "$with_gpm" != no ; then
5428         echo "$as_me:5428: checking if you want to load GPM dynamically" >&5
5429 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5430
5431 # Check whether --with-dlsym or --without-dlsym was given.
5432 if test "${with_dlsym+set}" = set; then
5433   withval="$with_dlsym"
5434   with_dlsym=$withval
5435 else
5436   with_dlsym=yes
5437 fi;
5438         echo "$as_me:5438: result: $with_dlsym" >&5
5439 echo "${ECHO_T}$with_dlsym" >&6
5440         if test "x$with_dlsym" = xyes ; then
5441
5442 cf_have_dlsym=no
5443 echo "$as_me:5443: checking for dlsym" >&5
5444 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5445 if test "${ac_cv_func_dlsym+set}" = set; then
5446   echo $ECHO_N "(cached) $ECHO_C" >&6
5447 else
5448   cat >conftest.$ac_ext <<_ACEOF
5449 #line 5449 "configure"
5450 #include "confdefs.h"
5451 /* System header to define __stub macros and hopefully few prototypes,
5452     which can conflict with char dlsym (); below.  */
5453 #include <assert.h>
5454 /* Override any gcc2 internal prototype to avoid an error.  */
5455 #ifdef __cplusplus
5456 extern "C"
5457 #endif
5458 /* We use char because int might match the return type of a gcc2
5459    builtin and then its argument prototype would still apply.  */
5460 char dlsym ();
5461 char (*f) ();
5462
5463 int
5464 main (void)
5465 {
5466 /* The GNU C library defines this for functions which it implements
5467     to always fail with ENOSYS.  Some functions are actually named
5468     something starting with __ and the normal name is an alias.  */
5469 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5470 choke me
5471 #else
5472 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5473 #endif
5474
5475   ;
5476   return 0;
5477 }
5478 _ACEOF
5479 rm -f conftest.$ac_objext conftest$ac_exeext
5480 if { (eval echo "$as_me:5480: \"$ac_link\"") >&5
5481   (eval $ac_link) 2>&5
5482   ac_status=$?
5483   echo "$as_me:5483: \$? = $ac_status" >&5
5484   (exit $ac_status); } &&
5485          { ac_try='test -s conftest$ac_exeext'
5486   { (eval echo "$as_me:5486: \"$ac_try\"") >&5
5487   (eval $ac_try) 2>&5
5488   ac_status=$?
5489   echo "$as_me:5489: \$? = $ac_status" >&5
5490   (exit $ac_status); }; }; then
5491   ac_cv_func_dlsym=yes
5492 else
5493   echo "$as_me: failed program was:" >&5
5494 cat conftest.$ac_ext >&5
5495 ac_cv_func_dlsym=no
5496 fi
5497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5498 fi
5499 echo "$as_me:5499: result: $ac_cv_func_dlsym" >&5
5500 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5501 if test $ac_cv_func_dlsym = yes; then
5502   cf_have_dlsym=yes
5503 else
5504
5505 cf_have_libdl=no
5506 echo "$as_me:5506: checking for dlsym in -ldl" >&5
5507 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5508 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5509   echo $ECHO_N "(cached) $ECHO_C" >&6
5510 else
5511   ac_check_lib_save_LIBS=$LIBS
5512 LIBS="-ldl  $LIBS"
5513 cat >conftest.$ac_ext <<_ACEOF
5514 #line 5514 "configure"
5515 #include "confdefs.h"
5516
5517 /* Override any gcc2 internal prototype to avoid an error.  */
5518 #ifdef __cplusplus
5519 extern "C"
5520 #endif
5521 /* We use char because int might match the return type of a gcc2
5522    builtin and then its argument prototype would still apply.  */
5523 char dlsym ();
5524 int
5525 main (void)
5526 {
5527 dlsym ();
5528   ;
5529   return 0;
5530 }
5531 _ACEOF
5532 rm -f conftest.$ac_objext conftest$ac_exeext
5533 if { (eval echo "$as_me:5533: \"$ac_link\"") >&5
5534   (eval $ac_link) 2>&5
5535   ac_status=$?
5536   echo "$as_me:5536: \$? = $ac_status" >&5
5537   (exit $ac_status); } &&
5538          { ac_try='test -s conftest$ac_exeext'
5539   { (eval echo "$as_me:5539: \"$ac_try\"") >&5
5540   (eval $ac_try) 2>&5
5541   ac_status=$?
5542   echo "$as_me:5542: \$? = $ac_status" >&5
5543   (exit $ac_status); }; }; then
5544   ac_cv_lib_dl_dlsym=yes
5545 else
5546   echo "$as_me: failed program was:" >&5
5547 cat conftest.$ac_ext >&5
5548 ac_cv_lib_dl_dlsym=no
5549 fi
5550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5551 LIBS=$ac_check_lib_save_LIBS
5552 fi
5553 echo "$as_me:5553: result: $ac_cv_lib_dl_dlsym" >&5
5554 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5555 if test $ac_cv_lib_dl_dlsym = yes; then
5556
5557         cf_have_dlsym=yes
5558         cf_have_libdl=yes
5559 fi
5560
5561 fi
5562
5563 if test "$cf_have_dlsym" = yes ; then
5564         test "$cf_have_libdl" = yes && {
5565 cf_add_libs="-ldl"
5566 # Filter out duplicates - this happens with badly-designed ".pc" files...
5567 for cf_add_1lib in $LIBS
5568 do
5569         for cf_add_2lib in $cf_add_libs
5570         do
5571                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5572                 then
5573                         cf_add_1lib=
5574                         break
5575                 fi
5576         done
5577         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5578 done
5579 LIBS="$cf_add_libs"
5580  }
5581
5582         echo "$as_me:5582: checking whether able to link to dl*() functions" >&5
5583 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5584         cat >conftest.$ac_ext <<_ACEOF
5585 #line 5585 "configure"
5586 #include "confdefs.h"
5587 #include <dlfcn.h>
5588 int
5589 main (void)
5590 {
5591
5592                 void *obj;
5593                 if ((obj = dlopen("filename", 0)) != 0) {
5594                         if (dlsym(obj, "symbolname") == 0) {
5595                         dlclose(obj);
5596                         }
5597                 }
5598   ;
5599   return 0;
5600 }
5601 _ACEOF
5602 rm -f conftest.$ac_objext conftest$ac_exeext
5603 if { (eval echo "$as_me:5603: \"$ac_link\"") >&5
5604   (eval $ac_link) 2>&5
5605   ac_status=$?
5606   echo "$as_me:5606: \$? = $ac_status" >&5
5607   (exit $ac_status); } &&
5608          { ac_try='test -s conftest$ac_exeext'
5609   { (eval echo "$as_me:5609: \"$ac_try\"") >&5
5610   (eval $ac_try) 2>&5
5611   ac_status=$?
5612   echo "$as_me:5612: \$? = $ac_status" >&5
5613   (exit $ac_status); }; }; then
5614
5615 cat >>confdefs.h <<\EOF
5616 #define HAVE_LIBDL 1
5617 EOF
5618
5619 else
5620   echo "$as_me: failed program was:" >&5
5621 cat conftest.$ac_ext >&5
5622
5623                 { { echo "$as_me:5623: error: Cannot link test program for libdl" >&5
5624 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5625    { (exit 1); exit 1; }; }
5626 fi
5627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5628         echo "$as_me:5628: result: ok" >&5
5629 echo "${ECHO_T}ok" >&6
5630 else
5631         { { echo "$as_me:5631: error: Cannot find dlsym function" >&5
5632 echo "$as_me: error: Cannot find dlsym function" >&2;}
5633    { (exit 1); exit 1; }; }
5634 fi
5635
5636                 if test "x$with_gpm" != xyes ; then
5637                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5638
5639 echo "${as_me:-configure}:5639: testing assuming soname for gpm is $with_gpm ..." 1>&5
5640
5641                         cf_cv_gpm_soname="$with_gpm"
5642                 else
5643
5644 echo "$as_me:5644: checking for soname of gpm library" >&5
5645 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5646 if test "${cf_cv_gpm_soname+set}" = set; then
5647   echo $ECHO_N "(cached) $ECHO_C" >&6
5648 else
5649
5650 cf_cv_gpm_soname=unknown
5651 if test "$cross_compiling" != yes ; then
5652 cat >conftest.$ac_ext <<CF_EOF
5653 #include <gpm.h>
5654 int main(void)
5655 {
5656 if (Gpm_Open(0,0)) Gpm_Close();
5657         ${cf_cv_main_return:-return}(0);
5658 }
5659 CF_EOF
5660 cf_save_LIBS="$LIBS"
5661
5662 cf_add_libs="-lgpm"
5663 # Filter out duplicates - this happens with badly-designed ".pc" files...
5664 for cf_add_1lib in $LIBS
5665 do
5666         for cf_add_2lib in $cf_add_libs
5667         do
5668                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5669                 then
5670                         cf_add_1lib=
5671                         break
5672                 fi
5673         done
5674         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5675 done
5676 LIBS="$cf_add_libs"
5677
5678         if { (eval echo "$as_me:5678: \"$ac_compile\"") >&5
5679   (eval $ac_compile) 2>&5
5680   ac_status=$?
5681   echo "$as_me:5681: \$? = $ac_status" >&5
5682   (exit $ac_status); } ; then
5683                 if { (eval echo "$as_me:5683: \"$ac_link\"") >&5
5684   (eval $ac_link) 2>&5
5685   ac_status=$?
5686   echo "$as_me:5686: \$? = $ac_status" >&5
5687   (exit $ac_status); } ; then
5688                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5689                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5690                 fi
5691         fi
5692 rm -rf conftest*
5693 LIBS="$cf_save_LIBS"
5694 fi
5695
5696 fi
5697 echo "$as_me:5697: result: $cf_cv_gpm_soname" >&5
5698 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5699
5700                 fi
5701                 test "$cf_cv_gpm_soname" != "unknown" &&
5702 cat >>confdefs.h <<EOF
5703 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5704 EOF
5705
5706                 SHLIB_LIST="-ldl $SHLIB_LIST"
5707         else
5708                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5709
5710 cf_add_libs="-lgpm"
5711 # Filter out duplicates - this happens with badly-designed ".pc" files...
5712 for cf_add_1lib in $TEST_LIBS
5713 do
5714         for cf_add_2lib in $cf_add_libs
5715         do
5716                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5717                 then
5718                         cf_add_1lib=
5719                         break
5720                 fi
5721         done
5722         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5723 done
5724 TEST_LIBS="$cf_add_libs"
5725
5726         fi
5727
5728 cat >>confdefs.h <<\EOF
5729 #define HAVE_LIBGPM 1
5730 EOF
5731
5732 echo "$as_me:5732: checking for Gpm_Wgetch in -lgpm" >&5
5733 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5734 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5735   echo $ECHO_N "(cached) $ECHO_C" >&6
5736 else
5737   ac_check_lib_save_LIBS=$LIBS
5738 LIBS="-lgpm  $LIBS"
5739 cat >conftest.$ac_ext <<_ACEOF
5740 #line 5740 "configure"
5741 #include "confdefs.h"
5742
5743 /* Override any gcc2 internal prototype to avoid an error.  */
5744 #ifdef __cplusplus
5745 extern "C"
5746 #endif
5747 /* We use char because int might match the return type of a gcc2
5748    builtin and then its argument prototype would still apply.  */
5749 char Gpm_Wgetch ();
5750 int
5751 main (void)
5752 {
5753 Gpm_Wgetch ();
5754   ;
5755   return 0;
5756 }
5757 _ACEOF
5758 rm -f conftest.$ac_objext conftest$ac_exeext
5759 if { (eval echo "$as_me:5759: \"$ac_link\"") >&5
5760   (eval $ac_link) 2>&5
5761   ac_status=$?
5762   echo "$as_me:5762: \$? = $ac_status" >&5
5763   (exit $ac_status); } &&
5764          { ac_try='test -s conftest$ac_exeext'
5765   { (eval echo "$as_me:5765: \"$ac_try\"") >&5
5766   (eval $ac_try) 2>&5
5767   ac_status=$?
5768   echo "$as_me:5768: \$? = $ac_status" >&5
5769   (exit $ac_status); }; }; then
5770   ac_cv_lib_gpm_Gpm_Wgetch=yes
5771 else
5772   echo "$as_me: failed program was:" >&5
5773 cat conftest.$ac_ext >&5
5774 ac_cv_lib_gpm_Gpm_Wgetch=no
5775 fi
5776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5777 LIBS=$ac_check_lib_save_LIBS
5778 fi
5779 echo "$as_me:5779: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5780 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5781 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5782
5783 echo "$as_me:5783: checking if GPM is weakly bound to curses library" >&5
5784 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5785 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5786   echo $ECHO_N "(cached) $ECHO_C" >&6
5787 else
5788
5789 cf_cv_check_gpm_wgetch=unknown
5790 if test "$cross_compiling" != yes ; then
5791
5792 cat >conftest.$ac_ext <<CF_EOF
5793 #include <gpm.h>
5794 int main(void)
5795 {
5796         Gpm_Wgetch();
5797         ${cf_cv_main_return:-return}(0);
5798 }
5799 CF_EOF
5800
5801         cf_save_LIBS="$LIBS"
5802         # This only works if we can look at the symbol table.  If a shared
5803         # library is stripped for install, we cannot use that.  So we're forced
5804         # to rely on the static library, noting that some packagers may not
5805         # include it.
5806         LIBS="-static -lgpm -dynamic $LIBS"
5807         if { (eval echo "$as_me:5807: \"$ac_compile\"") >&5
5808   (eval $ac_compile) 2>&5
5809   ac_status=$?
5810   echo "$as_me:5810: \$? = $ac_status" >&5
5811   (exit $ac_status); } ; then
5812                 if { (eval echo "$as_me:5812: \"$ac_link\"") >&5
5813   (eval $ac_link) 2>&5
5814   ac_status=$?
5815   echo "$as_me:5815: \$? = $ac_status" >&5
5816   (exit $ac_status); } ; then
5817                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5818                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5819                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5820                 fi
5821         fi
5822         rm -rf conftest*
5823         LIBS="$cf_save_LIBS"
5824 fi
5825
5826 fi
5827 echo "$as_me:5827: result: $cf_cv_check_gpm_wgetch" >&5
5828 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5829
5830 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5831         { echo "$as_me:5831: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5832 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5833 fi
5834
5835 fi
5836
5837 fi
5838
5839 # not everyone has "test -c"
5840 if test -c /dev/sysmouse 2>/dev/null ; then
5841 echo "$as_me:5841: checking if you want to use sysmouse" >&5
5842 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5843
5844 # Check whether --with-sysmouse or --without-sysmouse was given.
5845 if test "${with_sysmouse+set}" = set; then
5846   withval="$with_sysmouse"
5847   cf_with_sysmouse=$withval
5848 else
5849   cf_with_sysmouse=maybe
5850 fi;
5851         if test "$cf_with_sysmouse" != no ; then
5852         cat >conftest.$ac_ext <<_ACEOF
5853 #line 5853 "configure"
5854 #include "confdefs.h"
5855
5856 #include <osreldate.h>
5857 #if (__FreeBSD_version >= 400017)
5858 #include <sys/consio.h>
5859 #include <sys/fbio.h>
5860 #else
5861 #include <machine/console.h>
5862 #endif
5863
5864 int
5865 main (void)
5866 {
5867
5868         struct mouse_info the_mouse;
5869         ioctl(0, CONS_MOUSECTL, &the_mouse);
5870
5871   ;
5872   return 0;
5873 }
5874 _ACEOF
5875 rm -f conftest.$ac_objext
5876 if { (eval echo "$as_me:5876: \"$ac_compile\"") >&5
5877   (eval $ac_compile) 2>&5
5878   ac_status=$?
5879   echo "$as_me:5879: \$? = $ac_status" >&5
5880   (exit $ac_status); } &&
5881          { ac_try='test -s conftest.$ac_objext'
5882   { (eval echo "$as_me:5882: \"$ac_try\"") >&5
5883   (eval $ac_try) 2>&5
5884   ac_status=$?
5885   echo "$as_me:5885: \$? = $ac_status" >&5
5886   (exit $ac_status); }; }; then
5887   cf_with_sysmouse=yes
5888 else
5889   echo "$as_me: failed program was:" >&5
5890 cat conftest.$ac_ext >&5
5891 cf_with_sysmouse=no
5892 fi
5893 rm -f conftest.$ac_objext conftest.$ac_ext
5894         fi
5895 echo "$as_me:5895: result: $cf_with_sysmouse" >&5
5896 echo "${ECHO_T}$cf_with_sysmouse" >&6
5897 test "$cf_with_sysmouse" = yes &&
5898 cat >>confdefs.h <<\EOF
5899 #define USE_SYSMOUSE 1
5900 EOF
5901
5902 fi
5903
5904 if test X"$CC_G_OPT" = X"" ; then
5905         CC_G_OPT='-g'
5906         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5907 fi
5908
5909 if test X"$CXX_G_OPT" = X"" ; then
5910         CXX_G_OPT='-g'
5911         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5912 fi
5913
5914 echo "$as_me:5914: checking for default loader flags" >&5
5915 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5916 case $DFT_LWR_MODEL in
5917 (libtool) LD_MODEL=''   ;;
5918 (normal)  LD_MODEL=''   ;;
5919 (debug)   LD_MODEL=$CC_G_OPT ;;
5920 (profile) LD_MODEL='-pg';;
5921 (shared)  LD_MODEL=''   ;;
5922 esac
5923 echo "$as_me:5923: result: $LD_MODEL" >&5
5924 echo "${ECHO_T}$LD_MODEL" >&6
5925
5926 case $DFT_LWR_MODEL in
5927 (shared)
5928
5929 echo "$as_me:5929: checking if rpath option should be used" >&5
5930 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5931
5932 # Check whether --enable-rpath or --disable-rpath was given.
5933 if test "${enable_rpath+set}" = set; then
5934   enableval="$enable_rpath"
5935   cf_cv_enable_rpath=$enableval
5936 else
5937   cf_cv_enable_rpath=no
5938 fi;
5939 echo "$as_me:5939: result: $cf_cv_enable_rpath" >&5
5940 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5941
5942 echo "$as_me:5942: checking if shared libraries should be relinked during install" >&5
5943 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5944
5945 # Check whether --enable-relink or --disable-relink was given.
5946 if test "${enable_relink+set}" = set; then
5947   enableval="$enable_relink"
5948   cf_cv_do_relink=$enableval
5949 else
5950   cf_cv_do_relink=yes
5951 fi;
5952 echo "$as_me:5952: result: $cf_cv_do_relink" >&5
5953 echo "${ECHO_T}$cf_cv_do_relink" >&6
5954         ;;
5955 esac
5956
5957 # we will build libraries one-level down.
5958 rel_builddir=..
5959
5960 LD_RPATH_OPT=
5961 echo "$as_me:5961: checking for an rpath option" >&5
5962 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5963 case $cf_cv_system_name in
5964 (irix*)
5965         if test "$GCC" = yes; then
5966                 LD_RPATH_OPT="-Wl,-rpath,"
5967         else
5968                 LD_RPATH_OPT="-rpath "
5969         fi
5970         ;;
5971 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5972         LD_RPATH_OPT="-Wl,-rpath,"
5973         ;;
5974 (openbsd[2-9].*|mirbsd*)
5975         LD_RPATH_OPT="-Wl,-rpath,"
5976         ;;
5977 (dragonfly*)
5978         LD_RPATH_OPT="-rpath "
5979         ;;
5980 (netbsd*)
5981         LD_RPATH_OPT="-Wl,-rpath,"
5982         ;;
5983 (osf*|mls+*)
5984         LD_RPATH_OPT="-rpath "
5985         ;;
5986 (solaris2*)
5987         LD_RPATH_OPT="-R"
5988         ;;
5989 (*)
5990         ;;
5991 esac
5992 echo "$as_me:5992: result: $LD_RPATH_OPT" >&5
5993 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5994
5995 case "x$LD_RPATH_OPT" in
5996 (x-R*)
5997         echo "$as_me:5997: checking if we need a space after rpath option" >&5
5998 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5999         cf_save_LIBS="$LIBS"
6000
6001 cf_add_libs="${LD_RPATH_OPT}$libdir"
6002 # Filter out duplicates - this happens with badly-designed ".pc" files...
6003 for cf_add_1lib in $LIBS
6004 do
6005         for cf_add_2lib in $cf_add_libs
6006         do
6007                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6008                 then
6009                         cf_add_1lib=
6010                         break
6011                 fi
6012         done
6013         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6014 done
6015 LIBS="$cf_add_libs"
6016
6017         cat >conftest.$ac_ext <<_ACEOF
6018 #line 6018 "configure"
6019 #include "confdefs.h"
6020
6021 int
6022 main (void)
6023 {
6024
6025   ;
6026   return 0;
6027 }
6028 _ACEOF
6029 rm -f conftest.$ac_objext conftest$ac_exeext
6030 if { (eval echo "$as_me:6030: \"$ac_link\"") >&5
6031   (eval $ac_link) 2>&5
6032   ac_status=$?
6033   echo "$as_me:6033: \$? = $ac_status" >&5
6034   (exit $ac_status); } &&
6035          { ac_try='test -s conftest$ac_exeext'
6036   { (eval echo "$as_me:6036: \"$ac_try\"") >&5
6037   (eval $ac_try) 2>&5
6038   ac_status=$?
6039   echo "$as_me:6039: \$? = $ac_status" >&5
6040   (exit $ac_status); }; }; then
6041   cf_rpath_space=no
6042 else
6043   echo "$as_me: failed program was:" >&5
6044 cat conftest.$ac_ext >&5
6045 cf_rpath_space=yes
6046 fi
6047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6048         LIBS="$cf_save_LIBS"
6049         echo "$as_me:6049: result: $cf_rpath_space" >&5
6050 echo "${ECHO_T}$cf_rpath_space" >&6
6051         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6052         ;;
6053 esac
6054
6055         RM_SHARED_OPTS=
6056         LOCAL_LDFLAGS=
6057         LOCAL_LDFLAGS2=
6058         LD_SHARED_OPTS=
6059         INSTALL_LIB="-m 644"
6060         : ${rel_builddir:=.}
6061
6062         shlibdir=$libdir
6063
6064         MAKE_DLLS="#"
6065
6066         cf_cv_do_symlinks=no
6067         cf_ld_rpath_opt=
6068         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6069
6070         echo "$as_me:6070: checking if release/abi version should be used for shared libs" >&5
6071 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6072
6073 # Check whether --with-shlib-version or --without-shlib-version was given.
6074 if test "${with_shlib_version+set}" = set; then
6075   withval="$with_shlib_version"
6076   test -z "$withval" && withval=auto
6077         case $withval in
6078         (yes)
6079                 cf_cv_shlib_version=auto
6080                 ;;
6081         (rel|abi|auto)
6082                 cf_cv_shlib_version=$withval
6083                 ;;
6084         (*)
6085                 echo "$as_me:6085: result: $withval" >&5
6086 echo "${ECHO_T}$withval" >&6
6087                 { { echo "$as_me:6087: error: option value must be one of: rel, abi, or auto" >&5
6088 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6089    { (exit 1); exit 1; }; }
6090                 ;;
6091         esac
6092
6093 else
6094   cf_cv_shlib_version=auto
6095 fi;
6096         echo "$as_me:6096: result: $cf_cv_shlib_version" >&5
6097 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6098
6099         cf_cv_rm_so_locs=no
6100         cf_try_cflags=
6101
6102         # Some less-capable ports of gcc support only -fpic
6103         CC_SHARED_OPTS=
6104
6105         cf_try_fPIC=no
6106         if test "$GCC" = yes
6107         then
6108                 cf_try_fPIC=yes
6109         else
6110                 case $cf_cv_system_name in
6111                 (*linux*)       # e.g., PGI compiler
6112                         cf_try_fPIC=yes
6113                         ;;
6114                 esac
6115         fi
6116
6117         if test "$cf_try_fPIC" = yes
6118         then
6119                 echo "$as_me:6119: checking which $CC option to use" >&5
6120 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6121                 cf_save_CFLAGS="$CFLAGS"
6122                 for CC_SHARED_OPTS in -fPIC -fpic ''
6123                 do
6124                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6125                         cat >conftest.$ac_ext <<_ACEOF
6126 #line 6126 "configure"
6127 #include "confdefs.h"
6128 #include <stdio.h>
6129 int
6130 main (void)
6131 {
6132 int x = 1
6133   ;
6134   return 0;
6135 }
6136 _ACEOF
6137 rm -f conftest.$ac_objext
6138 if { (eval echo "$as_me:6138: \"$ac_compile\"") >&5
6139   (eval $ac_compile) 2>&5
6140   ac_status=$?
6141   echo "$as_me:6141: \$? = $ac_status" >&5
6142   (exit $ac_status); } &&
6143          { ac_try='test -s conftest.$ac_objext'
6144   { (eval echo "$as_me:6144: \"$ac_try\"") >&5
6145   (eval $ac_try) 2>&5
6146   ac_status=$?
6147   echo "$as_me:6147: \$? = $ac_status" >&5
6148   (exit $ac_status); }; }; then
6149   break
6150 else
6151   echo "$as_me: failed program was:" >&5
6152 cat conftest.$ac_ext >&5
6153 fi
6154 rm -f conftest.$ac_objext conftest.$ac_ext
6155                 done
6156                 echo "$as_me:6156: result: $CC_SHARED_OPTS" >&5
6157 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6158                 CFLAGS="$cf_save_CFLAGS"
6159         fi
6160
6161         cf_cv_shlib_version_infix=no
6162
6163         case $cf_cv_system_name in
6164         (aix4.3-9*|aix[5-7]*)
6165                 if test "$GCC" = yes; then
6166                         CC_SHARED_OPTS='-Wl,-brtl'
6167                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6168                 else
6169                         CC_SHARED_OPTS='-brtl'
6170                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6171                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6172                 fi
6173                 ;;
6174         (beos*)
6175                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6176                 ;;
6177         (cygwin*)
6178                 CC_SHARED_OPTS=
6179                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6180                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6181                 cf_cv_shlib_version=cygdll
6182                 cf_cv_shlib_version_infix=cygdll
6183                 shlibdir=$bindir
6184                 MAKE_DLLS=
6185                 cat >mk_shared_lib.sh <<-CF_EOF
6186                 #!$SHELL
6187                 SHARED_LIB=\$1
6188                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6189                 shift
6190                 cat <<-EOF
6191                 Linking shared library
6192                 ** SHARED_LIB \$SHARED_LIB
6193                 ** IMPORT_LIB \$IMPORT_LIB
6194 EOF
6195                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6196 CF_EOF
6197                 chmod +x mk_shared_lib.sh
6198                 ;;
6199         (msys*)
6200                 CC_SHARED_OPTS=
6201                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6202                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6203                 cf_cv_shlib_version=msysdll
6204                 cf_cv_shlib_version_infix=msysdll
6205                 shlibdir=$bindir
6206                 MAKE_DLLS=
6207                 cat >mk_shared_lib.sh <<-CF_EOF
6208                 #!$SHELL
6209                 SHARED_LIB=\$1
6210                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6211                 shift
6212                 cat <<-EOF
6213                 Linking shared library
6214                 ** SHARED_LIB \$SHARED_LIB
6215                 ** IMPORT_LIB \$IMPORT_LIB
6216 EOF
6217                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6218 CF_EOF
6219                 chmod +x mk_shared_lib.sh
6220                 ;;
6221         (darwin*)
6222                 cf_try_cflags="no-cpp-precomp"
6223                 CC_SHARED_OPTS="-dynamic"
6224                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6225                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6226                 cf_cv_shlib_version_infix=yes
6227                 echo "$as_me:6227: checking if ld -search_paths_first works" >&5
6228 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6229 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6230   echo $ECHO_N "(cached) $ECHO_C" >&6
6231 else
6232
6233                         cf_save_LDFLAGS=$LDFLAGS
6234                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6235                         cat >conftest.$ac_ext <<_ACEOF
6236 #line 6236 "configure"
6237 #include "confdefs.h"
6238
6239 int
6240 main (void)
6241 {
6242 int i;
6243   ;
6244   return 0;
6245 }
6246 _ACEOF
6247 rm -f conftest.$ac_objext conftest$ac_exeext
6248 if { (eval echo "$as_me:6248: \"$ac_link\"") >&5
6249   (eval $ac_link) 2>&5
6250   ac_status=$?
6251   echo "$as_me:6251: \$? = $ac_status" >&5
6252   (exit $ac_status); } &&
6253          { ac_try='test -s conftest$ac_exeext'
6254   { (eval echo "$as_me:6254: \"$ac_try\"") >&5
6255   (eval $ac_try) 2>&5
6256   ac_status=$?
6257   echo "$as_me:6257: \$? = $ac_status" >&5
6258   (exit $ac_status); }; }; then
6259   cf_cv_ldflags_search_paths_first=yes
6260 else
6261   echo "$as_me: failed program was:" >&5
6262 cat conftest.$ac_ext >&5
6263 cf_cv_ldflags_search_paths_first=no
6264 fi
6265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6266                                 LDFLAGS=$cf_save_LDFLAGS
6267 fi
6268 echo "$as_me:6268: result: $cf_cv_ldflags_search_paths_first" >&5
6269 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6270                 if test $cf_cv_ldflags_search_paths_first = yes; then
6271                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6272                 fi
6273                 ;;
6274         (hpux[7-8]*)
6275                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6276                 if test "$GCC" != yes; then
6277                         CC_SHARED_OPTS='+Z'
6278                 fi
6279                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6280                 INSTALL_LIB="-m 555"
6281                 ;;
6282         (hpux*)
6283                 # (tested with gcc 2.7.2 -- I don't have c89)
6284                 if test "$GCC" = yes; then
6285                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6286                 else
6287                         CC_SHARED_OPTS='+Z'
6288                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6289                 fi
6290                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6291                 # HP-UX shared libraries must be executable, and should be
6292                 # readonly to exploit a quirk in the memory manager.
6293                 INSTALL_LIB="-m 555"
6294                 ;;
6295         (interix*)
6296                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6297                 if test "$cf_cv_shlib_version" = rel; then
6298                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6299                 else
6300                         cf_shared_soname='`basename $@`'
6301                 fi
6302                 CC_SHARED_OPTS=
6303                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6304                 ;;
6305         (irix*)
6306                 if test "$cf_cv_enable_rpath" = yes ; then
6307                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6308                 fi
6309                 # tested with IRIX 5.2 and 'cc'.
6310                 if test "$GCC" != yes; then
6311                         CC_SHARED_OPTS='-KPIC'
6312                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6313                 else
6314                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6315                 fi
6316                 cf_cv_rm_so_locs=yes
6317                 ;;
6318         (linux*|gnu*|k*bsd*-gnu)
6319                 if test "$DFT_LWR_MODEL" = "shared" ; then
6320                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6321                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6322                 fi
6323                 if test "$cf_cv_enable_rpath" = yes ; then
6324                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6325                 fi
6326
6327         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6328         if test "$cf_cv_shlib_version" = rel; then
6329                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6330         else
6331                 cf_cv_shared_soname='`basename $@`'
6332         fi
6333
6334                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6335                 ;;
6336         (mingw*)
6337                 cf_cv_shlib_version=mingw
6338                 cf_cv_shlib_version_infix=mingw
6339                 shlibdir=$bindir
6340                 MAKE_DLLS=
6341                 if test "$DFT_LWR_MODEL" = "shared" ; then
6342                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6343                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6344                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6345                 fi
6346                 CC_SHARED_OPTS=
6347                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6348                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6349                 cat >mk_shared_lib.sh <<-CF_EOF
6350                 #!$SHELL
6351                 SHARED_LIB=\$1
6352                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6353                 shift
6354                 cat <<-EOF
6355                 Linking shared library
6356                 ** SHARED_LIB \$SHARED_LIB
6357                 ** IMPORT_LIB \$IMPORT_LIB
6358 EOF
6359                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6360 CF_EOF
6361                 chmod +x mk_shared_lib.sh
6362                 ;;
6363         (openbsd[2-9].*|mirbsd*)
6364                 if test "$DFT_LWR_MODEL" = "shared" ; then
6365                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6366                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6367                 fi
6368                 if test "$cf_cv_enable_rpath" = yes ; then
6369                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6370                 fi
6371                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6372
6373         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6374         if test "$cf_cv_shlib_version" = rel; then
6375                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6376         else
6377                 cf_cv_shared_soname='`basename $@`'
6378         fi
6379
6380                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6381                 ;;
6382         (nto-qnx*|openbsd*|freebsd[12].*)
6383                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6384                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6385                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6386                 ;;
6387         (dragonfly*|freebsd*)
6388                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6389                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6390                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6391                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6392                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6393                 fi
6394
6395         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6396         if test "$cf_cv_shlib_version" = rel; then
6397                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6398         else
6399                 cf_cv_shared_soname='`basename $@`'
6400         fi
6401
6402                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6403                 ;;
6404         (netbsd*)
6405                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6406                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6407                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6408                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6409                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6410                         if test "$cf_cv_shlib_version" = auto; then
6411                         if test -f /usr/libexec/ld.elf_so; then
6412                                 cf_cv_shlib_version=abi
6413                         else
6414                                 cf_cv_shlib_version=rel
6415                         fi
6416                         fi
6417
6418         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6419         if test "$cf_cv_shlib_version" = rel; then
6420                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6421         else
6422                 cf_cv_shared_soname='`basename $@`'
6423         fi
6424
6425                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6426                 else
6427                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6428                 fi
6429                 ;;
6430         (osf*|mls+*)
6431                 # tested with OSF/1 V3.2 and 'cc'
6432                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6433                 # link with shared libs).
6434                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6435                 case $host_os in
6436                 (osf4*)
6437                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6438                         ;;
6439                 esac
6440                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6441                 if test "$DFT_LWR_MODEL" = "shared" ; then
6442                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6443                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6444                 fi
6445                 cf_cv_rm_so_locs=yes
6446                 ;;
6447         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6448                 # tested with osr5.0.5
6449                 if test "$GCC" != yes; then
6450                         CC_SHARED_OPTS='-belf -KPIC'
6451                 fi
6452                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6453                 if test "$cf_cv_enable_rpath" = yes ; then
6454                         # only way is to set LD_RUN_PATH but no switch for it
6455                         RUN_PATH=$libdir
6456                 fi
6457                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6458                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6459                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6460                 ;;
6461         (sunos4*)
6462                 # tested with SunOS 4.1.1 and gcc 2.7.0
6463                 if test "$GCC" != yes; then
6464                         CC_SHARED_OPTS='-KPIC'
6465                 fi
6466                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6467                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6468                 ;;
6469         (solaris2*)
6470                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6471                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6472                 if test "$DFT_LWR_MODEL" = "shared" ; then
6473                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6474                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6475                 fi
6476                 if test "$cf_cv_enable_rpath" = yes ; then
6477                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6478                 fi
6479
6480         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6481         if test "$cf_cv_shlib_version" = rel; then
6482                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6483         else
6484                 cf_cv_shared_soname='`basename $@`'
6485         fi
6486
6487                 if test "$GCC" != yes; then
6488                         cf_save_CFLAGS="$CFLAGS"
6489                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6490                         do
6491                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6492                                 cat >conftest.$ac_ext <<_ACEOF
6493 #line 6493 "configure"
6494 #include "confdefs.h"
6495 #include <stdio.h>
6496 int
6497 main (void)
6498 {
6499 printf("Hello\n");
6500   ;
6501   return 0;
6502 }
6503 _ACEOF
6504 rm -f conftest.$ac_objext
6505 if { (eval echo "$as_me:6505: \"$ac_compile\"") >&5
6506   (eval $ac_compile) 2>&5
6507   ac_status=$?
6508   echo "$as_me:6508: \$? = $ac_status" >&5
6509   (exit $ac_status); } &&
6510          { ac_try='test -s conftest.$ac_objext'
6511   { (eval echo "$as_me:6511: \"$ac_try\"") >&5
6512   (eval $ac_try) 2>&5
6513   ac_status=$?
6514   echo "$as_me:6514: \$? = $ac_status" >&5
6515   (exit $ac_status); }; }; then
6516   break
6517 else
6518   echo "$as_me: failed program was:" >&5
6519 cat conftest.$ac_ext >&5
6520 fi
6521 rm -f conftest.$ac_objext conftest.$ac_ext
6522                         done
6523                         CFLAGS="$cf_save_CFLAGS"
6524                         CC_SHARED_OPTS=$cf_shared_opts
6525                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6526                 else
6527                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6528                 fi
6529                 ;;
6530         (sysv5uw7*|unix_sv*)
6531                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6532                 if test "$GCC" != yes; then
6533                         CC_SHARED_OPTS='-KPIC'
6534                 fi
6535                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6536                 ;;
6537         (*)
6538                 CC_SHARED_OPTS='unknown'
6539                 MK_SHARED_LIB='echo unknown'
6540                 ;;
6541         esac
6542
6543         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6544         case "$cf_cv_shlib_version" in
6545         (rel|abi)
6546                 case "$MK_SHARED_LIB" in
6547                 (*'-o $@')
6548                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6549                         ;;
6550                 (*)
6551                         { echo "$as_me:6551: WARNING: ignored --with-shlib-version" >&5
6552 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6553                         ;;
6554                 esac
6555                 ;;
6556         esac
6557
6558         if test -n "$cf_try_cflags"
6559         then
6560 cat > conftest.$ac_ext <<EOF
6561 #line 6561 "${as_me:-configure}"
6562 #include <stdio.h>
6563 int main(int argc, char *argv[])
6564 {
6565         printf("hello\n");
6566         return (argv[argc-1] == 0) ;
6567 }
6568 EOF
6569                 cf_save_CFLAGS="$CFLAGS"
6570                 for cf_opt in $cf_try_cflags
6571                 do
6572                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6573                         echo "$as_me:6573: checking if CFLAGS option -$cf_opt works" >&5
6574 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6575                         if { (eval echo "$as_me:6575: \"$ac_compile\"") >&5
6576   (eval $ac_compile) 2>&5
6577   ac_status=$?
6578   echo "$as_me:6578: \$? = $ac_status" >&5
6579   (exit $ac_status); }; then
6580                                 echo "$as_me:6580: result: yes" >&5
6581 echo "${ECHO_T}yes" >&6
6582                                 cf_save_CFLAGS="$CFLAGS"
6583                         else
6584                                 echo "$as_me:6584: result: no" >&5
6585 echo "${ECHO_T}no" >&6
6586                         fi
6587                 done
6588                 CFLAGS="$cf_save_CFLAGS"
6589         fi
6590
6591         # RPATH_LIST is a colon-separated list of directories
6592         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6593         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6594
6595         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6596
6597         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6598
6599 echo "${as_me:-configure}:6599: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6600
6601         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6602
6603 echo "${as_me:-configure}:6603: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6604
6605 for model in $cf_list_models; do
6606         case $model in
6607         (libtool)
6608
6609 echo "$as_me:6609: checking for additional libtool options" >&5
6610 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6611
6612 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6613 if test "${with_libtool_opts+set}" = set; then
6614   withval="$with_libtool_opts"
6615   with_libtool_opts=$withval
6616 else
6617   with_libtool_opts=no
6618 fi;
6619 echo "$as_me:6619: result: $with_libtool_opts" >&5
6620 echo "${ECHO_T}$with_libtool_opts" >&6
6621
6622 case .$with_libtool_opts in
6623 (.yes|.no|.)
6624         ;;
6625 (*)
6626         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6627         ;;
6628 esac
6629
6630 echo "$as_me:6630: checking if exported-symbols file should be used" >&5
6631 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6632
6633 # Check whether --with-export-syms or --without-export-syms was given.
6634 if test "${with_export_syms+set}" = set; then
6635   withval="$with_export_syms"
6636   with_export_syms=$withval
6637 else
6638   with_export_syms=no
6639 fi;
6640 if test "x$with_export_syms" = xyes
6641 then
6642         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6643
6644 fi
6645 echo "$as_me:6645: result: $with_export_syms" >&5
6646 echo "${ECHO_T}$with_export_syms" >&6
6647 if test "x$with_export_syms" != xno
6648 then
6649         EXPORT_SYMS="-export-symbols $with_export_syms"
6650
6651 fi
6652
6653                 ;;
6654         (shared)
6655                 if test "$CC_SHARED_OPTS" = "unknown"; then
6656                         { { echo "$as_me:6656: error: Shared libraries are not supported in this version" >&5
6657 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6658    { (exit 1); exit 1; }; }
6659                 fi
6660                 # workaround for inept transition to PIE vs PIC...
6661                 echo "$as_me:6661: checking if current CFLAGS link properly" >&5
6662 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6663                 cat >conftest.$ac_ext <<_ACEOF
6664 #line 6664 "configure"
6665 #include "confdefs.h"
6666 #include <stdio.h>
6667 int
6668 main (void)
6669 {
6670 printf("Hello work\n");
6671   ;
6672   return 0;
6673 }
6674 _ACEOF
6675 rm -f conftest.$ac_objext conftest$ac_exeext
6676 if { (eval echo "$as_me:6676: \"$ac_link\"") >&5
6677   (eval $ac_link) 2>&5
6678   ac_status=$?
6679   echo "$as_me:6679: \$? = $ac_status" >&5
6680   (exit $ac_status); } &&
6681          { ac_try='test -s conftest$ac_exeext'
6682   { (eval echo "$as_me:6682: \"$ac_try\"") >&5
6683   (eval $ac_try) 2>&5
6684   ac_status=$?
6685   echo "$as_me:6685: \$? = $ac_status" >&5
6686   (exit $ac_status); }; }; then
6687   cf_cflags_work=yes
6688 else
6689   echo "$as_me: failed program was:" >&5
6690 cat conftest.$ac_ext >&5
6691 cf_cflags_work=no
6692 fi
6693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6694                 echo "$as_me:6694: result: $cf_cflags_work" >&5
6695 echo "${ECHO_T}$cf_cflags_work" >&6
6696                 if test "$cf_cflags_work" = no
6697                 then
6698                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6699
6700 echo "${as_me:-configure}:6700: testing try to work around by appending shared-options ..." 1>&5
6701
6702                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6703                 fi
6704
6705 echo "$as_me:6705: checking if versioned-symbols file should be used" >&5
6706 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6707
6708 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6709 if test "${with_versioned_syms+set}" = set; then
6710   withval="$with_versioned_syms"
6711   with_versioned_syms=$withval
6712 else
6713   with_versioned_syms=no
6714 fi;
6715 if test "x$with_versioned_syms" = xyes
6716 then
6717         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6718
6719 fi
6720 echo "$as_me:6720: result: $with_versioned_syms" >&5
6721 echo "${ECHO_T}$with_versioned_syms" >&6
6722
6723 RESULTING_SYMS=
6724 VERSIONED_SYMS=
6725 WILDCARD_SYMS=
6726
6727 if test "x$with_versioned_syms" != xno
6728 then
6729         RESULTING_SYMS=$with_versioned_syms
6730         case "x$MK_SHARED_LIB" in
6731         (*-Wl,*)
6732                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6733                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6734                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6735
6736 echo "${as_me:-configure}:6736: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6737
6738                 ;;
6739         (*-dy\ *)
6740                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6741                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6742                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6743
6744 echo "${as_me:-configure}:6744: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6745
6746                 ;;
6747         (*)
6748                 { echo "$as_me:6748: WARNING: this system does not support versioned-symbols" >&5
6749 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6750                 ;;
6751         esac
6752
6753         # Linux ld can selectively override scope, e.g., of symbols beginning with
6754         # "_" by first declaring some as global, and then using a wildcard to
6755         # declare the others as local.  Some other loaders cannot do this.  Check
6756         # by constructing a (very) simple shared library and inspecting its
6757         # symbols.
6758         if test "x$VERSIONED_SYMS" != "x"
6759         then
6760                 echo "$as_me:6760: checking if wildcards can be used to selectively omit symbols" >&5
6761 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6762                 WILDCARD_SYMS=no
6763
6764                 # make sources
6765                 rm -f conftest.*
6766
6767                 cat >conftest.ver <<EOF
6768 module_1.0 {
6769 global:
6770         globalf1;
6771 local:
6772         localf1;
6773 };
6774 module_2.0 {
6775 global:
6776         globalf2;
6777 local:
6778         localf2;
6779         _*;
6780 } module_1.0;
6781 submodule_1.0 {
6782 global:
6783         subglobalf1;
6784         _ismissing;
6785 local:
6786         sublocalf1;
6787 };
6788 submodule_2.0 {
6789 global:
6790         subglobalf2;
6791 local:
6792         sublocalf2;
6793         _*;
6794 } submodule_1.0;
6795 EOF
6796                 cat >conftest.$ac_ext <<EOF
6797 #line 6797 "configure"
6798 int     _ismissing(void) { return 1; }
6799 int     _localf1(void) { return 1; }
6800 int     _localf2(void) { return 2; }
6801 int     globalf1(void) { return 1; }
6802 int     globalf2(void) { return 2; }
6803 int     _sublocalf1(void) { return 1; }
6804 int     _sublocalf2(void) { return 2; }
6805 int     subglobalf1(void) { return 1; }
6806 int     subglobalf2(void) { return 2; }
6807 EOF
6808                 cat >conftest.mk <<EOF
6809 CC=${CC}
6810 CFLAGS=${CFLAGS}
6811 CPPFLAGS=${CPPFLAGS}
6812 LDFLAGS=${LDFLAGS}
6813 LIBS=${LIBS}
6814 VERSIONED_SYMS=${VERSIONED_SYMS}
6815 RESULTING_SYMS=conftest.ver
6816 MK_SHARED_LIB=${MK_SHARED_LIB}
6817 conftest.so: conftest.$ac_cv_objext
6818                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6819 EOF
6820
6821                 # compile source, make library
6822                 if make -f conftest.mk 2>&5 >/dev/null
6823                 then
6824                         # test for missing symbol in either Data or Text section
6825                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6826                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6827                 fi
6828                 echo "$as_me:6828: result: $WILDCARD_SYMS" >&5
6829 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6830                 rm -f conftest.*
6831         fi
6832 fi
6833
6834                 ;;
6835         esac
6836 done
6837
6838 # pretend that ncurses==ncursesw==ncursest
6839 echo "$as_me:6839: checking if you want to disable library suffixes" >&5
6840 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6841
6842 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6843 if test "${enable_lib_suffixes+set}" = set; then
6844   enableval="$enable_lib_suffixes"
6845   test "$enableval" != no && enableval=yes
6846         if test "$enableval" != "yes" ; then
6847     disable_lib_suffixes=yes
6848         else
6849                 disable_lib_suffixes=no
6850         fi
6851 else
6852   enableval=yes
6853         disable_lib_suffixes=no
6854
6855 fi;
6856 echo "$as_me:6856: result: $disable_lib_suffixes" >&5
6857 echo "${ECHO_T}$disable_lib_suffixes" >&6
6858
6859 ### If we're building with rpath, try to link non-standard libs that way too.
6860 if test "$DFT_LWR_MODEL" = "shared"; then
6861
6862 echo "$as_me:6862: checking if rpath-hack should be disabled" >&5
6863 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6864
6865 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6866 if test "${enable_rpath_hack+set}" = set; then
6867   enableval="$enable_rpath_hack"
6868   test "$enableval" != no && enableval=yes
6869         if test "$enableval" != "yes" ; then
6870     cf_disable_rpath_hack=yes
6871         else
6872                 cf_disable_rpath_hack=no
6873         fi
6874 else
6875   enableval=yes
6876         cf_disable_rpath_hack=no
6877
6878 fi;
6879 echo "$as_me:6879: result: $cf_disable_rpath_hack" >&5
6880 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6881 if test "$cf_disable_rpath_hack" = no ; then
6882
6883 echo "$as_me:6883: checking for updated LDFLAGS" >&5
6884 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6885 if test -n "$LD_RPATH_OPT" ; then
6886         echo "$as_me:6886: result: maybe" >&5
6887 echo "${ECHO_T}maybe" >&6
6888
6889         for ac_prog in ldd
6890 do
6891   # Extract the first word of "$ac_prog", so it can be a program name with args.
6892 set dummy $ac_prog; ac_word=$2
6893 echo "$as_me:6893: checking for $ac_word" >&5
6894 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6895 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6896   echo $ECHO_N "(cached) $ECHO_C" >&6
6897 else
6898   if test -n "$cf_ldd_prog"; then
6899   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6900 else
6901   ac_save_IFS=$IFS; IFS=$ac_path_separator
6902 ac_dummy="$PATH"
6903 for ac_dir in $ac_dummy; do
6904   IFS=$ac_save_IFS
6905   test -z "$ac_dir" && ac_dir=.
6906   $as_executable_p "$ac_dir/$ac_word" || continue
6907 ac_cv_prog_cf_ldd_prog="$ac_prog"
6908 echo "$as_me:6908: found $ac_dir/$ac_word" >&5
6909 break
6910 done
6911
6912 fi
6913 fi
6914 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6915 if test -n "$cf_ldd_prog"; then
6916   echo "$as_me:6916: result: $cf_ldd_prog" >&5
6917 echo "${ECHO_T}$cf_ldd_prog" >&6
6918 else
6919   echo "$as_me:6919: result: no" >&5
6920 echo "${ECHO_T}no" >&6
6921 fi
6922
6923   test -n "$cf_ldd_prog" && break
6924 done
6925 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6926
6927         cf_rpath_list="/usr/lib /lib"
6928         if test "$cf_ldd_prog" != no
6929         then
6930                 cf_rpath_oops=
6931
6932 cat >conftest.$ac_ext <<_ACEOF
6933 #line 6933 "configure"
6934 #include "confdefs.h"
6935 #include <stdio.h>
6936 int
6937 main (void)
6938 {
6939 printf("Hello");
6940   ;
6941   return 0;
6942 }
6943 _ACEOF
6944 rm -f conftest.$ac_objext conftest$ac_exeext
6945 if { (eval echo "$as_me:6945: \"$ac_link\"") >&5
6946   (eval $ac_link) 2>&5
6947   ac_status=$?
6948   echo "$as_me:6948: \$? = $ac_status" >&5
6949   (exit $ac_status); } &&
6950          { ac_try='test -s conftest$ac_exeext'
6951   { (eval echo "$as_me:6951: \"$ac_try\"") >&5
6952   (eval $ac_try) 2>&5
6953   ac_status=$?
6954   echo "$as_me:6954: \$? = $ac_status" >&5
6955   (exit $ac_status); }; }; then
6956   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6957                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6958 else
6959   echo "$as_me: failed program was:" >&5
6960 cat conftest.$ac_ext >&5
6961 fi
6962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6963
6964                 # If we passed the link-test, but get a "not found" on a given library,
6965                 # this could be due to inept reconfiguration of gcc to make it only
6966                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6967                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6968                 # /usr/local libraries.
6969                 if test -n "$cf_rpath_oops"
6970                 then
6971                         for cf_rpath_src in $cf_rpath_oops
6972                         do
6973                                 for cf_rpath_dir in \
6974                                         /usr/local \
6975                                         /usr/pkg \
6976                                         /opt/sfw
6977                                 do
6978                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6979                                         then
6980                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6981
6982 echo "${as_me:-configure}:6982: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6983
6984                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6985                                                 break
6986                                         fi
6987                                 done
6988                         done
6989                 fi
6990         fi
6991
6992         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6993
6994 echo "${as_me:-configure}:6994: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6995
6996 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6997
6998 echo "${as_me:-configure}:6998: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6999
7000 cf_rpath_dst=
7001 for cf_rpath_src in $LDFLAGS
7002 do
7003         case $cf_rpath_src in
7004         (-L*)
7005
7006                 # check if this refers to a directory which we will ignore
7007                 cf_rpath_skip=no
7008                 if test -n "$cf_rpath_list"
7009                 then
7010                         for cf_rpath_item in $cf_rpath_list
7011                         do
7012                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7013                                 then
7014                                         cf_rpath_skip=yes
7015                                         break
7016                                 fi
7017                         done
7018                 fi
7019
7020                 if test "$cf_rpath_skip" = no
7021                 then
7022                         # transform the option
7023                         if test "$LD_RPATH_OPT" = "-R " ; then
7024                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7025                         else
7026                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7027                         fi
7028
7029                         # if we have not already added this, add it now
7030                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7031                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7032                         then
7033                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7034
7035 echo "${as_me:-configure}:7035: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7036
7037                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7038                         fi
7039                 fi
7040                 ;;
7041         esac
7042         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7043 done
7044 LDFLAGS=$cf_rpath_dst
7045
7046 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7047
7048 echo "${as_me:-configure}:7048: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7049
7050 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7051
7052 echo "${as_me:-configure}:7052: testing ...checking LIBS $LIBS ..." 1>&5
7053
7054 cf_rpath_dst=
7055 for cf_rpath_src in $LIBS
7056 do
7057         case $cf_rpath_src in
7058         (-L*)
7059
7060                 # check if this refers to a directory which we will ignore
7061                 cf_rpath_skip=no
7062                 if test -n "$cf_rpath_list"
7063                 then
7064                         for cf_rpath_item in $cf_rpath_list
7065                         do
7066                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7067                                 then
7068                                         cf_rpath_skip=yes
7069                                         break
7070                                 fi
7071                         done
7072                 fi
7073
7074                 if test "$cf_rpath_skip" = no
7075                 then
7076                         # transform the option
7077                         if test "$LD_RPATH_OPT" = "-R " ; then
7078                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7079                         else
7080                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7081                         fi
7082
7083                         # if we have not already added this, add it now
7084                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7085                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7086                         then
7087                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7088
7089 echo "${as_me:-configure}:7089: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7090
7091                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7092                         fi
7093                 fi
7094                 ;;
7095         esac
7096         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7097 done
7098 LIBS=$cf_rpath_dst
7099
7100 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7101
7102 echo "${as_me:-configure}:7102: testing ...checked LIBS $LIBS ..." 1>&5
7103
7104         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7105
7106 echo "${as_me:-configure}:7106: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7107
7108 else
7109         echo "$as_me:7109: result: no" >&5
7110 echo "${ECHO_T}no" >&6
7111 fi
7112
7113 fi
7114
7115 fi
7116
7117 ###############################################################################
7118
7119 ###     use option --with-extra-suffix to append suffix to headers and libraries
7120 echo "$as_me:7120: checking if you wish to append extra suffix to header/library paths" >&5
7121 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7122 EXTRA_SUFFIX=
7123
7124 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7125 if test "${with_extra_suffix+set}" = set; then
7126   withval="$with_extra_suffix"
7127   case x$withval in
7128         (no)
7129                 ;;
7130         (xyes|x)
7131                 EXTRA_SUFFIX=$cf_cv_abi_version
7132                 ;;
7133         (*)
7134                 EXTRA_SUFFIX=$withval
7135                 ;;
7136         esac
7137
7138 fi;
7139 echo "$as_me:7139: result: $EXTRA_SUFFIX" >&5
7140 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7141
7142 ###     use option --disable-overwrite to leave out the link to -lcurses
7143 echo "$as_me:7143: checking if you wish to install ncurses overwriting curses" >&5
7144 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7145
7146 # Check whether --enable-overwrite or --disable-overwrite was given.
7147 if test "${enable_overwrite+set}" = set; then
7148   enableval="$enable_overwrite"
7149   with_overwrite=$enableval
7150 else
7151   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7152 fi;
7153 echo "$as_me:7153: result: $with_overwrite" >&5
7154 echo "${ECHO_T}$with_overwrite" >&6
7155
7156 echo "$as_me:7156: checking if external terminfo-database is used" >&5
7157 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7158
7159 # Check whether --enable-database or --disable-database was given.
7160 if test "${enable_database+set}" = set; then
7161   enableval="$enable_database"
7162   use_database=$enableval
7163 else
7164   use_database=yes
7165 fi;
7166 echo "$as_me:7166: result: $use_database" >&5
7167 echo "${ECHO_T}$use_database" >&6
7168
7169 case $host_os in
7170 (os2*)
7171         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7172         ;;
7173 (*)
7174         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7175         ;;
7176 esac
7177
7178 NCURSES_USE_DATABASE=0
7179 if test "$use_database" != no ; then
7180         NCURSES_USE_DATABASE=1
7181
7182         echo "$as_me:7182: checking which terminfo source-file will be installed" >&5
7183 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7184
7185 # Check whether --with-database or --without-database was given.
7186 if test "${with_database+set}" = set; then
7187   withval="$with_database"
7188   TERMINFO_SRC=$withval
7189 fi;
7190         echo "$as_me:7190: result: $TERMINFO_SRC" >&5
7191 echo "${ECHO_T}$TERMINFO_SRC" >&6
7192
7193         echo "$as_me:7193: checking whether to use hashed database instead of directory/tree" >&5
7194 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7195
7196 # Check whether --with-hashed-db or --without-hashed-db was given.
7197 if test "${with_hashed_db+set}" = set; then
7198   withval="$with_hashed_db"
7199
7200 else
7201   with_hashed_db=no
7202 fi;
7203         echo "$as_me:7203: result: $with_hashed_db" >&5
7204 echo "${ECHO_T}$with_hashed_db" >&6
7205 else
7206         with_hashed_db=no
7207 fi
7208
7209 echo "$as_me:7209: checking for list of fallback descriptions" >&5
7210 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7211
7212 # Check whether --with-fallbacks or --without-fallbacks was given.
7213 if test "${with_fallbacks+set}" = set; then
7214   withval="$with_fallbacks"
7215   with_fallback=$withval
7216 else
7217   with_fallback=
7218 fi;
7219 echo "$as_me:7219: result: $with_fallback" >&5
7220 echo "${ECHO_T}$with_fallback" >&6
7221 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7222
7223 echo "$as_me:7223: checking if you want modern xterm or antique" >&5
7224 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7225
7226 # Check whether --with-xterm-new or --without-xterm-new was given.
7227 if test "${with_xterm_new+set}" = set; then
7228   withval="$with_xterm_new"
7229   with_xterm_new=$withval
7230 else
7231   with_xterm_new=yes
7232 fi;
7233 case $with_xterm_new in
7234 (no) with_xterm_new=xterm-old;;
7235 (*)      with_xterm_new=xterm-new;;
7236 esac
7237 echo "$as_me:7237: result: $with_xterm_new" >&5
7238 echo "${ECHO_T}$with_xterm_new" >&6
7239 WHICH_XTERM=$with_xterm_new
7240
7241 echo "$as_me:7241: checking if xterm backspace sends BS or DEL" >&5
7242 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7243
7244 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7245 if test "${with_xterm_kbs+set}" = set; then
7246   withval="$with_xterm_kbs"
7247   with_xterm_kbs=$withval
7248 else
7249   with_xterm_kbs=BS
7250 fi;
7251 case x$with_xterm_kbs in
7252 (xyes|xno|xBS|xbs|x8)
7253         with_xterm_kbs=BS
7254         ;;
7255 (xDEL|xdel|x127)
7256         with_xterm_kbs=DEL
7257         ;;
7258 (*)
7259         with_xterm_kbs=$withval
7260         ;;
7261 esac
7262 echo "$as_me:7262: result: $with_xterm_kbs" >&5
7263 echo "${ECHO_T}$with_xterm_kbs" >&6
7264 XTERM_KBS=$with_xterm_kbs
7265
7266 MAKE_TERMINFO=
7267 if test "$use_database" = no ; then
7268         TERMINFO="${datadir}/terminfo"
7269         MAKE_TERMINFO="#"
7270 else
7271
7272 echo "$as_me:7272: checking for list of terminfo directories" >&5
7273 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7274
7275 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7276 if test "${with_terminfo_dirs+set}" = set; then
7277   withval="$with_terminfo_dirs"
7278
7279 else
7280   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7281 fi;
7282 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7283 cf_dst_path=
7284 for cf_src_path in $withval
7285 do
7286
7287 if test "x$prefix" != xNONE; then
7288         cf_path_syntax="$prefix"
7289 else
7290         cf_path_syntax="$ac_default_prefix"
7291 fi
7292
7293 case ".$cf_src_path" in
7294 (.\$\(*\)*|.\'*\'*)
7295         ;;
7296 (..|./*|.\\*)
7297         ;;
7298 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7299         ;;
7300 (.\${*prefix}*|.\${*dir}*)
7301         eval cf_src_path="$cf_src_path"
7302         case ".$cf_src_path" in
7303         (.NONE/*)
7304                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7305                 ;;
7306         esac
7307         ;;
7308 (.no|.NONE/*)
7309         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7310         ;;
7311 (*)
7312         { { echo "$as_me:7312: error: expected a pathname, not \"$cf_src_path\"" >&5
7313 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7314    { (exit 1); exit 1; }; }
7315         ;;
7316 esac
7317
7318   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7319   cf_dst_path="${cf_dst_path}${cf_src_path}"
7320 done
7321 IFS="$ac_save_ifs"
7322
7323 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7324 # so we have to check/work around.  We do prefer the result of "eval"...
7325 eval cf_dst_eval="$cf_dst_path"
7326 case "x$cf_dst_eval" in
7327 (xNONE*)
7328         TERMINFO_DIRS=$cf_dst_path
7329         ;;
7330 (*)
7331         TERMINFO_DIRS="$cf_dst_eval"
7332         ;;
7333 esac
7334
7335 echo "$as_me:7335: result: $TERMINFO_DIRS" >&5
7336 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7337 test -n "$TERMINFO_DIRS" &&
7338 cat >>confdefs.h <<EOF
7339 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7340 EOF
7341
7342 echo "$as_me:7342: checking for default terminfo directory" >&5
7343 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7344
7345 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7346 if test "${with_default_terminfo_dir+set}" = set; then
7347   withval="$with_default_terminfo_dir"
7348
7349 else
7350   withval="${TERMINFO:-${datadir}/terminfo}"
7351 fi; if test -n "${datadir}/terminfo" ; then
7352
7353 if test "x$prefix" != xNONE; then
7354         cf_path_syntax="$prefix"
7355 else
7356         cf_path_syntax="$ac_default_prefix"
7357 fi
7358
7359 case ".$withval" in
7360 (.\$\(*\)*|.\'*\'*)
7361         ;;
7362 (..|./*|.\\*)
7363         ;;
7364 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7365         ;;
7366 (.\${*prefix}*|.\${*dir}*)
7367         eval withval="$withval"
7368         case ".$withval" in
7369         (.NONE/*)
7370                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7371                 ;;
7372         esac
7373         ;;
7374 (.no|.NONE/*)
7375         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7376         ;;
7377 (*)
7378         { { echo "$as_me:7378: error: expected a pathname, not \"$withval\"" >&5
7379 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7380    { (exit 1); exit 1; }; }
7381         ;;
7382 esac
7383
7384 fi
7385 eval TERMINFO="$withval"
7386
7387 echo "$as_me:7387: result: $TERMINFO" >&5
7388 echo "${ECHO_T}$TERMINFO" >&6
7389
7390 cat >>confdefs.h <<EOF
7391 #define TERMINFO "$TERMINFO"
7392 EOF
7393
7394 fi
7395
7396 ###     use option --disable-big-core to make tic run on small machines
7397 ###     We need 4Mb, check if we can allocate 50% more than that.
7398 echo "$as_me:7398: checking if big-core option selected" >&5
7399 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7400
7401 # Check whether --enable-big-core or --disable-big-core was given.
7402 if test "${enable_big_core+set}" = set; then
7403   enableval="$enable_big_core"
7404   with_big_core=$enableval
7405 else
7406   if test "$cross_compiling" = yes; then
7407   with_big_core=no
7408 else
7409   cat >conftest.$ac_ext <<_ACEOF
7410 #line 7410 "configure"
7411 #include "confdefs.h"
7412
7413 #include <stdlib.h>
7414 #include <string.h>
7415 int main() {
7416         unsigned long n = 6000000L;
7417         char *s = malloc(n);
7418         if (s != 0)
7419                 s[0] = s[n-1] = 0;
7420         ${cf_cv_main_return:-return}(s == 0);
7421 }
7422 _ACEOF
7423 rm -f conftest$ac_exeext
7424 if { (eval echo "$as_me:7424: \"$ac_link\"") >&5
7425   (eval $ac_link) 2>&5
7426   ac_status=$?
7427   echo "$as_me:7427: \$? = $ac_status" >&5
7428   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7429   { (eval echo "$as_me:7429: \"$ac_try\"") >&5
7430   (eval $ac_try) 2>&5
7431   ac_status=$?
7432   echo "$as_me:7432: \$? = $ac_status" >&5
7433   (exit $ac_status); }; }; then
7434   with_big_core=yes
7435 else
7436   echo "$as_me: program exited with status $ac_status" >&5
7437 echo "$as_me: failed program was:" >&5
7438 cat conftest.$ac_ext >&5
7439 with_big_core=no
7440 fi
7441 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7442 fi
7443 fi;
7444 echo "$as_me:7444: result: $with_big_core" >&5
7445 echo "${ECHO_T}$with_big_core" >&6
7446 test "x$with_big_core" = "xyes" &&
7447 cat >>confdefs.h <<\EOF
7448 #define HAVE_BIG_CORE 1
7449 EOF
7450
7451 ### ISO C only guarantees 512-char strings, we have tables which load faster
7452 ### when constructed using "big" strings.  More than the C compiler, the awk
7453 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7454 echo "$as_me:7454: checking if big-strings option selected" >&5
7455 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7456
7457 # Check whether --enable-big-strings or --disable-big-strings was given.
7458 if test "${enable_big_strings+set}" = set; then
7459   enableval="$enable_big_strings"
7460   with_big_strings=$enableval
7461 else
7462
7463         case x$AWK in
7464         (x)
7465                 eval with_big_strings=no
7466                 ;;
7467         (*)
7468                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7469                         | $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
7470                         eval with_big_strings=yes
7471                 else
7472                         eval with_big_strings=no
7473                 fi
7474                 ;;
7475         esac
7476
7477 fi;
7478 echo "$as_me:7478: result: $with_big_strings" >&5
7479 echo "${ECHO_T}$with_big_strings" >&6
7480
7481 USE_BIG_STRINGS=0
7482 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7483
7484 ###     use option --enable-termcap to compile in the termcap fallback support
7485 echo "$as_me:7485: checking if you want termcap-fallback support" >&5
7486 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7487
7488 # Check whether --enable-termcap or --disable-termcap was given.
7489 if test "${enable_termcap+set}" = set; then
7490   enableval="$enable_termcap"
7491   with_termcap=$enableval
7492 else
7493   with_termcap=no
7494 fi;
7495 echo "$as_me:7495: result: $with_termcap" >&5
7496 echo "${ECHO_T}$with_termcap" >&6
7497
7498 NCURSES_USE_TERMCAP=0
7499 if test "x$with_termcap" != "xyes" ; then
7500         if test "$use_database" = no ; then
7501                 if test -z "$with_fallback" ; then
7502                         { { echo "$as_me:7502: error: You have disabled the database w/o specifying fallbacks" >&5
7503 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7504    { (exit 1); exit 1; }; }
7505                 fi
7506         fi
7507
7508 cat >>confdefs.h <<\EOF
7509 #define PURE_TERMINFO 1
7510 EOF
7511
7512 else
7513
7514         if test "$with_ticlib" != no ; then
7515                 { { echo "$as_me:7515: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7516 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7517    { (exit 1); exit 1; }; }
7518         fi
7519
7520         NCURSES_USE_TERMCAP=1
7521         echo "$as_me:7521: checking for list of termcap files" >&5
7522 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7523
7524 # Check whether --with-termpath or --without-termpath was given.
7525 if test "${with_termpath+set}" = set; then
7526   withval="$with_termpath"
7527
7528 else
7529   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7530 fi;
7531 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7532 cf_dst_path=
7533 for cf_src_path in $withval
7534 do
7535
7536 if test "x$prefix" != xNONE; then
7537         cf_path_syntax="$prefix"
7538 else
7539         cf_path_syntax="$ac_default_prefix"
7540 fi
7541
7542 case ".$cf_src_path" in
7543 (.\$\(*\)*|.\'*\'*)
7544         ;;
7545 (..|./*|.\\*)
7546         ;;
7547 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7548         ;;
7549 (.\${*prefix}*|.\${*dir}*)
7550         eval cf_src_path="$cf_src_path"
7551         case ".$cf_src_path" in
7552         (.NONE/*)
7553                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7554                 ;;
7555         esac
7556         ;;
7557 (.no|.NONE/*)
7558         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7559         ;;
7560 (*)
7561         { { echo "$as_me:7561: error: expected a pathname, not \"$cf_src_path\"" >&5
7562 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7563    { (exit 1); exit 1; }; }
7564         ;;
7565 esac
7566
7567   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7568   cf_dst_path="${cf_dst_path}${cf_src_path}"
7569 done
7570 IFS="$ac_save_ifs"
7571
7572 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7573 # so we have to check/work around.  We do prefer the result of "eval"...
7574 eval cf_dst_eval="$cf_dst_path"
7575 case "x$cf_dst_eval" in
7576 (xNONE*)
7577         TERMPATH=$cf_dst_path
7578         ;;
7579 (*)
7580         TERMPATH="$cf_dst_eval"
7581         ;;
7582 esac
7583
7584         echo "$as_me:7584: result: $TERMPATH" >&5
7585 echo "${ECHO_T}$TERMPATH" >&6
7586         test -n "$TERMPATH" &&
7587 cat >>confdefs.h <<EOF
7588 #define TERMPATH "$TERMPATH"
7589 EOF
7590
7591         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7592         echo "$as_me:7592: checking if fast termcap-loader is needed" >&5
7593 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7594
7595 # Check whether --enable-getcap or --disable-getcap was given.
7596 if test "${enable_getcap+set}" = set; then
7597   enableval="$enable_getcap"
7598   with_getcap=$enableval
7599 else
7600   with_getcap=no
7601 fi;
7602         echo "$as_me:7602: result: $with_getcap" >&5
7603 echo "${ECHO_T}$with_getcap" >&6
7604         test "x$with_getcap" = "xyes" &&
7605 cat >>confdefs.h <<\EOF
7606 #define USE_GETCAP 1
7607 EOF
7608
7609         echo "$as_me:7609: checking if translated termcaps will be cached in ~/.terminfo" >&5
7610 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7611
7612 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7613 if test "${enable_getcap_cache+set}" = set; then
7614   enableval="$enable_getcap_cache"
7615   with_getcap_cache=$enableval
7616 else
7617   with_getcap_cache=no
7618 fi;
7619         echo "$as_me:7619: result: $with_getcap_cache" >&5
7620 echo "${ECHO_T}$with_getcap_cache" >&6
7621         test "x$with_getcap_cache" = "xyes" &&
7622 cat >>confdefs.h <<\EOF
7623 #define USE_GETCAP_CACHE 1
7624 EOF
7625
7626 fi
7627
7628 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7629 echo "$as_me:7629: checking if ~/.terminfo is wanted" >&5
7630 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7631
7632 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7633 if test "${enable_home_terminfo+set}" = set; then
7634   enableval="$enable_home_terminfo"
7635   with_home_terminfo=$enableval
7636 else
7637   with_home_terminfo=yes
7638 fi;
7639 echo "$as_me:7639: result: $with_home_terminfo" >&5
7640 echo "${ECHO_T}$with_home_terminfo" >&6
7641 test "x$with_home_terminfo" = "xyes" &&
7642 cat >>confdefs.h <<\EOF
7643 #define USE_HOME_TERMINFO 1
7644 EOF
7645
7646 echo "$as_me:7646: checking if you want to use restricted environment when running as root" >&5
7647 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7648
7649 # Check whether --enable-root-environ or --disable-root-environ was given.
7650 if test "${enable_root_environ+set}" = set; then
7651   enableval="$enable_root_environ"
7652   with_root_environ=$enableval
7653 else
7654   with_root_environ=yes
7655 fi;
7656 echo "$as_me:7656: result: $with_root_environ" >&5
7657 echo "${ECHO_T}$with_root_environ" >&6
7658 test "x$with_root_environ" = xyes &&
7659 cat >>confdefs.h <<\EOF
7660 #define USE_ROOT_ENVIRON 1
7661 EOF
7662
7663 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7664 ###   to reduce storage requirements for the terminfo database.
7665
7666 for ac_header in \
7667 unistd.h \
7668
7669 do
7670 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7671 echo "$as_me:7671: checking for $ac_header" >&5
7672 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7673 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7674   echo $ECHO_N "(cached) $ECHO_C" >&6
7675 else
7676   cat >conftest.$ac_ext <<_ACEOF
7677 #line 7677 "configure"
7678 #include "confdefs.h"
7679 #include <$ac_header>
7680 _ACEOF
7681 if { (eval echo "$as_me:7681: \"$ac_cpp conftest.$ac_ext\"") >&5
7682   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7683   ac_status=$?
7684   egrep -v '^ *\+' conftest.er1 >conftest.err
7685   rm -f conftest.er1
7686   cat conftest.err >&5
7687   echo "$as_me:7687: \$? = $ac_status" >&5
7688   (exit $ac_status); } >/dev/null; then
7689   if test -s conftest.err; then
7690     ac_cpp_err=$ac_c_preproc_warn_flag
7691   else
7692     ac_cpp_err=
7693   fi
7694 else
7695   ac_cpp_err=yes
7696 fi
7697 if test -z "$ac_cpp_err"; then
7698   eval "$as_ac_Header=yes"
7699 else
7700   echo "$as_me: failed program was:" >&5
7701   cat conftest.$ac_ext >&5
7702   eval "$as_ac_Header=no"
7703 fi
7704 rm -f conftest.err conftest.$ac_ext
7705 fi
7706 echo "$as_me:7706: result: `eval echo '${'$as_ac_Header'}'`" >&5
7707 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7708 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7709   cat >>confdefs.h <<EOF
7710 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7711 EOF
7712
7713 fi
7714 done
7715
7716 for ac_func in \
7717         remove \
7718         unlink
7719 do
7720 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7721 echo "$as_me:7721: checking for $ac_func" >&5
7722 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7723 if eval "test \"\${$as_ac_var+set}\" = set"; then
7724   echo $ECHO_N "(cached) $ECHO_C" >&6
7725 else
7726   cat >conftest.$ac_ext <<_ACEOF
7727 #line 7727 "configure"
7728 #include "confdefs.h"
7729 /* System header to define __stub macros and hopefully few prototypes,
7730     which can conflict with char $ac_func (); below.  */
7731 #include <assert.h>
7732 /* Override any gcc2 internal prototype to avoid an error.  */
7733 #ifdef __cplusplus
7734 extern "C"
7735 #endif
7736 /* We use char because int might match the return type of a gcc2
7737    builtin and then its argument prototype would still apply.  */
7738 char $ac_func ();
7739 char (*f) ();
7740
7741 int
7742 main (void)
7743 {
7744 /* The GNU C library defines this for functions which it implements
7745     to always fail with ENOSYS.  Some functions are actually named
7746     something starting with __ and the normal name is an alias.  */
7747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7748 choke me
7749 #else
7750 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7751 #endif
7752
7753   ;
7754   return 0;
7755 }
7756 _ACEOF
7757 rm -f conftest.$ac_objext conftest$ac_exeext
7758 if { (eval echo "$as_me:7758: \"$ac_link\"") >&5
7759   (eval $ac_link) 2>&5
7760   ac_status=$?
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit $ac_status); } &&
7763          { ac_try='test -s conftest$ac_exeext'
7764   { (eval echo "$as_me:7764: \"$ac_try\"") >&5
7765   (eval $ac_try) 2>&5
7766   ac_status=$?
7767   echo "$as_me:7767: \$? = $ac_status" >&5
7768   (exit $ac_status); }; }; then
7769   eval "$as_ac_var=yes"
7770 else
7771   echo "$as_me: failed program was:" >&5
7772 cat conftest.$ac_ext >&5
7773 eval "$as_ac_var=no"
7774 fi
7775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7776 fi
7777 echo "$as_me:7777: result: `eval echo '${'$as_ac_var'}'`" >&5
7778 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7779 if test `eval echo '${'$as_ac_var'}'` = yes; then
7780   cat >>confdefs.h <<EOF
7781 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7782 EOF
7783
7784 fi
7785 done
7786
7787 if test "$cross_compiling" = yes ; then
7788
7789 for ac_func in \
7790                 link \
7791                 symlink
7792 do
7793 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7794 echo "$as_me:7794: checking for $ac_func" >&5
7795 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7796 if eval "test \"\${$as_ac_var+set}\" = set"; then
7797   echo $ECHO_N "(cached) $ECHO_C" >&6
7798 else
7799   cat >conftest.$ac_ext <<_ACEOF
7800 #line 7800 "configure"
7801 #include "confdefs.h"
7802 /* System header to define __stub macros and hopefully few prototypes,
7803     which can conflict with char $ac_func (); below.  */
7804 #include <assert.h>
7805 /* Override any gcc2 internal prototype to avoid an error.  */
7806 #ifdef __cplusplus
7807 extern "C"
7808 #endif
7809 /* We use char because int might match the return type of a gcc2
7810    builtin and then its argument prototype would still apply.  */
7811 char $ac_func ();
7812 char (*f) ();
7813
7814 int
7815 main (void)
7816 {
7817 /* The GNU C library defines this for functions which it implements
7818     to always fail with ENOSYS.  Some functions are actually named
7819     something starting with __ and the normal name is an alias.  */
7820 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7821 choke me
7822 #else
7823 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7824 #endif
7825
7826   ;
7827   return 0;
7828 }
7829 _ACEOF
7830 rm -f conftest.$ac_objext conftest$ac_exeext
7831 if { (eval echo "$as_me:7831: \"$ac_link\"") >&5
7832   (eval $ac_link) 2>&5
7833   ac_status=$?
7834   echo "$as_me:7834: \$? = $ac_status" >&5
7835   (exit $ac_status); } &&
7836          { ac_try='test -s conftest$ac_exeext'
7837   { (eval echo "$as_me:7837: \"$ac_try\"") >&5
7838   (eval $ac_try) 2>&5
7839   ac_status=$?
7840   echo "$as_me:7840: \$? = $ac_status" >&5
7841   (exit $ac_status); }; }; then
7842   eval "$as_ac_var=yes"
7843 else
7844   echo "$as_me: failed program was:" >&5
7845 cat conftest.$ac_ext >&5
7846 eval "$as_ac_var=no"
7847 fi
7848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7849 fi
7850 echo "$as_me:7850: result: `eval echo '${'$as_ac_var'}'`" >&5
7851 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7852 if test `eval echo '${'$as_ac_var'}'` = yes; then
7853   cat >>confdefs.h <<EOF
7854 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7855 EOF
7856
7857 fi
7858 done
7859
7860 else
7861         echo "$as_me:7861: checking if link/symlink functions work" >&5
7862 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7863 if test "${cf_cv_link_funcs+set}" = set; then
7864   echo $ECHO_N "(cached) $ECHO_C" >&6
7865 else
7866
7867                 cf_cv_link_funcs=
7868                 for cf_func in link symlink ; do
7869                         if test "$cross_compiling" = yes; then
7870
7871                         eval 'ac_cv_func_'$cf_func'=error'
7872 else
7873   cat >conftest.$ac_ext <<_ACEOF
7874 #line 7874 "configure"
7875 #include "confdefs.h"
7876
7877 #include <sys/types.h>
7878 #include <sys/stat.h>
7879 #ifdef HAVE_UNISTD_H
7880 #include <unistd.h>
7881 #endif
7882 int main(void)
7883 {
7884         int fail = 0;
7885         char *src = "config.log";
7886         char *dst = "conftest.chk";
7887         struct stat src_sb;
7888         struct stat dst_sb;
7889
7890         stat(src, &src_sb);
7891         fail = ($cf_func("config.log", "conftest.chk") < 0)
7892             || (stat(dst, &dst_sb) < 0)
7893             || (dst_sb.st_mtime != src_sb.st_mtime);
7894 #ifdef HAVE_UNLINK
7895         unlink(dst);
7896 #else
7897         remove(dst);
7898 #endif
7899         ${cf_cv_main_return:-return} (fail);
7900 }
7901
7902 _ACEOF
7903 rm -f conftest$ac_exeext
7904 if { (eval echo "$as_me:7904: \"$ac_link\"") >&5
7905   (eval $ac_link) 2>&5
7906   ac_status=$?
7907   echo "$as_me:7907: \$? = $ac_status" >&5
7908   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7909   { (eval echo "$as_me:7909: \"$ac_try\"") >&5
7910   (eval $ac_try) 2>&5
7911   ac_status=$?
7912   echo "$as_me:7912: \$? = $ac_status" >&5
7913   (exit $ac_status); }; }; then
7914
7915                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7916                         eval 'ac_cv_func_'$cf_func'=yes'
7917 else
7918   echo "$as_me: program exited with status $ac_status" >&5
7919 echo "$as_me: failed program was:" >&5
7920 cat conftest.$ac_ext >&5
7921
7922                         eval 'ac_cv_func_'$cf_func'=no'
7923 fi
7924 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7925 fi
7926                 done
7927                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7928
7929 fi
7930 echo "$as_me:7930: result: $cf_cv_link_funcs" >&5
7931 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7932         test "$ac_cv_func_link"    = yes &&
7933 cat >>confdefs.h <<\EOF
7934 #define HAVE_LINK 1
7935 EOF
7936
7937         test "$ac_cv_func_symlink" = yes &&
7938 cat >>confdefs.h <<\EOF
7939 #define HAVE_SYMLINK 1
7940 EOF
7941
7942 fi
7943
7944 with_links=no
7945 with_symlinks=no
7946
7947 # soft links (symbolic links) are useful for some systems where hard links do
7948 # not work, or to make it simpler to copy terminfo trees around.
7949 if test "x$ac_cv_func_symlink" = xyes ; then
7950         echo "$as_me:7950: checking if tic should use symbolic links" >&5
7951 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7952
7953 # Check whether --enable-symlinks or --disable-symlinks was given.
7954 if test "${enable_symlinks+set}" = set; then
7955   enableval="$enable_symlinks"
7956   with_symlinks=$enableval
7957 else
7958   with_symlinks=no
7959 fi;
7960         echo "$as_me:7960: result: $with_symlinks" >&5
7961 echo "${ECHO_T}$with_symlinks" >&6
7962 fi
7963
7964 # If we have hard links and did not choose to use soft links instead, there is
7965 # no reason to make this choice optional - use the hard links.
7966 if test "$with_symlinks" = no ; then
7967         echo "$as_me:7967: checking if tic should use hard links" >&5
7968 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7969         if test "x$ac_cv_func_link" = xyes ; then
7970                 with_links=yes
7971         else
7972                 with_links=no
7973         fi
7974         echo "$as_me:7974: result: $with_links" >&5
7975 echo "${ECHO_T}$with_links" >&6
7976 fi
7977
7978 test "x$with_links" = xyes &&
7979 cat >>confdefs.h <<\EOF
7980 #define USE_LINKS 1
7981 EOF
7982
7983 test "x$with_symlinks" = xyes &&
7984 cat >>confdefs.h <<\EOF
7985 #define USE_SYMLINKS 1
7986 EOF
7987
7988 ###   use option --enable-broken-linker to force on use of broken-linker support
7989 echo "$as_me:7989: checking if you want broken-linker support code" >&5
7990 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7991
7992 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7993 if test "${enable_broken_linker+set}" = set; then
7994   enableval="$enable_broken_linker"
7995   with_broken_linker=$enableval
7996 else
7997   with_broken_linker=${BROKEN_LINKER:-no}
7998 fi;
7999 echo "$as_me:7999: result: $with_broken_linker" >&5
8000 echo "${ECHO_T}$with_broken_linker" >&6
8001
8002 BROKEN_LINKER=0
8003 if test "x$with_broken_linker" = xyes ; then
8004
8005 cat >>confdefs.h <<\EOF
8006 #define BROKEN_LINKER 1
8007 EOF
8008
8009         BROKEN_LINKER=1
8010 elif test "$DFT_LWR_MODEL" = shared ; then
8011         case $cf_cv_system_name in
8012         (cygwin*)
8013
8014 cat >>confdefs.h <<\EOF
8015 #define BROKEN_LINKER 1
8016 EOF
8017
8018                 BROKEN_LINKER=1
8019                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8020
8021 echo "${as_me:-configure}:8021: testing cygwin linker is broken anyway ..." 1>&5
8022
8023                 ;;
8024         esac
8025 fi
8026
8027 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8028 echo "$as_me:8028: checking if tputs should process BSD-style prefix padding" >&5
8029 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8030
8031 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8032 if test "${enable_bsdpad+set}" = set; then
8033   enableval="$enable_bsdpad"
8034   with_bsdpad=$enableval
8035 else
8036   with_bsdpad=no
8037 fi;
8038 echo "$as_me:8038: result: $with_bsdpad" >&5
8039 echo "${ECHO_T}$with_bsdpad" >&6
8040 test "x$with_bsdpad" = xyes &&
8041 cat >>confdefs.h <<\EOF
8042 #define BSD_TPUTS 1
8043 EOF
8044
8045 ###   use option --enable-widec to turn on use of wide-character support
8046 NCURSES_CH_T=chtype
8047 NCURSES_LIBUTF8=0
8048
8049 NEED_WCHAR_H=0
8050 NCURSES_MBSTATE_T=0
8051 NCURSES_WCHAR_T=0
8052 NCURSES_WINT_T=0
8053
8054 # Check to define _XOPEN_SOURCE "automatically"
8055 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8056
8057 cf_XOPEN_SOURCE=500
8058 cf_POSIX_C_SOURCE=199506L
8059 cf_xopen_source=
8060
8061 case $host_os in
8062 (aix[4-7]*)
8063         cf_xopen_source="-D_ALL_SOURCE"
8064         ;;
8065 (msys)
8066         cf_XOPEN_SOURCE=600
8067         ;;
8068 (darwin[0-8].*)
8069         cf_xopen_source="-D_APPLE_C_SOURCE"
8070         ;;
8071 (darwin*)
8072         cf_xopen_source="-D_DARWIN_C_SOURCE"
8073         cf_XOPEN_SOURCE=
8074         ;;
8075 (freebsd*|dragonfly*)
8076         # 5.x headers associate
8077         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8078         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8079         cf_POSIX_C_SOURCE=200112L
8080         cf_XOPEN_SOURCE=600
8081         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8082         ;;
8083 (hpux11*)
8084         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8085         ;;
8086 (hpux*)
8087         cf_xopen_source="-D_HPUX_SOURCE"
8088         ;;
8089 (irix[56].*)
8090         cf_xopen_source="-D_SGI_SOURCE"
8091         cf_XOPEN_SOURCE=
8092         ;;
8093 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8094
8095 echo "$as_me:8095: checking if we must define _GNU_SOURCE" >&5
8096 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8097 if test "${cf_cv_gnu_source+set}" = set; then
8098   echo $ECHO_N "(cached) $ECHO_C" >&6
8099 else
8100
8101 cat >conftest.$ac_ext <<_ACEOF
8102 #line 8102 "configure"
8103 #include "confdefs.h"
8104 #include <sys/types.h>
8105 int
8106 main (void)
8107 {
8108
8109 #ifndef _XOPEN_SOURCE
8110 make an error
8111 #endif
8112   ;
8113   return 0;
8114 }
8115 _ACEOF
8116 rm -f conftest.$ac_objext
8117 if { (eval echo "$as_me:8117: \"$ac_compile\"") >&5
8118   (eval $ac_compile) 2>&5
8119   ac_status=$?
8120   echo "$as_me:8120: \$? = $ac_status" >&5
8121   (exit $ac_status); } &&
8122          { ac_try='test -s conftest.$ac_objext'
8123   { (eval echo "$as_me:8123: \"$ac_try\"") >&5
8124   (eval $ac_try) 2>&5
8125   ac_status=$?
8126   echo "$as_me:8126: \$? = $ac_status" >&5
8127   (exit $ac_status); }; }; then
8128   cf_cv_gnu_source=no
8129 else
8130   echo "$as_me: failed program was:" >&5
8131 cat conftest.$ac_ext >&5
8132 cf_save="$CPPFLAGS"
8133          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8134          cat >conftest.$ac_ext <<_ACEOF
8135 #line 8135 "configure"
8136 #include "confdefs.h"
8137 #include <sys/types.h>
8138 int
8139 main (void)
8140 {
8141
8142 #ifdef _XOPEN_SOURCE
8143 make an error
8144 #endif
8145   ;
8146   return 0;
8147 }
8148 _ACEOF
8149 rm -f conftest.$ac_objext
8150 if { (eval echo "$as_me:8150: \"$ac_compile\"") >&5
8151   (eval $ac_compile) 2>&5
8152   ac_status=$?
8153   echo "$as_me:8153: \$? = $ac_status" >&5
8154   (exit $ac_status); } &&
8155          { ac_try='test -s conftest.$ac_objext'
8156   { (eval echo "$as_me:8156: \"$ac_try\"") >&5
8157   (eval $ac_try) 2>&5
8158   ac_status=$?
8159   echo "$as_me:8159: \$? = $ac_status" >&5
8160   (exit $ac_status); }; }; then
8161   cf_cv_gnu_source=no
8162 else
8163   echo "$as_me: failed program was:" >&5
8164 cat conftest.$ac_ext >&5
8165 cf_cv_gnu_source=yes
8166 fi
8167 rm -f conftest.$ac_objext conftest.$ac_ext
8168         CPPFLAGS="$cf_save"
8169
8170 fi
8171 rm -f conftest.$ac_objext conftest.$ac_ext
8172
8173 fi
8174 echo "$as_me:8174: result: $cf_cv_gnu_source" >&5
8175 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8176
8177 if test "$cf_cv_gnu_source" = yes
8178 then
8179 echo "$as_me:8179: checking if we should also define _DEFAULT_SOURCE" >&5
8180 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8181 if test "${cf_cv_default_source+set}" = set; then
8182   echo $ECHO_N "(cached) $ECHO_C" >&6
8183 else
8184
8185 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8186         cat >conftest.$ac_ext <<_ACEOF
8187 #line 8187 "configure"
8188 #include "confdefs.h"
8189 #include <sys/types.h>
8190 int
8191 main (void)
8192 {
8193
8194 #ifdef _DEFAULT_SOURCE
8195 make an error
8196 #endif
8197   ;
8198   return 0;
8199 }
8200 _ACEOF
8201 rm -f conftest.$ac_objext
8202 if { (eval echo "$as_me:8202: \"$ac_compile\"") >&5
8203   (eval $ac_compile) 2>&5
8204   ac_status=$?
8205   echo "$as_me:8205: \$? = $ac_status" >&5
8206   (exit $ac_status); } &&
8207          { ac_try='test -s conftest.$ac_objext'
8208   { (eval echo "$as_me:8208: \"$ac_try\"") >&5
8209   (eval $ac_try) 2>&5
8210   ac_status=$?
8211   echo "$as_me:8211: \$? = $ac_status" >&5
8212   (exit $ac_status); }; }; then
8213   cf_cv_default_source=no
8214 else
8215   echo "$as_me: failed program was:" >&5
8216 cat conftest.$ac_ext >&5
8217 cf_cv_default_source=yes
8218 fi
8219 rm -f conftest.$ac_objext conftest.$ac_ext
8220
8221 fi
8222 echo "$as_me:8222: result: $cf_cv_default_source" >&5
8223 echo "${ECHO_T}$cf_cv_default_source" >&6
8224 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8225 fi
8226
8227         ;;
8228 (minix*)
8229         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8230         ;;
8231 (mirbsd*)
8232         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8233         cf_XOPEN_SOURCE=
8234
8235 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8236
8237 cf_save_CFLAGS="$CFLAGS"
8238 cf_save_CPPFLAGS="$CPPFLAGS"
8239
8240 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8241         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8242                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8243
8244 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8245         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8246                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8247
8248 echo "$as_me:8248: checking if we should define _POSIX_C_SOURCE" >&5
8249 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8250 if test "${cf_cv_posix_c_source+set}" = set; then
8251   echo $ECHO_N "(cached) $ECHO_C" >&6
8252 else
8253
8254 echo "${as_me:-configure}:8254: testing if the symbol is already defined go no further ..." 1>&5
8255
8256         cat >conftest.$ac_ext <<_ACEOF
8257 #line 8257 "configure"
8258 #include "confdefs.h"
8259 #include <sys/types.h>
8260 int
8261 main (void)
8262 {
8263
8264 #ifndef _POSIX_C_SOURCE
8265 make an error
8266 #endif
8267   ;
8268   return 0;
8269 }
8270 _ACEOF
8271 rm -f conftest.$ac_objext
8272 if { (eval echo "$as_me:8272: \"$ac_compile\"") >&5
8273   (eval $ac_compile) 2>&5
8274   ac_status=$?
8275   echo "$as_me:8275: \$? = $ac_status" >&5
8276   (exit $ac_status); } &&
8277          { ac_try='test -s conftest.$ac_objext'
8278   { (eval echo "$as_me:8278: \"$ac_try\"") >&5
8279   (eval $ac_try) 2>&5
8280   ac_status=$?
8281   echo "$as_me:8281: \$? = $ac_status" >&5
8282   (exit $ac_status); }; }; then
8283   cf_cv_posix_c_source=no
8284 else
8285   echo "$as_me: failed program was:" >&5
8286 cat conftest.$ac_ext >&5
8287 cf_want_posix_source=no
8288          case .$cf_POSIX_C_SOURCE in
8289          (.[12]??*)
8290                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8291                 ;;
8292          (.2)
8293                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8294                 cf_want_posix_source=yes
8295                 ;;
8296          (.*)
8297                 cf_want_posix_source=yes
8298                 ;;
8299          esac
8300          if test "$cf_want_posix_source" = yes ; then
8301                 cat >conftest.$ac_ext <<_ACEOF
8302 #line 8302 "configure"
8303 #include "confdefs.h"
8304 #include <sys/types.h>
8305 int
8306 main (void)
8307 {
8308
8309 #ifdef _POSIX_SOURCE
8310 make an error
8311 #endif
8312   ;
8313   return 0;
8314 }
8315 _ACEOF
8316 rm -f conftest.$ac_objext
8317 if { (eval echo "$as_me:8317: \"$ac_compile\"") >&5
8318   (eval $ac_compile) 2>&5
8319   ac_status=$?
8320   echo "$as_me:8320: \$? = $ac_status" >&5
8321   (exit $ac_status); } &&
8322          { ac_try='test -s conftest.$ac_objext'
8323   { (eval echo "$as_me:8323: \"$ac_try\"") >&5
8324   (eval $ac_try) 2>&5
8325   ac_status=$?
8326   echo "$as_me:8326: \$? = $ac_status" >&5
8327   (exit $ac_status); }; }; then
8328   :
8329 else
8330   echo "$as_me: failed program was:" >&5
8331 cat conftest.$ac_ext >&5
8332 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8333 fi
8334 rm -f conftest.$ac_objext conftest.$ac_ext
8335          fi
8336
8337 echo "${as_me:-configure}:8337: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8338
8339          CFLAGS="$cf_trim_CFLAGS"
8340          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8341
8342 echo "${as_me:-configure}:8342: testing if the second compile does not leave our definition intact error ..." 1>&5
8343
8344          cat >conftest.$ac_ext <<_ACEOF
8345 #line 8345 "configure"
8346 #include "confdefs.h"
8347 #include <sys/types.h>
8348 int
8349 main (void)
8350 {
8351
8352 #ifndef _POSIX_C_SOURCE
8353 make an error
8354 #endif
8355   ;
8356   return 0;
8357 }
8358 _ACEOF
8359 rm -f conftest.$ac_objext
8360 if { (eval echo "$as_me:8360: \"$ac_compile\"") >&5
8361   (eval $ac_compile) 2>&5
8362   ac_status=$?
8363   echo "$as_me:8363: \$? = $ac_status" >&5
8364   (exit $ac_status); } &&
8365          { ac_try='test -s conftest.$ac_objext'
8366   { (eval echo "$as_me:8366: \"$ac_try\"") >&5
8367   (eval $ac_try) 2>&5
8368   ac_status=$?
8369   echo "$as_me:8369: \$? = $ac_status" >&5
8370   (exit $ac_status); }; }; then
8371   :
8372 else
8373   echo "$as_me: failed program was:" >&5
8374 cat conftest.$ac_ext >&5
8375 cf_cv_posix_c_source=no
8376 fi
8377 rm -f conftest.$ac_objext conftest.$ac_ext
8378          CFLAGS="$cf_save_CFLAGS"
8379          CPPFLAGS="$cf_save_CPPFLAGS"
8380
8381 fi
8382 rm -f conftest.$ac_objext conftest.$ac_ext
8383
8384 fi
8385 echo "$as_me:8385: result: $cf_cv_posix_c_source" >&5
8386 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8387
8388 if test "$cf_cv_posix_c_source" != no ; then
8389         CFLAGS="$cf_trim_CFLAGS"
8390         CPPFLAGS="$cf_trim_CPPFLAGS"
8391
8392 cf_fix_cppflags=no
8393 cf_new_cflags=
8394 cf_new_cppflags=
8395 cf_new_extra_cppflags=
8396
8397 for cf_add_cflags in $cf_cv_posix_c_source
8398 do
8399 case $cf_fix_cppflags in
8400 (no)
8401         case $cf_add_cflags in
8402         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8403                 case $cf_add_cflags in
8404                 (-D*)
8405                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8406
8407                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8408                                 && test -z "${cf_tst_cflags}" \
8409                                 && cf_fix_cppflags=yes
8410
8411                         if test $cf_fix_cppflags = yes ; then
8412
8413         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8414         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8415
8416                                 continue
8417                         elif test "${cf_tst_cflags}" = "\"'" ; then
8418
8419         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8420         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8421
8422                                 continue
8423                         fi
8424                         ;;
8425                 esac
8426                 case "$CPPFLAGS" in
8427                 (*$cf_add_cflags)
8428                         ;;
8429                 (*)
8430                         case $cf_add_cflags in
8431                         (-D*)
8432                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8433
8434 CPPFLAGS=`echo "$CPPFLAGS" | \
8435         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8436                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8437
8438                                 ;;
8439                         esac
8440
8441         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8442         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8443
8444                         ;;
8445                 esac
8446                 ;;
8447         (*)
8448
8449         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8450         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8451
8452                 ;;
8453         esac
8454         ;;
8455 (yes)
8456
8457         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8458         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8459
8460         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8461
8462         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8463                 && test -z "${cf_tst_cflags}" \
8464                 && cf_fix_cppflags=no
8465         ;;
8466 esac
8467 done
8468
8469 if test -n "$cf_new_cflags" ; then
8470
8471         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8472         CFLAGS="${CFLAGS}$cf_new_cflags"
8473
8474 fi
8475
8476 if test -n "$cf_new_cppflags" ; then
8477
8478         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8479         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8480
8481 fi
8482
8483 if test -n "$cf_new_extra_cppflags" ; then
8484
8485         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8486         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8487
8488 fi
8489
8490 fi
8491
8492         ;;
8493 (netbsd*)
8494         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8495         ;;
8496 (openbsd[4-9]*)
8497         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8498         cf_xopen_source="-D_BSD_SOURCE"
8499         cf_XOPEN_SOURCE=600
8500         ;;
8501 (openbsd*)
8502         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8503         ;;
8504 (osf[45]*)
8505         cf_xopen_source="-D_OSF_SOURCE"
8506         ;;
8507 (nto-qnx*)
8508         cf_xopen_source="-D_QNX_SOURCE"
8509         ;;
8510 (sco*)
8511         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8512         ;;
8513 (solaris2.*)
8514         cf_xopen_source="-D__EXTENSIONS__"
8515         cf_cv_xopen_source=broken
8516         ;;
8517 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8518         cf_XOPEN_SOURCE=
8519         cf_POSIX_C_SOURCE=
8520         ;;
8521 (*)
8522
8523 echo "$as_me:8523: checking if we should define _XOPEN_SOURCE" >&5
8524 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8525 if test "${cf_cv_xopen_source+set}" = set; then
8526   echo $ECHO_N "(cached) $ECHO_C" >&6
8527 else
8528
8529         cat >conftest.$ac_ext <<_ACEOF
8530 #line 8530 "configure"
8531 #include "confdefs.h"
8532
8533 #include <stdlib.h>
8534 #include <string.h>
8535 #include <sys/types.h>
8536
8537 int
8538 main (void)
8539 {
8540
8541 #ifndef _XOPEN_SOURCE
8542 make an error
8543 #endif
8544   ;
8545   return 0;
8546 }
8547 _ACEOF
8548 rm -f conftest.$ac_objext
8549 if { (eval echo "$as_me:8549: \"$ac_compile\"") >&5
8550   (eval $ac_compile) 2>&5
8551   ac_status=$?
8552   echo "$as_me:8552: \$? = $ac_status" >&5
8553   (exit $ac_status); } &&
8554          { ac_try='test -s conftest.$ac_objext'
8555   { (eval echo "$as_me:8555: \"$ac_try\"") >&5
8556   (eval $ac_try) 2>&5
8557   ac_status=$?
8558   echo "$as_me:8558: \$? = $ac_status" >&5
8559   (exit $ac_status); }; }; then
8560   cf_cv_xopen_source=no
8561 else
8562   echo "$as_me: failed program was:" >&5
8563 cat conftest.$ac_ext >&5
8564 cf_save="$CPPFLAGS"
8565          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8566          cat >conftest.$ac_ext <<_ACEOF
8567 #line 8567 "configure"
8568 #include "confdefs.h"
8569
8570 #include <stdlib.h>
8571 #include <string.h>
8572 #include <sys/types.h>
8573
8574 int
8575 main (void)
8576 {
8577
8578 #ifdef _XOPEN_SOURCE
8579 make an error
8580 #endif
8581   ;
8582   return 0;
8583 }
8584 _ACEOF
8585 rm -f conftest.$ac_objext
8586 if { (eval echo "$as_me:8586: \"$ac_compile\"") >&5
8587   (eval $ac_compile) 2>&5
8588   ac_status=$?
8589   echo "$as_me:8589: \$? = $ac_status" >&5
8590   (exit $ac_status); } &&
8591          { ac_try='test -s conftest.$ac_objext'
8592   { (eval echo "$as_me:8592: \"$ac_try\"") >&5
8593   (eval $ac_try) 2>&5
8594   ac_status=$?
8595   echo "$as_me:8595: \$? = $ac_status" >&5
8596   (exit $ac_status); }; }; then
8597   cf_cv_xopen_source=no
8598 else
8599   echo "$as_me: failed program was:" >&5
8600 cat conftest.$ac_ext >&5
8601 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8602 fi
8603 rm -f conftest.$ac_objext conftest.$ac_ext
8604         CPPFLAGS="$cf_save"
8605
8606 fi
8607 rm -f conftest.$ac_objext conftest.$ac_ext
8608
8609 fi
8610 echo "$as_me:8610: result: $cf_cv_xopen_source" >&5
8611 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8612
8613 if test "$cf_cv_xopen_source" != no ; then
8614
8615 CFLAGS=`echo "$CFLAGS" | \
8616         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8617                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8618
8619 CPPFLAGS=`echo "$CPPFLAGS" | \
8620         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8621                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8622
8623         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8624
8625 cf_fix_cppflags=no
8626 cf_new_cflags=
8627 cf_new_cppflags=
8628 cf_new_extra_cppflags=
8629
8630 for cf_add_cflags in $cf_temp_xopen_source
8631 do
8632 case $cf_fix_cppflags in
8633 (no)
8634         case $cf_add_cflags in
8635         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8636                 case $cf_add_cflags in
8637                 (-D*)
8638                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8639
8640                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8641                                 && test -z "${cf_tst_cflags}" \
8642                                 && cf_fix_cppflags=yes
8643
8644                         if test $cf_fix_cppflags = yes ; then
8645
8646         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8647         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8648
8649                                 continue
8650                         elif test "${cf_tst_cflags}" = "\"'" ; then
8651
8652         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8653         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8654
8655                                 continue
8656                         fi
8657                         ;;
8658                 esac
8659                 case "$CPPFLAGS" in
8660                 (*$cf_add_cflags)
8661                         ;;
8662                 (*)
8663                         case $cf_add_cflags in
8664                         (-D*)
8665                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8666
8667 CPPFLAGS=`echo "$CPPFLAGS" | \
8668         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8669                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8670
8671                                 ;;
8672                         esac
8673
8674         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8675         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8676
8677                         ;;
8678                 esac
8679                 ;;
8680         (*)
8681
8682         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8683         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8684
8685                 ;;
8686         esac
8687         ;;
8688 (yes)
8689
8690         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8691         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8692
8693         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8694
8695         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8696                 && test -z "${cf_tst_cflags}" \
8697                 && cf_fix_cppflags=no
8698         ;;
8699 esac
8700 done
8701
8702 if test -n "$cf_new_cflags" ; then
8703
8704         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8705         CFLAGS="${CFLAGS}$cf_new_cflags"
8706
8707 fi
8708
8709 if test -n "$cf_new_cppflags" ; then
8710
8711         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8712         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8713
8714 fi
8715
8716 if test -n "$cf_new_extra_cppflags" ; then
8717
8718         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8719         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8720
8721 fi
8722
8723 fi
8724
8725 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8726
8727 cf_save_CFLAGS="$CFLAGS"
8728 cf_save_CPPFLAGS="$CPPFLAGS"
8729
8730 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8731         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8732                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8733
8734 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8735         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8736                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8737
8738 echo "$as_me:8738: checking if we should define _POSIX_C_SOURCE" >&5
8739 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8740 if test "${cf_cv_posix_c_source+set}" = set; then
8741   echo $ECHO_N "(cached) $ECHO_C" >&6
8742 else
8743
8744 echo "${as_me:-configure}:8744: testing if the symbol is already defined go no further ..." 1>&5
8745
8746         cat >conftest.$ac_ext <<_ACEOF
8747 #line 8747 "configure"
8748 #include "confdefs.h"
8749 #include <sys/types.h>
8750 int
8751 main (void)
8752 {
8753
8754 #ifndef _POSIX_C_SOURCE
8755 make an error
8756 #endif
8757   ;
8758   return 0;
8759 }
8760 _ACEOF
8761 rm -f conftest.$ac_objext
8762 if { (eval echo "$as_me:8762: \"$ac_compile\"") >&5
8763   (eval $ac_compile) 2>&5
8764   ac_status=$?
8765   echo "$as_me:8765: \$? = $ac_status" >&5
8766   (exit $ac_status); } &&
8767          { ac_try='test -s conftest.$ac_objext'
8768   { (eval echo "$as_me:8768: \"$ac_try\"") >&5
8769   (eval $ac_try) 2>&5
8770   ac_status=$?
8771   echo "$as_me:8771: \$? = $ac_status" >&5
8772   (exit $ac_status); }; }; then
8773   cf_cv_posix_c_source=no
8774 else
8775   echo "$as_me: failed program was:" >&5
8776 cat conftest.$ac_ext >&5
8777 cf_want_posix_source=no
8778          case .$cf_POSIX_C_SOURCE in
8779          (.[12]??*)
8780                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8781                 ;;
8782          (.2)
8783                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8784                 cf_want_posix_source=yes
8785                 ;;
8786          (.*)
8787                 cf_want_posix_source=yes
8788                 ;;
8789          esac
8790          if test "$cf_want_posix_source" = yes ; then
8791                 cat >conftest.$ac_ext <<_ACEOF
8792 #line 8792 "configure"
8793 #include "confdefs.h"
8794 #include <sys/types.h>
8795 int
8796 main (void)
8797 {
8798
8799 #ifdef _POSIX_SOURCE
8800 make an error
8801 #endif
8802   ;
8803   return 0;
8804 }
8805 _ACEOF
8806 rm -f conftest.$ac_objext
8807 if { (eval echo "$as_me:8807: \"$ac_compile\"") >&5
8808   (eval $ac_compile) 2>&5
8809   ac_status=$?
8810   echo "$as_me:8810: \$? = $ac_status" >&5
8811   (exit $ac_status); } &&
8812          { ac_try='test -s conftest.$ac_objext'
8813   { (eval echo "$as_me:8813: \"$ac_try\"") >&5
8814   (eval $ac_try) 2>&5
8815   ac_status=$?
8816   echo "$as_me:8816: \$? = $ac_status" >&5
8817   (exit $ac_status); }; }; then
8818   :
8819 else
8820   echo "$as_me: failed program was:" >&5
8821 cat conftest.$ac_ext >&5
8822 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8823 fi
8824 rm -f conftest.$ac_objext conftest.$ac_ext
8825          fi
8826
8827 echo "${as_me:-configure}:8827: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8828
8829          CFLAGS="$cf_trim_CFLAGS"
8830          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8831
8832 echo "${as_me:-configure}:8832: testing if the second compile does not leave our definition intact error ..." 1>&5
8833
8834          cat >conftest.$ac_ext <<_ACEOF
8835 #line 8835 "configure"
8836 #include "confdefs.h"
8837 #include <sys/types.h>
8838 int
8839 main (void)
8840 {
8841
8842 #ifndef _POSIX_C_SOURCE
8843 make an error
8844 #endif
8845   ;
8846   return 0;
8847 }
8848 _ACEOF
8849 rm -f conftest.$ac_objext
8850 if { (eval echo "$as_me:8850: \"$ac_compile\"") >&5
8851   (eval $ac_compile) 2>&5
8852   ac_status=$?
8853   echo "$as_me:8853: \$? = $ac_status" >&5
8854   (exit $ac_status); } &&
8855          { ac_try='test -s conftest.$ac_objext'
8856   { (eval echo "$as_me:8856: \"$ac_try\"") >&5
8857   (eval $ac_try) 2>&5
8858   ac_status=$?
8859   echo "$as_me:8859: \$? = $ac_status" >&5
8860   (exit $ac_status); }; }; then
8861   :
8862 else
8863   echo "$as_me: failed program was:" >&5
8864 cat conftest.$ac_ext >&5
8865 cf_cv_posix_c_source=no
8866 fi
8867 rm -f conftest.$ac_objext conftest.$ac_ext
8868          CFLAGS="$cf_save_CFLAGS"
8869          CPPFLAGS="$cf_save_CPPFLAGS"
8870
8871 fi
8872 rm -f conftest.$ac_objext conftest.$ac_ext
8873
8874 fi
8875 echo "$as_me:8875: result: $cf_cv_posix_c_source" >&5
8876 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8877
8878 if test "$cf_cv_posix_c_source" != no ; then
8879         CFLAGS="$cf_trim_CFLAGS"
8880         CPPFLAGS="$cf_trim_CPPFLAGS"
8881
8882 cf_fix_cppflags=no
8883 cf_new_cflags=
8884 cf_new_cppflags=
8885 cf_new_extra_cppflags=
8886
8887 for cf_add_cflags in $cf_cv_posix_c_source
8888 do
8889 case $cf_fix_cppflags in
8890 (no)
8891         case $cf_add_cflags in
8892         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8893                 case $cf_add_cflags in
8894                 (-D*)
8895                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8896
8897                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8898                                 && test -z "${cf_tst_cflags}" \
8899                                 && cf_fix_cppflags=yes
8900
8901                         if test $cf_fix_cppflags = yes ; then
8902
8903         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8904         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8905
8906                                 continue
8907                         elif test "${cf_tst_cflags}" = "\"'" ; then
8908
8909         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8910         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8911
8912                                 continue
8913                         fi
8914                         ;;
8915                 esac
8916                 case "$CPPFLAGS" in
8917                 (*$cf_add_cflags)
8918                         ;;
8919                 (*)
8920                         case $cf_add_cflags in
8921                         (-D*)
8922                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8923
8924 CPPFLAGS=`echo "$CPPFLAGS" | \
8925         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8926                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8927
8928                                 ;;
8929                         esac
8930
8931         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8932         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8933
8934                         ;;
8935                 esac
8936                 ;;
8937         (*)
8938
8939         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8940         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8941
8942                 ;;
8943         esac
8944         ;;
8945 (yes)
8946
8947         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8948         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8949
8950         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8951
8952         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8953                 && test -z "${cf_tst_cflags}" \
8954                 && cf_fix_cppflags=no
8955         ;;
8956 esac
8957 done
8958
8959 if test -n "$cf_new_cflags" ; then
8960
8961         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8962         CFLAGS="${CFLAGS}$cf_new_cflags"
8963
8964 fi
8965
8966 if test -n "$cf_new_cppflags" ; then
8967
8968         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8969         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8970
8971 fi
8972
8973 if test -n "$cf_new_extra_cppflags" ; then
8974
8975         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8976         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8977
8978 fi
8979
8980 fi
8981
8982         ;;
8983 esac
8984
8985 if test -n "$cf_xopen_source" ; then
8986
8987 cf_fix_cppflags=no
8988 cf_new_cflags=
8989 cf_new_cppflags=
8990 cf_new_extra_cppflags=
8991
8992 for cf_add_cflags in $cf_xopen_source
8993 do
8994 case $cf_fix_cppflags in
8995 (no)
8996         case $cf_add_cflags in
8997         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8998                 case $cf_add_cflags in
8999                 (-D*)
9000                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9001
9002                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9003                                 && test -z "${cf_tst_cflags}" \
9004                                 && cf_fix_cppflags=yes
9005
9006                         if test $cf_fix_cppflags = yes ; then
9007
9008         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9009         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9010
9011                                 continue
9012                         elif test "${cf_tst_cflags}" = "\"'" ; then
9013
9014         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9015         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9016
9017                                 continue
9018                         fi
9019                         ;;
9020                 esac
9021                 case "$CPPFLAGS" in
9022                 (*$cf_add_cflags)
9023                         ;;
9024                 (*)
9025                         case $cf_add_cflags in
9026                         (-D*)
9027                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9028
9029 CPPFLAGS=`echo "$CPPFLAGS" | \
9030         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9031                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9032
9033                                 ;;
9034                         esac
9035
9036         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9037         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9038
9039                         ;;
9040                 esac
9041                 ;;
9042         (*)
9043
9044         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9045         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9046
9047                 ;;
9048         esac
9049         ;;
9050 (yes)
9051
9052         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9053         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9054
9055         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9056
9057         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9058                 && test -z "${cf_tst_cflags}" \
9059                 && cf_fix_cppflags=no
9060         ;;
9061 esac
9062 done
9063
9064 if test -n "$cf_new_cflags" ; then
9065         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9066
9067 echo "${as_me:-configure}:9067: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9068
9069         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9070         CFLAGS="${CFLAGS}$cf_new_cflags"
9071
9072 fi
9073
9074 if test -n "$cf_new_cppflags" ; then
9075         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9076
9077 echo "${as_me:-configure}:9077: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9078
9079         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9080         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9081
9082 fi
9083
9084 if test -n "$cf_new_extra_cppflags" ; then
9085         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9086
9087 echo "${as_me:-configure}:9087: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9088
9089         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9090         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9091
9092 fi
9093
9094 fi
9095
9096 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9097         echo "$as_me:9097: checking if _XOPEN_SOURCE really is set" >&5
9098 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9099         cat >conftest.$ac_ext <<_ACEOF
9100 #line 9100 "configure"
9101 #include "confdefs.h"
9102 #include <stdlib.h>
9103 int
9104 main (void)
9105 {
9106
9107 #ifndef _XOPEN_SOURCE
9108 make an error
9109 #endif
9110   ;
9111   return 0;
9112 }
9113 _ACEOF
9114 rm -f conftest.$ac_objext
9115 if { (eval echo "$as_me:9115: \"$ac_compile\"") >&5
9116   (eval $ac_compile) 2>&5
9117   ac_status=$?
9118   echo "$as_me:9118: \$? = $ac_status" >&5
9119   (exit $ac_status); } &&
9120          { ac_try='test -s conftest.$ac_objext'
9121   { (eval echo "$as_me:9121: \"$ac_try\"") >&5
9122   (eval $ac_try) 2>&5
9123   ac_status=$?
9124   echo "$as_me:9124: \$? = $ac_status" >&5
9125   (exit $ac_status); }; }; then
9126   cf_XOPEN_SOURCE_set=yes
9127 else
9128   echo "$as_me: failed program was:" >&5
9129 cat conftest.$ac_ext >&5
9130 cf_XOPEN_SOURCE_set=no
9131 fi
9132 rm -f conftest.$ac_objext conftest.$ac_ext
9133         echo "$as_me:9133: result: $cf_XOPEN_SOURCE_set" >&5
9134 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9135         if test $cf_XOPEN_SOURCE_set = yes
9136         then
9137                 cat >conftest.$ac_ext <<_ACEOF
9138 #line 9138 "configure"
9139 #include "confdefs.h"
9140 #include <stdlib.h>
9141 int
9142 main (void)
9143 {
9144
9145 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9146 make an error
9147 #endif
9148   ;
9149   return 0;
9150 }
9151 _ACEOF
9152 rm -f conftest.$ac_objext
9153 if { (eval echo "$as_me:9153: \"$ac_compile\"") >&5
9154   (eval $ac_compile) 2>&5
9155   ac_status=$?
9156   echo "$as_me:9156: \$? = $ac_status" >&5
9157   (exit $ac_status); } &&
9158          { ac_try='test -s conftest.$ac_objext'
9159   { (eval echo "$as_me:9159: \"$ac_try\"") >&5
9160   (eval $ac_try) 2>&5
9161   ac_status=$?
9162   echo "$as_me:9162: \$? = $ac_status" >&5
9163   (exit $ac_status); }; }; then
9164   cf_XOPEN_SOURCE_set_ok=yes
9165 else
9166   echo "$as_me: failed program was:" >&5
9167 cat conftest.$ac_ext >&5
9168 cf_XOPEN_SOURCE_set_ok=no
9169 fi
9170 rm -f conftest.$ac_objext conftest.$ac_ext
9171                 if test $cf_XOPEN_SOURCE_set_ok = no
9172                 then
9173                         { echo "$as_me:9173: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9174 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9175                 fi
9176         else
9177
9178 echo "$as_me:9178: checking if we should define _XOPEN_SOURCE" >&5
9179 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9180 if test "${cf_cv_xopen_source+set}" = set; then
9181   echo $ECHO_N "(cached) $ECHO_C" >&6
9182 else
9183
9184         cat >conftest.$ac_ext <<_ACEOF
9185 #line 9185 "configure"
9186 #include "confdefs.h"
9187
9188 #include <stdlib.h>
9189 #include <string.h>
9190 #include <sys/types.h>
9191
9192 int
9193 main (void)
9194 {
9195
9196 #ifndef _XOPEN_SOURCE
9197 make an error
9198 #endif
9199   ;
9200   return 0;
9201 }
9202 _ACEOF
9203 rm -f conftest.$ac_objext
9204 if { (eval echo "$as_me:9204: \"$ac_compile\"") >&5
9205   (eval $ac_compile) 2>&5
9206   ac_status=$?
9207   echo "$as_me:9207: \$? = $ac_status" >&5
9208   (exit $ac_status); } &&
9209          { ac_try='test -s conftest.$ac_objext'
9210   { (eval echo "$as_me:9210: \"$ac_try\"") >&5
9211   (eval $ac_try) 2>&5
9212   ac_status=$?
9213   echo "$as_me:9213: \$? = $ac_status" >&5
9214   (exit $ac_status); }; }; then
9215   cf_cv_xopen_source=no
9216 else
9217   echo "$as_me: failed program was:" >&5
9218 cat conftest.$ac_ext >&5
9219 cf_save="$CPPFLAGS"
9220          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9221          cat >conftest.$ac_ext <<_ACEOF
9222 #line 9222 "configure"
9223 #include "confdefs.h"
9224
9225 #include <stdlib.h>
9226 #include <string.h>
9227 #include <sys/types.h>
9228
9229 int
9230 main (void)
9231 {
9232
9233 #ifdef _XOPEN_SOURCE
9234 make an error
9235 #endif
9236   ;
9237   return 0;
9238 }
9239 _ACEOF
9240 rm -f conftest.$ac_objext
9241 if { (eval echo "$as_me:9241: \"$ac_compile\"") >&5
9242   (eval $ac_compile) 2>&5
9243   ac_status=$?
9244   echo "$as_me:9244: \$? = $ac_status" >&5
9245   (exit $ac_status); } &&
9246          { ac_try='test -s conftest.$ac_objext'
9247   { (eval echo "$as_me:9247: \"$ac_try\"") >&5
9248   (eval $ac_try) 2>&5
9249   ac_status=$?
9250   echo "$as_me:9250: \$? = $ac_status" >&5
9251   (exit $ac_status); }; }; then
9252   cf_cv_xopen_source=no
9253 else
9254   echo "$as_me: failed program was:" >&5
9255 cat conftest.$ac_ext >&5
9256 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9257 fi
9258 rm -f conftest.$ac_objext conftest.$ac_ext
9259         CPPFLAGS="$cf_save"
9260
9261 fi
9262 rm -f conftest.$ac_objext conftest.$ac_ext
9263
9264 fi
9265 echo "$as_me:9265: result: $cf_cv_xopen_source" >&5
9266 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9267
9268 if test "$cf_cv_xopen_source" != no ; then
9269
9270 CFLAGS=`echo "$CFLAGS" | \
9271         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9272                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9273
9274 CPPFLAGS=`echo "$CPPFLAGS" | \
9275         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9276                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9277
9278         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9279
9280 cf_fix_cppflags=no
9281 cf_new_cflags=
9282 cf_new_cppflags=
9283 cf_new_extra_cppflags=
9284
9285 for cf_add_cflags in $cf_temp_xopen_source
9286 do
9287 case $cf_fix_cppflags in
9288 (no)
9289         case $cf_add_cflags in
9290         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9291                 case $cf_add_cflags in
9292                 (-D*)
9293                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9294
9295                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9296                                 && test -z "${cf_tst_cflags}" \
9297                                 && cf_fix_cppflags=yes
9298
9299                         if test $cf_fix_cppflags = yes ; then
9300
9301         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9302         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9303
9304                                 continue
9305                         elif test "${cf_tst_cflags}" = "\"'" ; then
9306
9307         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9308         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9309
9310                                 continue
9311                         fi
9312                         ;;
9313                 esac
9314                 case "$CPPFLAGS" in
9315                 (*$cf_add_cflags)
9316                         ;;
9317                 (*)
9318                         case $cf_add_cflags in
9319                         (-D*)
9320                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9321
9322 CPPFLAGS=`echo "$CPPFLAGS" | \
9323         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9324                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9325
9326                                 ;;
9327                         esac
9328
9329         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9330         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9331
9332                         ;;
9333                 esac
9334                 ;;
9335         (*)
9336
9337         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9338         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9339
9340                 ;;
9341         esac
9342         ;;
9343 (yes)
9344
9345         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9346         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9347
9348         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9349
9350         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9351                 && test -z "${cf_tst_cflags}" \
9352                 && cf_fix_cppflags=no
9353         ;;
9354 esac
9355 done
9356
9357 if test -n "$cf_new_cflags" ; then
9358
9359         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9360         CFLAGS="${CFLAGS}$cf_new_cflags"
9361
9362 fi
9363
9364 if test -n "$cf_new_cppflags" ; then
9365
9366         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9367         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9368
9369 fi
9370
9371 if test -n "$cf_new_extra_cppflags" ; then
9372
9373         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9374         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9375
9376 fi
9377
9378 fi
9379
9380         fi
9381 fi
9382
9383 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9384
9385 # Work around breakage on OS X
9386
9387 echo "$as_me:9387: checking if SIGWINCH is defined" >&5
9388 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9389 if test "${cf_cv_define_sigwinch+set}" = set; then
9390   echo $ECHO_N "(cached) $ECHO_C" >&6
9391 else
9392
9393         cat >conftest.$ac_ext <<_ACEOF
9394 #line 9394 "configure"
9395 #include "confdefs.h"
9396
9397 #include <sys/types.h>
9398 #include <sys/signal.h>
9399
9400 int
9401 main (void)
9402 {
9403 int x = SIGWINCH
9404   ;
9405   return 0;
9406 }
9407 _ACEOF
9408 rm -f conftest.$ac_objext
9409 if { (eval echo "$as_me:9409: \"$ac_compile\"") >&5
9410   (eval $ac_compile) 2>&5
9411   ac_status=$?
9412   echo "$as_me:9412: \$? = $ac_status" >&5
9413   (exit $ac_status); } &&
9414          { ac_try='test -s conftest.$ac_objext'
9415   { (eval echo "$as_me:9415: \"$ac_try\"") >&5
9416   (eval $ac_try) 2>&5
9417   ac_status=$?
9418   echo "$as_me:9418: \$? = $ac_status" >&5
9419   (exit $ac_status); }; }; then
9420   cf_cv_define_sigwinch=yes
9421 else
9422   echo "$as_me: failed program was:" >&5
9423 cat conftest.$ac_ext >&5
9424 cat >conftest.$ac_ext <<_ACEOF
9425 #line 9425 "configure"
9426 #include "confdefs.h"
9427
9428 #undef _XOPEN_SOURCE
9429 #undef _POSIX_SOURCE
9430 #undef _POSIX_C_SOURCE
9431 #include <sys/types.h>
9432 #include <sys/signal.h>
9433
9434 int
9435 main (void)
9436 {
9437 int x = SIGWINCH
9438   ;
9439   return 0;
9440 }
9441 _ACEOF
9442 rm -f conftest.$ac_objext
9443 if { (eval echo "$as_me:9443: \"$ac_compile\"") >&5
9444   (eval $ac_compile) 2>&5
9445   ac_status=$?
9446   echo "$as_me:9446: \$? = $ac_status" >&5
9447   (exit $ac_status); } &&
9448          { ac_try='test -s conftest.$ac_objext'
9449   { (eval echo "$as_me:9449: \"$ac_try\"") >&5
9450   (eval $ac_try) 2>&5
9451   ac_status=$?
9452   echo "$as_me:9452: \$? = $ac_status" >&5
9453   (exit $ac_status); }; }; then
9454   cf_cv_define_sigwinch=maybe
9455 else
9456   echo "$as_me: failed program was:" >&5
9457 cat conftest.$ac_ext >&5
9458 cf_cv_define_sigwinch=no
9459 fi
9460 rm -f conftest.$ac_objext conftest.$ac_ext
9461
9462 fi
9463 rm -f conftest.$ac_objext conftest.$ac_ext
9464
9465 fi
9466 echo "$as_me:9466: result: $cf_cv_define_sigwinch" >&5
9467 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9468
9469 if test "$cf_cv_define_sigwinch" = maybe ; then
9470 echo "$as_me:9470: checking for actual SIGWINCH definition" >&5
9471 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9472 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9473   echo $ECHO_N "(cached) $ECHO_C" >&6
9474 else
9475
9476 cf_cv_fixup_sigwinch=unknown
9477 cf_sigwinch=32
9478 while test $cf_sigwinch != 1
9479 do
9480         cat >conftest.$ac_ext <<_ACEOF
9481 #line 9481 "configure"
9482 #include "confdefs.h"
9483
9484 #undef _XOPEN_SOURCE
9485 #undef _POSIX_SOURCE
9486 #undef _POSIX_C_SOURCE
9487 #include <sys/types.h>
9488 #include <sys/signal.h>
9489
9490 int
9491 main (void)
9492 {
9493
9494 #if SIGWINCH != $cf_sigwinch
9495 make an error
9496 #endif
9497 int x = SIGWINCH
9498   ;
9499   return 0;
9500 }
9501 _ACEOF
9502 rm -f conftest.$ac_objext
9503 if { (eval echo "$as_me:9503: \"$ac_compile\"") >&5
9504   (eval $ac_compile) 2>&5
9505   ac_status=$?
9506   echo "$as_me:9506: \$? = $ac_status" >&5
9507   (exit $ac_status); } &&
9508          { ac_try='test -s conftest.$ac_objext'
9509   { (eval echo "$as_me:9509: \"$ac_try\"") >&5
9510   (eval $ac_try) 2>&5
9511   ac_status=$?
9512   echo "$as_me:9512: \$? = $ac_status" >&5
9513   (exit $ac_status); }; }; then
9514   cf_cv_fixup_sigwinch=$cf_sigwinch
9515          break
9516 else
9517   echo "$as_me: failed program was:" >&5
9518 cat conftest.$ac_ext >&5
9519 fi
9520 rm -f conftest.$ac_objext conftest.$ac_ext
9521
9522 cf_sigwinch=`expr $cf_sigwinch - 1`
9523 done
9524
9525 fi
9526 echo "$as_me:9526: result: $cf_cv_fixup_sigwinch" >&5
9527 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9528
9529         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9530                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9531         fi
9532 fi
9533
9534 # Checks for CODESET support.
9535
9536 echo "$as_me:9536: checking for nl_langinfo and CODESET" >&5
9537 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9538 if test "${am_cv_langinfo_codeset+set}" = set; then
9539   echo $ECHO_N "(cached) $ECHO_C" >&6
9540 else
9541   cat >conftest.$ac_ext <<_ACEOF
9542 #line 9542 "configure"
9543 #include "confdefs.h"
9544 #include <langinfo.h>
9545 int
9546 main (void)
9547 {
9548 char* cs = nl_langinfo(CODESET);
9549   ;
9550   return 0;
9551 }
9552 _ACEOF
9553 rm -f conftest.$ac_objext conftest$ac_exeext
9554 if { (eval echo "$as_me:9554: \"$ac_link\"") >&5
9555   (eval $ac_link) 2>&5
9556   ac_status=$?
9557   echo "$as_me:9557: \$? = $ac_status" >&5
9558   (exit $ac_status); } &&
9559          { ac_try='test -s conftest$ac_exeext'
9560   { (eval echo "$as_me:9560: \"$ac_try\"") >&5
9561   (eval $ac_try) 2>&5
9562   ac_status=$?
9563   echo "$as_me:9563: \$? = $ac_status" >&5
9564   (exit $ac_status); }; }; then
9565   am_cv_langinfo_codeset=yes
9566 else
9567   echo "$as_me: failed program was:" >&5
9568 cat conftest.$ac_ext >&5
9569 am_cv_langinfo_codeset=no
9570 fi
9571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9572
9573 fi
9574 echo "$as_me:9574: result: $am_cv_langinfo_codeset" >&5
9575 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9576         if test $am_cv_langinfo_codeset = yes; then
9577
9578 cat >>confdefs.h <<\EOF
9579 #define HAVE_LANGINFO_CODESET 1
9580 EOF
9581
9582         fi
9583
9584 # use these variables to work around a defect in gcc's fixincludes.
9585 NCURSES_OK_WCHAR_T=
9586 NCURSES_OK_WINT_T=
9587
9588 echo "$as_me:9588: checking if you want wide-character code" >&5
9589 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9590
9591 # Check whether --enable-widec or --disable-widec was given.
9592 if test "${enable_widec+set}" = set; then
9593   enableval="$enable_widec"
9594   with_widec=$enableval
9595 else
9596   with_widec=no
9597 fi;
9598 echo "$as_me:9598: result: $with_widec" >&5
9599 echo "${ECHO_T}$with_widec" >&6
9600
9601 NCURSES_WCWIDTH_GRAPHICS=1
9602
9603 if test "x$with_widec" = xyes ; then
9604         if test "x$disable_lib_suffixes" = xno ; then
9605                 LIB_SUFFIX="w${LIB_SUFFIX}"
9606         fi
9607
9608 cat >>confdefs.h <<\EOF
9609 #define USE_WIDEC_SUPPORT 1
9610 EOF
9611
9612 cat >>confdefs.h <<\EOF
9613 #define NCURSES_WIDECHAR 1
9614 EOF
9615
9616 for ac_header in \
9617 wchar.h \
9618 wctype.h \
9619
9620 do
9621 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9622 echo "$as_me:9622: checking for $ac_header" >&5
9623 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9624 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9625   echo $ECHO_N "(cached) $ECHO_C" >&6
9626 else
9627   cat >conftest.$ac_ext <<_ACEOF
9628 #line 9628 "configure"
9629 #include "confdefs.h"
9630 #include <$ac_header>
9631 _ACEOF
9632 if { (eval echo "$as_me:9632: \"$ac_cpp conftest.$ac_ext\"") >&5
9633   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9634   ac_status=$?
9635   egrep -v '^ *\+' conftest.er1 >conftest.err
9636   rm -f conftest.er1
9637   cat conftest.err >&5
9638   echo "$as_me:9638: \$? = $ac_status" >&5
9639   (exit $ac_status); } >/dev/null; then
9640   if test -s conftest.err; then
9641     ac_cpp_err=$ac_c_preproc_warn_flag
9642   else
9643     ac_cpp_err=
9644   fi
9645 else
9646   ac_cpp_err=yes
9647 fi
9648 if test -z "$ac_cpp_err"; then
9649   eval "$as_ac_Header=yes"
9650 else
9651   echo "$as_me: failed program was:" >&5
9652   cat conftest.$ac_ext >&5
9653   eval "$as_ac_Header=no"
9654 fi
9655 rm -f conftest.err conftest.$ac_ext
9656 fi
9657 echo "$as_me:9657: result: `eval echo '${'$as_ac_Header'}'`" >&5
9658 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9659 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9660   cat >>confdefs.h <<EOF
9661 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9662 EOF
9663
9664 fi
9665 done
9666
9667 echo "$as_me:9667: checking if wchar.h can be used as is" >&5
9668 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9669 if test "${cf_cv_wchar_h_okay+set}" = set; then
9670   echo $ECHO_N "(cached) $ECHO_C" >&6
9671 else
9672
9673 cat >conftest.$ac_ext <<_ACEOF
9674 #line 9674 "configure"
9675 #include "confdefs.h"
9676
9677 #include <stdlib.h>
9678 #ifdef HAVE_WCHAR_H
9679 #include <wchar.h>
9680 #endif
9681 #ifdef HAVE_WCTYPE_H
9682 #include <wctype.h>
9683 #endif
9684
9685 int
9686 main (void)
9687 {
9688
9689         wint_t foo = 0;
9690         int bar = iswpunct(foo)
9691   ;
9692   return 0;
9693 }
9694 _ACEOF
9695 rm -f conftest.$ac_objext
9696 if { (eval echo "$as_me:9696: \"$ac_compile\"") >&5
9697   (eval $ac_compile) 2>&5
9698   ac_status=$?
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit $ac_status); } &&
9701          { ac_try='test -s conftest.$ac_objext'
9702   { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9703   (eval $ac_try) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit $ac_status); }; }; then
9707   cf_cv_wchar_h_okay=yes
9708 else
9709   echo "$as_me: failed program was:" >&5
9710 cat conftest.$ac_ext >&5
9711 cf_cv_wchar_h_okay=no
9712 fi
9713 rm -f conftest.$ac_objext conftest.$ac_ext
9714 fi
9715 echo "$as_me:9715: result: $cf_cv_wchar_h_okay" >&5
9716 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9717
9718 if test $cf_cv_wchar_h_okay = no
9719 then
9720
9721 echo "$as_me:9721: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9722 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9723 cat >conftest.$ac_ext <<_ACEOF
9724 #line 9724 "configure"
9725 #include "confdefs.h"
9726 #include <sys/types.h>
9727
9728 int
9729 main (void)
9730 {
9731
9732 #ifndef _XOPEN_SOURCE_EXTENDED
9733 make an error
9734 #endif
9735   ;
9736   return 0;
9737 }
9738 _ACEOF
9739 rm -f conftest.$ac_objext
9740 if { (eval echo "$as_me:9740: \"$ac_compile\"") >&5
9741   (eval $ac_compile) 2>&5
9742   ac_status=$?
9743   echo "$as_me:9743: \$? = $ac_status" >&5
9744   (exit $ac_status); } &&
9745          { ac_try='test -s conftest.$ac_objext'
9746   { (eval echo "$as_me:9746: \"$ac_try\"") >&5
9747   (eval $ac_try) 2>&5
9748   ac_status=$?
9749   echo "$as_me:9749: \$? = $ac_status" >&5
9750   (exit $ac_status); }; }; then
9751   cf_result=no
9752 else
9753   echo "$as_me: failed program was:" >&5
9754 cat conftest.$ac_ext >&5
9755 cf_result=yes
9756 fi
9757 rm -f conftest.$ac_objext conftest.$ac_ext
9758 echo "$as_me:9758: result: $cf_result" >&5
9759 echo "${ECHO_T}$cf_result" >&6
9760
9761 if test "$cf_result" = yes ; then
9762         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9763 elif test "x" != "x" ; then
9764         echo "$as_me:9764: checking checking for compatible value versus " >&5
9765 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9766         cat >conftest.$ac_ext <<_ACEOF
9767 #line 9767 "configure"
9768 #include "confdefs.h"
9769 #include <sys/types.h>
9770
9771 int
9772 main (void)
9773 {
9774
9775 #if _XOPEN_SOURCE_EXTENDED- < 0
9776 make an error
9777 #endif
9778   ;
9779   return 0;
9780 }
9781 _ACEOF
9782 rm -f conftest.$ac_objext
9783 if { (eval echo "$as_me:9783: \"$ac_compile\"") >&5
9784   (eval $ac_compile) 2>&5
9785   ac_status=$?
9786   echo "$as_me:9786: \$? = $ac_status" >&5
9787   (exit $ac_status); } &&
9788          { ac_try='test -s conftest.$ac_objext'
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   cf_result=yes
9795 else
9796   echo "$as_me: failed program was:" >&5
9797 cat conftest.$ac_ext >&5
9798 cf_result=no
9799 fi
9800 rm -f conftest.$ac_objext conftest.$ac_ext
9801         echo "$as_me:9801: result: $cf_result" >&5
9802 echo "${ECHO_T}$cf_result" >&6
9803         if test "$cf_result" = no ; then
9804                 # perhaps we can override it - try...
9805                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9806         fi
9807 fi
9808
9809 fi
9810
9811 echo "$as_me:9811: checking if wcwidth agrees graphics are single-width" >&5
9812 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9813 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9814   echo $ECHO_N "(cached) $ECHO_C" >&6
9815 else
9816
9817 cat >conftest.in <<CF_EOF
9818 -       VT100 symbols
9819 0x250c  upper left corner
9820 0x2514  lower left corner
9821 0x2510  upper right corner
9822 0x2518  lower right corner
9823 0x251c  tee pointing left
9824 0x2524  tee pointing right
9825 0x2534  tee pointing up
9826 0x252c  tee pointing down
9827 0x2500  horizontal line
9828 0x2502  vertical line
9829 0x253c  large plus or crossover
9830 0x23ba  scan line 1
9831 0x23bd  scan line 9
9832 0x25c6  diamond
9833 0x2592  checker board (stipple)
9834 0x00b0  degree symbol
9835 0x00b1  plus/minus
9836 0x00b7  bullet
9837 -       Teletype 5410v1 symbols
9838 0x2190  arrow pointing left
9839 0x2192  arrow pointing right
9840 0x2193  arrow pointing down
9841 0x2191  arrow pointing up
9842 0x2592  board of squares
9843 0x2603  lantern symbol
9844 0x25ae  solid square block
9845 -       these defaults were invented for ncurses
9846 0x23bb  scan line 3
9847 0x23bc  scan line 7
9848 0x2264  less-than-or-equal-to
9849 0x2265  greater-than-or-equal-to
9850 0x03c0  greek pi
9851 0x2260  not-equal
9852 0x00a3  pound-sterling symbol
9853 -       thick-line-drawing
9854 0x250f  upper left corner
9855 0x2517  lower left corner
9856 0x2513  upper right corner
9857 0x251b  lower right corner
9858 0x2523  tee pointing left
9859 0x252b  tee pointing right
9860 0x253b  tee pointing up
9861 0x2533  tee pointing down
9862 0x2501  horizontal line
9863 0x2503  vertical line
9864 0x254b  large plus or crossover
9865 -       double-line-drawing
9866 0x2554  upper left corner
9867 0x255a  lower left corner
9868 0x2557  upper right corner
9869 0x255d  lower right corner
9870 0x2563  tee pointing left
9871 0x2560  tee pointing right
9872 0x2569  tee pointing up
9873 0x2566  tee pointing down
9874 0x2550  horizontal line
9875 0x2551  vertical line
9876 0x256c  large plus or crossover
9877 CF_EOF
9878 if test "$cross_compiling" = yes; then
9879   cf_cv_wcwidth_graphics=unknown
9880 else
9881   cat >conftest.$ac_ext <<_ACEOF
9882 #line 9882 "configure"
9883 #include "confdefs.h"
9884
9885 #include <locale.h>
9886 #include <stdio.h>
9887 #include <wchar.h>
9888
9889 #define MY_LEN 80
9890
9891 int
9892 main(void)
9893 {
9894         FILE *fp;
9895         int value;
9896         char buffer[MY_LEN + 1];
9897         char notes[MY_LEN + 1];
9898         int totals = 0;
9899         int passed = 0;
9900
9901         if (setlocale(LC_ALL, "en_US.UTF8") ||
9902                 setlocale(LC_ALL, "en_US.UTF-8") ||
9903                 setlocale(LC_ALL, "en_US.utf8") ||
9904                 setlocale(LC_ALL, "en_US.utf-8")) {
9905                 if ((fp = fopen("conftest.in", "r")) != 0) {
9906                         while (fgets(buffer, MY_LEN, fp) != 0) {
9907                                 if (*buffer == '-') {
9908                                         fprintf(stderr, "\t%s", buffer);
9909                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9910                                         ++totals;
9911                                         if (wcwidth(value) == 1)
9912                                                 ++passed;
9913                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9914                                 } else {
9915                                         fprintf(stderr, "?\t%s", buffer);
9916                                 }
9917                         }
9918                 }
9919         }
9920         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9921         return (totals == passed) ? 0 : 1;
9922 }
9923
9924 _ACEOF
9925 rm -f conftest$ac_exeext
9926 if { (eval echo "$as_me:9926: \"$ac_link\"") >&5
9927   (eval $ac_link) 2>&5
9928   ac_status=$?
9929   echo "$as_me:9929: \$? = $ac_status" >&5
9930   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9931   { (eval echo "$as_me:9931: \"$ac_try\"") >&5
9932   (eval $ac_try) 2>&5
9933   ac_status=$?
9934   echo "$as_me:9934: \$? = $ac_status" >&5
9935   (exit $ac_status); }; }; then
9936   cf_cv_wcwidth_graphics=yes
9937 else
9938   echo "$as_me: program exited with status $ac_status" >&5
9939 echo "$as_me: failed program was:" >&5
9940 cat conftest.$ac_ext >&5
9941 cf_cv_wcwidth_graphics=no
9942 fi
9943 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9944 fi
9945
9946 fi
9947 echo "$as_me:9947: result: $cf_cv_wcwidth_graphics" >&5
9948 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9949
9950         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9951
9952         # with_overwrite=no
9953         NCURSES_CH_T=cchar_t
9954
9955 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9956 do
9957 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9958 echo "$as_me:9958: checking for $ac_func" >&5
9959 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9960 if eval "test \"\${$as_ac_var+set}\" = set"; then
9961   echo $ECHO_N "(cached) $ECHO_C" >&6
9962 else
9963   cat >conftest.$ac_ext <<_ACEOF
9964 #line 9964 "configure"
9965 #include "confdefs.h"
9966 /* System header to define __stub macros and hopefully few prototypes,
9967     which can conflict with char $ac_func (); below.  */
9968 #include <assert.h>
9969 /* Override any gcc2 internal prototype to avoid an error.  */
9970 #ifdef __cplusplus
9971 extern "C"
9972 #endif
9973 /* We use char because int might match the return type of a gcc2
9974    builtin and then its argument prototype would still apply.  */
9975 char $ac_func ();
9976 char (*f) ();
9977
9978 int
9979 main (void)
9980 {
9981 /* The GNU C library defines this for functions which it implements
9982     to always fail with ENOSYS.  Some functions are actually named
9983     something starting with __ and the normal name is an alias.  */
9984 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9985 choke me
9986 #else
9987 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9988 #endif
9989
9990   ;
9991   return 0;
9992 }
9993 _ACEOF
9994 rm -f conftest.$ac_objext conftest$ac_exeext
9995 if { (eval echo "$as_me:9995: \"$ac_link\"") >&5
9996   (eval $ac_link) 2>&5
9997   ac_status=$?
9998   echo "$as_me:9998: \$? = $ac_status" >&5
9999   (exit $ac_status); } &&
10000          { ac_try='test -s conftest$ac_exeext'
10001   { (eval echo "$as_me:10001: \"$ac_try\"") >&5
10002   (eval $ac_try) 2>&5
10003   ac_status=$?
10004   echo "$as_me:10004: \$? = $ac_status" >&5
10005   (exit $ac_status); }; }; then
10006   eval "$as_ac_var=yes"
10007 else
10008   echo "$as_me: failed program was:" >&5
10009 cat conftest.$ac_ext >&5
10010 eval "$as_ac_var=no"
10011 fi
10012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10013 fi
10014 echo "$as_me:10014: result: `eval echo '${'$as_ac_var'}'`" >&5
10015 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10016 if test `eval echo '${'$as_ac_var'}'` = yes; then
10017   cat >>confdefs.h <<EOF
10018 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10019 EOF
10020
10021 fi
10022 done
10023
10024         if test "x$ac_cv_func_putwc" != xyes ; then
10025
10026 echo "$as_me:10026: checking for multibyte character support" >&5
10027 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10028 if test "${cf_cv_utf8_lib+set}" = set; then
10029   echo $ECHO_N "(cached) $ECHO_C" >&6
10030 else
10031
10032         cf_save_LIBS="$LIBS"
10033         cat >conftest.$ac_ext <<_ACEOF
10034 #line 10034 "configure"
10035 #include "confdefs.h"
10036
10037 #include <stdlib.h>
10038 int
10039 main (void)
10040 {
10041 putwc(0,0);
10042   ;
10043   return 0;
10044 }
10045 _ACEOF
10046 rm -f conftest.$ac_objext conftest$ac_exeext
10047 if { (eval echo "$as_me:10047: \"$ac_link\"") >&5
10048   (eval $ac_link) 2>&5
10049   ac_status=$?
10050   echo "$as_me:10050: \$? = $ac_status" >&5
10051   (exit $ac_status); } &&
10052          { ac_try='test -s conftest$ac_exeext'
10053   { (eval echo "$as_me:10053: \"$ac_try\"") >&5
10054   (eval $ac_try) 2>&5
10055   ac_status=$?
10056   echo "$as_me:10056: \$? = $ac_status" >&5
10057   (exit $ac_status); }; }; then
10058   cf_cv_utf8_lib=yes
10059 else
10060   echo "$as_me: failed program was:" >&5
10061 cat conftest.$ac_ext >&5
10062
10063 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10064 # will be set on completion of the AC_TRY_LINK below.
10065 cf_cv_header_path_utf8=
10066 cf_cv_library_path_utf8=
10067
10068 echo "${as_me:-configure}:10068: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10069
10070 cf_save_LIBS="$LIBS"
10071
10072 cat >conftest.$ac_ext <<_ACEOF
10073 #line 10073 "configure"
10074 #include "confdefs.h"
10075
10076 #include <libutf8.h>
10077 int
10078 main (void)
10079 {
10080 putwc(0,0);
10081   ;
10082   return 0;
10083 }
10084 _ACEOF
10085 rm -f conftest.$ac_objext conftest$ac_exeext
10086 if { (eval echo "$as_me:10086: \"$ac_link\"") >&5
10087   (eval $ac_link) 2>&5
10088   ac_status=$?
10089   echo "$as_me:10089: \$? = $ac_status" >&5
10090   (exit $ac_status); } &&
10091          { ac_try='test -s conftest$ac_exeext'
10092   { (eval echo "$as_me:10092: \"$ac_try\"") >&5
10093   (eval $ac_try) 2>&5
10094   ac_status=$?
10095   echo "$as_me:10095: \$? = $ac_status" >&5
10096   (exit $ac_status); }; }; then
10097
10098         cf_cv_find_linkage_utf8=yes
10099         cf_cv_header_path_utf8=/usr/include
10100         cf_cv_library_path_utf8=/usr/lib
10101
10102 else
10103   echo "$as_me: failed program was:" >&5
10104 cat conftest.$ac_ext >&5
10105
10106 LIBS="-lutf8  $cf_save_LIBS"
10107
10108 cat >conftest.$ac_ext <<_ACEOF
10109 #line 10109 "configure"
10110 #include "confdefs.h"
10111
10112 #include <libutf8.h>
10113 int
10114 main (void)
10115 {
10116 putwc(0,0);
10117   ;
10118   return 0;
10119 }
10120 _ACEOF
10121 rm -f conftest.$ac_objext conftest$ac_exeext
10122 if { (eval echo "$as_me:10122: \"$ac_link\"") >&5
10123   (eval $ac_link) 2>&5
10124   ac_status=$?
10125   echo "$as_me:10125: \$? = $ac_status" >&5
10126   (exit $ac_status); } &&
10127          { ac_try='test -s conftest$ac_exeext'
10128   { (eval echo "$as_me:10128: \"$ac_try\"") >&5
10129   (eval $ac_try) 2>&5
10130   ac_status=$?
10131   echo "$as_me:10131: \$? = $ac_status" >&5
10132   (exit $ac_status); }; }; then
10133
10134         cf_cv_find_linkage_utf8=yes
10135         cf_cv_header_path_utf8=/usr/include
10136         cf_cv_library_path_utf8=/usr/lib
10137         cf_cv_library_file_utf8="-lutf8"
10138
10139 else
10140   echo "$as_me: failed program was:" >&5
10141 cat conftest.$ac_ext >&5
10142
10143         cf_cv_find_linkage_utf8=no
10144         LIBS="$cf_save_LIBS"
10145
10146         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
10147
10148 echo "${as_me:-configure}:10148: testing find linkage for utf8 library ..." 1>&5
10149
10150 echo "${as_me:-configure}:10150: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10151
10152         cf_save_CPPFLAGS="$CPPFLAGS"
10153         cf_test_CPPFLAGS="$CPPFLAGS"
10154
10155 cf_search=
10156
10157 # collect the current set of include-directories from compiler flags
10158 cf_header_path_list=""
10159 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10160         for cf_header_path in $CPPFLAGS $CFLAGS
10161         do
10162                 case $cf_header_path in
10163                 (-I*)
10164                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10165
10166 test "x$cf_header_path" != "xNONE" && \
10167 test -d "$cf_header_path" && \
10168  {
10169         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10170         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10171         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10172         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10173         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10174         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10175 }
10176
10177                         cf_header_path_list="$cf_header_path_list $cf_search"
10178                         ;;
10179                 esac
10180         done
10181 fi
10182
10183 # add the variations for the package we are looking for
10184
10185 cf_search=
10186
10187 test "x$prefix" != "xNONE" && \
10188 test -d "$prefix" && \
10189  {
10190         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10191         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10192         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10193         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10194         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10195         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10196 }
10197
10198 for cf_subdir_prefix in \
10199         /usr \
10200         /usr/local \
10201         /usr/pkg \
10202         /opt \
10203         /opt/local \
10204         $HOME
10205 do
10206
10207 test "x$cf_subdir_prefix" != "x$prefix" && \
10208 test -d "$cf_subdir_prefix" && \
10209 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10210         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10211         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10212         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10213         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10214         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10215         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10216 }
10217
10218 done
10219
10220 test "$includedir" != NONE && \
10221 test "$includedir" != "/usr/include" && \
10222 test -d "$includedir" && {
10223         test -d $includedir &&    cf_search="$cf_search $includedir"
10224         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10225 }
10226
10227 test "$oldincludedir" != NONE && \
10228 test "$oldincludedir" != "/usr/include" && \
10229 test -d "$oldincludedir" && {
10230         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10231         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10232 }
10233
10234 cf_search="$cf_search $cf_header_path_list"
10235
10236         for cf_cv_header_path_utf8 in $cf_search
10237         do
10238                 if test -d $cf_cv_header_path_utf8 ; then
10239                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10240
10241 echo "${as_me:-configure}:10241: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10242
10243                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10244                         cat >conftest.$ac_ext <<_ACEOF
10245 #line 10245 "configure"
10246 #include "confdefs.h"
10247
10248 #include <libutf8.h>
10249 int
10250 main (void)
10251 {
10252 putwc(0,0);
10253   ;
10254   return 0;
10255 }
10256 _ACEOF
10257 rm -f conftest.$ac_objext
10258 if { (eval echo "$as_me:10258: \"$ac_compile\"") >&5
10259   (eval $ac_compile) 2>&5
10260   ac_status=$?
10261   echo "$as_me:10261: \$? = $ac_status" >&5
10262   (exit $ac_status); } &&
10263          { ac_try='test -s conftest.$ac_objext'
10264   { (eval echo "$as_me:10264: \"$ac_try\"") >&5
10265   (eval $ac_try) 2>&5
10266   ac_status=$?
10267   echo "$as_me:10267: \$? = $ac_status" >&5
10268   (exit $ac_status); }; }; then
10269
10270                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10271
10272 echo "${as_me:-configure}:10272: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10273
10274                                 cf_cv_find_linkage_utf8=maybe
10275                                 cf_test_CPPFLAGS="$CPPFLAGS"
10276                                 break
10277 else
10278   echo "$as_me: failed program was:" >&5
10279 cat conftest.$ac_ext >&5
10280
10281                                 CPPFLAGS="$cf_save_CPPFLAGS"
10282
10283 fi
10284 rm -f conftest.$ac_objext conftest.$ac_ext
10285                 fi
10286         done
10287
10288         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10289
10290 echo "${as_me:-configure}:10290: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10291
10292                 cf_save_LIBS="$LIBS"
10293                 cf_save_LDFLAGS="$LDFLAGS"
10294
10295                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10296
10297 cf_search=
10298 cf_library_path_list=""
10299 if test -n "${LDFLAGS}${LIBS}" ; then
10300         for cf_library_path in $LDFLAGS $LIBS
10301         do
10302                 case $cf_library_path in
10303                 (-L*)
10304                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10305
10306 test "x$cf_library_path" != "xNONE" && \
10307 test -d "$cf_library_path" && \
10308  {
10309         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10310         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10311         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10312         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10313         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10314         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10315 }
10316
10317                         cf_library_path_list="$cf_library_path_list $cf_search"
10318                         ;;
10319                 esac
10320         done
10321 fi
10322
10323 cf_search=
10324
10325 test "x$prefix" != "xNONE" && \
10326 test -d "$prefix" && \
10327  {
10328         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10329         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10330         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10331         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10332         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10333         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10334 }
10335
10336 for cf_subdir_prefix in \
10337         /usr \
10338         /usr/local \
10339         /usr/pkg \
10340         /opt \
10341         /opt/local \
10342         $HOME
10343 do
10344
10345 test "x$cf_subdir_prefix" != "x$prefix" && \
10346 test -d "$cf_subdir_prefix" && \
10347 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10348         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10349         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10350         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10351         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10352         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10353         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10354 }
10355
10356 done
10357
10358 cf_search="$cf_library_path_list $cf_search"
10359
10360                         for cf_cv_library_path_utf8 in $cf_search
10361                         do
10362                                 if test -d $cf_cv_library_path_utf8 ; then
10363                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10364
10365 echo "${as_me:-configure}:10365: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10366
10367                                         CPPFLAGS="$cf_test_CPPFLAGS"
10368                                         LIBS="-lutf8  $cf_save_LIBS"
10369                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10370                                         cat >conftest.$ac_ext <<_ACEOF
10371 #line 10371 "configure"
10372 #include "confdefs.h"
10373
10374 #include <libutf8.h>
10375 int
10376 main (void)
10377 {
10378 putwc(0,0);
10379   ;
10380   return 0;
10381 }
10382 _ACEOF
10383 rm -f conftest.$ac_objext conftest$ac_exeext
10384 if { (eval echo "$as_me:10384: \"$ac_link\"") >&5
10385   (eval $ac_link) 2>&5
10386   ac_status=$?
10387   echo "$as_me:10387: \$? = $ac_status" >&5
10388   (exit $ac_status); } &&
10389          { ac_try='test -s conftest$ac_exeext'
10390   { (eval echo "$as_me:10390: \"$ac_try\"") >&5
10391   (eval $ac_try) 2>&5
10392   ac_status=$?
10393   echo "$as_me:10393: \$? = $ac_status" >&5
10394   (exit $ac_status); }; }; then
10395
10396                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10397
10398 echo "${as_me:-configure}:10398: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10399
10400                                         cf_cv_find_linkage_utf8=yes
10401                                         cf_cv_library_file_utf8="-lutf8"
10402                                         break
10403 else
10404   echo "$as_me: failed program was:" >&5
10405 cat conftest.$ac_ext >&5
10406
10407                                         CPPFLAGS="$cf_save_CPPFLAGS"
10408                                         LIBS="$cf_save_LIBS"
10409                                         LDFLAGS="$cf_save_LDFLAGS"
10410
10411 fi
10412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10413                                 fi
10414                         done
10415                         CPPFLAGS="$cf_save_CPPFLAGS"
10416                         LDFLAGS="$cf_save_LDFLAGS"
10417                 fi
10418
10419         else
10420                 cf_cv_find_linkage_utf8=no
10421         fi
10422
10423 fi
10424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10425
10426 fi
10427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10428
10429 LIBS="$cf_save_LIBS"
10430
10431 if test "$cf_cv_find_linkage_utf8" = yes ; then
10432 cf_cv_utf8_lib=add-on
10433 else
10434 cf_cv_utf8_lib=no
10435 fi
10436
10437 fi
10438 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10439 fi
10440 echo "$as_me:10440: result: $cf_cv_utf8_lib" >&5
10441 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10442
10443 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10444 # ncurses/ncursesw:
10445 if test "$cf_cv_utf8_lib" = "add-on" ; then
10446
10447 cat >>confdefs.h <<\EOF
10448 #define HAVE_LIBUTF8_H 1
10449 EOF
10450
10451 if test -n "$cf_cv_header_path_utf8" ; then
10452   for cf_add_incdir in $cf_cv_header_path_utf8
10453   do
10454         while test $cf_add_incdir != /usr/include
10455         do
10456           if test -d $cf_add_incdir
10457           then
10458                 cf_have_incdir=no
10459                 if test -n "$CFLAGS$CPPFLAGS" ; then
10460                   # a loop is needed to ensure we can add subdirs of existing dirs
10461                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10462                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10463                           cf_have_incdir=yes; break
10464                         fi
10465                   done
10466                 fi
10467
10468                 if test "$cf_have_incdir" = no ; then
10469                   if test "$cf_add_incdir" = /usr/local/include ; then
10470                         if test "$GCC" = yes
10471                         then
10472                           cf_save_CPPFLAGS=$CPPFLAGS
10473                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10474                           cat >conftest.$ac_ext <<_ACEOF
10475 #line 10475 "configure"
10476 #include "confdefs.h"
10477 #include <stdio.h>
10478 int
10479 main (void)
10480 {
10481 printf("Hello")
10482   ;
10483   return 0;
10484 }
10485 _ACEOF
10486 rm -f conftest.$ac_objext
10487 if { (eval echo "$as_me:10487: \"$ac_compile\"") >&5
10488   (eval $ac_compile) 2>&5
10489   ac_status=$?
10490   echo "$as_me:10490: \$? = $ac_status" >&5
10491   (exit $ac_status); } &&
10492          { ac_try='test -s conftest.$ac_objext'
10493   { (eval echo "$as_me:10493: \"$ac_try\"") >&5
10494   (eval $ac_try) 2>&5
10495   ac_status=$?
10496   echo "$as_me:10496: \$? = $ac_status" >&5
10497   (exit $ac_status); }; }; then
10498   :
10499 else
10500   echo "$as_me: failed program was:" >&5
10501 cat conftest.$ac_ext >&5
10502 cf_have_incdir=yes
10503 fi
10504 rm -f conftest.$ac_objext conftest.$ac_ext
10505                           CPPFLAGS=$cf_save_CPPFLAGS
10506                         fi
10507                   fi
10508                 fi
10509
10510                 if test "$cf_have_incdir" = no ; then
10511                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10512
10513 echo "${as_me:-configure}:10513: testing adding $cf_add_incdir to include-path ..." 1>&5
10514
10515                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10516
10517                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10518                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10519                   cf_add_incdir="$cf_top_incdir"
10520                 else
10521                   break
10522                 fi
10523           else
10524                 break
10525           fi
10526         done
10527   done
10528 fi
10529
10530 if test -n "$cf_cv_library_path_utf8" ; then
10531         for cf_add_libdir in $cf_cv_library_path_utf8
10532         do
10533                 if test $cf_add_libdir = /usr/lib ; then
10534                         :
10535                 elif test -d $cf_add_libdir
10536                 then
10537                         cf_have_libdir=no
10538                         if test -n "$LDFLAGS$LIBS" ; then
10539                                 # a loop is needed to ensure we can add subdirs of existing dirs
10540                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10541                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10542                                                 cf_have_libdir=yes; break
10543                                         fi
10544                                 done
10545                         fi
10546                         if test "$cf_have_libdir" = no ; then
10547                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10548
10549 echo "${as_me:-configure}:10549: testing adding $cf_add_libdir to library-path ..." 1>&5
10550
10551                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10552                         fi
10553                 fi
10554         done
10555 fi
10556
10557 cf_add_libs="$cf_cv_library_file_utf8"
10558 # Filter out duplicates - this happens with badly-designed ".pc" files...
10559 for cf_add_1lib in $LIBS
10560 do
10561         for cf_add_2lib in $cf_add_libs
10562         do
10563                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10564                 then
10565                         cf_add_1lib=
10566                         break
10567                 fi
10568         done
10569         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10570 done
10571 LIBS="$cf_add_libs"
10572
10573 fi
10574
10575                 if test "$cf_cv_utf8_lib" != no ; then
10576                         NCURSES_LIBUTF8=1
10577                 fi
10578         fi
10579
10580 # This is needed on Tru64 5.0 to declare mbstate_t
10581 echo "$as_me:10581: checking if we must include wchar.h to declare mbstate_t" >&5
10582 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10583 if test "${cf_cv_mbstate_t+set}" = set; then
10584   echo $ECHO_N "(cached) $ECHO_C" >&6
10585 else
10586
10587 cat >conftest.$ac_ext <<_ACEOF
10588 #line 10588 "configure"
10589 #include "confdefs.h"
10590
10591 #include <stdlib.h>
10592 #include <stdarg.h>
10593 #include <stdio.h>
10594 #ifdef HAVE_LIBUTF8_H
10595 #include <libutf8.h>
10596 #endif
10597 int
10598 main (void)
10599 {
10600 mbstate_t state
10601   ;
10602   return 0;
10603 }
10604 _ACEOF
10605 rm -f conftest.$ac_objext
10606 if { (eval echo "$as_me:10606: \"$ac_compile\"") >&5
10607   (eval $ac_compile) 2>&5
10608   ac_status=$?
10609   echo "$as_me:10609: \$? = $ac_status" >&5
10610   (exit $ac_status); } &&
10611          { ac_try='test -s conftest.$ac_objext'
10612   { (eval echo "$as_me:10612: \"$ac_try\"") >&5
10613   (eval $ac_try) 2>&5
10614   ac_status=$?
10615   echo "$as_me:10615: \$? = $ac_status" >&5
10616   (exit $ac_status); }; }; then
10617   cf_cv_mbstate_t=no
10618 else
10619   echo "$as_me: failed program was:" >&5
10620 cat conftest.$ac_ext >&5
10621 cat >conftest.$ac_ext <<_ACEOF
10622 #line 10622 "configure"
10623 #include "confdefs.h"
10624
10625 #include <stdlib.h>
10626 #include <stdarg.h>
10627 #include <stdio.h>
10628 #include <wchar.h>
10629 #ifdef HAVE_LIBUTF8_H
10630 #include <libutf8.h>
10631 #endif
10632 int
10633 main (void)
10634 {
10635 mbstate_t value
10636   ;
10637   return 0;
10638 }
10639 _ACEOF
10640 rm -f conftest.$ac_objext
10641 if { (eval echo "$as_me:10641: \"$ac_compile\"") >&5
10642   (eval $ac_compile) 2>&5
10643   ac_status=$?
10644   echo "$as_me:10644: \$? = $ac_status" >&5
10645   (exit $ac_status); } &&
10646          { ac_try='test -s conftest.$ac_objext'
10647   { (eval echo "$as_me:10647: \"$ac_try\"") >&5
10648   (eval $ac_try) 2>&5
10649   ac_status=$?
10650   echo "$as_me:10650: \$? = $ac_status" >&5
10651   (exit $ac_status); }; }; then
10652   cf_cv_mbstate_t=yes
10653 else
10654   echo "$as_me: failed program was:" >&5
10655 cat conftest.$ac_ext >&5
10656 cf_cv_mbstate_t=unknown
10657 fi
10658 rm -f conftest.$ac_objext conftest.$ac_ext
10659 fi
10660 rm -f conftest.$ac_objext conftest.$ac_ext
10661 fi
10662 echo "$as_me:10662: result: $cf_cv_mbstate_t" >&5
10663 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10664
10665 if test "$cf_cv_mbstate_t" = yes ; then
10666
10667 cat >>confdefs.h <<\EOF
10668 #define NEED_WCHAR_H 1
10669 EOF
10670
10671         NEED_WCHAR_H=1
10672 fi
10673
10674 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10675 if test "$cf_cv_mbstate_t" = unknown ; then
10676         NCURSES_MBSTATE_T=1
10677 fi
10678
10679 # This is needed on Tru64 5.0 to declare wchar_t
10680 echo "$as_me:10680: checking if we must include wchar.h to declare wchar_t" >&5
10681 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10682 if test "${cf_cv_wchar_t+set}" = set; then
10683   echo $ECHO_N "(cached) $ECHO_C" >&6
10684 else
10685
10686 cat >conftest.$ac_ext <<_ACEOF
10687 #line 10687 "configure"
10688 #include "confdefs.h"
10689
10690 #include <stdlib.h>
10691 #include <stdarg.h>
10692 #include <stdio.h>
10693 #ifdef HAVE_LIBUTF8_H
10694 #include <libutf8.h>
10695 #endif
10696 int
10697 main (void)
10698 {
10699 wchar_t state
10700   ;
10701   return 0;
10702 }
10703 _ACEOF
10704 rm -f conftest.$ac_objext
10705 if { (eval echo "$as_me:10705: \"$ac_compile\"") >&5
10706   (eval $ac_compile) 2>&5
10707   ac_status=$?
10708   echo "$as_me:10708: \$? = $ac_status" >&5
10709   (exit $ac_status); } &&
10710          { ac_try='test -s conftest.$ac_objext'
10711   { (eval echo "$as_me:10711: \"$ac_try\"") >&5
10712   (eval $ac_try) 2>&5
10713   ac_status=$?
10714   echo "$as_me:10714: \$? = $ac_status" >&5
10715   (exit $ac_status); }; }; then
10716   cf_cv_wchar_t=no
10717 else
10718   echo "$as_me: failed program was:" >&5
10719 cat conftest.$ac_ext >&5
10720 cat >conftest.$ac_ext <<_ACEOF
10721 #line 10721 "configure"
10722 #include "confdefs.h"
10723
10724 #include <stdlib.h>
10725 #include <stdarg.h>
10726 #include <stdio.h>
10727 #include <wchar.h>
10728 #ifdef HAVE_LIBUTF8_H
10729 #include <libutf8.h>
10730 #endif
10731 int
10732 main (void)
10733 {
10734 wchar_t value
10735   ;
10736   return 0;
10737 }
10738 _ACEOF
10739 rm -f conftest.$ac_objext
10740 if { (eval echo "$as_me:10740: \"$ac_compile\"") >&5
10741   (eval $ac_compile) 2>&5
10742   ac_status=$?
10743   echo "$as_me:10743: \$? = $ac_status" >&5
10744   (exit $ac_status); } &&
10745          { ac_try='test -s conftest.$ac_objext'
10746   { (eval echo "$as_me:10746: \"$ac_try\"") >&5
10747   (eval $ac_try) 2>&5
10748   ac_status=$?
10749   echo "$as_me:10749: \$? = $ac_status" >&5
10750   (exit $ac_status); }; }; then
10751   cf_cv_wchar_t=yes
10752 else
10753   echo "$as_me: failed program was:" >&5
10754 cat conftest.$ac_ext >&5
10755 cf_cv_wchar_t=unknown
10756 fi
10757 rm -f conftest.$ac_objext conftest.$ac_ext
10758 fi
10759 rm -f conftest.$ac_objext conftest.$ac_ext
10760 fi
10761 echo "$as_me:10761: result: $cf_cv_wchar_t" >&5
10762 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10763
10764 if test "$cf_cv_wchar_t" = yes ; then
10765
10766 cat >>confdefs.h <<\EOF
10767 #define NEED_WCHAR_H 1
10768 EOF
10769
10770         NEED_WCHAR_H=1
10771 fi
10772
10773 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10774 if test "$cf_cv_wchar_t" = unknown ; then
10775         NCURSES_WCHAR_T=1
10776 fi
10777
10778 # if we find wchar_t in either place, use substitution to provide a fallback.
10779 if test "$cf_cv_wchar_t" != unknown ; then
10780         NCURSES_OK_WCHAR_T=1
10781 fi
10782
10783 # This is needed on Tru64 5.0 to declare wint_t
10784 echo "$as_me:10784: checking if we must include wchar.h to declare wint_t" >&5
10785 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10786 if test "${cf_cv_wint_t+set}" = set; then
10787   echo $ECHO_N "(cached) $ECHO_C" >&6
10788 else
10789
10790 cat >conftest.$ac_ext <<_ACEOF
10791 #line 10791 "configure"
10792 #include "confdefs.h"
10793
10794 #include <stdlib.h>
10795 #include <stdarg.h>
10796 #include <stdio.h>
10797 #ifdef HAVE_LIBUTF8_H
10798 #include <libutf8.h>
10799 #endif
10800 int
10801 main (void)
10802 {
10803 wint_t state
10804   ;
10805   return 0;
10806 }
10807 _ACEOF
10808 rm -f conftest.$ac_objext
10809 if { (eval echo "$as_me:10809: \"$ac_compile\"") >&5
10810   (eval $ac_compile) 2>&5
10811   ac_status=$?
10812   echo "$as_me:10812: \$? = $ac_status" >&5
10813   (exit $ac_status); } &&
10814          { ac_try='test -s conftest.$ac_objext'
10815   { (eval echo "$as_me:10815: \"$ac_try\"") >&5
10816   (eval $ac_try) 2>&5
10817   ac_status=$?
10818   echo "$as_me:10818: \$? = $ac_status" >&5
10819   (exit $ac_status); }; }; then
10820   cf_cv_wint_t=no
10821 else
10822   echo "$as_me: failed program was:" >&5
10823 cat conftest.$ac_ext >&5
10824 cat >conftest.$ac_ext <<_ACEOF
10825 #line 10825 "configure"
10826 #include "confdefs.h"
10827
10828 #include <stdlib.h>
10829 #include <stdarg.h>
10830 #include <stdio.h>
10831 #include <wchar.h>
10832 #ifdef HAVE_LIBUTF8_H
10833 #include <libutf8.h>
10834 #endif
10835 int
10836 main (void)
10837 {
10838 wint_t value
10839   ;
10840   return 0;
10841 }
10842 _ACEOF
10843 rm -f conftest.$ac_objext
10844 if { (eval echo "$as_me:10844: \"$ac_compile\"") >&5
10845   (eval $ac_compile) 2>&5
10846   ac_status=$?
10847   echo "$as_me:10847: \$? = $ac_status" >&5
10848   (exit $ac_status); } &&
10849          { ac_try='test -s conftest.$ac_objext'
10850   { (eval echo "$as_me:10850: \"$ac_try\"") >&5
10851   (eval $ac_try) 2>&5
10852   ac_status=$?
10853   echo "$as_me:10853: \$? = $ac_status" >&5
10854   (exit $ac_status); }; }; then
10855   cf_cv_wint_t=yes
10856 else
10857   echo "$as_me: failed program was:" >&5
10858 cat conftest.$ac_ext >&5
10859 cf_cv_wint_t=unknown
10860 fi
10861 rm -f conftest.$ac_objext conftest.$ac_ext
10862 fi
10863 rm -f conftest.$ac_objext conftest.$ac_ext
10864 fi
10865 echo "$as_me:10865: result: $cf_cv_wint_t" >&5
10866 echo "${ECHO_T}$cf_cv_wint_t" >&6
10867
10868 if test "$cf_cv_wint_t" = yes ; then
10869
10870 cat >>confdefs.h <<\EOF
10871 #define NEED_WCHAR_H 1
10872 EOF
10873
10874         NEED_WCHAR_H=1
10875 fi
10876
10877 # if we do not find wint_t in either place, use substitution to provide a fallback.
10878 if test "$cf_cv_wint_t" = unknown ; then
10879         NCURSES_WINT_T=1
10880 fi
10881
10882 # if we find wint_t in either place, use substitution to provide a fallback.
10883 if test "$cf_cv_wint_t" != unknown ; then
10884         NCURSES_OK_WINT_T=1
10885 fi
10886
10887         if test "$NCURSES_MBSTATE_T" != 0; then
10888
10889 cat >>confdefs.h <<\EOF
10890 #define NEED_MBSTATE_T_DEF 1
10891 EOF
10892
10893         fi
10894 fi
10895
10896 ###   use option --disable-lp64 to allow long chtype
10897 echo "$as_me:10897: checking whether to enable _LP64 definition in curses.h" >&5
10898 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10899
10900 # Check whether --enable-lp64 or --disable-lp64 was given.
10901 if test "${enable_lp64+set}" = set; then
10902   enableval="$enable_lp64"
10903   with_lp64=$enableval
10904 else
10905   with_lp64=$cf_dft_with_lp64
10906 fi;
10907 echo "$as_me:10907: result: $with_lp64" >&5
10908 echo "${ECHO_T}$with_lp64" >&6
10909
10910 if test "x$with_lp64" = xyes ; then
10911         cf_cv_enable_lp64=1
10912 else
10913         cf_cv_enable_lp64=0
10914 fi
10915
10916 # Check whether --enable-largefile or --disable-largefile was given.
10917 if test "${enable_largefile+set}" = set; then
10918   enableval="$enable_largefile"
10919
10920 fi;
10921 if test "$enable_largefile" != no; then
10922
10923   echo "$as_me:10923: checking for special C compiler options needed for large files" >&5
10924 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10925 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10926   echo $ECHO_N "(cached) $ECHO_C" >&6
10927 else
10928   ac_cv_sys_largefile_CC=no
10929      if test "$GCC" != yes; then
10930        ac_save_CC=$CC
10931        while :; do
10932          # IRIX 6.2 and later do not support large files by default,
10933          # so use the C compiler's -n32 option if that helps.
10934          cat >conftest.$ac_ext <<_ACEOF
10935 #line 10935 "configure"
10936 #include "confdefs.h"
10937 #include <sys/types.h>
10938  /* Check that off_t can represent 2**63 - 1 correctly.
10939     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10940     since some C++ compilers masquerading as C compilers
10941     incorrectly reject 9223372036854775807.  */
10942 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10943   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10944                        && LARGE_OFF_T % 2147483647 == 1)
10945                       ? 1 : -1];
10946 int
10947 main (void)
10948 {
10949
10950   ;
10951   return 0;
10952 }
10953 _ACEOF
10954          rm -f conftest.$ac_objext
10955 if { (eval echo "$as_me:10955: \"$ac_compile\"") >&5
10956   (eval $ac_compile) 2>&5
10957   ac_status=$?
10958   echo "$as_me:10958: \$? = $ac_status" >&5
10959   (exit $ac_status); } &&
10960          { ac_try='test -s conftest.$ac_objext'
10961   { (eval echo "$as_me:10961: \"$ac_try\"") >&5
10962   (eval $ac_try) 2>&5
10963   ac_status=$?
10964   echo "$as_me:10964: \$? = $ac_status" >&5
10965   (exit $ac_status); }; }; then
10966   break
10967 else
10968   echo "$as_me: failed program was:" >&5
10969 cat conftest.$ac_ext >&5
10970 fi
10971 rm -f conftest.$ac_objext
10972          CC="$CC -n32"
10973          rm -f conftest.$ac_objext
10974 if { (eval echo "$as_me:10974: \"$ac_compile\"") >&5
10975   (eval $ac_compile) 2>&5
10976   ac_status=$?
10977   echo "$as_me:10977: \$? = $ac_status" >&5
10978   (exit $ac_status); } &&
10979          { ac_try='test -s conftest.$ac_objext'
10980   { (eval echo "$as_me:10980: \"$ac_try\"") >&5
10981   (eval $ac_try) 2>&5
10982   ac_status=$?
10983   echo "$as_me:10983: \$? = $ac_status" >&5
10984   (exit $ac_status); }; }; then
10985   ac_cv_sys_largefile_CC=' -n32'; break
10986 else
10987   echo "$as_me: failed program was:" >&5
10988 cat conftest.$ac_ext >&5
10989 fi
10990 rm -f conftest.$ac_objext
10991          break
10992        done
10993        CC=$ac_save_CC
10994        rm -f conftest.$ac_ext
10995     fi
10996 fi
10997 echo "$as_me:10997: result: $ac_cv_sys_largefile_CC" >&5
10998 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10999   if test "$ac_cv_sys_largefile_CC" != no; then
11000     CC=$CC$ac_cv_sys_largefile_CC
11001   fi
11002
11003   echo "$as_me:11003: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11004 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11005 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11006   echo $ECHO_N "(cached) $ECHO_C" >&6
11007 else
11008   while :; do
11009   ac_cv_sys_file_offset_bits=no
11010   cat >conftest.$ac_ext <<_ACEOF
11011 #line 11011 "configure"
11012 #include "confdefs.h"
11013 #include <sys/types.h>
11014  /* Check that off_t can represent 2**63 - 1 correctly.
11015     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11016     since some C++ compilers masquerading as C compilers
11017     incorrectly reject 9223372036854775807.  */
11018 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11019   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11020                        && LARGE_OFF_T % 2147483647 == 1)
11021                       ? 1 : -1];
11022 int
11023 main (void)
11024 {
11025
11026   ;
11027   return 0;
11028 }
11029 _ACEOF
11030 rm -f conftest.$ac_objext
11031 if { (eval echo "$as_me:11031: \"$ac_compile\"") >&5
11032   (eval $ac_compile) 2>&5
11033   ac_status=$?
11034   echo "$as_me:11034: \$? = $ac_status" >&5
11035   (exit $ac_status); } &&
11036          { ac_try='test -s conftest.$ac_objext'
11037   { (eval echo "$as_me:11037: \"$ac_try\"") >&5
11038   (eval $ac_try) 2>&5
11039   ac_status=$?
11040   echo "$as_me:11040: \$? = $ac_status" >&5
11041   (exit $ac_status); }; }; then
11042   break
11043 else
11044   echo "$as_me: failed program was:" >&5
11045 cat conftest.$ac_ext >&5
11046 fi
11047 rm -f conftest.$ac_objext conftest.$ac_ext
11048   cat >conftest.$ac_ext <<_ACEOF
11049 #line 11049 "configure"
11050 #include "confdefs.h"
11051 #define _FILE_OFFSET_BITS 64
11052 #include <sys/types.h>
11053  /* Check that off_t can represent 2**63 - 1 correctly.
11054     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11055     since some C++ compilers masquerading as C compilers
11056     incorrectly reject 9223372036854775807.  */
11057 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11058   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11059                        && LARGE_OFF_T % 2147483647 == 1)
11060                       ? 1 : -1];
11061 int
11062 main (void)
11063 {
11064
11065   ;
11066   return 0;
11067 }
11068 _ACEOF
11069 rm -f conftest.$ac_objext
11070 if { (eval echo "$as_me:11070: \"$ac_compile\"") >&5
11071   (eval $ac_compile) 2>&5
11072   ac_status=$?
11073   echo "$as_me:11073: \$? = $ac_status" >&5
11074   (exit $ac_status); } &&
11075          { ac_try='test -s conftest.$ac_objext'
11076   { (eval echo "$as_me:11076: \"$ac_try\"") >&5
11077   (eval $ac_try) 2>&5
11078   ac_status=$?
11079   echo "$as_me:11079: \$? = $ac_status" >&5
11080   (exit $ac_status); }; }; then
11081   ac_cv_sys_file_offset_bits=64; break
11082 else
11083   echo "$as_me: failed program was:" >&5
11084 cat conftest.$ac_ext >&5
11085 fi
11086 rm -f conftest.$ac_objext conftest.$ac_ext
11087   break
11088 done
11089 fi
11090 echo "$as_me:11090: result: $ac_cv_sys_file_offset_bits" >&5
11091 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11092 if test "$ac_cv_sys_file_offset_bits" != no; then
11093
11094 cat >>confdefs.h <<EOF
11095 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11096 EOF
11097
11098 fi
11099 rm -rf conftest*
11100   echo "$as_me:11100: checking for _LARGE_FILES value needed for large files" >&5
11101 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11102 if test "${ac_cv_sys_large_files+set}" = set; then
11103   echo $ECHO_N "(cached) $ECHO_C" >&6
11104 else
11105   while :; do
11106   ac_cv_sys_large_files=no
11107   cat >conftest.$ac_ext <<_ACEOF
11108 #line 11108 "configure"
11109 #include "confdefs.h"
11110 #include <sys/types.h>
11111  /* Check that off_t can represent 2**63 - 1 correctly.
11112     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11113     since some C++ compilers masquerading as C compilers
11114     incorrectly reject 9223372036854775807.  */
11115 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11116   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11117                        && LARGE_OFF_T % 2147483647 == 1)
11118                       ? 1 : -1];
11119 int
11120 main (void)
11121 {
11122
11123   ;
11124   return 0;
11125 }
11126 _ACEOF
11127 rm -f conftest.$ac_objext
11128 if { (eval echo "$as_me:11128: \"$ac_compile\"") >&5
11129   (eval $ac_compile) 2>&5
11130   ac_status=$?
11131   echo "$as_me:11131: \$? = $ac_status" >&5
11132   (exit $ac_status); } &&
11133          { ac_try='test -s conftest.$ac_objext'
11134   { (eval echo "$as_me:11134: \"$ac_try\"") >&5
11135   (eval $ac_try) 2>&5
11136   ac_status=$?
11137   echo "$as_me:11137: \$? = $ac_status" >&5
11138   (exit $ac_status); }; }; then
11139   break
11140 else
11141   echo "$as_me: failed program was:" >&5
11142 cat conftest.$ac_ext >&5
11143 fi
11144 rm -f conftest.$ac_objext conftest.$ac_ext
11145   cat >conftest.$ac_ext <<_ACEOF
11146 #line 11146 "configure"
11147 #include "confdefs.h"
11148 #define _LARGE_FILES 1
11149 #include <sys/types.h>
11150  /* Check that off_t can represent 2**63 - 1 correctly.
11151     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11152     since some C++ compilers masquerading as C compilers
11153     incorrectly reject 9223372036854775807.  */
11154 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11155   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11156                        && LARGE_OFF_T % 2147483647 == 1)
11157                       ? 1 : -1];
11158 int
11159 main (void)
11160 {
11161
11162   ;
11163   return 0;
11164 }
11165 _ACEOF
11166 rm -f conftest.$ac_objext
11167 if { (eval echo "$as_me:11167: \"$ac_compile\"") >&5
11168   (eval $ac_compile) 2>&5
11169   ac_status=$?
11170   echo "$as_me:11170: \$? = $ac_status" >&5
11171   (exit $ac_status); } &&
11172          { ac_try='test -s conftest.$ac_objext'
11173   { (eval echo "$as_me:11173: \"$ac_try\"") >&5
11174   (eval $ac_try) 2>&5
11175   ac_status=$?
11176   echo "$as_me:11176: \$? = $ac_status" >&5
11177   (exit $ac_status); }; }; then
11178   ac_cv_sys_large_files=1; break
11179 else
11180   echo "$as_me: failed program was:" >&5
11181 cat conftest.$ac_ext >&5
11182 fi
11183 rm -f conftest.$ac_objext conftest.$ac_ext
11184   break
11185 done
11186 fi
11187 echo "$as_me:11187: result: $ac_cv_sys_large_files" >&5
11188 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11189 if test "$ac_cv_sys_large_files" != no; then
11190
11191 cat >>confdefs.h <<EOF
11192 #define _LARGE_FILES $ac_cv_sys_large_files
11193 EOF
11194
11195 fi
11196 rm -rf conftest*
11197 fi
11198
11199         if test "$enable_largefile" != no ; then
11200         echo "$as_me:11200: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11201 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11202 if test "${ac_cv_sys_largefile_source+set}" = set; then
11203   echo $ECHO_N "(cached) $ECHO_C" >&6
11204 else
11205   while :; do
11206   ac_cv_sys_largefile_source=no
11207   cat >conftest.$ac_ext <<_ACEOF
11208 #line 11208 "configure"
11209 #include "confdefs.h"
11210 #include <stdio.h>
11211 int
11212 main (void)
11213 {
11214 return !fseeko;
11215   ;
11216   return 0;
11217 }
11218 _ACEOF
11219 rm -f conftest.$ac_objext
11220 if { (eval echo "$as_me:11220: \"$ac_compile\"") >&5
11221   (eval $ac_compile) 2>&5
11222   ac_status=$?
11223   echo "$as_me:11223: \$? = $ac_status" >&5
11224   (exit $ac_status); } &&
11225          { ac_try='test -s conftest.$ac_objext'
11226   { (eval echo "$as_me:11226: \"$ac_try\"") >&5
11227   (eval $ac_try) 2>&5
11228   ac_status=$?
11229   echo "$as_me:11229: \$? = $ac_status" >&5
11230   (exit $ac_status); }; }; then
11231   break
11232 else
11233   echo "$as_me: failed program was:" >&5
11234 cat conftest.$ac_ext >&5
11235 fi
11236 rm -f conftest.$ac_objext conftest.$ac_ext
11237   cat >conftest.$ac_ext <<_ACEOF
11238 #line 11238 "configure"
11239 #include "confdefs.h"
11240 #define _LARGEFILE_SOURCE 1
11241 #include <stdio.h>
11242 int
11243 main (void)
11244 {
11245 return !fseeko;
11246   ;
11247   return 0;
11248 }
11249 _ACEOF
11250 rm -f conftest.$ac_objext
11251 if { (eval echo "$as_me:11251: \"$ac_compile\"") >&5
11252   (eval $ac_compile) 2>&5
11253   ac_status=$?
11254   echo "$as_me:11254: \$? = $ac_status" >&5
11255   (exit $ac_status); } &&
11256          { ac_try='test -s conftest.$ac_objext'
11257   { (eval echo "$as_me:11257: \"$ac_try\"") >&5
11258   (eval $ac_try) 2>&5
11259   ac_status=$?
11260   echo "$as_me:11260: \$? = $ac_status" >&5
11261   (exit $ac_status); }; }; then
11262   ac_cv_sys_largefile_source=1; break
11263 else
11264   echo "$as_me: failed program was:" >&5
11265 cat conftest.$ac_ext >&5
11266 fi
11267 rm -f conftest.$ac_objext conftest.$ac_ext
11268   break
11269 done
11270 fi
11271 echo "$as_me:11271: result: $ac_cv_sys_largefile_source" >&5
11272 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11273 if test "$ac_cv_sys_largefile_source" != no; then
11274
11275 cat >>confdefs.h <<EOF
11276 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11277 EOF
11278
11279 fi
11280 rm -rf conftest*
11281
11282 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11283 # in glibc 2.1.3, but that breaks too many other things.
11284 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11285 echo "$as_me:11285: checking for fseeko" >&5
11286 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11287 if test "${ac_cv_func_fseeko+set}" = set; then
11288   echo $ECHO_N "(cached) $ECHO_C" >&6
11289 else
11290   cat >conftest.$ac_ext <<_ACEOF
11291 #line 11291 "configure"
11292 #include "confdefs.h"
11293 #include <stdio.h>
11294 int
11295 main (void)
11296 {
11297 return fseeko && fseeko (stdin, 0, 0);
11298   ;
11299   return 0;
11300 }
11301 _ACEOF
11302 rm -f conftest.$ac_objext conftest$ac_exeext
11303 if { (eval echo "$as_me:11303: \"$ac_link\"") >&5
11304   (eval $ac_link) 2>&5
11305   ac_status=$?
11306   echo "$as_me:11306: \$? = $ac_status" >&5
11307   (exit $ac_status); } &&
11308          { ac_try='test -s conftest$ac_exeext'
11309   { (eval echo "$as_me:11309: \"$ac_try\"") >&5
11310   (eval $ac_try) 2>&5
11311   ac_status=$?
11312   echo "$as_me:11312: \$? = $ac_status" >&5
11313   (exit $ac_status); }; }; then
11314   ac_cv_func_fseeko=yes
11315 else
11316   echo "$as_me: failed program was:" >&5
11317 cat conftest.$ac_ext >&5
11318 ac_cv_func_fseeko=no
11319 fi
11320 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11321 fi
11322 echo "$as_me:11322: result: $ac_cv_func_fseeko" >&5
11323 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11324 if test $ac_cv_func_fseeko = yes; then
11325
11326 cat >>confdefs.h <<\EOF
11327 #define HAVE_FSEEKO 1
11328 EOF
11329
11330 fi
11331
11332         # Normally we would collect these definitions in the config.h,
11333         # but (like _XOPEN_SOURCE), some environments rely on having these
11334         # defined before any of the system headers are included.  Another
11335         # case comes up with C++, e.g., on AIX the compiler compiles the
11336         # header files by themselves before looking at the body files it is
11337         # told to compile.  For ncurses, those header files do not include
11338         # the config.h
11339         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11340         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11341         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11342
11343         echo "$as_me:11343: checking whether to use struct dirent64" >&5
11344 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11345 if test "${cf_cv_struct_dirent64+set}" = set; then
11346   echo $ECHO_N "(cached) $ECHO_C" >&6
11347 else
11348
11349                 cat >conftest.$ac_ext <<_ACEOF
11350 #line 11350 "configure"
11351 #include "confdefs.h"
11352
11353 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11354 #include <sys/types.h>
11355 #include <dirent.h>
11356
11357 int
11358 main (void)
11359 {
11360
11361                 /* if transitional largefile support is setup, this is true */
11362                 extern struct dirent64 * readdir(DIR *);
11363                 struct dirent64 *x = readdir((DIR *)0);
11364                 struct dirent *y = readdir((DIR *)0);
11365                 int z = x - y;
11366
11367   ;
11368   return 0;
11369 }
11370 _ACEOF
11371 rm -f conftest.$ac_objext
11372 if { (eval echo "$as_me:11372: \"$ac_compile\"") >&5
11373   (eval $ac_compile) 2>&5
11374   ac_status=$?
11375   echo "$as_me:11375: \$? = $ac_status" >&5
11376   (exit $ac_status); } &&
11377          { ac_try='test -s conftest.$ac_objext'
11378   { (eval echo "$as_me:11378: \"$ac_try\"") >&5
11379   (eval $ac_try) 2>&5
11380   ac_status=$?
11381   echo "$as_me:11381: \$? = $ac_status" >&5
11382   (exit $ac_status); }; }; then
11383   cf_cv_struct_dirent64=yes
11384 else
11385   echo "$as_me: failed program was:" >&5
11386 cat conftest.$ac_ext >&5
11387 cf_cv_struct_dirent64=no
11388 fi
11389 rm -f conftest.$ac_objext conftest.$ac_ext
11390
11391 fi
11392 echo "$as_me:11392: result: $cf_cv_struct_dirent64" >&5
11393 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11394         test "$cf_cv_struct_dirent64" = yes &&
11395 cat >>confdefs.h <<\EOF
11396 #define HAVE_STRUCT_DIRENT64 1
11397 EOF
11398
11399         fi
11400
11401 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11402 echo "$as_me:11402: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11403 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11404
11405 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11406 if test "${enable_tparm_varargs+set}" = set; then
11407   enableval="$enable_tparm_varargs"
11408   with_tparm_varargs=$enableval
11409 else
11410   with_tparm_varargs=yes
11411 fi;
11412 echo "$as_me:11412: result: $with_tparm_varargs" >&5
11413 echo "${ECHO_T}$with_tparm_varargs" >&6
11414 NCURSES_TPARM_VARARGS=0
11415 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11416
11417 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11418 if test "$with_ticlib" != no ; then
11419 echo "$as_me:11419: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11420 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11421
11422 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11423 if test "${enable_tic_depends+set}" = set; then
11424   enableval="$enable_tic_depends"
11425   with_tic_depends=$enableval
11426 else
11427   with_tic_depends=yes
11428 fi;
11429 echo "$as_me:11429: result: $with_tic_depends" >&5
11430 echo "${ECHO_T}$with_tic_depends" >&6
11431 else
11432         with_tic_depends=no
11433 fi
11434
11435 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11436 echo "$as_me:11436: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11437 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11438
11439 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11440 if test "${enable_wattr_macros+set}" = set; then
11441   enableval="$enable_wattr_macros"
11442   with_wattr_macros=$enableval
11443 else
11444   with_wattr_macros=yes
11445 fi;
11446 if [ "x$with_wattr_macros" != xyes ]; then
11447         NCURSES_WATTR_MACROS=0
11448         echo "$as_me:11448: result: yes" >&5
11449 echo "${ECHO_T}yes" >&6
11450 else
11451         NCURSES_WATTR_MACROS=1
11452         echo "$as_me:11452: result: no" >&5
11453 echo "${ECHO_T}no" >&6
11454 fi
11455
11456 echo "$as_me:11456: checking for X11 rgb file" >&5
11457 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
11458
11459 # Check whether --with-x11-rgb or --without-x11-rgb was given.
11460 if test "${with_x11_rgb+set}" = set; then
11461   withval="$with_x11_rgb"
11462   RGB_PATH=$withval
11463 else
11464   RGB_PATH=auto
11465 fi;
11466
11467 if test "x$RGB_PATH" = xauto
11468 then
11469         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
11470         for cf_path in \
11471                 /opt/local/share/X11/rgb.txt \
11472                 /opt/X11/share/X11/rgb.txt \
11473                 /usr/share/X11/rgb.txt \
11474                 /usr/X11/share/X11/rgb.txt \
11475                 /usr/X11/lib/X11/rgb.txt \
11476                 /usr/lib/X11/rgb.txt \
11477                 /etc/X11/rgb.txt \
11478                 /usr/pkg/lib/X11/rgb.txt \
11479                 /usr/X11R7/lib/X11/rgb.txt \
11480                 /usr/X11R6/lib/X11/rgb.txt \
11481                 /usr/X11R5/lib/X11/rgb.txt \
11482                 /usr/X11R4/lib/X11/rgb.txt \
11483                 /usr/local/lib/X11/rgb.txt \
11484                 /usr/local/share/X11/rgb.txt \
11485                 /usr/lib64/X11/rgb.txt
11486         do
11487                 if test -f "$cf_path" ; then
11488                         RGB_PATH="$cf_path"
11489                         break
11490                 fi
11491         done
11492 else
11493         cf_path=$RGB_PATH
11494
11495 if test "x$prefix" != xNONE; then
11496         cf_path_syntax="$prefix"
11497 else
11498         cf_path_syntax="$ac_default_prefix"
11499 fi
11500
11501 case ".$cf_path" in
11502 (.\$\(*\)*|.\'*\'*)
11503         ;;
11504 (..|./*|.\\*)
11505         ;;
11506 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
11507         ;;
11508 (.\${*prefix}*|.\${*dir}*)
11509         eval cf_path="$cf_path"
11510         case ".$cf_path" in
11511         (.NONE/*)
11512                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11513                 ;;
11514         esac
11515         ;;
11516 (.no|.NONE/*)
11517         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11518         ;;
11519 (*)
11520         { { echo "$as_me:11520: error: expected a pathname, not \"$cf_path\"" >&5
11521 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
11522    { (exit 1); exit 1; }; }
11523         ;;
11524 esac
11525
11526 fi
11527
11528 echo "$as_me:11528: result: $RGB_PATH" >&5
11529 echo "${ECHO_T}$RGB_PATH" >&6
11530
11531 cat >>confdefs.h <<EOF
11532 #define RGB_PATH "$cf_path"
11533 EOF
11534
11535 no_x11_rgb=
11536 if test "$RGB_PATH" = no
11537 then
11538         no_x11_rgb="#"
11539 fi
11540
11541 ###   use option --with-bool to override bool's type
11542 echo "$as_me:11542: checking for type of bool" >&5
11543 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11544
11545 # Check whether --with-bool or --without-bool was given.
11546 if test "${with_bool+set}" = set; then
11547   withval="$with_bool"
11548   NCURSES_BOOL="$withval"
11549 else
11550   NCURSES_BOOL=auto
11551 fi;
11552 echo "$as_me:11552: result: $NCURSES_BOOL" >&5
11553 echo "${ECHO_T}$NCURSES_BOOL" >&6
11554
11555 echo "$as_me:11555: checking for alternate terminal capabilities file" >&5
11556 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11557
11558 # Check whether --with-caps or --without-caps was given.
11559 if test "${with_caps+set}" = set; then
11560   withval="$with_caps"
11561   TERMINFO_CAPS=Caps.$withval
11562 else
11563   TERMINFO_CAPS=Caps
11564 fi;
11565 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11566 echo "$as_me:11566: result: $TERMINFO_CAPS" >&5
11567 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11568
11569 ###   use option --with-chtype to override chtype's type
11570 echo "$as_me:11570: checking for type of chtype" >&5
11571 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11572
11573 # Check whether --with-chtype or --without-chtype was given.
11574 if test "${with_chtype+set}" = set; then
11575   withval="$with_chtype"
11576   NCURSES_CHTYPE="$withval"
11577 else
11578   NCURSES_CHTYPE=$cf_dft_chtype
11579 fi;
11580 echo "$as_me:11580: result: $NCURSES_CHTYPE" >&5
11581 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11582
11583 ###   use option --with-ospeed to override ospeed's type
11584 echo "$as_me:11584: checking for type of ospeed" >&5
11585 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11586
11587 # Check whether --with-ospeed or --without-ospeed was given.
11588 if test "${with_ospeed+set}" = set; then
11589   withval="$with_ospeed"
11590   NCURSES_OSPEED="$withval"
11591 else
11592   NCURSES_OSPEED=short
11593 fi;
11594 echo "$as_me:11594: result: $NCURSES_OSPEED" >&5
11595 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11596
11597 ###   use option --with-mmask-t to override mmask_t's type
11598 echo "$as_me:11598: checking for type of mmask_t" >&5
11599 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11600
11601 # Check whether --with-mmask-t or --without-mmask-t was given.
11602 if test "${with_mmask_t+set}" = set; then
11603   withval="$with_mmask_t"
11604   NCURSES_MMASK_T="$withval"
11605 else
11606   NCURSES_MMASK_T=$cf_dft_mmask_t
11607 fi;
11608 echo "$as_me:11608: result: $NCURSES_MMASK_T" >&5
11609 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11610
11611 ###   use option --with-ccharw-max to override CCHARW_MAX size
11612 echo "$as_me:11612: checking for size CCHARW_MAX" >&5
11613 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11614
11615 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11616 if test "${with_ccharw_max+set}" = set; then
11617   withval="$with_ccharw_max"
11618   NCURSES_CCHARW_MAX="$withval"
11619 else
11620   NCURSES_CCHARW_MAX=5
11621 fi;
11622 echo "$as_me:11622: result: $NCURSES_CCHARW_MAX" >&5
11623 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11624
11625 ###   use option --with-tparm-arg to override tparm's argument type
11626 echo "$as_me:11626: checking for type of tparm args" >&5
11627 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11628
11629 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11630 if test "${with_tparm_arg+set}" = set; then
11631   withval="$with_tparm_arg"
11632   NCURSES_TPARM_ARG="$withval"
11633 else
11634   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11635 fi;
11636 echo "$as_me:11636: result: $NCURSES_TPARM_ARG" >&5
11637 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11638
11639 ### Enable compiling-in rcs id's
11640 echo "$as_me:11640: checking if RCS identifiers should be compiled-in" >&5
11641 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11642
11643 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11644 if test "${with_rcs_ids+set}" = set; then
11645   withval="$with_rcs_ids"
11646   with_rcs_ids=$withval
11647 else
11648   with_rcs_ids=no
11649 fi;
11650 echo "$as_me:11650: result: $with_rcs_ids" >&5
11651 echo "${ECHO_T}$with_rcs_ids" >&6
11652 test "x$with_rcs_ids" = xyes &&
11653 cat >>confdefs.h <<\EOF
11654 #define USE_RCS_IDS 1
11655 EOF
11656
11657 ###############################################################################
11658
11659 echo "$as_me:11659: checking format of man-pages" >&5
11660 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11661
11662 # Check whether --with-manpage-format or --without-manpage-format was given.
11663 if test "${with_manpage_format+set}" = set; then
11664   withval="$with_manpage_format"
11665   MANPAGE_FORMAT=$withval
11666 else
11667   MANPAGE_FORMAT=unknown
11668 fi;
11669
11670 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11671 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11672
11673 cf_unknown=
11674
11675 case $MANPAGE_FORMAT in
11676 (unknown)
11677         if test -z "$MANPATH" ; then
11678                 MANPATH="/usr/man:/usr/share/man"
11679         fi
11680
11681         # look for the 'date' man-page (it's most likely to be installed!)
11682         MANPAGE_FORMAT=
11683         cf_preform=no
11684         cf_catonly=yes
11685         cf_example=date
11686
11687         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11688         for cf_dir in $MANPATH; do
11689                 test -z "$cf_dir" && cf_dir=/usr/man
11690                 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
11691                 do
11692                         cf_test=`echo $cf_name | sed -e 's/*//'`
11693                         if test "x$cf_test" = "x$cf_name" ; then
11694
11695                                 case "$cf_name" in
11696                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11697                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11698                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11699                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11700                                 esac
11701
11702                                 case "$cf_name" in
11703                                 ($cf_dir/man*)
11704                                         cf_catonly=no
11705                                         ;;
11706                                 ($cf_dir/cat*)
11707                                         cf_preform=yes
11708                                         ;;
11709                                 esac
11710                                 break
11711                         fi
11712
11713                         # if we found a match in either man* or cat*, stop looking
11714                         if test -n "$MANPAGE_FORMAT" ; then
11715                                 cf_found=no
11716                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11717                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11718                                 case "$cf_name" in
11719                                 ($cf_dir/cat*)
11720                                         cf_found=yes
11721                                         ;;
11722                                 esac
11723                                 test $cf_found=yes && break
11724                         fi
11725                 done
11726                 # only check the first directory in $MANPATH where we find manpages
11727                 if test -n "$MANPAGE_FORMAT" ; then
11728                         break
11729                 fi
11730         done
11731         # if we did not find the example, just assume it is normal
11732         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11733         IFS="$ac_save_ifs"
11734         ;;
11735 (*)
11736         for cf_option in $MANPAGE_FORMAT; do
11737         case $cf_option in
11738         (gzip|compress|BSDI|normal|formatted|catonly)
11739                 ;;
11740         (*)
11741                 cf_unknown="$cf_unknown $cf_option"
11742                 ;;
11743         esac
11744         done
11745         ;;
11746 esac
11747
11748 echo "$as_me:11748: result: $MANPAGE_FORMAT" >&5
11749 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11750 if test -n "$cf_unknown" ; then
11751         { echo "$as_me:11751: WARNING: Unexpected manpage-format $cf_unknown" >&5
11752 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11753 fi
11754
11755 echo "$as_me:11755: checking for manpage renaming" >&5
11756 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11757
11758 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11759 if test "${with_manpage_renames+set}" = set; then
11760   withval="$with_manpage_renames"
11761   MANPAGE_RENAMES=$withval
11762 else
11763   MANPAGE_RENAMES=yes
11764 fi;
11765
11766 case ".$MANPAGE_RENAMES" in
11767 (.no)
11768         ;;
11769 (.|.yes)
11770         # Debian 'man' program?
11771         if test -f /etc/debian_version ; then
11772                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11773         else
11774                 MANPAGE_RENAMES=no
11775         fi
11776         ;;
11777 esac
11778
11779 if test "$MANPAGE_RENAMES" != no ; then
11780         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11781                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11782         elif test ! -f $MANPAGE_RENAMES ; then
11783                 { { echo "$as_me:11783: error: not a filename: $MANPAGE_RENAMES" >&5
11784 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11785    { (exit 1); exit 1; }; }
11786         fi
11787
11788         test ! -d man && mkdir man
11789
11790         # Construct a sed-script to perform renaming within man-pages
11791         if test -n "$MANPAGE_RENAMES" ; then
11792                 test ! -d man && mkdir man
11793                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11794         fi
11795 fi
11796
11797 echo "$as_me:11797: result: $MANPAGE_RENAMES" >&5
11798 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11799
11800 echo "$as_me:11800: checking if manpage aliases will be installed" >&5
11801 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11802
11803 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11804 if test "${with_manpage_aliases+set}" = set; then
11805   withval="$with_manpage_aliases"
11806   MANPAGE_ALIASES=$withval
11807 else
11808   MANPAGE_ALIASES=yes
11809 fi;
11810
11811 echo "$as_me:11811: result: $MANPAGE_ALIASES" >&5
11812 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11813
11814 case "x$LN_S" in
11815 (xln*)
11816         cf_use_symlinks=yes
11817         ;;
11818 (*)
11819         cf_use_symlinks=no
11820         ;;
11821 esac
11822
11823 MANPAGE_SYMLINKS=no
11824 if test "$MANPAGE_ALIASES" = yes ; then
11825 echo "$as_me:11825: checking if manpage symlinks should be used" >&5
11826 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11827
11828 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11829 if test "${with_manpage_symlinks+set}" = set; then
11830   withval="$with_manpage_symlinks"
11831   MANPAGE_SYMLINKS=$withval
11832 else
11833   MANPAGE_SYMLINKS=$cf_use_symlinks
11834 fi;
11835
11836 if test "$$cf_use_symlinks" = no; then
11837 if test "$MANPAGE_SYMLINKS" = yes ; then
11838         { echo "$as_me:11838: WARNING: cannot make symlinks" >&5
11839 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11840         MANPAGE_SYMLINKS=no
11841 fi
11842 fi
11843
11844 echo "$as_me:11844: result: $MANPAGE_SYMLINKS" >&5
11845 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11846 fi
11847
11848 echo "$as_me:11848: checking for manpage tbl" >&5
11849 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11850
11851 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11852 if test "${with_manpage_tbl+set}" = set; then
11853   withval="$with_manpage_tbl"
11854   MANPAGE_TBL=$withval
11855 else
11856   MANPAGE_TBL=no
11857 fi;
11858
11859 echo "$as_me:11859: result: $MANPAGE_TBL" >&5
11860 echo "${ECHO_T}$MANPAGE_TBL" >&6
11861
11862 if test "$prefix" = "NONE" ; then
11863         cf_prefix="$ac_default_prefix"
11864 else
11865         cf_prefix="$prefix"
11866 fi
11867
11868 case "$MANPAGE_FORMAT" in
11869 (*catonly*)
11870         cf_format=yes
11871         cf_inboth=no
11872         ;;
11873 (*formatted*)
11874         cf_format=yes
11875         cf_inboth=yes
11876         ;;
11877 (*)
11878         cf_format=no
11879         cf_inboth=no
11880         ;;
11881 esac
11882
11883 test ! -d man && mkdir man
11884
11885 cf_so_strip=
11886 cf_compress=
11887 case "$MANPAGE_FORMAT" in
11888 (*compress*)
11889         cf_so_strip="Z"
11890         cf_compress=compress
11891         ;;
11892 (*gzip*)
11893         cf_so_strip="gz"
11894         cf_compress=gzip
11895         ;;
11896 esac
11897
11898 cf_edit_man=./edit_man.sh
11899 cf_man_alias=`pwd`/man_alias.sed
11900
11901 cat >$cf_edit_man <<CF_EOF
11902 #! $SHELL
11903 # this script is generated by the configure-script CF_MAN_PAGES macro.
11904
11905 prefix="$cf_prefix"
11906 datarootdir="$datarootdir"
11907 datadir="$datadir"
11908
11909 NCURSES_MAJOR="$NCURSES_MAJOR"
11910 NCURSES_MINOR="$NCURSES_MINOR"
11911 NCURSES_PATCH="$NCURSES_PATCH"
11912
11913 NCURSES_OSPEED="$NCURSES_OSPEED"
11914 TERMINFO="$TERMINFO"
11915
11916 INSTALL="$INSTALL"
11917 INSTALL_DATA="$INSTALL_DATA"
11918
11919 transform="$program_transform_name"
11920
11921 TMP=\${TMPDIR:=/tmp}/man\$\$
11922 trap "rm -f \$TMP" 0 1 2 3 15
11923
11924 form=\$1
11925 shift || exit 1
11926
11927 verb=\$1
11928 shift || exit 1
11929
11930 mandir=\$1
11931 shift || exit 1
11932
11933 srcdir=\$1
11934 top_srcdir=\$srcdir/..
11935 shift || exit 1
11936
11937 if test "\$form" = normal ; then
11938         if test "$cf_format" = yes ; then
11939         if test "$cf_inboth" = no ; then
11940                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11941                 exit $?
11942         fi
11943         fi
11944         cf_subdir=\$mandir/man
11945         cf_tables=$MANPAGE_TBL
11946 else
11947         cf_subdir=\$mandir/cat
11948         cf_tables=yes
11949 fi
11950
11951 # process the list of source-files
11952 for i in \$* ; do
11953 case \$i in
11954 (*.orig|*.rej) ;;
11955 (*.[0-9]*)
11956         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11957         if test \$verb = installing ; then
11958         if test ! -d \$cf_subdir\${section} ; then
11959                 mkdir -p \$cf_subdir\$section
11960         fi
11961         fi
11962
11963         # replace variables in man page
11964         if test ! -f $cf_man_alias ; then
11965 cat >>$cf_man_alias <<-CF_EOF2
11966                 s,@DATADIR@,\$datadir,g
11967                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11968                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11969                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11970                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11971                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11972                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11973 CF_EOF
11974
11975         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11976         do
11977                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11978                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11979 cat >>$cf_edit_man <<-CF_EOF
11980                 s,@$cf_NAME@,$cf_name,g
11981 CF_EOF
11982         done
11983
11984 cat >>$cf_edit_man <<CF_EOF
11985 CF_EOF2
11986                 echo "...made $cf_man_alias"
11987         fi
11988
11989         aliases=
11990         cf_source=\`basename \$i\`
11991         inalias=\$cf_source
11992         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11993         if test ! -f \$inalias ; then
11994                 echo .. skipped \$cf_source
11995                 continue
11996         fi
11997 CF_EOF
11998
11999 if test "$MANPAGE_ALIASES" != no ; then
12000 cat >>$cf_edit_man <<CF_EOF
12001         nCurses=ignore.3x
12002         test $with_curses_h = yes && nCurses=ncurses.3x
12003         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
12004 CF_EOF
12005 fi
12006
12007 if test "$MANPAGE_RENAMES" = no ; then
12008 cat >>$cf_edit_man <<CF_EOF
12009         # perform program transformations for section 1 man pages
12010         if test \$section = 1 ; then
12011                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
12012         else
12013                 cf_target=\$cf_subdir\${section}/\$cf_source
12014         fi
12015 CF_EOF
12016 else
12017 cat >>$cf_edit_man <<CF_EOF
12018         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
12019         if test -z "\$cf_target" ; then
12020                 echo '? missing rename for '\$cf_source
12021                 cf_target="\$cf_source"
12022         fi
12023         cf_target="\$cf_subdir\${section}/\${cf_target}"
12024
12025 CF_EOF
12026 fi
12027
12028 cat >>$cf_edit_man <<CF_EOF
12029         sed     -f $cf_man_alias \\
12030 CF_EOF
12031
12032 if test -f $MANPAGE_RENAMES ; then
12033 cat >>$cf_edit_man <<CF_EOF
12034                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
12035 CF_EOF
12036 else
12037 cat >>$cf_edit_man <<CF_EOF
12038                 < \$i >\$TMP
12039 CF_EOF
12040 fi
12041
12042 cat >>$cf_edit_man <<CF_EOF
12043 if test \$cf_tables = yes ; then
12044         tbl \$TMP >\$TMP.out
12045         mv \$TMP.out \$TMP
12046 fi
12047 CF_EOF
12048
12049 if test $with_overwrite != yes ; then
12050 cat >>$cf_edit_man <<CF_EOF
12051         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
12052         mv \$TMP.out \$TMP
12053 CF_EOF
12054 fi
12055
12056 if test $with_curses_h != yes ; then
12057 cat >>$cf_edit_man <<CF_EOF
12058         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
12059         mv \$TMP.out \$TMP
12060 CF_EOF
12061 fi
12062
12063 cat >>$cf_edit_man <<CF_EOF
12064         if test \$form = format ; then
12065                 nroff -man \$TMP >\$TMP.out
12066                 mv \$TMP.out \$TMP
12067         fi
12068 CF_EOF
12069
12070 if test -n "$cf_compress" ; then
12071 cat >>$cf_edit_man <<CF_EOF
12072         if test \$verb = installing ; then
12073         if ( $cf_compress -f \$TMP )
12074         then
12075                 mv \$TMP.$cf_so_strip \$TMP
12076         fi
12077         fi
12078         cf_target="\$cf_target.$cf_so_strip"
12079 CF_EOF
12080 fi
12081
12082 case "$MANPAGE_FORMAT" in
12083 (*BSDI*)
12084 cat >>$cf_edit_man <<CF_EOF
12085         if test \$form = format ; then
12086                 # BSDI installs only .0 suffixes in the cat directories
12087                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
12088         fi
12089 CF_EOF
12090   ;;
12091 esac
12092
12093 cat >>$cf_edit_man <<CF_EOF
12094         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
12095         if test \$verb = installing ; then
12096                 echo \$verb \$cf_target
12097                 \$INSTALL_DATA \$TMP \$cf_target
12098                 test -d \$cf_subdir\${section} &&
12099                 test -n "\$aliases" && (
12100                         cd \$cf_subdir\${section} && (
12101                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
12102                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
12103                                 cf_target=\`basename \$cf_target\`
12104                                 for cf_alias in \$aliases
12105                                 do
12106                                         if test \$section = 1 ; then
12107                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12108                                         fi
12109
12110                                         if test "$MANPAGE_SYMLINKS" = yes ; then
12111                                                 if test -f \$cf_alias\${suffix} ; then
12112                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
12113                                                         then
12114                                                                 continue
12115                                                         fi
12116                                                 fi
12117                                                 echo .. \$verb alias \$cf_alias\${suffix}
12118 CF_EOF
12119 case "x$LN_S" in
12120 (*-f)
12121 cat >>$cf_edit_man <<CF_EOF
12122                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12123 CF_EOF
12124         ;;
12125 (*)
12126 cat >>$cf_edit_man <<CF_EOF
12127                                                 rm -f \$cf_alias\${suffix}
12128                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12129 CF_EOF
12130         ;;
12131 esac
12132 cat >>$cf_edit_man <<CF_EOF
12133                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
12134                                                 echo ".so \$cf_source" >\$TMP
12135 CF_EOF
12136 if test -n "$cf_compress" ; then
12137 cat >>$cf_edit_man <<CF_EOF
12138                                                 if test -n "$cf_so_strip" ; then
12139                                                         $cf_compress -f \$TMP
12140                                                         mv \$TMP.$cf_so_strip \$TMP
12141                                                 fi
12142 CF_EOF
12143 fi
12144 cat >>$cf_edit_man <<CF_EOF
12145                                                 echo .. \$verb alias \$cf_alias\${suffix}
12146                                                 rm -f \$cf_alias\${suffix}
12147                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
12148                                         fi
12149                                 done
12150                         )
12151                 )
12152         elif test \$verb = removing ; then
12153                 test -f \$cf_target && (
12154                         echo \$verb \$cf_target
12155                         rm -f \$cf_target
12156                 )
12157                 test -d \$cf_subdir\${section} &&
12158                 test -n "\$aliases" && (
12159                         cd \$cf_subdir\${section} && (
12160                                 for cf_alias in \$aliases
12161                                 do
12162                                         if test \$section = 1 ; then
12163                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12164                                         fi
12165
12166                                         echo .. \$verb alias \$cf_alias\${suffix}
12167                                         rm -f \$cf_alias\${suffix}
12168                                 done
12169                         )
12170                 )
12171         else
12172 #               echo ".hy 0"
12173                 cat \$TMP
12174         fi
12175         ;;
12176 esac
12177 done
12178
12179 if test $cf_inboth = yes ; then
12180 if test \$form != format ; then
12181         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12182 fi
12183 fi
12184
12185 exit 0
12186 CF_EOF
12187 chmod 755 $cf_edit_man
12188
12189 ###############################################################################
12190
12191 ### Note that some functions (such as const) are normally disabled anyway.
12192 echo "$as_me:12192: checking if you want to build with function extensions" >&5
12193 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12194
12195 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12196 if test "${enable_ext_funcs+set}" = set; then
12197   enableval="$enable_ext_funcs"
12198   with_ext_funcs=$enableval
12199 else
12200   with_ext_funcs=yes
12201 fi;
12202 echo "$as_me:12202: result: $with_ext_funcs" >&5
12203 echo "${ECHO_T}$with_ext_funcs" >&6
12204 if test "x$with_ext_funcs" = xyes ; then
12205         NCURSES_EXT_FUNCS=1
12206
12207 cat >>confdefs.h <<\EOF
12208 #define NCURSES_EXT_FUNCS 1
12209 EOF
12210
12211 cat >>confdefs.h <<\EOF
12212 #define HAVE_ASSUME_DEFAULT_COLORS 1
12213 EOF
12214
12215 cat >>confdefs.h <<\EOF
12216 #define HAVE_CURSES_VERSION 1
12217 EOF
12218
12219 cat >>confdefs.h <<\EOF
12220 #define HAVE_HAS_KEY 1
12221 EOF
12222
12223 cat >>confdefs.h <<\EOF
12224 #define HAVE_RESIZETERM 1
12225 EOF
12226
12227 cat >>confdefs.h <<\EOF
12228 #define HAVE_RESIZE_TERM 1
12229 EOF
12230
12231 cat >>confdefs.h <<\EOF
12232 #define HAVE_TERM_ENTRY_H 1
12233 EOF
12234
12235 cat >>confdefs.h <<\EOF
12236 #define HAVE_USE_DEFAULT_COLORS 1
12237 EOF
12238
12239 cat >>confdefs.h <<\EOF
12240 #define HAVE_USE_EXTENDED_NAMES 1
12241 EOF
12242
12243 cat >>confdefs.h <<\EOF
12244 #define HAVE_USE_SCREEN 1
12245 EOF
12246
12247 cat >>confdefs.h <<\EOF
12248 #define HAVE_USE_WINDOW 1
12249 EOF
12250
12251 cat >>confdefs.h <<\EOF
12252 #define HAVE_WRESIZE 1
12253 EOF
12254
12255         GENERATED_EXT_FUNCS=generated
12256         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
12257 else
12258         NCURSES_EXT_FUNCS=0
12259         GENERATED_EXT_FUNCS=
12260 fi
12261
12262 echo "$as_me:12262: checking if you want to build with SCREEN extensions" >&5
12263 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
12264
12265 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
12266 if test "${enable_sp_funcs+set}" = set; then
12267   enableval="$enable_sp_funcs"
12268   with_sp_funcs=$enableval
12269 else
12270   with_sp_funcs=$cf_dft_ext_spfuncs
12271 fi;
12272 echo "$as_me:12272: result: $with_sp_funcs" >&5
12273 echo "${ECHO_T}$with_sp_funcs" >&6
12274 if test "x$with_sp_funcs" = xyes ; then
12275         NCURSES_SP_FUNCS=1
12276
12277 cat >>confdefs.h <<\EOF
12278 #define NCURSES_SP_FUNCS 1
12279 EOF
12280
12281 cat >>confdefs.h <<\EOF
12282 #define HAVE_TPUTS_SP 1
12283 EOF
12284
12285         GENERATED_SP_FUNCS=generated
12286 else
12287         NCURSES_SP_FUNCS=0
12288         GENERATED_SP_FUNCS=
12289 fi
12290
12291 echo "$as_me:12291: checking if you want to build with terminal-driver" >&5
12292 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12293
12294 # Check whether --enable-term-driver or --disable-term-driver was given.
12295 if test "${enable_term_driver+set}" = set; then
12296   enableval="$enable_term_driver"
12297   with_term_driver=$enableval
12298 else
12299   with_term_driver=no
12300 fi;
12301 echo "$as_me:12301: result: $with_term_driver" >&5
12302 echo "${ECHO_T}$with_term_driver" >&6
12303 if test "x$with_term_driver" = xyes ; then
12304
12305 cat >>confdefs.h <<\EOF
12306 #define USE_TERM_DRIVER 1
12307 EOF
12308
12309         if test "x$with_termlib" != xno ; then
12310                 { { echo "$as_me:12310: error: The term-driver option conflicts with the termlib option" >&5
12311 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12312    { (exit 1); exit 1; }; }
12313         fi
12314         if test "x$with_sp_funcs" != xyes ; then
12315                 { { echo "$as_me:12315: error: The term-driver option relies upon sp-funcs" >&5
12316 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12317    { (exit 1); exit 1; }; }
12318         fi
12319 fi
12320
12321 ###   use option --enable-const to turn on use of const beyond that in XSI.
12322 echo "$as_me:12322: checking for extended use of const keyword" >&5
12323 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12324
12325 # Check whether --enable-const or --disable-const was given.
12326 if test "${enable_const+set}" = set; then
12327   enableval="$enable_const"
12328   with_ext_const=$enableval
12329 else
12330   with_ext_const=$cf_dft_ext_const
12331 fi;
12332 echo "$as_me:12332: result: $with_ext_const" >&5
12333 echo "${ECHO_T}$with_ext_const" >&6
12334 NCURSES_CONST='/*nothing*/'
12335 if test "x$with_ext_const" = xyes ; then
12336         NCURSES_CONST=const
12337 fi
12338
12339 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12340 echo "$as_me:12340: checking if you want to use extended colors" >&5
12341 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12342
12343 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12344 if test "${enable_ext_colors+set}" = set; then
12345   enableval="$enable_ext_colors"
12346   with_ext_colors=$enableval
12347 else
12348   with_ext_colors=$cf_dft_ext_colors
12349 fi;
12350 echo "$as_me:12350: result: $with_ext_colors" >&5
12351 echo "${ECHO_T}$with_ext_colors" >&6
12352 NCURSES_EXT_COLORS=0
12353 if test "x$with_ext_colors" = xyes ; then
12354         if test "x$with_widec" != xyes ; then
12355                 { echo "$as_me:12355: WARNING: This option applies only to wide-character library" >&5
12356 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
12357         else
12358                 # cannot be ABI 5 since it changes sizeof(cchar_t)
12359
12360 if test "${with_abi_version+set}" != set; then
12361         case $cf_cv_rel_version in
12362         (5.*)
12363                 cf_cv_rel_version=6.0
12364                 cf_cv_abi_version=6
12365                 { echo "$as_me:12365: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12366 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12367                 ;;
12368         esac
12369 fi
12370
12371                 NCURSES_EXT_COLORS=1
12372
12373 cat >>confdefs.h <<\EOF
12374 #define NCURSES_EXT_COLORS 1
12375 EOF
12376
12377 cat >>confdefs.h <<\EOF
12378 #define HAVE_ALLOC_PAIR 1
12379 EOF
12380
12381 cat >>confdefs.h <<\EOF
12382 #define HAVE_INIT_EXTENDED_COLOR 1
12383 EOF
12384
12385 cat >>confdefs.h <<\EOF
12386 #define HAVE_RESET_COLOR_PAIRS 1
12387 EOF
12388
12389         fi
12390 fi
12391
12392 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
12393 echo "$as_me:12393: checking if you want to use extended mouse encoding" >&5
12394 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12395
12396 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12397 if test "${enable_ext_mouse+set}" = set; then
12398   enableval="$enable_ext_mouse"
12399   with_ext_mouse=$enableval
12400 else
12401   with_ext_mouse=$cf_dft_ext_mouse
12402 fi;
12403 echo "$as_me:12403: result: $with_ext_mouse" >&5
12404 echo "${ECHO_T}$with_ext_mouse" >&6
12405 NCURSES_MOUSE_VERSION=1
12406 if test "x$with_ext_mouse" = xyes ; then
12407         NCURSES_MOUSE_VERSION=2
12408
12409 if test "${with_abi_version+set}" != set; then
12410         case $cf_cv_rel_version in
12411         (5.*)
12412                 cf_cv_rel_version=6.0
12413                 cf_cv_abi_version=6
12414                 { echo "$as_me:12414: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12415 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12416                 ;;
12417         esac
12418 fi
12419
12420 fi
12421
12422 ###   use option --enable-ext-putwin to turn on extended screendumps
12423 echo "$as_me:12423: checking if you want to use extended putwin/screendump" >&5
12424 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12425
12426 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12427 if test "${enable_ext_putwin+set}" = set; then
12428   enableval="$enable_ext_putwin"
12429   with_ext_putwin=$enableval
12430 else
12431   with_ext_putwin=$cf_dft_ext_putwin
12432 fi;
12433 echo "$as_me:12433: result: $with_ext_putwin" >&5
12434 echo "${ECHO_T}$with_ext_putwin" >&6
12435 if test "x$with_ext_putwin" = xyes ; then
12436
12437 cat >>confdefs.h <<\EOF
12438 #define NCURSES_EXT_PUTWIN 1
12439 EOF
12440
12441 fi
12442
12443 echo "$as_me:12443: checking if you want \$NCURSES_NO_PADDING code" >&5
12444 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12445
12446 # Check whether --enable-no-padding or --disable-no-padding was given.
12447 if test "${enable_no_padding+set}" = set; then
12448   enableval="$enable_no_padding"
12449   with_no_padding=$enableval
12450 else
12451   with_no_padding=$with_ext_funcs
12452 fi;
12453 echo "$as_me:12453: result: $with_no_padding" >&5
12454 echo "${ECHO_T}$with_no_padding" >&6
12455 test "x$with_no_padding" = xyes &&
12456 cat >>confdefs.h <<\EOF
12457 #define NCURSES_NO_PADDING 1
12458 EOF
12459
12460 echo "$as_me:12460: checking for ANSI C header files" >&5
12461 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12462 if test "${ac_cv_header_stdc+set}" = set; then
12463   echo $ECHO_N "(cached) $ECHO_C" >&6
12464 else
12465   cat >conftest.$ac_ext <<_ACEOF
12466 #line 12466 "configure"
12467 #include "confdefs.h"
12468 #include <stdlib.h>
12469 #include <stdarg.h>
12470 #include <string.h>
12471 #include <float.h>
12472
12473 _ACEOF
12474 if { (eval echo "$as_me:12474: \"$ac_cpp conftest.$ac_ext\"") >&5
12475   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12476   ac_status=$?
12477   egrep -v '^ *\+' conftest.er1 >conftest.err
12478   rm -f conftest.er1
12479   cat conftest.err >&5
12480   echo "$as_me:12480: \$? = $ac_status" >&5
12481   (exit $ac_status); } >/dev/null; then
12482   if test -s conftest.err; then
12483     ac_cpp_err=$ac_c_preproc_warn_flag
12484   else
12485     ac_cpp_err=
12486   fi
12487 else
12488   ac_cpp_err=yes
12489 fi
12490 if test -z "$ac_cpp_err"; then
12491   ac_cv_header_stdc=yes
12492 else
12493   echo "$as_me: failed program was:" >&5
12494   cat conftest.$ac_ext >&5
12495   ac_cv_header_stdc=no
12496 fi
12497 rm -f conftest.err conftest.$ac_ext
12498
12499 if test $ac_cv_header_stdc = yes; then
12500   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12501   cat >conftest.$ac_ext <<_ACEOF
12502 #line 12502 "configure"
12503 #include "confdefs.h"
12504 #include <string.h>
12505
12506 _ACEOF
12507 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12508   egrep "memchr" >/dev/null 2>&1; then
12509   :
12510 else
12511   ac_cv_header_stdc=no
12512 fi
12513 rm -rf conftest*
12514
12515 fi
12516
12517 if test $ac_cv_header_stdc = yes; then
12518   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12519   cat >conftest.$ac_ext <<_ACEOF
12520 #line 12520 "configure"
12521 #include "confdefs.h"
12522 #include <stdlib.h>
12523
12524 _ACEOF
12525 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12526   egrep "free" >/dev/null 2>&1; then
12527   :
12528 else
12529   ac_cv_header_stdc=no
12530 fi
12531 rm -rf conftest*
12532
12533 fi
12534
12535 if test $ac_cv_header_stdc = yes; then
12536   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12537   if test "$cross_compiling" = yes; then
12538   :
12539 else
12540   cat >conftest.$ac_ext <<_ACEOF
12541 #line 12541 "configure"
12542 #include "confdefs.h"
12543 #include <ctype.h>
12544 #if ((' ' & 0x0FF) == 0x020)
12545 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12546 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12547 #else
12548 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12549                      || ('j' <= (c) && (c) <= 'r') \
12550                      || ('s' <= (c) && (c) <= 'z'))
12551 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12552 #endif
12553
12554 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12555 int
12556 main (void)
12557 {
12558   int i;
12559   for (i = 0; i < 256; i++)
12560     if (XOR (islower (i), ISLOWER (i))
12561         || toupper (i) != TOUPPER (i))
12562       $ac_main_return(2);
12563   $ac_main_return (0);
12564 }
12565 _ACEOF
12566 rm -f conftest$ac_exeext
12567 if { (eval echo "$as_me:12567: \"$ac_link\"") >&5
12568   (eval $ac_link) 2>&5
12569   ac_status=$?
12570   echo "$as_me:12570: \$? = $ac_status" >&5
12571   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12572   { (eval echo "$as_me:12572: \"$ac_try\"") >&5
12573   (eval $ac_try) 2>&5
12574   ac_status=$?
12575   echo "$as_me:12575: \$? = $ac_status" >&5
12576   (exit $ac_status); }; }; then
12577   :
12578 else
12579   echo "$as_me: program exited with status $ac_status" >&5
12580 echo "$as_me: failed program was:" >&5
12581 cat conftest.$ac_ext >&5
12582 ac_cv_header_stdc=no
12583 fi
12584 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12585 fi
12586 fi
12587 fi
12588 echo "$as_me:12588: result: $ac_cv_header_stdc" >&5
12589 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12590 if test $ac_cv_header_stdc = yes; then
12591
12592 cat >>confdefs.h <<\EOF
12593 #define STDC_HEADERS 1
12594 EOF
12595
12596 fi
12597
12598 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12599
12600 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12601                   inttypes.h stdint.h unistd.h
12602 do
12603 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12604 echo "$as_me:12604: checking for $ac_header" >&5
12605 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12606 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12607   echo $ECHO_N "(cached) $ECHO_C" >&6
12608 else
12609   cat >conftest.$ac_ext <<_ACEOF
12610 #line 12610 "configure"
12611 #include "confdefs.h"
12612 $ac_includes_default
12613 #include <$ac_header>
12614 _ACEOF
12615 rm -f conftest.$ac_objext
12616 if { (eval echo "$as_me:12616: \"$ac_compile\"") >&5
12617   (eval $ac_compile) 2>&5
12618   ac_status=$?
12619   echo "$as_me:12619: \$? = $ac_status" >&5
12620   (exit $ac_status); } &&
12621          { ac_try='test -s conftest.$ac_objext'
12622   { (eval echo "$as_me:12622: \"$ac_try\"") >&5
12623   (eval $ac_try) 2>&5
12624   ac_status=$?
12625   echo "$as_me:12625: \$? = $ac_status" >&5
12626   (exit $ac_status); }; }; then
12627   eval "$as_ac_Header=yes"
12628 else
12629   echo "$as_me: failed program was:" >&5
12630 cat conftest.$ac_ext >&5
12631 eval "$as_ac_Header=no"
12632 fi
12633 rm -f conftest.$ac_objext conftest.$ac_ext
12634 fi
12635 echo "$as_me:12635: result: `eval echo '${'$as_ac_Header'}'`" >&5
12636 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12637 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12638   cat >>confdefs.h <<EOF
12639 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12640 EOF
12641
12642 fi
12643 done
12644
12645 echo "$as_me:12645: checking for signed char" >&5
12646 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12647 if test "${ac_cv_type_signed_char+set}" = set; then
12648   echo $ECHO_N "(cached) $ECHO_C" >&6
12649 else
12650   cat >conftest.$ac_ext <<_ACEOF
12651 #line 12651 "configure"
12652 #include "confdefs.h"
12653 $ac_includes_default
12654 int
12655 main (void)
12656 {
12657 if ((signed char *) 0)
12658   return 0;
12659 if (sizeof (signed char))
12660   return 0;
12661   ;
12662   return 0;
12663 }
12664 _ACEOF
12665 rm -f conftest.$ac_objext
12666 if { (eval echo "$as_me:12666: \"$ac_compile\"") >&5
12667   (eval $ac_compile) 2>&5
12668   ac_status=$?
12669   echo "$as_me:12669: \$? = $ac_status" >&5
12670   (exit $ac_status); } &&
12671          { ac_try='test -s conftest.$ac_objext'
12672   { (eval echo "$as_me:12672: \"$ac_try\"") >&5
12673   (eval $ac_try) 2>&5
12674   ac_status=$?
12675   echo "$as_me:12675: \$? = $ac_status" >&5
12676   (exit $ac_status); }; }; then
12677   ac_cv_type_signed_char=yes
12678 else
12679   echo "$as_me: failed program was:" >&5
12680 cat conftest.$ac_ext >&5
12681 ac_cv_type_signed_char=no
12682 fi
12683 rm -f conftest.$ac_objext conftest.$ac_ext
12684 fi
12685 echo "$as_me:12685: result: $ac_cv_type_signed_char" >&5
12686 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12687
12688 echo "$as_me:12688: checking size of signed char" >&5
12689 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12690 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12691   echo $ECHO_N "(cached) $ECHO_C" >&6
12692 else
12693   if test "$ac_cv_type_signed_char" = yes; then
12694   if test "$cross_compiling" = yes; then
12695   # Depending upon the size, compute the lo and hi bounds.
12696 cat >conftest.$ac_ext <<_ACEOF
12697 #line 12697 "configure"
12698 #include "confdefs.h"
12699 $ac_includes_default
12700 int
12701 main (void)
12702 {
12703 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12704   ;
12705   return 0;
12706 }
12707 _ACEOF
12708 rm -f conftest.$ac_objext
12709 if { (eval echo "$as_me:12709: \"$ac_compile\"") >&5
12710   (eval $ac_compile) 2>&5
12711   ac_status=$?
12712   echo "$as_me:12712: \$? = $ac_status" >&5
12713   (exit $ac_status); } &&
12714          { ac_try='test -s conftest.$ac_objext'
12715   { (eval echo "$as_me:12715: \"$ac_try\"") >&5
12716   (eval $ac_try) 2>&5
12717   ac_status=$?
12718   echo "$as_me:12718: \$? = $ac_status" >&5
12719   (exit $ac_status); }; }; then
12720   ac_lo=0 ac_mid=0
12721   while :; do
12722     cat >conftest.$ac_ext <<_ACEOF
12723 #line 12723 "configure"
12724 #include "confdefs.h"
12725 $ac_includes_default
12726 int
12727 main (void)
12728 {
12729 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12730   ;
12731   return 0;
12732 }
12733 _ACEOF
12734 rm -f conftest.$ac_objext
12735 if { (eval echo "$as_me:12735: \"$ac_compile\"") >&5
12736   (eval $ac_compile) 2>&5
12737   ac_status=$?
12738   echo "$as_me:12738: \$? = $ac_status" >&5
12739   (exit $ac_status); } &&
12740          { ac_try='test -s conftest.$ac_objext'
12741   { (eval echo "$as_me:12741: \"$ac_try\"") >&5
12742   (eval $ac_try) 2>&5
12743   ac_status=$?
12744   echo "$as_me:12744: \$? = $ac_status" >&5
12745   (exit $ac_status); }; }; then
12746   ac_hi=$ac_mid; break
12747 else
12748   echo "$as_me: failed program was:" >&5
12749 cat conftest.$ac_ext >&5
12750 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12751 fi
12752 rm -f conftest.$ac_objext conftest.$ac_ext
12753   done
12754 else
12755   echo "$as_me: failed program was:" >&5
12756 cat conftest.$ac_ext >&5
12757 ac_hi=-1 ac_mid=-1
12758   while :; do
12759     cat >conftest.$ac_ext <<_ACEOF
12760 #line 12760 "configure"
12761 #include "confdefs.h"
12762 $ac_includes_default
12763 int
12764 main (void)
12765 {
12766 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12767   ;
12768   return 0;
12769 }
12770 _ACEOF
12771 rm -f conftest.$ac_objext
12772 if { (eval echo "$as_me:12772: \"$ac_compile\"") >&5
12773   (eval $ac_compile) 2>&5
12774   ac_status=$?
12775   echo "$as_me:12775: \$? = $ac_status" >&5
12776   (exit $ac_status); } &&
12777          { ac_try='test -s conftest.$ac_objext'
12778   { (eval echo "$as_me:12778: \"$ac_try\"") >&5
12779   (eval $ac_try) 2>&5
12780   ac_status=$?
12781   echo "$as_me:12781: \$? = $ac_status" >&5
12782   (exit $ac_status); }; }; then
12783   ac_lo=$ac_mid; break
12784 else
12785   echo "$as_me: failed program was:" >&5
12786 cat conftest.$ac_ext >&5
12787 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12788 fi
12789 rm -f conftest.$ac_objext conftest.$ac_ext
12790   done
12791 fi
12792 rm -f conftest.$ac_objext conftest.$ac_ext
12793 # Binary search between lo and hi bounds.
12794 while test "x$ac_lo" != "x$ac_hi"; do
12795   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12796   cat >conftest.$ac_ext <<_ACEOF
12797 #line 12797 "configure"
12798 #include "confdefs.h"
12799 $ac_includes_default
12800 int
12801 main (void)
12802 {
12803 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12804   ;
12805   return 0;
12806 }
12807 _ACEOF
12808 rm -f conftest.$ac_objext
12809 if { (eval echo "$as_me:12809: \"$ac_compile\"") >&5
12810   (eval $ac_compile) 2>&5
12811   ac_status=$?
12812   echo "$as_me:12812: \$? = $ac_status" >&5
12813   (exit $ac_status); } &&
12814          { ac_try='test -s conftest.$ac_objext'
12815   { (eval echo "$as_me:12815: \"$ac_try\"") >&5
12816   (eval $ac_try) 2>&5
12817   ac_status=$?
12818   echo "$as_me:12818: \$? = $ac_status" >&5
12819   (exit $ac_status); }; }; then
12820   ac_hi=$ac_mid
12821 else
12822   echo "$as_me: failed program was:" >&5
12823 cat conftest.$ac_ext >&5
12824 ac_lo=`expr $ac_mid + 1`
12825 fi
12826 rm -f conftest.$ac_objext conftest.$ac_ext
12827 done
12828 ac_cv_sizeof_signed_char=$ac_lo
12829 else
12830   if test "$cross_compiling" = yes; then
12831   { { echo "$as_me:12831: error: cannot run test program while cross compiling" >&5
12832 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12833    { (exit 1); exit 1; }; }
12834 else
12835   cat >conftest.$ac_ext <<_ACEOF
12836 #line 12836 "configure"
12837 #include "confdefs.h"
12838 $ac_includes_default
12839 int
12840 main (void)
12841 {
12842 FILE *f = fopen ("conftest.val", "w");
12843 if (!f)
12844   $ac_main_return (1);
12845 fprintf (f, "%d", (sizeof (signed char)));
12846 fclose (f);
12847   ;
12848   return 0;
12849 }
12850 _ACEOF
12851 rm -f conftest$ac_exeext
12852 if { (eval echo "$as_me:12852: \"$ac_link\"") >&5
12853   (eval $ac_link) 2>&5
12854   ac_status=$?
12855   echo "$as_me:12855: \$? = $ac_status" >&5
12856   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12857   { (eval echo "$as_me:12857: \"$ac_try\"") >&5
12858   (eval $ac_try) 2>&5
12859   ac_status=$?
12860   echo "$as_me:12860: \$? = $ac_status" >&5
12861   (exit $ac_status); }; }; then
12862   ac_cv_sizeof_signed_char=`cat conftest.val`
12863 else
12864   echo "$as_me: program exited with status $ac_status" >&5
12865 echo "$as_me: failed program was:" >&5
12866 cat conftest.$ac_ext >&5
12867 fi
12868 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12869 fi
12870 fi
12871 rm -f conftest.val
12872 else
12873   ac_cv_sizeof_signed_char=0
12874 fi
12875 fi
12876 echo "$as_me:12876: result: $ac_cv_sizeof_signed_char" >&5
12877 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12878 cat >>confdefs.h <<EOF
12879 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12880 EOF
12881
12882 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12883         NCURSES_SBOOL="signed char"
12884 else
12885         NCURSES_SBOOL="char"
12886 fi
12887 echo "$as_me:12887: checking if you want to use signed Boolean array in term.h" >&5
12888 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12889
12890 # Check whether --enable-signed-char or --disable-signed-char was given.
12891 if test "${enable_signed_char+set}" = set; then
12892   enableval="$enable_signed_char"
12893   with_signed_char=$enableval
12894 else
12895   with_signed_char=no
12896 fi;
12897 echo "$as_me:12897: result: $with_signed_char" >&5
12898 echo "${ECHO_T}$with_signed_char" >&6
12899 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12900
12901 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12902 echo "$as_me:12902: checking if you want SIGWINCH handler" >&5
12903 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12904
12905 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12906 if test "${enable_sigwinch+set}" = set; then
12907   enableval="$enable_sigwinch"
12908   with_sigwinch=$enableval
12909 else
12910   with_sigwinch=$with_ext_funcs
12911 fi;
12912 echo "$as_me:12912: result: $with_sigwinch" >&5
12913 echo "${ECHO_T}$with_sigwinch" >&6
12914 test "x$with_sigwinch" = xyes &&
12915 cat >>confdefs.h <<\EOF
12916 #define USE_SIGWINCH 1
12917 EOF
12918
12919 ###   use option --enable-tcap-names to allow user to define new capabilities
12920 echo "$as_me:12920: checking if you want user-definable terminal capabilities like termcap" >&5
12921 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12922
12923 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12924 if test "${enable_tcap_names+set}" = set; then
12925   enableval="$enable_tcap_names"
12926   with_tcap_names=$enableval
12927 else
12928   with_tcap_names=$with_ext_funcs
12929 fi;
12930 echo "$as_me:12930: result: $with_tcap_names" >&5
12931 echo "${ECHO_T}$with_tcap_names" >&6
12932 NCURSES_XNAMES=0
12933 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12934
12935 ##############################################################################
12936
12937 echo "$as_me:12937: checking if you want to link with the pthread library" >&5
12938 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12939
12940 # Check whether --with-pthread or --without-pthread was given.
12941 if test "${with_pthread+set}" = set; then
12942   withval="$with_pthread"
12943   with_pthread=$withval
12944 else
12945   with_pthread=no
12946 fi;
12947 echo "$as_me:12947: result: $with_pthread" >&5
12948 echo "${ECHO_T}$with_pthread" >&6
12949
12950 if test "$with_pthread" != no ; then
12951         echo "$as_me:12951: checking for pthread.h" >&5
12952 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12953 if test "${ac_cv_header_pthread_h+set}" = set; then
12954   echo $ECHO_N "(cached) $ECHO_C" >&6
12955 else
12956   cat >conftest.$ac_ext <<_ACEOF
12957 #line 12957 "configure"
12958 #include "confdefs.h"
12959 #include <pthread.h>
12960 _ACEOF
12961 if { (eval echo "$as_me:12961: \"$ac_cpp conftest.$ac_ext\"") >&5
12962   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12963   ac_status=$?
12964   egrep -v '^ *\+' conftest.er1 >conftest.err
12965   rm -f conftest.er1
12966   cat conftest.err >&5
12967   echo "$as_me:12967: \$? = $ac_status" >&5
12968   (exit $ac_status); } >/dev/null; then
12969   if test -s conftest.err; then
12970     ac_cpp_err=$ac_c_preproc_warn_flag
12971   else
12972     ac_cpp_err=
12973   fi
12974 else
12975   ac_cpp_err=yes
12976 fi
12977 if test -z "$ac_cpp_err"; then
12978   ac_cv_header_pthread_h=yes
12979 else
12980   echo "$as_me: failed program was:" >&5
12981   cat conftest.$ac_ext >&5
12982   ac_cv_header_pthread_h=no
12983 fi
12984 rm -f conftest.err conftest.$ac_ext
12985 fi
12986 echo "$as_me:12986: result: $ac_cv_header_pthread_h" >&5
12987 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12988 if test $ac_cv_header_pthread_h = yes; then
12989
12990 cat >>confdefs.h <<\EOF
12991 #define HAVE_PTHREADS_H 1
12992 EOF
12993
12994         for cf_lib_pthread in pthread c_r
12995         do
12996             echo "$as_me:12996: checking if we can link with the $cf_lib_pthread library" >&5
12997 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12998             cf_save_LIBS="$LIBS"
12999
13000 cf_add_libs="-l$cf_lib_pthread"
13001 # Filter out duplicates - this happens with badly-designed ".pc" files...
13002 for cf_add_1lib in $LIBS
13003 do
13004         for cf_add_2lib in $cf_add_libs
13005         do
13006                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13007                 then
13008                         cf_add_1lib=
13009                         break
13010                 fi
13011         done
13012         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13013 done
13014 LIBS="$cf_add_libs"
13015
13016             cat >conftest.$ac_ext <<_ACEOF
13017 #line 13017 "configure"
13018 #include "confdefs.h"
13019
13020 #include <pthread.h>
13021
13022 int
13023 main (void)
13024 {
13025
13026                 int rc = pthread_create(0,0,0,0);
13027                 int r2 = pthread_mutexattr_settype(0, 0);
13028
13029   ;
13030   return 0;
13031 }
13032 _ACEOF
13033 rm -f conftest.$ac_objext conftest$ac_exeext
13034 if { (eval echo "$as_me:13034: \"$ac_link\"") >&5
13035   (eval $ac_link) 2>&5
13036   ac_status=$?
13037   echo "$as_me:13037: \$? = $ac_status" >&5
13038   (exit $ac_status); } &&
13039          { ac_try='test -s conftest$ac_exeext'
13040   { (eval echo "$as_me:13040: \"$ac_try\"") >&5
13041   (eval $ac_try) 2>&5
13042   ac_status=$?
13043   echo "$as_me:13043: \$? = $ac_status" >&5
13044   (exit $ac_status); }; }; then
13045   with_pthread=yes
13046 else
13047   echo "$as_me: failed program was:" >&5
13048 cat conftest.$ac_ext >&5
13049 with_pthread=no
13050 fi
13051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13052             LIBS="$cf_save_LIBS"
13053             echo "$as_me:13053: result: $with_pthread" >&5
13054 echo "${ECHO_T}$with_pthread" >&6
13055             test "$with_pthread" = yes && break
13056         done
13057
13058         if test "$with_pthread" = yes ; then
13059
13060 cf_add_libs="-l$cf_lib_pthread"
13061 # Filter out duplicates - this happens with badly-designed ".pc" files...
13062 for cf_add_1lib in $LIBS
13063 do
13064         for cf_add_2lib in $cf_add_libs
13065         do
13066                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13067                 then
13068                         cf_add_1lib=
13069                         break
13070                 fi
13071         done
13072         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13073 done
13074 LIBS="$cf_add_libs"
13075
13076 cat >>confdefs.h <<\EOF
13077 #define HAVE_LIBPTHREADS 1
13078 EOF
13079
13080         else
13081             { { echo "$as_me:13081: error: Cannot link with pthread library" >&5
13082 echo "$as_me: error: Cannot link with pthread library" >&2;}
13083    { (exit 1); exit 1; }; }
13084         fi
13085
13086 fi
13087
13088 fi
13089
13090 if test "x$with_pthread" != xno; then
13091         echo "$as_me:13091: checking for pthread_kill" >&5
13092 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
13093 if test "${ac_cv_func_pthread_kill+set}" = set; then
13094   echo $ECHO_N "(cached) $ECHO_C" >&6
13095 else
13096   cat >conftest.$ac_ext <<_ACEOF
13097 #line 13097 "configure"
13098 #include "confdefs.h"
13099 /* System header to define __stub macros and hopefully few prototypes,
13100     which can conflict with char pthread_kill (); below.  */
13101 #include <assert.h>
13102 /* Override any gcc2 internal prototype to avoid an error.  */
13103 #ifdef __cplusplus
13104 extern "C"
13105 #endif
13106 /* We use char because int might match the return type of a gcc2
13107    builtin and then its argument prototype would still apply.  */
13108 char pthread_kill ();
13109 char (*f) ();
13110
13111 int
13112 main (void)
13113 {
13114 /* The GNU C library defines this for functions which it implements
13115     to always fail with ENOSYS.  Some functions are actually named
13116     something starting with __ and the normal name is an alias.  */
13117 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
13118 choke me
13119 #else
13120 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13121 #endif
13122
13123   ;
13124   return 0;
13125 }
13126 _ACEOF
13127 rm -f conftest.$ac_objext conftest$ac_exeext
13128 if { (eval echo "$as_me:13128: \"$ac_link\"") >&5
13129   (eval $ac_link) 2>&5
13130   ac_status=$?
13131   echo "$as_me:13131: \$? = $ac_status" >&5
13132   (exit $ac_status); } &&
13133          { ac_try='test -s conftest$ac_exeext'
13134   { (eval echo "$as_me:13134: \"$ac_try\"") >&5
13135   (eval $ac_try) 2>&5
13136   ac_status=$?
13137   echo "$as_me:13137: \$? = $ac_status" >&5
13138   (exit $ac_status); }; }; then
13139   ac_cv_func_pthread_kill=yes
13140 else
13141   echo "$as_me: failed program was:" >&5
13142 cat conftest.$ac_ext >&5
13143 ac_cv_func_pthread_kill=no
13144 fi
13145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13146 fi
13147 echo "$as_me:13147: result: $ac_cv_func_pthread_kill" >&5
13148 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
13149 if test $ac_cv_func_pthread_kill = yes; then
13150
13151                 echo "$as_me:13151: checking if you want to allow EINTR in wgetch with pthreads" >&5
13152 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
13153
13154 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
13155 if test "${enable_pthreads_eintr+set}" = set; then
13156   enableval="$enable_pthreads_eintr"
13157   use_pthreads_eintr=$enableval
13158 else
13159   use_pthreads_eintr=no
13160 fi;
13161                 echo "$as_me:13161: result: $use_pthreads_eintr" >&5
13162 echo "${ECHO_T}$use_pthreads_eintr" >&6
13163                 if test "x$use_pthreads_eintr" = xyes ; then
13164
13165 cat >>confdefs.h <<\EOF
13166 #define USE_PTHREADS_EINTR 1
13167 EOF
13168
13169                 fi
13170 fi
13171
13172         echo "$as_me:13172: checking if you want to use weak-symbols for pthreads" >&5
13173 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13174
13175 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13176 if test "${enable_weak_symbols+set}" = set; then
13177   enableval="$enable_weak_symbols"
13178   use_weak_symbols=$enableval
13179 else
13180   use_weak_symbols=no
13181 fi;
13182         echo "$as_me:13182: result: $use_weak_symbols" >&5
13183 echo "${ECHO_T}$use_weak_symbols" >&6
13184         if test "x$use_weak_symbols" = xyes ; then
13185
13186 echo "$as_me:13186: checking if $CC supports weak symbols" >&5
13187 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13188 if test "${cf_cv_weak_symbols+set}" = set; then
13189   echo $ECHO_N "(cached) $ECHO_C" >&6
13190 else
13191
13192 cat >conftest.$ac_ext <<_ACEOF
13193 #line 13193 "configure"
13194 #include "confdefs.h"
13195
13196 #include <stdio.h>
13197 int
13198 main (void)
13199 {
13200
13201 #if defined(__GNUC__)
13202 #  if defined __USE_ISOC99
13203 #    define _cat_pragma(exp)    _Pragma(#exp)
13204 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13205 #  else
13206 #    define _weak_pragma(exp)
13207 #  endif
13208 #  define _declare(name)        __extension__ extern __typeof__(name) name
13209 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13210 #endif
13211
13212 weak_symbol(fopen);
13213
13214   ;
13215   return 0;
13216 }
13217 _ACEOF
13218 rm -f conftest.$ac_objext
13219 if { (eval echo "$as_me:13219: \"$ac_compile\"") >&5
13220   (eval $ac_compile) 2>&5
13221   ac_status=$?
13222   echo "$as_me:13222: \$? = $ac_status" >&5
13223   (exit $ac_status); } &&
13224          { ac_try='test -s conftest.$ac_objext'
13225   { (eval echo "$as_me:13225: \"$ac_try\"") >&5
13226   (eval $ac_try) 2>&5
13227   ac_status=$?
13228   echo "$as_me:13228: \$? = $ac_status" >&5
13229   (exit $ac_status); }; }; then
13230   cf_cv_weak_symbols=yes
13231 else
13232   echo "$as_me: failed program was:" >&5
13233 cat conftest.$ac_ext >&5
13234 cf_cv_weak_symbols=no
13235 fi
13236 rm -f conftest.$ac_objext conftest.$ac_ext
13237
13238 fi
13239 echo "$as_me:13239: result: $cf_cv_weak_symbols" >&5
13240 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13241
13242         else
13243                 cf_cv_weak_symbols=no
13244         fi
13245
13246         if test "x$cf_cv_weak_symbols" = xyes ; then
13247
13248 cat >>confdefs.h <<\EOF
13249 #define USE_WEAK_SYMBOLS 1
13250 EOF
13251
13252         fi
13253 fi
13254
13255 PTHREAD=
13256 if test "x$with_pthread" = "xyes" ; then
13257
13258 cat >>confdefs.h <<\EOF
13259 #define USE_PTHREADS 1
13260 EOF
13261
13262         enable_reentrant=yes
13263         if test "x$cf_cv_weak_symbols" = xyes ; then
13264                 PTHREAD=-lpthread
13265         fi
13266 fi
13267
13268 # Reentrant code has to be opaque; there's little advantage to making ncurses
13269 # opaque outside of that, so there is no --enable-opaque option.  We can use
13270 # this option without --with-pthreads, but this will be always set for
13271 # pthreads.
13272 echo "$as_me:13272: checking if you want reentrant code" >&5
13273 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13274
13275 # Check whether --enable-reentrant or --disable-reentrant was given.
13276 if test "${enable_reentrant+set}" = set; then
13277   enableval="$enable_reentrant"
13278   with_reentrant=$enableval
13279 else
13280   with_reentrant=no
13281 fi;
13282 echo "$as_me:13282: result: $with_reentrant" >&5
13283 echo "${ECHO_T}$with_reentrant" >&6
13284 if test "x$with_reentrant" = xyes ; then
13285         cf_cv_enable_reentrant=1
13286         cf_cv_enable_opaque="NCURSES_INTERNALS"
13287         NCURSES_SIZE_T=int
13288         if test "x$cf_cv_weak_symbols" = xyes ; then
13289
13290 # remove pthread library from $LIBS
13291 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13292
13293 cf_add_libs="-lpthread"
13294 # Filter out duplicates - this happens with badly-designed ".pc" files...
13295 for cf_add_1lib in $TEST_LIBS
13296 do
13297         for cf_add_2lib in $cf_add_libs
13298         do
13299                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13300                 then
13301                         cf_add_1lib=
13302                         break
13303                 fi
13304         done
13305         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13306 done
13307 TEST_LIBS="$cf_add_libs"
13308
13309 cf_add_libs="-lpthread"
13310 # Filter out duplicates - this happens with badly-designed ".pc" files...
13311 for cf_add_1lib in $TEST_LIBS2
13312 do
13313         for cf_add_2lib in $cf_add_libs
13314         do
13315                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13316                 then
13317                         cf_add_1lib=
13318                         break
13319                 fi
13320         done
13321         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13322 done
13323 TEST_LIBS2="$cf_add_libs"
13324
13325         else
13326                 # when not using weak symbols but with_reentrant,
13327                 # add 't' to the library suffix on all platforms
13328                 # except cygwin, where we only do that if ALSO
13329                 # compiling with full thread support.
13330                 case "$host" in
13331                 (*cygwin* | *msys*)
13332                         if test "$with_pthread" = "yes" ; then
13333                                 if test "x$disable_lib_suffixes" = "xno" ; then
13334                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13335                                 fi
13336                         fi ;;
13337                 (*)
13338                         if test "x$disable_lib_suffixes" = "xno" ; then
13339                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13340                         fi
13341                         ;;
13342                 esac
13343         fi
13344
13345 cat >>confdefs.h <<\EOF
13346 #define USE_REENTRANT 1
13347 EOF
13348
13349 if test "${with_abi_version+set}" != set; then
13350         case $cf_cv_rel_version in
13351         (5.*)
13352                 cf_cv_rel_version=6.0
13353                 cf_cv_abi_version=6
13354                 { echo "$as_me:13354: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13355 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13356                 ;;
13357         esac
13358 fi
13359
13360 else
13361         cf_cv_enable_reentrant=0
13362         cf_cv_enable_opaque="NCURSES_OPAQUE"
13363         NCURSES_SIZE_T=short
13364 fi
13365
13366 echo "$as_me:13366: checking if you want opaque curses-library structures" >&5
13367 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13368
13369 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13370 if test "${enable_opaque_curses+set}" = set; then
13371   enableval="$enable_opaque_curses"
13372   test "$enableval" != yes && enableval=no
13373         if test "$enableval" != "no" ; then
13374     enable_opaque_curses=yes
13375         else
13376
13377          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13378          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13379
13380         fi
13381 else
13382   enableval=no
13383
13384          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13385          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13386
13387 fi;
13388 echo "$as_me:13388: result: $enable_opaque_curses" >&5
13389 echo "${ECHO_T}$enable_opaque_curses" >&6
13390
13391 test "$cf_cv_enable_reentrant" = 1 && \
13392 test "$enable_opaque_curses" = no && \
13393 { { echo "$as_me:13393: error: reentrant configuration requires opaque library" >&5
13394 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13395    { (exit 1); exit 1; }; }
13396
13397 echo "$as_me:13397: checking if you want opaque form-library structures" >&5
13398 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13399
13400 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13401 if test "${enable_opaque_form+set}" = set; then
13402   enableval="$enable_opaque_form"
13403   enable_opaque_form=yes
13404 else
13405   enable_opaque_form=no
13406 fi;
13407 echo "$as_me:13407: result: $enable_opaque_form" >&5
13408 echo "${ECHO_T}$enable_opaque_form" >&6
13409
13410 echo "$as_me:13410: checking if you want opaque menu-library structures" >&5
13411 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13412
13413 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13414 if test "${enable_opaque_menu+set}" = set; then
13415   enableval="$enable_opaque_menu"
13416   enable_opaque_menu=yes
13417 else
13418   enable_opaque_menu=no
13419 fi;
13420 echo "$as_me:13420: result: $enable_opaque_menu" >&5
13421 echo "${ECHO_T}$enable_opaque_menu" >&6
13422
13423 echo "$as_me:13423: checking if you want opaque panel-library structures" >&5
13424 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13425
13426 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13427 if test "${enable_opaque_panel+set}" = set; then
13428   enableval="$enable_opaque_panel"
13429   enable_opaque_panel=yes
13430 else
13431   enable_opaque_panel=no
13432 fi;
13433 echo "$as_me:13433: result: $enable_opaque_panel" >&5
13434 echo "${ECHO_T}$enable_opaque_panel" >&6
13435
13436 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13437 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13438 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13439 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13440
13441 ### Allow using a different wrap-prefix
13442 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13443         echo "$as_me:13443: checking for prefix used to wrap public variables" >&5
13444 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13445
13446 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13447 if test "${with_wrap_prefix+set}" = set; then
13448   withval="$with_wrap_prefix"
13449   NCURSES_WRAP_PREFIX=$withval
13450 else
13451   NCURSES_WRAP_PREFIX=_nc_
13452 fi;
13453         echo "$as_me:13453: result: $NCURSES_WRAP_PREFIX" >&5
13454 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13455 else
13456         NCURSES_WRAP_PREFIX=_nc_
13457 fi
13458
13459 cat >>confdefs.h <<EOF
13460 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13461 EOF
13462
13463 ###############################################################################
13464 # These options are relatively safe to experiment with.
13465
13466 echo "$as_me:13466: checking if you want all development code" >&5
13467 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13468
13469 # Check whether --with-develop or --without-develop was given.
13470 if test "${with_develop+set}" = set; then
13471   withval="$with_develop"
13472   with_develop=$withval
13473 else
13474   with_develop=no
13475 fi;
13476 echo "$as_me:13476: result: $with_develop" >&5
13477 echo "${ECHO_T}$with_develop" >&6
13478
13479 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13480 echo "$as_me:13480: checking if you want hard-tabs code" >&5
13481 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13482
13483 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13484 if test "${enable_hard_tabs+set}" = set; then
13485   enableval="$enable_hard_tabs"
13486
13487 else
13488   enable_hard_tabs=$with_develop
13489 fi;
13490 echo "$as_me:13490: result: $enable_hard_tabs" >&5
13491 echo "${ECHO_T}$enable_hard_tabs" >&6
13492 test "x$enable_hard_tabs" = xyes &&
13493 cat >>confdefs.h <<\EOF
13494 #define USE_HARD_TABS 1
13495 EOF
13496
13497 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13498 echo "$as_me:13498: checking if you want limited support for xmc" >&5
13499 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13500
13501 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13502 if test "${enable_xmc_glitch+set}" = set; then
13503   enableval="$enable_xmc_glitch"
13504
13505 else
13506   enable_xmc_glitch=$with_develop
13507 fi;
13508 echo "$as_me:13508: result: $enable_xmc_glitch" >&5
13509 echo "${ECHO_T}$enable_xmc_glitch" >&6
13510 test "x$enable_xmc_glitch" = xyes &&
13511 cat >>confdefs.h <<\EOF
13512 #define USE_XMC_SUPPORT 1
13513 EOF
13514
13515 ###############################################################################
13516 # These are just experimental, probably should not be in a package:
13517
13518 echo "$as_me:13518: checking if you do not want to assume colors are white-on-black" >&5
13519 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
13520
13521 # Check whether --enable-assumed-color or --disable-assumed-color was given.
13522 if test "${enable_assumed_color+set}" = set; then
13523   enableval="$enable_assumed_color"
13524   with_assumed_color=$enableval
13525 else
13526   with_assumed_color=yes
13527 fi;
13528 echo "$as_me:13528: result: $with_assumed_color" >&5
13529 echo "${ECHO_T}$with_assumed_color" >&6
13530 test "x$with_assumed_color" = xyes &&
13531 cat >>confdefs.h <<\EOF
13532 #define USE_ASSUMED_COLOR 1
13533 EOF
13534
13535 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
13536 echo "$as_me:13536: checking if you want hashmap scrolling-optimization code" >&5
13537 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
13538
13539 # Check whether --enable-hashmap or --disable-hashmap was given.
13540 if test "${enable_hashmap+set}" = set; then
13541   enableval="$enable_hashmap"
13542   with_hashmap=$enableval
13543 else
13544   with_hashmap=yes
13545 fi;
13546 echo "$as_me:13546: result: $with_hashmap" >&5
13547 echo "${ECHO_T}$with_hashmap" >&6
13548 test "x$with_hashmap" = xyes &&
13549 cat >>confdefs.h <<\EOF
13550 #define USE_HASHMAP 1
13551 EOF
13552
13553 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
13554 echo "$as_me:13554: checking if you want colorfgbg code" >&5
13555 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
13556
13557 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
13558 if test "${enable_colorfgbg+set}" = set; then
13559   enableval="$enable_colorfgbg"
13560   with_colorfgbg=$enableval
13561 else
13562   with_colorfgbg=no
13563 fi;
13564 echo "$as_me:13564: result: $with_colorfgbg" >&5
13565 echo "${ECHO_T}$with_colorfgbg" >&6
13566 test "x$with_colorfgbg" = xyes &&
13567 cat >>confdefs.h <<\EOF
13568 #define USE_COLORFGBG 1
13569 EOF
13570
13571 ###   use option --enable-interop to turn on use of bindings used for interop
13572 echo "$as_me:13572: checking if you want interop bindings" >&5
13573 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
13574
13575 # Check whether --enable-interop or --disable-interop was given.
13576 if test "${enable_interop+set}" = set; then
13577   enableval="$enable_interop"
13578   with_exp_interop=$enableval
13579 else
13580   with_exp_interop=$cf_dft_interop
13581 fi;
13582 echo "$as_me:13582: result: $with_exp_interop" >&5
13583 echo "${ECHO_T}$with_exp_interop" >&6
13584
13585 NCURSES_INTEROP_FUNCS=0
13586 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
13587
13588 echo "$as_me:13588: checking if you want experimental safe-sprintf code" >&5
13589 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13590
13591 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13592 if test "${enable_safe_sprintf+set}" = set; then
13593   enableval="$enable_safe_sprintf"
13594   with_safe_sprintf=$enableval
13595 else
13596   with_safe_sprintf=no
13597 fi;
13598 echo "$as_me:13598: result: $with_safe_sprintf" >&5
13599 echo "${ECHO_T}$with_safe_sprintf" >&6
13600 test "x$with_safe_sprintf" = xyes &&
13601 cat >>confdefs.h <<\EOF
13602 #define USE_SAFE_SPRINTF 1
13603 EOF
13604
13605 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13606 # when hashmap is used scroll hints are useless
13607 if test "$with_hashmap" = no ; then
13608 echo "$as_me:13608: checking if you want to experiment without scrolling-hints code" >&5
13609 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13610
13611 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13612 if test "${enable_scroll_hints+set}" = set; then
13613   enableval="$enable_scroll_hints"
13614   with_scroll_hints=$enableval
13615 else
13616   with_scroll_hints=yes
13617 fi;
13618 echo "$as_me:13618: result: $with_scroll_hints" >&5
13619 echo "${ECHO_T}$with_scroll_hints" >&6
13620 test "x$with_scroll_hints" = xyes &&
13621 cat >>confdefs.h <<\EOF
13622 #define USE_SCROLL_HINTS 1
13623 EOF
13624
13625 fi
13626
13627 echo "$as_me:13627: checking if you want wgetch-events code" >&5
13628 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13629
13630 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13631 if test "${enable_wgetch_events+set}" = set; then
13632   enableval="$enable_wgetch_events"
13633   with_wgetch_events=$enableval
13634 else
13635   with_wgetch_events=no
13636 fi;
13637 echo "$as_me:13637: result: $with_wgetch_events" >&5
13638 echo "${ECHO_T}$with_wgetch_events" >&6
13639 test "x$with_wgetch_events" = xyes &&
13640 cat >>confdefs.h <<\EOF
13641 #define NCURSES_WGETCH_EVENTS 1
13642 EOF
13643
13644 ###############################################################################
13645
13646 ###     use option --disable-echo to suppress full display compiling commands
13647
13648 echo "$as_me:13648: checking if you want to see long compiling messages" >&5
13649 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13650
13651 # Check whether --enable-echo or --disable-echo was given.
13652 if test "${enable_echo+set}" = set; then
13653   enableval="$enable_echo"
13654   test "$enableval" != no && enableval=yes
13655         if test "$enableval" != "yes" ; then
13656
13657         ECHO_LT='--silent'
13658         ECHO_LD='@echo linking $@;'
13659         RULE_CC='@echo compiling $<'
13660         SHOW_CC='@echo compiling $@'
13661         ECHO_CC='@'
13662
13663         else
13664
13665         ECHO_LT=''
13666         ECHO_LD=''
13667         RULE_CC=''
13668         SHOW_CC=''
13669         ECHO_CC=''
13670
13671         fi
13672 else
13673   enableval=yes
13674
13675         ECHO_LT=''
13676         ECHO_LD=''
13677         RULE_CC=''
13678         SHOW_CC=''
13679         ECHO_CC=''
13680
13681 fi;
13682 echo "$as_me:13682: result: $enableval" >&5
13683 echo "${ECHO_T}$enableval" >&6
13684
13685 if test "x$enable_echo" = xyes; then
13686         ECHO_LINK=
13687 else
13688         ECHO_LINK='@ echo linking $@ ... ;'
13689         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13690         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13691 fi
13692
13693 ###     use option --enable-warnings to turn on all gcc warnings
13694 echo "$as_me:13694: checking if you want to see compiler warnings" >&5
13695 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13696
13697 # Check whether --enable-warnings or --disable-warnings was given.
13698 if test "${enable_warnings+set}" = set; then
13699   enableval="$enable_warnings"
13700   with_warnings=$enableval
13701 fi;
13702 echo "$as_me:13702: result: $with_warnings" >&5
13703 echo "${ECHO_T}$with_warnings" >&6
13704
13705 if test "x$with_warnings" = "xyes"; then
13706
13707         ADAFLAGS="$ADAFLAGS -gnatg"
13708
13709 INTEL_COMPILER=no
13710
13711 if test "$GCC" = yes ; then
13712         case $host_os in
13713         (linux*|gnu*)
13714                 echo "$as_me:13714: checking if this is really Intel C compiler" >&5
13715 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13716                 cf_save_CFLAGS="$CFLAGS"
13717                 CFLAGS="$CFLAGS -no-gcc"
13718                 cat >conftest.$ac_ext <<_ACEOF
13719 #line 13719 "configure"
13720 #include "confdefs.h"
13721
13722 int
13723 main (void)
13724 {
13725
13726 #ifdef __INTEL_COMPILER
13727 #else
13728 make an error
13729 #endif
13730
13731   ;
13732   return 0;
13733 }
13734 _ACEOF
13735 rm -f conftest.$ac_objext
13736 if { (eval echo "$as_me:13736: \"$ac_compile\"") >&5
13737   (eval $ac_compile) 2>&5
13738   ac_status=$?
13739   echo "$as_me:13739: \$? = $ac_status" >&5
13740   (exit $ac_status); } &&
13741          { ac_try='test -s conftest.$ac_objext'
13742   { (eval echo "$as_me:13742: \"$ac_try\"") >&5
13743   (eval $ac_try) 2>&5
13744   ac_status=$?
13745   echo "$as_me:13745: \$? = $ac_status" >&5
13746   (exit $ac_status); }; }; then
13747   INTEL_COMPILER=yes
13748 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13749
13750 else
13751   echo "$as_me: failed program was:" >&5
13752 cat conftest.$ac_ext >&5
13753 fi
13754 rm -f conftest.$ac_objext conftest.$ac_ext
13755                 CFLAGS="$cf_save_CFLAGS"
13756                 echo "$as_me:13756: result: $INTEL_COMPILER" >&5
13757 echo "${ECHO_T}$INTEL_COMPILER" >&6
13758                 ;;
13759         esac
13760 fi
13761
13762 CLANG_COMPILER=no
13763
13764 if test "$GCC" = yes ; then
13765         echo "$as_me:13765: checking if this is really Clang C compiler" >&5
13766 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13767         cf_save_CFLAGS="$CFLAGS"
13768         CFLAGS="$CFLAGS -Qunused-arguments"
13769         cat >conftest.$ac_ext <<_ACEOF
13770 #line 13770 "configure"
13771 #include "confdefs.h"
13772
13773 int
13774 main (void)
13775 {
13776
13777 #ifdef __clang__
13778 #else
13779 make an error
13780 #endif
13781
13782   ;
13783   return 0;
13784 }
13785 _ACEOF
13786 rm -f conftest.$ac_objext
13787 if { (eval echo "$as_me:13787: \"$ac_compile\"") >&5
13788   (eval $ac_compile) 2>&5
13789   ac_status=$?
13790   echo "$as_me:13790: \$? = $ac_status" >&5
13791   (exit $ac_status); } &&
13792          { ac_try='test -s conftest.$ac_objext'
13793   { (eval echo "$as_me:13793: \"$ac_try\"") >&5
13794   (eval $ac_try) 2>&5
13795   ac_status=$?
13796   echo "$as_me:13796: \$? = $ac_status" >&5
13797   (exit $ac_status); }; }; then
13798   CLANG_COMPILER=yes
13799 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13800
13801 else
13802   echo "$as_me: failed program was:" >&5
13803 cat conftest.$ac_ext >&5
13804 fi
13805 rm -f conftest.$ac_objext conftest.$ac_ext
13806         CFLAGS="$cf_save_CFLAGS"
13807         echo "$as_me:13807: result: $CLANG_COMPILER" >&5
13808 echo "${ECHO_T}$CLANG_COMPILER" >&6
13809 fi
13810
13811 cat > conftest.$ac_ext <<EOF
13812 #line 13812 "${as_me:-configure}"
13813 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13814 EOF
13815
13816 if test "$INTEL_COMPILER" = yes
13817 then
13818 # The "-wdXXX" options suppress warnings:
13819 # remark #1419: external declaration in primary source file
13820 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13821 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13822 # remark #193: zero used for undefined preprocessing identifier
13823 # remark #593: variable "curs_sb_left_arrow" was set but never used
13824 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13825 # remark #869: parameter "tw" was never referenced
13826 # remark #981: operands are evaluated in unspecified order
13827 # warning #279: controlling expression is constant
13828
13829         { echo "$as_me:13829: checking for $CC warning options..." >&5
13830 echo "$as_me: checking for $CC warning options..." >&6;}
13831         cf_save_CFLAGS="$CFLAGS"
13832         EXTRA_CFLAGS="-Wall"
13833         for cf_opt in \
13834                 wd1419 \
13835                 wd1683 \
13836                 wd1684 \
13837                 wd193 \
13838                 wd593 \
13839                 wd279 \
13840                 wd810 \
13841                 wd869 \
13842                 wd981
13843         do
13844                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13845                 if { (eval echo "$as_me:13845: \"$ac_compile\"") >&5
13846   (eval $ac_compile) 2>&5
13847   ac_status=$?
13848   echo "$as_me:13848: \$? = $ac_status" >&5
13849   (exit $ac_status); }; then
13850                         test -n "$verbose" && echo "$as_me:13850: result: ... -$cf_opt" >&5
13851 echo "${ECHO_T}... -$cf_opt" >&6
13852                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13853                 fi
13854         done
13855         CFLAGS="$cf_save_CFLAGS"
13856
13857 elif test "$GCC" = yes
13858 then
13859         { echo "$as_me:13859: checking for $CC warning options..." >&5
13860 echo "$as_me: checking for $CC warning options..." >&6;}
13861         cf_save_CFLAGS="$CFLAGS"
13862         EXTRA_CFLAGS=
13863         cf_warn_CONST=""
13864         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13865         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13866         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13867         for cf_opt in W Wall \
13868                 Wbad-function-cast \
13869                 Wcast-align \
13870                 Wcast-qual \
13871                 Wdeclaration-after-statement \
13872                 Wextra \
13873                 Winline \
13874                 Wmissing-declarations \
13875                 Wmissing-prototypes \
13876                 Wnested-externs \
13877                 Wpointer-arith \
13878                 Wshadow \
13879                 Wstrict-prototypes \
13880                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13881         do
13882                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13883                 if { (eval echo "$as_me:13883: \"$ac_compile\"") >&5
13884   (eval $ac_compile) 2>&5
13885   ac_status=$?
13886   echo "$as_me:13886: \$? = $ac_status" >&5
13887   (exit $ac_status); }; then
13888                         test -n "$verbose" && echo "$as_me:13888: result: ... -$cf_opt" >&5
13889 echo "${ECHO_T}... -$cf_opt" >&6
13890                         case $cf_opt in
13891                         (Wcast-qual)
13892                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13893                                 ;;
13894                         (Winline)
13895                                 case $GCC_VERSION in
13896                                 ([34].*)
13897                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13898
13899 echo "${as_me:-configure}:13899: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13900
13901                                         continue;;
13902                                 esac
13903                                 ;;
13904                         (Wpointer-arith)
13905                                 case $GCC_VERSION in
13906                                 ([12].*)
13907                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13908
13909 echo "${as_me:-configure}:13909: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13910
13911                                         continue;;
13912                                 esac
13913                                 ;;
13914                         esac
13915                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13916                 fi
13917         done
13918         CFLAGS="$cf_save_CFLAGS"
13919 fi
13920 rm -rf conftest*
13921
13922         if test "x$cf_with_cxx" = xyes ; then
13923
13924 INTEL_CPLUSPLUS=no
13925
13926 if test "$GCC" = yes ; then
13927         case $host_os in
13928         (linux*|gnu*)
13929                 echo "$as_me:13929: checking if this is really Intel C++ compiler" >&5
13930 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13931                 cf_save_CFLAGS="$CXXFLAGS"
13932                 CXXFLAGS="$CXXFLAGS -no-gcc"
13933                 cat >conftest.$ac_ext <<_ACEOF
13934 #line 13934 "configure"
13935 #include "confdefs.h"
13936
13937 int
13938 main (void)
13939 {
13940
13941 #ifdef __INTEL_COMPILER
13942 #else
13943 make an error
13944 #endif
13945
13946   ;
13947   return 0;
13948 }
13949 _ACEOF
13950 rm -f conftest.$ac_objext
13951 if { (eval echo "$as_me:13951: \"$ac_compile\"") >&5
13952   (eval $ac_compile) 2>&5
13953   ac_status=$?
13954   echo "$as_me:13954: \$? = $ac_status" >&5
13955   (exit $ac_status); } &&
13956          { ac_try='test -s conftest.$ac_objext'
13957   { (eval echo "$as_me:13957: \"$ac_try\"") >&5
13958   (eval $ac_try) 2>&5
13959   ac_status=$?
13960   echo "$as_me:13960: \$? = $ac_status" >&5
13961   (exit $ac_status); }; }; then
13962   INTEL_CPLUSPLUS=yes
13963 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13964
13965 else
13966   echo "$as_me: failed program was:" >&5
13967 cat conftest.$ac_ext >&5
13968 fi
13969 rm -f conftest.$ac_objext conftest.$ac_ext
13970                 CXXFLAGS="$cf_save_CFLAGS"
13971                 echo "$as_me:13971: result: $INTEL_CPLUSPLUS" >&5
13972 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13973                 ;;
13974         esac
13975 fi
13976
13977 CLANG_CPLUSPLUS=no
13978
13979 if test "$GCC" = yes ; then
13980         echo "$as_me:13980: checking if this is really Clang C++ compiler" >&5
13981 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13982         cf_save_CFLAGS="$CXXFLAGS"
13983         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13984         cat >conftest.$ac_ext <<_ACEOF
13985 #line 13985 "configure"
13986 #include "confdefs.h"
13987
13988 int
13989 main (void)
13990 {
13991
13992 #ifdef __clang__
13993 #else
13994 make an error
13995 #endif
13996
13997   ;
13998   return 0;
13999 }
14000 _ACEOF
14001 rm -f conftest.$ac_objext
14002 if { (eval echo "$as_me:14002: \"$ac_compile\"") >&5
14003   (eval $ac_compile) 2>&5
14004   ac_status=$?
14005   echo "$as_me:14005: \$? = $ac_status" >&5
14006   (exit $ac_status); } &&
14007          { ac_try='test -s conftest.$ac_objext'
14008   { (eval echo "$as_me:14008: \"$ac_try\"") >&5
14009   (eval $ac_try) 2>&5
14010   ac_status=$?
14011   echo "$as_me:14011: \$? = $ac_status" >&5
14012   (exit $ac_status); }; }; then
14013   CLANG_CPLUSPLUS=yes
14014 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14015
14016 else
14017   echo "$as_me: failed program was:" >&5
14018 cat conftest.$ac_ext >&5
14019 fi
14020 rm -f conftest.$ac_objext conftest.$ac_ext
14021         CXXFLAGS="$cf_save_CFLAGS"
14022         echo "$as_me:14022: result: $CLANG_CPLUSPLUS" >&5
14023 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
14024 fi
14025
14026 ac_ext=cc
14027 ac_cpp='$CXXCPP $CPPFLAGS'
14028 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14029 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14030 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14031 ac_main_return=return
14032
14033 cat > conftest.$ac_ext <<EOF
14034 #line 14034 "configure"
14035 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14036 EOF
14037
14038 if test "$INTEL_CPLUSPLUS" = yes
14039 then
14040 # The "-wdXXX" options suppress warnings:
14041 # remark #1419: external declaration in primary source file
14042 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14043 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14044 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14045 # remark #193: zero used for undefined preprocessing identifier
14046 # remark #593: variable "curs_sb_left_arrow" was set but never used
14047 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14048 # remark #869: parameter "tw" was never referenced
14049 # remark #981: operands are evaluated in unspecified order
14050 # warning #269: invalid format string conversion
14051
14052         { echo "$as_me:14052: checking for $CC warning options..." >&5
14053 echo "$as_me: checking for $CC warning options..." >&6;}
14054         cf_save_CXXFLAGS="$CXXFLAGS"
14055         EXTRA_CXXFLAGS="-Wall"
14056         for cf_opt in \
14057                 wd1419 \
14058                 wd1682 \
14059                 wd1683 \
14060                 wd1684 \
14061                 wd193 \
14062                 wd279 \
14063                 wd593 \
14064                 wd810 \
14065                 wd869 \
14066                 wd981
14067         do
14068                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
14069                 if { (eval echo "$as_me:14069: \"$ac_compile\"") >&5
14070   (eval $ac_compile) 2>&5
14071   ac_status=$?
14072   echo "$as_me:14072: \$? = $ac_status" >&5
14073   (exit $ac_status); }; then
14074                         test -n "$verbose" && echo "$as_me:14074: result: ... -$cf_opt" >&5
14075 echo "${ECHO_T}... -$cf_opt" >&6
14076                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14077                 fi
14078         done
14079         CXXFLAGS="$cf_save_CXXFLAGS"
14080
14081 elif test "$GXX" = yes
14082 then
14083         { echo "$as_me:14083: checking for $CXX warning options..." >&5
14084 echo "$as_me: checking for $CXX warning options..." >&6;}
14085         cf_save_CXXFLAGS="$CXXFLAGS"
14086         EXTRA_CXXFLAGS="-W -Wall"
14087         cf_gxx_extra_warnings=""
14088         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
14089         case "$GCC_VERSION" in
14090         ([1-2].*)
14091                 ;;
14092         (*)
14093                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
14094                 ;;
14095         esac
14096         for cf_opt in \
14097                 Wabi \
14098                 fabi-version=0 \
14099                 Wextra \
14100                 Wignored-qualifiers \
14101                 Wlogical-op \
14102                 Woverloaded-virtual \
14103                 Wsign-promo \
14104                 Wsynth \
14105                 Wold-style-cast \
14106                 Wcast-align \
14107                 Wcast-qual \
14108                 Wpointer-arith \
14109                 Wshadow \
14110                 Wundef $cf_gxx_extra_warnings Wno-unused
14111         do
14112                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
14113                 if { (eval echo "$as_me:14113: \"$ac_compile\"") >&5
14114   (eval $ac_compile) 2>&5
14115   ac_status=$?
14116   echo "$as_me:14116: \$? = $ac_status" >&5
14117   (exit $ac_status); }; then
14118                         test -n "$verbose" && echo "$as_me:14118: result: ... -$cf_opt" >&5
14119 echo "${ECHO_T}... -$cf_opt" >&6
14120                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14121                 else
14122                         test -n "$verbose" && echo "$as_me:14122: result: ... no -$cf_opt" >&5
14123 echo "${ECHO_T}... no -$cf_opt" >&6
14124                 fi
14125         done
14126         CXXFLAGS="$cf_save_CXXFLAGS"
14127 fi
14128
14129 rm -rf conftest*
14130 ac_ext=c
14131 ac_cpp='$CPP $CPPFLAGS'
14132 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14133 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14134 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14135 ac_main_return=return
14136
14137         fi
14138 fi
14139
14140 if test "$GCC" = yes
14141 then
14142 cat > conftest.i <<EOF
14143 #ifndef GCC_PRINTF
14144 #define GCC_PRINTF 0
14145 #endif
14146 #ifndef GCC_SCANF
14147 #define GCC_SCANF 0
14148 #endif
14149 #ifndef GCC_NORETURN
14150 #define GCC_NORETURN /* nothing */
14151 #endif
14152 #ifndef GCC_UNUSED
14153 #define GCC_UNUSED /* nothing */
14154 #endif
14155 EOF
14156 if test "$GCC" = yes
14157 then
14158         { echo "$as_me:14158: checking for $CC __attribute__ directives..." >&5
14159 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14160 cat > conftest.$ac_ext <<EOF
14161 #line 14161 "${as_me:-configure}"
14162 #include "confdefs.h"
14163 #include "conftest.h"
14164 #include "conftest.i"
14165 #if     GCC_PRINTF
14166 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14167 #else
14168 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14169 #endif
14170 #if     GCC_SCANF
14171 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
14172 #else
14173 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
14174 #endif
14175 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14176 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14177 extern void foo(void) GCC_NORETURN;
14178 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
14179 EOF
14180         cf_printf_attribute=no
14181         cf_scanf_attribute=no
14182         for cf_attribute in scanf printf unused noreturn
14183         do
14184
14185 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14186
14187                 cf_directive="__attribute__(($cf_attribute))"
14188                 echo "checking for $CC $cf_directive" 1>&5
14189
14190                 case $cf_attribute in
14191                 (printf)
14192                         cf_printf_attribute=yes
14193                         cat >conftest.h <<EOF
14194 #define GCC_$cf_ATTRIBUTE 1
14195 EOF
14196                         ;;
14197                 (scanf)
14198                         cf_scanf_attribute=yes
14199                         cat >conftest.h <<EOF
14200 #define GCC_$cf_ATTRIBUTE 1
14201 EOF
14202                         ;;
14203                 (*)
14204                         cat >conftest.h <<EOF
14205 #define GCC_$cf_ATTRIBUTE $cf_directive
14206 EOF
14207                         ;;
14208                 esac
14209
14210                 if { (eval echo "$as_me:14210: \"$ac_compile\"") >&5
14211   (eval $ac_compile) 2>&5
14212   ac_status=$?
14213   echo "$as_me:14213: \$? = $ac_status" >&5
14214   (exit $ac_status); }; then
14215                         test -n "$verbose" && echo "$as_me:14215: result: ... $cf_attribute" >&5
14216 echo "${ECHO_T}... $cf_attribute" >&6
14217                         cat conftest.h >>confdefs.h
14218                         case $cf_attribute in
14219                         (noreturn)
14220
14221 cat >>confdefs.h <<EOF
14222 #define GCC_NORETURN $cf_directive
14223 EOF
14224
14225                                 ;;
14226                         (printf)
14227                                 cf_value='/* nothing */'
14228                                 if test "$cf_printf_attribute" != no ; then
14229                                         cf_value='__attribute__((format(printf,fmt,var)))'
14230
14231 cat >>confdefs.h <<\EOF
14232 #define GCC_PRINTF 1
14233 EOF
14234
14235                                 fi
14236
14237 cat >>confdefs.h <<EOF
14238 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14239 EOF
14240
14241                                 ;;
14242                         (scanf)
14243                                 cf_value='/* nothing */'
14244                                 if test "$cf_scanf_attribute" != no ; then
14245                                         cf_value='__attribute__((format(scanf,fmt,var)))'
14246
14247 cat >>confdefs.h <<\EOF
14248 #define GCC_SCANF 1
14249 EOF
14250
14251                                 fi
14252
14253 cat >>confdefs.h <<EOF
14254 #define GCC_SCANFLIKE(fmt,var) $cf_value
14255 EOF
14256
14257                                 ;;
14258                         (unused)
14259
14260 cat >>confdefs.h <<EOF
14261 #define GCC_UNUSED $cf_directive
14262 EOF
14263
14264                                 ;;
14265                         esac
14266                 fi
14267         done
14268 else
14269         fgrep define conftest.i >>confdefs.h
14270 fi
14271 rm -rf conftest*
14272 fi
14273
14274 echo "$as_me:14274: checking if you want to work around bogus compiler/loader warnings" >&5
14275 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14276
14277 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14278 if test "${enable_string_hacks+set}" = set; then
14279   enableval="$enable_string_hacks"
14280   with_string_hacks=$enableval
14281 else
14282   with_string_hacks=no
14283 fi;
14284 echo "$as_me:14284: result: $with_string_hacks" >&5
14285 echo "${ECHO_T}$with_string_hacks" >&6
14286
14287 if test "x$with_string_hacks" = "xyes"; then
14288
14289 cat >>confdefs.h <<\EOF
14290 #define USE_STRING_HACKS 1
14291 EOF
14292
14293         { echo "$as_me:14293: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14294 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14295         echo "$as_me:14295: checking for strlcat" >&5
14296 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14297 if test "${ac_cv_func_strlcat+set}" = set; then
14298   echo $ECHO_N "(cached) $ECHO_C" >&6
14299 else
14300   cat >conftest.$ac_ext <<_ACEOF
14301 #line 14301 "configure"
14302 #include "confdefs.h"
14303 /* System header to define __stub macros and hopefully few prototypes,
14304     which can conflict with char strlcat (); below.  */
14305 #include <assert.h>
14306 /* Override any gcc2 internal prototype to avoid an error.  */
14307 #ifdef __cplusplus
14308 extern "C"
14309 #endif
14310 /* We use char because int might match the return type of a gcc2
14311    builtin and then its argument prototype would still apply.  */
14312 char strlcat ();
14313 char (*f) ();
14314
14315 int
14316 main (void)
14317 {
14318 /* The GNU C library defines this for functions which it implements
14319     to always fail with ENOSYS.  Some functions are actually named
14320     something starting with __ and the normal name is an alias.  */
14321 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14322 choke me
14323 #else
14324 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14325 #endif
14326
14327   ;
14328   return 0;
14329 }
14330 _ACEOF
14331 rm -f conftest.$ac_objext conftest$ac_exeext
14332 if { (eval echo "$as_me:14332: \"$ac_link\"") >&5
14333   (eval $ac_link) 2>&5
14334   ac_status=$?
14335   echo "$as_me:14335: \$? = $ac_status" >&5
14336   (exit $ac_status); } &&
14337          { ac_try='test -s conftest$ac_exeext'
14338   { (eval echo "$as_me:14338: \"$ac_try\"") >&5
14339   (eval $ac_try) 2>&5
14340   ac_status=$?
14341   echo "$as_me:14341: \$? = $ac_status" >&5
14342   (exit $ac_status); }; }; then
14343   ac_cv_func_strlcat=yes
14344 else
14345   echo "$as_me: failed program was:" >&5
14346 cat conftest.$ac_ext >&5
14347 ac_cv_func_strlcat=no
14348 fi
14349 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14350 fi
14351 echo "$as_me:14351: result: $ac_cv_func_strlcat" >&5
14352 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14353 if test $ac_cv_func_strlcat = yes; then
14354
14355 cat >>confdefs.h <<\EOF
14356 #define HAVE_STRLCAT 1
14357 EOF
14358
14359 else
14360
14361                 echo "$as_me:14361: checking for strlcat in -lbsd" >&5
14362 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14363 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14364   echo $ECHO_N "(cached) $ECHO_C" >&6
14365 else
14366   ac_check_lib_save_LIBS=$LIBS
14367 LIBS="-lbsd  $LIBS"
14368 cat >conftest.$ac_ext <<_ACEOF
14369 #line 14369 "configure"
14370 #include "confdefs.h"
14371
14372 /* Override any gcc2 internal prototype to avoid an error.  */
14373 #ifdef __cplusplus
14374 extern "C"
14375 #endif
14376 /* We use char because int might match the return type of a gcc2
14377    builtin and then its argument prototype would still apply.  */
14378 char strlcat ();
14379 int
14380 main (void)
14381 {
14382 strlcat ();
14383   ;
14384   return 0;
14385 }
14386 _ACEOF
14387 rm -f conftest.$ac_objext conftest$ac_exeext
14388 if { (eval echo "$as_me:14388: \"$ac_link\"") >&5
14389   (eval $ac_link) 2>&5
14390   ac_status=$?
14391   echo "$as_me:14391: \$? = $ac_status" >&5
14392   (exit $ac_status); } &&
14393          { ac_try='test -s conftest$ac_exeext'
14394   { (eval echo "$as_me:14394: \"$ac_try\"") >&5
14395   (eval $ac_try) 2>&5
14396   ac_status=$?
14397   echo "$as_me:14397: \$? = $ac_status" >&5
14398   (exit $ac_status); }; }; then
14399   ac_cv_lib_bsd_strlcat=yes
14400 else
14401   echo "$as_me: failed program was:" >&5
14402 cat conftest.$ac_ext >&5
14403 ac_cv_lib_bsd_strlcat=no
14404 fi
14405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14406 LIBS=$ac_check_lib_save_LIBS
14407 fi
14408 echo "$as_me:14408: result: $ac_cv_lib_bsd_strlcat" >&5
14409 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14410 if test $ac_cv_lib_bsd_strlcat = yes; then
14411
14412 cf_add_libs="-lbsd"
14413 # Filter out duplicates - this happens with badly-designed ".pc" files...
14414 for cf_add_1lib in $LIBS
14415 do
14416         for cf_add_2lib in $cf_add_libs
14417         do
14418                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14419                 then
14420                         cf_add_1lib=
14421                         break
14422                 fi
14423         done
14424         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14425 done
14426 LIBS="$cf_add_libs"
14427
14428 for ac_header in bsd/string.h
14429 do
14430 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14431 echo "$as_me:14431: checking for $ac_header" >&5
14432 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14433 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14434   echo $ECHO_N "(cached) $ECHO_C" >&6
14435 else
14436   cat >conftest.$ac_ext <<_ACEOF
14437 #line 14437 "configure"
14438 #include "confdefs.h"
14439 #include <$ac_header>
14440 _ACEOF
14441 if { (eval echo "$as_me:14441: \"$ac_cpp conftest.$ac_ext\"") >&5
14442   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14443   ac_status=$?
14444   egrep -v '^ *\+' conftest.er1 >conftest.err
14445   rm -f conftest.er1
14446   cat conftest.err >&5
14447   echo "$as_me:14447: \$? = $ac_status" >&5
14448   (exit $ac_status); } >/dev/null; then
14449   if test -s conftest.err; then
14450     ac_cpp_err=$ac_c_preproc_warn_flag
14451   else
14452     ac_cpp_err=
14453   fi
14454 else
14455   ac_cpp_err=yes
14456 fi
14457 if test -z "$ac_cpp_err"; then
14458   eval "$as_ac_Header=yes"
14459 else
14460   echo "$as_me: failed program was:" >&5
14461   cat conftest.$ac_ext >&5
14462   eval "$as_ac_Header=no"
14463 fi
14464 rm -f conftest.err conftest.$ac_ext
14465 fi
14466 echo "$as_me:14466: result: `eval echo '${'$as_ac_Header'}'`" >&5
14467 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14468 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14469   cat >>confdefs.h <<EOF
14470 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14471 EOF
14472
14473 fi
14474 done
14475
14476 cat >>confdefs.h <<\EOF
14477 #define HAVE_STRLCAT 1
14478 EOF
14479
14480 fi
14481
14482 fi
14483
14484 for ac_func in strlcpy snprintf
14485 do
14486 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14487 echo "$as_me:14487: checking for $ac_func" >&5
14488 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14489 if eval "test \"\${$as_ac_var+set}\" = set"; then
14490   echo $ECHO_N "(cached) $ECHO_C" >&6
14491 else
14492   cat >conftest.$ac_ext <<_ACEOF
14493 #line 14493 "configure"
14494 #include "confdefs.h"
14495 /* System header to define __stub macros and hopefully few prototypes,
14496     which can conflict with char $ac_func (); below.  */
14497 #include <assert.h>
14498 /* Override any gcc2 internal prototype to avoid an error.  */
14499 #ifdef __cplusplus
14500 extern "C"
14501 #endif
14502 /* We use char because int might match the return type of a gcc2
14503    builtin and then its argument prototype would still apply.  */
14504 char $ac_func ();
14505 char (*f) ();
14506
14507 int
14508 main (void)
14509 {
14510 /* The GNU C library defines this for functions which it implements
14511     to always fail with ENOSYS.  Some functions are actually named
14512     something starting with __ and the normal name is an alias.  */
14513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14514 choke me
14515 #else
14516 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14517 #endif
14518
14519   ;
14520   return 0;
14521 }
14522 _ACEOF
14523 rm -f conftest.$ac_objext conftest$ac_exeext
14524 if { (eval echo "$as_me:14524: \"$ac_link\"") >&5
14525   (eval $ac_link) 2>&5
14526   ac_status=$?
14527   echo "$as_me:14527: \$? = $ac_status" >&5
14528   (exit $ac_status); } &&
14529          { ac_try='test -s conftest$ac_exeext'
14530   { (eval echo "$as_me:14530: \"$ac_try\"") >&5
14531   (eval $ac_try) 2>&5
14532   ac_status=$?
14533   echo "$as_me:14533: \$? = $ac_status" >&5
14534   (exit $ac_status); }; }; then
14535   eval "$as_ac_var=yes"
14536 else
14537   echo "$as_me: failed program was:" >&5
14538 cat conftest.$ac_ext >&5
14539 eval "$as_ac_var=no"
14540 fi
14541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14542 fi
14543 echo "$as_me:14543: result: `eval echo '${'$as_ac_var'}'`" >&5
14544 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14545 if test `eval echo '${'$as_ac_var'}'` = yes; then
14546   cat >>confdefs.h <<EOF
14547 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14548 EOF
14549
14550 fi
14551 done
14552
14553 fi
14554
14555 ###     use option --enable-assertions to turn on generation of assertion code
14556 echo "$as_me:14556: checking if you want to enable runtime assertions" >&5
14557 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14558
14559 # Check whether --enable-assertions or --disable-assertions was given.
14560 if test "${enable_assertions+set}" = set; then
14561   enableval="$enable_assertions"
14562   with_assertions=$enableval
14563 else
14564   with_assertions=no
14565 fi;
14566 echo "$as_me:14566: result: $with_assertions" >&5
14567 echo "${ECHO_T}$with_assertions" >&6
14568 if test -n "$GCC"
14569 then
14570         if test "$with_assertions" = no
14571         then
14572                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14573         else
14574
14575         ADAFLAGS="$ADAFLAGS -gnata"
14576
14577         fi
14578 fi
14579
14580 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14581
14582 echo "$as_me:14582: checking if you want to use dmalloc for testing" >&5
14583 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14584
14585 # Check whether --with-dmalloc or --without-dmalloc was given.
14586 if test "${with_dmalloc+set}" = set; then
14587   withval="$with_dmalloc"
14588
14589 cat >>confdefs.h <<EOF
14590 #define USE_DMALLOC 1
14591 EOF
14592
14593         : ${with_cflags:=-g}
14594         : ${with_no_leaks:=yes}
14595          with_dmalloc=yes
14596 else
14597   with_dmalloc=
14598 fi;
14599 echo "$as_me:14599: result: ${with_dmalloc:-no}" >&5
14600 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14601
14602 case .$with_cflags in
14603 (.*-g*)
14604         case .$CFLAGS in
14605         (.*-g*)
14606                 ;;
14607         (*)
14608
14609 cf_fix_cppflags=no
14610 cf_new_cflags=
14611 cf_new_cppflags=
14612 cf_new_extra_cppflags=
14613
14614 for cf_add_cflags in -g
14615 do
14616 case $cf_fix_cppflags in
14617 (no)
14618         case $cf_add_cflags in
14619         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14620                 case $cf_add_cflags in
14621                 (-D*)
14622                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14623
14624                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14625                                 && test -z "${cf_tst_cflags}" \
14626                                 && cf_fix_cppflags=yes
14627
14628                         if test $cf_fix_cppflags = yes ; then
14629
14630         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14631         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14632
14633                                 continue
14634                         elif test "${cf_tst_cflags}" = "\"'" ; then
14635
14636         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14637         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14638
14639                                 continue
14640                         fi
14641                         ;;
14642                 esac
14643                 case "$CPPFLAGS" in
14644                 (*$cf_add_cflags)
14645                         ;;
14646                 (*)
14647                         case $cf_add_cflags in
14648                         (-D*)
14649                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14650
14651 CPPFLAGS=`echo "$CPPFLAGS" | \
14652         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14653                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14654
14655                                 ;;
14656                         esac
14657
14658         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14659         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14660
14661                         ;;
14662                 esac
14663                 ;;
14664         (*)
14665
14666         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14667         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14668
14669                 ;;
14670         esac
14671         ;;
14672 (yes)
14673
14674         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14675         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14676
14677         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14678
14679         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14680                 && test -z "${cf_tst_cflags}" \
14681                 && cf_fix_cppflags=no
14682         ;;
14683 esac
14684 done
14685
14686 if test -n "$cf_new_cflags" ; then
14687
14688         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14689         CFLAGS="${CFLAGS}$cf_new_cflags"
14690
14691 fi
14692
14693 if test -n "$cf_new_cppflags" ; then
14694
14695         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14696         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14697
14698 fi
14699
14700 if test -n "$cf_new_extra_cppflags" ; then
14701
14702         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14703         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14704
14705 fi
14706
14707                 ;;
14708         esac
14709         ;;
14710 esac
14711
14712 if test "$with_dmalloc" = yes ; then
14713         echo "$as_me:14713: checking for dmalloc.h" >&5
14714 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14715 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14716   echo $ECHO_N "(cached) $ECHO_C" >&6
14717 else
14718   cat >conftest.$ac_ext <<_ACEOF
14719 #line 14719 "configure"
14720 #include "confdefs.h"
14721 #include <dmalloc.h>
14722 _ACEOF
14723 if { (eval echo "$as_me:14723: \"$ac_cpp conftest.$ac_ext\"") >&5
14724   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14725   ac_status=$?
14726   egrep -v '^ *\+' conftest.er1 >conftest.err
14727   rm -f conftest.er1
14728   cat conftest.err >&5
14729   echo "$as_me:14729: \$? = $ac_status" >&5
14730   (exit $ac_status); } >/dev/null; then
14731   if test -s conftest.err; then
14732     ac_cpp_err=$ac_c_preproc_warn_flag
14733   else
14734     ac_cpp_err=
14735   fi
14736 else
14737   ac_cpp_err=yes
14738 fi
14739 if test -z "$ac_cpp_err"; then
14740   ac_cv_header_dmalloc_h=yes
14741 else
14742   echo "$as_me: failed program was:" >&5
14743   cat conftest.$ac_ext >&5
14744   ac_cv_header_dmalloc_h=no
14745 fi
14746 rm -f conftest.err conftest.$ac_ext
14747 fi
14748 echo "$as_me:14748: result: $ac_cv_header_dmalloc_h" >&5
14749 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14750 if test $ac_cv_header_dmalloc_h = yes; then
14751
14752 echo "$as_me:14752: checking for dmalloc_debug in -ldmalloc" >&5
14753 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14754 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14755   echo $ECHO_N "(cached) $ECHO_C" >&6
14756 else
14757   ac_check_lib_save_LIBS=$LIBS
14758 LIBS="-ldmalloc  $LIBS"
14759 cat >conftest.$ac_ext <<_ACEOF
14760 #line 14760 "configure"
14761 #include "confdefs.h"
14762
14763 /* Override any gcc2 internal prototype to avoid an error.  */
14764 #ifdef __cplusplus
14765 extern "C"
14766 #endif
14767 /* We use char because int might match the return type of a gcc2
14768    builtin and then its argument prototype would still apply.  */
14769 char dmalloc_debug ();
14770 int
14771 main (void)
14772 {
14773 dmalloc_debug ();
14774   ;
14775   return 0;
14776 }
14777 _ACEOF
14778 rm -f conftest.$ac_objext conftest$ac_exeext
14779 if { (eval echo "$as_me:14779: \"$ac_link\"") >&5
14780   (eval $ac_link) 2>&5
14781   ac_status=$?
14782   echo "$as_me:14782: \$? = $ac_status" >&5
14783   (exit $ac_status); } &&
14784          { ac_try='test -s conftest$ac_exeext'
14785   { (eval echo "$as_me:14785: \"$ac_try\"") >&5
14786   (eval $ac_try) 2>&5
14787   ac_status=$?
14788   echo "$as_me:14788: \$? = $ac_status" >&5
14789   (exit $ac_status); }; }; then
14790   ac_cv_lib_dmalloc_dmalloc_debug=yes
14791 else
14792   echo "$as_me: failed program was:" >&5
14793 cat conftest.$ac_ext >&5
14794 ac_cv_lib_dmalloc_dmalloc_debug=no
14795 fi
14796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14797 LIBS=$ac_check_lib_save_LIBS
14798 fi
14799 echo "$as_me:14799: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14800 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14801 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14802   cat >>confdefs.h <<EOF
14803 #define HAVE_LIBDMALLOC 1
14804 EOF
14805
14806   LIBS="-ldmalloc $LIBS"
14807
14808 fi
14809
14810 fi
14811
14812 fi
14813
14814 echo "$as_me:14814: checking if you want to use dbmalloc for testing" >&5
14815 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14816
14817 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14818 if test "${with_dbmalloc+set}" = set; then
14819   withval="$with_dbmalloc"
14820
14821 cat >>confdefs.h <<EOF
14822 #define USE_DBMALLOC 1
14823 EOF
14824
14825         : ${with_cflags:=-g}
14826         : ${with_no_leaks:=yes}
14827          with_dbmalloc=yes
14828 else
14829   with_dbmalloc=
14830 fi;
14831 echo "$as_me:14831: result: ${with_dbmalloc:-no}" >&5
14832 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14833
14834 case .$with_cflags in
14835 (.*-g*)
14836         case .$CFLAGS in
14837         (.*-g*)
14838                 ;;
14839         (*)
14840
14841 cf_fix_cppflags=no
14842 cf_new_cflags=
14843 cf_new_cppflags=
14844 cf_new_extra_cppflags=
14845
14846 for cf_add_cflags in -g
14847 do
14848 case $cf_fix_cppflags in
14849 (no)
14850         case $cf_add_cflags in
14851         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14852                 case $cf_add_cflags in
14853                 (-D*)
14854                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14855
14856                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14857                                 && test -z "${cf_tst_cflags}" \
14858                                 && cf_fix_cppflags=yes
14859
14860                         if test $cf_fix_cppflags = yes ; then
14861
14862         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14863         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14864
14865                                 continue
14866                         elif test "${cf_tst_cflags}" = "\"'" ; then
14867
14868         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14869         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14870
14871                                 continue
14872                         fi
14873                         ;;
14874                 esac
14875                 case "$CPPFLAGS" in
14876                 (*$cf_add_cflags)
14877                         ;;
14878                 (*)
14879                         case $cf_add_cflags in
14880                         (-D*)
14881                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14882
14883 CPPFLAGS=`echo "$CPPFLAGS" | \
14884         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14885                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14886
14887                                 ;;
14888                         esac
14889
14890         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14891         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14892
14893                         ;;
14894                 esac
14895                 ;;
14896         (*)
14897
14898         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14899         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14900
14901                 ;;
14902         esac
14903         ;;
14904 (yes)
14905
14906         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14907         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14908
14909         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14910
14911         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14912                 && test -z "${cf_tst_cflags}" \
14913                 && cf_fix_cppflags=no
14914         ;;
14915 esac
14916 done
14917
14918 if test -n "$cf_new_cflags" ; then
14919
14920         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14921         CFLAGS="${CFLAGS}$cf_new_cflags"
14922
14923 fi
14924
14925 if test -n "$cf_new_cppflags" ; then
14926
14927         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14928         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14929
14930 fi
14931
14932 if test -n "$cf_new_extra_cppflags" ; then
14933
14934         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14935         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14936
14937 fi
14938
14939                 ;;
14940         esac
14941         ;;
14942 esac
14943
14944 if test "$with_dbmalloc" = yes ; then
14945         echo "$as_me:14945: checking for dbmalloc.h" >&5
14946 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14947 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14948   echo $ECHO_N "(cached) $ECHO_C" >&6
14949 else
14950   cat >conftest.$ac_ext <<_ACEOF
14951 #line 14951 "configure"
14952 #include "confdefs.h"
14953 #include <dbmalloc.h>
14954 _ACEOF
14955 if { (eval echo "$as_me:14955: \"$ac_cpp conftest.$ac_ext\"") >&5
14956   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14957   ac_status=$?
14958   egrep -v '^ *\+' conftest.er1 >conftest.err
14959   rm -f conftest.er1
14960   cat conftest.err >&5
14961   echo "$as_me:14961: \$? = $ac_status" >&5
14962   (exit $ac_status); } >/dev/null; then
14963   if test -s conftest.err; then
14964     ac_cpp_err=$ac_c_preproc_warn_flag
14965   else
14966     ac_cpp_err=
14967   fi
14968 else
14969   ac_cpp_err=yes
14970 fi
14971 if test -z "$ac_cpp_err"; then
14972   ac_cv_header_dbmalloc_h=yes
14973 else
14974   echo "$as_me: failed program was:" >&5
14975   cat conftest.$ac_ext >&5
14976   ac_cv_header_dbmalloc_h=no
14977 fi
14978 rm -f conftest.err conftest.$ac_ext
14979 fi
14980 echo "$as_me:14980: result: $ac_cv_header_dbmalloc_h" >&5
14981 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14982 if test $ac_cv_header_dbmalloc_h = yes; then
14983
14984 echo "$as_me:14984: checking for debug_malloc in -ldbmalloc" >&5
14985 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14986 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14987   echo $ECHO_N "(cached) $ECHO_C" >&6
14988 else
14989   ac_check_lib_save_LIBS=$LIBS
14990 LIBS="-ldbmalloc  $LIBS"
14991 cat >conftest.$ac_ext <<_ACEOF
14992 #line 14992 "configure"
14993 #include "confdefs.h"
14994
14995 /* Override any gcc2 internal prototype to avoid an error.  */
14996 #ifdef __cplusplus
14997 extern "C"
14998 #endif
14999 /* We use char because int might match the return type of a gcc2
15000    builtin and then its argument prototype would still apply.  */
15001 char debug_malloc ();
15002 int
15003 main (void)
15004 {
15005 debug_malloc ();
15006   ;
15007   return 0;
15008 }
15009 _ACEOF
15010 rm -f conftest.$ac_objext conftest$ac_exeext
15011 if { (eval echo "$as_me:15011: \"$ac_link\"") >&5
15012   (eval $ac_link) 2>&5
15013   ac_status=$?
15014   echo "$as_me:15014: \$? = $ac_status" >&5
15015   (exit $ac_status); } &&
15016          { ac_try='test -s conftest$ac_exeext'
15017   { (eval echo "$as_me:15017: \"$ac_try\"") >&5
15018   (eval $ac_try) 2>&5
15019   ac_status=$?
15020   echo "$as_me:15020: \$? = $ac_status" >&5
15021   (exit $ac_status); }; }; then
15022   ac_cv_lib_dbmalloc_debug_malloc=yes
15023 else
15024   echo "$as_me: failed program was:" >&5
15025 cat conftest.$ac_ext >&5
15026 ac_cv_lib_dbmalloc_debug_malloc=no
15027 fi
15028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15029 LIBS=$ac_check_lib_save_LIBS
15030 fi
15031 echo "$as_me:15031: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
15032 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
15033 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
15034   cat >>confdefs.h <<EOF
15035 #define HAVE_LIBDBMALLOC 1
15036 EOF
15037
15038   LIBS="-ldbmalloc $LIBS"
15039
15040 fi
15041
15042 fi
15043
15044 fi
15045
15046 echo "$as_me:15046: checking if you want to use valgrind for testing" >&5
15047 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
15048
15049 # Check whether --with-valgrind or --without-valgrind was given.
15050 if test "${with_valgrind+set}" = set; then
15051   withval="$with_valgrind"
15052
15053 cat >>confdefs.h <<EOF
15054 #define USE_VALGRIND 1
15055 EOF
15056
15057         : ${with_cflags:=-g}
15058         : ${with_no_leaks:=yes}
15059          with_valgrind=yes
15060 else
15061   with_valgrind=
15062 fi;
15063 echo "$as_me:15063: result: ${with_valgrind:-no}" >&5
15064 echo "${ECHO_T}${with_valgrind:-no}" >&6
15065
15066 case .$with_cflags in
15067 (.*-g*)
15068         case .$CFLAGS in
15069         (.*-g*)
15070                 ;;
15071         (*)
15072
15073 cf_fix_cppflags=no
15074 cf_new_cflags=
15075 cf_new_cppflags=
15076 cf_new_extra_cppflags=
15077
15078 for cf_add_cflags in -g
15079 do
15080 case $cf_fix_cppflags in
15081 (no)
15082         case $cf_add_cflags in
15083         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15084                 case $cf_add_cflags in
15085                 (-D*)
15086                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15087
15088                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15089                                 && test -z "${cf_tst_cflags}" \
15090                                 && cf_fix_cppflags=yes
15091
15092                         if test $cf_fix_cppflags = yes ; then
15093
15094         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15095         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15096
15097                                 continue
15098                         elif test "${cf_tst_cflags}" = "\"'" ; then
15099
15100         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15101         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15102
15103                                 continue
15104                         fi
15105                         ;;
15106                 esac
15107                 case "$CPPFLAGS" in
15108                 (*$cf_add_cflags)
15109                         ;;
15110                 (*)
15111                         case $cf_add_cflags in
15112                         (-D*)
15113                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15114
15115 CPPFLAGS=`echo "$CPPFLAGS" | \
15116         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15117                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15118
15119                                 ;;
15120                         esac
15121
15122         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15123         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15124
15125                         ;;
15126                 esac
15127                 ;;
15128         (*)
15129
15130         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15131         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15132
15133                 ;;
15134         esac
15135         ;;
15136 (yes)
15137
15138         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15139         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15140
15141         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15142
15143         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15144                 && test -z "${cf_tst_cflags}" \
15145                 && cf_fix_cppflags=no
15146         ;;
15147 esac
15148 done
15149
15150 if test -n "$cf_new_cflags" ; then
15151
15152         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15153         CFLAGS="${CFLAGS}$cf_new_cflags"
15154
15155 fi
15156
15157 if test -n "$cf_new_cppflags" ; then
15158
15159         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15160         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15161
15162 fi
15163
15164 if test -n "$cf_new_extra_cppflags" ; then
15165
15166         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15167         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15168
15169 fi
15170
15171                 ;;
15172         esac
15173         ;;
15174 esac
15175
15176 echo "$as_me:15176: checking if you want to perform memory-leak testing" >&5
15177 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
15178
15179 # Check whether --enable-leaks or --disable-leaks was given.
15180 if test "${enable_leaks+set}" = set; then
15181   enableval="$enable_leaks"
15182   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
15183 else
15184   : ${with_no_leaks:=no}
15185 fi;
15186 echo "$as_me:15186: result: $with_no_leaks" >&5
15187 echo "${ECHO_T}$with_no_leaks" >&6
15188
15189 if test "$with_no_leaks" = yes ; then
15190
15191 cat >>confdefs.h <<\EOF
15192 #define NO_LEAKS 1
15193 EOF
15194
15195 cat >>confdefs.h <<\EOF
15196 #define YY_NO_LEAKS 1
15197 EOF
15198
15199 fi
15200
15201 cat >>confdefs.h <<\EOF
15202 #define HAVE_NC_ALLOC_H 1
15203 EOF
15204
15205 ###     use option --enable-expanded to generate certain macros as functions
15206
15207 # Check whether --enable-expanded or --disable-expanded was given.
15208 if test "${enable_expanded+set}" = set; then
15209   enableval="$enable_expanded"
15210   test "x$enableval" = xyes &&
15211 cat >>confdefs.h <<\EOF
15212 #define NCURSES_EXPANDED 1
15213 EOF
15214
15215 fi;
15216
15217 ###     use option --disable-macros to suppress macros in favor of functions
15218
15219 # Check whether --enable-macros or --disable-macros was given.
15220 if test "${enable_macros+set}" = set; then
15221   enableval="$enable_macros"
15222   test "$enableval" = no &&
15223 cat >>confdefs.h <<\EOF
15224 #define NCURSES_NOMACROS 1
15225 EOF
15226
15227 fi;
15228
15229 # Normally we only add trace() to the debug-library.  Allow this to be
15230 # extended to all models of the ncurses library:
15231 cf_all_traces=no
15232 case "$CFLAGS $CPPFLAGS" in
15233 (*-DTRACE*)
15234         cf_all_traces=yes
15235         ;;
15236 esac
15237
15238 echo "$as_me:15238: checking whether to add trace feature to all models" >&5
15239 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15240
15241 # Check whether --with-trace or --without-trace was given.
15242 if test "${with_trace+set}" = set; then
15243   withval="$with_trace"
15244   cf_with_trace=$withval
15245 else
15246   cf_with_trace=$cf_all_traces
15247 fi;
15248 echo "$as_me:15248: result: $cf_with_trace" >&5
15249 echo "${ECHO_T}$cf_with_trace" >&6
15250
15251 if test "x$cf_with_trace" = xyes ; then
15252         LIB_TRACING=all
15253         ADA_TRACE=TRUE
15254
15255 cf_fix_cppflags=no
15256 cf_new_cflags=
15257 cf_new_cppflags=
15258 cf_new_extra_cppflags=
15259
15260 for cf_add_cflags in -DTRACE
15261 do
15262 case $cf_fix_cppflags in
15263 (no)
15264         case $cf_add_cflags in
15265         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15266                 case $cf_add_cflags in
15267                 (-D*)
15268                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15269
15270                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15271                                 && test -z "${cf_tst_cflags}" \
15272                                 && cf_fix_cppflags=yes
15273
15274                         if test $cf_fix_cppflags = yes ; then
15275
15276         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15277         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15278
15279                                 continue
15280                         elif test "${cf_tst_cflags}" = "\"'" ; then
15281
15282         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15283         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15284
15285                                 continue
15286                         fi
15287                         ;;
15288                 esac
15289                 case "$CPPFLAGS" in
15290                 (*$cf_add_cflags)
15291                         ;;
15292                 (*)
15293                         case $cf_add_cflags in
15294                         (-D*)
15295                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15296
15297 CPPFLAGS=`echo "$CPPFLAGS" | \
15298         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15299                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15300
15301                                 ;;
15302                         esac
15303
15304         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15305         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15306
15307                         ;;
15308                 esac
15309                 ;;
15310         (*)
15311
15312         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15313         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15314
15315                 ;;
15316         esac
15317         ;;
15318 (yes)
15319
15320         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15321         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15322
15323         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15324
15325         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15326                 && test -z "${cf_tst_cflags}" \
15327                 && cf_fix_cppflags=no
15328         ;;
15329 esac
15330 done
15331
15332 if test -n "$cf_new_cflags" ; then
15333
15334         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15335         CFLAGS="${CFLAGS}$cf_new_cflags"
15336
15337 fi
15338
15339 if test -n "$cf_new_cppflags" ; then
15340
15341         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15342         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15343
15344 fi
15345
15346 if test -n "$cf_new_extra_cppflags" ; then
15347
15348         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15349         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15350
15351 fi
15352
15353 cat >>confdefs.h <<\EOF
15354 #define HAVE__TRACEF 1
15355 EOF
15356
15357 else
15358         LIB_TRACING=DEBUG
15359         ADA_TRACE=FALSE
15360 fi
15361
15362 echo "$as_me:15362: checking if we want to use GNAT projects" >&5
15363 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15364
15365 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15366 if test "${enable_gnat_projects+set}" = set; then
15367   enableval="$enable_gnat_projects"
15368   test "$enableval" != no && enableval=yes
15369         if test "$enableval" != "yes" ; then
15370     enable_gnat_projects=no
15371         else
15372                 enable_gnat_projects=yes
15373         fi
15374 else
15375   enableval=yes
15376         enable_gnat_projects=yes
15377
15378 fi;
15379 echo "$as_me:15379: result: $enable_gnat_projects" >&5
15380 echo "${ECHO_T}$enable_gnat_projects" >&6
15381
15382 ###     Checks for libraries.
15383 case $cf_cv_system_name in
15384 (*mingw32*|*mingw64*)
15385         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15386         LIBS=" -lpsapi $LIBS"
15387         ;;
15388 (*)
15389 echo "$as_me:15389: checking for gettimeofday" >&5
15390 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15391 if test "${ac_cv_func_gettimeofday+set}" = set; then
15392   echo $ECHO_N "(cached) $ECHO_C" >&6
15393 else
15394   cat >conftest.$ac_ext <<_ACEOF
15395 #line 15395 "configure"
15396 #include "confdefs.h"
15397 /* System header to define __stub macros and hopefully few prototypes,
15398     which can conflict with char gettimeofday (); below.  */
15399 #include <assert.h>
15400 /* Override any gcc2 internal prototype to avoid an error.  */
15401 #ifdef __cplusplus
15402 extern "C"
15403 #endif
15404 /* We use char because int might match the return type of a gcc2
15405    builtin and then its argument prototype would still apply.  */
15406 char gettimeofday ();
15407 char (*f) ();
15408
15409 int
15410 main (void)
15411 {
15412 /* The GNU C library defines this for functions which it implements
15413     to always fail with ENOSYS.  Some functions are actually named
15414     something starting with __ and the normal name is an alias.  */
15415 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15416 choke me
15417 #else
15418 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15419 #endif
15420
15421   ;
15422   return 0;
15423 }
15424 _ACEOF
15425 rm -f conftest.$ac_objext conftest$ac_exeext
15426 if { (eval echo "$as_me:15426: \"$ac_link\"") >&5
15427   (eval $ac_link) 2>&5
15428   ac_status=$?
15429   echo "$as_me:15429: \$? = $ac_status" >&5
15430   (exit $ac_status); } &&
15431          { ac_try='test -s conftest$ac_exeext'
15432   { (eval echo "$as_me:15432: \"$ac_try\"") >&5
15433   (eval $ac_try) 2>&5
15434   ac_status=$?
15435   echo "$as_me:15435: \$? = $ac_status" >&5
15436   (exit $ac_status); }; }; then
15437   ac_cv_func_gettimeofday=yes
15438 else
15439   echo "$as_me: failed program was:" >&5
15440 cat conftest.$ac_ext >&5
15441 ac_cv_func_gettimeofday=no
15442 fi
15443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15444 fi
15445 echo "$as_me:15445: result: $ac_cv_func_gettimeofday" >&5
15446 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15447 if test $ac_cv_func_gettimeofday = yes; then
15448
15449 cat >>confdefs.h <<\EOF
15450 #define HAVE_GETTIMEOFDAY 1
15451 EOF
15452
15453 else
15454
15455 echo "$as_me:15455: checking for gettimeofday in -lbsd" >&5
15456 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15457 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15458   echo $ECHO_N "(cached) $ECHO_C" >&6
15459 else
15460   ac_check_lib_save_LIBS=$LIBS
15461 LIBS="-lbsd  $LIBS"
15462 cat >conftest.$ac_ext <<_ACEOF
15463 #line 15463 "configure"
15464 #include "confdefs.h"
15465
15466 /* Override any gcc2 internal prototype to avoid an error.  */
15467 #ifdef __cplusplus
15468 extern "C"
15469 #endif
15470 /* We use char because int might match the return type of a gcc2
15471    builtin and then its argument prototype would still apply.  */
15472 char gettimeofday ();
15473 int
15474 main (void)
15475 {
15476 gettimeofday ();
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   ac_cv_lib_bsd_gettimeofday=yes
15494 else
15495   echo "$as_me: failed program was:" >&5
15496 cat conftest.$ac_ext >&5
15497 ac_cv_lib_bsd_gettimeofday=no
15498 fi
15499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15500 LIBS=$ac_check_lib_save_LIBS
15501 fi
15502 echo "$as_me:15502: result: $ac_cv_lib_bsd_gettimeofday" >&5
15503 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15504 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15505
15506 cat >>confdefs.h <<\EOF
15507 #define HAVE_GETTIMEOFDAY 1
15508 EOF
15509
15510 cf_add_libs="-lbsd"
15511 # Filter out duplicates - this happens with badly-designed ".pc" files...
15512 for cf_add_1lib in $LIBS
15513 do
15514         for cf_add_2lib in $cf_add_libs
15515         do
15516                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15517                 then
15518                         cf_add_1lib=
15519                         break
15520                 fi
15521         done
15522         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15523 done
15524 LIBS="$cf_add_libs"
15525
15526 fi
15527
15528 fi
15529         ;;
15530 esac
15531
15532 echo "$as_me:15532: checking if -lm needed for math functions" >&5
15533 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15534 if test "${cf_cv_need_libm+set}" = set; then
15535   echo $ECHO_N "(cached) $ECHO_C" >&6
15536 else
15537
15538         cat >conftest.$ac_ext <<_ACEOF
15539 #line 15539 "configure"
15540 #include "confdefs.h"
15541
15542         #include <stdio.h>
15543         #include <stdlib.h>
15544         #include <math.h>
15545
15546 int
15547 main (void)
15548 {
15549 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15550   ;
15551   return 0;
15552 }
15553 _ACEOF
15554 rm -f conftest.$ac_objext conftest$ac_exeext
15555 if { (eval echo "$as_me:15555: \"$ac_link\"") >&5
15556   (eval $ac_link) 2>&5
15557   ac_status=$?
15558   echo "$as_me:15558: \$? = $ac_status" >&5
15559   (exit $ac_status); } &&
15560          { ac_try='test -s conftest$ac_exeext'
15561   { (eval echo "$as_me:15561: \"$ac_try\"") >&5
15562   (eval $ac_try) 2>&5
15563   ac_status=$?
15564   echo "$as_me:15564: \$? = $ac_status" >&5
15565   (exit $ac_status); }; }; then
15566   cf_cv_need_libm=no
15567 else
15568   echo "$as_me: failed program was:" >&5
15569 cat conftest.$ac_ext >&5
15570 cf_cv_need_libm=yes
15571 fi
15572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15573 fi
15574 echo "$as_me:15574: result: $cf_cv_need_libm" >&5
15575 echo "${ECHO_T}$cf_cv_need_libm" >&6
15576 if test "$cf_cv_need_libm" = yes
15577 then
15578 MATH_LIB=-lm
15579 fi
15580
15581 ###     Checks for header files.
15582 echo "$as_me:15582: checking for ANSI C header files" >&5
15583 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15584 if test "${ac_cv_header_stdc+set}" = set; then
15585   echo $ECHO_N "(cached) $ECHO_C" >&6
15586 else
15587   cat >conftest.$ac_ext <<_ACEOF
15588 #line 15588 "configure"
15589 #include "confdefs.h"
15590 #include <stdlib.h>
15591 #include <stdarg.h>
15592 #include <string.h>
15593 #include <float.h>
15594
15595 _ACEOF
15596 if { (eval echo "$as_me:15596: \"$ac_cpp conftest.$ac_ext\"") >&5
15597   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15598   ac_status=$?
15599   egrep -v '^ *\+' conftest.er1 >conftest.err
15600   rm -f conftest.er1
15601   cat conftest.err >&5
15602   echo "$as_me:15602: \$? = $ac_status" >&5
15603   (exit $ac_status); } >/dev/null; then
15604   if test -s conftest.err; then
15605     ac_cpp_err=$ac_c_preproc_warn_flag
15606   else
15607     ac_cpp_err=
15608   fi
15609 else
15610   ac_cpp_err=yes
15611 fi
15612 if test -z "$ac_cpp_err"; then
15613   ac_cv_header_stdc=yes
15614 else
15615   echo "$as_me: failed program was:" >&5
15616   cat conftest.$ac_ext >&5
15617   ac_cv_header_stdc=no
15618 fi
15619 rm -f conftest.err conftest.$ac_ext
15620
15621 if test $ac_cv_header_stdc = yes; then
15622   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15623   cat >conftest.$ac_ext <<_ACEOF
15624 #line 15624 "configure"
15625 #include "confdefs.h"
15626 #include <string.h>
15627
15628 _ACEOF
15629 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15630   egrep "memchr" >/dev/null 2>&1; then
15631   :
15632 else
15633   ac_cv_header_stdc=no
15634 fi
15635 rm -rf conftest*
15636
15637 fi
15638
15639 if test $ac_cv_header_stdc = yes; then
15640   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15641   cat >conftest.$ac_ext <<_ACEOF
15642 #line 15642 "configure"
15643 #include "confdefs.h"
15644 #include <stdlib.h>
15645
15646 _ACEOF
15647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15648   egrep "free" >/dev/null 2>&1; then
15649   :
15650 else
15651   ac_cv_header_stdc=no
15652 fi
15653 rm -rf conftest*
15654
15655 fi
15656
15657 if test $ac_cv_header_stdc = yes; then
15658   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15659   if test "$cross_compiling" = yes; then
15660   :
15661 else
15662   cat >conftest.$ac_ext <<_ACEOF
15663 #line 15663 "configure"
15664 #include "confdefs.h"
15665 #include <ctype.h>
15666 #if ((' ' & 0x0FF) == 0x020)
15667 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15668 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15669 #else
15670 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15671                      || ('j' <= (c) && (c) <= 'r') \
15672                      || ('s' <= (c) && (c) <= 'z'))
15673 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15674 #endif
15675
15676 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15677 int
15678 main (void)
15679 {
15680   int i;
15681   for (i = 0; i < 256; i++)
15682     if (XOR (islower (i), ISLOWER (i))
15683         || toupper (i) != TOUPPER (i))
15684       $ac_main_return(2);
15685   $ac_main_return (0);
15686 }
15687 _ACEOF
15688 rm -f conftest$ac_exeext
15689 if { (eval echo "$as_me:15689: \"$ac_link\"") >&5
15690   (eval $ac_link) 2>&5
15691   ac_status=$?
15692   echo "$as_me:15692: \$? = $ac_status" >&5
15693   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15694   { (eval echo "$as_me:15694: \"$ac_try\"") >&5
15695   (eval $ac_try) 2>&5
15696   ac_status=$?
15697   echo "$as_me:15697: \$? = $ac_status" >&5
15698   (exit $ac_status); }; }; then
15699   :
15700 else
15701   echo "$as_me: program exited with status $ac_status" >&5
15702 echo "$as_me: failed program was:" >&5
15703 cat conftest.$ac_ext >&5
15704 ac_cv_header_stdc=no
15705 fi
15706 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15707 fi
15708 fi
15709 fi
15710 echo "$as_me:15710: result: $ac_cv_header_stdc" >&5
15711 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15712 if test $ac_cv_header_stdc = yes; then
15713
15714 cat >>confdefs.h <<\EOF
15715 #define STDC_HEADERS 1
15716 EOF
15717
15718 fi
15719
15720 ac_header_dirent=no
15721 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15722   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15723 echo "$as_me:15723: checking for $ac_hdr that defines DIR" >&5
15724 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15725 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15726   echo $ECHO_N "(cached) $ECHO_C" >&6
15727 else
15728   cat >conftest.$ac_ext <<_ACEOF
15729 #line 15729 "configure"
15730 #include "confdefs.h"
15731 #include <sys/types.h>
15732 #include <$ac_hdr>
15733
15734 int
15735 main (void)
15736 {
15737 if ((DIR *) 0)
15738 return 0;
15739   ;
15740   return 0;
15741 }
15742 _ACEOF
15743 rm -f conftest.$ac_objext
15744 if { (eval echo "$as_me:15744: \"$ac_compile\"") >&5
15745   (eval $ac_compile) 2>&5
15746   ac_status=$?
15747   echo "$as_me:15747: \$? = $ac_status" >&5
15748   (exit $ac_status); } &&
15749          { ac_try='test -s conftest.$ac_objext'
15750   { (eval echo "$as_me:15750: \"$ac_try\"") >&5
15751   (eval $ac_try) 2>&5
15752   ac_status=$?
15753   echo "$as_me:15753: \$? = $ac_status" >&5
15754   (exit $ac_status); }; }; then
15755   eval "$as_ac_Header=yes"
15756 else
15757   echo "$as_me: failed program was:" >&5
15758 cat conftest.$ac_ext >&5
15759 eval "$as_ac_Header=no"
15760 fi
15761 rm -f conftest.$ac_objext conftest.$ac_ext
15762 fi
15763 echo "$as_me:15763: result: `eval echo '${'$as_ac_Header'}'`" >&5
15764 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15765 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15766   cat >>confdefs.h <<EOF
15767 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15768 EOF
15769
15770 ac_header_dirent=$ac_hdr; break
15771 fi
15772
15773 done
15774 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15775 if test $ac_header_dirent = dirent.h; then
15776   echo "$as_me:15776: checking for opendir in -ldir" >&5
15777 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15778 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15779   echo $ECHO_N "(cached) $ECHO_C" >&6
15780 else
15781   ac_check_lib_save_LIBS=$LIBS
15782 LIBS="-ldir  $LIBS"
15783 cat >conftest.$ac_ext <<_ACEOF
15784 #line 15784 "configure"
15785 #include "confdefs.h"
15786
15787 /* Override any gcc2 internal prototype to avoid an error.  */
15788 #ifdef __cplusplus
15789 extern "C"
15790 #endif
15791 /* We use char because int might match the return type of a gcc2
15792    builtin and then its argument prototype would still apply.  */
15793 char opendir ();
15794 int
15795 main (void)
15796 {
15797 opendir ();
15798   ;
15799   return 0;
15800 }
15801 _ACEOF
15802 rm -f conftest.$ac_objext conftest$ac_exeext
15803 if { (eval echo "$as_me:15803: \"$ac_link\"") >&5
15804   (eval $ac_link) 2>&5
15805   ac_status=$?
15806   echo "$as_me:15806: \$? = $ac_status" >&5
15807   (exit $ac_status); } &&
15808          { ac_try='test -s conftest$ac_exeext'
15809   { (eval echo "$as_me:15809: \"$ac_try\"") >&5
15810   (eval $ac_try) 2>&5
15811   ac_status=$?
15812   echo "$as_me:15812: \$? = $ac_status" >&5
15813   (exit $ac_status); }; }; then
15814   ac_cv_lib_dir_opendir=yes
15815 else
15816   echo "$as_me: failed program was:" >&5
15817 cat conftest.$ac_ext >&5
15818 ac_cv_lib_dir_opendir=no
15819 fi
15820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15821 LIBS=$ac_check_lib_save_LIBS
15822 fi
15823 echo "$as_me:15823: result: $ac_cv_lib_dir_opendir" >&5
15824 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15825 if test $ac_cv_lib_dir_opendir = yes; then
15826   LIBS="$LIBS -ldir"
15827 fi
15828
15829 else
15830   echo "$as_me:15830: checking for opendir in -lx" >&5
15831 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15832 if test "${ac_cv_lib_x_opendir+set}" = set; then
15833   echo $ECHO_N "(cached) $ECHO_C" >&6
15834 else
15835   ac_check_lib_save_LIBS=$LIBS
15836 LIBS="-lx  $LIBS"
15837 cat >conftest.$ac_ext <<_ACEOF
15838 #line 15838 "configure"
15839 #include "confdefs.h"
15840
15841 /* Override any gcc2 internal prototype to avoid an error.  */
15842 #ifdef __cplusplus
15843 extern "C"
15844 #endif
15845 /* We use char because int might match the return type of a gcc2
15846    builtin and then its argument prototype would still apply.  */
15847 char opendir ();
15848 int
15849 main (void)
15850 {
15851 opendir ();
15852   ;
15853   return 0;
15854 }
15855 _ACEOF
15856 rm -f conftest.$ac_objext conftest$ac_exeext
15857 if { (eval echo "$as_me:15857: \"$ac_link\"") >&5
15858   (eval $ac_link) 2>&5
15859   ac_status=$?
15860   echo "$as_me:15860: \$? = $ac_status" >&5
15861   (exit $ac_status); } &&
15862          { ac_try='test -s conftest$ac_exeext'
15863   { (eval echo "$as_me:15863: \"$ac_try\"") >&5
15864   (eval $ac_try) 2>&5
15865   ac_status=$?
15866   echo "$as_me:15866: \$? = $ac_status" >&5
15867   (exit $ac_status); }; }; then
15868   ac_cv_lib_x_opendir=yes
15869 else
15870   echo "$as_me: failed program was:" >&5
15871 cat conftest.$ac_ext >&5
15872 ac_cv_lib_x_opendir=no
15873 fi
15874 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15875 LIBS=$ac_check_lib_save_LIBS
15876 fi
15877 echo "$as_me:15877: result: $ac_cv_lib_x_opendir" >&5
15878 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15879 if test $ac_cv_lib_x_opendir = yes; then
15880   LIBS="$LIBS -lx"
15881 fi
15882
15883 fi
15884
15885 echo "$as_me:15885: checking whether time.h and sys/time.h may both be included" >&5
15886 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15887 if test "${ac_cv_header_time+set}" = set; then
15888   echo $ECHO_N "(cached) $ECHO_C" >&6
15889 else
15890   cat >conftest.$ac_ext <<_ACEOF
15891 #line 15891 "configure"
15892 #include "confdefs.h"
15893 #include <sys/types.h>
15894 #include <sys/time.h>
15895 #include <time.h>
15896
15897 int
15898 main (void)
15899 {
15900 if ((struct tm *) 0)
15901 return 0;
15902   ;
15903   return 0;
15904 }
15905 _ACEOF
15906 rm -f conftest.$ac_objext
15907 if { (eval echo "$as_me:15907: \"$ac_compile\"") >&5
15908   (eval $ac_compile) 2>&5
15909   ac_status=$?
15910   echo "$as_me:15910: \$? = $ac_status" >&5
15911   (exit $ac_status); } &&
15912          { ac_try='test -s conftest.$ac_objext'
15913   { (eval echo "$as_me:15913: \"$ac_try\"") >&5
15914   (eval $ac_try) 2>&5
15915   ac_status=$?
15916   echo "$as_me:15916: \$? = $ac_status" >&5
15917   (exit $ac_status); }; }; then
15918   ac_cv_header_time=yes
15919 else
15920   echo "$as_me: failed program was:" >&5
15921 cat conftest.$ac_ext >&5
15922 ac_cv_header_time=no
15923 fi
15924 rm -f conftest.$ac_objext conftest.$ac_ext
15925 fi
15926 echo "$as_me:15926: result: $ac_cv_header_time" >&5
15927 echo "${ECHO_T}$ac_cv_header_time" >&6
15928 if test $ac_cv_header_time = yes; then
15929
15930 cat >>confdefs.h <<\EOF
15931 #define TIME_WITH_SYS_TIME 1
15932 EOF
15933
15934 fi
15935
15936 cf_regex_func=no
15937
15938 cf_regex_libs="regex re"
15939 case $host_os in
15940 (mingw*)
15941         cf_regex_libs="gnurx $cf_regex_libs"
15942         ;;
15943 esac
15944
15945 echo "$as_me:15945: checking for regcomp" >&5
15946 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15947 if test "${ac_cv_func_regcomp+set}" = set; then
15948   echo $ECHO_N "(cached) $ECHO_C" >&6
15949 else
15950   cat >conftest.$ac_ext <<_ACEOF
15951 #line 15951 "configure"
15952 #include "confdefs.h"
15953 /* System header to define __stub macros and hopefully few prototypes,
15954     which can conflict with char regcomp (); below.  */
15955 #include <assert.h>
15956 /* Override any gcc2 internal prototype to avoid an error.  */
15957 #ifdef __cplusplus
15958 extern "C"
15959 #endif
15960 /* We use char because int might match the return type of a gcc2
15961    builtin and then its argument prototype would still apply.  */
15962 char regcomp ();
15963 char (*f) ();
15964
15965 int
15966 main (void)
15967 {
15968 /* The GNU C library defines this for functions which it implements
15969     to always fail with ENOSYS.  Some functions are actually named
15970     something starting with __ and the normal name is an alias.  */
15971 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15972 choke me
15973 #else
15974 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15975 #endif
15976
15977   ;
15978   return 0;
15979 }
15980 _ACEOF
15981 rm -f conftest.$ac_objext conftest$ac_exeext
15982 if { (eval echo "$as_me:15982: \"$ac_link\"") >&5
15983   (eval $ac_link) 2>&5
15984   ac_status=$?
15985   echo "$as_me:15985: \$? = $ac_status" >&5
15986   (exit $ac_status); } &&
15987          { ac_try='test -s conftest$ac_exeext'
15988   { (eval echo "$as_me:15988: \"$ac_try\"") >&5
15989   (eval $ac_try) 2>&5
15990   ac_status=$?
15991   echo "$as_me:15991: \$? = $ac_status" >&5
15992   (exit $ac_status); }; }; then
15993   ac_cv_func_regcomp=yes
15994 else
15995   echo "$as_me: failed program was:" >&5
15996 cat conftest.$ac_ext >&5
15997 ac_cv_func_regcomp=no
15998 fi
15999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16000 fi
16001 echo "$as_me:16001: result: $ac_cv_func_regcomp" >&5
16002 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
16003 if test $ac_cv_func_regcomp = yes; then
16004   cf_regex_func=regcomp
16005 else
16006
16007         for cf_regex_lib in $cf_regex_libs
16008         do
16009                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
16010 echo "$as_me:16010: checking for regcomp in -l$cf_regex_lib" >&5
16011 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
16012 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16013   echo $ECHO_N "(cached) $ECHO_C" >&6
16014 else
16015   ac_check_lib_save_LIBS=$LIBS
16016 LIBS="-l$cf_regex_lib  $LIBS"
16017 cat >conftest.$ac_ext <<_ACEOF
16018 #line 16018 "configure"
16019 #include "confdefs.h"
16020
16021 /* Override any gcc2 internal prototype to avoid an error.  */
16022 #ifdef __cplusplus
16023 extern "C"
16024 #endif
16025 /* We use char because int might match the return type of a gcc2
16026    builtin and then its argument prototype would still apply.  */
16027 char regcomp ();
16028 int
16029 main (void)
16030 {
16031 regcomp ();
16032   ;
16033   return 0;
16034 }
16035 _ACEOF
16036 rm -f conftest.$ac_objext conftest$ac_exeext
16037 if { (eval echo "$as_me:16037: \"$ac_link\"") >&5
16038   (eval $ac_link) 2>&5
16039   ac_status=$?
16040   echo "$as_me:16040: \$? = $ac_status" >&5
16041   (exit $ac_status); } &&
16042          { ac_try='test -s conftest$ac_exeext'
16043   { (eval echo "$as_me:16043: \"$ac_try\"") >&5
16044   (eval $ac_try) 2>&5
16045   ac_status=$?
16046   echo "$as_me:16046: \$? = $ac_status" >&5
16047   (exit $ac_status); }; }; then
16048   eval "$as_ac_Lib=yes"
16049 else
16050   echo "$as_me: failed program was:" >&5
16051 cat conftest.$ac_ext >&5
16052 eval "$as_ac_Lib=no"
16053 fi
16054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16055 LIBS=$ac_check_lib_save_LIBS
16056 fi
16057 echo "$as_me:16057: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16058 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16059 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16060
16061 cf_add_libs="-l$cf_regex_lib"
16062 # Filter out duplicates - this happens with badly-designed ".pc" files...
16063 for cf_add_1lib in $LIBS
16064 do
16065         for cf_add_2lib in $cf_add_libs
16066         do
16067                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16068                 then
16069                         cf_add_1lib=
16070                         break
16071                 fi
16072         done
16073         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16074 done
16075 LIBS="$cf_add_libs"
16076
16077                                 cf_regex_func=regcomp
16078                                 break
16079 fi
16080
16081         done
16082
16083 fi
16084
16085 if test "$cf_regex_func" = no ; then
16086         echo "$as_me:16086: checking for compile" >&5
16087 echo $ECHO_N "checking for compile... $ECHO_C" >&6
16088 if test "${ac_cv_func_compile+set}" = set; then
16089   echo $ECHO_N "(cached) $ECHO_C" >&6
16090 else
16091   cat >conftest.$ac_ext <<_ACEOF
16092 #line 16092 "configure"
16093 #include "confdefs.h"
16094 /* System header to define __stub macros and hopefully few prototypes,
16095     which can conflict with char compile (); below.  */
16096 #include <assert.h>
16097 /* Override any gcc2 internal prototype to avoid an error.  */
16098 #ifdef __cplusplus
16099 extern "C"
16100 #endif
16101 /* We use char because int might match the return type of a gcc2
16102    builtin and then its argument prototype would still apply.  */
16103 char compile ();
16104 char (*f) ();
16105
16106 int
16107 main (void)
16108 {
16109 /* The GNU C library defines this for functions which it implements
16110     to always fail with ENOSYS.  Some functions are actually named
16111     something starting with __ and the normal name is an alias.  */
16112 #if defined (__stub_compile) || defined (__stub___compile)
16113 choke me
16114 #else
16115 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16116 #endif
16117
16118   ;
16119   return 0;
16120 }
16121 _ACEOF
16122 rm -f conftest.$ac_objext conftest$ac_exeext
16123 if { (eval echo "$as_me:16123: \"$ac_link\"") >&5
16124   (eval $ac_link) 2>&5
16125   ac_status=$?
16126   echo "$as_me:16126: \$? = $ac_status" >&5
16127   (exit $ac_status); } &&
16128          { ac_try='test -s conftest$ac_exeext'
16129   { (eval echo "$as_me:16129: \"$ac_try\"") >&5
16130   (eval $ac_try) 2>&5
16131   ac_status=$?
16132   echo "$as_me:16132: \$? = $ac_status" >&5
16133   (exit $ac_status); }; }; then
16134   ac_cv_func_compile=yes
16135 else
16136   echo "$as_me: failed program was:" >&5
16137 cat conftest.$ac_ext >&5
16138 ac_cv_func_compile=no
16139 fi
16140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16141 fi
16142 echo "$as_me:16142: result: $ac_cv_func_compile" >&5
16143 echo "${ECHO_T}$ac_cv_func_compile" >&6
16144 if test $ac_cv_func_compile = yes; then
16145   cf_regex_func=compile
16146 else
16147
16148                 echo "$as_me:16148: checking for compile in -lgen" >&5
16149 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16150 if test "${ac_cv_lib_gen_compile+set}" = set; then
16151   echo $ECHO_N "(cached) $ECHO_C" >&6
16152 else
16153   ac_check_lib_save_LIBS=$LIBS
16154 LIBS="-lgen  $LIBS"
16155 cat >conftest.$ac_ext <<_ACEOF
16156 #line 16156 "configure"
16157 #include "confdefs.h"
16158
16159 /* Override any gcc2 internal prototype to avoid an error.  */
16160 #ifdef __cplusplus
16161 extern "C"
16162 #endif
16163 /* We use char because int might match the return type of a gcc2
16164    builtin and then its argument prototype would still apply.  */
16165 char compile ();
16166 int
16167 main (void)
16168 {
16169 compile ();
16170   ;
16171   return 0;
16172 }
16173 _ACEOF
16174 rm -f conftest.$ac_objext conftest$ac_exeext
16175 if { (eval echo "$as_me:16175: \"$ac_link\"") >&5
16176   (eval $ac_link) 2>&5
16177   ac_status=$?
16178   echo "$as_me:16178: \$? = $ac_status" >&5
16179   (exit $ac_status); } &&
16180          { ac_try='test -s conftest$ac_exeext'
16181   { (eval echo "$as_me:16181: \"$ac_try\"") >&5
16182   (eval $ac_try) 2>&5
16183   ac_status=$?
16184   echo "$as_me:16184: \$? = $ac_status" >&5
16185   (exit $ac_status); }; }; then
16186   ac_cv_lib_gen_compile=yes
16187 else
16188   echo "$as_me: failed program was:" >&5
16189 cat conftest.$ac_ext >&5
16190 ac_cv_lib_gen_compile=no
16191 fi
16192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16193 LIBS=$ac_check_lib_save_LIBS
16194 fi
16195 echo "$as_me:16195: result: $ac_cv_lib_gen_compile" >&5
16196 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16197 if test $ac_cv_lib_gen_compile = yes; then
16198
16199 cf_add_libs="-lgen"
16200 # Filter out duplicates - this happens with badly-designed ".pc" files...
16201 for cf_add_1lib in $LIBS
16202 do
16203         for cf_add_2lib in $cf_add_libs
16204         do
16205                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16206                 then
16207                         cf_add_1lib=
16208                         break
16209                 fi
16210         done
16211         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16212 done
16213 LIBS="$cf_add_libs"
16214
16215                                 cf_regex_func=compile
16216 fi
16217
16218 fi
16219
16220 fi
16221
16222 if test "$cf_regex_func" = no ; then
16223         { echo "$as_me:16223: WARNING: cannot find regular expression library" >&5
16224 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16225 fi
16226
16227 echo "$as_me:16227: checking for regular-expression headers" >&5
16228 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16229 if test "${cf_cv_regex_hdrs+set}" = set; then
16230   echo $ECHO_N "(cached) $ECHO_C" >&6
16231 else
16232
16233 cf_cv_regex_hdrs=no
16234 case $cf_regex_func in
16235 (compile)
16236         for cf_regex_hdr in regexp.h regexpr.h
16237         do
16238                 cat >conftest.$ac_ext <<_ACEOF
16239 #line 16239 "configure"
16240 #include "confdefs.h"
16241 #include <$cf_regex_hdr>
16242 int
16243 main (void)
16244 {
16245
16246                         char *p = compile("", "", "", 0);
16247                         int x = step("", "");
16248
16249   ;
16250   return 0;
16251 }
16252 _ACEOF
16253 rm -f conftest.$ac_objext conftest$ac_exeext
16254 if { (eval echo "$as_me:16254: \"$ac_link\"") >&5
16255   (eval $ac_link) 2>&5
16256   ac_status=$?
16257   echo "$as_me:16257: \$? = $ac_status" >&5
16258   (exit $ac_status); } &&
16259          { ac_try='test -s conftest$ac_exeext'
16260   { (eval echo "$as_me:16260: \"$ac_try\"") >&5
16261   (eval $ac_try) 2>&5
16262   ac_status=$?
16263   echo "$as_me:16263: \$? = $ac_status" >&5
16264   (exit $ac_status); }; }; then
16265
16266                         cf_cv_regex_hdrs=$cf_regex_hdr
16267                         break
16268
16269 else
16270   echo "$as_me: failed program was:" >&5
16271 cat conftest.$ac_ext >&5
16272 fi
16273 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16274         done
16275         ;;
16276 (*)
16277         for cf_regex_hdr in regex.h
16278         do
16279                 cat >conftest.$ac_ext <<_ACEOF
16280 #line 16280 "configure"
16281 #include "confdefs.h"
16282 #include <sys/types.h>
16283 #include <$cf_regex_hdr>
16284 int
16285 main (void)
16286 {
16287
16288                         regex_t *p;
16289                         int x = regcomp(p, "", 0);
16290                         int y = regexec(p, "", 0, 0, 0);
16291                         regfree(p);
16292
16293   ;
16294   return 0;
16295 }
16296 _ACEOF
16297 rm -f conftest.$ac_objext conftest$ac_exeext
16298 if { (eval echo "$as_me:16298: \"$ac_link\"") >&5
16299   (eval $ac_link) 2>&5
16300   ac_status=$?
16301   echo "$as_me:16301: \$? = $ac_status" >&5
16302   (exit $ac_status); } &&
16303          { ac_try='test -s conftest$ac_exeext'
16304   { (eval echo "$as_me:16304: \"$ac_try\"") >&5
16305   (eval $ac_try) 2>&5
16306   ac_status=$?
16307   echo "$as_me:16307: \$? = $ac_status" >&5
16308   (exit $ac_status); }; }; then
16309
16310                         cf_cv_regex_hdrs=$cf_regex_hdr
16311                         break
16312
16313 else
16314   echo "$as_me: failed program was:" >&5
16315 cat conftest.$ac_ext >&5
16316 fi
16317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16318         done
16319         ;;
16320 esac
16321
16322 fi
16323 echo "$as_me:16323: result: $cf_cv_regex_hdrs" >&5
16324 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16325
16326 case $cf_cv_regex_hdrs in
16327         (no)            { echo "$as_me:16327: WARNING: no regular expression header found" >&5
16328 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
16329         (regex.h)
16330 cat >>confdefs.h <<\EOF
16331 #define HAVE_REGEX_H_FUNCS 1
16332 EOF
16333  ;;
16334         (regexp.h)
16335 cat >>confdefs.h <<\EOF
16336 #define HAVE_REGEXP_H_FUNCS 1
16337 EOF
16338  ;;
16339         (regexpr.h)
16340 cat >>confdefs.h <<\EOF
16341 #define HAVE_REGEXPR_H_FUNCS 1
16342 EOF
16343  ;;
16344 esac
16345
16346 for ac_header in \
16347 fcntl.h \
16348 getopt.h \
16349 limits.h \
16350 locale.h \
16351 math.h \
16352 poll.h \
16353 sys/bsdtypes.h \
16354 sys/ioctl.h \
16355 sys/param.h \
16356 sys/poll.h \
16357 sys/select.h \
16358 sys/time.h \
16359 sys/times.h \
16360 ttyent.h \
16361 unistd.h \
16362 wctype.h \
16363
16364 do
16365 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16366 echo "$as_me:16366: checking for $ac_header" >&5
16367 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16368 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16369   echo $ECHO_N "(cached) $ECHO_C" >&6
16370 else
16371   cat >conftest.$ac_ext <<_ACEOF
16372 #line 16372 "configure"
16373 #include "confdefs.h"
16374 #include <$ac_header>
16375 _ACEOF
16376 if { (eval echo "$as_me:16376: \"$ac_cpp conftest.$ac_ext\"") >&5
16377   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16378   ac_status=$?
16379   egrep -v '^ *\+' conftest.er1 >conftest.err
16380   rm -f conftest.er1
16381   cat conftest.err >&5
16382   echo "$as_me:16382: \$? = $ac_status" >&5
16383   (exit $ac_status); } >/dev/null; then
16384   if test -s conftest.err; then
16385     ac_cpp_err=$ac_c_preproc_warn_flag
16386   else
16387     ac_cpp_err=
16388   fi
16389 else
16390   ac_cpp_err=yes
16391 fi
16392 if test -z "$ac_cpp_err"; then
16393   eval "$as_ac_Header=yes"
16394 else
16395   echo "$as_me: failed program was:" >&5
16396   cat conftest.$ac_ext >&5
16397   eval "$as_ac_Header=no"
16398 fi
16399 rm -f conftest.err conftest.$ac_ext
16400 fi
16401 echo "$as_me:16401: result: `eval echo '${'$as_ac_Header'}'`" >&5
16402 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16403 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16404   cat >>confdefs.h <<EOF
16405 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16406 EOF
16407
16408 fi
16409 done
16410
16411 for ac_header in unistd.h getopt.h
16412 do
16413 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16414 echo "$as_me:16414: checking for $ac_header" >&5
16415 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16416 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16417   echo $ECHO_N "(cached) $ECHO_C" >&6
16418 else
16419   cat >conftest.$ac_ext <<_ACEOF
16420 #line 16420 "configure"
16421 #include "confdefs.h"
16422 #include <$ac_header>
16423 _ACEOF
16424 if { (eval echo "$as_me:16424: \"$ac_cpp conftest.$ac_ext\"") >&5
16425   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16426   ac_status=$?
16427   egrep -v '^ *\+' conftest.er1 >conftest.err
16428   rm -f conftest.er1
16429   cat conftest.err >&5
16430   echo "$as_me:16430: \$? = $ac_status" >&5
16431   (exit $ac_status); } >/dev/null; then
16432   if test -s conftest.err; then
16433     ac_cpp_err=$ac_c_preproc_warn_flag
16434   else
16435     ac_cpp_err=
16436   fi
16437 else
16438   ac_cpp_err=yes
16439 fi
16440 if test -z "$ac_cpp_err"; then
16441   eval "$as_ac_Header=yes"
16442 else
16443   echo "$as_me: failed program was:" >&5
16444   cat conftest.$ac_ext >&5
16445   eval "$as_ac_Header=no"
16446 fi
16447 rm -f conftest.err conftest.$ac_ext
16448 fi
16449 echo "$as_me:16449: result: `eval echo '${'$as_ac_Header'}'`" >&5
16450 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16451 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16452   cat >>confdefs.h <<EOF
16453 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16454 EOF
16455
16456 fi
16457 done
16458
16459 echo "$as_me:16459: checking for header declaring getopt variables" >&5
16460 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16461 if test "${cf_cv_getopt_header+set}" = set; then
16462   echo $ECHO_N "(cached) $ECHO_C" >&6
16463 else
16464
16465 cf_cv_getopt_header=none
16466 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16467 do
16468 cat >conftest.$ac_ext <<_ACEOF
16469 #line 16469 "configure"
16470 #include "confdefs.h"
16471
16472 #include <$cf_header>
16473 int
16474 main (void)
16475 {
16476 int x = optind; char *y = optarg
16477   ;
16478   return 0;
16479 }
16480 _ACEOF
16481 rm -f conftest.$ac_objext
16482 if { (eval echo "$as_me:16482: \"$ac_compile\"") >&5
16483   (eval $ac_compile) 2>&5
16484   ac_status=$?
16485   echo "$as_me:16485: \$? = $ac_status" >&5
16486   (exit $ac_status); } &&
16487          { ac_try='test -s conftest.$ac_objext'
16488   { (eval echo "$as_me:16488: \"$ac_try\"") >&5
16489   (eval $ac_try) 2>&5
16490   ac_status=$?
16491   echo "$as_me:16491: \$? = $ac_status" >&5
16492   (exit $ac_status); }; }; then
16493   cf_cv_getopt_header=$cf_header
16494  break
16495 else
16496   echo "$as_me: failed program was:" >&5
16497 cat conftest.$ac_ext >&5
16498 fi
16499 rm -f conftest.$ac_objext conftest.$ac_ext
16500 done
16501
16502 fi
16503 echo "$as_me:16503: result: $cf_cv_getopt_header" >&5
16504 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16505 if test $cf_cv_getopt_header != none ; then
16506
16507 cat >>confdefs.h <<\EOF
16508 #define HAVE_GETOPT_HEADER 1
16509 EOF
16510
16511 fi
16512 if test $cf_cv_getopt_header = getopt.h ; then
16513
16514 cat >>confdefs.h <<\EOF
16515 #define NEED_GETOPT_H 1
16516 EOF
16517
16518 fi
16519
16520 # check for ISC (this may also define _POSIX_SOURCE)
16521 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16522 if test "x$ISC" = xyes ; then
16523
16524 echo "$as_me:16524: checking for main in -lcposix" >&5
16525 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16526 if test "${ac_cv_lib_cposix_main+set}" = set; then
16527   echo $ECHO_N "(cached) $ECHO_C" >&6
16528 else
16529   ac_check_lib_save_LIBS=$LIBS
16530 LIBS="-lcposix  $LIBS"
16531 cat >conftest.$ac_ext <<_ACEOF
16532 #line 16532 "configure"
16533 #include "confdefs.h"
16534
16535 int
16536 main (void)
16537 {
16538 main ();
16539   ;
16540   return 0;
16541 }
16542 _ACEOF
16543 rm -f conftest.$ac_objext conftest$ac_exeext
16544 if { (eval echo "$as_me:16544: \"$ac_link\"") >&5
16545   (eval $ac_link) 2>&5
16546   ac_status=$?
16547   echo "$as_me:16547: \$? = $ac_status" >&5
16548   (exit $ac_status); } &&
16549          { ac_try='test -s conftest$ac_exeext'
16550   { (eval echo "$as_me:16550: \"$ac_try\"") >&5
16551   (eval $ac_try) 2>&5
16552   ac_status=$?
16553   echo "$as_me:16553: \$? = $ac_status" >&5
16554   (exit $ac_status); }; }; then
16555   ac_cv_lib_cposix_main=yes
16556 else
16557   echo "$as_me: failed program was:" >&5
16558 cat conftest.$ac_ext >&5
16559 ac_cv_lib_cposix_main=no
16560 fi
16561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16562 LIBS=$ac_check_lib_save_LIBS
16563 fi
16564 echo "$as_me:16564: result: $ac_cv_lib_cposix_main" >&5
16565 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16566 if test $ac_cv_lib_cposix_main = yes; then
16567   cat >>confdefs.h <<EOF
16568 #define HAVE_LIBCPOSIX 1
16569 EOF
16570
16571   LIBS="-lcposix $LIBS"
16572
16573 fi
16574
16575         echo "$as_me:16575: checking for bzero in -linet" >&5
16576 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16577 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16578   echo $ECHO_N "(cached) $ECHO_C" >&6
16579 else
16580   ac_check_lib_save_LIBS=$LIBS
16581 LIBS="-linet  $LIBS"
16582 cat >conftest.$ac_ext <<_ACEOF
16583 #line 16583 "configure"
16584 #include "confdefs.h"
16585
16586 /* Override any gcc2 internal prototype to avoid an error.  */
16587 #ifdef __cplusplus
16588 extern "C"
16589 #endif
16590 /* We use char because int might match the return type of a gcc2
16591    builtin and then its argument prototype would still apply.  */
16592 char bzero ();
16593 int
16594 main (void)
16595 {
16596 bzero ();
16597   ;
16598   return 0;
16599 }
16600 _ACEOF
16601 rm -f conftest.$ac_objext conftest$ac_exeext
16602 if { (eval echo "$as_me:16602: \"$ac_link\"") >&5
16603   (eval $ac_link) 2>&5
16604   ac_status=$?
16605   echo "$as_me:16605: \$? = $ac_status" >&5
16606   (exit $ac_status); } &&
16607          { ac_try='test -s conftest$ac_exeext'
16608   { (eval echo "$as_me:16608: \"$ac_try\"") >&5
16609   (eval $ac_try) 2>&5
16610   ac_status=$?
16611   echo "$as_me:16611: \$? = $ac_status" >&5
16612   (exit $ac_status); }; }; then
16613   ac_cv_lib_inet_bzero=yes
16614 else
16615   echo "$as_me: failed program was:" >&5
16616 cat conftest.$ac_ext >&5
16617 ac_cv_lib_inet_bzero=no
16618 fi
16619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16620 LIBS=$ac_check_lib_save_LIBS
16621 fi
16622 echo "$as_me:16622: result: $ac_cv_lib_inet_bzero" >&5
16623 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16624 if test $ac_cv_lib_inet_bzero = yes; then
16625
16626 cf_add_libs="-linet"
16627 # Filter out duplicates - this happens with badly-designed ".pc" files...
16628 for cf_add_1lib in $LIBS
16629 do
16630         for cf_add_2lib in $cf_add_libs
16631         do
16632                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16633                 then
16634                         cf_add_1lib=
16635                         break
16636                 fi
16637         done
16638         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16639 done
16640 LIBS="$cf_add_libs"
16641
16642 fi
16643 fi
16644
16645 echo "$as_me:16645: checking if sys/time.h works with sys/select.h" >&5
16646 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16647 if test "${cf_cv_sys_time_select+set}" = set; then
16648   echo $ECHO_N "(cached) $ECHO_C" >&6
16649 else
16650
16651 cat >conftest.$ac_ext <<_ACEOF
16652 #line 16652 "configure"
16653 #include "confdefs.h"
16654
16655 #include <sys/types.h>
16656 #ifdef HAVE_SYS_TIME_H
16657 #include <sys/time.h>
16658 #endif
16659 #ifdef HAVE_SYS_SELECT_H
16660 #include <sys/select.h>
16661 #endif
16662
16663 int
16664 main (void)
16665 {
16666
16667   ;
16668   return 0;
16669 }
16670 _ACEOF
16671 rm -f conftest.$ac_objext
16672 if { (eval echo "$as_me:16672: \"$ac_compile\"") >&5
16673   (eval $ac_compile) 2>&5
16674   ac_status=$?
16675   echo "$as_me:16675: \$? = $ac_status" >&5
16676   (exit $ac_status); } &&
16677          { ac_try='test -s conftest.$ac_objext'
16678   { (eval echo "$as_me:16678: \"$ac_try\"") >&5
16679   (eval $ac_try) 2>&5
16680   ac_status=$?
16681   echo "$as_me:16681: \$? = $ac_status" >&5
16682   (exit $ac_status); }; }; then
16683   cf_cv_sys_time_select=yes
16684 else
16685   echo "$as_me: failed program was:" >&5
16686 cat conftest.$ac_ext >&5
16687 cf_cv_sys_time_select=no
16688 fi
16689 rm -f conftest.$ac_objext conftest.$ac_ext
16690
16691 fi
16692
16693 echo "$as_me:16693: result: $cf_cv_sys_time_select" >&5
16694 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16695 test "$cf_cv_sys_time_select" = yes &&
16696 cat >>confdefs.h <<\EOF
16697 #define HAVE_SYS_TIME_SELECT 1
16698 EOF
16699
16700 ###     checks for compiler characteristics
16701 ac_ext=c
16702 ac_cpp='$CPP $CPPFLAGS'
16703 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16704 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16705 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16706 ac_main_return=return
16707
16708 echo "$as_me:16708: checking for an ANSI C-conforming const" >&5
16709 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16710 if test "${ac_cv_c_const+set}" = set; then
16711   echo $ECHO_N "(cached) $ECHO_C" >&6
16712 else
16713   cat >conftest.$ac_ext <<_ACEOF
16714 #line 16714 "configure"
16715 #include "confdefs.h"
16716
16717 int
16718 main (void)
16719 {
16720 /* FIXME: Include the comments suggested by Paul. */
16721 #ifndef __cplusplus
16722   /* Ultrix mips cc rejects this.  */
16723   typedef int charset[2];
16724   const charset x;
16725   /* SunOS 4.1.1 cc rejects this.  */
16726   char const *const *ccp;
16727   char **p;
16728   /* NEC SVR4.0.2 mips cc rejects this.  */
16729   struct point {int x, y;};
16730   static struct point const zero = {0,0};
16731   /* AIX XL C 1.02.0.0 rejects this.
16732      It does not let you subtract one const X* pointer from another in
16733      an arm of an if-expression whose if-part is not a constant
16734      expression */
16735   const char *g = "string";
16736   ccp = &g + (g ? g-g : 0);
16737   /* HPUX 7.0 cc rejects these. */
16738   ++ccp;
16739   p = (char**) ccp;
16740   ccp = (char const *const *) p;
16741   { /* SCO 3.2v4 cc rejects this.  */
16742     char *t;
16743     char const *s = 0 ? (char *) 0 : (char const *) 0;
16744
16745     *t++ = 0;
16746   }
16747   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16748     int x[] = {25, 17};
16749     const int *foo = &x[0];
16750     ++foo;
16751   }
16752   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16753     typedef const int *iptr;
16754     iptr p = 0;
16755     ++p;
16756   }
16757   { /* AIX XL C 1.02.0.0 rejects this saying
16758        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16759     struct s { int j; const int *ap[3]; };
16760     struct s *b; b->j = 5;
16761   }
16762   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16763     const int foo = 10;
16764   }
16765 #endif
16766
16767   ;
16768   return 0;
16769 }
16770 _ACEOF
16771 rm -f conftest.$ac_objext
16772 if { (eval echo "$as_me:16772: \"$ac_compile\"") >&5
16773   (eval $ac_compile) 2>&5
16774   ac_status=$?
16775   echo "$as_me:16775: \$? = $ac_status" >&5
16776   (exit $ac_status); } &&
16777          { ac_try='test -s conftest.$ac_objext'
16778   { (eval echo "$as_me:16778: \"$ac_try\"") >&5
16779   (eval $ac_try) 2>&5
16780   ac_status=$?
16781   echo "$as_me:16781: \$? = $ac_status" >&5
16782   (exit $ac_status); }; }; then
16783   ac_cv_c_const=yes
16784 else
16785   echo "$as_me: failed program was:" >&5
16786 cat conftest.$ac_ext >&5
16787 ac_cv_c_const=no
16788 fi
16789 rm -f conftest.$ac_objext conftest.$ac_ext
16790 fi
16791 echo "$as_me:16791: result: $ac_cv_c_const" >&5
16792 echo "${ECHO_T}$ac_cv_c_const" >&6
16793 if test $ac_cv_c_const = no; then
16794
16795 cat >>confdefs.h <<\EOF
16796 #define const
16797 EOF
16798
16799 fi
16800
16801 echo "$as_me:16801: checking for inline" >&5
16802 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16803 if test "${ac_cv_c_inline+set}" = set; then
16804   echo $ECHO_N "(cached) $ECHO_C" >&6
16805 else
16806   ac_cv_c_inline=no
16807 for ac_kw in inline __inline__ __inline; do
16808   cat >conftest.$ac_ext <<_ACEOF
16809 #line 16809 "configure"
16810 #include "confdefs.h"
16811 #ifndef __cplusplus
16812 static $ac_kw int static_foo () {return 0; }
16813 $ac_kw int foo () {return 0; }
16814 #endif
16815
16816 _ACEOF
16817 rm -f conftest.$ac_objext
16818 if { (eval echo "$as_me:16818: \"$ac_compile\"") >&5
16819   (eval $ac_compile) 2>&5
16820   ac_status=$?
16821   echo "$as_me:16821: \$? = $ac_status" >&5
16822   (exit $ac_status); } &&
16823          { ac_try='test -s conftest.$ac_objext'
16824   { (eval echo "$as_me:16824: \"$ac_try\"") >&5
16825   (eval $ac_try) 2>&5
16826   ac_status=$?
16827   echo "$as_me:16827: \$? = $ac_status" >&5
16828   (exit $ac_status); }; }; then
16829   ac_cv_c_inline=$ac_kw; break
16830 else
16831   echo "$as_me: failed program was:" >&5
16832 cat conftest.$ac_ext >&5
16833 fi
16834 rm -f conftest.$ac_objext conftest.$ac_ext
16835 done
16836
16837 fi
16838 echo "$as_me:16838: result: $ac_cv_c_inline" >&5
16839 echo "${ECHO_T}$ac_cv_c_inline" >&6
16840 case $ac_cv_c_inline in
16841   inline | yes) ;;
16842   no)
16843 cat >>confdefs.h <<\EOF
16844 #define inline
16845 EOF
16846  ;;
16847   *)  cat >>confdefs.h <<EOF
16848 #define inline $ac_cv_c_inline
16849 EOF
16850  ;;
16851 esac
16852
16853 NCURSES_INLINE=
16854 if test "$ac_cv_c_inline" != no ; then
16855         NCURSES_INLINE=inline
16856         if test "$INTEL_COMPILER" = yes
16857         then
16858                 :
16859         elif test "$CLANG_COMPILER" = yes
16860         then
16861                 :
16862         elif test "$GCC" = yes
16863         then
16864                 echo "$as_me:16864: checking if $CC supports options to tune inlining" >&5
16865 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16866 if test "${cf_cv_gcc_inline+set}" = set; then
16867   echo $ECHO_N "(cached) $ECHO_C" >&6
16868 else
16869
16870                 cf_save_CFLAGS=$CFLAGS
16871                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16872                 cat >conftest.$ac_ext <<_ACEOF
16873 #line 16873 "configure"
16874 #include "confdefs.h"
16875 inline int foo(void) { return 1; }
16876 int
16877 main (void)
16878 {
16879 ${cf_cv_main_return:-return} foo()
16880   ;
16881   return 0;
16882 }
16883 _ACEOF
16884 rm -f conftest.$ac_objext
16885 if { (eval echo "$as_me:16885: \"$ac_compile\"") >&5
16886   (eval $ac_compile) 2>&5
16887   ac_status=$?
16888   echo "$as_me:16888: \$? = $ac_status" >&5
16889   (exit $ac_status); } &&
16890          { ac_try='test -s conftest.$ac_objext'
16891   { (eval echo "$as_me:16891: \"$ac_try\"") >&5
16892   (eval $ac_try) 2>&5
16893   ac_status=$?
16894   echo "$as_me:16894: \$? = $ac_status" >&5
16895   (exit $ac_status); }; }; then
16896   cf_cv_gcc_inline=yes
16897 else
16898   echo "$as_me: failed program was:" >&5
16899 cat conftest.$ac_ext >&5
16900 cf_cv_gcc_inline=no
16901 fi
16902 rm -f conftest.$ac_objext conftest.$ac_ext
16903                 CFLAGS=$cf_save_CFLAGS
16904
16905 fi
16906 echo "$as_me:16906: result: $cf_cv_gcc_inline" >&5
16907 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16908                 if test "$cf_cv_gcc_inline" = yes ; then
16909
16910 cf_fix_cppflags=no
16911 cf_new_cflags=
16912 cf_new_cppflags=
16913 cf_new_extra_cppflags=
16914
16915 for cf_add_cflags in --param max-inline-insns-single=1200
16916 do
16917 case $cf_fix_cppflags in
16918 (no)
16919         case $cf_add_cflags in
16920         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16921                 case $cf_add_cflags in
16922                 (-D*)
16923                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16924
16925                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16926                                 && test -z "${cf_tst_cflags}" \
16927                                 && cf_fix_cppflags=yes
16928
16929                         if test $cf_fix_cppflags = yes ; then
16930
16931         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16932         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16933
16934                                 continue
16935                         elif test "${cf_tst_cflags}" = "\"'" ; then
16936
16937         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16938         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16939
16940                                 continue
16941                         fi
16942                         ;;
16943                 esac
16944                 case "$CPPFLAGS" in
16945                 (*$cf_add_cflags)
16946                         ;;
16947                 (*)
16948                         case $cf_add_cflags in
16949                         (-D*)
16950                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16951
16952 CPPFLAGS=`echo "$CPPFLAGS" | \
16953         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16954                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16955
16956                                 ;;
16957                         esac
16958
16959         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16960         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16961
16962                         ;;
16963                 esac
16964                 ;;
16965         (*)
16966
16967         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16968         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16969
16970                 ;;
16971         esac
16972         ;;
16973 (yes)
16974
16975         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16976         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16977
16978         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16979
16980         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16981                 && test -z "${cf_tst_cflags}" \
16982                 && cf_fix_cppflags=no
16983         ;;
16984 esac
16985 done
16986
16987 if test -n "$cf_new_cflags" ; then
16988
16989         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16990         CFLAGS="${CFLAGS}$cf_new_cflags"
16991
16992 fi
16993
16994 if test -n "$cf_new_cppflags" ; then
16995
16996         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16997         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16998
16999 fi
17000
17001 if test -n "$cf_new_extra_cppflags" ; then
17002
17003         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17004         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17005
17006 fi
17007
17008                 fi
17009         fi
17010 fi
17011
17012 echo "$as_me:17012: checking for signal global datatype" >&5
17013 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
17014 if test "${cf_cv_sig_atomic_t+set}" = set; then
17015   echo $ECHO_N "(cached) $ECHO_C" >&6
17016 else
17017
17018         for cf_type in \
17019                 "volatile sig_atomic_t" \
17020                 "sig_atomic_t" \
17021                 "int"
17022         do
17023         cat >conftest.$ac_ext <<_ACEOF
17024 #line 17024 "configure"
17025 #include "confdefs.h"
17026
17027 #include <sys/types.h>
17028 #include <signal.h>
17029 #include <stdio.h>
17030
17031 extern $cf_type x;
17032 $cf_type x;
17033 static void handler(int sig)
17034 {
17035         x = 5;
17036 }
17037 int
17038 main (void)
17039 {
17040 signal(SIGINT, handler);
17041                  x = 1
17042   ;
17043   return 0;
17044 }
17045 _ACEOF
17046 rm -f conftest.$ac_objext
17047 if { (eval echo "$as_me:17047: \"$ac_compile\"") >&5
17048   (eval $ac_compile) 2>&5
17049   ac_status=$?
17050   echo "$as_me:17050: \$? = $ac_status" >&5
17051   (exit $ac_status); } &&
17052          { ac_try='test -s conftest.$ac_objext'
17053   { (eval echo "$as_me:17053: \"$ac_try\"") >&5
17054   (eval $ac_try) 2>&5
17055   ac_status=$?
17056   echo "$as_me:17056: \$? = $ac_status" >&5
17057   (exit $ac_status); }; }; then
17058   cf_cv_sig_atomic_t=$cf_type
17059 else
17060   echo "$as_me: failed program was:" >&5
17061 cat conftest.$ac_ext >&5
17062 cf_cv_sig_atomic_t=no
17063 fi
17064 rm -f conftest.$ac_objext conftest.$ac_ext
17065                 test "$cf_cv_sig_atomic_t" != no && break
17066         done
17067
17068 fi
17069
17070 echo "$as_me:17070: result: $cf_cv_sig_atomic_t" >&5
17071 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
17072 test "$cf_cv_sig_atomic_t" != no &&
17073 cat >>confdefs.h <<EOF
17074 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
17075 EOF
17076
17077 if test $NCURSES_CHTYPE = auto ; then
17078
17079 echo "$as_me:17079: checking for type of chtype" >&5
17080 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
17081 if test "${cf_cv_typeof_chtype+set}" = set; then
17082   echo $ECHO_N "(cached) $ECHO_C" >&6
17083 else
17084
17085                 if test "$cross_compiling" = yes; then
17086   cf_cv_typeof_chtype=long
17087 else
17088   cat >conftest.$ac_ext <<_ACEOF
17089 #line 17089 "configure"
17090 #include "confdefs.h"
17091
17092 #define WANT_BITS 31
17093 #include <stdio.h>
17094 int main(void)
17095 {
17096         FILE *fp = fopen("cf_test.out", "w");
17097         if (fp != 0) {
17098                 char *result = "long";
17099                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
17100                         int n;
17101                         unsigned int x, y;
17102                         for (n = 0; n < WANT_BITS; n++) {
17103                                 x = (1 << n);
17104                                 y = (x >> n);
17105                                 if (y != 1 || x == 0) {
17106                                         x = 0;
17107                                         break;
17108                                 }
17109                         }
17110                         /*
17111                          * If x is nonzero, an int is big enough for the bits
17112                          * that we want.
17113                          */
17114                         result = (x != 0) ? "int" : "long";
17115                 }
17116                 fputs(result, fp);
17117                 fclose(fp);
17118         }
17119         ${cf_cv_main_return:-return}(0);
17120 }
17121
17122 _ACEOF
17123 rm -f conftest$ac_exeext
17124 if { (eval echo "$as_me:17124: \"$ac_link\"") >&5
17125   (eval $ac_link) 2>&5
17126   ac_status=$?
17127   echo "$as_me:17127: \$? = $ac_status" >&5
17128   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17129   { (eval echo "$as_me:17129: \"$ac_try\"") >&5
17130   (eval $ac_try) 2>&5
17131   ac_status=$?
17132   echo "$as_me:17132: \$? = $ac_status" >&5
17133   (exit $ac_status); }; }; then
17134   cf_cv_typeof_chtype=`cat cf_test.out`
17135 else
17136   echo "$as_me: program exited with status $ac_status" >&5
17137 echo "$as_me: failed program was:" >&5
17138 cat conftest.$ac_ext >&5
17139 cf_cv_typeof_chtype=long
17140 fi
17141 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17142 fi
17143                 rm -f cf_test.out
17144
17145 fi
17146
17147 echo "$as_me:17147: result: $cf_cv_typeof_chtype" >&5
17148 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
17149
17150 cat >>confdefs.h <<EOF
17151 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
17152 EOF
17153
17154 else
17155         cf_cv_typeof_chtype=$NCURSES_CHTYPE
17156 fi
17157 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
17158
17159 echo "$as_me:17159: checking if unsigned literals are legal" >&5
17160 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
17161 if test "${cf_cv_unsigned_literals+set}" = set; then
17162   echo $ECHO_N "(cached) $ECHO_C" >&6
17163 else
17164
17165         cat >conftest.$ac_ext <<_ACEOF
17166 #line 17166 "configure"
17167 #include "confdefs.h"
17168
17169 int
17170 main (void)
17171 {
17172 long x = 1L + 1UL + 1U + 1
17173   ;
17174   return 0;
17175 }
17176 _ACEOF
17177 rm -f conftest.$ac_objext
17178 if { (eval echo "$as_me:17178: \"$ac_compile\"") >&5
17179   (eval $ac_compile) 2>&5
17180   ac_status=$?
17181   echo "$as_me:17181: \$? = $ac_status" >&5
17182   (exit $ac_status); } &&
17183          { ac_try='test -s conftest.$ac_objext'
17184   { (eval echo "$as_me:17184: \"$ac_try\"") >&5
17185   (eval $ac_try) 2>&5
17186   ac_status=$?
17187   echo "$as_me:17187: \$? = $ac_status" >&5
17188   (exit $ac_status); }; }; then
17189   cf_cv_unsigned_literals=yes
17190 else
17191   echo "$as_me: failed program was:" >&5
17192 cat conftest.$ac_ext >&5
17193 cf_cv_unsigned_literals=no
17194 fi
17195 rm -f conftest.$ac_objext conftest.$ac_ext
17196
17197 fi
17198
17199 echo "$as_me:17199: result: $cf_cv_unsigned_literals" >&5
17200 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
17201
17202 cf_cv_1UL="1"
17203 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
17204 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
17205
17206 if test $NCURSES_MMASK_T = auto ; then
17207         cf_cv_typeof_mmask_t=long
17208 else
17209         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
17210 fi
17211 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
17212
17213 ###     Checks for external-data
17214
17215 echo "$as_me:17215: checking if external errno is declared" >&5
17216 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
17217 if test "${cf_cv_dcl_errno+set}" = set; then
17218   echo $ECHO_N "(cached) $ECHO_C" >&6
17219 else
17220
17221         cat >conftest.$ac_ext <<_ACEOF
17222 #line 17222 "configure"
17223 #include "confdefs.h"
17224
17225 #ifdef HAVE_STDLIB_H
17226 #include <stdlib.h>
17227 #endif
17228 #include <stdio.h>
17229 #include <sys/types.h>
17230 #include <errno.h>
17231 int
17232 main (void)
17233 {
17234 int x = (int) errno
17235   ;
17236   return 0;
17237 }
17238 _ACEOF
17239 rm -f conftest.$ac_objext
17240 if { (eval echo "$as_me:17240: \"$ac_compile\"") >&5
17241   (eval $ac_compile) 2>&5
17242   ac_status=$?
17243   echo "$as_me:17243: \$? = $ac_status" >&5
17244   (exit $ac_status); } &&
17245          { ac_try='test -s conftest.$ac_objext'
17246   { (eval echo "$as_me:17246: \"$ac_try\"") >&5
17247   (eval $ac_try) 2>&5
17248   ac_status=$?
17249   echo "$as_me:17249: \$? = $ac_status" >&5
17250   (exit $ac_status); }; }; then
17251   cf_cv_dcl_errno=yes
17252 else
17253   echo "$as_me: failed program was:" >&5
17254 cat conftest.$ac_ext >&5
17255 cf_cv_dcl_errno=no
17256 fi
17257 rm -f conftest.$ac_objext conftest.$ac_ext
17258
17259 fi
17260 echo "$as_me:17260: result: $cf_cv_dcl_errno" >&5
17261 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
17262
17263 if test "$cf_cv_dcl_errno" = no ; then
17264
17265 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17266
17267         cat >>confdefs.h <<EOF
17268 #define $cf_result 1
17269 EOF
17270
17271 fi
17272
17273 # It's possible (for near-UNIX clones) that the data doesn't exist
17274
17275 echo "$as_me:17275: checking if external errno exists" >&5
17276 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
17277 if test "${cf_cv_have_errno+set}" = set; then
17278   echo $ECHO_N "(cached) $ECHO_C" >&6
17279 else
17280
17281         cat >conftest.$ac_ext <<_ACEOF
17282 #line 17282 "configure"
17283 #include "confdefs.h"
17284
17285 #undef errno
17286 extern int errno;
17287
17288 int
17289 main (void)
17290 {
17291 errno = 2
17292   ;
17293   return 0;
17294 }
17295 _ACEOF
17296 rm -f conftest.$ac_objext conftest$ac_exeext
17297 if { (eval echo "$as_me:17297: \"$ac_link\"") >&5
17298   (eval $ac_link) 2>&5
17299   ac_status=$?
17300   echo "$as_me:17300: \$? = $ac_status" >&5
17301   (exit $ac_status); } &&
17302          { ac_try='test -s conftest$ac_exeext'
17303   { (eval echo "$as_me:17303: \"$ac_try\"") >&5
17304   (eval $ac_try) 2>&5
17305   ac_status=$?
17306   echo "$as_me:17306: \$? = $ac_status" >&5
17307   (exit $ac_status); }; }; then
17308   cf_cv_have_errno=yes
17309 else
17310   echo "$as_me: failed program was:" >&5
17311 cat conftest.$ac_ext >&5
17312 cf_cv_have_errno=no
17313 fi
17314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17315
17316 fi
17317 echo "$as_me:17317: result: $cf_cv_have_errno" >&5
17318 echo "${ECHO_T}$cf_cv_have_errno" >&6
17319
17320 if test "$cf_cv_have_errno" = yes ; then
17321
17322 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17323
17324         cat >>confdefs.h <<EOF
17325 #define $cf_result 1
17326 EOF
17327
17328 fi
17329
17330 echo "$as_me:17330: checking if data-only library module links" >&5
17331 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17332 if test "${cf_cv_link_dataonly+set}" = set; then
17333   echo $ECHO_N "(cached) $ECHO_C" >&6
17334 else
17335
17336         rm -f conftest.a
17337         cat >conftest.$ac_ext <<EOF
17338 #line 17338 "configure"
17339 int     testdata[3] = { 123, 456, 789 };
17340 EOF
17341         if { (eval echo "$as_me:17341: \"$ac_compile\"") >&5
17342   (eval $ac_compile) 2>&5
17343   ac_status=$?
17344   echo "$as_me:17344: \$? = $ac_status" >&5
17345   (exit $ac_status); } ; then
17346                 mv conftest.o data.o && \
17347                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17348         fi
17349         rm -f conftest.$ac_ext data.o
17350         cat >conftest.$ac_ext <<EOF
17351 #line 17351 "configure"
17352 int     testfunc(void)
17353 {
17354 #if defined(NeXT)
17355         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
17356 #else
17357         extern int testdata[3];
17358         return testdata[0] == 123
17359            &&  testdata[1] == 456
17360            &&  testdata[2] == 789;
17361 #endif
17362 }
17363 EOF
17364         if { (eval echo "$as_me:17364: \"$ac_compile\"") >&5
17365   (eval $ac_compile) 2>&5
17366   ac_status=$?
17367   echo "$as_me:17367: \$? = $ac_status" >&5
17368   (exit $ac_status); }; then
17369                 mv conftest.o func.o && \
17370                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17371         fi
17372         rm -f conftest.$ac_ext func.o
17373         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17374         cf_saveLIBS="$LIBS"
17375         LIBS="conftest.a $LIBS"
17376         if test "$cross_compiling" = yes; then
17377   cf_cv_link_dataonly=unknown
17378 else
17379   cat >conftest.$ac_ext <<_ACEOF
17380 #line 17380 "configure"
17381 #include "confdefs.h"
17382
17383         int main(void)
17384         {
17385                 extern int testfunc();
17386                 ${cf_cv_main_return:-return} (!testfunc());
17387         }
17388
17389 _ACEOF
17390 rm -f conftest$ac_exeext
17391 if { (eval echo "$as_me:17391: \"$ac_link\"") >&5
17392   (eval $ac_link) 2>&5
17393   ac_status=$?
17394   echo "$as_me:17394: \$? = $ac_status" >&5
17395   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17396   { (eval echo "$as_me:17396: \"$ac_try\"") >&5
17397   (eval $ac_try) 2>&5
17398   ac_status=$?
17399   echo "$as_me:17399: \$? = $ac_status" >&5
17400   (exit $ac_status); }; }; then
17401   cf_cv_link_dataonly=yes
17402 else
17403   echo "$as_me: program exited with status $ac_status" >&5
17404 echo "$as_me: failed program was:" >&5
17405 cat conftest.$ac_ext >&5
17406 cf_cv_link_dataonly=no
17407 fi
17408 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17409 fi
17410         LIBS="$cf_saveLIBS"
17411
17412 fi
17413
17414 echo "$as_me:17414: result: $cf_cv_link_dataonly" >&5
17415 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17416
17417 if test "$cf_cv_link_dataonly" = no ; then
17418
17419 cat >>confdefs.h <<\EOF
17420 #define BROKEN_LINKER 1
17421 EOF
17422
17423         BROKEN_LINKER=1
17424 fi
17425
17426 ###     Checks for library functions.
17427
17428 for ac_func in \
17429 getcwd \
17430 getegid \
17431 geteuid \
17432 getopt \
17433 getttynam \
17434 issetugid \
17435 poll \
17436 putenv \
17437 remove \
17438 select \
17439 setbuf \
17440 setbuffer \
17441 setenv \
17442 setvbuf \
17443 sigaction \
17444 sigvec \
17445 strdup \
17446 strstr \
17447 tcgetpgrp \
17448 tdestroy \
17449 times \
17450 tsearch \
17451 vsnprintf \
17452
17453 do
17454 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17455 echo "$as_me:17455: checking for $ac_func" >&5
17456 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17457 if eval "test \"\${$as_ac_var+set}\" = set"; then
17458   echo $ECHO_N "(cached) $ECHO_C" >&6
17459 else
17460   cat >conftest.$ac_ext <<_ACEOF
17461 #line 17461 "configure"
17462 #include "confdefs.h"
17463 /* System header to define __stub macros and hopefully few prototypes,
17464     which can conflict with char $ac_func (); below.  */
17465 #include <assert.h>
17466 /* Override any gcc2 internal prototype to avoid an error.  */
17467 #ifdef __cplusplus
17468 extern "C"
17469 #endif
17470 /* We use char because int might match the return type of a gcc2
17471    builtin and then its argument prototype would still apply.  */
17472 char $ac_func ();
17473 char (*f) ();
17474
17475 int
17476 main (void)
17477 {
17478 /* The GNU C library defines this for functions which it implements
17479     to always fail with ENOSYS.  Some functions are actually named
17480     something starting with __ and the normal name is an alias.  */
17481 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17482 choke me
17483 #else
17484 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17485 #endif
17486
17487   ;
17488   return 0;
17489 }
17490 _ACEOF
17491 rm -f conftest.$ac_objext conftest$ac_exeext
17492 if { (eval echo "$as_me:17492: \"$ac_link\"") >&5
17493   (eval $ac_link) 2>&5
17494   ac_status=$?
17495   echo "$as_me:17495: \$? = $ac_status" >&5
17496   (exit $ac_status); } &&
17497          { ac_try='test -s conftest$ac_exeext'
17498   { (eval echo "$as_me:17498: \"$ac_try\"") >&5
17499   (eval $ac_try) 2>&5
17500   ac_status=$?
17501   echo "$as_me:17501: \$? = $ac_status" >&5
17502   (exit $ac_status); }; }; then
17503   eval "$as_ac_var=yes"
17504 else
17505   echo "$as_me: failed program was:" >&5
17506 cat conftest.$ac_ext >&5
17507 eval "$as_ac_var=no"
17508 fi
17509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17510 fi
17511 echo "$as_me:17511: result: `eval echo '${'$as_ac_var'}'`" >&5
17512 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17513 if test `eval echo '${'$as_ac_var'}'` = yes; then
17514   cat >>confdefs.h <<EOF
17515 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17516 EOF
17517
17518 fi
17519 done
17520
17521 if test "x$ac_cv_func_getopt" = xno && \
17522    test "x$cf_with_progs$cf_with_tests" != xnono; then
17523         { { echo "$as_me:17523: error: getopt is required for building programs" >&5
17524 echo "$as_me: error: getopt is required for building programs" >&2;}
17525    { (exit 1); exit 1; }; }
17526 fi
17527
17528 if test "x$with_getcap" = "xyes" ; then
17529
17530 echo "$as_me:17530: checking for terminal-capability database functions" >&5
17531 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17532 if test "${cf_cv_cgetent+set}" = set; then
17533   echo $ECHO_N "(cached) $ECHO_C" >&6
17534 else
17535
17536 cat >conftest.$ac_ext <<_ACEOF
17537 #line 17537 "configure"
17538 #include "confdefs.h"
17539
17540 #include <stdlib.h>
17541 int
17542 main (void)
17543 {
17544
17545         char temp[128];
17546         char *buf = temp;
17547         char *db_array = temp;
17548         cgetent(&buf, &db_array, "vt100");
17549         cgetcap(buf, "tc", '=');
17550         cgetmatch(buf, "tc");
17551
17552   ;
17553   return 0;
17554 }
17555 _ACEOF
17556 rm -f conftest.$ac_objext conftest$ac_exeext
17557 if { (eval echo "$as_me:17557: \"$ac_link\"") >&5
17558   (eval $ac_link) 2>&5
17559   ac_status=$?
17560   echo "$as_me:17560: \$? = $ac_status" >&5
17561   (exit $ac_status); } &&
17562          { ac_try='test -s conftest$ac_exeext'
17563   { (eval echo "$as_me:17563: \"$ac_try\"") >&5
17564   (eval $ac_try) 2>&5
17565   ac_status=$?
17566   echo "$as_me:17566: \$? = $ac_status" >&5
17567   (exit $ac_status); }; }; then
17568   cf_cv_cgetent=yes
17569 else
17570   echo "$as_me: failed program was:" >&5
17571 cat conftest.$ac_ext >&5
17572 cf_cv_cgetent=no
17573 fi
17574 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17575
17576 fi
17577 echo "$as_me:17577: result: $cf_cv_cgetent" >&5
17578 echo "${ECHO_T}$cf_cv_cgetent" >&6
17579
17580 if test "$cf_cv_cgetent" = yes
17581 then
17582
17583 cat >>confdefs.h <<\EOF
17584 #define HAVE_BSD_CGETENT 1
17585 EOF
17586
17587 echo "$as_me:17587: checking if cgetent uses const parameter" >&5
17588 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17589 if test "${cf_cv_cgetent_const+set}" = set; then
17590   echo $ECHO_N "(cached) $ECHO_C" >&6
17591 else
17592
17593 cat >conftest.$ac_ext <<_ACEOF
17594 #line 17594 "configure"
17595 #include "confdefs.h"
17596
17597 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17598 #include <stdlib.h>
17599 int
17600 main (void)
17601 {
17602
17603         char temp[128];
17604         char *buf = temp;
17605 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17606         const char *db_array = temp;
17607         cgetent(&buf, &db_array, "vt100");
17608 #endif
17609         cgetcap(buf, "tc", '=');
17610         cgetmatch(buf, "tc");
17611
17612   ;
17613   return 0;
17614 }
17615 _ACEOF
17616 rm -f conftest.$ac_objext conftest$ac_exeext
17617 if { (eval echo "$as_me:17617: \"$ac_link\"") >&5
17618   (eval $ac_link) 2>&5
17619   ac_status=$?
17620   echo "$as_me:17620: \$? = $ac_status" >&5
17621   (exit $ac_status); } &&
17622          { ac_try='test -s conftest$ac_exeext'
17623   { (eval echo "$as_me:17623: \"$ac_try\"") >&5
17624   (eval $ac_try) 2>&5
17625   ac_status=$?
17626   echo "$as_me:17626: \$? = $ac_status" >&5
17627   (exit $ac_status); }; }; then
17628   cf_cv_cgetent_const=yes
17629 else
17630   echo "$as_me: failed program was:" >&5
17631 cat conftest.$ac_ext >&5
17632 cf_cv_cgetent_const=no
17633 fi
17634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17635
17636 fi
17637 echo "$as_me:17637: result: $cf_cv_cgetent_const" >&5
17638 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17639         if test "$cf_cv_cgetent_const" = yes
17640         then
17641
17642 cat >>confdefs.h <<EOF
17643 #define CGETENT_CONST const
17644 EOF
17645
17646         fi
17647 fi
17648
17649 fi
17650
17651 echo "$as_me:17651: checking for isascii" >&5
17652 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17653 if test "${cf_cv_have_isascii+set}" = set; then
17654   echo $ECHO_N "(cached) $ECHO_C" >&6
17655 else
17656
17657         cat >conftest.$ac_ext <<_ACEOF
17658 #line 17658 "configure"
17659 #include "confdefs.h"
17660 #include <ctype.h>
17661 int
17662 main (void)
17663 {
17664 int x = isascii(' ')
17665   ;
17666   return 0;
17667 }
17668 _ACEOF
17669 rm -f conftest.$ac_objext conftest$ac_exeext
17670 if { (eval echo "$as_me:17670: \"$ac_link\"") >&5
17671   (eval $ac_link) 2>&5
17672   ac_status=$?
17673   echo "$as_me:17673: \$? = $ac_status" >&5
17674   (exit $ac_status); } &&
17675          { ac_try='test -s conftest$ac_exeext'
17676   { (eval echo "$as_me:17676: \"$ac_try\"") >&5
17677   (eval $ac_try) 2>&5
17678   ac_status=$?
17679   echo "$as_me:17679: \$? = $ac_status" >&5
17680   (exit $ac_status); }; }; then
17681   cf_cv_have_isascii=yes
17682 else
17683   echo "$as_me: failed program was:" >&5
17684 cat conftest.$ac_ext >&5
17685 cf_cv_have_isascii=no
17686 fi
17687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17688
17689 fi
17690 echo "$as_me:17690: result: $cf_cv_have_isascii" >&5
17691 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17692 test "$cf_cv_have_isascii" = yes &&
17693 cat >>confdefs.h <<\EOF
17694 #define HAVE_ISASCII 1
17695 EOF
17696
17697 if test "$ac_cv_func_sigaction" = yes; then
17698 echo "$as_me:17698: checking whether sigaction needs _POSIX_SOURCE" >&5
17699 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17700 cat >conftest.$ac_ext <<_ACEOF
17701 #line 17701 "configure"
17702 #include "confdefs.h"
17703
17704 #include <sys/types.h>
17705 #include <signal.h>
17706 int
17707 main (void)
17708 {
17709 struct sigaction act
17710   ;
17711   return 0;
17712 }
17713 _ACEOF
17714 rm -f conftest.$ac_objext
17715 if { (eval echo "$as_me:17715: \"$ac_compile\"") >&5
17716   (eval $ac_compile) 2>&5
17717   ac_status=$?
17718   echo "$as_me:17718: \$? = $ac_status" >&5
17719   (exit $ac_status); } &&
17720          { ac_try='test -s conftest.$ac_objext'
17721   { (eval echo "$as_me:17721: \"$ac_try\"") >&5
17722   (eval $ac_try) 2>&5
17723   ac_status=$?
17724   echo "$as_me:17724: \$? = $ac_status" >&5
17725   (exit $ac_status); }; }; then
17726   sigact_bad=no
17727 else
17728   echo "$as_me: failed program was:" >&5
17729 cat conftest.$ac_ext >&5
17730
17731 cat >conftest.$ac_ext <<_ACEOF
17732 #line 17732 "configure"
17733 #include "confdefs.h"
17734
17735 #define _POSIX_SOURCE
17736 #include <sys/types.h>
17737 #include <signal.h>
17738 int
17739 main (void)
17740 {
17741 struct sigaction act
17742   ;
17743   return 0;
17744 }
17745 _ACEOF
17746 rm -f conftest.$ac_objext
17747 if { (eval echo "$as_me:17747: \"$ac_compile\"") >&5
17748   (eval $ac_compile) 2>&5
17749   ac_status=$?
17750   echo "$as_me:17750: \$? = $ac_status" >&5
17751   (exit $ac_status); } &&
17752          { ac_try='test -s conftest.$ac_objext'
17753   { (eval echo "$as_me:17753: \"$ac_try\"") >&5
17754   (eval $ac_try) 2>&5
17755   ac_status=$?
17756   echo "$as_me:17756: \$? = $ac_status" >&5
17757   (exit $ac_status); }; }; then
17758   sigact_bad=yes
17759
17760 cat >>confdefs.h <<\EOF
17761 #define _POSIX_SOURCE 1
17762 EOF
17763
17764 else
17765   echo "$as_me: failed program was:" >&5
17766 cat conftest.$ac_ext >&5
17767 sigact_bad=unknown
17768 fi
17769 rm -f conftest.$ac_objext conftest.$ac_ext
17770 fi
17771 rm -f conftest.$ac_objext conftest.$ac_ext
17772 echo "$as_me:17772: result: $sigact_bad" >&5
17773 echo "${ECHO_T}$sigact_bad" >&6
17774 fi
17775
17776 echo "$as_me:17776: checking if nanosleep really works" >&5
17777 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17778 if test "${cf_cv_func_nanosleep+set}" = set; then
17779   echo $ECHO_N "(cached) $ECHO_C" >&6
17780 else
17781
17782 if test "$cross_compiling" = yes; then
17783   cf_cv_func_nanosleep=unknown
17784 else
17785   cat >conftest.$ac_ext <<_ACEOF
17786 #line 17786 "configure"
17787 #include "confdefs.h"
17788
17789 #include <stdio.h>
17790 #include <errno.h>
17791 #include <time.h>
17792
17793 #ifdef HAVE_SYS_TIME_H
17794 #include <sys/time.h>
17795 #endif
17796
17797 int main(void) {
17798         struct timespec ts1, ts2;
17799         int code;
17800         ts1.tv_sec  = 0;
17801         ts1.tv_nsec = 750000000;
17802         ts2.tv_sec  = 0;
17803         ts2.tv_nsec = 0;
17804         errno = 0;
17805         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17806         ${cf_cv_main_return:-return}(code != 0);
17807 }
17808
17809 _ACEOF
17810 rm -f conftest$ac_exeext
17811 if { (eval echo "$as_me:17811: \"$ac_link\"") >&5
17812   (eval $ac_link) 2>&5
17813   ac_status=$?
17814   echo "$as_me:17814: \$? = $ac_status" >&5
17815   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17816   { (eval echo "$as_me:17816: \"$ac_try\"") >&5
17817   (eval $ac_try) 2>&5
17818   ac_status=$?
17819   echo "$as_me:17819: \$? = $ac_status" >&5
17820   (exit $ac_status); }; }; then
17821   cf_cv_func_nanosleep=yes
17822 else
17823   echo "$as_me: program exited with status $ac_status" >&5
17824 echo "$as_me: failed program was:" >&5
17825 cat conftest.$ac_ext >&5
17826 cf_cv_func_nanosleep=no
17827 fi
17828 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17829 fi
17830 fi
17831 echo "$as_me:17831: result: $cf_cv_func_nanosleep" >&5
17832 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17833
17834 test "$cf_cv_func_nanosleep" = "yes" &&
17835 cat >>confdefs.h <<\EOF
17836 #define HAVE_NANOSLEEP 1
17837 EOF
17838
17839 for ac_header in \
17840 termio.h \
17841 termios.h \
17842 unistd.h \
17843
17844 do
17845 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17846 echo "$as_me:17846: checking for $ac_header" >&5
17847 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17848 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17849   echo $ECHO_N "(cached) $ECHO_C" >&6
17850 else
17851   cat >conftest.$ac_ext <<_ACEOF
17852 #line 17852 "configure"
17853 #include "confdefs.h"
17854 #include <$ac_header>
17855 _ACEOF
17856 if { (eval echo "$as_me:17856: \"$ac_cpp conftest.$ac_ext\"") >&5
17857   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17858   ac_status=$?
17859   egrep -v '^ *\+' conftest.er1 >conftest.err
17860   rm -f conftest.er1
17861   cat conftest.err >&5
17862   echo "$as_me:17862: \$? = $ac_status" >&5
17863   (exit $ac_status); } >/dev/null; then
17864   if test -s conftest.err; then
17865     ac_cpp_err=$ac_c_preproc_warn_flag
17866   else
17867     ac_cpp_err=
17868   fi
17869 else
17870   ac_cpp_err=yes
17871 fi
17872 if test -z "$ac_cpp_err"; then
17873   eval "$as_ac_Header=yes"
17874 else
17875   echo "$as_me: failed program was:" >&5
17876   cat conftest.$ac_ext >&5
17877   eval "$as_ac_Header=no"
17878 fi
17879 rm -f conftest.err conftest.$ac_ext
17880 fi
17881 echo "$as_me:17881: result: `eval echo '${'$as_ac_Header'}'`" >&5
17882 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17883 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17884   cat >>confdefs.h <<EOF
17885 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17886 EOF
17887
17888 fi
17889 done
17890
17891 if test "$ISC" = yes ; then
17892
17893 for ac_header in sys/termio.h
17894 do
17895 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17896 echo "$as_me:17896: checking for $ac_header" >&5
17897 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17898 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17899   echo $ECHO_N "(cached) $ECHO_C" >&6
17900 else
17901   cat >conftest.$ac_ext <<_ACEOF
17902 #line 17902 "configure"
17903 #include "confdefs.h"
17904 #include <$ac_header>
17905 _ACEOF
17906 if { (eval echo "$as_me:17906: \"$ac_cpp conftest.$ac_ext\"") >&5
17907   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17908   ac_status=$?
17909   egrep -v '^ *\+' conftest.er1 >conftest.err
17910   rm -f conftest.er1
17911   cat conftest.err >&5
17912   echo "$as_me:17912: \$? = $ac_status" >&5
17913   (exit $ac_status); } >/dev/null; then
17914   if test -s conftest.err; then
17915     ac_cpp_err=$ac_c_preproc_warn_flag
17916   else
17917     ac_cpp_err=
17918   fi
17919 else
17920   ac_cpp_err=yes
17921 fi
17922 if test -z "$ac_cpp_err"; then
17923   eval "$as_ac_Header=yes"
17924 else
17925   echo "$as_me: failed program was:" >&5
17926   cat conftest.$ac_ext >&5
17927   eval "$as_ac_Header=no"
17928 fi
17929 rm -f conftest.err conftest.$ac_ext
17930 fi
17931 echo "$as_me:17931: result: `eval echo '${'$as_ac_Header'}'`" >&5
17932 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17933 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17934   cat >>confdefs.h <<EOF
17935 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17936 EOF
17937
17938 fi
17939 done
17940
17941 fi
17942 if test "$ac_cv_header_termios_h" = yes ; then
17943         case "$CFLAGS $CPPFLAGS" in
17944         (*-D_POSIX_SOURCE*)
17945                 termios_bad=dunno ;;
17946         (*)     termios_bad=maybe ;;
17947         esac
17948         if test "$termios_bad" = maybe ; then
17949         echo "$as_me:17949: checking whether termios.h needs _POSIX_SOURCE" >&5
17950 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17951         cat >conftest.$ac_ext <<_ACEOF
17952 #line 17952 "configure"
17953 #include "confdefs.h"
17954 #include <termios.h>
17955 int
17956 main (void)
17957 {
17958 struct termios foo; int x = foo.c_iflag
17959   ;
17960   return 0;
17961 }
17962 _ACEOF
17963 rm -f conftest.$ac_objext
17964 if { (eval echo "$as_me:17964: \"$ac_compile\"") >&5
17965   (eval $ac_compile) 2>&5
17966   ac_status=$?
17967   echo "$as_me:17967: \$? = $ac_status" >&5
17968   (exit $ac_status); } &&
17969          { ac_try='test -s conftest.$ac_objext'
17970   { (eval echo "$as_me:17970: \"$ac_try\"") >&5
17971   (eval $ac_try) 2>&5
17972   ac_status=$?
17973   echo "$as_me:17973: \$? = $ac_status" >&5
17974   (exit $ac_status); }; }; then
17975   termios_bad=no
17976 else
17977   echo "$as_me: failed program was:" >&5
17978 cat conftest.$ac_ext >&5
17979
17980                 cat >conftest.$ac_ext <<_ACEOF
17981 #line 17981 "configure"
17982 #include "confdefs.h"
17983
17984 #define _POSIX_SOURCE
17985 #include <termios.h>
17986 int
17987 main (void)
17988 {
17989 struct termios foo; int x = foo.c_iflag
17990   ;
17991   return 0;
17992 }
17993 _ACEOF
17994 rm -f conftest.$ac_objext
17995 if { (eval echo "$as_me:17995: \"$ac_compile\"") >&5
17996   (eval $ac_compile) 2>&5
17997   ac_status=$?
17998   echo "$as_me:17998: \$? = $ac_status" >&5
17999   (exit $ac_status); } &&
18000          { ac_try='test -s conftest.$ac_objext'
18001   { (eval echo "$as_me:18001: \"$ac_try\"") >&5
18002   (eval $ac_try) 2>&5
18003   ac_status=$?
18004   echo "$as_me:18004: \$? = $ac_status" >&5
18005   (exit $ac_status); }; }; then
18006   termios_bad=unknown
18007 else
18008   echo "$as_me: failed program was:" >&5
18009 cat conftest.$ac_ext >&5
18010 termios_bad=yes
18011 cat >>confdefs.h <<\EOF
18012 #define _POSIX_SOURCE 1
18013 EOF
18014
18015 fi
18016 rm -f conftest.$ac_objext conftest.$ac_ext
18017
18018 fi
18019 rm -f conftest.$ac_objext conftest.$ac_ext
18020         echo "$as_me:18020: result: $termios_bad" >&5
18021 echo "${ECHO_T}$termios_bad" >&6
18022         fi
18023 fi
18024
18025 echo "$as_me:18025: checking for tcgetattr" >&5
18026 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
18027 if test "${cf_cv_have_tcgetattr+set}" = set; then
18028   echo $ECHO_N "(cached) $ECHO_C" >&6
18029 else
18030
18031 cat >conftest.$ac_ext <<_ACEOF
18032 #line 18032 "configure"
18033 #include "confdefs.h"
18034
18035 #include <sys/types.h>
18036 #ifdef HAVE_UNISTD_H
18037 #include <unistd.h>
18038 #endif
18039 #ifdef HAVE_TERMIOS_H
18040 #include <termios.h>
18041 #define TTY struct termios
18042 #else
18043 #ifdef HAVE_TERMIO_H
18044 #include <termio.h>
18045 #define TTY struct termio
18046 #endif
18047 #endif
18048
18049 int
18050 main (void)
18051 {
18052
18053 TTY foo;
18054 tcgetattr(1, &foo);
18055   ;
18056   return 0;
18057 }
18058 _ACEOF
18059 rm -f conftest.$ac_objext conftest$ac_exeext
18060 if { (eval echo "$as_me:18060: \"$ac_link\"") >&5
18061   (eval $ac_link) 2>&5
18062   ac_status=$?
18063   echo "$as_me:18063: \$? = $ac_status" >&5
18064   (exit $ac_status); } &&
18065          { ac_try='test -s conftest$ac_exeext'
18066   { (eval echo "$as_me:18066: \"$ac_try\"") >&5
18067   (eval $ac_try) 2>&5
18068   ac_status=$?
18069   echo "$as_me:18069: \$? = $ac_status" >&5
18070   (exit $ac_status); }; }; then
18071   cf_cv_have_tcgetattr=yes
18072 else
18073   echo "$as_me: failed program was:" >&5
18074 cat conftest.$ac_ext >&5
18075 cf_cv_have_tcgetattr=no
18076 fi
18077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18078 fi
18079 echo "$as_me:18079: result: $cf_cv_have_tcgetattr" >&5
18080 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
18081 test "$cf_cv_have_tcgetattr" = yes &&
18082 cat >>confdefs.h <<\EOF
18083 #define HAVE_TCGETATTR 1
18084 EOF
18085
18086 echo "$as_me:18086: checking for vsscanf function or workaround" >&5
18087 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
18088 if test "${cf_cv_func_vsscanf+set}" = set; then
18089   echo $ECHO_N "(cached) $ECHO_C" >&6
18090 else
18091
18092 cat >conftest.$ac_ext <<_ACEOF
18093 #line 18093 "configure"
18094 #include "confdefs.h"
18095
18096 #include <stdarg.h>
18097 #include <stdio.h>
18098 int
18099 main (void)
18100 {
18101
18102         va_list ap;
18103         vsscanf("from", "%d", ap)
18104   ;
18105   return 0;
18106 }
18107 _ACEOF
18108 rm -f conftest.$ac_objext conftest$ac_exeext
18109 if { (eval echo "$as_me:18109: \"$ac_link\"") >&5
18110   (eval $ac_link) 2>&5
18111   ac_status=$?
18112   echo "$as_me:18112: \$? = $ac_status" >&5
18113   (exit $ac_status); } &&
18114          { ac_try='test -s conftest$ac_exeext'
18115   { (eval echo "$as_me:18115: \"$ac_try\"") >&5
18116   (eval $ac_try) 2>&5
18117   ac_status=$?
18118   echo "$as_me:18118: \$? = $ac_status" >&5
18119   (exit $ac_status); }; }; then
18120   cf_cv_func_vsscanf=vsscanf
18121 else
18122   echo "$as_me: failed program was:" >&5
18123 cat conftest.$ac_ext >&5
18124
18125 cat >conftest.$ac_ext <<_ACEOF
18126 #line 18126 "configure"
18127 #include "confdefs.h"
18128
18129 #include <stdarg.h>
18130 #include <stdio.h>
18131 int
18132 main (void)
18133 {
18134
18135         FILE strbuf;
18136         char *str = "from";
18137
18138         strbuf._flag = _IOREAD;
18139         strbuf._ptr = strbuf._base = (unsigned char *) str;
18140         strbuf._cnt = strlen(str);
18141         strbuf._file = _NFILE;
18142         return (vfscanf(&strbuf, "%d", ap))
18143   ;
18144   return 0;
18145 }
18146 _ACEOF
18147 rm -f conftest.$ac_objext conftest$ac_exeext
18148 if { (eval echo "$as_me:18148: \"$ac_link\"") >&5
18149   (eval $ac_link) 2>&5
18150   ac_status=$?
18151   echo "$as_me:18151: \$? = $ac_status" >&5
18152   (exit $ac_status); } &&
18153          { ac_try='test -s conftest$ac_exeext'
18154   { (eval echo "$as_me:18154: \"$ac_try\"") >&5
18155   (eval $ac_try) 2>&5
18156   ac_status=$?
18157   echo "$as_me:18157: \$? = $ac_status" >&5
18158   (exit $ac_status); }; }; then
18159   cf_cv_func_vsscanf=vfscanf
18160 else
18161   echo "$as_me: failed program was:" >&5
18162 cat conftest.$ac_ext >&5
18163
18164 cat >conftest.$ac_ext <<_ACEOF
18165 #line 18165 "configure"
18166 #include "confdefs.h"
18167
18168 #include <stdarg.h>
18169 #include <stdio.h>
18170 int
18171 main (void)
18172 {
18173
18174         FILE strbuf;
18175         char *str = "from";
18176
18177         strbuf._flag = _IOREAD;
18178         strbuf._ptr = strbuf._base = (unsigned char *) str;
18179         strbuf._cnt = strlen(str);
18180         strbuf._file = _NFILE;
18181         return (_doscan(&strbuf, "%d", ap))
18182   ;
18183   return 0;
18184 }
18185 _ACEOF
18186 rm -f conftest.$ac_objext conftest$ac_exeext
18187 if { (eval echo "$as_me:18187: \"$ac_link\"") >&5
18188   (eval $ac_link) 2>&5
18189   ac_status=$?
18190   echo "$as_me:18190: \$? = $ac_status" >&5
18191   (exit $ac_status); } &&
18192          { ac_try='test -s conftest$ac_exeext'
18193   { (eval echo "$as_me:18193: \"$ac_try\"") >&5
18194   (eval $ac_try) 2>&5
18195   ac_status=$?
18196   echo "$as_me:18196: \$? = $ac_status" >&5
18197   (exit $ac_status); }; }; then
18198   cf_cv_func_vsscanf=_doscan
18199 else
18200   echo "$as_me: failed program was:" >&5
18201 cat conftest.$ac_ext >&5
18202
18203 cf_cv_func_vsscanf=no
18204 fi
18205 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18206 fi
18207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18208 fi
18209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18210 fi
18211 echo "$as_me:18211: result: $cf_cv_func_vsscanf" >&5
18212 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
18213
18214 case $cf_cv_func_vsscanf in
18215 (vsscanf)
18216 cat >>confdefs.h <<\EOF
18217 #define HAVE_VSSCANF 1
18218 EOF
18219 ;;
18220 (vfscanf)
18221 cat >>confdefs.h <<\EOF
18222 #define HAVE_VFSCANF 1
18223 EOF
18224 ;;
18225 (_doscan)
18226 cat >>confdefs.h <<\EOF
18227 #define HAVE__DOSCAN 1
18228 EOF
18229 ;;
18230 esac
18231
18232 for ac_header in \
18233 unistd.h \
18234
18235 do
18236 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18237 echo "$as_me:18237: checking for $ac_header" >&5
18238 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18239 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18240   echo $ECHO_N "(cached) $ECHO_C" >&6
18241 else
18242   cat >conftest.$ac_ext <<_ACEOF
18243 #line 18243 "configure"
18244 #include "confdefs.h"
18245 #include <$ac_header>
18246 _ACEOF
18247 if { (eval echo "$as_me:18247: \"$ac_cpp conftest.$ac_ext\"") >&5
18248   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18249   ac_status=$?
18250   egrep -v '^ *\+' conftest.er1 >conftest.err
18251   rm -f conftest.er1
18252   cat conftest.err >&5
18253   echo "$as_me:18253: \$? = $ac_status" >&5
18254   (exit $ac_status); } >/dev/null; then
18255   if test -s conftest.err; then
18256     ac_cpp_err=$ac_c_preproc_warn_flag
18257   else
18258     ac_cpp_err=
18259   fi
18260 else
18261   ac_cpp_err=yes
18262 fi
18263 if test -z "$ac_cpp_err"; then
18264   eval "$as_ac_Header=yes"
18265 else
18266   echo "$as_me: failed program was:" >&5
18267   cat conftest.$ac_ext >&5
18268   eval "$as_ac_Header=no"
18269 fi
18270 rm -f conftest.err conftest.$ac_ext
18271 fi
18272 echo "$as_me:18272: result: `eval echo '${'$as_ac_Header'}'`" >&5
18273 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18274 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18275   cat >>confdefs.h <<EOF
18276 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18277 EOF
18278
18279 fi
18280 done
18281
18282 echo "$as_me:18282: checking for working mkstemp" >&5
18283 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18284 if test "${cf_cv_func_mkstemp+set}" = set; then
18285   echo $ECHO_N "(cached) $ECHO_C" >&6
18286 else
18287
18288 rm -rf conftest*
18289 if test "$cross_compiling" = yes; then
18290   cf_cv_func_mkstemp=maybe
18291 else
18292   cat >conftest.$ac_ext <<_ACEOF
18293 #line 18293 "configure"
18294 #include "confdefs.h"
18295
18296 #include <sys/types.h>
18297 #ifdef HAVE_UNISTD_H
18298 #include <unistd.h>
18299 #endif
18300 #include <stdlib.h>
18301 #include <stdio.h>
18302 #include <string.h>
18303 #include <sys/stat.h>
18304 int main(void)
18305 {
18306         char *tmpl = "conftestXXXXXX";
18307         char name[2][80];
18308         int n;
18309         int result = 0;
18310         int fd;
18311         struct stat sb;
18312
18313         umask(077);
18314         for (n = 0; n < 2; ++n) {
18315                 strcpy(name[n], tmpl);
18316                 if ((fd = mkstemp(name[n])) >= 0) {
18317                         if (!strcmp(name[n], tmpl)
18318                          || stat(name[n], &sb) != 0
18319                          || (sb.st_mode & S_IFMT) != S_IFREG
18320                          || (sb.st_mode & 077) != 0) {
18321                                 result = 1;
18322                         }
18323                         close(fd);
18324                 }
18325         }
18326         if (result == 0
18327          && !strcmp(name[0], name[1]))
18328                 result = 1;
18329         ${cf_cv_main_return:-return}(result);
18330 }
18331
18332 _ACEOF
18333 rm -f conftest$ac_exeext
18334 if { (eval echo "$as_me:18334: \"$ac_link\"") >&5
18335   (eval $ac_link) 2>&5
18336   ac_status=$?
18337   echo "$as_me:18337: \$? = $ac_status" >&5
18338   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18339   { (eval echo "$as_me:18339: \"$ac_try\"") >&5
18340   (eval $ac_try) 2>&5
18341   ac_status=$?
18342   echo "$as_me:18342: \$? = $ac_status" >&5
18343   (exit $ac_status); }; }; then
18344   cf_cv_func_mkstemp=yes
18345
18346 else
18347   echo "$as_me: program exited with status $ac_status" >&5
18348 echo "$as_me: failed program was:" >&5
18349 cat conftest.$ac_ext >&5
18350 cf_cv_func_mkstemp=no
18351
18352 fi
18353 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18354 fi
18355
18356 fi
18357 echo "$as_me:18357: result: $cf_cv_func_mkstemp" >&5
18358 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
18359 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
18360         echo "$as_me:18360: checking for mkstemp" >&5
18361 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
18362 if test "${ac_cv_func_mkstemp+set}" = set; then
18363   echo $ECHO_N "(cached) $ECHO_C" >&6
18364 else
18365   cat >conftest.$ac_ext <<_ACEOF
18366 #line 18366 "configure"
18367 #include "confdefs.h"
18368 /* System header to define __stub macros and hopefully few prototypes,
18369     which can conflict with char mkstemp (); below.  */
18370 #include <assert.h>
18371 /* Override any gcc2 internal prototype to avoid an error.  */
18372 #ifdef __cplusplus
18373 extern "C"
18374 #endif
18375 /* We use char because int might match the return type of a gcc2
18376    builtin and then its argument prototype would still apply.  */
18377 char mkstemp ();
18378 char (*f) ();
18379
18380 int
18381 main (void)
18382 {
18383 /* The GNU C library defines this for functions which it implements
18384     to always fail with ENOSYS.  Some functions are actually named
18385     something starting with __ and the normal name is an alias.  */
18386 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18387 choke me
18388 #else
18389 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18390 #endif
18391
18392   ;
18393   return 0;
18394 }
18395 _ACEOF
18396 rm -f conftest.$ac_objext conftest$ac_exeext
18397 if { (eval echo "$as_me:18397: \"$ac_link\"") >&5
18398   (eval $ac_link) 2>&5
18399   ac_status=$?
18400   echo "$as_me:18400: \$? = $ac_status" >&5
18401   (exit $ac_status); } &&
18402          { ac_try='test -s conftest$ac_exeext'
18403   { (eval echo "$as_me:18403: \"$ac_try\"") >&5
18404   (eval $ac_try) 2>&5
18405   ac_status=$?
18406   echo "$as_me:18406: \$? = $ac_status" >&5
18407   (exit $ac_status); }; }; then
18408   ac_cv_func_mkstemp=yes
18409 else
18410   echo "$as_me: failed program was:" >&5
18411 cat conftest.$ac_ext >&5
18412 ac_cv_func_mkstemp=no
18413 fi
18414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18415 fi
18416 echo "$as_me:18416: result: $ac_cv_func_mkstemp" >&5
18417 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18418
18419 fi
18420 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18421
18422 cat >>confdefs.h <<\EOF
18423 #define HAVE_MKSTEMP 1
18424 EOF
18425
18426 fi
18427
18428 # setup for prototype of fallback for vsscanf()
18429
18430 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18431         HAVE_VSSCANF=1
18432 else
18433         HAVE_VSSCANF=0
18434 fi
18435
18436 if test "x$cross_compiling" = xyes ; then
18437         { echo "$as_me:18437: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18438 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18439 else
18440         echo "$as_me:18440: checking whether setvbuf arguments are reversed" >&5
18441 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18442 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18443   echo $ECHO_N "(cached) $ECHO_C" >&6
18444 else
18445   if test "$cross_compiling" = yes; then
18446   { { echo "$as_me:18446: error: cannot run test program while cross compiling" >&5
18447 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18448    { (exit 1); exit 1; }; }
18449 else
18450   cat >conftest.$ac_ext <<_ACEOF
18451 #line 18451 "configure"
18452 #include "confdefs.h"
18453 #include <stdio.h>
18454 /* If setvbuf has the reversed format, exit 0. */
18455 int
18456 main (void)
18457 {
18458   /* This call has the arguments reversed.
18459      A reversed system may check and see that the address of main
18460      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18461   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18462     $ac_main_return(1);
18463   putc('\r', stdout);
18464   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18465 }
18466 _ACEOF
18467 rm -f conftest$ac_exeext
18468 if { (eval echo "$as_me:18468: \"$ac_link\"") >&5
18469   (eval $ac_link) 2>&5
18470   ac_status=$?
18471   echo "$as_me:18471: \$? = $ac_status" >&5
18472   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18473   { (eval echo "$as_me:18473: \"$ac_try\"") >&5
18474   (eval $ac_try) 2>&5
18475   ac_status=$?
18476   echo "$as_me:18476: \$? = $ac_status" >&5
18477   (exit $ac_status); }; }; then
18478   ac_cv_func_setvbuf_reversed=yes
18479 else
18480   echo "$as_me: program exited with status $ac_status" >&5
18481 echo "$as_me: failed program was:" >&5
18482 cat conftest.$ac_ext >&5
18483 ac_cv_func_setvbuf_reversed=no
18484 fi
18485 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18486 fi
18487 rm -f core core.* *.core
18488 fi
18489 echo "$as_me:18489: result: $ac_cv_func_setvbuf_reversed" >&5
18490 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18491 if test $ac_cv_func_setvbuf_reversed = yes; then
18492
18493 cat >>confdefs.h <<\EOF
18494 #define SETVBUF_REVERSED 1
18495 EOF
18496
18497 fi
18498
18499 fi
18500 echo "$as_me:18500: checking for intptr_t" >&5
18501 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18502 if test "${ac_cv_type_intptr_t+set}" = set; then
18503   echo $ECHO_N "(cached) $ECHO_C" >&6
18504 else
18505   cat >conftest.$ac_ext <<_ACEOF
18506 #line 18506 "configure"
18507 #include "confdefs.h"
18508 $ac_includes_default
18509 int
18510 main (void)
18511 {
18512 if ((intptr_t *) 0)
18513   return 0;
18514 if (sizeof (intptr_t))
18515   return 0;
18516   ;
18517   return 0;
18518 }
18519 _ACEOF
18520 rm -f conftest.$ac_objext
18521 if { (eval echo "$as_me:18521: \"$ac_compile\"") >&5
18522   (eval $ac_compile) 2>&5
18523   ac_status=$?
18524   echo "$as_me:18524: \$? = $ac_status" >&5
18525   (exit $ac_status); } &&
18526          { ac_try='test -s conftest.$ac_objext'
18527   { (eval echo "$as_me:18527: \"$ac_try\"") >&5
18528   (eval $ac_try) 2>&5
18529   ac_status=$?
18530   echo "$as_me:18530: \$? = $ac_status" >&5
18531   (exit $ac_status); }; }; then
18532   ac_cv_type_intptr_t=yes
18533 else
18534   echo "$as_me: failed program was:" >&5
18535 cat conftest.$ac_ext >&5
18536 ac_cv_type_intptr_t=no
18537 fi
18538 rm -f conftest.$ac_objext conftest.$ac_ext
18539 fi
18540 echo "$as_me:18540: result: $ac_cv_type_intptr_t" >&5
18541 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18542 if test $ac_cv_type_intptr_t = yes; then
18543   :
18544 else
18545
18546 cat >>confdefs.h <<EOF
18547 #define intptr_t long
18548 EOF
18549
18550 fi
18551
18552 echo "$as_me:18552: checking for ssize_t" >&5
18553 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18554 if test "${ac_cv_type_ssize_t+set}" = set; then
18555   echo $ECHO_N "(cached) $ECHO_C" >&6
18556 else
18557   cat >conftest.$ac_ext <<_ACEOF
18558 #line 18558 "configure"
18559 #include "confdefs.h"
18560 $ac_includes_default
18561 int
18562 main (void)
18563 {
18564 if ((ssize_t *) 0)
18565   return 0;
18566 if (sizeof (ssize_t))
18567   return 0;
18568   ;
18569   return 0;
18570 }
18571 _ACEOF
18572 rm -f conftest.$ac_objext
18573 if { (eval echo "$as_me:18573: \"$ac_compile\"") >&5
18574   (eval $ac_compile) 2>&5
18575   ac_status=$?
18576   echo "$as_me:18576: \$? = $ac_status" >&5
18577   (exit $ac_status); } &&
18578          { ac_try='test -s conftest.$ac_objext'
18579   { (eval echo "$as_me:18579: \"$ac_try\"") >&5
18580   (eval $ac_try) 2>&5
18581   ac_status=$?
18582   echo "$as_me:18582: \$? = $ac_status" >&5
18583   (exit $ac_status); }; }; then
18584   ac_cv_type_ssize_t=yes
18585 else
18586   echo "$as_me: failed program was:" >&5
18587 cat conftest.$ac_ext >&5
18588 ac_cv_type_ssize_t=no
18589 fi
18590 rm -f conftest.$ac_objext conftest.$ac_ext
18591 fi
18592 echo "$as_me:18592: result: $ac_cv_type_ssize_t" >&5
18593 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18594 if test $ac_cv_type_ssize_t = yes; then
18595   :
18596 else
18597
18598 cat >>confdefs.h <<EOF
18599 #define ssize_t int
18600 EOF
18601
18602 fi
18603
18604 echo "$as_me:18604: checking for type sigaction_t" >&5
18605 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18606 if test "${cf_cv_type_sigaction+set}" = set; then
18607   echo $ECHO_N "(cached) $ECHO_C" >&6
18608 else
18609
18610         cat >conftest.$ac_ext <<_ACEOF
18611 #line 18611 "configure"
18612 #include "confdefs.h"
18613
18614 #include <signal.h>
18615 int
18616 main (void)
18617 {
18618 sigaction_t x
18619   ;
18620   return 0;
18621 }
18622 _ACEOF
18623 rm -f conftest.$ac_objext
18624 if { (eval echo "$as_me:18624: \"$ac_compile\"") >&5
18625   (eval $ac_compile) 2>&5
18626   ac_status=$?
18627   echo "$as_me:18627: \$? = $ac_status" >&5
18628   (exit $ac_status); } &&
18629          { ac_try='test -s conftest.$ac_objext'
18630   { (eval echo "$as_me:18630: \"$ac_try\"") >&5
18631   (eval $ac_try) 2>&5
18632   ac_status=$?
18633   echo "$as_me:18633: \$? = $ac_status" >&5
18634   (exit $ac_status); }; }; then
18635   cf_cv_type_sigaction=yes
18636 else
18637   echo "$as_me: failed program was:" >&5
18638 cat conftest.$ac_ext >&5
18639 cf_cv_type_sigaction=no
18640 fi
18641 rm -f conftest.$ac_objext conftest.$ac_ext
18642 fi
18643
18644 echo "$as_me:18644: result: $cf_cv_type_sigaction" >&5
18645 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18646 test "$cf_cv_type_sigaction" = yes &&
18647 cat >>confdefs.h <<\EOF
18648 #define HAVE_TYPE_SIGACTION 1
18649 EOF
18650
18651 echo "$as_me:18651: checking declaration of size-change" >&5
18652 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18653 if test "${cf_cv_sizechange+set}" = set; then
18654   echo $ECHO_N "(cached) $ECHO_C" >&6
18655 else
18656
18657         cf_cv_sizechange=unknown
18658         cf_save_CPPFLAGS="$CPPFLAGS"
18659
18660 for cf_opts in "" "NEED_PTEM_H"
18661 do
18662
18663         CPPFLAGS="$cf_save_CPPFLAGS"
18664         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18665         cat >conftest.$ac_ext <<_ACEOF
18666 #line 18666 "configure"
18667 #include "confdefs.h"
18668 #include <sys/types.h>
18669 #ifdef HAVE_TERMIOS_H
18670 #include <termios.h>
18671 #else
18672 #ifdef HAVE_TERMIO_H
18673 #include <termio.h>
18674 #endif
18675 #endif
18676 #ifdef NEED_PTEM_H
18677 /* This is a workaround for SCO:  they neglected to define struct winsize in
18678  * termios.h -- it's only in termio.h and ptem.h
18679  */
18680 #include        <sys/stream.h>
18681 #include        <sys/ptem.h>
18682 #endif
18683 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18684 #include <sys/ioctl.h>
18685 #endif
18686
18687 int
18688 main (void)
18689 {
18690
18691 #ifdef TIOCGSIZE
18692         struct ttysize win;     /* FIXME: what system is this? */
18693         int y = win.ts_lines;
18694         int x = win.ts_cols;
18695 #else
18696 #ifdef TIOCGWINSZ
18697         struct winsize win;
18698         int y = win.ws_row;
18699         int x = win.ws_col;
18700 #else
18701         no TIOCGSIZE or TIOCGWINSZ
18702 #endif /* TIOCGWINSZ */
18703 #endif /* TIOCGSIZE */
18704
18705   ;
18706   return 0;
18707 }
18708 _ACEOF
18709 rm -f conftest.$ac_objext
18710 if { (eval echo "$as_me:18710: \"$ac_compile\"") >&5
18711   (eval $ac_compile) 2>&5
18712   ac_status=$?
18713   echo "$as_me:18713: \$? = $ac_status" >&5
18714   (exit $ac_status); } &&
18715          { ac_try='test -s conftest.$ac_objext'
18716   { (eval echo "$as_me:18716: \"$ac_try\"") >&5
18717   (eval $ac_try) 2>&5
18718   ac_status=$?
18719   echo "$as_me:18719: \$? = $ac_status" >&5
18720   (exit $ac_status); }; }; then
18721   cf_cv_sizechange=yes
18722 else
18723   echo "$as_me: failed program was:" >&5
18724 cat conftest.$ac_ext >&5
18725 cf_cv_sizechange=no
18726 fi
18727 rm -f conftest.$ac_objext conftest.$ac_ext
18728
18729         CPPFLAGS="$cf_save_CPPFLAGS"
18730         if test "$cf_cv_sizechange" = yes ; then
18731                 echo "size-change succeeded ($cf_opts)" >&5
18732                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18733                 break
18734         fi
18735 done
18736
18737 fi
18738 echo "$as_me:18738: result: $cf_cv_sizechange" >&5
18739 echo "${ECHO_T}$cf_cv_sizechange" >&6
18740 if test "$cf_cv_sizechange" != no ; then
18741
18742 cat >>confdefs.h <<\EOF
18743 #define HAVE_SIZECHANGE 1
18744 EOF
18745
18746         case $cf_cv_sizechange in
18747         (NEED*)
18748                 cat >>confdefs.h <<EOF
18749 #define $cf_cv_sizechange  1
18750 EOF
18751
18752                 ;;
18753         esac
18754 fi
18755
18756 echo "$as_me:18756: checking for memmove" >&5
18757 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18758 if test "${ac_cv_func_memmove+set}" = set; then
18759   echo $ECHO_N "(cached) $ECHO_C" >&6
18760 else
18761   cat >conftest.$ac_ext <<_ACEOF
18762 #line 18762 "configure"
18763 #include "confdefs.h"
18764 /* System header to define __stub macros and hopefully few prototypes,
18765     which can conflict with char memmove (); below.  */
18766 #include <assert.h>
18767 /* Override any gcc2 internal prototype to avoid an error.  */
18768 #ifdef __cplusplus
18769 extern "C"
18770 #endif
18771 /* We use char because int might match the return type of a gcc2
18772    builtin and then its argument prototype would still apply.  */
18773 char memmove ();
18774 char (*f) ();
18775
18776 int
18777 main (void)
18778 {
18779 /* The GNU C library defines this for functions which it implements
18780     to always fail with ENOSYS.  Some functions are actually named
18781     something starting with __ and the normal name is an alias.  */
18782 #if defined (__stub_memmove) || defined (__stub___memmove)
18783 choke me
18784 #else
18785 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18786 #endif
18787
18788   ;
18789   return 0;
18790 }
18791 _ACEOF
18792 rm -f conftest.$ac_objext conftest$ac_exeext
18793 if { (eval echo "$as_me:18793: \"$ac_link\"") >&5
18794   (eval $ac_link) 2>&5
18795   ac_status=$?
18796   echo "$as_me:18796: \$? = $ac_status" >&5
18797   (exit $ac_status); } &&
18798          { ac_try='test -s conftest$ac_exeext'
18799   { (eval echo "$as_me:18799: \"$ac_try\"") >&5
18800   (eval $ac_try) 2>&5
18801   ac_status=$?
18802   echo "$as_me:18802: \$? = $ac_status" >&5
18803   (exit $ac_status); }; }; then
18804   ac_cv_func_memmove=yes
18805 else
18806   echo "$as_me: failed program was:" >&5
18807 cat conftest.$ac_ext >&5
18808 ac_cv_func_memmove=no
18809 fi
18810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18811 fi
18812 echo "$as_me:18812: result: $ac_cv_func_memmove" >&5
18813 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18814 if test $ac_cv_func_memmove = yes; then
18815   :
18816 else
18817
18818 echo "$as_me:18818: checking for bcopy" >&5
18819 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18820 if test "${ac_cv_func_bcopy+set}" = set; then
18821   echo $ECHO_N "(cached) $ECHO_C" >&6
18822 else
18823   cat >conftest.$ac_ext <<_ACEOF
18824 #line 18824 "configure"
18825 #include "confdefs.h"
18826 /* System header to define __stub macros and hopefully few prototypes,
18827     which can conflict with char bcopy (); below.  */
18828 #include <assert.h>
18829 /* Override any gcc2 internal prototype to avoid an error.  */
18830 #ifdef __cplusplus
18831 extern "C"
18832 #endif
18833 /* We use char because int might match the return type of a gcc2
18834    builtin and then its argument prototype would still apply.  */
18835 char bcopy ();
18836 char (*f) ();
18837
18838 int
18839 main (void)
18840 {
18841 /* The GNU C library defines this for functions which it implements
18842     to always fail with ENOSYS.  Some functions are actually named
18843     something starting with __ and the normal name is an alias.  */
18844 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18845 choke me
18846 #else
18847 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18848 #endif
18849
18850   ;
18851   return 0;
18852 }
18853 _ACEOF
18854 rm -f conftest.$ac_objext conftest$ac_exeext
18855 if { (eval echo "$as_me:18855: \"$ac_link\"") >&5
18856   (eval $ac_link) 2>&5
18857   ac_status=$?
18858   echo "$as_me:18858: \$? = $ac_status" >&5
18859   (exit $ac_status); } &&
18860          { ac_try='test -s conftest$ac_exeext'
18861   { (eval echo "$as_me:18861: \"$ac_try\"") >&5
18862   (eval $ac_try) 2>&5
18863   ac_status=$?
18864   echo "$as_me:18864: \$? = $ac_status" >&5
18865   (exit $ac_status); }; }; then
18866   ac_cv_func_bcopy=yes
18867 else
18868   echo "$as_me: failed program was:" >&5
18869 cat conftest.$ac_ext >&5
18870 ac_cv_func_bcopy=no
18871 fi
18872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18873 fi
18874 echo "$as_me:18874: result: $ac_cv_func_bcopy" >&5
18875 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18876 if test $ac_cv_func_bcopy = yes; then
18877
18878         echo "$as_me:18878: checking if bcopy does overlapping moves" >&5
18879 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18880 if test "${cf_cv_good_bcopy+set}" = set; then
18881   echo $ECHO_N "(cached) $ECHO_C" >&6
18882 else
18883
18884                 if test "$cross_compiling" = yes; then
18885   cf_cv_good_bcopy=unknown
18886 else
18887   cat >conftest.$ac_ext <<_ACEOF
18888 #line 18888 "configure"
18889 #include "confdefs.h"
18890
18891 int main(void) {
18892         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18893         char temp[40];
18894         bcopy(data, temp, sizeof(data));
18895         bcopy(temp+10, temp, 15);
18896         bcopy(temp+5, temp+15, 10);
18897         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18898 }
18899
18900 _ACEOF
18901 rm -f conftest$ac_exeext
18902 if { (eval echo "$as_me:18902: \"$ac_link\"") >&5
18903   (eval $ac_link) 2>&5
18904   ac_status=$?
18905   echo "$as_me:18905: \$? = $ac_status" >&5
18906   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18907   { (eval echo "$as_me:18907: \"$ac_try\"") >&5
18908   (eval $ac_try) 2>&5
18909   ac_status=$?
18910   echo "$as_me:18910: \$? = $ac_status" >&5
18911   (exit $ac_status); }; }; then
18912   cf_cv_good_bcopy=yes
18913 else
18914   echo "$as_me: program exited with status $ac_status" >&5
18915 echo "$as_me: failed program was:" >&5
18916 cat conftest.$ac_ext >&5
18917 cf_cv_good_bcopy=no
18918 fi
18919 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18920 fi
18921
18922 fi
18923 echo "$as_me:18923: result: $cf_cv_good_bcopy" >&5
18924 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18925
18926 else
18927   cf_cv_good_bcopy=no
18928 fi
18929
18930         if test "$cf_cv_good_bcopy" = yes ; then
18931
18932 cat >>confdefs.h <<\EOF
18933 #define USE_OK_BCOPY 1
18934 EOF
18935
18936         else
18937
18938 cat >>confdefs.h <<\EOF
18939 #define USE_MY_MEMMOVE 1
18940 EOF
18941
18942         fi
18943
18944 fi
18945
18946 tty 2>&1 >/dev/null || {
18947 for ac_func in posix_openpt
18948 do
18949 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18950 echo "$as_me:18950: checking for $ac_func" >&5
18951 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18952 if eval "test \"\${$as_ac_var+set}\" = set"; then
18953   echo $ECHO_N "(cached) $ECHO_C" >&6
18954 else
18955   cat >conftest.$ac_ext <<_ACEOF
18956 #line 18956 "configure"
18957 #include "confdefs.h"
18958 /* System header to define __stub macros and hopefully few prototypes,
18959     which can conflict with char $ac_func (); below.  */
18960 #include <assert.h>
18961 /* Override any gcc2 internal prototype to avoid an error.  */
18962 #ifdef __cplusplus
18963 extern "C"
18964 #endif
18965 /* We use char because int might match the return type of a gcc2
18966    builtin and then its argument prototype would still apply.  */
18967 char $ac_func ();
18968 char (*f) ();
18969
18970 int
18971 main (void)
18972 {
18973 /* The GNU C library defines this for functions which it implements
18974     to always fail with ENOSYS.  Some functions are actually named
18975     something starting with __ and the normal name is an alias.  */
18976 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18977 choke me
18978 #else
18979 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18980 #endif
18981
18982   ;
18983   return 0;
18984 }
18985 _ACEOF
18986 rm -f conftest.$ac_objext conftest$ac_exeext
18987 if { (eval echo "$as_me:18987: \"$ac_link\"") >&5
18988   (eval $ac_link) 2>&5
18989   ac_status=$?
18990   echo "$as_me:18990: \$? = $ac_status" >&5
18991   (exit $ac_status); } &&
18992          { ac_try='test -s conftest$ac_exeext'
18993   { (eval echo "$as_me:18993: \"$ac_try\"") >&5
18994   (eval $ac_try) 2>&5
18995   ac_status=$?
18996   echo "$as_me:18996: \$? = $ac_status" >&5
18997   (exit $ac_status); }; }; then
18998   eval "$as_ac_var=yes"
18999 else
19000   echo "$as_me: failed program was:" >&5
19001 cat conftest.$ac_ext >&5
19002 eval "$as_ac_var=no"
19003 fi
19004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19005 fi
19006 echo "$as_me:19006: result: `eval echo '${'$as_ac_var'}'`" >&5
19007 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19008 if test `eval echo '${'$as_ac_var'}'` = yes; then
19009   cat >>confdefs.h <<EOF
19010 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19011 EOF
19012
19013 fi
19014 done
19015  }
19016 echo "$as_me:19016: checking if poll really works" >&5
19017 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
19018 if test "${cf_cv_working_poll+set}" = set; then
19019   echo $ECHO_N "(cached) $ECHO_C" >&6
19020 else
19021
19022 if test "$cross_compiling" = yes; then
19023   cf_cv_working_poll=unknown
19024 else
19025   cat >conftest.$ac_ext <<_ACEOF
19026 #line 19026 "configure"
19027 #include "confdefs.h"
19028
19029 #include <stdlib.h>
19030 #include <stdio.h>
19031 #include <unistd.h>
19032 #include <fcntl.h>
19033 #ifdef HAVE_POLL_H
19034 #include <poll.h>
19035 #else
19036 #include <sys/poll.h>
19037 #endif
19038 int main(void) {
19039         struct pollfd myfds;
19040         int ret;
19041
19042         /* check for Darwin bug with respect to "devices" */
19043         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
19044         if (myfds.fd < 0)
19045                 myfds.fd = 0;
19046         myfds.events = POLLIN;
19047         myfds.revents = 0;
19048
19049         ret = poll(&myfds, 1, 100);
19050
19051         if (ret < 0 || (myfds.revents & POLLNVAL)) {
19052                 ret = -1;
19053         } else {
19054                 int fd = 0;
19055                 if (!isatty(fd)) {
19056                         fd = open("/dev/tty", 2);       /* O_RDWR */
19057                 }
19058 #ifdef HAVE_POSIX_OPENPT
19059                 if (fd < 0) {
19060                         fd = posix_openpt(O_RDWR);
19061                 }
19062 #endif
19063
19064                 if (fd >= 0) {
19065                         /* also check with standard input */
19066                         myfds.fd = fd;
19067                         myfds.events = POLLIN;
19068                         myfds.revents = 0;
19069                         ret = poll(&myfds, 1, 100);
19070                 } else {
19071                         ret = -1;
19072                 }
19073         }
19074         ${cf_cv_main_return:-return}(ret < 0);
19075 }
19076 _ACEOF
19077 rm -f conftest$ac_exeext
19078 if { (eval echo "$as_me:19078: \"$ac_link\"") >&5
19079   (eval $ac_link) 2>&5
19080   ac_status=$?
19081   echo "$as_me:19081: \$? = $ac_status" >&5
19082   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19083   { (eval echo "$as_me:19083: \"$ac_try\"") >&5
19084   (eval $ac_try) 2>&5
19085   ac_status=$?
19086   echo "$as_me:19086: \$? = $ac_status" >&5
19087   (exit $ac_status); }; }; then
19088   cf_cv_working_poll=yes
19089 else
19090   echo "$as_me: program exited with status $ac_status" >&5
19091 echo "$as_me: failed program was:" >&5
19092 cat conftest.$ac_ext >&5
19093 cf_cv_working_poll=no
19094 fi
19095 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19096 fi
19097 fi
19098 echo "$as_me:19098: result: $cf_cv_working_poll" >&5
19099 echo "${ECHO_T}$cf_cv_working_poll" >&6
19100 test "$cf_cv_working_poll" = "yes" &&
19101 cat >>confdefs.h <<\EOF
19102 #define HAVE_WORKING_POLL 1
19103 EOF
19104
19105 echo "$as_me:19105: checking for va_copy" >&5
19106 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
19107 if test "${cf_cv_have_va_copy+set}" = set; then
19108   echo $ECHO_N "(cached) $ECHO_C" >&6
19109 else
19110
19111 cat >conftest.$ac_ext <<_ACEOF
19112 #line 19112 "configure"
19113 #include "confdefs.h"
19114
19115 #include <stdarg.h>
19116
19117 int
19118 main (void)
19119 {
19120
19121         static va_list dst;
19122         static va_list src;
19123         va_copy(dst, src)
19124   ;
19125   return 0;
19126 }
19127 _ACEOF
19128 rm -f conftest.$ac_objext conftest$ac_exeext
19129 if { (eval echo "$as_me:19129: \"$ac_link\"") >&5
19130   (eval $ac_link) 2>&5
19131   ac_status=$?
19132   echo "$as_me:19132: \$? = $ac_status" >&5
19133   (exit $ac_status); } &&
19134          { ac_try='test -s conftest$ac_exeext'
19135   { (eval echo "$as_me:19135: \"$ac_try\"") >&5
19136   (eval $ac_try) 2>&5
19137   ac_status=$?
19138   echo "$as_me:19138: \$? = $ac_status" >&5
19139   (exit $ac_status); }; }; then
19140   cf_cv_have_va_copy=yes
19141 else
19142   echo "$as_me: failed program was:" >&5
19143 cat conftest.$ac_ext >&5
19144 cf_cv_have_va_copy=no
19145 fi
19146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19147 fi
19148 echo "$as_me:19148: result: $cf_cv_have_va_copy" >&5
19149 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
19150
19151 test "$cf_cv_have_va_copy" = yes &&
19152 cat >>confdefs.h <<\EOF
19153 #define HAVE_VA_COPY 1
19154 EOF
19155
19156 echo "$as_me:19156: checking for __va_copy" >&5
19157 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
19158 if test "${cf_cv_have___va_copy+set}" = set; then
19159   echo $ECHO_N "(cached) $ECHO_C" >&6
19160 else
19161
19162 cat >conftest.$ac_ext <<_ACEOF
19163 #line 19163 "configure"
19164 #include "confdefs.h"
19165
19166 #include <stdarg.h>
19167
19168 int
19169 main (void)
19170 {
19171
19172         static va_list dst;
19173         static va_list src;
19174         __va_copy(dst, src)
19175   ;
19176   return 0;
19177 }
19178 _ACEOF
19179 rm -f conftest.$ac_objext conftest$ac_exeext
19180 if { (eval echo "$as_me:19180: \"$ac_link\"") >&5
19181   (eval $ac_link) 2>&5
19182   ac_status=$?
19183   echo "$as_me:19183: \$? = $ac_status" >&5
19184   (exit $ac_status); } &&
19185          { ac_try='test -s conftest$ac_exeext'
19186   { (eval echo "$as_me:19186: \"$ac_try\"") >&5
19187   (eval $ac_try) 2>&5
19188   ac_status=$?
19189   echo "$as_me:19189: \$? = $ac_status" >&5
19190   (exit $ac_status); }; }; then
19191   cf_cv_have___va_copy=yes
19192 else
19193   echo "$as_me: failed program was:" >&5
19194 cat conftest.$ac_ext >&5
19195 cf_cv_have___va_copy=no
19196 fi
19197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19198 fi
19199 echo "$as_me:19199: result: $cf_cv_have___va_copy" >&5
19200 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
19201
19202 test "$cf_cv_have___va_copy" = yes &&
19203 cat >>confdefs.h <<\EOF
19204 #define HAVE___VA_COPY 1
19205 EOF
19206
19207 echo "$as_me:19207: checking for pid_t" >&5
19208 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
19209 if test "${ac_cv_type_pid_t+set}" = set; then
19210   echo $ECHO_N "(cached) $ECHO_C" >&6
19211 else
19212   cat >conftest.$ac_ext <<_ACEOF
19213 #line 19213 "configure"
19214 #include "confdefs.h"
19215 $ac_includes_default
19216 int
19217 main (void)
19218 {
19219 if ((pid_t *) 0)
19220   return 0;
19221 if (sizeof (pid_t))
19222   return 0;
19223   ;
19224   return 0;
19225 }
19226 _ACEOF
19227 rm -f conftest.$ac_objext
19228 if { (eval echo "$as_me:19228: \"$ac_compile\"") >&5
19229   (eval $ac_compile) 2>&5
19230   ac_status=$?
19231   echo "$as_me:19231: \$? = $ac_status" >&5
19232   (exit $ac_status); } &&
19233          { ac_try='test -s conftest.$ac_objext'
19234   { (eval echo "$as_me:19234: \"$ac_try\"") >&5
19235   (eval $ac_try) 2>&5
19236   ac_status=$?
19237   echo "$as_me:19237: \$? = $ac_status" >&5
19238   (exit $ac_status); }; }; then
19239   ac_cv_type_pid_t=yes
19240 else
19241   echo "$as_me: failed program was:" >&5
19242 cat conftest.$ac_ext >&5
19243 ac_cv_type_pid_t=no
19244 fi
19245 rm -f conftest.$ac_objext conftest.$ac_ext
19246 fi
19247 echo "$as_me:19247: result: $ac_cv_type_pid_t" >&5
19248 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
19249 if test $ac_cv_type_pid_t = yes; then
19250   :
19251 else
19252
19253 cat >>confdefs.h <<EOF
19254 #define pid_t int
19255 EOF
19256
19257 fi
19258
19259 for ac_header in unistd.h vfork.h
19260 do
19261 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19262 echo "$as_me:19262: checking for $ac_header" >&5
19263 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19264 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19265   echo $ECHO_N "(cached) $ECHO_C" >&6
19266 else
19267   cat >conftest.$ac_ext <<_ACEOF
19268 #line 19268 "configure"
19269 #include "confdefs.h"
19270 #include <$ac_header>
19271 _ACEOF
19272 if { (eval echo "$as_me:19272: \"$ac_cpp conftest.$ac_ext\"") >&5
19273   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19274   ac_status=$?
19275   egrep -v '^ *\+' conftest.er1 >conftest.err
19276   rm -f conftest.er1
19277   cat conftest.err >&5
19278   echo "$as_me:19278: \$? = $ac_status" >&5
19279   (exit $ac_status); } >/dev/null; then
19280   if test -s conftest.err; then
19281     ac_cpp_err=$ac_c_preproc_warn_flag
19282   else
19283     ac_cpp_err=
19284   fi
19285 else
19286   ac_cpp_err=yes
19287 fi
19288 if test -z "$ac_cpp_err"; then
19289   eval "$as_ac_Header=yes"
19290 else
19291   echo "$as_me: failed program was:" >&5
19292   cat conftest.$ac_ext >&5
19293   eval "$as_ac_Header=no"
19294 fi
19295 rm -f conftest.err conftest.$ac_ext
19296 fi
19297 echo "$as_me:19297: result: `eval echo '${'$as_ac_Header'}'`" >&5
19298 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19299 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19300   cat >>confdefs.h <<EOF
19301 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19302 EOF
19303
19304 fi
19305 done
19306
19307 for ac_func in fork vfork
19308 do
19309 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19310 echo "$as_me:19310: checking for $ac_func" >&5
19311 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19312 if eval "test \"\${$as_ac_var+set}\" = set"; then
19313   echo $ECHO_N "(cached) $ECHO_C" >&6
19314 else
19315   cat >conftest.$ac_ext <<_ACEOF
19316 #line 19316 "configure"
19317 #include "confdefs.h"
19318 /* System header to define __stub macros and hopefully few prototypes,
19319     which can conflict with char $ac_func (); below.  */
19320 #include <assert.h>
19321 /* Override any gcc2 internal prototype to avoid an error.  */
19322 #ifdef __cplusplus
19323 extern "C"
19324 #endif
19325 /* We use char because int might match the return type of a gcc2
19326    builtin and then its argument prototype would still apply.  */
19327 char $ac_func ();
19328 char (*f) ();
19329
19330 int
19331 main (void)
19332 {
19333 /* The GNU C library defines this for functions which it implements
19334     to always fail with ENOSYS.  Some functions are actually named
19335     something starting with __ and the normal name is an alias.  */
19336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19337 choke me
19338 #else
19339 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19340 #endif
19341
19342   ;
19343   return 0;
19344 }
19345 _ACEOF
19346 rm -f conftest.$ac_objext conftest$ac_exeext
19347 if { (eval echo "$as_me:19347: \"$ac_link\"") >&5
19348   (eval $ac_link) 2>&5
19349   ac_status=$?
19350   echo "$as_me:19350: \$? = $ac_status" >&5
19351   (exit $ac_status); } &&
19352          { ac_try='test -s conftest$ac_exeext'
19353   { (eval echo "$as_me:19353: \"$ac_try\"") >&5
19354   (eval $ac_try) 2>&5
19355   ac_status=$?
19356   echo "$as_me:19356: \$? = $ac_status" >&5
19357   (exit $ac_status); }; }; then
19358   eval "$as_ac_var=yes"
19359 else
19360   echo "$as_me: failed program was:" >&5
19361 cat conftest.$ac_ext >&5
19362 eval "$as_ac_var=no"
19363 fi
19364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19365 fi
19366 echo "$as_me:19366: result: `eval echo '${'$as_ac_var'}'`" >&5
19367 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19368 if test `eval echo '${'$as_ac_var'}'` = yes; then
19369   cat >>confdefs.h <<EOF
19370 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19371 EOF
19372
19373 fi
19374 done
19375
19376 ac_cv_func_fork_works=$ac_cv_func_fork
19377 if test "x$ac_cv_func_fork" = xyes; then
19378   echo "$as_me:19378: checking for working fork" >&5
19379 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19380 if test "${ac_cv_func_fork_works+set}" = set; then
19381   echo $ECHO_N "(cached) $ECHO_C" >&6
19382 else
19383   if test "$cross_compiling" = yes; then
19384   ac_cv_func_fork_works=cross
19385 else
19386   cat >conftest.$ac_ext <<_ACEOF
19387 /* By Rüdiger Kuhlmann. */
19388       #include <sys/types.h>
19389       #if HAVE_UNISTD_H
19390       # include <unistd.h>
19391       #endif
19392       /* Some systems only have a dummy stub for fork() */
19393       int main (void)
19394       {
19395         if (fork() < 0)
19396           $ac_main_return (1);
19397         $ac_main_return (0);
19398       }
19399 _ACEOF
19400 rm -f conftest$ac_exeext
19401 if { (eval echo "$as_me:19401: \"$ac_link\"") >&5
19402   (eval $ac_link) 2>&5
19403   ac_status=$?
19404   echo "$as_me:19404: \$? = $ac_status" >&5
19405   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19406   { (eval echo "$as_me:19406: \"$ac_try\"") >&5
19407   (eval $ac_try) 2>&5
19408   ac_status=$?
19409   echo "$as_me:19409: \$? = $ac_status" >&5
19410   (exit $ac_status); }; }; then
19411   ac_cv_func_fork_works=yes
19412 else
19413   echo "$as_me: program exited with status $ac_status" >&5
19414 echo "$as_me: failed program was:" >&5
19415 cat conftest.$ac_ext >&5
19416 ac_cv_func_fork_works=no
19417 fi
19418 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19419 fi
19420 fi
19421 echo "$as_me:19421: result: $ac_cv_func_fork_works" >&5
19422 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19423
19424 fi
19425 if test "x$ac_cv_func_fork_works" = xcross; then
19426   case $host in
19427     *-*-amigaos* | *-*-msdosdjgpp*)
19428       # Override, as these systems have only a dummy fork() stub
19429       ac_cv_func_fork_works=no
19430       ;;
19431     *)
19432       ac_cv_func_fork_works=yes
19433       ;;
19434   esac
19435   { echo "$as_me:19435: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19436 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19437 fi
19438 ac_cv_func_vfork_works=$ac_cv_func_vfork
19439 if test "x$ac_cv_func_vfork" = xyes; then
19440   echo "$as_me:19440: checking for working vfork" >&5
19441 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19442 if test "${ac_cv_func_vfork_works+set}" = set; then
19443   echo $ECHO_N "(cached) $ECHO_C" >&6
19444 else
19445   if test "$cross_compiling" = yes; then
19446   ac_cv_func_vfork_works=cross
19447 else
19448   cat >conftest.$ac_ext <<_ACEOF
19449 #line 19449 "configure"
19450 #include "confdefs.h"
19451 /* Thanks to Paul Eggert for this test.  */
19452 #include <stdio.h>
19453 #include <sys/types.h>
19454 #include <sys/stat.h>
19455 #if HAVE_UNISTD_H
19456 # include <unistd.h>
19457 #endif
19458 #if HAVE_VFORK_H
19459 # include <vfork.h>
19460 #endif
19461 /* On some sparc systems, changes by the child to local and incoming
19462    argument registers are propagated back to the parent.  The compiler
19463    is told about this with #include <vfork.h>, but some compilers
19464    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19465    static variable whose address is put into a register that is
19466    clobbered by the vfork.  */
19467 static
19468 #ifdef __cplusplus
19469 sparc_address_test (int arg)
19470 # else
19471 sparc_address_test (arg) int arg;
19472 #endif
19473 {
19474   static pid_t child;
19475   if (!child) {
19476     child = vfork ();
19477     if (child < 0) {
19478       perror ("vfork");
19479       _exit(2);
19480     }
19481     if (!child) {
19482       arg = getpid();
19483       write(-1, "", 0);
19484       _exit (arg);
19485     }
19486   }
19487 }
19488
19489 int
19490 main (void)
19491 {
19492   pid_t parent = getpid ();
19493   pid_t child;
19494
19495   sparc_address_test ();
19496
19497   child = vfork ();
19498
19499   if (child == 0) {
19500     /* Here is another test for sparc vfork register problems.  This
19501        test uses lots of local variables, at least as many local
19502        variables as main has allocated so far including compiler
19503        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19504        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19505        reuse the register of parent for one of the local variables,
19506        since it will think that parent can't possibly be used any more
19507        in this routine.  Assigning to the local variable will thus
19508        munge parent in the parent process.  */
19509     pid_t
19510       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19511       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19512     /* Convince the compiler that p..p7 are live; otherwise, it might
19513        use the same hardware register for all 8 local variables.  */
19514     if (p != p1 || p != p2 || p != p3 || p != p4
19515         || p != p5 || p != p6 || p != p7)
19516       _exit(1);
19517
19518     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19519        from child file descriptors.  If the child closes a descriptor
19520        before it execs or exits, this munges the parent's descriptor
19521        as well.  Test for this by closing stdout in the child.  */
19522     _exit(close(fileno(stdout)) != 0);
19523   } else {
19524     int status;
19525     struct stat st;
19526
19527     while (wait(&status) != child)
19528       ;
19529     $ac_main_return(
19530          /* Was there some problem with vforking?  */
19531          child < 0
19532
19533          /* Did the child fail?  (This shouldn't happen.)  */
19534          || status
19535
19536          /* Did the vfork/compiler bug occur?  */
19537          || parent != getpid()
19538
19539          /* Did the file descriptor bug occur?  */
19540          || fstat(fileno(stdout), &st) != 0
19541          );
19542   }
19543 }
19544 _ACEOF
19545 rm -f conftest$ac_exeext
19546 if { (eval echo "$as_me:19546: \"$ac_link\"") >&5
19547   (eval $ac_link) 2>&5
19548   ac_status=$?
19549   echo "$as_me:19549: \$? = $ac_status" >&5
19550   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19551   { (eval echo "$as_me:19551: \"$ac_try\"") >&5
19552   (eval $ac_try) 2>&5
19553   ac_status=$?
19554   echo "$as_me:19554: \$? = $ac_status" >&5
19555   (exit $ac_status); }; }; then
19556   ac_cv_func_vfork_works=yes
19557 else
19558   echo "$as_me: program exited with status $ac_status" >&5
19559 echo "$as_me: failed program was:" >&5
19560 cat conftest.$ac_ext >&5
19561 ac_cv_func_vfork_works=no
19562 fi
19563 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19564 fi
19565 fi
19566 echo "$as_me:19566: result: $ac_cv_func_vfork_works" >&5
19567 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19568
19569 fi;
19570 if test "x$ac_cv_func_fork_works" = xcross; then
19571   ac_cv_func_vfork_works=ac_cv_func_vfork
19572   { echo "$as_me:19572: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19573 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19574 fi
19575
19576 if test "x$ac_cv_func_vfork_works" = xyes; then
19577
19578 cat >>confdefs.h <<\EOF
19579 #define HAVE_WORKING_VFORK 1
19580 EOF
19581
19582 else
19583
19584 cat >>confdefs.h <<\EOF
19585 #define vfork fork
19586 EOF
19587
19588 fi
19589 if test "x$ac_cv_func_fork_works" = xyes; then
19590
19591 cat >>confdefs.h <<\EOF
19592 #define HAVE_WORKING_FORK 1
19593 EOF
19594
19595 fi
19596
19597 # special check for test/ditto.c
19598
19599 echo "$as_me:19599: checking for openpty in -lutil" >&5
19600 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19601 if test "${ac_cv_lib_util_openpty+set}" = set; then
19602   echo $ECHO_N "(cached) $ECHO_C" >&6
19603 else
19604   ac_check_lib_save_LIBS=$LIBS
19605 LIBS="-lutil  $LIBS"
19606 cat >conftest.$ac_ext <<_ACEOF
19607 #line 19607 "configure"
19608 #include "confdefs.h"
19609
19610 /* Override any gcc2 internal prototype to avoid an error.  */
19611 #ifdef __cplusplus
19612 extern "C"
19613 #endif
19614 /* We use char because int might match the return type of a gcc2
19615    builtin and then its argument prototype would still apply.  */
19616 char openpty ();
19617 int
19618 main (void)
19619 {
19620 openpty ();
19621   ;
19622   return 0;
19623 }
19624 _ACEOF
19625 rm -f conftest.$ac_objext conftest$ac_exeext
19626 if { (eval echo "$as_me:19626: \"$ac_link\"") >&5
19627   (eval $ac_link) 2>&5
19628   ac_status=$?
19629   echo "$as_me:19629: \$? = $ac_status" >&5
19630   (exit $ac_status); } &&
19631          { ac_try='test -s conftest$ac_exeext'
19632   { (eval echo "$as_me:19632: \"$ac_try\"") >&5
19633   (eval $ac_try) 2>&5
19634   ac_status=$?
19635   echo "$as_me:19635: \$? = $ac_status" >&5
19636   (exit $ac_status); }; }; then
19637   ac_cv_lib_util_openpty=yes
19638 else
19639   echo "$as_me: failed program was:" >&5
19640 cat conftest.$ac_ext >&5
19641 ac_cv_lib_util_openpty=no
19642 fi
19643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19644 LIBS=$ac_check_lib_save_LIBS
19645 fi
19646 echo "$as_me:19646: result: $ac_cv_lib_util_openpty" >&5
19647 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19648 if test $ac_cv_lib_util_openpty = yes; then
19649   cf_cv_lib_util=yes
19650 else
19651   cf_cv_lib_util=no
19652 fi
19653
19654 echo "$as_me:19654: checking for openpty header" >&5
19655 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19656 if test "${cf_cv_func_openpty+set}" = set; then
19657   echo $ECHO_N "(cached) $ECHO_C" >&6
19658 else
19659
19660         cf_save_LIBS="$LIBS"
19661         test $cf_cv_lib_util = yes && {
19662 cf_add_libs="-lutil"
19663 # Filter out duplicates - this happens with badly-designed ".pc" files...
19664 for cf_add_1lib in $LIBS
19665 do
19666         for cf_add_2lib in $cf_add_libs
19667         do
19668                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19669                 then
19670                         cf_add_1lib=
19671                         break
19672                 fi
19673         done
19674         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19675 done
19676 LIBS="$cf_add_libs"
19677  }
19678         for cf_header in pty.h libutil.h util.h
19679         do
19680         cat >conftest.$ac_ext <<_ACEOF
19681 #line 19681 "configure"
19682 #include "confdefs.h"
19683
19684 #include <$cf_header>
19685
19686 int
19687 main (void)
19688 {
19689
19690         int x = openpty((int *)0, (int *)0, (char *)0,
19691                                    (struct termios *)0, (struct winsize *)0);
19692
19693   ;
19694   return 0;
19695 }
19696 _ACEOF
19697 rm -f conftest.$ac_objext conftest$ac_exeext
19698 if { (eval echo "$as_me:19698: \"$ac_link\"") >&5
19699   (eval $ac_link) 2>&5
19700   ac_status=$?
19701   echo "$as_me:19701: \$? = $ac_status" >&5
19702   (exit $ac_status); } &&
19703          { ac_try='test -s conftest$ac_exeext'
19704   { (eval echo "$as_me:19704: \"$ac_try\"") >&5
19705   (eval $ac_try) 2>&5
19706   ac_status=$?
19707   echo "$as_me:19707: \$? = $ac_status" >&5
19708   (exit $ac_status); }; }; then
19709
19710                 cf_cv_func_openpty=$cf_header
19711                 break
19712
19713 else
19714   echo "$as_me: failed program was:" >&5
19715 cat conftest.$ac_ext >&5
19716
19717                 cf_cv_func_openpty=no
19718
19719 fi
19720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19721         done
19722         LIBS="$cf_save_LIBS"
19723
19724 fi
19725 echo "$as_me:19725: result: $cf_cv_func_openpty" >&5
19726 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19727
19728 if test "$cf_cv_func_openpty" != no ; then
19729
19730 cat >>confdefs.h <<EOF
19731 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19732 EOF
19733
19734 cat >>confdefs.h <<\EOF
19735 #define USE_XTERM_PTY 1
19736 EOF
19737
19738         if test "x$cf_cv_lib_util" = xyes ; then
19739
19740 cf_add_libs="-lutil"
19741 # Filter out duplicates - this happens with badly-designed ".pc" files...
19742 for cf_add_1lib in $TEST_LIBS
19743 do
19744         for cf_add_2lib in $cf_add_libs
19745         do
19746                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19747                 then
19748                         cf_add_1lib=
19749                         break
19750                 fi
19751         done
19752         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19753 done
19754 TEST_LIBS="$cf_add_libs"
19755
19756         fi
19757 fi
19758
19759 if test "$with_hashed_db" != no ; then
19760
19761 cat >>confdefs.h <<\EOF
19762 #define USE_HASHED_DB 1
19763 EOF
19764
19765 case $with_hashed_db in
19766 (yes|*able*)
19767         ;;
19768 (*)
19769         if test -d "$with_hashed_db" ; then
19770
19771 if test -n "$with_hashed_db/include" ; then
19772   for cf_add_incdir in $with_hashed_db/include
19773   do
19774         while test $cf_add_incdir != /usr/include
19775         do
19776           if test -d $cf_add_incdir
19777           then
19778                 cf_have_incdir=no
19779                 if test -n "$CFLAGS$CPPFLAGS" ; then
19780                   # a loop is needed to ensure we can add subdirs of existing dirs
19781                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19782                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19783                           cf_have_incdir=yes; break
19784                         fi
19785                   done
19786                 fi
19787
19788                 if test "$cf_have_incdir" = no ; then
19789                   if test "$cf_add_incdir" = /usr/local/include ; then
19790                         if test "$GCC" = yes
19791                         then
19792                           cf_save_CPPFLAGS=$CPPFLAGS
19793                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19794                           cat >conftest.$ac_ext <<_ACEOF
19795 #line 19795 "configure"
19796 #include "confdefs.h"
19797 #include <stdio.h>
19798 int
19799 main (void)
19800 {
19801 printf("Hello")
19802   ;
19803   return 0;
19804 }
19805 _ACEOF
19806 rm -f conftest.$ac_objext
19807 if { (eval echo "$as_me:19807: \"$ac_compile\"") >&5
19808   (eval $ac_compile) 2>&5
19809   ac_status=$?
19810   echo "$as_me:19810: \$? = $ac_status" >&5
19811   (exit $ac_status); } &&
19812          { ac_try='test -s conftest.$ac_objext'
19813   { (eval echo "$as_me:19813: \"$ac_try\"") >&5
19814   (eval $ac_try) 2>&5
19815   ac_status=$?
19816   echo "$as_me:19816: \$? = $ac_status" >&5
19817   (exit $ac_status); }; }; then
19818   :
19819 else
19820   echo "$as_me: failed program was:" >&5
19821 cat conftest.$ac_ext >&5
19822 cf_have_incdir=yes
19823 fi
19824 rm -f conftest.$ac_objext conftest.$ac_ext
19825                           CPPFLAGS=$cf_save_CPPFLAGS
19826                         fi
19827                   fi
19828                 fi
19829
19830                 if test "$cf_have_incdir" = no ; then
19831                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19832
19833 echo "${as_me:-configure}:19833: testing adding $cf_add_incdir to include-path ..." 1>&5
19834
19835                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19836
19837                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19838                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19839                   cf_add_incdir="$cf_top_incdir"
19840                 else
19841                   break
19842                 fi
19843           else
19844                 break
19845           fi
19846         done
19847   done
19848 fi
19849
19850 if test -n "$with_hashed_db/lib" ; then
19851         for cf_add_libdir in $with_hashed_db/lib
19852         do
19853                 if test $cf_add_libdir = /usr/lib ; then
19854                         :
19855                 elif test -d $cf_add_libdir
19856                 then
19857                         cf_have_libdir=no
19858                         if test -n "$LDFLAGS$LIBS" ; then
19859                                 # a loop is needed to ensure we can add subdirs of existing dirs
19860                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19861                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19862                                                 cf_have_libdir=yes; break
19863                                         fi
19864                                 done
19865                         fi
19866                         if test "$cf_have_libdir" = no ; then
19867                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19868
19869 echo "${as_me:-configure}:19869: testing adding $cf_add_libdir to library-path ..." 1>&5
19870
19871                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19872                         fi
19873                 fi
19874         done
19875 fi
19876
19877         else
19878                 case "$with_hashed_db" in
19879                 (./*|../*|/*)
19880                         { echo "$as_me:19880: WARNING: no such directory $with_hashed_db" >&5
19881 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19882                         ;;
19883                 (*)
19884
19885 cf_search=
19886
19887 test "x$prefix" != "xNONE" && \
19888 test -d "$prefix" && \
19889  {
19890         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19891         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19892         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19893         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19894         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19895         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19896 }
19897
19898 for cf_subdir_prefix in \
19899         /usr \
19900         /usr/local \
19901         /usr/pkg \
19902         /opt \
19903         /opt/local \
19904         $HOME
19905 do
19906
19907 test "x$cf_subdir_prefix" != "x$prefix" && \
19908 test -d "$cf_subdir_prefix" && \
19909 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19910         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19911         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19912         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19913         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19914         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19915         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"
19916 }
19917
19918 done
19919
19920         for cf_item in $cf_search
19921         do
19922                 case $cf_item in
19923                 (*/$with_hashed_db)
19924
19925 if test -n "$cf_item" ; then
19926   for cf_add_incdir in $cf_item
19927   do
19928         while test $cf_add_incdir != /usr/include
19929         do
19930           if test -d $cf_add_incdir
19931           then
19932                 cf_have_incdir=no
19933                 if test -n "$CFLAGS$CPPFLAGS" ; then
19934                   # a loop is needed to ensure we can add subdirs of existing dirs
19935                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19936                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19937                           cf_have_incdir=yes; break
19938                         fi
19939                   done
19940                 fi
19941
19942                 if test "$cf_have_incdir" = no ; then
19943                   if test "$cf_add_incdir" = /usr/local/include ; then
19944                         if test "$GCC" = yes
19945                         then
19946                           cf_save_CPPFLAGS=$CPPFLAGS
19947                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19948                           cat >conftest.$ac_ext <<_ACEOF
19949 #line 19949 "configure"
19950 #include "confdefs.h"
19951 #include <stdio.h>
19952 int
19953 main (void)
19954 {
19955 printf("Hello")
19956   ;
19957   return 0;
19958 }
19959 _ACEOF
19960 rm -f conftest.$ac_objext
19961 if { (eval echo "$as_me:19961: \"$ac_compile\"") >&5
19962   (eval $ac_compile) 2>&5
19963   ac_status=$?
19964   echo "$as_me:19964: \$? = $ac_status" >&5
19965   (exit $ac_status); } &&
19966          { ac_try='test -s conftest.$ac_objext'
19967   { (eval echo "$as_me:19967: \"$ac_try\"") >&5
19968   (eval $ac_try) 2>&5
19969   ac_status=$?
19970   echo "$as_me:19970: \$? = $ac_status" >&5
19971   (exit $ac_status); }; }; then
19972   :
19973 else
19974   echo "$as_me: failed program was:" >&5
19975 cat conftest.$ac_ext >&5
19976 cf_have_incdir=yes
19977 fi
19978 rm -f conftest.$ac_objext conftest.$ac_ext
19979                           CPPFLAGS=$cf_save_CPPFLAGS
19980                         fi
19981                   fi
19982                 fi
19983
19984                 if test "$cf_have_incdir" = no ; then
19985                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19986
19987 echo "${as_me:-configure}:19987: testing adding $cf_add_incdir to include-path ..." 1>&5
19988
19989                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19990
19991                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19992                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19993                   cf_add_incdir="$cf_top_incdir"
19994                 else
19995                   break
19996                 fi
19997           else
19998                 break
19999           fi
20000         done
20001   done
20002 fi
20003
20004                         ;;
20005                 esac
20006         done
20007
20008 cf_search=
20009
20010 test "x$prefix" != "xNONE" && \
20011 test -d "$prefix" && \
20012  {
20013         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
20014         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
20015         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
20016         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
20017         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
20018         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
20019 }
20020
20021 for cf_subdir_prefix in \
20022         /usr \
20023         /usr/local \
20024         /usr/pkg \
20025         /opt \
20026         /opt/local \
20027         $HOME
20028 do
20029
20030 test "x$cf_subdir_prefix" != "x$prefix" && \
20031 test -d "$cf_subdir_prefix" && \
20032 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20033         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
20034         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
20035         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
20036         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
20037         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
20038         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"
20039 }
20040
20041 done
20042
20043         for cf_item in $cf_search
20044         do
20045                 case $cf_item in
20046                 (*/$with_hashed_db)
20047
20048 if test -n "$cf_item" ; then
20049         for cf_add_libdir in $cf_item
20050         do
20051                 if test $cf_add_libdir = /usr/lib ; then
20052                         :
20053                 elif test -d $cf_add_libdir
20054                 then
20055                         cf_have_libdir=no
20056                         if test -n "$LDFLAGS$LIBS" ; then
20057                                 # a loop is needed to ensure we can add subdirs of existing dirs
20058                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
20059                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20060                                                 cf_have_libdir=yes; break
20061                                         fi
20062                                 done
20063                         fi
20064                         if test "$cf_have_libdir" = no ; then
20065                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
20066
20067 echo "${as_me:-configure}:20067: testing adding $cf_add_libdir to library-path ..." 1>&5
20068
20069                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20070                         fi
20071                 fi
20072         done
20073 fi
20074
20075                         ;;
20076                 esac
20077         done
20078
20079                         ;;
20080                 esac
20081         fi
20082 esac
20083
20084 echo "$as_me:20084: checking for db.h" >&5
20085 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
20086 if test "${ac_cv_header_db_h+set}" = set; then
20087   echo $ECHO_N "(cached) $ECHO_C" >&6
20088 else
20089   cat >conftest.$ac_ext <<_ACEOF
20090 #line 20090 "configure"
20091 #include "confdefs.h"
20092 #include <db.h>
20093 _ACEOF
20094 if { (eval echo "$as_me:20094: \"$ac_cpp conftest.$ac_ext\"") >&5
20095   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20096   ac_status=$?
20097   egrep -v '^ *\+' conftest.er1 >conftest.err
20098   rm -f conftest.er1
20099   cat conftest.err >&5
20100   echo "$as_me:20100: \$? = $ac_status" >&5
20101   (exit $ac_status); } >/dev/null; then
20102   if test -s conftest.err; then
20103     ac_cpp_err=$ac_c_preproc_warn_flag
20104   else
20105     ac_cpp_err=
20106   fi
20107 else
20108   ac_cpp_err=yes
20109 fi
20110 if test -z "$ac_cpp_err"; then
20111   ac_cv_header_db_h=yes
20112 else
20113   echo "$as_me: failed program was:" >&5
20114   cat conftest.$ac_ext >&5
20115   ac_cv_header_db_h=no
20116 fi
20117 rm -f conftest.err conftest.$ac_ext
20118 fi
20119 echo "$as_me:20119: result: $ac_cv_header_db_h" >&5
20120 echo "${ECHO_T}$ac_cv_header_db_h" >&6
20121 if test $ac_cv_header_db_h = yes; then
20122
20123 echo "$as_me:20123: checking for version of db" >&5
20124 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
20125 if test "${cf_cv_hashed_db_version+set}" = set; then
20126   echo $ECHO_N "(cached) $ECHO_C" >&6
20127 else
20128
20129 cf_cv_hashed_db_version=unknown
20130
20131 for cf_db_version in 1 2 3 4 5 6
20132 do
20133
20134 echo "${as_me:-configure}:20134: testing checking for db version $cf_db_version ..." 1>&5
20135
20136         cat >conftest.$ac_ext <<_ACEOF
20137 #line 20137 "configure"
20138 #include "confdefs.h"
20139
20140 $ac_includes_default
20141 #include <db.h>
20142
20143 #ifdef DB_VERSION_MAJOR
20144         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
20145 #if $cf_db_version == DB_VERSION_MAJOR
20146         /* ok */
20147 #else
20148         make an error
20149 #endif
20150 #else
20151 #if $cf_db_version == 1
20152         /* ok: assuming this is DB 1.8.5 */
20153 #else
20154         make an error
20155 #endif
20156 #endif
20157
20158 int
20159 main (void)
20160 {
20161 DBT *foo = 0
20162   ;
20163   return 0;
20164 }
20165 _ACEOF
20166 rm -f conftest.$ac_objext
20167 if { (eval echo "$as_me:20167: \"$ac_compile\"") >&5
20168   (eval $ac_compile) 2>&5
20169   ac_status=$?
20170   echo "$as_me:20170: \$? = $ac_status" >&5
20171   (exit $ac_status); } &&
20172          { ac_try='test -s conftest.$ac_objext'
20173   { (eval echo "$as_me:20173: \"$ac_try\"") >&5
20174   (eval $ac_try) 2>&5
20175   ac_status=$?
20176   echo "$as_me:20176: \$? = $ac_status" >&5
20177   (exit $ac_status); }; }; then
20178
20179         cf_cv_hashed_db_version=$cf_db_version
20180         break
20181
20182 else
20183   echo "$as_me: failed program was:" >&5
20184 cat conftest.$ac_ext >&5
20185 fi
20186 rm -f conftest.$ac_objext conftest.$ac_ext
20187 done
20188
20189 fi
20190 echo "$as_me:20190: result: $cf_cv_hashed_db_version" >&5
20191 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
20192
20193 if test "$cf_cv_hashed_db_version" = unknown ; then
20194         { { echo "$as_me:20194: error: Cannot determine version of db" >&5
20195 echo "$as_me: error: Cannot determine version of db" >&2;}
20196    { (exit 1); exit 1; }; }
20197 else
20198
20199 echo "$as_me:20199: checking for db libraries" >&5
20200 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
20201 if test "${cf_cv_hashed_db_libs+set}" = set; then
20202   echo $ECHO_N "(cached) $ECHO_C" >&6
20203 else
20204
20205 cf_cv_hashed_db_libs=unknown
20206 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
20207 do
20208         cf_save_libs="$LIBS"
20209         if test -n "$cf_db_libs"; then
20210
20211 cf_add_libs="-l$cf_db_libs"
20212 # Filter out duplicates - this happens with badly-designed ".pc" files...
20213 for cf_add_1lib in $LIBS
20214 do
20215         for cf_add_2lib in $cf_add_libs
20216         do
20217                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20218                 then
20219                         cf_add_1lib=
20220                         break
20221                 fi
20222         done
20223         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20224 done
20225 LIBS="$cf_add_libs"
20226
20227         fi
20228
20229 echo "${as_me:-configure}:20229: testing checking for library "$cf_db_libs" ..." 1>&5
20230
20231         cat >conftest.$ac_ext <<_ACEOF
20232 #line 20232 "configure"
20233 #include "confdefs.h"
20234
20235 $ac_includes_default
20236 #include <db.h>
20237
20238 int
20239 main (void)
20240 {
20241
20242         char *path = "/tmp/foo";
20243 #ifdef DB_VERSION_MAJOR
20244 #if DB_VERSION_MAJOR >= 4
20245         DB *result = 0;
20246         db_create(&result, NULL, 0);
20247         result->open(result,
20248                 NULL,
20249                 path,
20250                 path,
20251                 DB_HASH,
20252                 DB_CREATE,
20253                 0644);
20254 #elif DB_VERSION_MAJOR >= 3
20255         DB *result = 0;
20256         db_create(&result, NULL, 0);
20257         result->open(result,
20258                 path,
20259                 path,
20260                 DB_HASH,
20261                 DB_CREATE,
20262                 0644);
20263 #elif DB_VERSION_MAJOR >= 2
20264         DB *result = 0;
20265         db_open(path,
20266                 DB_HASH,
20267                 DB_CREATE,
20268                 0644,
20269                 (DB_ENV *) 0,
20270                 (DB_INFO *) 0,
20271                 &result);
20272 #endif /* DB_VERSION_MAJOR */
20273 #else
20274         DB *result = dbopen(path,
20275                      2,
20276                      0644,
20277                      DB_HASH,
20278                      0);
20279 #endif
20280         ${cf_cv_main_return:-return}(result != 0)
20281
20282   ;
20283   return 0;
20284 }
20285 _ACEOF
20286 rm -f conftest.$ac_objext conftest$ac_exeext
20287 if { (eval echo "$as_me:20287: \"$ac_link\"") >&5
20288   (eval $ac_link) 2>&5
20289   ac_status=$?
20290   echo "$as_me:20290: \$? = $ac_status" >&5
20291   (exit $ac_status); } &&
20292          { ac_try='test -s conftest$ac_exeext'
20293   { (eval echo "$as_me:20293: \"$ac_try\"") >&5
20294   (eval $ac_try) 2>&5
20295   ac_status=$?
20296   echo "$as_me:20296: \$? = $ac_status" >&5
20297   (exit $ac_status); }; }; then
20298
20299         if test -n "$cf_db_libs" ; then
20300                 cf_cv_hashed_db_libs=$cf_db_libs
20301         else
20302                 cf_cv_hashed_db_libs=default
20303         fi
20304         LIBS="$cf_save_libs"
20305         break
20306
20307 else
20308   echo "$as_me: failed program was:" >&5
20309 cat conftest.$ac_ext >&5
20310 fi
20311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20312         LIBS="$cf_save_libs"
20313 done
20314
20315 fi
20316 echo "$as_me:20316: result: $cf_cv_hashed_db_libs" >&5
20317 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
20318
20319         if test "$cf_cv_hashed_db_libs" = unknown ; then
20320                 { { echo "$as_me:20320: error: Cannot determine library for db" >&5
20321 echo "$as_me: error: Cannot determine library for db" >&2;}
20322    { (exit 1); exit 1; }; }
20323         elif test "$cf_cv_hashed_db_libs" != default ; then
20324
20325 cf_add_libs="-l$cf_cv_hashed_db_libs"
20326 # Filter out duplicates - this happens with badly-designed ".pc" files...
20327 for cf_add_1lib in $LIBS
20328 do
20329         for cf_add_2lib in $cf_add_libs
20330         do
20331                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20332                 then
20333                         cf_add_1lib=
20334                         break
20335                 fi
20336         done
20337         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20338 done
20339 LIBS="$cf_add_libs"
20340
20341         fi
20342 fi
20343
20344 else
20345
20346         { { echo "$as_me:20346: error: Cannot find db.h" >&5
20347 echo "$as_me: error: Cannot find db.h" >&2;}
20348    { (exit 1); exit 1; }; }
20349
20350 fi
20351
20352 fi
20353
20354 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
20355         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20356         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20357 fi
20358
20359 # Just in case, check if the C compiler has a bool type.
20360
20361 echo "$as_me:20361: checking if we should include stdbool.h" >&5
20362 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20363
20364 if test "${cf_cv_header_stdbool_h+set}" = set; then
20365   echo $ECHO_N "(cached) $ECHO_C" >&6
20366 else
20367
20368         cat >conftest.$ac_ext <<_ACEOF
20369 #line 20369 "configure"
20370 #include "confdefs.h"
20371
20372 int
20373 main (void)
20374 {
20375 bool foo = false
20376   ;
20377   return 0;
20378 }
20379 _ACEOF
20380 rm -f conftest.$ac_objext
20381 if { (eval echo "$as_me:20381: \"$ac_compile\"") >&5
20382   (eval $ac_compile) 2>&5
20383   ac_status=$?
20384   echo "$as_me:20384: \$? = $ac_status" >&5
20385   (exit $ac_status); } &&
20386          { ac_try='test -s conftest.$ac_objext'
20387   { (eval echo "$as_me:20387: \"$ac_try\"") >&5
20388   (eval $ac_try) 2>&5
20389   ac_status=$?
20390   echo "$as_me:20390: \$? = $ac_status" >&5
20391   (exit $ac_status); }; }; then
20392   cf_cv_header_stdbool_h=0
20393 else
20394   echo "$as_me: failed program was:" >&5
20395 cat conftest.$ac_ext >&5
20396 cat >conftest.$ac_ext <<_ACEOF
20397 #line 20397 "configure"
20398 #include "confdefs.h"
20399
20400 #ifndef __BEOS__
20401 #include <stdbool.h>
20402 #endif
20403
20404 int
20405 main (void)
20406 {
20407 bool foo = false
20408   ;
20409   return 0;
20410 }
20411 _ACEOF
20412 rm -f conftest.$ac_objext
20413 if { (eval echo "$as_me:20413: \"$ac_compile\"") >&5
20414   (eval $ac_compile) 2>&5
20415   ac_status=$?
20416   echo "$as_me:20416: \$? = $ac_status" >&5
20417   (exit $ac_status); } &&
20418          { ac_try='test -s conftest.$ac_objext'
20419   { (eval echo "$as_me:20419: \"$ac_try\"") >&5
20420   (eval $ac_try) 2>&5
20421   ac_status=$?
20422   echo "$as_me:20422: \$? = $ac_status" >&5
20423   (exit $ac_status); }; }; then
20424   cf_cv_header_stdbool_h=1
20425 else
20426   echo "$as_me: failed program was:" >&5
20427 cat conftest.$ac_ext >&5
20428 cf_cv_header_stdbool_h=0
20429 fi
20430 rm -f conftest.$ac_objext conftest.$ac_ext
20431 fi
20432 rm -f conftest.$ac_objext conftest.$ac_ext
20433 fi
20434
20435 if test "$cf_cv_header_stdbool_h" = 1
20436 then    echo "$as_me:20436: result: yes" >&5
20437 echo "${ECHO_T}yes" >&6
20438 else    echo "$as_me:20438: result: no" >&5
20439 echo "${ECHO_T}no" >&6
20440 fi
20441
20442 echo "$as_me:20442: checking for builtin bool type" >&5
20443 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20444
20445 if test "${cf_cv_cc_bool_type+set}" = set; then
20446   echo $ECHO_N "(cached) $ECHO_C" >&6
20447 else
20448
20449         cat >conftest.$ac_ext <<_ACEOF
20450 #line 20450 "configure"
20451 #include "confdefs.h"
20452
20453 #include <stdio.h>
20454 #include <sys/types.h>
20455
20456 int
20457 main (void)
20458 {
20459 bool x = false
20460   ;
20461   return 0;
20462 }
20463 _ACEOF
20464 rm -f conftest.$ac_objext
20465 if { (eval echo "$as_me:20465: \"$ac_compile\"") >&5
20466   (eval $ac_compile) 2>&5
20467   ac_status=$?
20468   echo "$as_me:20468: \$? = $ac_status" >&5
20469   (exit $ac_status); } &&
20470          { ac_try='test -s conftest.$ac_objext'
20471   { (eval echo "$as_me:20471: \"$ac_try\"") >&5
20472   (eval $ac_try) 2>&5
20473   ac_status=$?
20474   echo "$as_me:20474: \$? = $ac_status" >&5
20475   (exit $ac_status); }; }; then
20476   cf_cv_cc_bool_type=1
20477 else
20478   echo "$as_me: failed program was:" >&5
20479 cat conftest.$ac_ext >&5
20480 cf_cv_cc_bool_type=0
20481 fi
20482 rm -f conftest.$ac_objext conftest.$ac_ext
20483
20484 fi
20485
20486 if test "$cf_cv_cc_bool_type" = 1
20487 then    echo "$as_me:20487: result: yes" >&5
20488 echo "${ECHO_T}yes" >&6
20489 else    echo "$as_me:20489: result: no" >&5
20490 echo "${ECHO_T}no" >&6
20491 fi
20492
20493 # Check for C++ compiler characteristics (and ensure that it's there!)
20494 if test -n "$CXX" ; then
20495         ac_ext=cc
20496 ac_cpp='$CXXCPP $CPPFLAGS'
20497 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20498 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20499 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20500 ac_main_return=return
20501
20502 if test -n "$GXX" ; then
20503
20504         cf_save="$LIBS"
20505         LIBS="$LIBS $CXXLIBS"
20506         echo "$as_me:20506: checking if we already have C++ library" >&5
20507 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20508         cat >conftest.$ac_ext <<_ACEOF
20509 #line 20509 "configure"
20510 #include "confdefs.h"
20511
20512                         #include <iostream>
20513 int
20514 main (void)
20515 {
20516
20517                         std::cout << "Hello World!" << std::endl;
20518   ;
20519   return 0;
20520 }
20521 _ACEOF
20522 rm -f conftest.$ac_objext conftest$ac_exeext
20523 if { (eval echo "$as_me:20523: \"$ac_link\"") >&5
20524   (eval $ac_link) 2>&5
20525   ac_status=$?
20526   echo "$as_me:20526: \$? = $ac_status" >&5
20527   (exit $ac_status); } &&
20528          { ac_try='test -s conftest$ac_exeext'
20529   { (eval echo "$as_me:20529: \"$ac_try\"") >&5
20530   (eval $ac_try) 2>&5
20531   ac_status=$?
20532   echo "$as_me:20532: \$? = $ac_status" >&5
20533   (exit $ac_status); }; }; then
20534   cf_have_libstdcpp=yes
20535 else
20536   echo "$as_me: failed program was:" >&5
20537 cat conftest.$ac_ext >&5
20538 cf_have_libstdcpp=no
20539 fi
20540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20541         echo "$as_me:20541: result: $cf_have_libstdcpp" >&5
20542 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20543         LIBS="$cf_save"
20544
20545         if test $cf_have_libstdcpp != yes
20546         then
20547                 case $cf_cv_system_name in
20548                 (os2*)
20549                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20550                                 cf_stdcpp_libname=stdcpp
20551                         else
20552                                 cf_stdcpp_libname=stdc++
20553                         fi
20554                         ;;
20555                 (*)
20556                         cf_stdcpp_libname=stdc++
20557                         ;;
20558                 esac
20559
20560                 echo "$as_me:20560: checking for library $cf_stdcpp_libname" >&5
20561 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20562 if test "${cf_cv_libstdcpp+set}" = set; then
20563   echo $ECHO_N "(cached) $ECHO_C" >&6
20564 else
20565
20566                         cf_save="$LIBS"
20567                         LIBS="$LIBS $CXXLIBS"
20568
20569 cf_add_libs="-l$cf_stdcpp_libname"
20570 # Filter out duplicates - this happens with badly-designed ".pc" files...
20571 for cf_add_1lib in $LIBS
20572 do
20573         for cf_add_2lib in $cf_add_libs
20574         do
20575                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20576                 then
20577                         cf_add_1lib=
20578                         break
20579                 fi
20580         done
20581         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20582 done
20583 LIBS="$cf_add_libs"
20584
20585                 cat >conftest.$ac_ext <<_ACEOF
20586 #line 20586 "configure"
20587 #include "confdefs.h"
20588
20589                                 #include <iostream>
20590 int
20591 main (void)
20592 {
20593
20594                                 std::cout << "Hello World!" << std::endl;
20595   ;
20596   return 0;
20597 }
20598 _ACEOF
20599 rm -f conftest.$ac_objext conftest$ac_exeext
20600 if { (eval echo "$as_me:20600: \"$ac_link\"") >&5
20601   (eval $ac_link) 2>&5
20602   ac_status=$?
20603   echo "$as_me:20603: \$? = $ac_status" >&5
20604   (exit $ac_status); } &&
20605          { ac_try='test -s conftest$ac_exeext'
20606   { (eval echo "$as_me:20606: \"$ac_try\"") >&5
20607   (eval $ac_try) 2>&5
20608   ac_status=$?
20609   echo "$as_me:20609: \$? = $ac_status" >&5
20610   (exit $ac_status); }; }; then
20611   cf_cv_libstdcpp=yes
20612 else
20613   echo "$as_me: failed program was:" >&5
20614 cat conftest.$ac_ext >&5
20615 cf_cv_libstdcpp=no
20616 fi
20617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20618                         LIBS="$cf_save"
20619
20620 fi
20621 echo "$as_me:20621: result: $cf_cv_libstdcpp" >&5
20622 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20623                 test "$cf_cv_libstdcpp" = yes && {
20624 cf_add_libs="-l$cf_stdcpp_libname"
20625 # Filter out duplicates - this happens with badly-designed ".pc" files...
20626 for cf_add_1lib in $CXXLIBS
20627 do
20628         for cf_add_2lib in $cf_add_libs
20629         do
20630                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20631                 then
20632                         cf_add_1lib=
20633                         break
20634                 fi
20635         done
20636         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20637 done
20638 CXXLIBS="$cf_add_libs"
20639  }
20640         fi
20641 fi
20642
20643         echo "$as_me:20643: checking whether $CXX understands -c and -o together" >&5
20644 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20645 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20646   echo $ECHO_N "(cached) $ECHO_C" >&6
20647 else
20648
20649 cat > conftest.$ac_ext <<CF_EOF
20650 int main(void)
20651 {
20652         ${cf_cv_main_return:-return}(0);
20653 }
20654 CF_EOF
20655 # We do the test twice because some compilers refuse to overwrite an
20656 # existing .o file with -o, though they will create one.
20657 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20658 if { (eval echo "$as_me:20658: \"$ac_try\"") >&5
20659   (eval $ac_try) 2>&5
20660   ac_status=$?
20661   echo "$as_me:20661: \$? = $ac_status" >&5
20662   (exit $ac_status); } &&
20663   test -f conftest2.$ac_objext && { (eval echo "$as_me:20663: \"$ac_try\"") >&5
20664   (eval $ac_try) 2>&5
20665   ac_status=$?
20666   echo "$as_me:20666: \$? = $ac_status" >&5
20667   (exit $ac_status); };
20668 then
20669   eval cf_cv_prog_CXX_c_o=yes
20670 else
20671   eval cf_cv_prog_CXX_c_o=no
20672 fi
20673 rm -rf conftest*
20674
20675 fi
20676 if test $cf_cv_prog_CXX_c_o = yes; then
20677   echo "$as_me:20677: result: yes" >&5
20678 echo "${ECHO_T}yes" >&6
20679 else
20680   echo "$as_me:20680: result: no" >&5
20681 echo "${ECHO_T}no" >&6
20682 fi
20683
20684         case $GXX_VERSION in
20685         (1*|2.0-6*)
20686                 cf_cxx_library=yes
20687                 ;;
20688         (*-2.7*|2.7*)
20689
20690 cf_cxx_library=unknown
20691 case $cf_cv_system_name in
20692 (os2*)
20693         cf_gpp_libname=gpp
20694         ;;
20695 (*)
20696         cf_gpp_libname=g++
20697         ;;
20698 esac
20699 if test "$GXX" = yes; then
20700         echo "$as_me:20700: checking for lib$cf_gpp_libname" >&5
20701 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20702         cf_save="$LIBS"
20703
20704 cf_add_libs="-l$cf_gpp_libname"
20705 # Filter out duplicates - this happens with badly-designed ".pc" files...
20706 for cf_add_1lib in $LIBS
20707 do
20708         for cf_add_2lib in $cf_add_libs
20709         do
20710                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20711                 then
20712                         cf_add_1lib=
20713                         break
20714                 fi
20715         done
20716         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20717 done
20718 LIBS="$cf_add_libs"
20719
20720         cat >conftest.$ac_ext <<_ACEOF
20721 #line 20721 "configure"
20722 #include "confdefs.h"
20723
20724 #include <$cf_gpp_libname/builtin.h>
20725
20726 int
20727 main (void)
20728 {
20729 two_arg_error_handler_t foo2 = lib_error_handler
20730   ;
20731   return 0;
20732 }
20733 _ACEOF
20734 rm -f conftest.$ac_objext conftest$ac_exeext
20735 if { (eval echo "$as_me:20735: \"$ac_link\"") >&5
20736   (eval $ac_link) 2>&5
20737   ac_status=$?
20738   echo "$as_me:20738: \$? = $ac_status" >&5
20739   (exit $ac_status); } &&
20740          { ac_try='test -s conftest$ac_exeext'
20741   { (eval echo "$as_me:20741: \"$ac_try\"") >&5
20742   (eval $ac_try) 2>&5
20743   ac_status=$?
20744   echo "$as_me:20744: \$? = $ac_status" >&5
20745   (exit $ac_status); }; }; then
20746   cf_cxx_library=yes
20747
20748 cf_add_libs="-l$cf_gpp_libname"
20749 # Filter out duplicates - this happens with badly-designed ".pc" files...
20750 for cf_add_1lib in $CXXLIBS
20751 do
20752         for cf_add_2lib in $cf_add_libs
20753         do
20754                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20755                 then
20756                         cf_add_1lib=
20757                         break
20758                 fi
20759         done
20760         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20761 done
20762 CXXLIBS="$cf_add_libs"
20763
20764          if test "$cf_gpp_libname" = cpp ; then
20765
20766 cat >>confdefs.h <<\EOF
20767 #define HAVE_GPP_BUILTIN_H 1
20768 EOF
20769
20770          else
20771
20772 cat >>confdefs.h <<\EOF
20773 #define HAVE_GXX_BUILTIN_H 1
20774 EOF
20775
20776          fi
20777 else
20778   echo "$as_me: failed program was:" >&5
20779 cat conftest.$ac_ext >&5
20780 cat >conftest.$ac_ext <<_ACEOF
20781 #line 20781 "configure"
20782 #include "confdefs.h"
20783
20784 #include <builtin.h>
20785
20786 int
20787 main (void)
20788 {
20789 two_arg_error_handler_t foo2 = lib_error_handler
20790   ;
20791   return 0;
20792 }
20793 _ACEOF
20794 rm -f conftest.$ac_objext conftest$ac_exeext
20795 if { (eval echo "$as_me:20795: \"$ac_link\"") >&5
20796   (eval $ac_link) 2>&5
20797   ac_status=$?
20798   echo "$as_me:20798: \$? = $ac_status" >&5
20799   (exit $ac_status); } &&
20800          { ac_try='test -s conftest$ac_exeext'
20801   { (eval echo "$as_me:20801: \"$ac_try\"") >&5
20802   (eval $ac_try) 2>&5
20803   ac_status=$?
20804   echo "$as_me:20804: \$? = $ac_status" >&5
20805   (exit $ac_status); }; }; then
20806   cf_cxx_library=yes
20807
20808 cf_add_libs="-l$cf_gpp_libname"
20809 # Filter out duplicates - this happens with badly-designed ".pc" files...
20810 for cf_add_1lib in $CXXLIBS
20811 do
20812         for cf_add_2lib in $cf_add_libs
20813         do
20814                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20815                 then
20816                         cf_add_1lib=
20817                         break
20818                 fi
20819         done
20820         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20821 done
20822 CXXLIBS="$cf_add_libs"
20823
20824 cat >>confdefs.h <<\EOF
20825 #define HAVE_BUILTIN_H 1
20826 EOF
20827
20828 else
20829   echo "$as_me: failed program was:" >&5
20830 cat conftest.$ac_ext >&5
20831 cf_cxx_library=no
20832 fi
20833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20834 fi
20835 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20836         LIBS="$cf_save"
20837         echo "$as_me:20837: result: $cf_cxx_library" >&5
20838 echo "${ECHO_T}$cf_cxx_library" >&6
20839 fi
20840
20841                 ;;
20842         (*)
20843                 cf_cxx_library=no
20844                 ;;
20845         esac
20846
20847         ac_ext=cc
20848 ac_cpp='$CXXCPP $CPPFLAGS'
20849 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20850 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20851 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20852 ac_main_return=return
20853 echo "$as_me:20853: checking how to run the C++ preprocessor" >&5
20854 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20855 if test -z "$CXXCPP"; then
20856   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20857   echo $ECHO_N "(cached) $ECHO_C" >&6
20858 else
20859       # Double quotes because CXXCPP needs to be expanded
20860     for CXXCPP in "$CXX -E" "/lib/cpp"
20861     do
20862       ac_preproc_ok=false
20863 for ac_cxx_preproc_warn_flag in '' yes
20864 do
20865   # Use a header file that comes with gcc, so configuring glibc
20866   # with a fresh cross-compiler works.
20867   # On the NeXT, cc -E runs the code through the compiler's parser,
20868   # not just through cpp. "Syntax error" is here to catch this case.
20869   cat >conftest.$ac_ext <<_ACEOF
20870 #line 20870 "configure"
20871 #include "confdefs.h"
20872 #include <assert.h>
20873                      Syntax error
20874 _ACEOF
20875 if { (eval echo "$as_me:20875: \"$ac_cpp conftest.$ac_ext\"") >&5
20876   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20877   ac_status=$?
20878   egrep -v '^ *\+' conftest.er1 >conftest.err
20879   rm -f conftest.er1
20880   cat conftest.err >&5
20881   echo "$as_me:20881: \$? = $ac_status" >&5
20882   (exit $ac_status); } >/dev/null; then
20883   if test -s conftest.err; then
20884     ac_cpp_err=$ac_cxx_preproc_warn_flag
20885   else
20886     ac_cpp_err=
20887   fi
20888 else
20889   ac_cpp_err=yes
20890 fi
20891 if test -z "$ac_cpp_err"; then
20892   :
20893 else
20894   echo "$as_me: failed program was:" >&5
20895   cat conftest.$ac_ext >&5
20896   # Broken: fails on valid input.
20897 continue
20898 fi
20899 rm -f conftest.err conftest.$ac_ext
20900
20901   # OK, works on sane cases.  Now check whether non-existent headers
20902   # can be detected and how.
20903   cat >conftest.$ac_ext <<_ACEOF
20904 #line 20904 "configure"
20905 #include "confdefs.h"
20906 #include <ac_nonexistent.h>
20907 _ACEOF
20908 if { (eval echo "$as_me:20908: \"$ac_cpp conftest.$ac_ext\"") >&5
20909   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20910   ac_status=$?
20911   egrep -v '^ *\+' conftest.er1 >conftest.err
20912   rm -f conftest.er1
20913   cat conftest.err >&5
20914   echo "$as_me:20914: \$? = $ac_status" >&5
20915   (exit $ac_status); } >/dev/null; then
20916   if test -s conftest.err; then
20917     ac_cpp_err=$ac_cxx_preproc_warn_flag
20918   else
20919     ac_cpp_err=
20920   fi
20921 else
20922   ac_cpp_err=yes
20923 fi
20924 if test -z "$ac_cpp_err"; then
20925   # Broken: success on invalid input.
20926 continue
20927 else
20928   echo "$as_me: failed program was:" >&5
20929   cat conftest.$ac_ext >&5
20930   # Passes both tests.
20931 ac_preproc_ok=:
20932 break
20933 fi
20934 rm -f conftest.err conftest.$ac_ext
20935
20936 done
20937 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20938 rm -f conftest.err conftest.$ac_ext
20939 if $ac_preproc_ok; then
20940   break
20941 fi
20942
20943     done
20944     ac_cv_prog_CXXCPP=$CXXCPP
20945
20946 fi
20947   CXXCPP=$ac_cv_prog_CXXCPP
20948 else
20949   ac_cv_prog_CXXCPP=$CXXCPP
20950 fi
20951 echo "$as_me:20951: result: $CXXCPP" >&5
20952 echo "${ECHO_T}$CXXCPP" >&6
20953 ac_preproc_ok=false
20954 for ac_cxx_preproc_warn_flag in '' yes
20955 do
20956   # Use a header file that comes with gcc, so configuring glibc
20957   # with a fresh cross-compiler works.
20958   # On the NeXT, cc -E runs the code through the compiler's parser,
20959   # not just through cpp. "Syntax error" is here to catch this case.
20960   cat >conftest.$ac_ext <<_ACEOF
20961 #line 20961 "configure"
20962 #include "confdefs.h"
20963 #include <assert.h>
20964                      Syntax error
20965 _ACEOF
20966 if { (eval echo "$as_me:20966: \"$ac_cpp conftest.$ac_ext\"") >&5
20967   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20968   ac_status=$?
20969   egrep -v '^ *\+' conftest.er1 >conftest.err
20970   rm -f conftest.er1
20971   cat conftest.err >&5
20972   echo "$as_me:20972: \$? = $ac_status" >&5
20973   (exit $ac_status); } >/dev/null; then
20974   if test -s conftest.err; then
20975     ac_cpp_err=$ac_cxx_preproc_warn_flag
20976   else
20977     ac_cpp_err=
20978   fi
20979 else
20980   ac_cpp_err=yes
20981 fi
20982 if test -z "$ac_cpp_err"; then
20983   :
20984 else
20985   echo "$as_me: failed program was:" >&5
20986   cat conftest.$ac_ext >&5
20987   # Broken: fails on valid input.
20988 continue
20989 fi
20990 rm -f conftest.err conftest.$ac_ext
20991
20992   # OK, works on sane cases.  Now check whether non-existent headers
20993   # can be detected and how.
20994   cat >conftest.$ac_ext <<_ACEOF
20995 #line 20995 "configure"
20996 #include "confdefs.h"
20997 #include <ac_nonexistent.h>
20998 _ACEOF
20999 if { (eval echo "$as_me:20999: \"$ac_cpp conftest.$ac_ext\"") >&5
21000   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21001   ac_status=$?
21002   egrep -v '^ *\+' conftest.er1 >conftest.err
21003   rm -f conftest.er1
21004   cat conftest.err >&5
21005   echo "$as_me:21005: \$? = $ac_status" >&5
21006   (exit $ac_status); } >/dev/null; then
21007   if test -s conftest.err; then
21008     ac_cpp_err=$ac_cxx_preproc_warn_flag
21009   else
21010     ac_cpp_err=
21011   fi
21012 else
21013   ac_cpp_err=yes
21014 fi
21015 if test -z "$ac_cpp_err"; then
21016   # Broken: success on invalid input.
21017 continue
21018 else
21019   echo "$as_me: failed program was:" >&5
21020   cat conftest.$ac_ext >&5
21021   # Passes both tests.
21022 ac_preproc_ok=:
21023 break
21024 fi
21025 rm -f conftest.err conftest.$ac_ext
21026
21027 done
21028 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21029 rm -f conftest.err conftest.$ac_ext
21030 if $ac_preproc_ok; then
21031   :
21032 else
21033   { { echo "$as_me:21033: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
21034 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
21035    { (exit 1); exit 1; }; }
21036 fi
21037
21038 ac_ext=cc
21039 ac_cpp='$CXXCPP $CPPFLAGS'
21040 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21041 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21042 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21043 ac_main_return=return
21044
21045 for ac_header in typeinfo
21046 do
21047 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21048 echo "$as_me:21048: checking for $ac_header" >&5
21049 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21050 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21051   echo $ECHO_N "(cached) $ECHO_C" >&6
21052 else
21053   cat >conftest.$ac_ext <<_ACEOF
21054 #line 21054 "configure"
21055 #include "confdefs.h"
21056 #include <$ac_header>
21057 _ACEOF
21058 if { (eval echo "$as_me:21058: \"$ac_cpp conftest.$ac_ext\"") >&5
21059   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21060   ac_status=$?
21061   egrep -v '^ *\+' conftest.er1 >conftest.err
21062   rm -f conftest.er1
21063   cat conftest.err >&5
21064   echo "$as_me:21064: \$? = $ac_status" >&5
21065   (exit $ac_status); } >/dev/null; then
21066   if test -s conftest.err; then
21067     ac_cpp_err=$ac_cxx_preproc_warn_flag
21068   else
21069     ac_cpp_err=
21070   fi
21071 else
21072   ac_cpp_err=yes
21073 fi
21074 if test -z "$ac_cpp_err"; then
21075   eval "$as_ac_Header=yes"
21076 else
21077   echo "$as_me: failed program was:" >&5
21078   cat conftest.$ac_ext >&5
21079   eval "$as_ac_Header=no"
21080 fi
21081 rm -f conftest.err conftest.$ac_ext
21082 fi
21083 echo "$as_me:21083: result: `eval echo '${'$as_ac_Header'}'`" >&5
21084 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21085 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21086   cat >>confdefs.h <<EOF
21087 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21088 EOF
21089
21090 fi
21091 done
21092
21093 for ac_header in iostream
21094 do
21095 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21096 echo "$as_me:21096: checking for $ac_header" >&5
21097 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21098 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21099   echo $ECHO_N "(cached) $ECHO_C" >&6
21100 else
21101   cat >conftest.$ac_ext <<_ACEOF
21102 #line 21102 "configure"
21103 #include "confdefs.h"
21104 #include <$ac_header>
21105 _ACEOF
21106 if { (eval echo "$as_me:21106: \"$ac_cpp conftest.$ac_ext\"") >&5
21107   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21108   ac_status=$?
21109   egrep -v '^ *\+' conftest.er1 >conftest.err
21110   rm -f conftest.er1
21111   cat conftest.err >&5
21112   echo "$as_me:21112: \$? = $ac_status" >&5
21113   (exit $ac_status); } >/dev/null; then
21114   if test -s conftest.err; then
21115     ac_cpp_err=$ac_cxx_preproc_warn_flag
21116   else
21117     ac_cpp_err=
21118   fi
21119 else
21120   ac_cpp_err=yes
21121 fi
21122 if test -z "$ac_cpp_err"; then
21123   eval "$as_ac_Header=yes"
21124 else
21125   echo "$as_me: failed program was:" >&5
21126   cat conftest.$ac_ext >&5
21127   eval "$as_ac_Header=no"
21128 fi
21129 rm -f conftest.err conftest.$ac_ext
21130 fi
21131 echo "$as_me:21131: result: `eval echo '${'$as_ac_Header'}'`" >&5
21132 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21133 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21134   cat >>confdefs.h <<EOF
21135 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21136 EOF
21137
21138 fi
21139 done
21140
21141 if test x"$ac_cv_header_iostream" = xyes ; then
21142         echo "$as_me:21142: checking if iostream uses std-namespace" >&5
21143 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
21144         cat >conftest.$ac_ext <<_ACEOF
21145 #line 21145 "configure"
21146 #include "confdefs.h"
21147
21148 #include <iostream>
21149 using std::endl;
21150 using std::cerr;
21151 int
21152 main (void)
21153 {
21154
21155 cerr << "testing" << endl;
21156
21157   ;
21158   return 0;
21159 }
21160 _ACEOF
21161 rm -f conftest.$ac_objext
21162 if { (eval echo "$as_me:21162: \"$ac_compile\"") >&5
21163   (eval $ac_compile) 2>&5
21164   ac_status=$?
21165   echo "$as_me:21165: \$? = $ac_status" >&5
21166   (exit $ac_status); } &&
21167          { ac_try='test -s conftest.$ac_objext'
21168   { (eval echo "$as_me:21168: \"$ac_try\"") >&5
21169   (eval $ac_try) 2>&5
21170   ac_status=$?
21171   echo "$as_me:21171: \$? = $ac_status" >&5
21172   (exit $ac_status); }; }; then
21173   cf_iostream_namespace=yes
21174 else
21175   echo "$as_me: failed program was:" >&5
21176 cat conftest.$ac_ext >&5
21177 cf_iostream_namespace=no
21178 fi
21179 rm -f conftest.$ac_objext conftest.$ac_ext
21180         echo "$as_me:21180: result: $cf_iostream_namespace" >&5
21181 echo "${ECHO_T}$cf_iostream_namespace" >&6
21182         if test "$cf_iostream_namespace" = yes ; then
21183
21184 cat >>confdefs.h <<\EOF
21185 #define IOSTREAM_NAMESPACE 1
21186 EOF
21187
21188         fi
21189 fi
21190
21191 echo "$as_me:21191: checking if we should include stdbool.h" >&5
21192 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21193
21194 if test "${cf_cv_header_stdbool_h+set}" = set; then
21195   echo $ECHO_N "(cached) $ECHO_C" >&6
21196 else
21197
21198         cat >conftest.$ac_ext <<_ACEOF
21199 #line 21199 "configure"
21200 #include "confdefs.h"
21201
21202 int
21203 main (void)
21204 {
21205 bool foo = false
21206   ;
21207   return 0;
21208 }
21209 _ACEOF
21210 rm -f conftest.$ac_objext
21211 if { (eval echo "$as_me:21211: \"$ac_compile\"") >&5
21212   (eval $ac_compile) 2>&5
21213   ac_status=$?
21214   echo "$as_me:21214: \$? = $ac_status" >&5
21215   (exit $ac_status); } &&
21216          { ac_try='test -s conftest.$ac_objext'
21217   { (eval echo "$as_me:21217: \"$ac_try\"") >&5
21218   (eval $ac_try) 2>&5
21219   ac_status=$?
21220   echo "$as_me:21220: \$? = $ac_status" >&5
21221   (exit $ac_status); }; }; then
21222   cf_cv_header_stdbool_h=0
21223 else
21224   echo "$as_me: failed program was:" >&5
21225 cat conftest.$ac_ext >&5
21226 cat >conftest.$ac_ext <<_ACEOF
21227 #line 21227 "configure"
21228 #include "confdefs.h"
21229
21230 #ifndef __BEOS__
21231 #include <stdbool.h>
21232 #endif
21233
21234 int
21235 main (void)
21236 {
21237 bool foo = false
21238   ;
21239   return 0;
21240 }
21241 _ACEOF
21242 rm -f conftest.$ac_objext
21243 if { (eval echo "$as_me:21243: \"$ac_compile\"") >&5
21244   (eval $ac_compile) 2>&5
21245   ac_status=$?
21246   echo "$as_me:21246: \$? = $ac_status" >&5
21247   (exit $ac_status); } &&
21248          { ac_try='test -s conftest.$ac_objext'
21249   { (eval echo "$as_me:21249: \"$ac_try\"") >&5
21250   (eval $ac_try) 2>&5
21251   ac_status=$?
21252   echo "$as_me:21252: \$? = $ac_status" >&5
21253   (exit $ac_status); }; }; then
21254   cf_cv_header_stdbool_h=1
21255 else
21256   echo "$as_me: failed program was:" >&5
21257 cat conftest.$ac_ext >&5
21258 cf_cv_header_stdbool_h=0
21259 fi
21260 rm -f conftest.$ac_objext conftest.$ac_ext
21261 fi
21262 rm -f conftest.$ac_objext conftest.$ac_ext
21263 fi
21264
21265 if test "$cf_cv_header_stdbool_h" = 1
21266 then    echo "$as_me:21266: result: yes" >&5
21267 echo "${ECHO_T}yes" >&6
21268 else    echo "$as_me:21268: result: no" >&5
21269 echo "${ECHO_T}no" >&6
21270 fi
21271
21272 echo "$as_me:21272: checking for builtin bool type" >&5
21273 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21274
21275 if test "${cf_cv_builtin_bool+set}" = set; then
21276   echo $ECHO_N "(cached) $ECHO_C" >&6
21277 else
21278
21279         cat >conftest.$ac_ext <<_ACEOF
21280 #line 21280 "configure"
21281 #include "confdefs.h"
21282
21283 #include <stdio.h>
21284 #include <sys/types.h>
21285
21286 int
21287 main (void)
21288 {
21289 bool x = false
21290   ;
21291   return 0;
21292 }
21293 _ACEOF
21294 rm -f conftest.$ac_objext
21295 if { (eval echo "$as_me:21295: \"$ac_compile\"") >&5
21296   (eval $ac_compile) 2>&5
21297   ac_status=$?
21298   echo "$as_me:21298: \$? = $ac_status" >&5
21299   (exit $ac_status); } &&
21300          { ac_try='test -s conftest.$ac_objext'
21301   { (eval echo "$as_me:21301: \"$ac_try\"") >&5
21302   (eval $ac_try) 2>&5
21303   ac_status=$?
21304   echo "$as_me:21304: \$? = $ac_status" >&5
21305   (exit $ac_status); }; }; then
21306   cf_cv_builtin_bool=1
21307 else
21308   echo "$as_me: failed program was:" >&5
21309 cat conftest.$ac_ext >&5
21310 cf_cv_builtin_bool=0
21311 fi
21312 rm -f conftest.$ac_objext conftest.$ac_ext
21313
21314 fi
21315
21316 if test "$cf_cv_builtin_bool" = 1
21317 then    echo "$as_me:21317: result: yes" >&5
21318 echo "${ECHO_T}yes" >&6
21319 else    echo "$as_me:21319: result: no" >&5
21320 echo "${ECHO_T}no" >&6
21321 fi
21322
21323 echo "$as_me:21323: checking for size of bool" >&5
21324 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21325 if test "${cf_cv_type_of_bool+set}" = set; then
21326   echo $ECHO_N "(cached) $ECHO_C" >&6
21327 else
21328
21329         rm -f cf_test.out
21330         if test "$cross_compiling" = yes; then
21331   cf_cv_type_of_bool=unknown
21332 else
21333   cat >conftest.$ac_ext <<_ACEOF
21334 #line 21334 "configure"
21335 #include "confdefs.h"
21336
21337 #include <stdlib.h>
21338 #include <stdio.h>
21339
21340 #if defined(__cplusplus)
21341
21342 #ifdef HAVE_GXX_BUILTIN_H
21343 #include <g++/builtin.h>
21344 #elif HAVE_GPP_BUILTIN_H
21345 #include <gpp/builtin.h>
21346 #elif HAVE_BUILTIN_H
21347 #include <builtin.h>
21348 #endif
21349
21350 #else
21351
21352 #if $cf_cv_header_stdbool_h
21353 #include <stdbool.h>
21354 #endif
21355
21356 #endif
21357
21358 int main(void)
21359 {
21360         FILE *fp = fopen("cf_test.out", "w");
21361         if (fp != 0) {
21362                 bool x = true;
21363                 if ((bool)(-x) >= 0)
21364                         fputs("unsigned ", fp);
21365                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21366                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21367                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21368                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21369                 fclose(fp);
21370         }
21371         ${cf_cv_main_return:-return}(0);
21372 }
21373
21374 _ACEOF
21375 rm -f conftest$ac_exeext
21376 if { (eval echo "$as_me:21376: \"$ac_link\"") >&5
21377   (eval $ac_link) 2>&5
21378   ac_status=$?
21379   echo "$as_me:21379: \$? = $ac_status" >&5
21380   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21381   { (eval echo "$as_me:21381: \"$ac_try\"") >&5
21382   (eval $ac_try) 2>&5
21383   ac_status=$?
21384   echo "$as_me:21384: \$? = $ac_status" >&5
21385   (exit $ac_status); }; }; then
21386   cf_cv_type_of_bool=`cat cf_test.out`
21387                  if test -z "$cf_cv_type_of_bool"; then
21388                    cf_cv_type_of_bool=unknown
21389                  fi
21390 else
21391   echo "$as_me: program exited with status $ac_status" >&5
21392 echo "$as_me: failed program was:" >&5
21393 cat conftest.$ac_ext >&5
21394 cf_cv_type_of_bool=unknown
21395 fi
21396 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21397 fi
21398
21399 fi
21400
21401         rm -f cf_test.out
21402 echo "$as_me:21402: result: $cf_cv_type_of_bool" >&5
21403 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21404 if test "$cf_cv_type_of_bool" = unknown ; then
21405         case .$NCURSES_BOOL in
21406         (.auto|.) NCURSES_BOOL=unsigned;;
21407         esac
21408         { echo "$as_me:21408: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21409 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21410         cf_cv_type_of_bool=$NCURSES_BOOL
21411 fi
21412
21413 echo "$as_me:21413: checking for special defines needed for etip.h" >&5
21414 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21415 cf_save_CXXFLAGS="$CXXFLAGS"
21416 cf_result="none"
21417
21418 # etip.h includes ncurses.h which includes ncurses_dll.h
21419 # But ncurses_dll.h is generated - fix here.
21420 test -d include || mkdir include
21421 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
21422
21423 for cf_math in "" MATH_H
21424 do
21425 for cf_excp in "" MATH_EXCEPTION
21426 do
21427         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21428         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21429         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21430 cat >conftest.$ac_ext <<_ACEOF
21431 #line 21431 "configure"
21432 #include "confdefs.h"
21433
21434 #include <etip.h.in>
21435
21436 int
21437 main (void)
21438 {
21439
21440   ;
21441   return 0;
21442 }
21443 _ACEOF
21444 rm -f conftest.$ac_objext
21445 if { (eval echo "$as_me:21445: \"$ac_compile\"") >&5
21446   (eval $ac_compile) 2>&5
21447   ac_status=$?
21448   echo "$as_me:21448: \$? = $ac_status" >&5
21449   (exit $ac_status); } &&
21450          { ac_try='test -s conftest.$ac_objext'
21451   { (eval echo "$as_me:21451: \"$ac_try\"") >&5
21452   (eval $ac_try) 2>&5
21453   ac_status=$?
21454   echo "$as_me:21454: \$? = $ac_status" >&5
21455   (exit $ac_status); }; }; then
21456
21457         test -n "$cf_math" && cat >>confdefs.h <<EOF
21458 #define ETIP_NEEDS_${cf_math} 1
21459 EOF
21460
21461         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21462 #define ETIP_NEEDS_${cf_excp} 1
21463 EOF
21464
21465         cf_result="$cf_math $cf_excp"
21466         break 2
21467
21468 else
21469   echo "$as_me: failed program was:" >&5
21470 cat conftest.$ac_ext >&5
21471 fi
21472 rm -f conftest.$ac_objext conftest.$ac_ext
21473 done
21474 done
21475 echo "$as_me:21475: result: $cf_result" >&5
21476 echo "${ECHO_T}$cf_result" >&6
21477 CXXFLAGS="$cf_save_CXXFLAGS"
21478
21479 if test -n "$CXX"; then
21480 echo "$as_me:21480: checking if $CXX accepts parameter initialization" >&5
21481 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21482 if test "${cf_cv_cpp_param_init+set}" = set; then
21483   echo $ECHO_N "(cached) $ECHO_C" >&6
21484 else
21485
21486         ac_ext=cc
21487 ac_cpp='$CXXCPP $CPPFLAGS'
21488 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21489 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21490 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21491 ac_main_return=return
21492
21493         if test "$cross_compiling" = yes; then
21494   cf_cv_cpp_param_init=unknown
21495 else
21496   cat >conftest.$ac_ext <<_ACEOF
21497 #line 21497 "configure"
21498 #include "confdefs.h"
21499
21500 class TEST {
21501 private:
21502         int value;
21503 public:
21504         TEST(int x = 1);
21505         ~TEST();
21506 };
21507
21508 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21509 {
21510         value = x;
21511 }
21512 int main(void) { }
21513
21514 _ACEOF
21515 rm -f conftest$ac_exeext
21516 if { (eval echo "$as_me:21516: \"$ac_link\"") >&5
21517   (eval $ac_link) 2>&5
21518   ac_status=$?
21519   echo "$as_me:21519: \$? = $ac_status" >&5
21520   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21521   { (eval echo "$as_me:21521: \"$ac_try\"") >&5
21522   (eval $ac_try) 2>&5
21523   ac_status=$?
21524   echo "$as_me:21524: \$? = $ac_status" >&5
21525   (exit $ac_status); }; }; then
21526   cf_cv_cpp_param_init=yes
21527 else
21528   echo "$as_me: program exited with status $ac_status" >&5
21529 echo "$as_me: failed program was:" >&5
21530 cat conftest.$ac_ext >&5
21531 cf_cv_cpp_param_init=no
21532 fi
21533 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21534 fi
21535         ac_ext=cc
21536 ac_cpp='$CXXCPP $CPPFLAGS'
21537 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21538 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21539 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21540 ac_main_return=return
21541
21542 fi
21543 echo "$as_me:21543: result: $cf_cv_cpp_param_init" >&5
21544 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21545 fi
21546 test "$cf_cv_cpp_param_init" = yes &&
21547 cat >>confdefs.h <<\EOF
21548 #define CPP_HAS_PARAM_INIT 1
21549 EOF
21550
21551 if test -n "$CXX"; then
21552
21553 echo "$as_me:21553: checking if $CXX accepts static_cast" >&5
21554 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21555 if test "${cf_cv_cpp_static_cast+set}" = set; then
21556   echo $ECHO_N "(cached) $ECHO_C" >&6
21557 else
21558
21559         ac_ext=cc
21560 ac_cpp='$CXXCPP $CPPFLAGS'
21561 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21562 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21563 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21564 ac_main_return=return
21565
21566         cat >conftest.$ac_ext <<_ACEOF
21567 #line 21567 "configure"
21568 #include "confdefs.h"
21569
21570 class NCursesPanel
21571 {
21572 public:
21573   NCursesPanel(int nlines,
21574                int ncols,
21575                int begin_y = 0,
21576                int begin_x = 0)
21577   {
21578   }
21579   NCursesPanel();
21580   ~NCursesPanel();
21581 };
21582
21583 template<class T> class NCursesUserPanel : public NCursesPanel
21584 {
21585 public:
21586   NCursesUserPanel (int nlines,
21587                     int ncols,
21588                     int begin_y = 0,
21589                     int begin_x = 0,
21590                     const T* p_UserData = static_cast<T*>(0))
21591     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21592   {
21593   };
21594   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21595   {
21596   };
21597
21598   virtual ~NCursesUserPanel() {};
21599 };
21600
21601 int
21602 main (void)
21603 {
21604
21605         const char* p_UserData = static_cast<char*>(0)
21606   ;
21607   return 0;
21608 }
21609 _ACEOF
21610 rm -f conftest.$ac_objext
21611 if { (eval echo "$as_me:21611: \"$ac_compile\"") >&5
21612   (eval $ac_compile) 2>&5
21613   ac_status=$?
21614   echo "$as_me:21614: \$? = $ac_status" >&5
21615   (exit $ac_status); } &&
21616          { ac_try='test -s conftest.$ac_objext'
21617   { (eval echo "$as_me:21617: \"$ac_try\"") >&5
21618   (eval $ac_try) 2>&5
21619   ac_status=$?
21620   echo "$as_me:21620: \$? = $ac_status" >&5
21621   (exit $ac_status); }; }; then
21622   cf_cv_cpp_static_cast=yes
21623 else
21624   echo "$as_me: failed program was:" >&5
21625 cat conftest.$ac_ext >&5
21626 cf_cv_cpp_static_cast=no
21627 fi
21628 rm -f conftest.$ac_objext conftest.$ac_ext
21629
21630         ac_ext=cc
21631 ac_cpp='$CXXCPP $CPPFLAGS'
21632 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21633 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21634 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21635 ac_main_return=return
21636
21637 fi
21638 echo "$as_me:21638: result: $cf_cv_cpp_static_cast" >&5
21639 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21640
21641 fi
21642
21643 test "$cf_cv_cpp_static_cast" = yes &&
21644 cat >>confdefs.h <<\EOF
21645 #define CPP_HAS_STATIC_CAST 1
21646 EOF
21647
21648         CXX_AR='$(AR)'
21649         CXX_ARFLAGS='$(ARFLAGS)'
21650         case $cf_cv_system_name in
21651         (irix*)
21652             if test "$GXX" != yes ; then
21653                 CXX_AR='$(CXX)'
21654                 CXX_ARFLAGS='-ar -o'
21655             fi
21656             ;;
21657         (sco3.2v5*)
21658             CXXLDFLAGS="-u main"
21659             ;;
21660         (solaris2*)
21661             if test "$GXX" != yes ; then
21662                 CXX_AR='$(CXX)'
21663                 CXX_ARFLAGS='-xar -o'
21664             fi
21665             ;;
21666         esac
21667
21668 else
21669         cf_cxx_library=no
21670         cf_cv_builtin_bool=1
21671
21672         # Just because we are not configuring against C++ right now does not
21673         # mean that a user will not want to use C++.  Some distributors disable
21674         # the C++ portion of this configuration as a shortcut (or just to avoid
21675         # compiling the demo in the c++ directory).  So we need a reasonable
21676         # default for the 'bool' type.
21677         #
21678         # Caveat: since the storage of the bool type is not standardized, it
21679         # may change.
21680
21681         if test "$NCURSES_BOOL" != auto ; then
21682                 cf_cv_type_of_bool=$NCURSES_BOOL
21683                 cf_cv_header_stdbool_h=0
21684         else
21685                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21686
21687 echo "$as_me:21687: checking for size of bool" >&5
21688 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21689 if test "${cf_cv_type_of_bool+set}" = set; then
21690   echo $ECHO_N "(cached) $ECHO_C" >&6
21691 else
21692
21693         rm -f cf_test.out
21694         if test "$cross_compiling" = yes; then
21695   cf_cv_type_of_bool=unknown
21696 else
21697   cat >conftest.$ac_ext <<_ACEOF
21698 #line 21698 "configure"
21699 #include "confdefs.h"
21700
21701 #include <stdlib.h>
21702 #include <stdio.h>
21703
21704 #if defined(__cplusplus)
21705
21706 #ifdef HAVE_GXX_BUILTIN_H
21707 #include <g++/builtin.h>
21708 #elif HAVE_GPP_BUILTIN_H
21709 #include <gpp/builtin.h>
21710 #elif HAVE_BUILTIN_H
21711 #include <builtin.h>
21712 #endif
21713
21714 #else
21715
21716 #if $cf_cv_header_stdbool_h
21717 #include <stdbool.h>
21718 #endif
21719
21720 #endif
21721
21722 int main(void)
21723 {
21724         FILE *fp = fopen("cf_test.out", "w");
21725         if (fp != 0) {
21726                 bool x = true;
21727                 if ((bool)(-x) >= 0)
21728                         fputs("unsigned ", fp);
21729                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21730                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21731                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21732                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21733                 fclose(fp);
21734         }
21735         ${cf_cv_main_return:-return}(0);
21736 }
21737
21738 _ACEOF
21739 rm -f conftest$ac_exeext
21740 if { (eval echo "$as_me:21740: \"$ac_link\"") >&5
21741   (eval $ac_link) 2>&5
21742   ac_status=$?
21743   echo "$as_me:21743: \$? = $ac_status" >&5
21744   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21745   { (eval echo "$as_me:21745: \"$ac_try\"") >&5
21746   (eval $ac_try) 2>&5
21747   ac_status=$?
21748   echo "$as_me:21748: \$? = $ac_status" >&5
21749   (exit $ac_status); }; }; then
21750   cf_cv_type_of_bool=`cat cf_test.out`
21751                  if test -z "$cf_cv_type_of_bool"; then
21752                    cf_cv_type_of_bool=unknown
21753                  fi
21754 else
21755   echo "$as_me: program exited with status $ac_status" >&5
21756 echo "$as_me: failed program was:" >&5
21757 cat conftest.$ac_ext >&5
21758 cf_cv_type_of_bool=unknown
21759 fi
21760 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21761 fi
21762
21763 fi
21764
21765         rm -f cf_test.out
21766 echo "$as_me:21766: result: $cf_cv_type_of_bool" >&5
21767 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21768 if test "$cf_cv_type_of_bool" = unknown ; then
21769         case .$NCURSES_BOOL in
21770         (.auto|.) NCURSES_BOOL=unsigned;;
21771         esac
21772         { echo "$as_me:21772: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21773 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21774         cf_cv_type_of_bool=$NCURSES_BOOL
21775 fi
21776
21777                 else
21778                         echo "$as_me:21778: checking for fallback type of bool" >&5
21779 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21780                         case "$host_cpu" in
21781                         (i?86)  cf_cv_type_of_bool=char ;;
21782                         (*)     cf_cv_type_of_bool=int  ;;
21783                         esac
21784                         echo "$as_me:21784: result: $cf_cv_type_of_bool" >&5
21785 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21786                 fi
21787         fi
21788 fi
21789
21790 # If the C compiler did not declare bool, and we did not determine that the C++
21791 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21792 # ncurses library use the same type as C++ bool.  Note that this allows one to
21793 # specify the type of bool in a configure-script option and postpone
21794 # integration with the C++ compiler provided that the types are compatible.
21795 USE_CXX_BOOL=1
21796 if test $cf_cv_cc_bool_type = 1
21797 then
21798         # oops: C has a bool.  Unlikely, but C++ could differ.
21799         USE_CXX_BOOL=0
21800 elif test $cf_cv_builtin_bool = 0
21801 then
21802         # C++ has no bool
21803         USE_CXX_BOOL=0
21804 else
21805         # this is the normal case
21806         USE_CXX_BOOL='defined(__cplusplus)'
21807 fi
21808
21809 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21810
21811         if test "$cf_with_ada" != "no" ; then
21812                 if test "$with_libtool" != "no"; then
21813                         { echo "$as_me:21813: WARNING: libtool does not support Ada - disabling feature" >&5
21814 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21815                         cf_with_ada=no
21816                 fi
21817         fi
21818
21819         if test "$cf_with_ada" != "no" ; then
21820
21821 cf_ada_make=gnatmake
21822 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21823 set dummy $cf_ada_make; ac_word=$2
21824 echo "$as_me:21824: checking for $ac_word" >&5
21825 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21826 if test "${ac_cv_prog_gnat_exists+set}" = set; then
21827   echo $ECHO_N "(cached) $ECHO_C" >&6
21828 else
21829   if test -n "$gnat_exists"; then
21830   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
21831 else
21832   ac_save_IFS=$IFS; IFS=$ac_path_separator
21833 ac_dummy="$PATH"
21834 for ac_dir in $ac_dummy; do
21835   IFS=$ac_save_IFS
21836   test -z "$ac_dir" && ac_dir=.
21837   $as_executable_p "$ac_dir/$ac_word" || continue
21838 ac_cv_prog_gnat_exists="yes"
21839 echo "$as_me:21839: found $ac_dir/$ac_word" >&5
21840 break
21841 done
21842
21843   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
21844 fi
21845 fi
21846 gnat_exists=$ac_cv_prog_gnat_exists
21847 if test -n "$gnat_exists"; then
21848   echo "$as_me:21848: result: $gnat_exists" >&5
21849 echo "${ECHO_T}$gnat_exists" >&6
21850 else
21851   echo "$as_me:21851: result: no" >&5
21852 echo "${ECHO_T}no" >&6
21853 fi
21854
21855 if test "$ac_cv_prog_gnat_exists" = no; then
21856         cf_ada_make=
21857         cf_cv_prog_gnat_correct=no
21858 else
21859
21860 echo "$as_me:21860: checking for gnat version" >&5
21861 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21862 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21863         grep '[0-9].[0-9][0-9]*' |\
21864         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21865 echo "$as_me:21865: result: $cf_gnat_version" >&5
21866 echo "${ECHO_T}$cf_gnat_version" >&6
21867
21868 case $cf_gnat_version in
21869 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21870         cf_cv_prog_gnat_correct=yes
21871         ;;
21872 (*)
21873         { echo "$as_me:21873: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21874 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21875         cf_cv_prog_gnat_correct=no
21876         ;;
21877 esac
21878
21879         # Extract the first word of "m4", so it can be a program name with args.
21880 set dummy m4; ac_word=$2
21881 echo "$as_me:21881: checking for $ac_word" >&5
21882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21883 if test "${ac_cv_prog_M4_exists+set}" = set; then
21884   echo $ECHO_N "(cached) $ECHO_C" >&6
21885 else
21886   if test -n "$M4_exists"; then
21887   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21888 else
21889   ac_save_IFS=$IFS; IFS=$ac_path_separator
21890 ac_dummy="$PATH"
21891 for ac_dir in $ac_dummy; do
21892   IFS=$ac_save_IFS
21893   test -z "$ac_dir" && ac_dir=.
21894   $as_executable_p "$ac_dir/$ac_word" || continue
21895 ac_cv_prog_M4_exists="yes"
21896 echo "$as_me:21896: found $ac_dir/$ac_word" >&5
21897 break
21898 done
21899
21900   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21901 fi
21902 fi
21903 M4_exists=$ac_cv_prog_M4_exists
21904 if test -n "$M4_exists"; then
21905   echo "$as_me:21905: result: $M4_exists" >&5
21906 echo "${ECHO_T}$M4_exists" >&6
21907 else
21908   echo "$as_me:21908: result: no" >&5
21909 echo "${ECHO_T}no" >&6
21910 fi
21911
21912         if test "$ac_cv_prog_M4_exists" = no; then
21913                 cf_cv_prog_gnat_correct=no
21914                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21915         fi
21916         if test "$cf_cv_prog_gnat_correct" = yes; then
21917                 echo "$as_me:21917: checking if GNAT works" >&5
21918 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21919
21920 rm -rf conftest* *~conftest*
21921 cat >>conftest.ads <<CF_EOF
21922 procedure conftest;
21923 CF_EOF
21924 cat >>conftest.adb <<CF_EOF
21925 with Text_IO;
21926 with GNAT.OS_Lib;
21927 procedure conftest is
21928 begin
21929    Text_IO.Put ("Hello World");
21930    Text_IO.New_Line;
21931    GNAT.OS_Lib.OS_Exit (0);
21932 end conftest;
21933 CF_EOF
21934 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21935    if ( ./conftest 1>&5 2>&1 ) ; then
21936       cf_cv_prog_gnat_correct=yes
21937    else
21938       cf_cv_prog_gnat_correct=no
21939    fi
21940 else
21941    cf_cv_prog_gnat_correct=no
21942 fi
21943 rm -rf conftest* *~conftest*
21944
21945                 echo "$as_me:21945: result: $cf_cv_prog_gnat_correct" >&5
21946 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21947         fi
21948 fi
21949
21950                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21951
21952         ADAFLAGS="$ADAFLAGS -gnatpn"
21953
21954         echo "$as_me:21954: checking optimization options for ADAFLAGS" >&5
21955 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21956         case "$CFLAGS" in
21957         (*-g*)
21958
21959         ADAFLAGS="$ADAFLAGS -g"
21960
21961                 ;;
21962         esac
21963         case "$CFLAGS" in
21964         (*-O*)
21965                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21966
21967         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21968
21969                 ;;
21970         esac
21971         echo "$as_me:21971: result: $ADAFLAGS" >&5
21972 echo "${ECHO_T}$ADAFLAGS" >&6
21973
21974 echo "$as_me:21974: checking if GNATPREP supports -T option" >&5
21975 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21976 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21977   echo $ECHO_N "(cached) $ECHO_C" >&6
21978 else
21979
21980 cf_cv_gnatprep_opt_t=no
21981 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21982
21983 fi
21984 echo "$as_me:21984: result: $cf_cv_gnatprep_opt_t" >&5
21985 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21986 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21987
21988 echo "$as_me:21988: checking if GNAT supports generics" >&5
21989 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21990 case $cf_gnat_version in
21991 (3.[1-9]*|[4-9].*)
21992         cf_gnat_generics=yes
21993         ;;
21994 (*)
21995         cf_gnat_generics=no
21996         ;;
21997 esac
21998 echo "$as_me:21998: result: $cf_gnat_generics" >&5
21999 echo "${ECHO_T}$cf_gnat_generics" >&6
22000
22001 if test "$cf_gnat_generics" = yes
22002 then
22003         cf_compile_generics=generics
22004         cf_generic_objects="\${GENOBJS}"
22005 else
22006         cf_compile_generics=
22007         cf_generic_objects=
22008 fi
22009
22010 echo "$as_me:22010: checking if GNAT supports SIGINT" >&5
22011 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
22012 if test "${cf_cv_gnat_sigint+set}" = set; then
22013   echo $ECHO_N "(cached) $ECHO_C" >&6
22014 else
22015
22016 rm -rf conftest* *~conftest*
22017 cat >>conftest.ads <<CF_EOF
22018 with Ada.Interrupts.Names;
22019
22020 package ConfTest is
22021
22022    pragma Warnings (Off);  --  the next pragma exists since 3.11p
22023    pragma Unreserve_All_Interrupts;
22024    pragma Warnings (On);
22025
22026    protected Process is
22027       procedure Stop;
22028       function Continue return Boolean;
22029       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
22030    private
22031       Done : Boolean := False;
22032    end Process;
22033
22034 end ConfTest;
22035 CF_EOF
22036 cat >>conftest.adb <<CF_EOF
22037 package body ConfTest is
22038    protected body Process is
22039       procedure Stop is
22040       begin
22041          Done := True;
22042       end Stop;
22043       function Continue return Boolean is
22044       begin
22045          return not Done;
22046       end Continue;
22047    end Process;
22048 end ConfTest;
22049 CF_EOF
22050 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22051       cf_cv_gnat_sigint=yes
22052 else
22053    cf_cv_gnat_sigint=no
22054 fi
22055 rm -rf conftest* *~conftest*
22056
22057 fi
22058 echo "$as_me:22058: result: $cf_cv_gnat_sigint" >&5
22059 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
22060
22061 if test $cf_cv_gnat_sigint = yes ; then
22062         USE_GNAT_SIGINT=""
22063 else
22064         USE_GNAT_SIGINT="#"
22065 fi
22066
22067 cf_gnat_libraries=no
22068 cf_gnat_projects=no
22069
22070 if test "$enable_gnat_projects" != no ; then
22071 echo "$as_me:22071: checking if GNAT supports project files" >&5
22072 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
22073 case $cf_gnat_version in
22074 (3.[0-9]*)
22075         ;;
22076 (*)
22077         case $cf_cv_system_name in
22078         (cygwin*|msys*)
22079                 ;;
22080         (*)
22081                 mkdir conftest.src conftest.bin conftest.lib
22082                 cd conftest.src
22083                 rm -rf conftest* *~conftest*
22084                 cat >>library.gpr <<CF_EOF
22085 project Library is
22086   Kind := External ("LIB_KIND");
22087   for Library_Name use "ConfTest";
22088   for Object_Dir use ".";
22089   for Library_ALI_Dir use External("LIBRARY_DIR");
22090   for Library_Version use External ("SONAME");
22091   for Library_Kind use Kind;
22092   for Library_Dir use External("BUILD_DIR");
22093   Source_Dir := External ("SOURCE_DIR");
22094   for Source_Dirs use (Source_Dir);
22095 end Library;
22096 CF_EOF
22097                 cat >>confpackage.ads <<CF_EOF
22098 package ConfPackage is
22099    procedure conftest;
22100 end ConfPackage;
22101 CF_EOF
22102                 cat >>confpackage.adb <<CF_EOF
22103 with Text_IO;
22104 package body ConfPackage is
22105    procedure conftest is
22106    begin
22107       Text_IO.Put ("Hello World");
22108       Text_IO.New_Line;
22109    end conftest;
22110 end ConfPackage;
22111 CF_EOF
22112                 if ( $cf_ada_make $ADAFLAGS \
22113                                 -Plibrary.gpr \
22114                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
22115                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
22116                                 -XSOURCE_DIR=`pwd` \
22117                                 -XSONAME=libConfTest.so.1 \
22118                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
22119                         cf_gnat_projects=yes
22120                 fi
22121                 cd ..
22122                 if test -f conftest.lib/confpackage.ali
22123                 then
22124                         cf_gnat_libraries=yes
22125                 fi
22126                 rm -rf conftest* *~conftest*
22127                 ;;
22128         esac
22129         ;;
22130 esac
22131 echo "$as_me:22131: result: $cf_gnat_projects" >&5
22132 echo "${ECHO_T}$cf_gnat_projects" >&6
22133 fi # enable_gnat_projects
22134
22135 if test $cf_gnat_projects = yes
22136 then
22137         echo "$as_me:22137: checking if GNAT supports libraries" >&5
22138 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
22139         echo "$as_me:22139: result: $cf_gnat_libraries" >&5
22140 echo "${ECHO_T}$cf_gnat_libraries" >&6
22141 fi
22142
22143 if test "$cf_gnat_projects" = yes
22144 then
22145         USE_OLD_MAKERULES="#"
22146         USE_GNAT_PROJECTS=""
22147 else
22148         USE_OLD_MAKERULES=""
22149         USE_GNAT_PROJECTS="#"
22150 fi
22151
22152 if test "$cf_gnat_libraries" = yes
22153 then
22154         USE_GNAT_LIBRARIES=""
22155 else
22156         USE_GNAT_LIBRARIES="#"
22157 fi
22158
22159 echo "$as_me:22159: checking for ada-compiler" >&5
22160 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
22161
22162 # Check whether --with-ada-compiler or --without-ada-compiler was given.
22163 if test "${with_ada_compiler+set}" = set; then
22164   withval="$with_ada_compiler"
22165   cf_ada_compiler=$withval
22166 else
22167   cf_ada_compiler=gnatmake
22168 fi;
22169
22170 echo "$as_me:22170: result: $cf_ada_compiler" >&5
22171 echo "${ECHO_T}$cf_ada_compiler" >&6
22172
22173                         cf_ada_package=terminal_interface
22174
22175 echo "$as_me:22175: checking for ada-include" >&5
22176 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
22177
22178 # Check whether --with-ada-include or --without-ada-include was given.
22179 if test "${with_ada_include+set}" = set; then
22180   withval="$with_ada_include"
22181
22182 else
22183   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
22184 fi; if test -n "$prefix/share/ada/adainclude" ; then
22185
22186 if test "x$prefix" != xNONE; then
22187         cf_path_syntax="$prefix"
22188 else
22189         cf_path_syntax="$ac_default_prefix"
22190 fi
22191
22192 case ".$withval" in
22193 (.\$\(*\)*|.\'*\'*)
22194         ;;
22195 (..|./*|.\\*)
22196         ;;
22197 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22198         ;;
22199 (.\${*prefix}*|.\${*dir}*)
22200         eval withval="$withval"
22201         case ".$withval" in
22202         (.NONE/*)
22203                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22204                 ;;
22205         esac
22206         ;;
22207 (.no|.NONE/*)
22208         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22209         ;;
22210 (*)
22211         { { echo "$as_me:22211: error: expected a pathname, not \"$withval\"" >&5
22212 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22213    { (exit 1); exit 1; }; }
22214         ;;
22215 esac
22216
22217 fi
22218 eval ADA_INCLUDE="$withval"
22219
22220 echo "$as_me:22220: result: $ADA_INCLUDE" >&5
22221 echo "${ECHO_T}$ADA_INCLUDE" >&6
22222
22223 echo "$as_me:22223: checking for ada-objects" >&5
22224 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
22225
22226 # Check whether --with-ada-objects or --without-ada-objects was given.
22227 if test "${with_ada_objects+set}" = set; then
22228   withval="$with_ada_objects"
22229
22230 else
22231   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
22232 fi; if test -n "$prefix/lib/ada/adalib" ; then
22233
22234 if test "x$prefix" != xNONE; then
22235         cf_path_syntax="$prefix"
22236 else
22237         cf_path_syntax="$ac_default_prefix"
22238 fi
22239
22240 case ".$withval" in
22241 (.\$\(*\)*|.\'*\'*)
22242         ;;
22243 (..|./*|.\\*)
22244         ;;
22245 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22246         ;;
22247 (.\${*prefix}*|.\${*dir}*)
22248         eval withval="$withval"
22249         case ".$withval" in
22250         (.NONE/*)
22251                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22252                 ;;
22253         esac
22254         ;;
22255 (.no|.NONE/*)
22256         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22257         ;;
22258 (*)
22259         { { echo "$as_me:22259: error: expected a pathname, not \"$withval\"" >&5
22260 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22261    { (exit 1); exit 1; }; }
22262         ;;
22263 esac
22264
22265 fi
22266 eval ADA_OBJECTS="$withval"
22267
22268 echo "$as_me:22268: result: $ADA_OBJECTS" >&5
22269 echo "${ECHO_T}$ADA_OBJECTS" >&6
22270
22271 echo "$as_me:22271: checking if an Ada95 shared-library should be built" >&5
22272 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
22273
22274 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
22275 if test "${with_ada_sharedlib+set}" = set; then
22276   withval="$with_ada_sharedlib"
22277   with_ada_sharedlib=$withval
22278 else
22279   with_ada_sharedlib=no
22280 fi;
22281 echo "$as_me:22281: result: $with_ada_sharedlib" >&5
22282 echo "${ECHO_T}$with_ada_sharedlib" >&6
22283
22284 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
22285 MAKE_ADA_SHAREDLIB="#"
22286
22287 if test "x$with_ada_sharedlib" != xno
22288 then
22289         MAKE_ADA_SHAREDLIB=
22290         if test "x$with_ada_sharedlib" != xyes
22291         then
22292                 ADA_SHAREDLIB="$with_ada_sharedlib"
22293         fi
22294 fi
22295
22296                 fi
22297         fi
22298 else
22299         cf_with_ada=no
22300 fi
22301
22302 # do this "late" to avoid conflict with header-checks
22303 if test "x$with_widec" = xyes ; then
22304         echo "$as_me:22304: checking for wchar_t" >&5
22305 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
22306 if test "${ac_cv_type_wchar_t+set}" = set; then
22307   echo $ECHO_N "(cached) $ECHO_C" >&6
22308 else
22309   cat >conftest.$ac_ext <<_ACEOF
22310 #line 22310 "configure"
22311 #include "confdefs.h"
22312 $ac_includes_default
22313 int
22314 main (void)
22315 {
22316 if ((wchar_t *) 0)
22317   return 0;
22318 if (sizeof (wchar_t))
22319   return 0;
22320   ;
22321   return 0;
22322 }
22323 _ACEOF
22324 rm -f conftest.$ac_objext
22325 if { (eval echo "$as_me:22325: \"$ac_compile\"") >&5
22326   (eval $ac_compile) 2>&5
22327   ac_status=$?
22328   echo "$as_me:22328: \$? = $ac_status" >&5
22329   (exit $ac_status); } &&
22330          { ac_try='test -s conftest.$ac_objext'
22331   { (eval echo "$as_me:22331: \"$ac_try\"") >&5
22332   (eval $ac_try) 2>&5
22333   ac_status=$?
22334   echo "$as_me:22334: \$? = $ac_status" >&5
22335   (exit $ac_status); }; }; then
22336   ac_cv_type_wchar_t=yes
22337 else
22338   echo "$as_me: failed program was:" >&5
22339 cat conftest.$ac_ext >&5
22340 ac_cv_type_wchar_t=no
22341 fi
22342 rm -f conftest.$ac_objext conftest.$ac_ext
22343 fi
22344 echo "$as_me:22344: result: $ac_cv_type_wchar_t" >&5
22345 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
22346
22347 echo "$as_me:22347: checking size of wchar_t" >&5
22348 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
22349 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22350   echo $ECHO_N "(cached) $ECHO_C" >&6
22351 else
22352   if test "$ac_cv_type_wchar_t" = yes; then
22353   if test "$cross_compiling" = yes; then
22354   # Depending upon the size, compute the lo and hi bounds.
22355 cat >conftest.$ac_ext <<_ACEOF
22356 #line 22356 "configure"
22357 #include "confdefs.h"
22358 $ac_includes_default
22359 int
22360 main (void)
22361 {
22362 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
22363   ;
22364   return 0;
22365 }
22366 _ACEOF
22367 rm -f conftest.$ac_objext
22368 if { (eval echo "$as_me:22368: \"$ac_compile\"") >&5
22369   (eval $ac_compile) 2>&5
22370   ac_status=$?
22371   echo "$as_me:22371: \$? = $ac_status" >&5
22372   (exit $ac_status); } &&
22373          { ac_try='test -s conftest.$ac_objext'
22374   { (eval echo "$as_me:22374: \"$ac_try\"") >&5
22375   (eval $ac_try) 2>&5
22376   ac_status=$?
22377   echo "$as_me:22377: \$? = $ac_status" >&5
22378   (exit $ac_status); }; }; then
22379   ac_lo=0 ac_mid=0
22380   while :; do
22381     cat >conftest.$ac_ext <<_ACEOF
22382 #line 22382 "configure"
22383 #include "confdefs.h"
22384 $ac_includes_default
22385 int
22386 main (void)
22387 {
22388 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22389   ;
22390   return 0;
22391 }
22392 _ACEOF
22393 rm -f conftest.$ac_objext
22394 if { (eval echo "$as_me:22394: \"$ac_compile\"") >&5
22395   (eval $ac_compile) 2>&5
22396   ac_status=$?
22397   echo "$as_me:22397: \$? = $ac_status" >&5
22398   (exit $ac_status); } &&
22399          { ac_try='test -s conftest.$ac_objext'
22400   { (eval echo "$as_me:22400: \"$ac_try\"") >&5
22401   (eval $ac_try) 2>&5
22402   ac_status=$?
22403   echo "$as_me:22403: \$? = $ac_status" >&5
22404   (exit $ac_status); }; }; then
22405   ac_hi=$ac_mid; break
22406 else
22407   echo "$as_me: failed program was:" >&5
22408 cat conftest.$ac_ext >&5
22409 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22410 fi
22411 rm -f conftest.$ac_objext conftest.$ac_ext
22412   done
22413 else
22414   echo "$as_me: failed program was:" >&5
22415 cat conftest.$ac_ext >&5
22416 ac_hi=-1 ac_mid=-1
22417   while :; do
22418     cat >conftest.$ac_ext <<_ACEOF
22419 #line 22419 "configure"
22420 #include "confdefs.h"
22421 $ac_includes_default
22422 int
22423 main (void)
22424 {
22425 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
22426   ;
22427   return 0;
22428 }
22429 _ACEOF
22430 rm -f conftest.$ac_objext
22431 if { (eval echo "$as_me:22431: \"$ac_compile\"") >&5
22432   (eval $ac_compile) 2>&5
22433   ac_status=$?
22434   echo "$as_me:22434: \$? = $ac_status" >&5
22435   (exit $ac_status); } &&
22436          { ac_try='test -s conftest.$ac_objext'
22437   { (eval echo "$as_me:22437: \"$ac_try\"") >&5
22438   (eval $ac_try) 2>&5
22439   ac_status=$?
22440   echo "$as_me:22440: \$? = $ac_status" >&5
22441   (exit $ac_status); }; }; then
22442   ac_lo=$ac_mid; break
22443 else
22444   echo "$as_me: failed program was:" >&5
22445 cat conftest.$ac_ext >&5
22446 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
22447 fi
22448 rm -f conftest.$ac_objext conftest.$ac_ext
22449   done
22450 fi
22451 rm -f conftest.$ac_objext conftest.$ac_ext
22452 # Binary search between lo and hi bounds.
22453 while test "x$ac_lo" != "x$ac_hi"; do
22454   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22455   cat >conftest.$ac_ext <<_ACEOF
22456 #line 22456 "configure"
22457 #include "confdefs.h"
22458 $ac_includes_default
22459 int
22460 main (void)
22461 {
22462 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22463   ;
22464   return 0;
22465 }
22466 _ACEOF
22467 rm -f conftest.$ac_objext
22468 if { (eval echo "$as_me:22468: \"$ac_compile\"") >&5
22469   (eval $ac_compile) 2>&5
22470   ac_status=$?
22471   echo "$as_me:22471: \$? = $ac_status" >&5
22472   (exit $ac_status); } &&
22473          { ac_try='test -s conftest.$ac_objext'
22474   { (eval echo "$as_me:22474: \"$ac_try\"") >&5
22475   (eval $ac_try) 2>&5
22476   ac_status=$?
22477   echo "$as_me:22477: \$? = $ac_status" >&5
22478   (exit $ac_status); }; }; then
22479   ac_hi=$ac_mid
22480 else
22481   echo "$as_me: failed program was:" >&5
22482 cat conftest.$ac_ext >&5
22483 ac_lo=`expr $ac_mid + 1`
22484 fi
22485 rm -f conftest.$ac_objext conftest.$ac_ext
22486 done
22487 ac_cv_sizeof_wchar_t=$ac_lo
22488 else
22489   if test "$cross_compiling" = yes; then
22490   { { echo "$as_me:22490: error: cannot run test program while cross compiling" >&5
22491 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22492    { (exit 1); exit 1; }; }
22493 else
22494   cat >conftest.$ac_ext <<_ACEOF
22495 #line 22495 "configure"
22496 #include "confdefs.h"
22497 $ac_includes_default
22498 int
22499 main (void)
22500 {
22501 FILE *f = fopen ("conftest.val", "w");
22502 if (!f)
22503   $ac_main_return (1);
22504 fprintf (f, "%d", (sizeof (wchar_t)));
22505 fclose (f);
22506   ;
22507   return 0;
22508 }
22509 _ACEOF
22510 rm -f conftest$ac_exeext
22511 if { (eval echo "$as_me:22511: \"$ac_link\"") >&5
22512   (eval $ac_link) 2>&5
22513   ac_status=$?
22514   echo "$as_me:22514: \$? = $ac_status" >&5
22515   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22516   { (eval echo "$as_me:22516: \"$ac_try\"") >&5
22517   (eval $ac_try) 2>&5
22518   ac_status=$?
22519   echo "$as_me:22519: \$? = $ac_status" >&5
22520   (exit $ac_status); }; }; then
22521   ac_cv_sizeof_wchar_t=`cat conftest.val`
22522 else
22523   echo "$as_me: program exited with status $ac_status" >&5
22524 echo "$as_me: failed program was:" >&5
22525 cat conftest.$ac_ext >&5
22526 fi
22527 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22528 fi
22529 fi
22530 rm -f conftest.val
22531 else
22532   ac_cv_sizeof_wchar_t=0
22533 fi
22534 fi
22535 echo "$as_me:22535: result: $ac_cv_sizeof_wchar_t" >&5
22536 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22537 cat >>confdefs.h <<EOF
22538 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22539 EOF
22540
22541 fi
22542
22543 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22544 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22545 ###
22546 ### ticlib modules may be a separate library, otherwise contained in termlib.
22547 ### termlib modules may be a separate library, otherwise contained in ncurses.
22548 ###
22549 ### The of "+" or " " between the tokens controls the way the script
22550 ### chooses to split module lists into libraries.
22551 ###
22552 ### (see CF_LIB_RULES).
22553 echo "$as_me:22553: checking for library subsets" >&5
22554 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22555 LIB_SUBSETS=
22556
22557 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22558         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22559         if test "$with_ticlib" != no ; then
22560                 LIB_SUBSETS="${LIB_SUBSETS} "
22561         else
22562                 LIB_SUBSETS="${LIB_SUBSETS}+"
22563         fi
22564 fi
22565
22566 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22567 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22568
22569 if test "$with_termlib" != no ; then
22570         LIB_SUBSETS="${LIB_SUBSETS} "
22571 else
22572         LIB_SUBSETS="${LIB_SUBSETS}+"
22573 fi
22574
22575 LIB_SUBSETS="${LIB_SUBSETS}base"
22576
22577 # Most term-driver calls are to tinfo, but some like init_pair are to the
22578 # base library (so it resides in base).
22579 if test "$with_term_driver" != no ; then
22580         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22581         case $cf_cv_system_name in
22582         (*mingw32*|*mingw64*)
22583                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22584                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22585                 ;;
22586         (*)
22587                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22588                 ;;
22589         esac
22590 fi
22591
22592 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22593 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22594
22595 echo "$as_me:22595: result: $LIB_SUBSETS" >&5
22596 echo "${ECHO_T}$LIB_SUBSETS" >&6
22597
22598 ### Construct the list of include-directories to be generated
22599
22600 if test "$srcdir" != "."; then
22601         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22602 fi
22603 CPPFLAGS="-I../include $CPPFLAGS"
22604 if test "$srcdir" != "."; then
22605         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22606 fi
22607 CPPFLAGS="-I. $CPPFLAGS"
22608
22609 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22610 if test "$srcdir" != "."; then
22611         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22612 fi
22613 if test "$GCC" != yes; then
22614         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22615 elif test "$includedir" != "/usr/include"; then
22616         if test "$includedir" = '${prefix}/include' ; then
22617                 if test x$prefix != x/usr ; then
22618                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22619                 fi
22620         else
22621                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22622         fi
22623 fi
22624
22625 ### Build up pieces for makefile rules
22626 echo "$as_me:22626: checking default library suffix" >&5
22627 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22628
22629         case $DFT_LWR_MODEL in
22630         (libtool) DFT_ARG_SUFFIX=''   ;;
22631         (normal)  DFT_ARG_SUFFIX=''   ;;
22632         (debug)   DFT_ARG_SUFFIX='_g' ;;
22633         (profile) DFT_ARG_SUFFIX='_p' ;;
22634         (shared)  DFT_ARG_SUFFIX=''   ;;
22635         esac
22636         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22637 echo "$as_me:22637: result: $DFT_ARG_SUFFIX" >&5
22638 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22639
22640 echo "$as_me:22640: checking default library-dependency suffix" >&5
22641 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22642
22643         case X$DFT_LWR_MODEL in
22644         (Xlibtool)
22645                 DFT_LIB_SUFFIX='.la'
22646                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22647                 ;;
22648         (Xdebug)
22649                 DFT_LIB_SUFFIX='_g.a'
22650                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22651                 ;;
22652         (Xprofile)
22653                 DFT_LIB_SUFFIX='_p.a'
22654                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22655                 ;;
22656         (Xshared)
22657                 case $cf_cv_system_name in
22658                 (aix[5-7]*)
22659                         DFT_LIB_SUFFIX='.so'
22660                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22661                         ;;
22662                 (cygwin*|msys*|mingw*)
22663                         DFT_LIB_SUFFIX='.dll'
22664                         DFT_DEP_SUFFIX='.dll.a'
22665                         ;;
22666                 (darwin*)
22667                         DFT_LIB_SUFFIX='.dylib'
22668                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22669                         ;;
22670                 (hpux*)
22671                         case $target in
22672                         (ia64*)
22673                                 DFT_LIB_SUFFIX='.so'
22674                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22675                                 ;;
22676                         (*)
22677                                 DFT_LIB_SUFFIX='.sl'
22678                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22679                                 ;;
22680                         esac
22681                         ;;
22682                 (*)
22683                         DFT_LIB_SUFFIX='.so'
22684                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22685                         ;;
22686                 esac
22687                 ;;
22688         (*)
22689                 DFT_LIB_SUFFIX='.a'
22690                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22691                 ;;
22692         esac
22693         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22694         then
22695                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22696                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22697         fi
22698 echo "$as_me:22698: result: $DFT_DEP_SUFFIX" >&5
22699 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22700
22701 echo "$as_me:22701: checking default object directory" >&5
22702 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22703
22704         case $DFT_LWR_MODEL in
22705         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22706         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22707         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22708         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22709         (shared)
22710                 case $cf_cv_system_name in
22711                 (cygwin|msys)
22712                         DFT_OBJ_SUBDIR='objects' ;;
22713                 (*)
22714                         DFT_OBJ_SUBDIR='obj_s' ;;
22715                 esac
22716         esac
22717 echo "$as_me:22717: result: $DFT_OBJ_SUBDIR" >&5
22718 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22719
22720 if test "x$cf_with_cxx" = xyes ; then
22721 echo "$as_me:22721: checking c++ library-dependency suffix" >&5
22722 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22723 if test "$with_libtool" != "no"; then
22724         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22725         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22726 elif test "$with_shared_cxx" != "no"; then
22727         # also for g++ users...
22728         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22729 else
22730         # we normally make a static library because C/C++ library rules differ
22731
22732         case Xnormal in
22733         (Xlibtool)
22734                 CXX_LIB_SUFFIX='.la'
22735                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22736                 ;;
22737         (Xdebug)
22738                 CXX_LIB_SUFFIX='_g.a'
22739                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22740                 ;;
22741         (Xprofile)
22742                 CXX_LIB_SUFFIX='_p.a'
22743                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22744                 ;;
22745         (Xshared)
22746                 case $cf_cv_system_name in
22747                 (aix[5-7]*)
22748                         CXX_LIB_SUFFIX='.so'
22749                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22750                         ;;
22751                 (cygwin*|msys*|mingw*)
22752                         CXX_LIB_SUFFIX='.dll'
22753                         CXX_DEP_SUFFIX='.dll.a'
22754                         ;;
22755                 (darwin*)
22756                         CXX_LIB_SUFFIX='.dylib'
22757                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22758                         ;;
22759                 (hpux*)
22760                         case $target in
22761                         (ia64*)
22762                                 CXX_LIB_SUFFIX='.so'
22763                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22764                                 ;;
22765                         (*)
22766                                 CXX_LIB_SUFFIX='.sl'
22767                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22768                                 ;;
22769                         esac
22770                         ;;
22771                 (*)
22772                         CXX_LIB_SUFFIX='.so'
22773                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22774                         ;;
22775                 esac
22776                 ;;
22777         (*)
22778                 CXX_LIB_SUFFIX='.a'
22779                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22780                 ;;
22781         esac
22782         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22783         then
22784                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22785                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22786         fi
22787
22788 fi
22789 echo "$as_me:22789: result: $CXX_LIB_SUFFIX" >&5
22790 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22791
22792 fi
22793
22794 # do not want -ldl in build except as needed for -lncurses dependency
22795 if test "x$with_dlsym" = xyes ; then
22796 if test $DFT_LWR_MODEL = shared || \
22797    test $DFT_LWR_MODEL = libtool ; then
22798
22799 # remove dl library from $LIBS
22800 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
22801
22802 fi
22803 fi
22804 ### Set up low-level terminfo dependencies for makefiles.
22805
22806 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
22807 # do not need libdl
22808 TICS_LIST=
22809 if test "x$with_dlsym" = xyes ; then
22810
22811 # remove dl library from $SHLIB_LIST
22812 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
22813
22814 fi
22815
22816 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
22817 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
22818 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
22819 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
22820 then
22821         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
22822 fi
22823
22824 if test "$with_ticlib" != no ; then
22825
22826         if test "x$with_ticlib" != xyes ; then
22827                 TICS_NAME=$with_ticlib
22828                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22829                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22830                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22831                 TICS_LIB_SUFFIX="${with_ticlib}"
22832         else
22833                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
22834                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
22835                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
22836                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
22837         fi
22838         TICS_LDFLAGS="-L${LIB_DIR}"
22839         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22840 else
22841         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22842         TICS_LDFLAGS="-L${LIB_DIR}"
22843         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22844 fi
22845
22846 if test "$with_termlib" != no ; then
22847
22848         if test "x$with_termlib" != xyes ; then
22849                 TINFO_NAME=$with_termlib
22850                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22851                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22852                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22853                 TINFO_LIB_SUFFIX="${with_termlib}"
22854         else
22855                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22856                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22857                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22858                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22859         fi
22860
22861         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22862         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22863         if test "$DFT_LWR_MODEL" = "libtool"; then
22864                 TEST_ARGS="${TEST_DEPS}"
22865                 TEST_ARG2="${TEST_DEP2}"
22866                 TINFO_LDFLAGS="-L${LIB_DIR}"
22867                 TINFO_LIBS="$TEST_ARGS"
22868                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22869                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22870         else
22871                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22872                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22873                 if test "x$with_term_driver" != xno ; then
22874                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22875                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22876                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22877                 else
22878                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22879                         TINFO_LIBS="$TEST_ARGS"
22880                 fi
22881                 TINFO_LDFLAGS="-L${LIB_DIR}"
22882                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22883         fi
22884 else
22885         # the next lines are needed for linking libtic over libncurses
22886         TINFO_NAME=${LIB_NAME}
22887         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22888         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22889         if test "x$with_tic_depends" = xyes ; then
22890                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22891         else
22892                 TICS_LIST="$SHLIB_LIST"
22893         fi
22894
22895         TINFO_LDFLAGS="-L${LIB_DIR}"
22896         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22897 fi
22898
22899 if test "$DFT_LWR_MODEL" = shared ; then
22900         case $cf_cv_system_name in
22901         (cygwin*|msys*)
22902                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22903                 TINFO_SUFFIX=.dll
22904                 ;;
22905         esac
22906 fi
22907
22908 if test "x$with_dlsym" = xyes ; then
22909
22910 # remove dl library from $TICS_LIST
22911 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22912
22913 fi
22914
22915 if test "$DFT_LWR_MODEL" = "libtool"; then
22916         OBJEXT=lo
22917 fi
22918
22919 # needed for Ada95
22920 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22921
22922 case $DFT_LWR_MODEL in
22923 (normal|debug|profile)
22924
22925 if test "$GCC" = yes ; then
22926         case $cf_cv_system_name in
22927         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22928                 LDFLAGS_STATIC=
22929                 LDFLAGS_SHARED=
22930                 ;;
22931         (*)     # normally, except when broken
22932                 LDFLAGS_STATIC=-static
22933                 LDFLAGS_SHARED=-dynamic
22934                 ;;
22935         esac
22936 else
22937         case $cf_cv_system_name in
22938         (aix[4-7]*)     # from ld manpage
22939                 LDFLAGS_STATIC=-bstatic
22940                 LDFLAGS_SHARED=-bdynamic
22941                 ;;
22942         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22943                 # We could also use just "archive" and "shared".
22944                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22945                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22946                 ;;
22947         (irix*)         # from ld manpage IRIX64
22948                 LDFLAGS_STATIC=-Bstatic
22949                 LDFLAGS_SHARED=-Bdynamic
22950                 ;;
22951         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22952                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22953                 LDFLAGS_STATIC=-noso
22954                 LDFLAGS_SHARED=-so_archive
22955                 ;;
22956         (solaris2*)
22957                 LDFLAGS_STATIC=-Bstatic
22958                 LDFLAGS_SHARED=-Bdynamic
22959                 ;;
22960         esac
22961 fi
22962
22963 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22964 then
22965         echo "$as_me:22965: checking if linker supports switching between static/dynamic" >&5
22966 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22967
22968         rm -f libconftest.a
22969         cat >conftest.$ac_ext <<EOF
22970 #line 22970 "configure"
22971 #include <stdio.h>
22972 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22973 EOF
22974         if { (eval echo "$as_me:22974: \"$ac_compile\"") >&5
22975   (eval $ac_compile) 2>&5
22976   ac_status=$?
22977   echo "$as_me:22977: \$? = $ac_status" >&5
22978   (exit $ac_status); } ; then
22979                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22980                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22981         fi
22982         rm -f conftest.*
22983
22984         cf_save_LIBS="$LIBS"
22985
22986         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22987         cat >conftest.$ac_ext <<_ACEOF
22988 #line 22988 "configure"
22989 #include "confdefs.h"
22990
22991 #line 22991 "configure"
22992 #include <stdio.h>
22993 int cf_ldflags_static(FILE *fp);
22994
22995 int
22996 main (void)
22997 {
22998
22999         return cf_ldflags_static(stdin);
23000
23001   ;
23002   return 0;
23003 }
23004 _ACEOF
23005 rm -f conftest.$ac_objext conftest$ac_exeext
23006 if { (eval echo "$as_me:23006: \"$ac_link\"") >&5
23007   (eval $ac_link) 2>&5
23008   ac_status=$?
23009   echo "$as_me:23009: \$? = $ac_status" >&5
23010   (exit $ac_status); } &&
23011          { ac_try='test -s conftest$ac_exeext'
23012   { (eval echo "$as_me:23012: \"$ac_try\"") >&5
23013   (eval $ac_try) 2>&5
23014   ac_status=$?
23015   echo "$as_me:23015: \$? = $ac_status" >&5
23016   (exit $ac_status); }; }; then
23017
23018         # some linkers simply ignore the -dynamic
23019         case x`file conftest$ac_exeext 2>/dev/null` in
23020         (*static*)
23021                 cf_ldflags_static=no
23022                 ;;
23023         (*)
23024                 cf_ldflags_static=yes
23025                 ;;
23026         esac
23027
23028 else
23029   echo "$as_me: failed program was:" >&5
23030 cat conftest.$ac_ext >&5
23031 cf_ldflags_static=no
23032 fi
23033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23034
23035         rm -f libconftest.*
23036         LIBS="$cf_save_LIBS"
23037
23038         echo "$as_me:23038: result: $cf_ldflags_static" >&5
23039 echo "${ECHO_T}$cf_ldflags_static" >&6
23040
23041         if test $cf_ldflags_static != yes
23042         then
23043                 LDFLAGS_STATIC=
23044                 LDFLAGS_SHARED=
23045         fi
23046 else
23047         LDFLAGS_STATIC=
23048         LDFLAGS_SHARED=
23049 fi
23050
23051         ;;
23052 esac
23053
23054 echo "$as_me:23054: checking where we will install curses.h" >&5
23055 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
23056
23057 includesubdir=
23058 if test "$with_overwrite" = no && \
23059  ( test "x$includedir" = 'x${prefix}/include' || \
23060    test "x$includedir" = "x${prefix}/include" )
23061 then
23062         includesubdir="/ncurses${USE_LIB_SUFFIX}"
23063 fi
23064 echo "$as_me:23064: result: ${includedir}${includesubdir}" >&5
23065 echo "${ECHO_T}${includedir}${includesubdir}" >&6
23066
23067 ### Resolve a conflict between normal and wide-curses by forcing applications
23068 ### that will need libutf8 to add it to their configure script.
23069 if test "$with_overwrite" != no ; then
23070 if test "$NCURSES_LIBUTF8" = 1 ; then
23071         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
23072         { echo "$as_me:23072: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
23073 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
23074 fi
23075 fi
23076 WITH_OVERWRITE=$with_overwrite
23077
23078 # used to separate tack out of the tree
23079 NCURSES_TREE=
23080
23081 ### predefined stuff for the test programs
23082
23083 cat >>confdefs.h <<\EOF
23084 #define HAVE_SLK_COLOR 1
23085 EOF
23086
23087 ### Construct the list of subdirectories for which we'll customize makefiles
23088 ### with the appropriate compile-rules.
23089
23090 echo "$as_me:23090: checking for src modules" >&5
23091 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
23092
23093 # dependencies and linker-arguments for test-programs
23094 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
23095 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
23096 if test "$DFT_LWR_MODEL" = "libtool"; then
23097         TEST_ARGS="${TEST_DEPS}"
23098         TEST_ARG2="${TEST_DEP2}"
23099 else
23100         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23101         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
23102 fi
23103
23104 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
23105 cf_cv_src_modules=
23106 for cf_dir in $modules_to_build
23107 do
23108         if test -f $srcdir/$cf_dir/modules; then
23109
23110                 # We may/may not have tack in the distribution, though the
23111                 # makefile is.
23112                 if test $cf_dir = tack ; then
23113                         if test "x$cf_with_tack" != "xyes"; then
23114                                 continue
23115                         fi
23116                 fi
23117
23118                 if test -z "$cf_cv_src_modules"; then
23119                         cf_cv_src_modules=$cf_dir
23120                 else
23121                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
23122                 fi
23123
23124                 # Make the ncurses_cfg.h file record the library interface files as
23125                 # well.  These are header files that are the same name as their
23126                 # directory.  Ncurses is the only library that does not follow
23127                 # that pattern.
23128                 if test $cf_dir = tack ; then
23129                         continue
23130                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
23131
23132 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23133
23134                         cat >>confdefs.h <<EOF
23135 #define HAVE_${cf_have_include}_H 1
23136 EOF
23137
23138                         cat >>confdefs.h <<EOF
23139 #define HAVE_LIB${cf_have_include} 1
23140 EOF
23141
23142                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
23143                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
23144                         if test "$DFT_LWR_MODEL" = "libtool"; then
23145                                 TEST_ARGS="${TEST_DEPS}"
23146                                 TEST_ARG2="${TEST_DEP2}"
23147                         else
23148                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
23149                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
23150                         fi
23151                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
23152                 fi
23153         fi
23154 done
23155 echo "$as_me:23155: result: $cf_cv_src_modules" >&5
23156 echo "${ECHO_T}$cf_cv_src_modules" >&6
23157
23158 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
23159 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
23160
23161 SRC_SUBDIRS=
23162 if test "x$cf_with_manpages" != xno ; then
23163         SRC_SUBDIRS="$SRC_SUBDIRS man"
23164 fi
23165 SRC_SUBDIRS="$SRC_SUBDIRS include"
23166 for cf_dir in $cf_cv_src_modules
23167 do
23168         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
23169 done
23170 if test "x$cf_with_tests" != "xno" ; then
23171         SRC_SUBDIRS="$SRC_SUBDIRS test"
23172 fi
23173 # always make this, to install the ncurses-config script
23174 SRC_SUBDIRS="$SRC_SUBDIRS misc"
23175 if test "$cf_with_cxx_binding" != no; then
23176         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
23177         SRC_SUBDIRS="$SRC_SUBDIRS c++"
23178 fi
23179
23180 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
23181 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
23182
23183 ADA_SUBDIRS=
23184 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
23185         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
23186         ADA_SUBDIRS="gen src"
23187         if test "x$cf_with_tests" != "xno" ; then
23188                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
23189         fi
23190 fi
23191
23192 SUB_MAKEFILES=
23193 for cf_dir in $SRC_SUBDIRS
23194 do
23195         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
23196 done
23197
23198 if test -n "$ADA_SUBDIRS"; then
23199         for cf_dir in $ADA_SUBDIRS
23200         do
23201                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
23202         done
23203
23204 fi
23205
23206 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23207    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
23208    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
23209 fi
23210
23211 DIRS_TO_MAKE="lib"
23212 for cf_item in $cf_list_models
23213 do
23214
23215         case $cf_item in
23216         (libtool) cf_subdir='obj_lo'  ;;
23217         (normal)  cf_subdir='objects' ;;
23218         (debug)   cf_subdir='obj_g' ;;
23219         (profile) cf_subdir='obj_p' ;;
23220         (shared)
23221                 case $cf_cv_system_name in
23222                 (cygwin|msys)
23223                         cf_subdir='objects' ;;
23224                 (*)
23225                         cf_subdir='obj_s' ;;
23226                 esac
23227         esac
23228
23229         for cf_item2 in $DIRS_TO_MAKE
23230         do
23231                 test $cf_item2 = $cf_subdir && break
23232         done
23233         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
23234 done
23235 for cf_dir in $DIRS_TO_MAKE
23236 do
23237         test ! -d $cf_dir && mkdir $cf_dir
23238 done
23239
23240 # symbols that differ when compiling Ada95 by itself.
23241 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
23242
23243 # values to use as strings
23244
23245 cat >>confdefs.h <<EOF
23246 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
23247 EOF
23248
23249 cat >>confdefs.h <<EOF
23250 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
23251 EOF
23252
23253 ### Now that we're done running tests, add the compiler-warnings, if any
23254
23255 cf_fix_cppflags=no
23256 cf_new_cflags=
23257 cf_new_cppflags=
23258 cf_new_extra_cppflags=
23259
23260 for cf_add_cflags in $EXTRA_CFLAGS
23261 do
23262 case $cf_fix_cppflags in
23263 (no)
23264         case $cf_add_cflags in
23265         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23266                 case $cf_add_cflags in
23267                 (-D*)
23268                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23269
23270                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23271                                 && test -z "${cf_tst_cflags}" \
23272                                 && cf_fix_cppflags=yes
23273
23274                         if test $cf_fix_cppflags = yes ; then
23275
23276         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23277         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23278
23279                                 continue
23280                         elif test "${cf_tst_cflags}" = "\"'" ; then
23281
23282         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23283         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23284
23285                                 continue
23286                         fi
23287                         ;;
23288                 esac
23289                 case "$CPPFLAGS" in
23290                 (*$cf_add_cflags)
23291                         ;;
23292                 (*)
23293                         case $cf_add_cflags in
23294                         (-D*)
23295                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23296
23297 CPPFLAGS=`echo "$CPPFLAGS" | \
23298         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
23299                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
23300
23301                                 ;;
23302                         esac
23303
23304         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23305         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23306
23307                         ;;
23308                 esac
23309                 ;;
23310         (*)
23311
23312         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23313         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23314
23315                 ;;
23316         esac
23317         ;;
23318 (yes)
23319
23320         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23321         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23322
23323         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
23324
23325         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23326                 && test -z "${cf_tst_cflags}" \
23327                 && cf_fix_cppflags=no
23328         ;;
23329 esac
23330 done
23331
23332 if test -n "$cf_new_cflags" ; then
23333
23334         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23335         CFLAGS="${CFLAGS}$cf_new_cflags"
23336
23337 fi
23338
23339 if test -n "$cf_new_cppflags" ; then
23340
23341         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23342         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23343
23344 fi
23345
23346 if test -n "$cf_new_extra_cppflags" ; then
23347
23348         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23349         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23350
23351 fi
23352
23353 ### Define substitutions for header files to avoid name-pollution
23354
23355 if test "x$cf_cv_have_tcgetattr" = xyes ; then
23356         HAVE_TCGETATTR=1
23357 else
23358         HAVE_TCGETATTR=0
23359 fi
23360
23361 if test "x$ac_cv_header_stdint_h" = xyes ; then
23362         HAVE_STDINT_H=1
23363 else
23364         HAVE_STDINT_H=0
23365 fi
23366
23367 if test "x$ac_cv_header_termio_h" = xyes ; then
23368         HAVE_TERMIO_H=1
23369 else
23370         HAVE_TERMIO_H=0
23371 fi
23372
23373 if test "x$ac_cv_header_termios_h" = xyes ; then
23374         HAVE_TERMIOS_H=1
23375 else
23376         HAVE_TERMIOS_H=0
23377 fi
23378
23379 ################################################################################
23380 test "x$use_database" = xyes && \
23381 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
23382
23383 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
23384 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
23385
23386 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
23387 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
23388 fi
23389
23390 # Extract the first word of "tic", so it can be a program name with args.
23391 set dummy tic; ac_word=$2
23392 echo "$as_me:23392: checking for $ac_word" >&5
23393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23394 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23395   echo $ECHO_N "(cached) $ECHO_C" >&6
23396 else
23397   case $TIC_PATH in
23398   [\\/]* | ?:[\\/]*)
23399   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23400   ;;
23401   *)
23402   ac_save_IFS=$IFS; IFS=$ac_path_separator
23403 ac_dummy="$PATH:/usr/local/ncurses/bin"
23404 for ac_dir in $ac_dummy; do
23405   IFS=$ac_save_IFS
23406   test -z "$ac_dir" && ac_dir=.
23407   if $as_executable_p "$ac_dir/$ac_word"; then
23408    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23409    echo "$as_me:23409: found $ac_dir/$ac_word" >&5
23410    break
23411 fi
23412 done
23413
23414   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23415   ;;
23416 esac
23417 fi
23418 TIC_PATH=$ac_cv_path_TIC_PATH
23419
23420 if test -n "$TIC_PATH"; then
23421   echo "$as_me:23421: result: $TIC_PATH" >&5
23422 echo "${ECHO_T}$TIC_PATH" >&6
23423 else
23424   echo "$as_me:23424: result: no" >&5
23425 echo "${ECHO_T}no" >&6
23426 fi
23427
23428 if test -n "$FALLBACK_LIST"
23429 then
23430         if test "$TIC_PATH" = unknown
23431         then
23432                 { echo "$as_me:23432: WARNING: no tic program found for fallbacks" >&5
23433 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
23434         fi
23435 fi
23436
23437 if test "x$cf_with_tests" != xno ; then
23438         MAKE_TESTS=
23439 else
23440         MAKE_TESTS="#"
23441 fi
23442
23443 ADAHTML_DIR=../../doc/html/ada
23444
23445 # these could be configurable, but are not currently
23446 PANEL_NAME=panel
23447 MENU_NAME=menu
23448 FORM_NAME=form
23449 CXX_NAME=ncurses++
23450
23451 # workaround for OS/2 (20151017)
23452 case $cf_cv_system_name in
23453 (os2*)
23454         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
23455         ;;
23456 (*)
23457         LIBTOOL_OPTS_CXX=
23458         ;;
23459 esac
23460
23461 # workaround for g++ versus Solaris (20131116)
23462 case $cf_cv_system_name in
23463 (solaris2*)
23464         case "x$CPPFLAGS" in
23465         (*-D_XOPEN_SOURCE_EXTENDED*)
23466                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
23467
23468 echo "${as_me:-configure}:23468: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
23469
23470                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
23471                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
23472                 ;;
23473         esac
23474         ;;
23475 esac
23476
23477 # Help to automatically enable the extended curses features when using either
23478 # the *-config or the ".pc" files by adding defines.
23479 echo "$as_me:23479: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
23480 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
23481 PKG_CFLAGS=
23482 for cf_loop1 in $CPPFLAGS_after_XOPEN
23483 do
23484         cf_found=no
23485         for cf_loop2 in $CPPFLAGS_before_XOPEN
23486         do
23487                 if test "x$cf_loop1" = "x$cf_loop2"
23488                 then
23489                         cf_found=yes
23490                         break
23491                 fi
23492         done
23493         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23494 done
23495 echo "$as_me:23495: result: $PKG_CFLAGS" >&5
23496 echo "${ECHO_T}$PKG_CFLAGS" >&6
23497
23498 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23499 case "x$NCURSES_OSPEED" in
23500 (*short*)
23501         cf_compatible=1
23502         ;;
23503 (*)
23504         cf_compatible=0
23505         ;;
23506 esac
23507
23508 cat >>confdefs.h <<EOF
23509 #define NCURSES_OSPEED_COMPAT $cf_compatible
23510 EOF
23511
23512 case "x$cf_cv_typeof_chtype" in
23513 (xshort|xint|xlong)
23514         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23515         ;;
23516 esac
23517
23518 case "x$cf_cv_typeof_mmask_t" in
23519 (xshort|xint|xlong)
23520         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23521         ;;
23522 esac
23523
23524 # substitute into misc/Makefile to suppress
23525 # (un)install.data from the
23526 # (un)install rules.
23527 if test "x$cf_with_db_install" = "xno"; then
23528         MISC_INSTALL_DATA=
23529         MISC_UNINSTALL_DATA=
23530 else
23531         MISC_INSTALL_DATA=install.data
23532         MISC_UNINSTALL_DATA=uninstall.data
23533 fi
23534
23535 SUB_SCRIPTS=
23536
23537 if test -n "$PACKAGE"
23538 then
23539         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23540         export PACKAGE
23541         echo "package: $PACKAGE"
23542 fi
23543
23544 UNALTERED_SYMS=
23545 cf_filter_syms=no
23546
23547 if test -n "$RESULTING_SYMS"
23548 then
23549         cf_filter_syms=$cf_dft_filter_syms
23550         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23551
23552 echo "${as_me:-configure}:23552: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23553
23554 fi
23555
23556 if test "x$WILDCARD_SYMS" = xno
23557 then
23558         cf_filter_syms=yes
23559 fi
23560
23561 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23562
23563 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23564 if test $cf_filter_syms = yes
23565 then
23566         RESULTING_SYMS=resulting.map
23567 fi
23568
23569 if test "x$cross_compiling" = xyes ; then
23570         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23571         CHECK_BUILD="#"
23572 else
23573         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23574         CHECK_BUILD=
23575 fi
23576
23577 cat >>confdefs.h <<\EOF
23578 #define HAVE_CURSES_DATA_BOOLNAMES 1
23579 EOF
23580
23581 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"
23582 ac_config_commands="$ac_config_commands default"
23583 cat >confcache <<\_ACEOF
23584 # This file is a shell script that caches the results of configure
23585 # tests run on this system so they can be shared between configure
23586 # scripts and configure runs, see configure's option --config-cache.
23587 # It is not useful on other systems.  If it contains results you don't
23588 # want to keep, you may remove or edit it.
23589 #
23590 # config.status only pays attention to the cache file if you give it
23591 # the --recheck option to rerun configure.
23592 #
23593 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23594 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23595 # following values.
23596
23597 _ACEOF
23598
23599 # The following way of writing the cache mishandles newlines in values,
23600 # but we know of no workaround that is simple, portable, and efficient.
23601 # So, don't put newlines in cache variables' values.
23602 # Ultrix sh set writes to stderr and can't be redirected directly,
23603 # and sets the high bit in the cache file unless we assign to the vars.
23604 {
23605   (set) 2>&1 |
23606     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23607     *ac_space=\ *)
23608       # `set' does not quote correctly, so add quotes (double-quote
23609       # substitution turns \\\\ into \\, and sed turns \\ into \).
23610       sed -n \
23611         "s/'/'\\\\''/g;
23612           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23613       ;;
23614     *)
23615       # `set' quotes correctly as required by POSIX, so do not add quotes.
23616       sed -n \
23617         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23618       ;;
23619     esac;
23620 } |
23621   sed '
23622      t clear
23623      : clear
23624      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23625      t end
23626      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23627      : end' >>confcache
23628 if cmp -s $cache_file confcache; then :; else
23629   if test -w $cache_file; then
23630     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23631     cat confcache >$cache_file
23632   else
23633     echo "not updating unwritable cache $cache_file"
23634   fi
23635 fi
23636 rm -f confcache
23637
23638 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23639 # Let make expand exec_prefix.
23640 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23641
23642 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23643 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23644 # trailing colons and then remove the whole line if VPATH becomes empty
23645 # (actually we leave an empty line to preserve line numbers).
23646 if test "x$srcdir" = x.; then
23647   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23648 s/:*\$(srcdir):*/:/;
23649 s/:*\${srcdir}:*/:/;
23650 s/:*@srcdir@:*/:/;
23651 s/^\([^=]*=[    ]*\):*/\1/;
23652 s/:*$//;
23653 s/^[^=]*=[      ]*$//;
23654 }'
23655 fi
23656
23657 DEFS=-DHAVE_CONFIG_H
23658
23659 : ${CONFIG_STATUS=./config.status}
23660 ac_clean_files_save=$ac_clean_files
23661 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23662 { echo "$as_me:23662: creating $CONFIG_STATUS" >&5
23663 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23664 cat >$CONFIG_STATUS <<_ACEOF
23665 #! $SHELL
23666 # Generated automatically by configure.
23667 # Run this file to recreate the current configuration.
23668 # Compiler output produced by configure, useful for debugging
23669 # configure, is in config.log if it exists.
23670
23671 debug=false
23672 SHELL=\${CONFIG_SHELL-$SHELL}
23673 ac_cs_invocation="\$0 \$@"
23674
23675 _ACEOF
23676
23677 cat >>$CONFIG_STATUS <<\_ACEOF
23678 # Be Bourne compatible
23679 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23680   emulate sh
23681   NULLCMD=:
23682 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23683   set -o posix
23684 fi
23685
23686 # Name of the executable.
23687 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23688
23689 if expr a : '\(a\)' >/dev/null 2>&1; then
23690   as_expr=expr
23691 else
23692   as_expr=false
23693 fi
23694
23695 rm -f conf$$ conf$$.exe conf$$.file
23696 echo >conf$$.file
23697 if ln -s conf$$.file conf$$ 2>/dev/null; then
23698   # We could just check for DJGPP; but this test a) works b) is more generic
23699   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23700   if test -f conf$$.exe; then
23701     # Don't use ln at all; we don't have any links
23702     as_ln_s='cp -p'
23703   else
23704     as_ln_s='ln -s'
23705   fi
23706 elif ln conf$$.file conf$$ 2>/dev/null; then
23707   as_ln_s=ln
23708 else
23709   as_ln_s='cp -p'
23710 fi
23711 rm -f conf$$ conf$$.exe conf$$.file
23712
23713 as_executable_p="test -f"
23714
23715 # Support unset when possible.
23716 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23717   as_unset=unset
23718 else
23719   as_unset=false
23720 fi
23721
23722 # NLS nuisances.
23723 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23724 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23725 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23726 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23727 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23728 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23729 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23730 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23731
23732 # IFS
23733 # We need space, tab and new line, in precisely that order.
23734 as_nl='
23735 '
23736 IFS="   $as_nl"
23737
23738 # CDPATH.
23739 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23740
23741 exec 6>&1
23742
23743 _ACEOF
23744
23745 # Files that config.status was made for.
23746 if test -n "$ac_config_files"; then
23747   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23748 fi
23749
23750 if test -n "$ac_config_headers"; then
23751   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23752 fi
23753
23754 if test -n "$ac_config_links"; then
23755   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23756 fi
23757
23758 if test -n "$ac_config_commands"; then
23759   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23760 fi
23761
23762 cat >>$CONFIG_STATUS <<\EOF
23763
23764 ac_cs_usage="\
23765 \`$as_me' instantiates files from templates according to the
23766 current configuration.
23767
23768 Usage: $0 [OPTIONS] [FILE]...
23769
23770   -h, --help       print this help, then exit
23771   -V, --version    print version number, then exit
23772   -d, --debug      don't remove temporary files
23773       --recheck    update $as_me by reconfiguring in the same conditions
23774   --file=FILE[:TEMPLATE]
23775                    instantiate the configuration file FILE
23776   --header=FILE[:TEMPLATE]
23777                    instantiate the configuration header FILE
23778
23779 Configuration files:
23780 $config_files
23781
23782 Configuration headers:
23783 $config_headers
23784
23785 Configuration commands:
23786 $config_commands
23787
23788 Report bugs to <dickey@invisible-island.net>."
23789 EOF
23790
23791 cat >>$CONFIG_STATUS <<EOF
23792 ac_cs_version="\\
23793 config.status
23794 configured by $0, generated by GNU Autoconf 2.52.20170501,
23795   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23796
23797 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23798 Free Software Foundation, Inc.
23799 This config.status script is free software; the Free Software Foundation
23800 gives unlimited permission to copy, distribute and modify it."
23801 srcdir=$srcdir
23802 INSTALL="$INSTALL"
23803 EOF
23804
23805 cat >>$CONFIG_STATUS <<\EOF
23806 # If no file are specified by the user, then we need to provide default
23807 # value.  By we need to know if files were specified by the user.
23808 ac_need_defaults=:
23809 while test $# != 0
23810 do
23811   case $1 in
23812   --*=*)
23813     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23814     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23815     shift
23816     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23817     shift
23818     ;;
23819   -*);;
23820   *) # This is not an option, so the user has probably given explicit
23821      # arguments.
23822      ac_need_defaults=false;;
23823   esac
23824
23825   case $1 in
23826   # Handling of the options.
23827 EOF
23828 cat >>$CONFIG_STATUS <<EOF
23829   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23830     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23831     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23832 EOF
23833 cat >>$CONFIG_STATUS <<\EOF
23834   --version | --vers* | -V )
23835     echo "$ac_cs_version"; exit 0 ;;
23836   --he | --h)
23837     # Conflict between --help and --header
23838     { { echo "$as_me:23838: error: ambiguous option: $1
23839 Try \`$0 --help' for more information." >&5
23840 echo "$as_me: error: ambiguous option: $1
23841 Try \`$0 --help' for more information." >&2;}
23842    { (exit 1); exit 1; }; };;
23843   --help | --hel | -h )
23844     echo "$ac_cs_usage"; exit 0 ;;
23845   --debug | --d* | -d )
23846     debug=: ;;
23847   --file | --fil | --fi | --f )
23848     shift
23849     CONFIG_FILES="$CONFIG_FILES $1"
23850     ac_need_defaults=false;;
23851   --header | --heade | --head | --hea )
23852     shift
23853     CONFIG_HEADERS="$CONFIG_HEADERS $1"
23854     ac_need_defaults=false;;
23855
23856   # This is an error.
23857   -*) { { echo "$as_me:23857: error: unrecognized option: $1
23858 Try \`$0 --help' for more information." >&5
23859 echo "$as_me: error: unrecognized option: $1
23860 Try \`$0 --help' for more information." >&2;}
23861    { (exit 1); exit 1; }; } ;;
23862
23863   *) ac_config_targets="$ac_config_targets $1" ;;
23864
23865   esac
23866   shift
23867 done
23868
23869 exec 5>>config.log
23870 cat >&5 << _ACEOF
23871
23872 ## ----------------------- ##
23873 ## Running config.status.  ##
23874 ## ----------------------- ##
23875
23876 This file was extended by $as_me 2.52.20170501, executed with
23877   CONFIG_FILES    = $CONFIG_FILES
23878   CONFIG_HEADERS  = $CONFIG_HEADERS
23879   CONFIG_LINKS    = $CONFIG_LINKS
23880   CONFIG_COMMANDS = $CONFIG_COMMANDS
23881   > $ac_cs_invocation
23882 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23883
23884 _ACEOF
23885 EOF
23886
23887 cat >>$CONFIG_STATUS <<EOF
23888 #
23889 # INIT-COMMANDS section.
23890 #
23891
23892 ### Special initialization commands, used to pass information from the
23893 ### configuration-run into config.status
23894
23895 AWK="$AWK"
23896 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23897 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23898 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23899 ECHO_LD="$ECHO_LD"
23900 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23901 LDCONFIG="$LDCONFIG"
23902 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23903 LIB_NAME="$LIB_NAME"
23904 LIB_PREFIX="$LIB_PREFIX"
23905 LIB_SUBSETS="$LIB_SUBSETS"
23906 LIB_SUFFIX="$LIB_SUFFIX"
23907 LIB_TRACING="$LIB_TRACING"
23908 LN_S="$LN_S"
23909 MAKE_TERMINFO="$MAKE_TERMINFO"
23910 NCURSES_MAJOR="$NCURSES_MAJOR"
23911 NCURSES_MINOR="$NCURSES_MINOR"
23912 NCURSES_OSPEED="$NCURSES_OSPEED"
23913 NCURSES_PATCH="$NCURSES_PATCH"
23914 SRC_SUBDIRS="$SRC_SUBDIRS"
23915 TERMINFO="$TERMINFO"
23916 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23917 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23918 TICS_NAME="$TICS_NAME"
23919 TICS_SUFFIX="$TICS_SUFFIX"
23920 TIC_PATH="$TIC_PATH"
23921 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23922 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23923 TINFO_NAME="$TINFO_NAME"
23924 TINFO_SUFFIX="$TINFO_SUFFIX"
23925 UNALTERED_SYMS="$UNALTERED_SYMS"
23926 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23927 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23928 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23929 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23930 WILDCARD_SYMS="$WILDCARD_SYMS"
23931 WITH_CURSES_H="$with_curses_h"
23932 WITH_ECHO="${enable_echo:=yes}"
23933 WITH_OVERWRITE="$with_overwrite"
23934 cf_LIST_MODELS="$cf_list_models"
23935 cf_cv_abi_version="$cf_cv_abi_version"
23936 cf_cv_do_relink="$cf_cv_do_relink"
23937 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23938 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23939 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23940 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23941 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23942 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23943 cf_cv_rel_version="$cf_cv_rel_version"
23944 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23945 cf_cv_shared_soname='$cf_cv_shared_soname'
23946 cf_cv_shlib_version="$cf_cv_shlib_version"
23947 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23948 cf_cv_system_name="$cf_cv_system_name"
23949 cf_cv_term_driver="$with_term_driver"
23950 cf_with_ada="$cf_with_ada"
23951 cf_with_cxx_binding="$cf_with_cxx_binding"
23952 cf_with_db_install="$cf_with_db_install"
23953 cf_with_manpages="$cf_with_manpages"
23954 cf_with_tests="$cf_with_tests"
23955 host="$host"
23956 target="$target"
23957 with_shared_cxx="$with_shared_cxx"
23958
23959 EOF
23960
23961 cat >>$CONFIG_STATUS <<\EOF
23962 for ac_config_target in $ac_config_targets
23963 do
23964   case "$ac_config_target" in
23965   # Handling of arguments.
23966   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23967   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23968   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23969   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23970   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23971   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23972   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23973   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23974   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23975   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23976   *) { { echo "$as_me:23976: error: invalid argument: $ac_config_target" >&5
23977 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23978    { (exit 1); exit 1; }; };;
23979   esac
23980 done
23981
23982 # If the user did not use the arguments to specify the items to instantiate,
23983 # then the envvar interface is used.  Set only those that are not.
23984 # We use the long form for the default assignment because of an extremely
23985 # bizarre bug on SunOS 4.1.3.
23986 if $ac_need_defaults; then
23987   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23988   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23989   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23990 fi
23991
23992 # Create a temporary directory, and hook for its removal unless debugging.
23993 $debug ||
23994 {
23995   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23996   trap '{ (exit 1); exit 1; }' 1 2 13 15
23997 }
23998
23999 # Create a (secure) tmp directory for tmp files.
24000 : ${TMPDIR=/tmp}
24001 {
24002   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24003   test -n "$tmp" && test -d "$tmp"
24004 }  ||
24005 {
24006   tmp=$TMPDIR/cs$$-$RANDOM
24007   (umask 077 && mkdir $tmp)
24008 } ||
24009 {
24010    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24011    { (exit 1); exit 1; }
24012 }
24013
24014 EOF
24015
24016 cat >>$CONFIG_STATUS <<EOF
24017
24018 #
24019 # CONFIG_FILES section.
24020 #
24021
24022 # No need to generate the scripts if there are no CONFIG_FILES.
24023 # This happens for instance when ./config.status config.h
24024 if test -n "\$CONFIG_FILES"; then
24025   # Protect against being on the right side of a sed subst in config.status.
24026   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24027    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24028 s,@SHELL@,$SHELL,;t t
24029 s,@exec_prefix@,$exec_prefix,;t t
24030 s,@prefix@,$prefix,;t t
24031 s,@program_transform_name@,$program_transform_name,;t t
24032 s,@bindir@,$bindir,;t t
24033 s,@sbindir@,$sbindir,;t t
24034 s,@libexecdir@,$libexecdir,;t t
24035 s,@datarootdir@,$datarootdir,;t t
24036 s,@datadir@,$datadir,;t t
24037 s,@sysconfdir@,$sysconfdir,;t t
24038 s,@sharedstatedir@,$sharedstatedir,;t t
24039 s,@localstatedir@,$localstatedir,;t t
24040 s,@libdir@,$libdir,;t t
24041 s,@includedir@,$includedir,;t t
24042 s,@oldincludedir@,$oldincludedir,;t t
24043 s,@infodir@,$infodir,;t t
24044 s,@mandir@,$mandir,;t t
24045 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24046 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24047 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24048 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24049 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24050 s,@build_alias@,$build_alias,;t t
24051 s,@host_alias@,$host_alias,;t t
24052 s,@target_alias@,$target_alias,;t t
24053 s,@ECHO_C@,$ECHO_C,;t t
24054 s,@ECHO_N@,$ECHO_N,;t t
24055 s,@ECHO_T@,$ECHO_T,;t t
24056 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24057 s,@DEFS@,$DEFS,;t t
24058 s,@LIBS@,$LIBS,;t t
24059 s,@top_builddir@,$top_builddir,;t t
24060 s,@EGREP@,$EGREP,;t t
24061 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
24062 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
24063 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
24064 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24065 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
24066 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
24067 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
24068 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
24069 s,@VERSION@,$VERSION,;t t
24070 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
24071 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
24072 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
24073 s,@PACKAGE@,$PACKAGE,;t t
24074 s,@build@,$build,;t t
24075 s,@build_cpu@,$build_cpu,;t t
24076 s,@build_vendor@,$build_vendor,;t t
24077 s,@build_os@,$build_os,;t t
24078 s,@host@,$host,;t t
24079 s,@host_cpu@,$host_cpu,;t t
24080 s,@host_vendor@,$host_vendor,;t t
24081 s,@host_os@,$host_os,;t t
24082 s,@target@,$target,;t t
24083 s,@target_cpu@,$target_cpu,;t t
24084 s,@target_vendor@,$target_vendor,;t t
24085 s,@target_os@,$target_os,;t t
24086 s,@CC@,$CC,;t t
24087 s,@CFLAGS@,$CFLAGS,;t t
24088 s,@LDFLAGS@,$LDFLAGS,;t t
24089 s,@CPPFLAGS@,$CPPFLAGS,;t t
24090 s,@ac_ct_CC@,$ac_ct_CC,;t t
24091 s,@EXEEXT@,$EXEEXT,;t t
24092 s,@OBJEXT@,$OBJEXT,;t t
24093 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24094 s,@CPP@,$CPP,;t t
24095 s,@LDCONFIG@,$LDCONFIG,;t t
24096 s,@CXX@,$CXX,;t t
24097 s,@CXXFLAGS@,$CXXFLAGS,;t t
24098 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
24099 s,@AWK@,$AWK,;t t
24100 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24101 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24102 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24103 s,@LINT@,$LINT,;t t
24104 s,@LINT_OPTS@,$LINT_OPTS,;t t
24105 s,@LN_S@,$LN_S,;t t
24106 s,@cf_config_suffix@,$cf_config_suffix,;t t
24107 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24108 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24109 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
24110 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
24111 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
24112 s,@SET_MAKE@,$SET_MAKE,;t t
24113 s,@CTAGS@,$CTAGS,;t t
24114 s,@ETAGS@,$ETAGS,;t t
24115 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24116 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24117 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
24118 s,@RANLIB@,$RANLIB,;t t
24119 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24120 s,@LD@,$LD,;t t
24121 s,@ac_ct_LD@,$ac_ct_LD,;t t
24122 s,@AR@,$AR,;t t
24123 s,@ac_ct_AR@,$ac_ct_AR,;t t
24124 s,@NM@,$NM,;t t
24125 s,@ac_ct_NM@,$ac_ct_NM,;t t
24126 s,@ARFLAGS@,$ARFLAGS,;t t
24127 s,@DESTDIR@,$DESTDIR,;t t
24128 s,@BUILD_CC@,$BUILD_CC,;t t
24129 s,@BUILD_CPP@,$BUILD_CPP,;t t
24130 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
24131 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
24132 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
24133 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
24134 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
24135 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
24136 s,@cf_list_models@,$cf_list_models,;t t
24137 s,@ABI_VERSION@,$ABI_VERSION,;t t
24138 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
24139 s,@LIBTOOL@,$LIBTOOL,;t t
24140 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
24141 s,@LT_UNDEF@,$LT_UNDEF,;t t
24142 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
24143 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24144 s,@LIB_CREATE@,$LIB_CREATE,;t t
24145 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
24146 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
24147 s,@LIB_PREP@,$LIB_PREP,;t t
24148 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24149 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24150 s,@LIB_LINK@,$LIB_LINK,;t t
24151 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
24152 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
24153 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
24154 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24155 s,@TICS_NAME@,$TICS_NAME,;t t
24156 s,@TINFO_NAME@,$TINFO_NAME,;t t
24157 s,@LIB_NAME@,$LIB_NAME,;t t
24158 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
24159 s,@CC_G_OPT@,$CC_G_OPT,;t t
24160 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
24161 s,@LD_MODEL@,$LD_MODEL,;t t
24162 s,@shlibdir@,$shlibdir,;t t
24163 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
24164 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24165 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
24166 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24167 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
24168 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
24169 s,@LINK_PROGS@,$LINK_PROGS,;t t
24170 s,@LINK_TESTS@,$LINK_TESTS,;t t
24171 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24172 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24173 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
24174 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
24175 s,@RPATH_LIST@,$RPATH_LIST,;t t
24176 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
24177 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
24178 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
24179 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
24180 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24181 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
24182 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
24183 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
24184 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
24185 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
24186 s,@XTERM_KBS@,$XTERM_KBS,;t t
24187 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
24188 s,@TERMINFO@,$TERMINFO,;t t
24189 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
24190 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
24191 s,@TERMPATH@,$TERMPATH,;t t
24192 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
24193 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
24194 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
24195 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
24196 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
24197 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
24198 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
24199 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
24200 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
24201 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
24202 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
24203 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
24204 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
24205 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
24206 s,@RGB_PATH@,$RGB_PATH,;t t
24207 s,@no_x11_rgb@,$no_x11_rgb,;t t
24208 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
24209 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
24210 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
24211 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
24212 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
24213 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
24214 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
24215 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
24216 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
24217 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
24218 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
24219 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
24220 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
24221 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
24222 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
24223 s,@PTHREAD@,$PTHREAD,;t t
24224 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
24225 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
24226 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
24227 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
24228 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
24229 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
24230 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
24231 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24232 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
24233 s,@ECHO_LT@,$ECHO_LT,;t t
24234 s,@ECHO_LD@,$ECHO_LD,;t t
24235 s,@RULE_CC@,$RULE_CC,;t t
24236 s,@SHOW_CC@,$SHOW_CC,;t t
24237 s,@ECHO_CC@,$ECHO_CC,;t t
24238 s,@ECHO_LINK@,$ECHO_LINK,;t t
24239 s,@ADAFLAGS@,$ADAFLAGS,;t t
24240 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24241 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
24242 s,@ADA_TRACE@,$ADA_TRACE,;t t
24243 s,@MATH_LIB@,$MATH_LIB,;t t
24244 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
24245 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
24246 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
24247 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
24248 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
24249 s,@TEST_LIBS@,$TEST_LIBS,;t t
24250 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
24251 s,@CXXCPP@,$CXXCPP,;t t
24252 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
24253 s,@CXX_AR@,$CXX_AR,;t t
24254 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
24255 s,@CXXLIBS@,$CXXLIBS,;t t
24256 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
24257 s,@gnat_exists@,$gnat_exists,;t t
24258 s,@M4_exists@,$M4_exists,;t t
24259 s,@cf_ada_make@,$cf_ada_make,;t t
24260 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
24261 s,@cf_compile_generics@,$cf_compile_generics,;t t
24262 s,@cf_generic_objects@,$cf_generic_objects,;t t
24263 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
24264 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
24265 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
24266 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
24267 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
24268 s,@cf_ada_package@,$cf_ada_package,;t t
24269 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
24270 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
24271 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
24272 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
24273 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
24274 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
24275 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24276 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24277 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
24278 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
24279 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
24280 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
24281 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
24282 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
24283 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
24284 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
24285 s,@TICS_LIBS@,$TICS_LIBS,;t t
24286 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
24287 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
24288 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
24289 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24290 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24291 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
24292 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24293 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24294 s,@includesubdir@,$includesubdir,;t t
24295 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
24296 s,@TICS_LIST@,$TICS_LIST,;t t
24297 s,@TINFO_LIST@,$TINFO_LIST,;t t
24298 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
24299 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
24300 s,@TEST_ARGS@,$TEST_ARGS,;t t
24301 s,@TEST_DEPS@,$TEST_DEPS,;t t
24302 s,@TEST_ARG2@,$TEST_ARG2,;t t
24303 s,@TEST_DEP2@,$TEST_DEP2,;t t
24304 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
24305 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
24306 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
24307 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
24308 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
24309 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
24310 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
24311 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
24312 s,@cross_compiling@,$cross_compiling,;t t
24313 s,@TIC_PATH@,$TIC_PATH,;t t
24314 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
24315 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
24316 s,@PANEL_NAME@,$PANEL_NAME,;t t
24317 s,@MENU_NAME@,$MENU_NAME,;t t
24318 s,@FORM_NAME@,$FORM_NAME,;t t
24319 s,@CXX_NAME@,$CXX_NAME,;t t
24320 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
24321 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
24322 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
24323 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
24324 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
24325 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
24326 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
24327 CEOF
24328
24329 EOF
24330
24331   cat >>$CONFIG_STATUS <<\EOF
24332   # Split the substitutions into bite-sized pieces for seds with
24333   # small command number limits, like on Digital OSF/1 and HP-UX.
24334   ac_max_sed_lines=48
24335   ac_sed_frag=1 # Number of current file.
24336   ac_beg=1 # First line for current file.
24337   ac_end=$ac_max_sed_lines # Line after last line for current file.
24338   ac_more_lines=:
24339   ac_sed_cmds=
24340   while $ac_more_lines; do
24341     if test $ac_beg -gt 1; then
24342       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24343     else
24344       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24345     fi
24346     if test ! -s $tmp/subs.frag; then
24347       ac_more_lines=false
24348     else
24349       # The purpose of the label and of the branching condition is to
24350       # speed up the sed processing (if there are no `@' at all, there
24351       # is no need to browse any of the substitutions).
24352       # These are the two extra sed commands mentioned above.
24353       (echo ':t
24354   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24355       # It is possible to make a multiline substitution using escaped newlines.
24356       # Ensure that we do not split the substitution between script fragments.
24357       ac_BEG=$ac_end
24358       ac_END=`expr $ac_end + $ac_max_sed_lines`
24359       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
24360       if test -s $tmp/subs.next; then
24361         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
24362         if test ! -s $tmp/subs.edit; then
24363           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
24364           if test ! -s $tmp/subs.edit; then
24365             if test $ac_beg -gt 1; then
24366               ac_end=`expr $ac_end - 1`
24367               continue
24368             fi
24369           fi
24370         fi
24371       fi
24372
24373       if test -z "$ac_sed_cmds"; then
24374         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24375       else
24376         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24377       fi
24378       ac_sed_frag=`expr $ac_sed_frag + 1`
24379       ac_beg=$ac_end
24380       ac_end=`expr $ac_end + $ac_max_sed_lines`
24381     fi
24382   done
24383   if test -z "$ac_sed_cmds"; then
24384     ac_sed_cmds=cat
24385   fi
24386 fi # test -n "$CONFIG_FILES"
24387
24388 EOF
24389 cat >>$CONFIG_STATUS <<\EOF
24390 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24391   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24392   case $ac_file in
24393   - | *:- | *:-:* ) # input from stdin
24394         cat >$tmp/stdin
24395         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24396         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24397   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24398         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24399   * )   ac_file_in=$ac_file.in ;;
24400   esac
24401
24402   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24403   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24404          X"$ac_file" : 'X\(//\)[^/]' \| \
24405          X"$ac_file" : 'X\(//\)$' \| \
24406          X"$ac_file" : 'X\(/\)' \| \
24407          .     : '\(.\)' 2>/dev/null ||
24408 echo X"$ac_file" |
24409     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24410           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24411           /^X\(\/\/\)$/{ s//\1/; q; }
24412           /^X\(\/\).*/{ s//\1/; q; }
24413           s/.*/./; q'`
24414   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24415     { case "$ac_dir" in
24416   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24417   *)                      as_incr_dir=.;;
24418 esac
24419 as_dummy="$ac_dir"
24420 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24421   case $as_mkdir_dir in
24422     # Skip DOS drivespec
24423     ?:) as_incr_dir=$as_mkdir_dir ;;
24424     *)
24425       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24426       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24427     ;;
24428   esac
24429 done; }
24430
24431     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24432     # A "../" for each directory in $ac_dir_suffix.
24433     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24434   else
24435     ac_dir_suffix= ac_dots=
24436   fi
24437
24438   case $srcdir in
24439   .)  ac_srcdir=.
24440       if test -z "$ac_dots"; then
24441          ac_top_srcdir=.
24442       else
24443          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
24444       fi ;;
24445   [\\/]* | ?:[\\/]* )
24446       ac_srcdir=$srcdir$ac_dir_suffix;
24447       ac_top_srcdir=$srcdir ;;
24448   *) # Relative path.
24449     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
24450     ac_top_srcdir=$ac_dots$srcdir ;;
24451   esac
24452
24453   case $INSTALL in
24454   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24455   *) ac_INSTALL=$ac_dots$INSTALL ;;
24456   esac
24457
24458   if test x"$ac_file" != x-; then
24459     { echo "$as_me:24459: creating $ac_file" >&5
24460 echo "$as_me: creating $ac_file" >&6;}
24461     rm -f "$ac_file"
24462   fi
24463   # Let's still pretend it is `configure' which instantiates (i.e., don't
24464   # use $as_me), people would be surprised to read:
24465   #    /* config.h.  Generated automatically by config.status.  */
24466   configure_input="Generated automatically from `echo $ac_file_in |
24467                                                  sed 's,.*/,,'` by configure."
24468
24469   # First look for the input files in the build tree, otherwise in the
24470   # src tree.
24471   ac_file_inputs=`IFS=:
24472     for f in $ac_file_in; do
24473       case $f in
24474       -) echo $tmp/stdin ;;
24475       [\\/$]*)
24476          # Absolute (can't be DOS-style, as IFS=:)
24477          test -f "$f" || { { echo "$as_me:24477: error: cannot find input file: $f" >&5
24478 echo "$as_me: error: cannot find input file: $f" >&2;}
24479    { (exit 1); exit 1; }; }
24480          echo $f;;
24481       *) # Relative
24482          if test -f "$f"; then
24483            # Build tree
24484            echo $f
24485          elif test -f "$srcdir/$f"; then
24486            # Source tree
24487            echo $srcdir/$f
24488          else
24489            # /dev/null tree
24490            { { echo "$as_me:24490: error: cannot find input file: $f" >&5
24491 echo "$as_me: error: cannot find input file: $f" >&2;}
24492    { (exit 1); exit 1; }; }
24493          fi;;
24494       esac
24495     done` || { (exit 1); exit 1; }
24496 EOF
24497 cat >>$CONFIG_STATUS <<\EOF
24498   ac_warn_datarootdir=no
24499   if test x"$ac_file" != x-; then
24500     for ac_item in $ac_file_inputs
24501     do
24502       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24503       if test -n "$ac_seen"; then
24504         ac_used=`grep '@datarootdir@' $ac_item`
24505         if test -z "$ac_used"; then
24506           { echo "$as_me:24506: WARNING: datarootdir was used implicitly but not set:
24507 $ac_seen" >&5
24508 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24509 $ac_seen" >&2;}
24510           ac_warn_datarootdir=yes
24511         fi
24512       fi
24513       ac_seen=`grep '${datarootdir}' $ac_item`
24514       if test -n "$ac_seen"; then
24515         { echo "$as_me:24515: WARNING: datarootdir was used explicitly but not set:
24516 $ac_seen" >&5
24517 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24518 $ac_seen" >&2;}
24519         ac_warn_datarootdir=yes
24520       fi
24521     done
24522   fi
24523
24524 if test "x$ac_warn_datarootdir" = xyes; then
24525   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24526 fi
24527
24528 EOF
24529 cat >>$CONFIG_STATUS <<EOF
24530   sed "$ac_vpsub
24531 $extrasub
24532 EOF
24533 cat >>$CONFIG_STATUS <<\EOF
24534 :t
24535 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24536 s,@configure_input@,$configure_input,;t t
24537 s,@srcdir@,$ac_srcdir,;t t
24538 s,@top_srcdir@,$ac_top_srcdir,;t t
24539 s,@INSTALL@,$ac_INSTALL,;t t
24540 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24541   rm -f $tmp/stdin
24542   if test x"$ac_file" != x-; then
24543     cp $tmp/out $ac_file
24544
24545     for ac_name in prefix exec_prefix datarootdir
24546     do
24547         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24548         if test -n "$ac_seen"; then
24549             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24550             if test -z "$ac_init"; then
24551               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24552               { echo "$as_me:24552: WARNING: Variable $ac_name is used but was not set:
24553 $ac_seen" >&5
24554 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24555 $ac_seen" >&2;}
24556             fi
24557         fi
24558     done
24559     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24560     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24561     if test -s $tmp/out; then
24562       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24563       { echo "$as_me:24563: WARNING: Some variables may not be substituted:
24564 $ac_seen" >&5
24565 echo "$as_me: WARNING: Some variables may not be substituted:
24566 $ac_seen" >&2;}
24567     fi
24568   else
24569     cat $tmp/out
24570   fi
24571   rm -f $tmp/out
24572
24573 done
24574 EOF
24575 cat >>$CONFIG_STATUS <<\EOF
24576
24577 #
24578 # CONFIG_HEADER section.
24579 #
24580
24581 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24582 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24583 #
24584 # ac_d sets the value in "#define NAME VALUE" lines.
24585 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24586 ac_dB='[        ].*$,\1#\2'
24587 ac_dC=' '
24588 ac_dD=',;t'
24589 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24590 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24591 ac_iB='\([      ]\),\1#\2define\3'
24592 ac_iC=' '
24593 ac_iD='\4,;t'
24594 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24595 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24596 ac_uB='$,\1#\2define\3'
24597 ac_uC=' '
24598 ac_uD=',;t'
24599
24600 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24601   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24602   case $ac_file in
24603   - | *:- | *:-:* ) # input from stdin
24604         cat >$tmp/stdin
24605         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24606         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24607   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24608         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24609   * )   ac_file_in=$ac_file.in ;;
24610   esac
24611
24612   test x"$ac_file" != x- && { echo "$as_me:24612: creating $ac_file" >&5
24613 echo "$as_me: creating $ac_file" >&6;}
24614
24615   # First look for the input files in the build tree, otherwise in the
24616   # src tree.
24617   ac_file_inputs=`IFS=:
24618     for f in $ac_file_in; do
24619       case $f in
24620       -) echo $tmp/stdin ;;
24621       [\\/$]*)
24622          # Absolute (can't be DOS-style, as IFS=:)
24623          test -f "$f" || { { echo "$as_me:24623: error: cannot find input file: $f" >&5
24624 echo "$as_me: error: cannot find input file: $f" >&2;}
24625    { (exit 1); exit 1; }; }
24626          echo $f;;
24627       *) # Relative
24628          if test -f "$f"; then
24629            # Build tree
24630            echo $f
24631          elif test -f "$srcdir/$f"; then
24632            # Source tree
24633            echo $srcdir/$f
24634          else
24635            # /dev/null tree
24636            { { echo "$as_me:24636: error: cannot find input file: $f" >&5
24637 echo "$as_me: error: cannot find input file: $f" >&2;}
24638    { (exit 1); exit 1; }; }
24639          fi;;
24640       esac
24641     done` || { (exit 1); exit 1; }
24642   # Remove the trailing spaces.
24643   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24644
24645 EOF
24646
24647 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24648 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24649 # be either 'cat' or 'sort'.
24650 cat confdefs.h | uniq >conftest.vals
24651
24652 # Break up conftest.vals because some shells have a limit on
24653 # the size of here documents, and old seds have small limits too.
24654
24655 rm -f conftest.tail
24656 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24657 while grep . conftest.vals >/dev/null
24658 do
24659   # Write chunks of a limited-size here document to conftest.frag.
24660   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24661   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24662   echo 'CEOF' >> $CONFIG_STATUS
24663   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24664   rm -f conftest.vals
24665   mv conftest.tail conftest.vals
24666 done
24667 rm -f conftest.vals
24668
24669 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24670 # marker @DEFS@.
24671 echo '  cat >> conftest.edit <<CEOF
24672 /@DEFS@/r conftest.frag
24673 /@DEFS@/d
24674 CEOF
24675 sed -f conftest.edit $tmp/in > $tmp/out
24676 rm -f $tmp/in
24677 mv $tmp/out $tmp/in
24678 rm -f conftest.edit conftest.frag
24679 ' >> $CONFIG_STATUS
24680
24681 cat >>$CONFIG_STATUS <<\EOF
24682   # Let's still pretend it is `configure' which instantiates (i.e., don't
24683   # use $as_me), people would be surprised to read:
24684   #    /* config.h.  Generated automatically by config.status.  */
24685   if test x"$ac_file" = x-; then
24686     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24687   else
24688     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24689   fi
24690   cat $tmp/in >>$tmp/config.h
24691   rm -f $tmp/in
24692   if test x"$ac_file" != x-; then
24693     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24694       { echo "$as_me:24694: $ac_file is unchanged" >&5
24695 echo "$as_me: $ac_file is unchanged" >&6;}
24696     else
24697       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24698          X"$ac_file" : 'X\(//\)[^/]' \| \
24699          X"$ac_file" : 'X\(//\)$' \| \
24700          X"$ac_file" : 'X\(/\)' \| \
24701          .     : '\(.\)' 2>/dev/null ||
24702 echo X"$ac_file" |
24703     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24704           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24705           /^X\(\/\/\)$/{ s//\1/; q; }
24706           /^X\(\/\).*/{ s//\1/; q; }
24707           s/.*/./; q'`
24708       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24709         { case "$ac_dir" in
24710   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24711   *)                      as_incr_dir=.;;
24712 esac
24713 as_dummy="$ac_dir"
24714 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24715   case $as_mkdir_dir in
24716     # Skip DOS drivespec
24717     ?:) as_incr_dir=$as_mkdir_dir ;;
24718     *)
24719       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24720       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24721     ;;
24722   esac
24723 done; }
24724
24725       fi
24726       rm -f $ac_file
24727       mv $tmp/config.h $ac_file
24728     fi
24729   else
24730     cat $tmp/config.h
24731     rm -f $tmp/config.h
24732   fi
24733 done
24734 EOF
24735 cat >>$CONFIG_STATUS <<\EOF
24736 #
24737 # CONFIG_COMMANDS section.
24738 #
24739 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24740   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24741   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24742
24743   case $ac_dest in
24744     default )
24745 if test "x$cf_with_tests" != xno ; then
24746
24747 for cf_dir in test
24748 do
24749         if test ! -d $srcdir/$cf_dir; then
24750                 continue
24751         elif test -f $srcdir/$cf_dir/programs; then
24752                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24753         fi
24754 done
24755
24756 fi
24757
24758 cf_prefix=$LIB_PREFIX
24759
24760 case $cf_cv_shlib_version in
24761 (cygdll|msysdll|mingw)
24762         TINFO_NAME=$TINFO_ARG_SUFFIX
24763         TINFO_SUFFIX=.dll
24764         ;;
24765 esac
24766
24767 if test -n "$TINFO_SUFFIX" ; then
24768         case $TINFO_SUFFIX in
24769         (tw*)
24770                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24771                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24772                 ;;
24773         (t*)
24774                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24775                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24776                 ;;
24777         (w*)
24778                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24779                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24780                 ;;
24781         esac
24782 fi
24783
24784 for cf_dir in $SRC_SUBDIRS
24785 do
24786         if test ! -d $srcdir/$cf_dir ; then
24787                 continue
24788         elif test -f $srcdir/$cf_dir/modules; then
24789
24790                 SHARED_LIB=
24791                 Libs_To_Make=
24792                 cf_awk_program=
24793                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
24794                 then
24795                         cf_awk_program="$cf_awk_program\
24796 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
24797 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
24798 "
24799                 fi
24800
24801                 if test "x$WILDCARD_SYMS" = xno
24802                 then
24803                         cf_awk_program="$cf_awk_program\
24804 /[      ]_\\*;/ { skip=1; next; }\
24805 "
24806                 fi
24807
24808                 if test "x$cf_awk_program" != "x"
24809                 then
24810                         cat >>$cf_dir/Makefile <<CF_EOF
24811
24812 # Generated by CF_LIB_RULES
24813 resulting.map: $UNALTERED_SYMS
24814         $AWK 'BEGIN { skip = 1; last=""; } \
24815 $cf_awk_program \
24816 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
24817  skip = 0; last = \$\$0; } \
24818 END { print last; }' < $UNALTERED_SYMS >\$@
24819
24820 distclean::
24821         rm -f resulting.map
24822 CF_EOF
24823                 fi
24824
24825                 for cf_item in $cf_LIST_MODELS
24826                 do
24827
24828         case X$cf_item in
24829         (Xlibtool)
24830                 cf_suffix='.la'
24831                 cf_depsuf=$cf_suffix
24832                 ;;
24833         (Xdebug)
24834                 cf_suffix='_g.a'
24835                 cf_depsuf=$cf_suffix
24836                 ;;
24837         (Xprofile)
24838                 cf_suffix='_p.a'
24839                 cf_depsuf=$cf_suffix
24840                 ;;
24841         (Xshared)
24842                 case $cf_cv_system_name in
24843                 (aix[5-7]*)
24844                         cf_suffix='.so'
24845                         cf_depsuf=$cf_suffix
24846                         ;;
24847                 (cygwin*|msys*|mingw*)
24848                         cf_suffix='.dll'
24849                         cf_depsuf='.dll.a'
24850                         ;;
24851                 (darwin*)
24852                         cf_suffix='.dylib'
24853                         cf_depsuf=$cf_suffix
24854                         ;;
24855                 (hpux*)
24856                         case $target in
24857                         (ia64*)
24858                                 cf_suffix='.so'
24859                                 cf_depsuf=$cf_suffix
24860                                 ;;
24861                         (*)
24862                                 cf_suffix='.sl'
24863                                 cf_depsuf=$cf_suffix
24864                                 ;;
24865                         esac
24866                         ;;
24867                 (*)
24868                         cf_suffix='.so'
24869                         cf_depsuf=$cf_suffix
24870                         ;;
24871                 esac
24872                 ;;
24873         (*)
24874                 cf_suffix='.a'
24875                 cf_depsuf=$cf_suffix
24876                 ;;
24877         esac
24878         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24879         then
24880                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24881                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24882         fi
24883
24884                         cf_libname=$cf_dir
24885                         test "$cf_dir" = c++ && cf_libname=ncurses++
24886                         if test $cf_item = shared ; then
24887                                 if test -n "${LIB_SUFFIX}"
24888                                 then
24889                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24890                                 else
24891                                         cf_shared_suffix="$cf_suffix"
24892                                 fi
24893                                 if test "$cf_cv_do_symlinks" = yes ; then
24894                                         cf_version_name=
24895
24896                                         case "$cf_cv_shlib_version" in
24897                                         (rel)
24898                                                 cf_version_name=REL_VERSION
24899                                                 ;;
24900                                         (abi)
24901                                                 cf_version_name=ABI_VERSION
24902                                                 ;;
24903                                         esac
24904
24905                                         if test -n "$cf_version_name"
24906                                         then
24907                                                 case "$cf_cv_system_name" in
24908                                                 (darwin*)
24909                                                         # "w", etc?
24910                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24911                                                         ;;
24912                                                 (*)
24913                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24914                                                         ;;
24915                                                 esac
24916                                         fi
24917                                         if test -n "${USE_LIB_SUFFIX}"
24918                                         then
24919                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24920                                         else
24921                                                 cf_shared_suffix="$cf_suffix"
24922                                         fi
24923                                 fi
24924                                 # cygwin needs import library, and has unique naming convention
24925                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24926                                 # use 'cyg' prefix for shared lib.
24927                                 case $cf_cv_shlib_version in
24928                                 (cygdll)
24929                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24930                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24931                                         ;;
24932                                 (msysdll)
24933                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24934                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24935                                         ;;
24936                                 (mingw)
24937                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24938                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24939                                         ;;
24940                                 (*)
24941                                         cf_add_lib=
24942                                         ;;
24943                                 esac
24944                                 if test -n "$cf_add_lib"
24945                                 then
24946                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24947                                         continue
24948                                 fi
24949                         fi
24950                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24951                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24952                 done
24953
24954                 if test $cf_dir = ncurses ; then
24955                         cf_subsets="$LIB_SUBSETS"
24956                         cf_r_parts="$cf_subsets"
24957                         cf_liblist="$Libs_To_Make"
24958
24959                         while test -n "$cf_r_parts"
24960                         do
24961                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24962                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24963                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24964                                         cf_add_lib=
24965                                         case $cf_l_parts in
24966                                         (*termlib*)
24967                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24968                                                 ;;
24969                                         (*ticlib*)
24970                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24971                                                 ;;
24972                                         (*)
24973                                                 break
24974                                                 ;;
24975                                         esac
24976                                         if test -n "$cf_add_lib"; then
24977                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24978                                         fi
24979                                 else
24980                                         break
24981                                 fi
24982                         done
24983                 else
24984                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24985                 fi
24986
24987                 if test $cf_dir = c++; then
24988                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24989                                 cf_list=
24990                                 for cf_item in $Libs_To_Make
24991                                 do
24992                                         case $cf_item in
24993                                         (*.a)
24994                                                 ;;
24995                                         (*)
24996                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24997                                                 ;;
24998                                         esac
24999                                         for cf_test in $cf_list
25000                                         do
25001                                                 if test "$cf_test" = "$cf_item"
25002                                                 then
25003                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
25004                                                         cf_item=
25005                                                         break
25006                                                 fi
25007                                         done
25008                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
25009                                 done
25010                                 Libs_To_Make="$cf_list"
25011                         fi
25012                 fi
25013
25014                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
25015                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
25016                         $cf_dir/Makefile >$cf_dir/Makefile.out
25017                 mv $cf_dir/Makefile.out $cf_dir/Makefile
25018
25019                 $AWK -f $srcdir/mk-0th.awk \
25020                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
25021                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25022
25023                 for cf_subset in $cf_subsets
25024                 do
25025                         cf_subdirs=
25026                         for cf_item in $cf_LIST_MODELS
25027                         do
25028
25029                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
25030
25031 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25032
25033                         CXX_MODEL=$cf_ITEM
25034                         if test "$CXX_MODEL" = SHARED; then
25035                                 case $cf_cv_shlib_version in
25036                                 (cygdll|msysdll|mingw)
25037                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
25038
25039 echo "${as_me:-configure}:25039: testing overriding CXX_MODEL to SHARED ..." 1>&5
25040
25041                                         with_shared_cxx=yes
25042                                         ;;
25043                                 (*)
25044                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
25045                                         ;;
25046                                 esac
25047                         fi
25048
25049         case X$cf_item in
25050         (Xlibtool)
25051                 cf_suffix='.la'
25052                 cf_depsuf=$cf_suffix
25053                 ;;
25054         (Xdebug)
25055                 cf_suffix='_g.a'
25056                 cf_depsuf=$cf_suffix
25057                 ;;
25058         (Xprofile)
25059                 cf_suffix='_p.a'
25060                 cf_depsuf=$cf_suffix
25061                 ;;
25062         (Xshared)
25063                 case $cf_cv_system_name in
25064                 (aix[5-7]*)
25065                         cf_suffix='.so'
25066                         cf_depsuf=$cf_suffix
25067                         ;;
25068                 (cygwin*|msys*|mingw*)
25069                         cf_suffix='.dll'
25070                         cf_depsuf='.dll.a'
25071                         ;;
25072                 (darwin*)
25073                         cf_suffix='.dylib'
25074                         cf_depsuf=$cf_suffix
25075                         ;;
25076                 (hpux*)
25077                         case $target in
25078                         (ia64*)
25079                                 cf_suffix='.so'
25080                                 cf_depsuf=$cf_suffix
25081                                 ;;
25082                         (*)
25083                                 cf_suffix='.sl'
25084                                 cf_depsuf=$cf_suffix
25085                                 ;;
25086                         esac
25087                         ;;
25088                 (*)
25089                         cf_suffix='.so'
25090                         cf_depsuf=$cf_suffix
25091                         ;;
25092                 esac
25093                 ;;
25094         (*)
25095                 cf_suffix='.a'
25096                 cf_depsuf=$cf_suffix
25097                 ;;
25098         esac
25099         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25100         then
25101                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25102                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25103         fi
25104
25105         case $cf_item in
25106         (libtool) cf_subdir='obj_lo'  ;;
25107         (normal)  cf_subdir='objects' ;;
25108         (debug)   cf_subdir='obj_g' ;;
25109         (profile) cf_subdir='obj_p' ;;
25110         (shared)
25111                 case $cf_cv_system_name in
25112                 (cygwin|msys)
25113                         cf_subdir='objects' ;;
25114                 (*)
25115                         cf_subdir='obj_s' ;;
25116                 esac
25117         esac
25118
25119                         # Test for case where we build libtinfo with a different name.
25120                         cf_libname=$cf_dir
25121                         if test $cf_dir = ncurses ; then
25122                                 case $cf_subset in
25123                                 (*base*)
25124                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
25125                                         ;;
25126                                 (*termlib*)
25127                                         cf_libname=$TINFO_LIB_SUFFIX
25128                                         ;;
25129                                 (ticlib*)
25130                                         cf_libname=$TICS_LIB_SUFFIX
25131                                         ;;
25132                                 esac
25133                         elif test $cf_dir = c++ ; then
25134                                 cf_libname=ncurses++$USE_LIB_SUFFIX
25135                         else
25136                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
25137                         fi
25138                         if test -n "${USE_ARG_SUFFIX}" ; then
25139                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
25140                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
25141                         fi
25142
25143                         # These dependencies really are for development, not
25144                         # builds, but they are useful in porting, too.
25145                         cf_depend="../include/ncurses_cfg.h"
25146                         if test "$srcdir" = "."; then
25147                                 cf_reldir="."
25148                         else
25149                                 cf_reldir="\${srcdir}"
25150                         fi
25151
25152                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
25153                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
25154                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
25155                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
25156                         fi
25157
25158                         cf_dir_suffix=
25159                         old_cf_suffix="$cf_suffix"
25160                         if test "$cf_cv_shlib_version_infix" = yes ; then
25161                         if test -n "$USE_LIB_SUFFIX" ; then
25162                                 case $USE_LIB_SUFFIX in
25163                                 (tw*)
25164                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
25165                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
25166                                         cf_dir_suffix=tw$EXTRA_SUFFIX
25167                                         ;;
25168                                 (t*)
25169                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
25170                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
25171                                         cf_dir_suffix=t$EXTRA_SUFFIX
25172                                         ;;
25173                                 (w*)
25174                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
25175                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
25176                                         cf_dir_suffix=w$EXTRA_SUFFIX
25177                                         ;;
25178                                 (*)
25179                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
25180                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
25181                                         cf_dir_suffix=$EXTRA_SUFFIX
25182                                         ;;
25183                                 esac
25184                         fi
25185                         fi
25186
25187                         $AWK -f $srcdir/mk-1st.awk \
25188                                 name=${cf_libname}${cf_dir_suffix} \
25189                                 traces=$LIB_TRACING \
25190                                 MODEL=$cf_ITEM \
25191                                 CXX_MODEL=$CXX_MODEL \
25192                                 model=$cf_subdir \
25193                                 prefix=$cf_prefix \
25194                                 suffix=$cf_suffix \
25195                                 subset=$cf_subset \
25196                                 driver=$cf_cv_term_driver \
25197                                 SymLink="$LN_S" \
25198                                 TermlibRoot=$TINFO_NAME \
25199                                 TermlibSuffix=$TINFO_SUFFIX \
25200                                 ShlibVer=$cf_cv_shlib_version \
25201                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
25202                                 ReLink=${cf_cv_do_relink:-no} \
25203                                 DoLinks=$cf_cv_do_symlinks \
25204                                 rmSoLocs=$cf_cv_rm_so_locs \
25205                                 ldconfig="$LDCONFIG" \
25206                                 overwrite=$WITH_OVERWRITE \
25207                                 depend="$cf_depend" \
25208                                 host="$host" \
25209                                 libtool_version="$LIBTOOL_VERSION" \
25210                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25211
25212                         cf_suffix="$old_cf_suffix"
25213
25214                         for cf_subdir2 in $cf_subdirs lib
25215                         do
25216                                 test $cf_subdir = $cf_subdir2 && break
25217                         done
25218                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
25219                         $AWK -f $srcdir/mk-2nd.awk \
25220                                 name=$cf_dir \
25221                                 traces=$LIB_TRACING \
25222                                 MODEL=$cf_ITEM \
25223                                 model=$cf_subdir \
25224                                 subset=$cf_subset \
25225                                 srcdir=$srcdir \
25226                                 echo=$WITH_ECHO \
25227                                 crenames=$cf_cv_prog_CC_c_o \
25228                                 cxxrenames=$cf_cv_prog_CXX_c_o \
25229                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25230                         cf_subdirs="$cf_subdirs $cf_subdir"
25231                         done
25232                 done
25233         fi
25234
25235         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
25236 done
25237
25238 for cf_dir in $SRC_SUBDIRS
25239 do
25240         if test ! -d $srcdir/$cf_dir ; then
25241                 continue
25242         fi
25243
25244         if test -f $cf_dir/Makefile ; then
25245                 case "$cf_dir" in
25246                 (Ada95)
25247                         echo 'libs \' >> Makefile
25248                         echo 'install.libs \' >> Makefile
25249                         echo 'uninstall.libs ::' >> Makefile
25250                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
25251                         ;;
25252                 esac
25253         fi
25254
25255         if test -f $srcdir/$cf_dir/modules; then
25256                 echo >> Makefile
25257                 if test -f $srcdir/$cf_dir/headers; then
25258 cat >> Makefile <<CF_EOF
25259 install.includes \\
25260 uninstall.includes \\
25261 CF_EOF
25262                 fi
25263 if test "$cf_dir" != "c++" ; then
25264 echo 'lint \' >> Makefile
25265 fi
25266 cat >> Makefile <<CF_EOF
25267 libs \\
25268 lintlib \\
25269 install.libs \\
25270 uninstall.libs \\
25271 install.$cf_dir \\
25272 uninstall.$cf_dir ::
25273         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25274 CF_EOF
25275         elif test -f $srcdir/$cf_dir/headers; then
25276 cat >> Makefile <<CF_EOF
25277
25278 libs \\
25279 install.libs \\
25280 uninstall.libs \\
25281 install.includes \\
25282 uninstall.includes ::
25283         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25284 CF_EOF
25285 fi
25286 done
25287
25288 if test "x$cf_with_db_install" = xyes; then
25289 cat >> Makefile <<CF_EOF
25290
25291 install.libs uninstall.libs \\
25292 install.data uninstall.data ::
25293 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25294 CF_EOF
25295 else
25296 cat >> Makefile <<CF_EOF
25297
25298 install.libs uninstall.libs ::
25299         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25300 CF_EOF
25301 fi
25302
25303 if test "x$cf_with_manpages" = xyes; then
25304 cat >> Makefile <<CF_EOF
25305
25306 install.man \\
25307 uninstall.man ::
25308         cd man && \${MAKE} \${TOP_MFLAGS} \$@
25309 CF_EOF
25310 fi
25311
25312 cat >> Makefile <<CF_EOF
25313
25314 distclean ::
25315         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
25316         rm -f headers.sh headers.sed mk_shared_lib.sh
25317         rm -f edit_man.* man_alias.*
25318         rm -rf \${DIRS_TO_MAKE}
25319 CF_EOF
25320
25321 # Special case: tack's manpage lives in its own directory.
25322 if test "x$cf_with_manpages" = xyes; then
25323 if test "x$cf_with_tack" = "xyes"; then
25324 cat >> Makefile <<CF_EOF
25325
25326 install.man \\
25327 uninstall.man ::
25328         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
25329 CF_EOF
25330 fi
25331 fi
25332
25333 rm -f headers.sed headers.sh
25334
25335 echo creating headers.sh
25336 cat >headers.sh <<CF_EOF
25337 #! $SHELL
25338 # This shell script is generated by the 'configure' script.  It is invoked in a
25339 # subdirectory of the build tree.  It generates a sed-script in the parent
25340 # directory that is used to adjust includes for header files that reside in a
25341 # subdirectory of /usr/include, etc.
25342 PRG=""
25343 while test \$# != 3
25344 do
25345 PRG="\$PRG \$1"; shift
25346 done
25347 DST=\$1
25348 REF=\$2
25349 SRC=\$3
25350 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
25351 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
25352 echo installing \$SRC in \$DST
25353 CF_EOF
25354
25355 if test $WITH_CURSES_H = yes; then
25356         cat >>headers.sh <<CF_EOF
25357 case \$DST in
25358 (/*/include/*)
25359         END=\`basename \$DST\`
25360         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25361         do
25362                 NAME=\`basename \$i\`
25363                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25364         done
25365         ;;
25366 (*)
25367         echo "" >> \$TMPSED
25368         ;;
25369 esac
25370 CF_EOF
25371
25372 else
25373         cat >>headers.sh <<CF_EOF
25374 case \$DST in
25375 (/*/include/*)
25376         END=\`basename \$DST\`
25377         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25378         do
25379                 NAME=\`basename \$i\`
25380                 if test "\$NAME" = "curses.h"
25381                 then
25382                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25383                         NAME=ncurses.h
25384                 fi
25385                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25386         done
25387         ;;
25388 (*)
25389         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25390         ;;
25391 esac
25392 CF_EOF
25393 fi
25394 cat >>headers.sh <<CF_EOF
25395 rm -f \$TMPSRC
25396 sed -f \$TMPSED \$SRC > \$TMPSRC
25397 NAME=\`basename \$SRC\`
25398 CF_EOF
25399 if test $WITH_CURSES_H != yes; then
25400         cat >>headers.sh <<CF_EOF
25401 test "\$NAME" = "curses.h" && NAME=ncurses.h
25402 CF_EOF
25403 fi
25404 cat >>headers.sh <<CF_EOF
25405 # Just in case someone gzip'd manpages, remove the conflicting copy.
25406 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25407
25408 eval \$PRG \$TMPSRC \$DST/\$NAME
25409 rm -f \$TMPSRC \$TMPSED
25410 CF_EOF
25411
25412 chmod 0755 headers.sh
25413
25414 for cf_dir in $SRC_SUBDIRS
25415 do
25416         if test ! -d $srcdir/$cf_dir ; then
25417                 continue
25418         fi
25419
25420         if test -f $srcdir/$cf_dir/headers; then
25421                 $AWK -f $srcdir/mk-hdr.awk \
25422                         subset="$LIB_SUBSETS" \
25423                         compat="$WITH_CURSES_H" \
25424                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
25425         fi
25426
25427         if test -f $srcdir/$cf_dir/modules; then
25428                 if test "$cf_dir" != "c++" ; then
25429                         cat >>$cf_dir/Makefile <<"CF_EOF"
25430 depend : ${AUTO_SRC}
25431         makedepend -- ${CPPFLAGS} -- ${C_SRC}
25432
25433 # DO NOT DELETE THIS LINE -- make depend depends on it.
25434 CF_EOF
25435                 fi
25436         fi
25437 done
25438
25439 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25440 if test -z "$USE_OLD_MAKERULES" ; then
25441         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
25442 fi
25443 fi
25444  ;;
25445   esac
25446 done
25447 EOF
25448
25449 cat >>$CONFIG_STATUS <<\EOF
25450
25451 { (exit 0); exit 0; }
25452 EOF
25453 chmod +x $CONFIG_STATUS
25454 ac_clean_files=$ac_clean_files_save
25455
25456 # configure is writing to config.log, and then calls config.status.
25457 # config.status does its own redirection, appending to config.log.
25458 # Unfortunately, on DOS this fails, as config.log is still kept open
25459 # by configure, so config.status won't be able to write to it; its
25460 # output is simply discarded.  So we exec the FD to /dev/null,
25461 # effectively closing config.log, so it can be properly (re)opened and
25462 # appended to by config.status.  When coming back to configure, we
25463 # need to make the FD available again.
25464 if test "$no_create" != yes; then
25465   ac_cs_success=:
25466   exec 5>/dev/null
25467   $SHELL $CONFIG_STATUS || ac_cs_success=false
25468   exec 5>>config.log
25469   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25470   # would make configure fail if this is the last instruction.
25471   $ac_cs_success || { (exit 1); exit 1; }
25472 fi
25473 ${MAKE:-make} preinstall