]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
7c3b0c75e341fb5bad7fbc2b2bd17fefffdc4d00
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.682 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20181006.
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 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME=
188 PACKAGE_TARNAME=
189 PACKAGE_VERSION=
190 PACKAGE_STRING=
191 PACKAGE_BUGREPORT=
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236   | --dataroo | --dataro | --datar)
237     ac_prev=datarootdir ;;
238   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240     datarootdir=$ac_optarg ;;
241
242   -disable-* | --disable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     eval "enable_$ac_feature=no" ;;
250
251   -enable-* | --enable-*)
252     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253     # Reject names that are not valid shell variable names.
254     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256    { (exit 1); exit 1; }; }
257     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258     case $ac_option in
259       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260       *) ac_optarg=yes ;;
261     esac
262     eval "enable_$ac_feature='$ac_optarg'" ;;
263
264   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266   | --exec | --exe | --ex)
267     ac_prev=exec_prefix ;;
268   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270   | --exec=* | --exe=* | --ex=*)
271     exec_prefix=$ac_optarg ;;
272
273   -gas | --gas | --ga | --g)
274     # Obsolete; use --with-gas.
275     with_gas=yes ;;
276
277   -help | --help | --hel | --he | -h)
278     ac_init_help=long ;;
279   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280     ac_init_help=recursive ;;
281   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282     ac_init_help=short ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host_alias ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host_alias=$ac_optarg ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir=$ac_optarg ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir=$ac_optarg ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir=$ac_optarg ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir=$ac_optarg ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir=$ac_optarg ;;
321
322   -runstatedir | --runstatedir | --runstatedi | --runstated \
323   | --runstate | --runstat | --runsta | --runst \
324   | --runs | --run | --ru)
325     ac_prev=runstatedir ;;
326   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328   | --runs=* | --run=* | --ru=*)
329     runstatedir=$ac_optarg ;;
330
331   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332     ac_prev=mandir ;;
333   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334     mandir=$ac_optarg ;;
335
336   -nfp | --nfp | --nf)
337     # Obsolete; use --without-fp.
338     with_fp=no ;;
339
340   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341   | --no-cr | --no-c)
342     no_create=yes ;;
343
344   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346     no_recursion=yes ;;
347
348   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350   | --oldin | --oldi | --old | --ol | --o)
351     ac_prev=oldincludedir ;;
352   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355     oldincludedir=$ac_optarg ;;
356
357   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358     ac_prev=prefix ;;
359   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360     prefix=$ac_optarg ;;
361
362   -program-prefix | --program-prefix | --program-prefi | --program-pref \
363   | --program-pre | --program-pr | --program-p)
364     ac_prev=program_prefix ;;
365   -program-prefix=* | --program-prefix=* | --program-prefi=* \
366   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367     program_prefix=$ac_optarg ;;
368
369   -program-suffix | --program-suffix | --program-suffi | --program-suff \
370   | --program-suf | --program-su | --program-s)
371     ac_prev=program_suffix ;;
372   -program-suffix=* | --program-suffix=* | --program-suffi=* \
373   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374     program_suffix=$ac_optarg ;;
375
376   -program-transform-name | --program-transform-name \
377   | --program-transform-nam | --program-transform-na \
378   | --program-transform-n | --program-transform- \
379   | --program-transform | --program-transfor \
380   | --program-transfo | --program-transf \
381   | --program-trans | --program-tran \
382   | --progr-tra | --program-tr | --program-t)
383     ac_prev=program_transform_name ;;
384   -program-transform-name=* | --program-transform-name=* \
385   | --program-transform-nam=* | --program-transform-na=* \
386   | --program-transform-n=* | --program-transform-=* \
387   | --program-transform=* | --program-transfor=* \
388   | --program-transfo=* | --program-transf=* \
389   | --program-trans=* | --program-tran=* \
390   | --progr-tra=* | --program-tr=* | --program-t=*)
391     program_transform_name=$ac_optarg ;;
392
393   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394   | -silent | --silent | --silen | --sile | --sil)
395     silent=yes ;;
396
397   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398     ac_prev=sbindir ;;
399   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400   | --sbi=* | --sb=*)
401     sbindir=$ac_optarg ;;
402
403   -sharedstatedir | --sharedstatedir | --sharedstatedi \
404   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405   | --sharedst | --shareds | --shared | --share | --shar \
406   | --sha | --sh)
407     ac_prev=sharedstatedir ;;
408   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411   | --sha=* | --sh=*)
412     sharedstatedir=$ac_optarg ;;
413
414   -site | --site | --sit)
415     ac_prev=site ;;
416   -site=* | --site=* | --sit=*)
417     site=$ac_optarg ;;
418
419   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420     ac_prev=srcdir ;;
421   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422     srcdir=$ac_optarg ;;
423
424   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425   | --syscon | --sysco | --sysc | --sys | --sy)
426     ac_prev=sysconfdir ;;
427   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429     sysconfdir=$ac_optarg ;;
430
431   -target | --target | --targe | --targ | --tar | --ta | --t)
432     ac_prev=target_alias ;;
433   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434     target_alias=$ac_optarg ;;
435
436   -v | -verbose | --verbose | --verbos | --verbo | --verb)
437     verbose=yes ;;
438
439   -version | --version | --versio | --versi | --vers | -V)
440     ac_init_version=: ;;
441
442   -with-* | --with-*)
443     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444     # Reject names that are not valid shell variable names.
445     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446       { echo "$as_me: error: invalid package name: $ac_package" >&2
447    { (exit 1); exit 1; }; }
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case $ac_option in
450       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_$ac_package='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457     # Reject names that are not valid shell variable names.
458     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459       { echo "$as_me: error: invalid package name: $ac_package" >&2
460    { (exit 1); exit 1; }; }
461     ac_package=`echo $ac_package | sed 's/-/_/g'`
462     eval "with_$ac_package=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes=$ac_optarg ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries=$ac_optarg ;;
481
482   -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484    { (exit 1); exit 1; }; }
485     ;;
486
487   *=*)
488     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489     # Reject names that are not valid shell variable names.
490     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492    { (exit 1); exit 1; }; }
493     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494     eval "$ac_envvar='$ac_optarg'"
495     export $ac_envvar ;;
496
497   *)
498     # FIXME: should be removed in autoconf 3.0.
499     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503     ;;
504
505   esac
506 done
507
508 if test -n "$ac_prev"; then
509   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510   { echo "$as_me: error: missing argument to $ac_option" >&2
511    { (exit 1); exit 1; }; }
512 fi
513
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
516 do
517   eval ac_val=$`echo $ac_var`
518   case $ac_val in
519     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521    { (exit 1); exit 1; }; };;
522   esac
523 done
524
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527               localstatedir libdir includedir oldincludedir infodir mandir
528 do
529   eval ac_val=$`echo $ac_var`
530   case $ac_val in
531     [\\/$]* | ?:[\\/]* ) ;;
532     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533    { (exit 1); exit 1; }; };;
534   esac
535 done
536
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
539 build=$build_alias
540 host=$host_alias
541 target=$target_alias
542
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545   if test "x$build_alias" = x; then
546     cross_compiling=maybe
547     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548     If a cross compiler is detected then cross compile mode will be used." >&2
549   elif test "x$build_alias" != "x$host_alias"; then
550     cross_compiling=yes
551   fi
552 fi
553
554 ac_tool_prefix=
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557 test "$silent" = yes && exec 6>/dev/null
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576    { (exit 1); exit 1; }; }
577   else
578     { echo "$as_me: error: cannot find sources in $srcdir" >&2
579    { (exit 1); exit 1; }; }
580   fi
581 fi
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
596 ac_env_CC_value=$CC
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
615 ac_env_CXX_set=${CXX+set}
616 ac_env_CXX_value=$CXX
617 ac_cv_env_CXX_set=${CXX+set}
618 ac_cv_env_CXX_value=$CXX
619 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620 ac_env_CXXFLAGS_value=$CXXFLAGS
621 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623 ac_env_CXXCPP_set=${CXXCPP+set}
624 ac_env_CXXCPP_value=$CXXCPP
625 ac_cv_env_CXXCPP_set=${CXXCPP+set}
626 ac_cv_env_CXXCPP_value=$CXXCPP
627
628 #
629 # Report the --help message.
630 #
631 if test "$ac_init_help" = "long"; then
632   # Omit some internal or obsolete options to make the list less imposing.
633   # This message is too long to be a string in the A/UX 3.1 sh.
634   cat <<EOF
635 \`configure' configures this package to adapt to many kinds of systems.
636
637 Usage: $0 [OPTION]... [VAR=VALUE]...
638
639 To assign environment variables (e.g., CC, CFLAGS...), specify them as
640 VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642 Defaults for the options are specified in brackets.
643
644 Configuration:
645   -h, --help              display this help and exit
646       --help=short        display options specific to this package
647       --help=recursive    display the short help of all the included packages
648   -V, --version           display version information and exit
649   -q, --quiet, --silent   do not print \`checking...' messages
650       --cache-file=FILE   cache test results in FILE [disabled]
651   -C, --config-cache      alias for \`--cache-file=config.cache'
652   -n, --no-create         do not create output files
653       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655 EOF
656
657   cat <<EOF
658 Installation directories:
659   --prefix=PREFIX         install architecture-independent files in PREFIX
660                           [$ac_default_prefix]
661   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                           [PREFIX]
663
664 By default, \`make install' will install all the files in
665 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667 for instance \`--prefix=\$HOME'.
668
669 For better control, use the options below.
670
671 Fine tuning of the installation directories:
672   --bindir=DIR            user executables [EPREFIX/bin]
673   --sbindir=DIR           system admin executables [EPREFIX/sbin]
674   --libexecdir=DIR        program executables [EPREFIX/libexec]
675   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681   --libdir=DIR            object code libraries [EPREFIX/lib]
682   --includedir=DIR        C header files [PREFIX/include]
683   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684   --infodir=DIR           info documentation [DATAROOTDIR/info]
685   --mandir=DIR            man documentation [DATAROOTDIR/man]
686 EOF
687
688   cat <<\EOF
689
690 Program names:
691   --program-prefix=PREFIX            prepend PREFIX to installed program names
692   --program-suffix=SUFFIX            append SUFFIX to installed program names
693   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695 System types:
696   --build=BUILD           configure for building on BUILD [guessed]
697   --host=HOST       build programs to run on HOST [BUILD]
698   --target=TARGET   configure for building compilers for TARGET [HOST]
699 EOF
700 fi
701
702 if test -n "$ac_init_help"; then
703
704   cat <<\EOF
705
706 Optional Packages:
707   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710 Optional Features:
711   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714   --with-rel-version=XXX  override derived release version
715   --with-abi-version=XXX  override derived ABI version
716   --with-system-type=XXX  test: override derived host system-type
717   --without-ada           suppress check for Ada95, don't build demo
718   --without-cxx           do not adjust ncurses bool to match C++
719   --without-cxx-binding   do not build C++ binding and demo
720   --disable-db-install    suppress install of terminal database
721   --without-manpages      suppress install of manpages
722   --without-progs         suppress build/install with programs (e.g., tic)
723   --without-tack          suppress build/install with tack program
724   --without-tests         suppress build/install with test-programs
725   --without-curses-h      install curses.h as ncurses.h only
726   --with-config-suffix=X  suffixes ncursesXX-config file
727   --with-pkg-config{=path} enable/disable use of pkg-config
728   --with-pkg-config-libdir=XXX use given directory for installing pc-files
729   --enable-pc-files       generate and install .pc files for pkg-config
730   --with-pc-suffix        suffixes pc-files
731   --enable-mixed-case     tic should assume mixed-case filenames
732   --with-install-prefix   prefixes actual install-location ($DESTDIR)
733 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740 Options to Specify the Libraries Built/Used:
741   --disable-libtool-version  enable to use libtool's incompatible naming scheme
742   --with-libtool          generate libraries with libtool
743   --with-shared           generate shared-libraries
744   --with-normal           generate normal-libraries (default)
745   --with-debug            generate debug-libraries (default)
746   --with-profile          generate profile-libraries
747   --with-cxx-shared       generate C++ shared-libraries
748   --with-lib-prefix       override library-prefix
749   --with-termlib          generate separate terminfo library
750   --with-ticlib           generate separate tic library
751   --enable-rpath          use rpath option when generating shared libraries
752   --disable-relink        relink shared libraries during install
753   --with-shlib-version=X  Specify rel or abi version for shared libs
754   --with-libtool-opts=XXX specify additional libtool options
755   --with-export-syms=XXX  limit exported symbols using libtool
756   --with-versioned-syms=X markup versioned symbols using ld
757   --with-gpm              use Alessandro Rubini's GPM library
758   --without-dlsym         do not use dlsym() to load GPM dynamically
759   --with-pcre2            use PCRE2 for regular-expressions
760   --with-sysmouse         use sysmouse (FreeBSD console)
761   --disable-lib-suffixes  disable library suffixes
762   --disable-rpath-hack    don't add rpath options for additional libraries
763 Fine-Tuning Your Configuration:
764   --with-extra-suffix=X   append extra suffix to header/library paths
765   --disable-overwrite     put headers in subdir, omit link to -lcurses
766   --disable-database      do not use terminfo, only fallbacks/termcap
767   --with-database=XXX     specify terminfo source to install
768   --with-hashed-db        specify hashed-database library
769   --with-fallbacks=XXX    specify list of fallback terminal descriptions
770   --without-xterm-new     specify if xterm terminfo should be old version
771   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
772   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
773   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
774   --disable-big-core      assume machine has little memory
775   --disable-big-strings   assume compiler has only standard-size strings
776   --enable-termcap        compile in termcap fallback support
777   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
778   --enable-getcap         fast termcap load, no xrefs to terminfo
779   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
780   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
781   --disable-root-environ  restrict environment when running as root
782   --enable-symlinks       make tic use symbolic links not hard links
783   --enable-broken_linker  compile with broken-linker support code
784   --enable-bsdpad         recognize BSD-style prefix padding
785   --enable-widec          compile with wide-char/UTF-8 code
786   --disable-lp64          allow chtype to be long (ignore _LP64)
787   --disable-largefile     omit support for large files
788   --disable-tparm-varargs compile tparm() without varargs interface
789   --disable-tic-depends   link tic library without explicit dependency on ncurses library
790   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
791   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
792   --with-bool=TYPE        override fallback type of bool variable
793   --with-caps=alt         compile with alternate Caps file
794   --with-chtype=TYPE      override type of chtype
795   --with-ospeed=TYPE      override type of ospeed variable
796   --with-mmask-t=TYPE     override type of mmask_t
797   --with-ccharw-max=XXX   override size CCHARW_MAX
798   --enable-signed-char    compile using signed Boolean's in term.h
799   --with-tparm-arg=TYPE   override parameter type of tparm
800   --with-rcs-ids          compile-in RCS identifiers
801 Options to Specify How Manpages are Installed:
802   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
803                           optionally formatted/catonly, e.g., gzip,formatted
804   --with-manpage-renames  specify manpage-renaming
805   --with-manpage-aliases  specify manpage-aliases using .so
806   --with-manpage-symlinks specify manpage-aliases using symlinks
807   --with-manpage-tbl      specify manpage processing with tbl
808 Extensions:
809   --disable-ext-funcs     disable function-extensions
810   --enable-sp-funcs       enable SCREEN-extensions
811   --enable-term-driver    enable terminal-driver
812   --enable-const          compile with extra/non-standard const
813   --enable-ext-colors     compile for 256-color support
814   --enable-ext-mouse      compile for extended mouse-encoding
815   --enable-ext-putwin     compile with extended putwin/screendump
816   --enable-no-padding     compile with $NCURSES_NO_PADDING code
817   --enable-sigwinch       compile with SIGWINCH handler
818   --enable-tcap-names     compile with user-definable terminal capabilities
819 Reentrant Code:
820   --with-pthread          use POSIX thread library
821   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
822   --enable-weak-symbols   enable weak-symbols for pthreads
823   --enable-reentrant      compile with reentrant code
824   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
825   --enable-opaque-form    make form-library structures "opaque"
826   --enable-opaque-menu    make menu-library structures "opaque"
827   --enable-opaque-panel   make panel-library structures "opaque"
828   --with-wrap-prefix=XXX  override prefix used for public variables
829 Development Code:
830   --without-develop       disable development options
831   --enable-hard-tabs      compile with hard-tabs code
832   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
833 Experimental Code:
834   --disable-assumed-color do not assume anything about default-colors
835   --disable-hashmap       compile without hashmap scrolling-optimization
836   --enable-colorfgbg      compile-in experimental $COLORFGBG code
837   --enable-interop        compile-in interop bindings
838   --enable-safe-sprintf   compile with experimental safe-sprintf code
839   --disable-scroll-hints  compile without scroll-hints code
840   --enable-wgetch-events  compile with wgetch-events code
841 Testing/development Options:
842   --disable-echo          do not display "compiling" commands
843   --disable-stripping     do not strip (debug info) installed executables
844   --enable-warnings       build: turn on GCC compiler warnings
845   --enable-string-hacks   work around bogus compiler/loader warnings
846   --enable-assertions     test: turn on generation of assertion code
847   --with-dmalloc          test: use Gray Watson's dmalloc library
848   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
849   --with-valgrind         test: use valgrind
850   --disable-leaks         test: free permanent memory, analyze leaks
851   --enable-expanded       test: generate functions for certain macros
852   --disable-macros        test: use functions rather than macros
853   --with-trace            test: add trace() function to all models of ncurses
854   --disable-gnat-projects test: disable GNAT projects even if usable
855 Ada95 Binding Options:
856   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
857   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
858   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
859   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
860
861 Some influential environment variables:
862   CC          C compiler command
863   CFLAGS      C compiler flags
864   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
865               nonstandard directory <lib dir>
866   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
867               headers in a nonstandard directory <include dir>
868   CPP         C preprocessor
869   CXX         C++ compiler command
870   CXXFLAGS    C++ compiler flags
871   CXXCPP      C++ preprocessor
872
873 Use these variables to override the choices made by `configure' or to help
874 it to find libraries and programs with nonstandard names/locations.
875
876 EOF
877 fi
878
879 if test "$ac_init_help" = "recursive"; then
880   # If there are subdirs, report their specific --help.
881   ac_popdir=`pwd`
882   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
883     cd $ac_subdir
884     # A "../" for each directory in /$ac_subdir.
885     ac_dots=`echo $ac_subdir |
886              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
887
888     case $srcdir in
889     .) # No --srcdir option.  We are building in place.
890       ac_sub_srcdir=$srcdir ;;
891     [\\/]* | ?:[\\/]* ) # Absolute path.
892       ac_sub_srcdir=$srcdir/$ac_subdir ;;
893     *) # Relative path.
894       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
895     esac
896
897     # Check for guested configure; otherwise get Cygnus style configure.
898     if test -f $ac_sub_srcdir/configure.gnu; then
899       echo
900       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
901     elif test -f $ac_sub_srcdir/configure; then
902       echo
903       $SHELL $ac_sub_srcdir/configure  --help=recursive
904     elif test -f $ac_sub_srcdir/configure.ac ||
905            test -f $ac_sub_srcdir/configure.in; then
906       echo
907       $ac_configure --help
908     else
909       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
910     fi
911     cd $ac_popdir
912   done
913 fi
914
915 test -n "$ac_init_help" && exit 0
916 if $ac_init_version; then
917   cat <<\EOF
918
919 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
920 Free Software Foundation, Inc.
921 This configure script is free software; the Free Software Foundation
922 gives unlimited permission to copy, distribute and modify it.
923 EOF
924   exit 0
925 fi
926 exec 5>config.log
927 cat >&5 <<EOF
928 This file contains any messages produced by compilers while
929 running configure, to aid debugging if configure makes a mistake.
930
931 It was created by $as_me, which was
932 generated by GNU Autoconf 2.52.20181006.  Invocation command line was
933
934   $ $0 $@
935
936 EOF
937 {
938 cat <<_ASUNAME
939 ## ---------- ##
940 ## Platform.  ##
941 ## ---------- ##
942
943 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
944 uname -m = `(uname -m) 2>/dev/null || echo unknown`
945 uname -r = `(uname -r) 2>/dev/null || echo unknown`
946 uname -s = `(uname -s) 2>/dev/null || echo unknown`
947 uname -v = `(uname -v) 2>/dev/null || echo unknown`
948
949 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
950 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
951
952 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
953 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
954 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
955 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
956 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
957 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
958 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
959
960 PATH = $PATH
961
962 _ASUNAME
963 } >&5
964
965 cat >&5 <<EOF
966 ## ------------ ##
967 ## Core tests.  ##
968 ## ------------ ##
969
970 EOF
971
972 # Keep a trace of the command line.
973 # Strip out --no-create and --no-recursion so they do not pile up.
974 # Also quote any args containing shell meta-characters.
975 ac_configure_args=
976 ac_sep=
977 for ac_arg
978 do
979   case $ac_arg in
980   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
981   | --no-cr | --no-c) ;;
982   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
983   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
984   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
985     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
986     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
987     ac_sep=" " ;;
988   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
989      ac_sep=" " ;;
990   esac
991   # Get rid of the leading space.
992 done
993
994 # When interrupted or exit'd, cleanup temporary files, and complete
995 # config.log.  We remove comments because anyway the quotes in there
996 # would cause problems or look ugly.
997 trap 'exit_status=$?
998   # Save into config.log some information that might help in debugging.
999   echo >&5
1000   echo "## ----------------- ##" >&5
1001   echo "## Cache variables.  ##" >&5
1002   echo "## ----------------- ##" >&5
1003   echo >&5
1004   # The following way of writing the cache mishandles newlines in values,
1005 {
1006   (set) 2>&1 |
1007     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1008     *ac_space=\ *)
1009       sed -n \
1010         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1011           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1012       ;;
1013     *)
1014       sed -n \
1015         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1016       ;;
1017     esac;
1018 } >&5
1019   sed "/^$/d" confdefs.h >conftest.log
1020   if test -s conftest.log; then
1021     echo >&5
1022     echo "## ------------ ##" >&5
1023     echo "## confdefs.h.  ##" >&5
1024     echo "## ------------ ##" >&5
1025     echo >&5
1026     cat conftest.log >&5
1027   fi
1028   (echo; echo) >&5
1029   test "$ac_signal" != 0 &&
1030     echo "$as_me: caught signal $ac_signal" >&5
1031   echo "$as_me: exit $exit_status" >&5
1032   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1033     exit $exit_status
1034      ' 0
1035 for ac_signal in 1 2 13 15; do
1036   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1037 done
1038 ac_signal=0
1039
1040 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1041 rm -rf conftest* confdefs.h
1042 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1043 echo >confdefs.h
1044
1045 # Let the site file select an alternate cache file if it wants to.
1046 # Prefer explicitly selected file to automatically selected ones.
1047 if test -z "$CONFIG_SITE"; then
1048   if test "x$prefix" != xNONE; then
1049     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1050   else
1051     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1052   fi
1053 fi
1054 for ac_site_file in $CONFIG_SITE; do
1055   if test -r "$ac_site_file"; then
1056     { echo "$as_me:1056: loading site script $ac_site_file" >&5
1057 echo "$as_me: loading site script $ac_site_file" >&6;}
1058     cat "$ac_site_file" >&5
1059     . "$ac_site_file"
1060   fi
1061 done
1062
1063 if test -r "$cache_file"; then
1064   # Some versions of bash will fail to source /dev/null (special
1065   # files actually), so we avoid doing that.
1066   if test -f "$cache_file"; then
1067     { echo "$as_me:1067: loading cache $cache_file" >&5
1068 echo "$as_me: loading cache $cache_file" >&6;}
1069     case $cache_file in
1070       [\\/]* | ?:[\\/]* ) . $cache_file;;
1071       *)                      . ./$cache_file;;
1072     esac
1073   fi
1074 else
1075   { echo "$as_me:1075: creating cache $cache_file" >&5
1076 echo "$as_me: creating cache $cache_file" >&6;}
1077   >$cache_file
1078 fi
1079
1080 # Check that the precious variables saved in the cache have kept the same
1081 # value.
1082 ac_cache_corrupted=false
1083 for ac_var in `(set) 2>&1 |
1084                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1085   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1086   eval ac_new_set=\$ac_env_${ac_var}_set
1087   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1088   eval ac_new_val="\$ac_env_${ac_var}_value"
1089   case $ac_old_set,$ac_new_set in
1090     set,)
1091       { echo "$as_me:1091: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1092 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1093       ac_cache_corrupted=: ;;
1094     ,set)
1095       { echo "$as_me:1095: error: \`$ac_var' was not set in the previous run" >&5
1096 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1097       ac_cache_corrupted=: ;;
1098     ,);;
1099     *)
1100       if test "x$ac_old_val" != "x$ac_new_val"; then
1101         { echo "$as_me:1101: error: \`$ac_var' has changed since the previous run:" >&5
1102 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1103         { echo "$as_me:1103:   former value:  $ac_old_val" >&5
1104 echo "$as_me:   former value:  $ac_old_val" >&2;}
1105         { echo "$as_me:1105:   current value: $ac_new_val" >&5
1106 echo "$as_me:   current value: $ac_new_val" >&2;}
1107         ac_cache_corrupted=:
1108       fi;;
1109   esac
1110   # Pass precious variables to config.status.  It doesn't matter if
1111   # we pass some twice (in addition to the command line arguments).
1112   if test "$ac_new_set" = set; then
1113     case $ac_new_val in
1114     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1115       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1116       ac_configure_args="$ac_configure_args '$ac_arg'"
1117       ;;
1118     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1119        ;;
1120     esac
1121   fi
1122 done
1123 if $ac_cache_corrupted; then
1124   { echo "$as_me:1124: error: changes in the environment can compromise the build" >&5
1125 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1126   { { echo "$as_me:1126: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1127 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1128    { (exit 1); exit 1; }; }
1129 fi
1130
1131 ac_ext=c
1132 ac_cpp='$CPP $CPPFLAGS'
1133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1136 ac_main_return=return
1137
1138 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1139   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1140                    ECHO_T='     ' ;;
1141   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1142   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1143 esac
1144 echo "#! $SHELL" >conftest.sh
1145 echo  "exit 0"   >>conftest.sh
1146 chmod +x conftest.sh
1147 if { (echo "$as_me:1147: PATH=\".;.\"; conftest.sh") >&5
1148   (PATH=".;."; conftest.sh) 2>&5
1149   ac_status=$?
1150   echo "$as_me:1150: \$? = $ac_status" >&5
1151   (exit $ac_status); }; then
1152   ac_path_separator=';'
1153 else
1154   ac_path_separator=:
1155 fi
1156 PATH_SEPARATOR="$ac_path_separator"
1157 rm -f conftest.sh
1158
1159 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1160
1161 top_builddir=`pwd`
1162
1163 echo "$as_me:1163: checking for egrep" >&5
1164 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1165 if test "${ac_cv_prog_egrep+set}" = set; then
1166   echo $ECHO_N "(cached) $ECHO_C" >&6
1167 else
1168   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1169                 then ac_cv_prog_egrep='grep -E'
1170                 else ac_cv_prog_egrep='egrep'
1171         fi
1172 fi
1173 echo "$as_me:1173: result: $ac_cv_prog_egrep" >&5
1174 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1175         EGREP=$ac_cv_prog_egrep
1176
1177         test -z "$EGREP" && { { echo "$as_me:1177: error: No egrep program found" >&5
1178 echo "$as_me: error: No egrep program found" >&2;}
1179    { (exit 1); exit 1; }; }
1180
1181 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1182 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1183 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1184 cf_cv_abi_version=${NCURSES_MAJOR}
1185 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1186 cf_cv_timestamp=`date`
1187 echo "$as_me:1187: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1188 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1189
1190 if test -f $srcdir/VERSION ; then
1191         echo "$as_me:1191: checking for package version" >&5
1192 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1193
1194         # if there are not enough fields, cut returns the last one...
1195         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1196         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1197         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1198
1199         # this is how CF_BUNDLED_INTL uses $VERSION:
1200         VERSION="$cf_field1"
1201
1202         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1203         test -z "$VERSION_MAJOR" && { { echo "$as_me:1203: error: missing major-version" >&5
1204 echo "$as_me: error: missing major-version" >&2;}
1205    { (exit 1); exit 1; }; }
1206
1207         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1208         test -z "$VERSION_MINOR" && { { echo "$as_me:1208: error: missing minor-version" >&5
1209 echo "$as_me: error: missing minor-version" >&2;}
1210    { (exit 1); exit 1; }; }
1211
1212         echo "$as_me:1212: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1213 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1214
1215         echo "$as_me:1215: checking for package patch date" >&5
1216 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1217         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1218         case .$VERSION_PATCH in
1219         (.)
1220                 { { echo "$as_me:1220: error: missing patch-date $VERSION_PATCH" >&5
1221 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1222    { (exit 1); exit 1; }; }
1223                 ;;
1224         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1225                 ;;
1226         (*)
1227                 { { echo "$as_me:1227: error: illegal patch-date $VERSION_PATCH" >&5
1228 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1229    { (exit 1); exit 1; }; }
1230                 ;;
1231         esac
1232         echo "$as_me:1232: result: $VERSION_PATCH" >&5
1233 echo "${ECHO_T}$VERSION_PATCH" >&6
1234 else
1235         { { echo "$as_me:1235: error: did not find $srcdir/VERSION" >&5
1236 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1237    { (exit 1); exit 1; }; }
1238 fi
1239
1240 # show the actual data that we have for versions:
1241 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1242
1243 echo "${as_me:-configure}:1243: testing ABI VERSION $VERSION ..." 1>&5
1244
1245 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1246
1247 echo "${as_me:-configure}:1247: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1248
1249 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1250
1251 echo "${as_me:-configure}:1251: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1252
1253 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1254
1255 echo "${as_me:-configure}:1255: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1256
1257         cf_PACKAGE=NCURSES
1258         PACKAGE=ncurses
1259
1260 cat >>confdefs.h <<EOF
1261 #define PACKAGE "$PACKAGE"
1262 EOF
1263
1264 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1265
1266         cat >>confdefs.h <<EOF
1267 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1268 EOF
1269
1270         cat >>confdefs.h <<EOF
1271 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1272 EOF
1273
1274 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1275
1276 # Check whether --with-rel-version or --without-rel-version was given.
1277 if test "${with_rel_version+set}" = set; then
1278   withval="$with_rel_version"
1279   { echo "$as_me:1279: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1280 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1281  cf_cv_rel_version=$withval
1282 fi;
1283
1284  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1285  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1286
1287 if test -n "$NCURSES_MAJOR" ; then
1288   case $NCURSES_MAJOR in
1289   ([0-9]*)
1290         ;;
1291   (*)
1292         { { echo "$as_me:1292: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1293 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1294    { (exit 1); exit 1; }; }
1295         ;;
1296   esac
1297 else
1298   { { echo "$as_me:1298: error: Release major-version value is empty" >&5
1299 echo "$as_me: error: Release major-version value is empty" >&2;}
1300    { (exit 1); exit 1; }; }
1301 fi
1302
1303 if test -n "$NCURSES_MINOR" ; then
1304   case $NCURSES_MINOR in
1305   ([0-9]*)
1306         ;;
1307   (*)
1308         { { echo "$as_me:1308: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1309 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1310    { (exit 1); exit 1; }; }
1311         ;;
1312   esac
1313 else
1314   { { echo "$as_me:1314: error: Release minor-version value is empty" >&5
1315 echo "$as_me: error: Release minor-version value is empty" >&2;}
1316    { (exit 1); exit 1; }; }
1317 fi
1318
1319 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1320
1321 # Check whether --with-abi-version or --without-abi-version was given.
1322 if test "${with_abi_version+set}" = set; then
1323   withval="$with_abi_version"
1324
1325         if test "x$cf_cv_abi_version" != "x$withval"
1326         then
1327                 { echo "$as_me:1327: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1328 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1329                 case $cf_cv_rel_version in
1330                 (5.*)
1331                         cf_cv_rel_version=$withval.0
1332                         ;;
1333                 (6.*)
1334                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1335                         ;;
1336                 esac
1337         fi
1338         cf_cv_abi_version=$withval
1339 fi;
1340
1341 if test -n "$cf_cv_abi_version" ; then
1342   case $cf_cv_abi_version in
1343   ([0-9]*)
1344         ;;
1345   (*)
1346         { { echo "$as_me:1346: error: ABI version is not a number: $cf_cv_abi_version" >&5
1347 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1348    { (exit 1); exit 1; }; }
1349         ;;
1350   esac
1351 else
1352   { { echo "$as_me:1352: error: ABI version value is empty" >&5
1353 echo "$as_me: error: ABI version value is empty" >&2;}
1354    { (exit 1); exit 1; }; }
1355 fi
1356
1357 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1358 then
1359         case $cf_cv_rel_version in
1360         (5.*)
1361                 cf_cv_rel_version=$with_abi_version.0
1362                 ;;
1363         esac
1364 fi
1365
1366 ac_aux_dir=
1367 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1368   if test -f $ac_dir/install-sh; then
1369     ac_aux_dir=$ac_dir
1370     ac_install_sh="$ac_aux_dir/install-sh -c"
1371     break
1372   elif test -f $ac_dir/install.sh; then
1373     ac_aux_dir=$ac_dir
1374     ac_install_sh="$ac_aux_dir/install.sh -c"
1375     break
1376   elif test -f $ac_dir/shtool; then
1377     ac_aux_dir=$ac_dir
1378     ac_install_sh="$ac_aux_dir/shtool install -c"
1379     break
1380   fi
1381 done
1382 if test -z "$ac_aux_dir"; then
1383   { { echo "$as_me:1383: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1384 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1385    { (exit 1); exit 1; }; }
1386 fi
1387 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1388 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1389 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1390
1391 # Make sure we can run config.sub.
1392 $ac_config_sub sun4 >/dev/null 2>&1 ||
1393   { { echo "$as_me:1393: error: cannot run $ac_config_sub" >&5
1394 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1395    { (exit 1); exit 1; }; }
1396
1397 echo "$as_me:1397: checking build system type" >&5
1398 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1399 if test "${ac_cv_build+set}" = set; then
1400   echo $ECHO_N "(cached) $ECHO_C" >&6
1401 else
1402   ac_cv_build_alias=$build_alias
1403 test -z "$ac_cv_build_alias" &&
1404   ac_cv_build_alias=`$ac_config_guess`
1405 test -z "$ac_cv_build_alias" &&
1406   { { echo "$as_me:1406: error: cannot guess build type; you must specify one" >&5
1407 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1408    { (exit 1); exit 1; }; }
1409 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1410   { { echo "$as_me:1410: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1411 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1412    { (exit 1); exit 1; }; }
1413
1414 fi
1415 echo "$as_me:1415: result: $ac_cv_build" >&5
1416 echo "${ECHO_T}$ac_cv_build" >&6
1417 build=$ac_cv_build
1418 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1419 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1420 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1421
1422 echo "$as_me:1422: checking host system type" >&5
1423 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1424 if test "${ac_cv_host+set}" = set; then
1425   echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427   ac_cv_host_alias=$host_alias
1428 test -z "$ac_cv_host_alias" &&
1429   ac_cv_host_alias=$ac_cv_build_alias
1430 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1431   { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1432 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1433    { (exit 1); exit 1; }; }
1434
1435 fi
1436 echo "$as_me:1436: result: $ac_cv_host" >&5
1437 echo "${ECHO_T}$ac_cv_host" >&6
1438 host=$ac_cv_host
1439 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1444         echo "$as_me:1444: checking target system type" >&5
1445 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1446 if test "${ac_cv_target+set}" = set; then
1447   echo $ECHO_N "(cached) $ECHO_C" >&6
1448 else
1449   ac_cv_target_alias=$target_alias
1450 test "x$ac_cv_target_alias" = "x" &&
1451   ac_cv_target_alias=$ac_cv_host_alias
1452 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1453   { { echo "$as_me:1453: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1454 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1455    { (exit 1); exit 1; }; }
1456
1457 fi
1458 echo "$as_me:1458: result: $ac_cv_target" >&5
1459 echo "${ECHO_T}$ac_cv_target" >&6
1460 target=$ac_cv_target
1461 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1462 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1463 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1464
1465 # The aliases save the names the user supplied, while $host etc.
1466 # will get canonicalized.
1467 test -n "$target_alias" &&
1468   test "$program_prefix$program_suffix$program_transform_name" = \
1469     NONENONEs,x,x, &&
1470   program_prefix=${target_alias}-
1471         system_name="$host_os"
1472 else
1473         system_name="`(uname -s -r) 2>/dev/null`"
1474         if test -z "$system_name" ; then
1475                 system_name="`(hostname) 2>/dev/null`"
1476         fi
1477 fi
1478 test -n "$system_name" &&
1479 cat >>confdefs.h <<EOF
1480 #define SYSTEM_NAME "$system_name"
1481 EOF
1482
1483 if test "${cf_cv_system_name+set}" = set; then
1484   echo $ECHO_N "(cached) $ECHO_C" >&6
1485 else
1486   cf_cv_system_name="$system_name"
1487 fi
1488
1489 test -z "$system_name" && system_name="$cf_cv_system_name"
1490 test -n "$cf_cv_system_name" && echo "$as_me:1490: result: Configuring for $cf_cv_system_name" >&5
1491 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1492
1493 if test ".$system_name" != ".$cf_cv_system_name" ; then
1494         echo "$as_me:1494: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1495 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1496         { { echo "$as_me:1496: error: \"Please remove config.cache and try again.\"" >&5
1497 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1498    { (exit 1); exit 1; }; }
1499 fi
1500
1501 # Check whether --with-system-type or --without-system-type was given.
1502 if test "${with_system_type+set}" = set; then
1503   withval="$with_system_type"
1504   { echo "$as_me:1504: WARNING: overriding system type to $withval" >&5
1505 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1506         cf_cv_system_name=$withval
1507         host_os=$withval
1508
1509 fi;
1510
1511 ###     Save the given $CFLAGS to allow user-override.
1512 cf_user_CFLAGS="$CFLAGS"
1513
1514 ###     Default install-location
1515
1516 echo "$as_me:1516: checking for prefix" >&5
1517 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1518 if test "x$prefix" = "xNONE" ; then
1519         case "$cf_cv_system_name" in
1520                 # non-vendor systems don't have a conflict
1521         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1522                 prefix=/usr
1523                 ;;
1524         (*)     prefix=$ac_default_prefix
1525                 ;;
1526         esac
1527 fi
1528 echo "$as_me:1528: result: $prefix" >&5
1529 echo "${ECHO_T}$prefix" >&6
1530
1531 if test "x$prefix" = "xNONE" ; then
1532 echo "$as_me:1532: checking for default include-directory" >&5
1533 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1534 test -n "$verbose" && echo 1>&6
1535 for cf_symbol in \
1536         $includedir \
1537         $includedir/ncurses \
1538         $prefix/include \
1539         $prefix/include/ncurses \
1540         /usr/local/include \
1541         /usr/local/include/ncurses \
1542         /usr/include \
1543         /usr/include/ncurses
1544 do
1545         cf_dir=`eval echo $cf_symbol`
1546         if test -f $cf_dir/curses.h ; then
1547         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1548                 includedir="$cf_symbol"
1549                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1550                 break
1551         fi
1552         fi
1553         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1554 done
1555 echo "$as_me:1555: result: $includedir" >&5
1556 echo "${ECHO_T}$includedir" >&6
1557 fi
1558
1559 ### Defaults for ncurses ABI
1560
1561 case x$cf_cv_abi_version in
1562 (x[6789])
1563         cf_dft_ext_colors=yes
1564         cf_dft_ext_const=yes
1565         cf_dft_ext_mouse=yes
1566         cf_dft_ext_putwin=yes
1567         cf_dft_ext_spfuncs=yes
1568         cf_dft_filter_syms=yes
1569         cf_dft_chtype=uint32_t
1570         cf_dft_mmask_t=uint32_t
1571         cf_dft_interop=yes
1572         cf_dft_tparm_arg=intptr_t
1573         cf_dft_with_lp64=yes
1574         ;;
1575 (*)
1576         cf_dft_ext_colors=no
1577         cf_dft_ext_const=no
1578         cf_dft_ext_mouse=no
1579         cf_dft_ext_putwin=no
1580         cf_dft_ext_spfuncs=no
1581         cf_dft_filter_syms=no
1582         cf_dft_chtype=auto
1583         cf_dft_mmask_t=auto
1584         cf_dft_interop=no
1585         cf_dft_tparm_arg=long
1586         cf_dft_with_lp64=no
1587         ;;
1588 esac
1589
1590 ###     Checks for programs.
1591
1592 # Check whether --with-ada or --without-ada was given.
1593 if test "${with_ada+set}" = set; then
1594   withval="$with_ada"
1595   cf_with_ada=$withval
1596 else
1597   cf_with_ada=yes
1598 fi;
1599
1600 if test "x$cf_with_ada" = xyes
1601 then
1602         cf_prog_cc="gnatgcc gcc cc"
1603 else
1604         cf_prog_cc="gcc cc"
1605 fi
1606
1607 ac_ext=c
1608 ac_cpp='$CPP $CPPFLAGS'
1609 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1610 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1611 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1612 ac_main_return=return
1613 if test -n "$ac_tool_prefix"; then
1614   for ac_prog in $cf_prog_cc
1615   do
1616     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1617 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1618 echo "$as_me:1618: checking for $ac_word" >&5
1619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1620 if test "${ac_cv_prog_CC+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if test -n "$CC"; then
1624   ac_cv_prog_CC="$CC" # Let the user override the test.
1625 else
1626   ac_save_IFS=$IFS; IFS=$ac_path_separator
1627 ac_dummy="$PATH"
1628 for ac_dir in $ac_dummy; do
1629   IFS=$ac_save_IFS
1630   test -z "$ac_dir" && ac_dir=.
1631   $as_executable_p "$ac_dir/$ac_word" || continue
1632 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1633 echo "$as_me:1633: found $ac_dir/$ac_word" >&5
1634 break
1635 done
1636
1637 fi
1638 fi
1639 CC=$ac_cv_prog_CC
1640 if test -n "$CC"; then
1641   echo "$as_me:1641: result: $CC" >&5
1642 echo "${ECHO_T}$CC" >&6
1643 else
1644   echo "$as_me:1644: result: no" >&5
1645 echo "${ECHO_T}no" >&6
1646 fi
1647
1648     test -n "$CC" && break
1649   done
1650 fi
1651 if test -z "$CC"; then
1652   ac_ct_CC=$CC
1653   for ac_prog in $cf_prog_cc
1654 do
1655   # Extract the first word of "$ac_prog", so it can be a program name with args.
1656 set dummy $ac_prog; ac_word=$2
1657 echo "$as_me:1657: checking for $ac_word" >&5
1658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1659 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1660   echo $ECHO_N "(cached) $ECHO_C" >&6
1661 else
1662   if test -n "$ac_ct_CC"; then
1663   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1664 else
1665   ac_save_IFS=$IFS; IFS=$ac_path_separator
1666 ac_dummy="$PATH"
1667 for ac_dir in $ac_dummy; do
1668   IFS=$ac_save_IFS
1669   test -z "$ac_dir" && ac_dir=.
1670   $as_executable_p "$ac_dir/$ac_word" || continue
1671 ac_cv_prog_ac_ct_CC="$ac_prog"
1672 echo "$as_me:1672: found $ac_dir/$ac_word" >&5
1673 break
1674 done
1675
1676 fi
1677 fi
1678 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1679 if test -n "$ac_ct_CC"; then
1680   echo "$as_me:1680: result: $ac_ct_CC" >&5
1681 echo "${ECHO_T}$ac_ct_CC" >&6
1682 else
1683   echo "$as_me:1683: result: no" >&5
1684 echo "${ECHO_T}no" >&6
1685 fi
1686
1687   test -n "$ac_ct_CC" && break
1688 done
1689
1690   CC=$ac_ct_CC
1691 fi
1692
1693 test -z "$CC" && { { echo "$as_me:1693: error: no acceptable cc found in \$PATH" >&5
1694 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1695    { (exit 1); exit 1; }; }
1696
1697 # Provide some information about the compiler.
1698 echo "$as_me:1698:" \
1699      "checking for C compiler version" >&5
1700 ac_compiler=`set X $ac_compile; echo $2`
1701 { (eval echo "$as_me:1701: \"$ac_compiler --version </dev/null >&5\"") >&5
1702   (eval $ac_compiler --version </dev/null >&5) 2>&5
1703   ac_status=$?
1704   echo "$as_me:1704: \$? = $ac_status" >&5
1705   (exit $ac_status); }
1706 { (eval echo "$as_me:1706: \"$ac_compiler -v </dev/null >&5\"") >&5
1707   (eval $ac_compiler -v </dev/null >&5) 2>&5
1708   ac_status=$?
1709   echo "$as_me:1709: \$? = $ac_status" >&5
1710   (exit $ac_status); }
1711 { (eval echo "$as_me:1711: \"$ac_compiler -V </dev/null >&5\"") >&5
1712   (eval $ac_compiler -V </dev/null >&5) 2>&5
1713   ac_status=$?
1714   echo "$as_me:1714: \$? = $ac_status" >&5
1715   (exit $ac_status); }
1716
1717 cat >conftest.$ac_ext <<_ACEOF
1718 #line 1718 "configure"
1719 #include "confdefs.h"
1720
1721 int
1722 main (void)
1723 {
1724
1725   ;
1726   return 0;
1727 }
1728 _ACEOF
1729 ac_clean_files_save=$ac_clean_files
1730 ac_clean_files="$ac_clean_files a.out a.exe"
1731 # Try to create an executable without -o first, disregard a.out.
1732 # It will help us diagnose broken compilers, and finding out an intuition
1733 # of exeext.
1734 echo "$as_me:1734: checking for C compiler default output" >&5
1735 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1736 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1737 if { (eval echo "$as_me:1737: \"$ac_link_default\"") >&5
1738   (eval $ac_link_default) 2>&5
1739   ac_status=$?
1740   echo "$as_me:1740: \$? = $ac_status" >&5
1741   (exit $ac_status); }; then
1742   # Find the output, starting from the most likely.  This scheme is
1743 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1744 # resort.
1745 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1746                 ls a.out conftest 2>/dev/null;
1747                 ls a.* conftest.* 2>/dev/null`; do
1748   case $ac_file in
1749     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1750     a.out ) # We found the default executable, but exeext='' is most
1751             # certainly right.
1752             break;;
1753     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1754           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1755           export ac_cv_exeext
1756           break;;
1757     * ) break;;
1758   esac
1759 done
1760 else
1761   echo "$as_me: failed program was:" >&5
1762 cat conftest.$ac_ext >&5
1763 { { echo "$as_me:1763: error: C compiler cannot create executables" >&5
1764 echo "$as_me: error: C compiler cannot create executables" >&2;}
1765    { (exit 77); exit 77; }; }
1766 fi
1767
1768 ac_exeext=$ac_cv_exeext
1769 echo "$as_me:1769: result: $ac_file" >&5
1770 echo "${ECHO_T}$ac_file" >&6
1771
1772 # Check the compiler produces executables we can run.  If not, either
1773 # the compiler is broken, or we cross compile.
1774 echo "$as_me:1774: checking whether the C compiler works" >&5
1775 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1776 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1777 # If not cross compiling, check that we can run a simple program.
1778 if test "$cross_compiling" != yes; then
1779   if { ac_try='./$ac_file'
1780   { (eval echo "$as_me:1780: \"$ac_try\"") >&5
1781   (eval $ac_try) 2>&5
1782   ac_status=$?
1783   echo "$as_me:1783: \$? = $ac_status" >&5
1784   (exit $ac_status); }; }; then
1785     cross_compiling=no
1786   else
1787     if test "$cross_compiling" = maybe; then
1788         cross_compiling=yes
1789     else
1790         { { echo "$as_me:1790: error: cannot run C compiled programs.
1791 If you meant to cross compile, use \`--host'." >&5
1792 echo "$as_me: error: cannot run C compiled programs.
1793 If you meant to cross compile, use \`--host'." >&2;}
1794    { (exit 1); exit 1; }; }
1795     fi
1796   fi
1797 fi
1798 echo "$as_me:1798: result: yes" >&5
1799 echo "${ECHO_T}yes" >&6
1800
1801 rm -f a.out a.exe conftest$ac_cv_exeext
1802 ac_clean_files=$ac_clean_files_save
1803 # Check the compiler produces executables we can run.  If not, either
1804 # the compiler is broken, or we cross compile.
1805 echo "$as_me:1805: checking whether we are cross compiling" >&5
1806 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1807 echo "$as_me:1807: result: $cross_compiling" >&5
1808 echo "${ECHO_T}$cross_compiling" >&6
1809
1810 echo "$as_me:1810: checking for executable suffix" >&5
1811 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1812 if { (eval echo "$as_me:1812: \"$ac_link\"") >&5
1813   (eval $ac_link) 2>&5
1814   ac_status=$?
1815   echo "$as_me:1815: \$? = $ac_status" >&5
1816   (exit $ac_status); }; then
1817   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1818 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1819 # work properly (i.e., refer to `conftest.exe'), while it won't with
1820 # `rm'.
1821 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1822   case $ac_file in
1823     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1824     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1825           export ac_cv_exeext
1826           break;;
1827     * ) break;;
1828   esac
1829 done
1830 else
1831   { { echo "$as_me:1831: error: cannot compute EXEEXT: cannot compile and link" >&5
1832 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1833    { (exit 1); exit 1; }; }
1834 fi
1835
1836 rm -f conftest$ac_cv_exeext
1837 echo "$as_me:1837: result: $ac_cv_exeext" >&5
1838 echo "${ECHO_T}$ac_cv_exeext" >&6
1839
1840 rm -f conftest.$ac_ext
1841 EXEEXT=$ac_cv_exeext
1842 ac_exeext=$EXEEXT
1843 echo "$as_me:1843: checking for object suffix" >&5
1844 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1845 if test "${ac_cv_objext+set}" = set; then
1846   echo $ECHO_N "(cached) $ECHO_C" >&6
1847 else
1848   cat >conftest.$ac_ext <<_ACEOF
1849 #line 1849 "configure"
1850 #include "confdefs.h"
1851
1852 int
1853 main (void)
1854 {
1855
1856   ;
1857   return 0;
1858 }
1859 _ACEOF
1860 rm -f conftest.o conftest.obj
1861 if { (eval echo "$as_me:1861: \"$ac_compile\"") >&5
1862   (eval $ac_compile) 2>&5
1863   ac_status=$?
1864   echo "$as_me:1864: \$? = $ac_status" >&5
1865   (exit $ac_status); }; then
1866   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1867   case $ac_file in
1868     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1869     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1870        break;;
1871   esac
1872 done
1873 else
1874   echo "$as_me: failed program was:" >&5
1875 cat conftest.$ac_ext >&5
1876 { { echo "$as_me:1876: error: cannot compute OBJEXT: cannot compile" >&5
1877 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1878    { (exit 1); exit 1; }; }
1879 fi
1880
1881 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1882 fi
1883 echo "$as_me:1883: result: $ac_cv_objext" >&5
1884 echo "${ECHO_T}$ac_cv_objext" >&6
1885 OBJEXT=$ac_cv_objext
1886 ac_objext=$OBJEXT
1887 echo "$as_me:1887: checking whether we are using the GNU C compiler" >&5
1888 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1889 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1890   echo $ECHO_N "(cached) $ECHO_C" >&6
1891 else
1892   cat >conftest.$ac_ext <<_ACEOF
1893 #line 1893 "configure"
1894 #include "confdefs.h"
1895
1896 int
1897 main (void)
1898 {
1899 #ifndef __GNUC__
1900        choke me
1901 #endif
1902
1903   ;
1904   return 0;
1905 }
1906 _ACEOF
1907 rm -f conftest.$ac_objext
1908 if { (eval echo "$as_me:1908: \"$ac_compile\"") >&5
1909   (eval $ac_compile) 2>&5
1910   ac_status=$?
1911   echo "$as_me:1911: \$? = $ac_status" >&5
1912   (exit $ac_status); } &&
1913          { ac_try='test -s conftest.$ac_objext'
1914   { (eval echo "$as_me:1914: \"$ac_try\"") >&5
1915   (eval $ac_try) 2>&5
1916   ac_status=$?
1917   echo "$as_me:1917: \$? = $ac_status" >&5
1918   (exit $ac_status); }; }; then
1919   ac_compiler_gnu=yes
1920 else
1921   echo "$as_me: failed program was:" >&5
1922 cat conftest.$ac_ext >&5
1923 ac_compiler_gnu=no
1924 fi
1925 rm -f conftest.$ac_objext conftest.$ac_ext
1926 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1927
1928 fi
1929 echo "$as_me:1929: result: $ac_cv_c_compiler_gnu" >&5
1930 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1931 GCC=`test $ac_compiler_gnu = yes && echo yes`
1932 ac_test_CFLAGS=${CFLAGS+set}
1933 ac_save_CFLAGS=$CFLAGS
1934 CFLAGS="-g"
1935 echo "$as_me:1935: checking whether $CC accepts -g" >&5
1936 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1937 if test "${ac_cv_prog_cc_g+set}" = set; then
1938   echo $ECHO_N "(cached) $ECHO_C" >&6
1939 else
1940   cat >conftest.$ac_ext <<_ACEOF
1941 #line 1941 "configure"
1942 #include "confdefs.h"
1943
1944 int
1945 main (void)
1946 {
1947
1948   ;
1949   return 0;
1950 }
1951 _ACEOF
1952 rm -f conftest.$ac_objext
1953 if { (eval echo "$as_me:1953: \"$ac_compile\"") >&5
1954   (eval $ac_compile) 2>&5
1955   ac_status=$?
1956   echo "$as_me:1956: \$? = $ac_status" >&5
1957   (exit $ac_status); } &&
1958          { ac_try='test -s conftest.$ac_objext'
1959   { (eval echo "$as_me:1959: \"$ac_try\"") >&5
1960   (eval $ac_try) 2>&5
1961   ac_status=$?
1962   echo "$as_me:1962: \$? = $ac_status" >&5
1963   (exit $ac_status); }; }; then
1964   ac_cv_prog_cc_g=yes
1965 else
1966   echo "$as_me: failed program was:" >&5
1967 cat conftest.$ac_ext >&5
1968 ac_cv_prog_cc_g=no
1969 fi
1970 rm -f conftest.$ac_objext conftest.$ac_ext
1971 fi
1972 echo "$as_me:1972: result: $ac_cv_prog_cc_g" >&5
1973 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1974 if test "$ac_test_CFLAGS" = set; then
1975   CFLAGS=$ac_save_CFLAGS
1976 elif test $ac_cv_prog_cc_g = yes; then
1977   if test "$GCC" = yes; then
1978     CFLAGS="-g -O2"
1979   else
1980     CFLAGS="-g"
1981   fi
1982 else
1983   if test "$GCC" = yes; then
1984     CFLAGS="-O2"
1985   else
1986     CFLAGS=
1987   fi
1988 fi
1989 # Some people use a C++ compiler to compile C.  Since we use `exit',
1990 # in C++ we need to declare it.  In case someone uses the same compiler
1991 # for both compiling C and C++ we need to have the C++ compiler decide
1992 # the declaration of exit, since it's the most demanding environment.
1993 cat >conftest.$ac_ext <<_ACEOF
1994 #ifndef __cplusplus
1995   choke me
1996 #endif
1997 _ACEOF
1998 rm -f conftest.$ac_objext
1999 if { (eval echo "$as_me:1999: \"$ac_compile\"") >&5
2000   (eval $ac_compile) 2>&5
2001   ac_status=$?
2002   echo "$as_me:2002: \$? = $ac_status" >&5
2003   (exit $ac_status); } &&
2004          { ac_try='test -s conftest.$ac_objext'
2005   { (eval echo "$as_me:2005: \"$ac_try\"") >&5
2006   (eval $ac_try) 2>&5
2007   ac_status=$?
2008   echo "$as_me:2008: \$? = $ac_status" >&5
2009   (exit $ac_status); }; }; then
2010   for ac_declaration in \
2011    ''\
2012    '#include <stdlib.h>' \
2013    'extern "C" void std::exit (int) throw (); using std::exit;' \
2014    'extern "C" void std::exit (int); using std::exit;' \
2015    'extern "C" void exit (int) throw ();' \
2016    'extern "C" void exit (int);' \
2017    'void exit (int);'
2018 do
2019   cat >conftest.$ac_ext <<_ACEOF
2020 #line 2020 "configure"
2021 #include "confdefs.h"
2022 #include <stdlib.h>
2023 $ac_declaration
2024 int
2025 main (void)
2026 {
2027 exit (42);
2028   ;
2029   return 0;
2030 }
2031 _ACEOF
2032 rm -f conftest.$ac_objext
2033 if { (eval echo "$as_me:2033: \"$ac_compile\"") >&5
2034   (eval $ac_compile) 2>&5
2035   ac_status=$?
2036   echo "$as_me:2036: \$? = $ac_status" >&5
2037   (exit $ac_status); } &&
2038          { ac_try='test -s conftest.$ac_objext'
2039   { (eval echo "$as_me:2039: \"$ac_try\"") >&5
2040   (eval $ac_try) 2>&5
2041   ac_status=$?
2042   echo "$as_me:2042: \$? = $ac_status" >&5
2043   (exit $ac_status); }; }; then
2044   :
2045 else
2046   echo "$as_me: failed program was:" >&5
2047 cat conftest.$ac_ext >&5
2048 continue
2049 fi
2050 rm -f conftest.$ac_objext conftest.$ac_ext
2051   cat >conftest.$ac_ext <<_ACEOF
2052 #line 2052 "configure"
2053 #include "confdefs.h"
2054 $ac_declaration
2055 int
2056 main (void)
2057 {
2058 exit (42);
2059   ;
2060   return 0;
2061 }
2062 _ACEOF
2063 rm -f conftest.$ac_objext
2064 if { (eval echo "$as_me:2064: \"$ac_compile\"") >&5
2065   (eval $ac_compile) 2>&5
2066   ac_status=$?
2067   echo "$as_me:2067: \$? = $ac_status" >&5
2068   (exit $ac_status); } &&
2069          { ac_try='test -s conftest.$ac_objext'
2070   { (eval echo "$as_me:2070: \"$ac_try\"") >&5
2071   (eval $ac_try) 2>&5
2072   ac_status=$?
2073   echo "$as_me:2073: \$? = $ac_status" >&5
2074   (exit $ac_status); }; }; then
2075   break
2076 else
2077   echo "$as_me: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 fi
2080 rm -f conftest.$ac_objext conftest.$ac_ext
2081 done
2082 rm -rf conftest*
2083 if test -n "$ac_declaration"; then
2084   echo '#ifdef __cplusplus' >>confdefs.h
2085   echo $ac_declaration      >>confdefs.h
2086   echo '#endif'             >>confdefs.h
2087 fi
2088
2089 else
2090   echo "$as_me: failed program was:" >&5
2091 cat conftest.$ac_ext >&5
2092 fi
2093 rm -f conftest.$ac_objext conftest.$ac_ext
2094 ac_ext=c
2095 ac_cpp='$CPP $CPPFLAGS'
2096 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2097 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2098 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2099 ac_main_return=return
2100
2101 GCC_VERSION=none
2102 if test "$GCC" = yes ; then
2103         echo "$as_me:2103: checking version of $CC" >&5
2104 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2105         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.].*//'`"
2106         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2107         echo "$as_me:2107: result: $GCC_VERSION" >&5
2108 echo "${ECHO_T}$GCC_VERSION" >&6
2109 fi
2110
2111 echo "$as_me:2111: checking for $CC option to accept ANSI C" >&5
2112 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2113 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2114   echo $ECHO_N "(cached) $ECHO_C" >&6
2115 else
2116   ac_cv_prog_cc_stdc=no
2117 ac_save_CC=$CC
2118 cat >conftest.$ac_ext <<_ACEOF
2119 #line 2119 "configure"
2120 #include "confdefs.h"
2121 #include <stdarg.h>
2122 #include <stdio.h>
2123 #include <sys/types.h>
2124 #include <sys/stat.h>
2125 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2126 struct buf { int x; };
2127 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2128 static char *e (p, i)
2129      char **p;
2130      int i;
2131 {
2132   return p[i];
2133 }
2134 static char *f (char * (*g) (char **, int), char **p, ...)
2135 {
2136   char *s;
2137   va_list v;
2138   va_start (v,p);
2139   s = g (p, va_arg (v,int));
2140   va_end (v);
2141   return s;
2142 }
2143 int test (int i, double x);
2144 struct s1 {int (*f) (int a);};
2145 struct s2 {int (*f) (double a);};
2146 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2147 int argc;
2148 char **argv;
2149 int
2150 main (void)
2151 {
2152 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2153   ;
2154   return 0;
2155 }
2156 _ACEOF
2157 # Don't try gcc -ansi; that turns off useful extensions and
2158 # breaks some systems' header files.
2159 # AIX                   -qlanglvl=ansi
2160 # Ultrix and OSF/1      -std1
2161 # HP-UX 10.20 and later -Ae
2162 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2163 # SVR4                  -Xc -D__EXTENSIONS__
2164 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2165 do
2166   CC="$ac_save_CC $ac_arg"
2167   rm -f conftest.$ac_objext
2168 if { (eval echo "$as_me:2168: \"$ac_compile\"") >&5
2169   (eval $ac_compile) 2>&5
2170   ac_status=$?
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit $ac_status); } &&
2173          { ac_try='test -s conftest.$ac_objext'
2174   { (eval echo "$as_me:2174: \"$ac_try\"") >&5
2175   (eval $ac_try) 2>&5
2176   ac_status=$?
2177   echo "$as_me:2177: \$? = $ac_status" >&5
2178   (exit $ac_status); }; }; then
2179   ac_cv_prog_cc_stdc=$ac_arg
2180 break
2181 else
2182   echo "$as_me: failed program was:" >&5
2183 cat conftest.$ac_ext >&5
2184 fi
2185 rm -f conftest.$ac_objext
2186 done
2187 rm -f conftest.$ac_ext conftest.$ac_objext
2188 CC=$ac_save_CC
2189
2190 fi
2191
2192 case "x$ac_cv_prog_cc_stdc" in
2193   x|xno)
2194     echo "$as_me:2194: result: none needed" >&5
2195 echo "${ECHO_T}none needed" >&6 ;;
2196   *)
2197     echo "$as_me:2197: result: $ac_cv_prog_cc_stdc" >&5
2198 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2199     CC="$CC $ac_cv_prog_cc_stdc" ;;
2200 esac
2201
2202 # This should have been defined by AC_PROG_CC
2203 : ${CC:=cc}
2204
2205 echo "$as_me:2205: checking \$CFLAGS variable" >&5
2206 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2207 case "x$CFLAGS" in
2208 (*-[IUD]*)
2209         echo "$as_me:2209: result: broken" >&5
2210 echo "${ECHO_T}broken" >&6
2211         { echo "$as_me:2211: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2212 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2213         cf_flags="$CFLAGS"
2214         CFLAGS=
2215         for cf_arg in $cf_flags
2216         do
2217
2218 cf_fix_cppflags=no
2219 cf_new_cflags=
2220 cf_new_cppflags=
2221 cf_new_extra_cppflags=
2222
2223 for cf_add_cflags in $cf_arg
2224 do
2225 case $cf_fix_cppflags in
2226 (no)
2227         case $cf_add_cflags in
2228         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2229                 case $cf_add_cflags in
2230                 (-D*)
2231                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2232
2233                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2234                                 && test -z "${cf_tst_cflags}" \
2235                                 && cf_fix_cppflags=yes
2236
2237                         if test $cf_fix_cppflags = yes ; then
2238
2239         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2240         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2241
2242                                 continue
2243                         elif test "${cf_tst_cflags}" = "\"'" ; then
2244
2245         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2246         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2247
2248                                 continue
2249                         fi
2250                         ;;
2251                 esac
2252                 case "$CPPFLAGS" in
2253                 (*$cf_add_cflags)
2254                         ;;
2255                 (*)
2256                         case $cf_add_cflags in
2257                         (-D*)
2258                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2259
2260 CPPFLAGS=`echo "$CPPFLAGS" | \
2261         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2262                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2263
2264                                 ;;
2265                         esac
2266
2267         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2268         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2269
2270                         ;;
2271                 esac
2272                 ;;
2273         (*)
2274
2275         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2276         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2277
2278                 ;;
2279         esac
2280         ;;
2281 (yes)
2282
2283         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2284         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2285
2286         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2287
2288         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2289                 && test -z "${cf_tst_cflags}" \
2290                 && cf_fix_cppflags=no
2291         ;;
2292 esac
2293 done
2294
2295 if test -n "$cf_new_cflags" ; then
2296
2297         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2298         CFLAGS="${CFLAGS}$cf_new_cflags"
2299
2300 fi
2301
2302 if test -n "$cf_new_cppflags" ; then
2303
2304         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2305         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2306
2307 fi
2308
2309 if test -n "$cf_new_extra_cppflags" ; then
2310
2311         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2312         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2313
2314 fi
2315
2316         done
2317         ;;
2318 (*)
2319         echo "$as_me:2319: result: ok" >&5
2320 echo "${ECHO_T}ok" >&6
2321         ;;
2322 esac
2323
2324 echo "$as_me:2324: checking \$CC variable" >&5
2325 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2326 case "$CC" in
2327 (*[\ \  ]-*)
2328         echo "$as_me:2328: result: broken" >&5
2329 echo "${ECHO_T}broken" >&6
2330         { echo "$as_me:2330: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2331 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2332         # humor him...
2333         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2334         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2335         CC="$cf_prog"
2336         for cf_arg in $cf_flags
2337         do
2338                 case "x$cf_arg" in
2339                 (x-[IUDfgOW]*)
2340
2341 cf_fix_cppflags=no
2342 cf_new_cflags=
2343 cf_new_cppflags=
2344 cf_new_extra_cppflags=
2345
2346 for cf_add_cflags in $cf_arg
2347 do
2348 case $cf_fix_cppflags in
2349 (no)
2350         case $cf_add_cflags in
2351         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2352                 case $cf_add_cflags in
2353                 (-D*)
2354                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2355
2356                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2357                                 && test -z "${cf_tst_cflags}" \
2358                                 && cf_fix_cppflags=yes
2359
2360                         if test $cf_fix_cppflags = yes ; then
2361
2362         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2363         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2364
2365                                 continue
2366                         elif test "${cf_tst_cflags}" = "\"'" ; then
2367
2368         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2369         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2370
2371                                 continue
2372                         fi
2373                         ;;
2374                 esac
2375                 case "$CPPFLAGS" in
2376                 (*$cf_add_cflags)
2377                         ;;
2378                 (*)
2379                         case $cf_add_cflags in
2380                         (-D*)
2381                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2382
2383 CPPFLAGS=`echo "$CPPFLAGS" | \
2384         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2385                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2386
2387                                 ;;
2388                         esac
2389
2390         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2391         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2392
2393                         ;;
2394                 esac
2395                 ;;
2396         (*)
2397
2398         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2399         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2400
2401                 ;;
2402         esac
2403         ;;
2404 (yes)
2405
2406         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2407         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2408
2409         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2410
2411         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2412                 && test -z "${cf_tst_cflags}" \
2413                 && cf_fix_cppflags=no
2414         ;;
2415 esac
2416 done
2417
2418 if test -n "$cf_new_cflags" ; then
2419
2420         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2421         CFLAGS="${CFLAGS}$cf_new_cflags"
2422
2423 fi
2424
2425 if test -n "$cf_new_cppflags" ; then
2426
2427         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2428         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2429
2430 fi
2431
2432 if test -n "$cf_new_extra_cppflags" ; then
2433
2434         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2435         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2436
2437 fi
2438
2439                         ;;
2440                 (*)
2441                         CC="$CC $cf_arg"
2442                         ;;
2443                 esac
2444         done
2445         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2446
2447 echo "${as_me:-configure}:2447: testing resulting CC: '$CC' ..." 1>&5
2448
2449         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2450
2451 echo "${as_me:-configure}:2451: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2452
2453         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2454
2455 echo "${as_me:-configure}:2455: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2456
2457         ;;
2458 (*)
2459         echo "$as_me:2459: result: ok" >&5
2460 echo "${ECHO_T}ok" >&6
2461         ;;
2462 esac
2463
2464 ac_ext=c
2465 ac_cpp='$CPP $CPPFLAGS'
2466 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2467 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2468 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2469 ac_main_return=return
2470 echo "$as_me:2470: checking how to run the C preprocessor" >&5
2471 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2472 # On Suns, sometimes $CPP names a directory.
2473 if test -n "$CPP" && test -d "$CPP"; then
2474   CPP=
2475 fi
2476 if test -z "$CPP"; then
2477   if test "${ac_cv_prog_CPP+set}" = set; then
2478   echo $ECHO_N "(cached) $ECHO_C" >&6
2479 else
2480       # Double quotes because CPP needs to be expanded
2481     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2482     do
2483       ac_preproc_ok=false
2484 for ac_c_preproc_warn_flag in '' yes
2485 do
2486   # Use a header file that comes with gcc, so configuring glibc
2487   # with a fresh cross-compiler works.
2488   # On the NeXT, cc -E runs the code through the compiler's parser,
2489   # not just through cpp. "Syntax error" is here to catch this case.
2490   cat >conftest.$ac_ext <<_ACEOF
2491 #line 2491 "configure"
2492 #include "confdefs.h"
2493 #include <assert.h>
2494                      Syntax error
2495 _ACEOF
2496 if { (eval echo "$as_me:2496: \"$ac_cpp conftest.$ac_ext\"") >&5
2497   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2498   ac_status=$?
2499   egrep -v '^ *\+' conftest.er1 >conftest.err
2500   rm -f conftest.er1
2501   cat conftest.err >&5
2502   echo "$as_me:2502: \$? = $ac_status" >&5
2503   (exit $ac_status); } >/dev/null; then
2504   if test -s conftest.err; then
2505     ac_cpp_err=$ac_c_preproc_warn_flag
2506   else
2507     ac_cpp_err=
2508   fi
2509 else
2510   ac_cpp_err=yes
2511 fi
2512 if test -z "$ac_cpp_err"; then
2513   :
2514 else
2515   echo "$as_me: failed program was:" >&5
2516   cat conftest.$ac_ext >&5
2517   # Broken: fails on valid input.
2518 continue
2519 fi
2520 rm -f conftest.err conftest.$ac_ext
2521
2522   # OK, works on sane cases.  Now check whether non-existent headers
2523   # can be detected and how.
2524   cat >conftest.$ac_ext <<_ACEOF
2525 #line 2525 "configure"
2526 #include "confdefs.h"
2527 #include <ac_nonexistent.h>
2528 _ACEOF
2529 if { (eval echo "$as_me:2529: \"$ac_cpp conftest.$ac_ext\"") >&5
2530   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2531   ac_status=$?
2532   egrep -v '^ *\+' conftest.er1 >conftest.err
2533   rm -f conftest.er1
2534   cat conftest.err >&5
2535   echo "$as_me:2535: \$? = $ac_status" >&5
2536   (exit $ac_status); } >/dev/null; then
2537   if test -s conftest.err; then
2538     ac_cpp_err=$ac_c_preproc_warn_flag
2539   else
2540     ac_cpp_err=
2541   fi
2542 else
2543   ac_cpp_err=yes
2544 fi
2545 if test -z "$ac_cpp_err"; then
2546   # Broken: success on invalid input.
2547 continue
2548 else
2549   echo "$as_me: failed program was:" >&5
2550   cat conftest.$ac_ext >&5
2551   # Passes both tests.
2552 ac_preproc_ok=:
2553 break
2554 fi
2555 rm -f conftest.err conftest.$ac_ext
2556
2557 done
2558 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2559 rm -f conftest.err conftest.$ac_ext
2560 if $ac_preproc_ok; then
2561   break
2562 fi
2563
2564     done
2565     ac_cv_prog_CPP=$CPP
2566
2567 fi
2568   CPP=$ac_cv_prog_CPP
2569 else
2570   ac_cv_prog_CPP=$CPP
2571 fi
2572 echo "$as_me:2572: result: $CPP" >&5
2573 echo "${ECHO_T}$CPP" >&6
2574 ac_preproc_ok=false
2575 for ac_c_preproc_warn_flag in '' yes
2576 do
2577   # Use a header file that comes with gcc, so configuring glibc
2578   # with a fresh cross-compiler works.
2579   # On the NeXT, cc -E runs the code through the compiler's parser,
2580   # not just through cpp. "Syntax error" is here to catch this case.
2581   cat >conftest.$ac_ext <<_ACEOF
2582 #line 2582 "configure"
2583 #include "confdefs.h"
2584 #include <assert.h>
2585                      Syntax error
2586 _ACEOF
2587 if { (eval echo "$as_me:2587: \"$ac_cpp conftest.$ac_ext\"") >&5
2588   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2589   ac_status=$?
2590   egrep -v '^ *\+' conftest.er1 >conftest.err
2591   rm -f conftest.er1
2592   cat conftest.err >&5
2593   echo "$as_me:2593: \$? = $ac_status" >&5
2594   (exit $ac_status); } >/dev/null; then
2595   if test -s conftest.err; then
2596     ac_cpp_err=$ac_c_preproc_warn_flag
2597   else
2598     ac_cpp_err=
2599   fi
2600 else
2601   ac_cpp_err=yes
2602 fi
2603 if test -z "$ac_cpp_err"; then
2604   :
2605 else
2606   echo "$as_me: failed program was:" >&5
2607   cat conftest.$ac_ext >&5
2608   # Broken: fails on valid input.
2609 continue
2610 fi
2611 rm -f conftest.err conftest.$ac_ext
2612
2613   # OK, works on sane cases.  Now check whether non-existent headers
2614   # can be detected and how.
2615   cat >conftest.$ac_ext <<_ACEOF
2616 #line 2616 "configure"
2617 #include "confdefs.h"
2618 #include <ac_nonexistent.h>
2619 _ACEOF
2620 if { (eval echo "$as_me:2620: \"$ac_cpp conftest.$ac_ext\"") >&5
2621   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2622   ac_status=$?
2623   egrep -v '^ *\+' conftest.er1 >conftest.err
2624   rm -f conftest.er1
2625   cat conftest.err >&5
2626   echo "$as_me:2626: \$? = $ac_status" >&5
2627   (exit $ac_status); } >/dev/null; then
2628   if test -s conftest.err; then
2629     ac_cpp_err=$ac_c_preproc_warn_flag
2630   else
2631     ac_cpp_err=
2632   fi
2633 else
2634   ac_cpp_err=yes
2635 fi
2636 if test -z "$ac_cpp_err"; then
2637   # Broken: success on invalid input.
2638 continue
2639 else
2640   echo "$as_me: failed program was:" >&5
2641   cat conftest.$ac_ext >&5
2642   # Passes both tests.
2643 ac_preproc_ok=:
2644 break
2645 fi
2646 rm -f conftest.err conftest.$ac_ext
2647
2648 done
2649 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2650 rm -f conftest.err conftest.$ac_ext
2651 if $ac_preproc_ok; then
2652   :
2653 else
2654   { { echo "$as_me:2654: error: C preprocessor \"$CPP\" fails sanity check" >&5
2655 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2656    { (exit 1); exit 1; }; }
2657 fi
2658
2659 ac_ext=c
2660 ac_cpp='$CPP $CPPFLAGS'
2661 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2662 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2663 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2664 ac_main_return=return
2665
2666 if test $ac_cv_c_compiler_gnu = yes; then
2667     echo "$as_me:2667: checking whether $CC needs -traditional" >&5
2668 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2669 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2670   echo $ECHO_N "(cached) $ECHO_C" >&6
2671 else
2672     ac_pattern="Autoconf.*'x'"
2673   cat >conftest.$ac_ext <<_ACEOF
2674 #line 2674 "configure"
2675 #include "confdefs.h"
2676 #include <sgtty.h>
2677 int Autoconf = TIOCGETP;
2678 _ACEOF
2679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2680   egrep "$ac_pattern" >/dev/null 2>&1; then
2681   ac_cv_prog_gcc_traditional=yes
2682 else
2683   ac_cv_prog_gcc_traditional=no
2684 fi
2685 rm -rf conftest*
2686
2687   if test $ac_cv_prog_gcc_traditional = no; then
2688     cat >conftest.$ac_ext <<_ACEOF
2689 #line 2689 "configure"
2690 #include "confdefs.h"
2691 #include <termio.h>
2692 int Autoconf = TCGETA;
2693 _ACEOF
2694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2695   egrep "$ac_pattern" >/dev/null 2>&1; then
2696   ac_cv_prog_gcc_traditional=yes
2697 fi
2698 rm -rf conftest*
2699
2700   fi
2701 fi
2702 echo "$as_me:2702: result: $ac_cv_prog_gcc_traditional" >&5
2703 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2704   if test $ac_cv_prog_gcc_traditional = yes; then
2705     CC="$CC -traditional"
2706   fi
2707 fi
2708
2709 echo "$as_me:2709: checking whether $CC understands -c and -o together" >&5
2710 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2711 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2712   echo $ECHO_N "(cached) $ECHO_C" >&6
2713 else
2714
2715 cat > conftest.$ac_ext <<CF_EOF
2716 int main(void)
2717 {
2718         ${cf_cv_main_return:-return}(0);
2719 }
2720 CF_EOF
2721 # We do the test twice because some compilers refuse to overwrite an
2722 # existing .o file with -o, though they will create one.
2723 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2724 if { (eval echo "$as_me:2724: \"$ac_try\"") >&5
2725   (eval $ac_try) 2>&5
2726   ac_status=$?
2727   echo "$as_me:2727: \$? = $ac_status" >&5
2728   (exit $ac_status); } &&
2729   test -f conftest2.$ac_objext && { (eval echo "$as_me:2729: \"$ac_try\"") >&5
2730   (eval $ac_try) 2>&5
2731   ac_status=$?
2732   echo "$as_me:2732: \$? = $ac_status" >&5
2733   (exit $ac_status); };
2734 then
2735   eval cf_cv_prog_CC_c_o=yes
2736 else
2737   eval cf_cv_prog_CC_c_o=no
2738 fi
2739 rm -rf conftest*
2740
2741 fi
2742 if test $cf_cv_prog_CC_c_o = yes; then
2743   echo "$as_me:2743: result: yes" >&5
2744 echo "${ECHO_T}yes" >&6
2745 else
2746   echo "$as_me:2746: result: no" >&5
2747 echo "${ECHO_T}no" >&6
2748 fi
2749
2750 if test "$cross_compiling" = yes ; then
2751         LDCONFIG=:
2752 else
2753         case "$cf_cv_system_name" in
2754         (dragonfly*|mirbsd*|freebsd*)
2755                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2756                 ;;
2757         (*) LDPATH=$PATH:/sbin:/usr/sbin
2758                 # Extract the first word of "ldconfig", so it can be a program name with args.
2759 set dummy ldconfig; ac_word=$2
2760 echo "$as_me:2760: checking for $ac_word" >&5
2761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2762 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2763   echo $ECHO_N "(cached) $ECHO_C" >&6
2764 else
2765   case $LDCONFIG in
2766   [\\/]* | ?:[\\/]*)
2767   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2768   ;;
2769   *)
2770   ac_save_IFS=$IFS; IFS=$ac_path_separator
2771 ac_dummy="$LDPATH"
2772 for ac_dir in $ac_dummy; do
2773   IFS=$ac_save_IFS
2774   test -z "$ac_dir" && ac_dir=.
2775   if $as_executable_p "$ac_dir/$ac_word"; then
2776    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2777    echo "$as_me:2777: found $ac_dir/$ac_word" >&5
2778    break
2779 fi
2780 done
2781
2782   ;;
2783 esac
2784 fi
2785 LDCONFIG=$ac_cv_path_LDCONFIG
2786
2787 if test -n "$LDCONFIG"; then
2788   echo "$as_me:2788: result: $LDCONFIG" >&5
2789 echo "${ECHO_T}$LDCONFIG" >&6
2790 else
2791   echo "$as_me:2791: result: no" >&5
2792 echo "${ECHO_T}no" >&6
2793 fi
2794
2795                 ;;
2796         esac
2797 fi
2798
2799 echo "$as_me:2799: checking if you want to ensure bool is consistent with C++" >&5
2800 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2801
2802 # Check whether --with-cxx or --without-cxx was given.
2803 if test "${with_cxx+set}" = set; then
2804   withval="$with_cxx"
2805   cf_with_cxx=$withval
2806 else
2807   cf_with_cxx=yes
2808 fi;
2809 echo "$as_me:2809: result: $cf_with_cxx" >&5
2810 echo "${ECHO_T}$cf_with_cxx" >&6
2811 if test "X$cf_with_cxx" = Xno ; then
2812         CXX=""
2813         GXX=""
2814 else
2815         # with autoconf 2.13, we can change the error to a warning:
2816                 ac_ext=cc
2817 ac_cpp='$CXXCPP $CPPFLAGS'
2818 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2819 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2820 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2821 ac_main_return=return
2822 if test -n "$ac_tool_prefix"; then
2823   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2824   do
2825     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2826 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2827 echo "$as_me:2827: checking for $ac_word" >&5
2828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2829 if test "${ac_cv_prog_CXX+set}" = set; then
2830   echo $ECHO_N "(cached) $ECHO_C" >&6
2831 else
2832   if test -n "$CXX"; then
2833   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2834 else
2835   ac_save_IFS=$IFS; IFS=$ac_path_separator
2836 ac_dummy="$PATH"
2837 for ac_dir in $ac_dummy; do
2838   IFS=$ac_save_IFS
2839   test -z "$ac_dir" && ac_dir=.
2840   $as_executable_p "$ac_dir/$ac_word" || continue
2841 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2842 echo "$as_me:2842: found $ac_dir/$ac_word" >&5
2843 break
2844 done
2845
2846 fi
2847 fi
2848 CXX=$ac_cv_prog_CXX
2849 if test -n "$CXX"; then
2850   echo "$as_me:2850: result: $CXX" >&5
2851 echo "${ECHO_T}$CXX" >&6
2852 else
2853   echo "$as_me:2853: result: no" >&5
2854 echo "${ECHO_T}no" >&6
2855 fi
2856
2857     test -n "$CXX" && break
2858   done
2859 fi
2860 if test -z "$CXX"; then
2861   ac_ct_CXX=$CXX
2862   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2863 do
2864   # Extract the first word of "$ac_prog", so it can be a program name with args.
2865 set dummy $ac_prog; ac_word=$2
2866 echo "$as_me:2866: checking for $ac_word" >&5
2867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2868 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2869   echo $ECHO_N "(cached) $ECHO_C" >&6
2870 else
2871   if test -n "$ac_ct_CXX"; then
2872   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2873 else
2874   ac_save_IFS=$IFS; IFS=$ac_path_separator
2875 ac_dummy="$PATH"
2876 for ac_dir in $ac_dummy; do
2877   IFS=$ac_save_IFS
2878   test -z "$ac_dir" && ac_dir=.
2879   $as_executable_p "$ac_dir/$ac_word" || continue
2880 ac_cv_prog_ac_ct_CXX="$ac_prog"
2881 echo "$as_me:2881: found $ac_dir/$ac_word" >&5
2882 break
2883 done
2884
2885 fi
2886 fi
2887 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2888 if test -n "$ac_ct_CXX"; then
2889   echo "$as_me:2889: result: $ac_ct_CXX" >&5
2890 echo "${ECHO_T}$ac_ct_CXX" >&6
2891 else
2892   echo "$as_me:2892: result: no" >&5
2893 echo "${ECHO_T}no" >&6
2894 fi
2895
2896   test -n "$ac_ct_CXX" && break
2897 done
2898 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2899
2900   CXX=$ac_ct_CXX
2901 fi
2902
2903 # Provide some information about the compiler.
2904 echo "$as_me:2904:" \
2905      "checking for C++ compiler version" >&5
2906 ac_compiler=`set X $ac_compile; echo $2`
2907 { (eval echo "$as_me:2907: \"$ac_compiler --version </dev/null >&5\"") >&5
2908   (eval $ac_compiler --version </dev/null >&5) 2>&5
2909   ac_status=$?
2910   echo "$as_me:2910: \$? = $ac_status" >&5
2911   (exit $ac_status); }
2912 { (eval echo "$as_me:2912: \"$ac_compiler -v </dev/null >&5\"") >&5
2913   (eval $ac_compiler -v </dev/null >&5) 2>&5
2914   ac_status=$?
2915   echo "$as_me:2915: \$? = $ac_status" >&5
2916   (exit $ac_status); }
2917 { (eval echo "$as_me:2917: \"$ac_compiler -V </dev/null >&5\"") >&5
2918   (eval $ac_compiler -V </dev/null >&5) 2>&5
2919   ac_status=$?
2920   echo "$as_me:2920: \$? = $ac_status" >&5
2921   (exit $ac_status); }
2922
2923 echo "$as_me:2923: checking whether we are using the GNU C++ compiler" >&5
2924 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2925 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2926   echo $ECHO_N "(cached) $ECHO_C" >&6
2927 else
2928   cat >conftest.$ac_ext <<_ACEOF
2929 #line 2929 "configure"
2930 #include "confdefs.h"
2931
2932 int
2933 main (void)
2934 {
2935 #ifndef __GNUC__
2936        choke me
2937 #endif
2938
2939   ;
2940   return 0;
2941 }
2942 _ACEOF
2943 rm -f conftest.$ac_objext
2944 if { (eval echo "$as_me:2944: \"$ac_compile\"") >&5
2945   (eval $ac_compile) 2>&5
2946   ac_status=$?
2947   echo "$as_me:2947: \$? = $ac_status" >&5
2948   (exit $ac_status); } &&
2949          { ac_try='test -s conftest.$ac_objext'
2950   { (eval echo "$as_me:2950: \"$ac_try\"") >&5
2951   (eval $ac_try) 2>&5
2952   ac_status=$?
2953   echo "$as_me:2953: \$? = $ac_status" >&5
2954   (exit $ac_status); }; }; then
2955   ac_compiler_gnu=yes
2956 else
2957   echo "$as_me: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2959 ac_compiler_gnu=no
2960 fi
2961 rm -f conftest.$ac_objext conftest.$ac_ext
2962 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2963
2964 fi
2965 echo "$as_me:2965: result: $ac_cv_cxx_compiler_gnu" >&5
2966 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2967 GXX=`test $ac_compiler_gnu = yes && echo yes`
2968 ac_test_CXXFLAGS=${CXXFLAGS+set}
2969 ac_save_CXXFLAGS=$CXXFLAGS
2970 CXXFLAGS="-g"
2971 echo "$as_me:2971: checking whether $CXX accepts -g" >&5
2972 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2973 if test "${ac_cv_prog_cxx_g+set}" = set; then
2974   echo $ECHO_N "(cached) $ECHO_C" >&6
2975 else
2976   cat >conftest.$ac_ext <<_ACEOF
2977 #line 2977 "configure"
2978 #include "confdefs.h"
2979
2980 int
2981 main (void)
2982 {
2983
2984   ;
2985   return 0;
2986 }
2987 _ACEOF
2988 rm -f conftest.$ac_objext
2989 if { (eval echo "$as_me:2989: \"$ac_compile\"") >&5
2990   (eval $ac_compile) 2>&5
2991   ac_status=$?
2992   echo "$as_me:2992: \$? = $ac_status" >&5
2993   (exit $ac_status); } &&
2994          { ac_try='test -s conftest.$ac_objext'
2995   { (eval echo "$as_me:2995: \"$ac_try\"") >&5
2996   (eval $ac_try) 2>&5
2997   ac_status=$?
2998   echo "$as_me:2998: \$? = $ac_status" >&5
2999   (exit $ac_status); }; }; then
3000   ac_cv_prog_cxx_g=yes
3001 else
3002   echo "$as_me: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 ac_cv_prog_cxx_g=no
3005 fi
3006 rm -f conftest.$ac_objext conftest.$ac_ext
3007 fi
3008 echo "$as_me:3008: result: $ac_cv_prog_cxx_g" >&5
3009 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3010 if test "$ac_test_CXXFLAGS" = set; then
3011   CXXFLAGS=$ac_save_CXXFLAGS
3012 elif test $ac_cv_prog_cxx_g = yes; then
3013   if test "$GXX" = yes; then
3014     CXXFLAGS="-g -O2"
3015   else
3016     CXXFLAGS="-g"
3017   fi
3018 else
3019   if test "$GXX" = yes; then
3020     CXXFLAGS="-O2"
3021   else
3022     CXXFLAGS=
3023   fi
3024 fi
3025 for ac_declaration in \
3026    ''\
3027    '#include <stdlib.h>' \
3028    'extern "C" void std::exit (int) throw (); using std::exit;' \
3029    'extern "C" void std::exit (int); using std::exit;' \
3030    'extern "C" void exit (int) throw ();' \
3031    'extern "C" void exit (int);' \
3032    'void exit (int);'
3033 do
3034   cat >conftest.$ac_ext <<_ACEOF
3035 #line 3035 "configure"
3036 #include "confdefs.h"
3037 #include <stdlib.h>
3038 $ac_declaration
3039 int
3040 main (void)
3041 {
3042 exit (42);
3043   ;
3044   return 0;
3045 }
3046 _ACEOF
3047 rm -f conftest.$ac_objext
3048 if { (eval echo "$as_me:3048: \"$ac_compile\"") >&5
3049   (eval $ac_compile) 2>&5
3050   ac_status=$?
3051   echo "$as_me:3051: \$? = $ac_status" >&5
3052   (exit $ac_status); } &&
3053          { ac_try='test -s conftest.$ac_objext'
3054   { (eval echo "$as_me:3054: \"$ac_try\"") >&5
3055   (eval $ac_try) 2>&5
3056   ac_status=$?
3057   echo "$as_me:3057: \$? = $ac_status" >&5
3058   (exit $ac_status); }; }; then
3059   :
3060 else
3061   echo "$as_me: failed program was:" >&5
3062 cat conftest.$ac_ext >&5
3063 continue
3064 fi
3065 rm -f conftest.$ac_objext conftest.$ac_ext
3066   cat >conftest.$ac_ext <<_ACEOF
3067 #line 3067 "configure"
3068 #include "confdefs.h"
3069 $ac_declaration
3070 int
3071 main (void)
3072 {
3073 exit (42);
3074   ;
3075   return 0;
3076 }
3077 _ACEOF
3078 rm -f conftest.$ac_objext
3079 if { (eval echo "$as_me:3079: \"$ac_compile\"") >&5
3080   (eval $ac_compile) 2>&5
3081   ac_status=$?
3082   echo "$as_me:3082: \$? = $ac_status" >&5
3083   (exit $ac_status); } &&
3084          { ac_try='test -s conftest.$ac_objext'
3085   { (eval echo "$as_me:3085: \"$ac_try\"") >&5
3086   (eval $ac_try) 2>&5
3087   ac_status=$?
3088   echo "$as_me:3088: \$? = $ac_status" >&5
3089   (exit $ac_status); }; }; then
3090   break
3091 else
3092   echo "$as_me: failed program was:" >&5
3093 cat conftest.$ac_ext >&5
3094 fi
3095 rm -f conftest.$ac_objext conftest.$ac_ext
3096 done
3097 rm -rf conftest*
3098 if test -n "$ac_declaration"; then
3099   echo '#ifdef __cplusplus' >>confdefs.h
3100   echo $ac_declaration      >>confdefs.h
3101   echo '#endif'             >>confdefs.h
3102 fi
3103
3104 ac_ext=c
3105 ac_cpp='$CPP $CPPFLAGS'
3106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3109 ac_main_return=return
3110
3111         ac_ext=cc
3112 ac_cpp='$CXXCPP $CPPFLAGS'
3113 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3114 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3115 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3116 ac_main_return=return
3117
3118         if test "x$cf_with_cxx" != xno
3119         then
3120                 # Several of the C++ configurations do not work, particularly when
3121                 # cross-compiling (20140913 -TD)
3122                 echo "$as_me:3122: checking if $CXX works" >&5
3123 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3124
3125                 save_CPPFLAGS="$CPPFLAGS"
3126                 eval cf_includedir=${includedir}
3127                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3128
3129 cat >conftest.$ac_ext <<_ACEOF
3130 #line 3130 "configure"
3131 #include "confdefs.h"
3132
3133 #include <stdlib.h>
3134 #include <stdio.h>
3135
3136 int
3137 main (void)
3138 {
3139
3140                 printf("Hello world!\n")
3141
3142   ;
3143   return 0;
3144 }
3145 _ACEOF
3146 rm -f conftest.$ac_objext
3147 if { (eval echo "$as_me:3147: \"$ac_compile\"") >&5
3148   (eval $ac_compile) 2>&5
3149   ac_status=$?
3150   echo "$as_me:3150: \$? = $ac_status" >&5
3151   (exit $ac_status); } &&
3152          { ac_try='test -s conftest.$ac_objext'
3153   { (eval echo "$as_me:3153: \"$ac_try\"") >&5
3154   (eval $ac_try) 2>&5
3155   ac_status=$?
3156   echo "$as_me:3156: \$? = $ac_status" >&5
3157   (exit $ac_status); }; }; then
3158   cf_cxx_works=yes
3159 else
3160   echo "$as_me: failed program was:" >&5
3161 cat conftest.$ac_ext >&5
3162 cf_cxx_works=no
3163 fi
3164 rm -f conftest.$ac_objext conftest.$ac_ext
3165                 CPPFLAGS="$save_CPPFLAGS"
3166
3167                 echo "$as_me:3167: result: $cf_cxx_works" >&5
3168 echo "${ECHO_T}$cf_cxx_works" >&6
3169                 if test "x$cf_cxx_works" = xno
3170                 then
3171                         { echo "$as_me:3171: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3172 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3173                         cf_with_cxx=no; CXX=""; GXX="";
3174                 fi
3175         fi
3176         ac_ext=c
3177 ac_cpp='$CPP $CPPFLAGS'
3178 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3179 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3180 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3181 ac_main_return=return
3182
3183         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3184         if test "$CXX" = "g++" ; then
3185                 # Extract the first word of "g++", so it can be a program name with args.
3186 set dummy g++; ac_word=$2
3187 echo "$as_me:3187: checking for $ac_word" >&5
3188 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3189 if test "${ac_cv_path_CXX+set}" = set; then
3190   echo $ECHO_N "(cached) $ECHO_C" >&6
3191 else
3192   case $CXX in
3193   [\\/]* | ?:[\\/]*)
3194   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3195   ;;
3196   *)
3197   ac_save_IFS=$IFS; IFS=$ac_path_separator
3198 ac_dummy="$PATH"
3199 for ac_dir in $ac_dummy; do
3200   IFS=$ac_save_IFS
3201   test -z "$ac_dir" && ac_dir=.
3202   if $as_executable_p "$ac_dir/$ac_word"; then
3203    ac_cv_path_CXX="$ac_dir/$ac_word"
3204    echo "$as_me:3204: found $ac_dir/$ac_word" >&5
3205    break
3206 fi
3207 done
3208
3209   ;;
3210 esac
3211 fi
3212 CXX=$ac_cv_path_CXX
3213
3214 if test -n "$CXX"; then
3215   echo "$as_me:3215: result: $CXX" >&5
3216 echo "${ECHO_T}$CXX" >&6
3217 else
3218   echo "$as_me:3218: result: no" >&5
3219 echo "${ECHO_T}no" >&6
3220 fi
3221
3222         fi
3223         case "x$CXX" in
3224         (x|xg++)
3225                 { echo "$as_me:3225: WARNING: You don't have any C++ compiler, too bad" >&5
3226 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3227                 cf_with_cxx=no; CXX=""; GXX="";
3228                 ;;
3229         esac
3230 fi
3231
3232 GXX_VERSION=none
3233 if test "$GXX" = yes; then
3234         echo "$as_me:3234: checking version of ${CXX:-g++}" >&5
3235 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3236         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3237         if test -z "$GXX_VERSION"
3238         then
3239                 GXX_VERSION=unknown
3240                 GXX=no
3241         fi
3242         echo "$as_me:3242: result: $GXX_VERSION" >&5
3243 echo "${ECHO_T}$GXX_VERSION" >&6
3244 fi
3245
3246 case $GXX_VERSION in
3247 (1*|2.[0-6]*)
3248         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3249         # cf_cxx_library=no
3250         { echo "$as_me:3250: WARNING: templates do not work" >&5
3251 echo "$as_me: WARNING: templates do not work" >&2;}
3252         ;;
3253 esac
3254
3255 echo "$as_me:3255: checking if you want to build C++ binding and demo" >&5
3256 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3257
3258 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3259 if test "${with_cxx_binding+set}" = set; then
3260   withval="$with_cxx_binding"
3261   cf_with_cxx_binding=$withval
3262 else
3263   cf_with_cxx_binding=$cf_with_cxx
3264 fi;
3265 echo "$as_me:3265: result: $cf_with_cxx_binding" >&5
3266 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3267
3268 echo "$as_me:3268: checking if you want to build with Ada95" >&5
3269 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3270 echo "$as_me:3270: result: $cf_with_ada" >&5
3271 echo "${ECHO_T}$cf_with_ada" >&6
3272
3273 echo "$as_me:3273: checking if you want to install terminal database" >&5
3274 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3275
3276 # Check whether --enable-db-install or --disable-db-install was given.
3277 if test "${enable_db_install+set}" = set; then
3278   enableval="$enable_db_install"
3279   cf_with_db_install=$enableval
3280 else
3281   cf_with_db_install=yes
3282 fi;
3283 echo "$as_me:3283: result: $cf_with_db_install" >&5
3284 echo "${ECHO_T}$cf_with_db_install" >&6
3285
3286 echo "$as_me:3286: checking if you want to install manpages" >&5
3287 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3288
3289 # Check whether --with-manpages or --without-manpages was given.
3290 if test "${with_manpages+set}" = set; then
3291   withval="$with_manpages"
3292   cf_with_manpages=$withval
3293 else
3294   cf_with_manpages=yes
3295 fi;
3296 echo "$as_me:3296: result: $cf_with_manpages" >&5
3297 echo "${ECHO_T}$cf_with_manpages" >&6
3298
3299 echo "$as_me:3299: checking if you want to build programs such as tic" >&5
3300 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3301
3302 # Check whether --with-progs or --without-progs was given.
3303 if test "${with_progs+set}" = set; then
3304   withval="$with_progs"
3305   cf_with_progs=$withval
3306 else
3307   cf_with_progs=yes
3308 fi;
3309 echo "$as_me:3309: result: $cf_with_progs" >&5
3310 echo "${ECHO_T}$cf_with_progs" >&6
3311
3312 if test -f $srcdir/tack/tack.h; then
3313         if test "x$cross_compiling" = xyes ; then
3314                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3315
3316 echo "${as_me:-configure}:3316: testing ignoring tack because we are cross-compiling ..." 1>&5
3317
3318                 cf_with_tack=no
3319         else
3320                 echo "$as_me:3320: checking if you want to build the tack program" >&5
3321 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3322
3323 # Check whether --with-tack or --without-tack was given.
3324 if test "${with_tack+set}" = set; then
3325   withval="$with_tack"
3326   cf_with_tack=$withval
3327 else
3328   cf_with_tack=$cf_with_progs
3329 fi;
3330                 echo "$as_me:3330: result: $cf_with_tack" >&5
3331 echo "${ECHO_T}$cf_with_tack" >&6
3332         fi
3333 else
3334         cf_with_tack=no
3335 fi
3336
3337 echo "$as_me:3337: checking if you want to build test-programs" >&5
3338 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3339
3340 # Check whether --with-tests or --without-tests was given.
3341 if test "${with_tests+set}" = set; then
3342   withval="$with_tests"
3343   cf_with_tests=$withval
3344 else
3345   cf_with_tests=yes
3346 fi;
3347 echo "$as_me:3347: result: $cf_with_tests" >&5
3348 echo "${ECHO_T}$cf_with_tests" >&6
3349
3350 echo "$as_me:3350: checking if you wish to install curses.h" >&5
3351 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3352
3353 # Check whether --with-curses-h or --without-curses-h was given.
3354 if test "${with_curses_h+set}" = set; then
3355   withval="$with_curses_h"
3356   with_curses_h=$withval
3357 else
3358   with_curses_h=yes
3359 fi;
3360 echo "$as_me:3360: result: $with_curses_h" >&5
3361 echo "${ECHO_T}$with_curses_h" >&6
3362
3363 modules_to_build="ncurses"
3364 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3365 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3366 modules_to_build="$modules_to_build panel menu form"
3367
3368 test "$program_prefix" != NONE &&
3369   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3370 # Use a double $ so make ignores it.
3371 test "$program_suffix" != NONE &&
3372   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3373 # Double any \ or $.  echo might interpret backslashes.
3374 # By default was `s,x,x', remove it if useless.
3375 cat <<\_ACEOF >conftest.sed
3376 s/[\\$]/&&/g;s/;s,x,x,$//
3377 _ACEOF
3378 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3379 rm conftest.sed
3380
3381 for ac_prog in mawk gawk nawk awk
3382 do
3383   # Extract the first word of "$ac_prog", so it can be a program name with args.
3384 set dummy $ac_prog; ac_word=$2
3385 echo "$as_me:3385: checking for $ac_word" >&5
3386 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3387 if test "${ac_cv_prog_AWK+set}" = set; then
3388   echo $ECHO_N "(cached) $ECHO_C" >&6
3389 else
3390   if test -n "$AWK"; then
3391   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3392 else
3393   ac_save_IFS=$IFS; IFS=$ac_path_separator
3394 ac_dummy="$PATH"
3395 for ac_dir in $ac_dummy; do
3396   IFS=$ac_save_IFS
3397   test -z "$ac_dir" && ac_dir=.
3398   $as_executable_p "$ac_dir/$ac_word" || continue
3399 ac_cv_prog_AWK="$ac_prog"
3400 echo "$as_me:3400: found $ac_dir/$ac_word" >&5
3401 break
3402 done
3403
3404 fi
3405 fi
3406 AWK=$ac_cv_prog_AWK
3407 if test -n "$AWK"; then
3408   echo "$as_me:3408: result: $AWK" >&5
3409 echo "${ECHO_T}$AWK" >&6
3410 else
3411   echo "$as_me:3411: result: no" >&5
3412 echo "${ECHO_T}no" >&6
3413 fi
3414
3415   test -n "$AWK" && break
3416 done
3417
3418 test -z "$AWK" && { { echo "$as_me:3418: error: No awk program found" >&5
3419 echo "$as_me: error: No awk program found" >&2;}
3420    { (exit 1); exit 1; }; }
3421
3422 echo "$as_me:3422: checking for egrep" >&5
3423 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3424 if test "${ac_cv_prog_egrep+set}" = set; then
3425   echo $ECHO_N "(cached) $ECHO_C" >&6
3426 else
3427   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3428                 then ac_cv_prog_egrep='grep -E'
3429                 else ac_cv_prog_egrep='egrep'
3430         fi
3431 fi
3432 echo "$as_me:3432: result: $ac_cv_prog_egrep" >&5
3433 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3434         EGREP=$ac_cv_prog_egrep
3435
3436         test -z "$EGREP" && { { echo "$as_me:3436: error: No egrep program found" >&5
3437 echo "$as_me: error: No egrep program found" >&2;}
3438    { (exit 1); exit 1; }; }
3439
3440 # Find a good install program.  We prefer a C program (faster),
3441 # so one script is as good as another.  But avoid the broken or
3442 # incompatible versions:
3443 # SysV /etc/install, /usr/sbin/install
3444 # SunOS /usr/etc/install
3445 # IRIX /sbin/install
3446 # AIX /bin/install
3447 # AmigaOS /C/install, which installs bootblocks on floppy discs
3448 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3449 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3450 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3451 # ./install, which can be erroneously created by make from ./install.sh.
3452 echo "$as_me:3452: checking for a BSD compatible install" >&5
3453 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3454 if test -z "$INSTALL"; then
3455 if test "${ac_cv_path_install+set}" = set; then
3456   echo $ECHO_N "(cached) $ECHO_C" >&6
3457 else
3458     ac_save_IFS=$IFS; IFS=$ac_path_separator
3459   for ac_dir in $PATH; do
3460     IFS=$ac_save_IFS
3461     # Account for people who put trailing slashes in PATH elements.
3462     case $ac_dir/ in
3463     / | ./ | .// | /cC/* \
3464     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3465     | /usr/ucb/* ) ;;
3466     *)
3467       # OSF1 and SCO ODT 3.0 have their own names for install.
3468       # Don't use installbsd from OSF since it installs stuff as root
3469       # by default.
3470       for ac_prog in ginstall scoinst install; do
3471         if $as_executable_p "$ac_dir/$ac_prog"; then
3472           if test $ac_prog = install &&
3473             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3474             # AIX install.  It has an incompatible calling convention.
3475             :
3476           elif test $ac_prog = install &&
3477             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3478             # program-specific install script used by HP pwplus--don't use.
3479             :
3480           else
3481             ac_cv_path_install="$ac_dir/$ac_prog -c"
3482             break 2
3483           fi
3484         fi
3485       done
3486       ;;
3487     esac
3488   done
3489
3490 fi
3491   if test "${ac_cv_path_install+set}" = set; then
3492     INSTALL=$ac_cv_path_install
3493   else
3494     # As a last resort, use the slow shell script.  We don't cache a
3495     # path for INSTALL within a source directory, because that will
3496     # break other packages using the cache if that directory is
3497     # removed, or if the path is relative.
3498     INSTALL=$ac_install_sh
3499   fi
3500 fi
3501 echo "$as_me:3501: result: $INSTALL" >&5
3502 echo "${ECHO_T}$INSTALL" >&6
3503
3504 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3505 # It thinks the first close brace ends the variable substitution.
3506 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3507
3508 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3509
3510 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3511
3512 case $INSTALL in
3513 (/*)
3514         ;;
3515 (*)
3516         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3517         test -z "$cf_dir" && cf_dir=.
3518         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3519         ;;
3520 esac
3521
3522 for ac_prog in lint cppcheck splint
3523 do
3524   # Extract the first word of "$ac_prog", so it can be a program name with args.
3525 set dummy $ac_prog; ac_word=$2
3526 echo "$as_me:3526: checking for $ac_word" >&5
3527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3528 if test "${ac_cv_prog_LINT+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   if test -n "$LINT"; then
3532   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3533 else
3534   ac_save_IFS=$IFS; IFS=$ac_path_separator
3535 ac_dummy="$PATH"
3536 for ac_dir in $ac_dummy; do
3537   IFS=$ac_save_IFS
3538   test -z "$ac_dir" && ac_dir=.
3539   $as_executable_p "$ac_dir/$ac_word" || continue
3540 ac_cv_prog_LINT="$ac_prog"
3541 echo "$as_me:3541: found $ac_dir/$ac_word" >&5
3542 break
3543 done
3544
3545 fi
3546 fi
3547 LINT=$ac_cv_prog_LINT
3548 if test -n "$LINT"; then
3549   echo "$as_me:3549: result: $LINT" >&5
3550 echo "${ECHO_T}$LINT" >&6
3551 else
3552   echo "$as_me:3552: result: no" >&5
3553 echo "${ECHO_T}no" >&6
3554 fi
3555
3556   test -n "$LINT" && break
3557 done
3558
3559 echo "$as_me:3559: checking whether ln -s works" >&5
3560 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3561 LN_S=$as_ln_s
3562 if test "$LN_S" = "ln -s"; then
3563   echo "$as_me:3563: result: yes" >&5
3564 echo "${ECHO_T}yes" >&6
3565 else
3566   echo "$as_me:3566: result: no, using $LN_S" >&5
3567 echo "${ECHO_T}no, using $LN_S" >&6
3568 fi
3569
3570 echo "$as_me:3570: checking if $LN_S -f options work" >&5
3571 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3572
3573 rm -f conf$$.src conf$$dst
3574 echo >conf$$.dst
3575 echo first >conf$$.src
3576 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3577         cf_prog_ln_sf=yes
3578 else
3579         cf_prog_ln_sf=no
3580 fi
3581 rm -f conf$$.dst conf$$src
3582 echo "$as_me:3582: result: $cf_prog_ln_sf" >&5
3583 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3584
3585 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3586
3587 echo "$as_me:3587: checking for long file names" >&5
3588 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3589 if test "${ac_cv_sys_long_file_names+set}" = set; then
3590   echo $ECHO_N "(cached) $ECHO_C" >&6
3591 else
3592   ac_cv_sys_long_file_names=yes
3593 # Test for long file names in all the places we know might matter:
3594 #      .                the current directory, where building will happen
3595 #      $prefix/lib      where we will be installing things
3596 #      $exec_prefix/lib likewise
3597 # eval it to expand exec_prefix.
3598 #      $TMPDIR          if set, where it might want to write temporary files
3599 # if $TMPDIR is not set:
3600 #      /tmp             where it might want to write temporary files
3601 #      /var/tmp         likewise
3602 #      /usr/tmp         likewise
3603 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3604   ac_tmpdirs=$TMPDIR
3605 else
3606   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3607 fi
3608 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3609   test -d $ac_dir || continue
3610   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3611   ac_xdir=$ac_dir/cf$$
3612   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3613   ac_tf1=$ac_xdir/conftest9012345
3614   ac_tf2=$ac_xdir/conftest9012346
3615   (echo 1 >$ac_tf1) 2>/dev/null
3616   (echo 2 >$ac_tf2) 2>/dev/null
3617   ac_val=`cat $ac_tf1 2>/dev/null`
3618   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3619     ac_cv_sys_long_file_names=no
3620     rm -rf $ac_xdir 2>/dev/null
3621     break
3622   fi
3623   rm -rf $ac_xdir 2>/dev/null
3624 done
3625 fi
3626 echo "$as_me:3626: result: $ac_cv_sys_long_file_names" >&5
3627 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3628 if test $ac_cv_sys_long_file_names = yes; then
3629
3630 cat >>confdefs.h <<\EOF
3631 #define HAVE_LONG_FILE_NAMES 1
3632 EOF
3633
3634 fi
3635
3636 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3637 # of package conflict.
3638 cf_config_suffix=
3639
3640 # Check whether --with-config-suffix or --without-config-suffix was given.
3641 if test "${with_config_suffix+set}" = set; then
3642   withval="$with_config_suffix"
3643   case "x$withval" in
3644         (xyes|xno)
3645                 { echo "$as_me:3645: WARNING: expected a value for config-suffix option" >&5
3646 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3647                 ;;
3648         (*)     cf_config_suffix="$withval"
3649                 ;;
3650         esac
3651 fi;
3652
3653 # If we find pkg-config, check if we should install the ".pc" files.
3654
3655 echo "$as_me:3655: checking if you want to use pkg-config" >&5
3656 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3657
3658 # Check whether --with-pkg-config or --without-pkg-config was given.
3659 if test "${with_pkg_config+set}" = set; then
3660   withval="$with_pkg_config"
3661   cf_pkg_config=$withval
3662 else
3663   cf_pkg_config=yes
3664 fi;
3665 echo "$as_me:3665: result: $cf_pkg_config" >&5
3666 echo "${ECHO_T}$cf_pkg_config" >&6
3667
3668 case $cf_pkg_config in
3669 (no)
3670         PKG_CONFIG=none
3671         ;;
3672 (yes)
3673
3674 if test -n "$ac_tool_prefix"; then
3675   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3676 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3677 echo "$as_me:3677: checking for $ac_word" >&5
3678 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3679 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3680   echo $ECHO_N "(cached) $ECHO_C" >&6
3681 else
3682   case $PKG_CONFIG in
3683   [\\/]* | ?:[\\/]*)
3684   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3685   ;;
3686   *)
3687   ac_save_IFS=$IFS; IFS=$ac_path_separator
3688 ac_dummy="$PATH"
3689 for ac_dir in $ac_dummy; do
3690   IFS=$ac_save_IFS
3691   test -z "$ac_dir" && ac_dir=.
3692   if $as_executable_p "$ac_dir/$ac_word"; then
3693    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3694    echo "$as_me:3694: found $ac_dir/$ac_word" >&5
3695    break
3696 fi
3697 done
3698
3699   ;;
3700 esac
3701 fi
3702 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3703
3704 if test -n "$PKG_CONFIG"; then
3705   echo "$as_me:3705: result: $PKG_CONFIG" >&5
3706 echo "${ECHO_T}$PKG_CONFIG" >&6
3707 else
3708   echo "$as_me:3708: result: no" >&5
3709 echo "${ECHO_T}no" >&6
3710 fi
3711
3712 fi
3713 if test -z "$ac_cv_path_PKG_CONFIG"; then
3714   ac_pt_PKG_CONFIG=$PKG_CONFIG
3715   # Extract the first word of "pkg-config", so it can be a program name with args.
3716 set dummy pkg-config; ac_word=$2
3717 echo "$as_me:3717: checking for $ac_word" >&5
3718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3719 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722   case $ac_pt_PKG_CONFIG in
3723   [\\/]* | ?:[\\/]*)
3724   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3725   ;;
3726   *)
3727   ac_save_IFS=$IFS; IFS=$ac_path_separator
3728 ac_dummy="$PATH"
3729 for ac_dir in $ac_dummy; do
3730   IFS=$ac_save_IFS
3731   test -z "$ac_dir" && ac_dir=.
3732   if $as_executable_p "$ac_dir/$ac_word"; then
3733    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3734    echo "$as_me:3734: found $ac_dir/$ac_word" >&5
3735    break
3736 fi
3737 done
3738
3739   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3740   ;;
3741 esac
3742 fi
3743 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3744
3745 if test -n "$ac_pt_PKG_CONFIG"; then
3746   echo "$as_me:3746: result: $ac_pt_PKG_CONFIG" >&5
3747 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3748 else
3749   echo "$as_me:3749: result: no" >&5
3750 echo "${ECHO_T}no" >&6
3751 fi
3752
3753   PKG_CONFIG=$ac_pt_PKG_CONFIG
3754 else
3755   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3756 fi
3757
3758         ;;
3759 (*)
3760         PKG_CONFIG=$withval
3761         ;;
3762 esac
3763
3764 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3765 if test "$PKG_CONFIG" != none ; then
3766
3767 if test "x$prefix" != xNONE; then
3768         cf_path_syntax="$prefix"
3769 else
3770         cf_path_syntax="$ac_default_prefix"
3771 fi
3772
3773 case ".$PKG_CONFIG" in
3774 (.\$\(*\)*|.\'*\'*)
3775         ;;
3776 (..|./*|.\\*)
3777         ;;
3778 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3779         ;;
3780 (.\${*prefix}*|.\${*dir}*)
3781         eval PKG_CONFIG="$PKG_CONFIG"
3782         case ".$PKG_CONFIG" in
3783         (.NONE/*)
3784                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3785                 ;;
3786         esac
3787         ;;
3788 (.no|.NONE/*)
3789         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3790         ;;
3791 (*)
3792         { { echo "$as_me:3792: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3793 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3794    { (exit 1); exit 1; }; }
3795         ;;
3796 esac
3797
3798 elif test "x$cf_pkg_config" != xno ; then
3799         { echo "$as_me:3799: WARNING: pkg-config is not installed" >&5
3800 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3801 fi
3802
3803 case $PKG_CONFIG in
3804 (no|none|yes)
3805         echo "$as_me:3805: checking for pkg-config library directory" >&5
3806 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3807         ;;
3808 (*)
3809         echo "$as_me:3809: checking for $PKG_CONFIG library directory" >&5
3810 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3811         ;;
3812 esac
3813
3814 PKG_CONFIG_LIBDIR=no
3815
3816 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3817 if test "${with_pkg_config_libdir+set}" = set; then
3818   withval="$with_pkg_config_libdir"
3819   PKG_CONFIG_LIBDIR=$withval
3820 else
3821   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3822 fi;
3823
3824 case x$PKG_CONFIG_LIBDIR in
3825 (x/*)
3826         ;;
3827 (xyes)
3828         # Look for the library directory using the same prefix as the executable
3829         if test "x$PKG_CONFIG" = xnone
3830         then
3831                 cf_path=$prefix
3832         else
3833                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3834         fi
3835
3836         # If you don't like using the default architecture, you have to specify the
3837         # intended library directory and corresponding compiler/linker options.
3838         #
3839         # This case allows for Debian's 2014-flavor of multiarch, along with the
3840         # most common variations before that point.  Some other variants spell the
3841         # directory differently, e.g., "pkg-config", and put it in unusual places.
3842         # pkg-config has always been poorly standardized, which is ironic...
3843         case x`(arch) 2>/dev/null` in
3844         (*64)
3845                 cf_search_path="\
3846                         $cf_path/lib/*64-linux-gnu \
3847                         $cf_path/share \
3848                         $cf_path/lib64 \
3849                         $cf_path/lib32 \
3850                         $cf_path/lib"
3851                 ;;
3852         (*)
3853                 cf_search_path="\
3854                         $cf_path/lib/*-linux-gnu \
3855                         $cf_path/share \
3856                         $cf_path/lib32 \
3857                         $cf_path/lib \
3858                         $cf_path/libdata"
3859                 ;;
3860         esac
3861
3862         test -n "$verbose" && echo "    list..." 1>&6
3863
3864 echo "${as_me:-configure}:3864: testing list... ..." 1>&5
3865
3866         for cf_config in $cf_search_path
3867         do
3868                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3869
3870 echo "${as_me:-configure}:3870: testing checking $cf_config/pkgconfig ..." 1>&5
3871
3872                 if test -d $cf_config/pkgconfig
3873                 then
3874                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3875                         echo "$as_me:3875: checking done" >&5
3876 echo $ECHO_N "checking done... $ECHO_C" >&6
3877                         break
3878                 fi
3879         done
3880         ;;
3881 (*)
3882         ;;
3883 esac
3884
3885 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3886         echo "$as_me:3886: result: $PKG_CONFIG_LIBDIR" >&5
3887 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3888 fi
3889
3890 if test "x$PKG_CONFIG" != xnone
3891 then
3892         echo "$as_me:3892: checking if we should install .pc files for $PKG_CONFIG" >&5
3893 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3894 else
3895         echo "$as_me:3895: checking if we should install .pc files" >&5
3896 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3897 fi
3898
3899 # Check whether --enable-pc-files or --disable-pc-files was given.
3900 if test "${enable_pc_files+set}" = set; then
3901   enableval="$enable_pc_files"
3902   enable_pc_files=$enableval
3903 else
3904   enable_pc_files=no
3905 fi;
3906 echo "$as_me:3906: result: $enable_pc_files" >&5
3907 echo "${ECHO_T}$enable_pc_files" >&6
3908
3909 if test "x$enable_pc_files" != xno
3910 then
3911         MAKE_PC_FILES=
3912         case "x$PKG_CONFIG_LIBDIR" in
3913         (xno|xyes)
3914                 { echo "$as_me:3914: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3915 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3916                 ;;
3917         (*)
3918
3919 if test "x$prefix" != xNONE; then
3920         cf_path_syntax="$prefix"
3921 else
3922         cf_path_syntax="$ac_default_prefix"
3923 fi
3924
3925 case ".$PKG_CONFIG_LIBDIR" in
3926 (.\$\(*\)*|.\'*\'*)
3927         ;;
3928 (..|./*|.\\*)
3929         ;;
3930 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3931         ;;
3932 (.\${*prefix}*|.\${*dir}*)
3933         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3934         case ".$PKG_CONFIG_LIBDIR" in
3935         (.NONE/*)
3936                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3937                 ;;
3938         esac
3939         ;;
3940 (.no|.NONE/*)
3941         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3942         ;;
3943 (*)
3944         { { echo "$as_me:3944: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3945 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3946    { (exit 1); exit 1; }; }
3947         ;;
3948 esac
3949
3950                 ;;
3951         esac
3952 else
3953         MAKE_PC_FILES="#"
3954 fi
3955
3956 if test -z "$MAKE_PC_FILES"
3957 then
3958         echo "$as_me:3958: checking for suffix to add to pc-files" >&5
3959 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3960
3961 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3962 if test "${with_pc_suffix+set}" = set; then
3963   withval="$with_pc_suffix"
3964   case "x$withval" in
3965         (xyes|xno)
3966                 PC_MODULE_SUFFIX=
3967                 ;;
3968         (*)     PC_MODULE_SUFFIX="$withval"
3969                 ;;
3970         esac
3971 fi;
3972         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3973         echo "$as_me:3973: result: $PC_MODULE_SUFFIX" >&5
3974 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3975         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3976
3977 fi
3978
3979 echo "$as_me:3979: checking if we should assume mixed-case filenames" >&5
3980 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3981
3982 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3983 if test "${enable_mixed_case+set}" = set; then
3984   enableval="$enable_mixed_case"
3985   enable_mixedcase=$enableval
3986 else
3987   enable_mixedcase=auto
3988 fi;
3989 echo "$as_me:3989: result: $enable_mixedcase" >&5
3990 echo "${ECHO_T}$enable_mixedcase" >&6
3991 if test "$enable_mixedcase" = "auto" ; then
3992
3993 echo "$as_me:3993: checking if filesystem supports mixed-case filenames" >&5
3994 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3995 if test "${cf_cv_mixedcase+set}" = set; then
3996   echo $ECHO_N "(cached) $ECHO_C" >&6
3997 else
3998
3999 if test "$cross_compiling" = yes ; then
4000         case $target_alias in
4001         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4002                 cf_cv_mixedcase=no
4003                 ;;
4004         (*)
4005                 cf_cv_mixedcase=yes
4006                 ;;
4007         esac
4008 else
4009         rm -f conftest CONFTEST
4010         echo test >conftest
4011         if test -f CONFTEST ; then
4012                 cf_cv_mixedcase=no
4013         else
4014                 cf_cv_mixedcase=yes
4015         fi
4016         rm -f conftest CONFTEST
4017 fi
4018
4019 fi
4020 echo "$as_me:4020: result: $cf_cv_mixedcase" >&5
4021 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4022 test "$cf_cv_mixedcase" = yes &&
4023 cat >>confdefs.h <<\EOF
4024 #define MIXEDCASE_FILENAMES 1
4025 EOF
4026
4027 else
4028         cf_cv_mixedcase=$enable_mixedcase
4029         if test "x$enable_mixedcase" = "xyes" ; then
4030
4031 cat >>confdefs.h <<\EOF
4032 #define MIXEDCASE_FILENAMES 1
4033 EOF
4034
4035         fi
4036 fi
4037
4038 # do this after mixed-case option (tags/TAGS is not as important as tic).
4039 echo "$as_me:4039: checking whether ${MAKE-make} sets \${MAKE}" >&5
4040 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4041 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4042 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4043   echo $ECHO_N "(cached) $ECHO_C" >&6
4044 else
4045   cat >conftest.make <<\EOF
4046 all:
4047         @echo 'ac_maketemp="${MAKE}"'
4048 EOF
4049 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4050 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4051 if test -n "$ac_maketemp"; then
4052   eval ac_cv_prog_make_${ac_make}_set=yes
4053 else
4054   eval ac_cv_prog_make_${ac_make}_set=no
4055 fi
4056 rm -f conftest.make
4057 fi
4058 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4059   echo "$as_me:4059: result: yes" >&5
4060 echo "${ECHO_T}yes" >&6
4061   SET_MAKE=
4062 else
4063   echo "$as_me:4063: result: no" >&5
4064 echo "${ECHO_T}no" >&6
4065   SET_MAKE="MAKE=${MAKE-make}"
4066 fi
4067
4068 for ac_prog in exctags ctags
4069 do
4070   # Extract the first word of "$ac_prog", so it can be a program name with args.
4071 set dummy $ac_prog; ac_word=$2
4072 echo "$as_me:4072: checking for $ac_word" >&5
4073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4074 if test "${ac_cv_prog_CTAGS+set}" = set; then
4075   echo $ECHO_N "(cached) $ECHO_C" >&6
4076 else
4077   if test -n "$CTAGS"; then
4078   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4079 else
4080   ac_save_IFS=$IFS; IFS=$ac_path_separator
4081 ac_dummy="$PATH"
4082 for ac_dir in $ac_dummy; do
4083   IFS=$ac_save_IFS
4084   test -z "$ac_dir" && ac_dir=.
4085   $as_executable_p "$ac_dir/$ac_word" || continue
4086 ac_cv_prog_CTAGS="$ac_prog"
4087 echo "$as_me:4087: found $ac_dir/$ac_word" >&5
4088 break
4089 done
4090
4091 fi
4092 fi
4093 CTAGS=$ac_cv_prog_CTAGS
4094 if test -n "$CTAGS"; then
4095   echo "$as_me:4095: result: $CTAGS" >&5
4096 echo "${ECHO_T}$CTAGS" >&6
4097 else
4098   echo "$as_me:4098: result: no" >&5
4099 echo "${ECHO_T}no" >&6
4100 fi
4101
4102   test -n "$CTAGS" && break
4103 done
4104
4105 for ac_prog in exetags etags
4106 do
4107   # Extract the first word of "$ac_prog", so it can be a program name with args.
4108 set dummy $ac_prog; ac_word=$2
4109 echo "$as_me:4109: checking for $ac_word" >&5
4110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4111 if test "${ac_cv_prog_ETAGS+set}" = set; then
4112   echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114   if test -n "$ETAGS"; then
4115   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4116 else
4117   ac_save_IFS=$IFS; IFS=$ac_path_separator
4118 ac_dummy="$PATH"
4119 for ac_dir in $ac_dummy; do
4120   IFS=$ac_save_IFS
4121   test -z "$ac_dir" && ac_dir=.
4122   $as_executable_p "$ac_dir/$ac_word" || continue
4123 ac_cv_prog_ETAGS="$ac_prog"
4124 echo "$as_me:4124: found $ac_dir/$ac_word" >&5
4125 break
4126 done
4127
4128 fi
4129 fi
4130 ETAGS=$ac_cv_prog_ETAGS
4131 if test -n "$ETAGS"; then
4132   echo "$as_me:4132: result: $ETAGS" >&5
4133 echo "${ECHO_T}$ETAGS" >&6
4134 else
4135   echo "$as_me:4135: result: no" >&5
4136 echo "${ECHO_T}no" >&6
4137 fi
4138
4139   test -n "$ETAGS" && break
4140 done
4141
4142 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4143 set dummy ${CTAGS:-ctags}; ac_word=$2
4144 echo "$as_me:4144: checking for $ac_word" >&5
4145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4146 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4147   echo $ECHO_N "(cached) $ECHO_C" >&6
4148 else
4149   if test -n "$MAKE_LOWER_TAGS"; then
4150   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4151 else
4152   ac_save_IFS=$IFS; IFS=$ac_path_separator
4153 ac_dummy="$PATH"
4154 for ac_dir in $ac_dummy; do
4155   IFS=$ac_save_IFS
4156   test -z "$ac_dir" && ac_dir=.
4157   $as_executable_p "$ac_dir/$ac_word" || continue
4158 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4159 echo "$as_me:4159: found $ac_dir/$ac_word" >&5
4160 break
4161 done
4162
4163   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4164 fi
4165 fi
4166 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4167 if test -n "$MAKE_LOWER_TAGS"; then
4168   echo "$as_me:4168: result: $MAKE_LOWER_TAGS" >&5
4169 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4170 else
4171   echo "$as_me:4171: result: no" >&5
4172 echo "${ECHO_T}no" >&6
4173 fi
4174
4175 if test "$cf_cv_mixedcase" = yes ; then
4176         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4177 set dummy ${ETAGS:-etags}; ac_word=$2
4178 echo "$as_me:4178: checking for $ac_word" >&5
4179 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4180 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4181   echo $ECHO_N "(cached) $ECHO_C" >&6
4182 else
4183   if test -n "$MAKE_UPPER_TAGS"; then
4184   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4185 else
4186   ac_save_IFS=$IFS; IFS=$ac_path_separator
4187 ac_dummy="$PATH"
4188 for ac_dir in $ac_dummy; do
4189   IFS=$ac_save_IFS
4190   test -z "$ac_dir" && ac_dir=.
4191   $as_executable_p "$ac_dir/$ac_word" || continue
4192 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4193 echo "$as_me:4193: found $ac_dir/$ac_word" >&5
4194 break
4195 done
4196
4197   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4198 fi
4199 fi
4200 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4201 if test -n "$MAKE_UPPER_TAGS"; then
4202   echo "$as_me:4202: result: $MAKE_UPPER_TAGS" >&5
4203 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4204 else
4205   echo "$as_me:4205: result: no" >&5
4206 echo "${ECHO_T}no" >&6
4207 fi
4208
4209 else
4210         MAKE_UPPER_TAGS=no
4211 fi
4212
4213 if test "$MAKE_UPPER_TAGS" = yes ; then
4214         MAKE_UPPER_TAGS=
4215 else
4216         MAKE_UPPER_TAGS="#"
4217 fi
4218
4219 if test "$MAKE_LOWER_TAGS" = yes ; then
4220         MAKE_LOWER_TAGS=
4221 else
4222         MAKE_LOWER_TAGS="#"
4223 fi
4224
4225 echo "$as_me:4225: checking for makeflags variable" >&5
4226 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4227 if test "${cf_cv_makeflags+set}" = set; then
4228   echo $ECHO_N "(cached) $ECHO_C" >&6
4229 else
4230
4231         cf_cv_makeflags=''
4232         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4233         do
4234                 cat >cf_makeflags.tmp <<CF_EOF
4235 SHELL = $SHELL
4236 all :
4237         @ echo '.$cf_option'
4238 CF_EOF
4239                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4240                 case "$cf_result" in
4241                 (.*k|.*kw)
4242                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4243                         case "$cf_result" in
4244                         (.*CC=*)        cf_cv_makeflags=
4245                                 ;;
4246                         (*)     cf_cv_makeflags=$cf_option
4247                                 ;;
4248                         esac
4249                         break
4250                         ;;
4251                 (.-)
4252                         ;;
4253                 (*)
4254
4255 echo "${as_me:-configure}:4255: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4256
4257                         ;;
4258                 esac
4259         done
4260         rm -f cf_makeflags.tmp
4261
4262 fi
4263 echo "$as_me:4263: result: $cf_cv_makeflags" >&5
4264 echo "${ECHO_T}$cf_cv_makeflags" >&6
4265
4266 if test -n "$ac_tool_prefix"; then
4267   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4268 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4269 echo "$as_me:4269: checking for $ac_word" >&5
4270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4271 if test "${ac_cv_prog_RANLIB+set}" = set; then
4272   echo $ECHO_N "(cached) $ECHO_C" >&6
4273 else
4274   if test -n "$RANLIB"; then
4275   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4276 else
4277   ac_save_IFS=$IFS; IFS=$ac_path_separator
4278 ac_dummy="$PATH"
4279 for ac_dir in $ac_dummy; do
4280   IFS=$ac_save_IFS
4281   test -z "$ac_dir" && ac_dir=.
4282   $as_executable_p "$ac_dir/$ac_word" || continue
4283 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4284 echo "$as_me:4284: found $ac_dir/$ac_word" >&5
4285 break
4286 done
4287
4288 fi
4289 fi
4290 RANLIB=$ac_cv_prog_RANLIB
4291 if test -n "$RANLIB"; then
4292   echo "$as_me:4292: result: $RANLIB" >&5
4293 echo "${ECHO_T}$RANLIB" >&6
4294 else
4295   echo "$as_me:4295: result: no" >&5
4296 echo "${ECHO_T}no" >&6
4297 fi
4298
4299 fi
4300 if test -z "$ac_cv_prog_RANLIB"; then
4301   ac_ct_RANLIB=$RANLIB
4302   # Extract the first word of "ranlib", so it can be a program name with args.
4303 set dummy ranlib; ac_word=$2
4304 echo "$as_me:4304: checking for $ac_word" >&5
4305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4306 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4307   echo $ECHO_N "(cached) $ECHO_C" >&6
4308 else
4309   if test -n "$ac_ct_RANLIB"; then
4310   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4311 else
4312   ac_save_IFS=$IFS; IFS=$ac_path_separator
4313 ac_dummy="$PATH"
4314 for ac_dir in $ac_dummy; do
4315   IFS=$ac_save_IFS
4316   test -z "$ac_dir" && ac_dir=.
4317   $as_executable_p "$ac_dir/$ac_word" || continue
4318 ac_cv_prog_ac_ct_RANLIB="ranlib"
4319 echo "$as_me:4319: found $ac_dir/$ac_word" >&5
4320 break
4321 done
4322
4323   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4324 fi
4325 fi
4326 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4327 if test -n "$ac_ct_RANLIB"; then
4328   echo "$as_me:4328: result: $ac_ct_RANLIB" >&5
4329 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4330 else
4331   echo "$as_me:4331: result: no" >&5
4332 echo "${ECHO_T}no" >&6
4333 fi
4334
4335   RANLIB=$ac_ct_RANLIB
4336 else
4337   RANLIB="$ac_cv_prog_RANLIB"
4338 fi
4339
4340 if test -n "$ac_tool_prefix"; then
4341   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4342 set dummy ${ac_tool_prefix}ld; ac_word=$2
4343 echo "$as_me:4343: checking for $ac_word" >&5
4344 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4345 if test "${ac_cv_prog_LD+set}" = set; then
4346   echo $ECHO_N "(cached) $ECHO_C" >&6
4347 else
4348   if test -n "$LD"; then
4349   ac_cv_prog_LD="$LD" # Let the user override the test.
4350 else
4351   ac_save_IFS=$IFS; IFS=$ac_path_separator
4352 ac_dummy="$PATH"
4353 for ac_dir in $ac_dummy; do
4354   IFS=$ac_save_IFS
4355   test -z "$ac_dir" && ac_dir=.
4356   $as_executable_p "$ac_dir/$ac_word" || continue
4357 ac_cv_prog_LD="${ac_tool_prefix}ld"
4358 echo "$as_me:4358: found $ac_dir/$ac_word" >&5
4359 break
4360 done
4361
4362 fi
4363 fi
4364 LD=$ac_cv_prog_LD
4365 if test -n "$LD"; then
4366   echo "$as_me:4366: result: $LD" >&5
4367 echo "${ECHO_T}$LD" >&6
4368 else
4369   echo "$as_me:4369: result: no" >&5
4370 echo "${ECHO_T}no" >&6
4371 fi
4372
4373 fi
4374 if test -z "$ac_cv_prog_LD"; then
4375   ac_ct_LD=$LD
4376   # Extract the first word of "ld", so it can be a program name with args.
4377 set dummy ld; ac_word=$2
4378 echo "$as_me:4378: checking for $ac_word" >&5
4379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4380 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4381   echo $ECHO_N "(cached) $ECHO_C" >&6
4382 else
4383   if test -n "$ac_ct_LD"; then
4384   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4385 else
4386   ac_save_IFS=$IFS; IFS=$ac_path_separator
4387 ac_dummy="$PATH"
4388 for ac_dir in $ac_dummy; do
4389   IFS=$ac_save_IFS
4390   test -z "$ac_dir" && ac_dir=.
4391   $as_executable_p "$ac_dir/$ac_word" || continue
4392 ac_cv_prog_ac_ct_LD="ld"
4393 echo "$as_me:4393: found $ac_dir/$ac_word" >&5
4394 break
4395 done
4396
4397   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4398 fi
4399 fi
4400 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4401 if test -n "$ac_ct_LD"; then
4402   echo "$as_me:4402: result: $ac_ct_LD" >&5
4403 echo "${ECHO_T}$ac_ct_LD" >&6
4404 else
4405   echo "$as_me:4405: result: no" >&5
4406 echo "${ECHO_T}no" >&6
4407 fi
4408
4409   LD=$ac_ct_LD
4410 else
4411   LD="$ac_cv_prog_LD"
4412 fi
4413
4414 if test -n "$ac_tool_prefix"; then
4415   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4416 set dummy ${ac_tool_prefix}ar; ac_word=$2
4417 echo "$as_me:4417: checking for $ac_word" >&5
4418 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4419 if test "${ac_cv_prog_AR+set}" = set; then
4420   echo $ECHO_N "(cached) $ECHO_C" >&6
4421 else
4422   if test -n "$AR"; then
4423   ac_cv_prog_AR="$AR" # Let the user override the test.
4424 else
4425   ac_save_IFS=$IFS; IFS=$ac_path_separator
4426 ac_dummy="$PATH"
4427 for ac_dir in $ac_dummy; do
4428   IFS=$ac_save_IFS
4429   test -z "$ac_dir" && ac_dir=.
4430   $as_executable_p "$ac_dir/$ac_word" || continue
4431 ac_cv_prog_AR="${ac_tool_prefix}ar"
4432 echo "$as_me:4432: found $ac_dir/$ac_word" >&5
4433 break
4434 done
4435
4436 fi
4437 fi
4438 AR=$ac_cv_prog_AR
4439 if test -n "$AR"; then
4440   echo "$as_me:4440: result: $AR" >&5
4441 echo "${ECHO_T}$AR" >&6
4442 else
4443   echo "$as_me:4443: result: no" >&5
4444 echo "${ECHO_T}no" >&6
4445 fi
4446
4447 fi
4448 if test -z "$ac_cv_prog_AR"; then
4449   ac_ct_AR=$AR
4450   # Extract the first word of "ar", so it can be a program name with args.
4451 set dummy ar; ac_word=$2
4452 echo "$as_me:4452: checking for $ac_word" >&5
4453 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4454 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4455   echo $ECHO_N "(cached) $ECHO_C" >&6
4456 else
4457   if test -n "$ac_ct_AR"; then
4458   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4459 else
4460   ac_save_IFS=$IFS; IFS=$ac_path_separator
4461 ac_dummy="$PATH"
4462 for ac_dir in $ac_dummy; do
4463   IFS=$ac_save_IFS
4464   test -z "$ac_dir" && ac_dir=.
4465   $as_executable_p "$ac_dir/$ac_word" || continue
4466 ac_cv_prog_ac_ct_AR="ar"
4467 echo "$as_me:4467: found $ac_dir/$ac_word" >&5
4468 break
4469 done
4470
4471   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4472 fi
4473 fi
4474 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4475 if test -n "$ac_ct_AR"; then
4476   echo "$as_me:4476: result: $ac_ct_AR" >&5
4477 echo "${ECHO_T}$ac_ct_AR" >&6
4478 else
4479   echo "$as_me:4479: result: no" >&5
4480 echo "${ECHO_T}no" >&6
4481 fi
4482
4483   AR=$ac_ct_AR
4484 else
4485   AR="$ac_cv_prog_AR"
4486 fi
4487
4488 if test -n "$ac_tool_prefix"; then
4489   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4490 set dummy ${ac_tool_prefix}nm; ac_word=$2
4491 echo "$as_me:4491: checking for $ac_word" >&5
4492 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4493 if test "${ac_cv_prog_NM+set}" = set; then
4494   echo $ECHO_N "(cached) $ECHO_C" >&6
4495 else
4496   if test -n "$NM"; then
4497   ac_cv_prog_NM="$NM" # Let the user override the test.
4498 else
4499   ac_save_IFS=$IFS; IFS=$ac_path_separator
4500 ac_dummy="$PATH"
4501 for ac_dir in $ac_dummy; do
4502   IFS=$ac_save_IFS
4503   test -z "$ac_dir" && ac_dir=.
4504   $as_executable_p "$ac_dir/$ac_word" || continue
4505 ac_cv_prog_NM="${ac_tool_prefix}nm"
4506 echo "$as_me:4506: found $ac_dir/$ac_word" >&5
4507 break
4508 done
4509
4510 fi
4511 fi
4512 NM=$ac_cv_prog_NM
4513 if test -n "$NM"; then
4514   echo "$as_me:4514: result: $NM" >&5
4515 echo "${ECHO_T}$NM" >&6
4516 else
4517   echo "$as_me:4517: result: no" >&5
4518 echo "${ECHO_T}no" >&6
4519 fi
4520
4521 fi
4522 if test -z "$ac_cv_prog_NM"; then
4523   ac_ct_NM=$NM
4524   # Extract the first word of "nm", so it can be a program name with args.
4525 set dummy nm; ac_word=$2
4526 echo "$as_me:4526: checking for $ac_word" >&5
4527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4528 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4529   echo $ECHO_N "(cached) $ECHO_C" >&6
4530 else
4531   if test -n "$ac_ct_NM"; then
4532   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4533 else
4534   ac_save_IFS=$IFS; IFS=$ac_path_separator
4535 ac_dummy="$PATH"
4536 for ac_dir in $ac_dummy; do
4537   IFS=$ac_save_IFS
4538   test -z "$ac_dir" && ac_dir=.
4539   $as_executable_p "$ac_dir/$ac_word" || continue
4540 ac_cv_prog_ac_ct_NM="nm"
4541 echo "$as_me:4541: found $ac_dir/$ac_word" >&5
4542 break
4543 done
4544
4545   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4546 fi
4547 fi
4548 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4549 if test -n "$ac_ct_NM"; then
4550   echo "$as_me:4550: result: $ac_ct_NM" >&5
4551 echo "${ECHO_T}$ac_ct_NM" >&6
4552 else
4553   echo "$as_me:4553: result: no" >&5
4554 echo "${ECHO_T}no" >&6
4555 fi
4556
4557   NM=$ac_ct_NM
4558 else
4559   NM="$ac_cv_prog_NM"
4560 fi
4561
4562 if test -n "$ac_tool_prefix"; then
4563   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4564 set dummy ${ac_tool_prefix}ar; ac_word=$2
4565 echo "$as_me:4565: checking for $ac_word" >&5
4566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4567 if test "${ac_cv_prog_AR+set}" = set; then
4568   echo $ECHO_N "(cached) $ECHO_C" >&6
4569 else
4570   if test -n "$AR"; then
4571   ac_cv_prog_AR="$AR" # Let the user override the test.
4572 else
4573   ac_save_IFS=$IFS; IFS=$ac_path_separator
4574 ac_dummy="$PATH"
4575 for ac_dir in $ac_dummy; do
4576   IFS=$ac_save_IFS
4577   test -z "$ac_dir" && ac_dir=.
4578   $as_executable_p "$ac_dir/$ac_word" || continue
4579 ac_cv_prog_AR="${ac_tool_prefix}ar"
4580 echo "$as_me:4580: found $ac_dir/$ac_word" >&5
4581 break
4582 done
4583
4584 fi
4585 fi
4586 AR=$ac_cv_prog_AR
4587 if test -n "$AR"; then
4588   echo "$as_me:4588: result: $AR" >&5
4589 echo "${ECHO_T}$AR" >&6
4590 else
4591   echo "$as_me:4591: result: no" >&5
4592 echo "${ECHO_T}no" >&6
4593 fi
4594
4595 fi
4596 if test -z "$ac_cv_prog_AR"; then
4597   ac_ct_AR=$AR
4598   # Extract the first word of "ar", so it can be a program name with args.
4599 set dummy ar; ac_word=$2
4600 echo "$as_me:4600: checking for $ac_word" >&5
4601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4602 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4603   echo $ECHO_N "(cached) $ECHO_C" >&6
4604 else
4605   if test -n "$ac_ct_AR"; then
4606   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4607 else
4608   ac_save_IFS=$IFS; IFS=$ac_path_separator
4609 ac_dummy="$PATH"
4610 for ac_dir in $ac_dummy; do
4611   IFS=$ac_save_IFS
4612   test -z "$ac_dir" && ac_dir=.
4613   $as_executable_p "$ac_dir/$ac_word" || continue
4614 ac_cv_prog_ac_ct_AR="ar"
4615 echo "$as_me:4615: found $ac_dir/$ac_word" >&5
4616 break
4617 done
4618
4619   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4620 fi
4621 fi
4622 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4623 if test -n "$ac_ct_AR"; then
4624   echo "$as_me:4624: result: $ac_ct_AR" >&5
4625 echo "${ECHO_T}$ac_ct_AR" >&6
4626 else
4627   echo "$as_me:4627: result: no" >&5
4628 echo "${ECHO_T}no" >&6
4629 fi
4630
4631   AR=$ac_ct_AR
4632 else
4633   AR="$ac_cv_prog_AR"
4634 fi
4635
4636 echo "$as_me:4636: checking for options to update archives" >&5
4637 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4638 if test "${cf_cv_ar_flags+set}" = set; then
4639   echo $ECHO_N "(cached) $ECHO_C" >&6
4640 else
4641
4642         cf_cv_ar_flags=unknown
4643         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4644         do
4645
4646                 # check if $ARFLAGS already contains this choice
4647                 if test "x$ARFLAGS" != "x" ; then
4648                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4649                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4650                                 cf_cv_ar_flags=
4651                                 break
4652                         fi
4653                 fi
4654
4655                 rm -f conftest.$ac_cv_objext
4656                 rm -f conftest.a
4657
4658                 cat >conftest.$ac_ext <<EOF
4659 #line 4659 "configure"
4660 int     testdata[3] = { 123, 456, 789 };
4661 EOF
4662                 if { (eval echo "$as_me:4662: \"$ac_compile\"") >&5
4663   (eval $ac_compile) 2>&5
4664   ac_status=$?
4665   echo "$as_me:4665: \$? = $ac_status" >&5
4666   (exit $ac_status); } ; then
4667                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4668                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4669                         if test -f conftest.a ; then
4670                                 cf_cv_ar_flags=$cf_ar_flags
4671                                 break
4672                         fi
4673                 else
4674                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4675
4676 echo "${as_me:-configure}:4676: testing cannot compile test-program ..." 1>&5
4677
4678                         break
4679                 fi
4680         done
4681         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4682
4683 fi
4684 echo "$as_me:4684: result: $cf_cv_ar_flags" >&5
4685 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4686
4687 if test -n "$ARFLAGS" ; then
4688         if test -n "$cf_cv_ar_flags" ; then
4689                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4690         fi
4691 else
4692         ARFLAGS=$cf_cv_ar_flags
4693 fi
4694
4695 echo "$as_me:4695: checking if you have specified an install-prefix" >&5
4696 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4697
4698 # Check whether --with-install-prefix or --without-install-prefix was given.
4699 if test "${with_install_prefix+set}" = set; then
4700   withval="$with_install_prefix"
4701   case "x$withval" in
4702         (xyes|xno)
4703                 ;;
4704         (*)     DESTDIR="$withval"
4705                 ;;
4706         esac
4707 fi;
4708 echo "$as_me:4708: result: $DESTDIR" >&5
4709 echo "${ECHO_T}$DESTDIR" >&6
4710
4711 ###############################################################################
4712
4713 # If we're cross-compiling, allow the user to override the tools and their
4714 # options.  The configure script is oriented toward identifying the host
4715 # compiler, etc., but we need a build compiler to generate parts of the source.
4716
4717 if test "$cross_compiling" = yes ; then
4718
4719         # defaults that we might want to override
4720         : ${BUILD_CFLAGS:=''}
4721         : ${BUILD_CPPFLAGS:=''}
4722         : ${BUILD_LDFLAGS:=''}
4723         : ${BUILD_LIBS:=''}
4724         : ${BUILD_EXEEXT:='$x'}
4725         : ${BUILD_OBJEXT:='o'}
4726
4727 # Check whether --with-build-cc or --without-build-cc was given.
4728 if test "${with_build_cc+set}" = set; then
4729   withval="$with_build_cc"
4730   BUILD_CC="$withval"
4731 else
4732   for ac_prog in gcc clang c99 c89 cc cl
4733 do
4734   # Extract the first word of "$ac_prog", so it can be a program name with args.
4735 set dummy $ac_prog; ac_word=$2
4736 echo "$as_me:4736: checking for $ac_word" >&5
4737 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4738 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4739   echo $ECHO_N "(cached) $ECHO_C" >&6
4740 else
4741   if test -n "$BUILD_CC"; then
4742   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4743 else
4744   ac_save_IFS=$IFS; IFS=$ac_path_separator
4745 ac_dummy="$PATH"
4746 for ac_dir in $ac_dummy; do
4747   IFS=$ac_save_IFS
4748   test -z "$ac_dir" && ac_dir=.
4749   $as_executable_p "$ac_dir/$ac_word" || continue
4750 ac_cv_prog_BUILD_CC="$ac_prog"
4751 echo "$as_me:4751: found $ac_dir/$ac_word" >&5
4752 break
4753 done
4754
4755 fi
4756 fi
4757 BUILD_CC=$ac_cv_prog_BUILD_CC
4758 if test -n "$BUILD_CC"; then
4759   echo "$as_me:4759: result: $BUILD_CC" >&5
4760 echo "${ECHO_T}$BUILD_CC" >&6
4761 else
4762   echo "$as_me:4762: result: no" >&5
4763 echo "${ECHO_T}no" >&6
4764 fi
4765
4766   test -n "$BUILD_CC" && break
4767 done
4768 test -n "$BUILD_CC" || BUILD_CC="none"
4769
4770 fi;
4771         echo "$as_me:4771: checking for native build C compiler" >&5
4772 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4773         echo "$as_me:4773: result: $BUILD_CC" >&5
4774 echo "${ECHO_T}$BUILD_CC" >&6
4775
4776         echo "$as_me:4776: checking for native build C preprocessor" >&5
4777 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4778
4779 # Check whether --with-build-cpp or --without-build-cpp was given.
4780 if test "${with_build_cpp+set}" = set; then
4781   withval="$with_build_cpp"
4782   BUILD_CPP="$withval"
4783 else
4784   BUILD_CPP='${BUILD_CC} -E'
4785 fi;
4786         echo "$as_me:4786: result: $BUILD_CPP" >&5
4787 echo "${ECHO_T}$BUILD_CPP" >&6
4788
4789         echo "$as_me:4789: checking for native build C flags" >&5
4790 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4791
4792 # Check whether --with-build-cflags or --without-build-cflags was given.
4793 if test "${with_build_cflags+set}" = set; then
4794   withval="$with_build_cflags"
4795   BUILD_CFLAGS="$withval"
4796 fi;
4797         echo "$as_me:4797: result: $BUILD_CFLAGS" >&5
4798 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4799
4800         echo "$as_me:4800: checking for native build C preprocessor-flags" >&5
4801 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4802
4803 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4804 if test "${with_build_cppflags+set}" = set; then
4805   withval="$with_build_cppflags"
4806   BUILD_CPPFLAGS="$withval"
4807 fi;
4808         echo "$as_me:4808: result: $BUILD_CPPFLAGS" >&5
4809 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4810
4811         echo "$as_me:4811: checking for native build linker-flags" >&5
4812 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4813
4814 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4815 if test "${with_build_ldflags+set}" = set; then
4816   withval="$with_build_ldflags"
4817   BUILD_LDFLAGS="$withval"
4818 fi;
4819         echo "$as_me:4819: result: $BUILD_LDFLAGS" >&5
4820 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4821
4822         echo "$as_me:4822: checking for native build linker-libraries" >&5
4823 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4824
4825 # Check whether --with-build-libs or --without-build-libs was given.
4826 if test "${with_build_libs+set}" = set; then
4827   withval="$with_build_libs"
4828   BUILD_LIBS="$withval"
4829 fi;
4830         echo "$as_me:4830: result: $BUILD_LIBS" >&5
4831 echo "${ECHO_T}$BUILD_LIBS" >&6
4832
4833         # this assumes we're on Unix.
4834         BUILD_EXEEXT=
4835         BUILD_OBJEXT=o
4836
4837         : ${BUILD_CC:='${CC}'}
4838
4839         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4840                 { { echo "$as_me:4840: error: Cross-build requires two compilers.
4841 Use --with-build-cc to specify the native compiler." >&5
4842 echo "$as_me: error: Cross-build requires two compilers.
4843 Use --with-build-cc to specify the native compiler." >&2;}
4844    { (exit 1); exit 1; }; }
4845         fi
4846
4847 else
4848         : ${BUILD_CC:='${CC}'}
4849         : ${BUILD_CPP:='${CPP}'}
4850         : ${BUILD_CFLAGS:='${CFLAGS}'}
4851         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4852         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4853         : ${BUILD_LIBS:='${LIBS}'}
4854         : ${BUILD_EXEEXT:='$x'}
4855         : ${BUILD_OBJEXT:='o'}
4856 fi
4857
4858 ###############################################################################
4859
4860 ### Options to allow the user to specify the set of libraries which are used.
4861 ### Use "--without-normal --with-shared" to allow the default model to be
4862 ### shared, for example.
4863 cf_list_models=""
4864
4865 echo "$as_me:4865: checking if libtool -version-number should be used" >&5
4866 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4867
4868 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4869 if test "${enable_libtool_version+set}" = set; then
4870   enableval="$enable_libtool_version"
4871   test "$enableval" != no && enableval=yes
4872         if test "$enableval" != "yes" ; then
4873     cf_libtool_version=no
4874         else
4875                 cf_libtool_version=yes
4876         fi
4877 else
4878   enableval=yes
4879         cf_libtool_version=yes
4880
4881 fi;
4882 echo "$as_me:4882: result: $cf_libtool_version" >&5
4883 echo "${ECHO_T}$cf_libtool_version" >&6
4884
4885 if test "$cf_libtool_version" = yes ; then
4886         LIBTOOL_VERSION="-version-number"
4887 else
4888         LIBTOOL_VERSION="-version-info"
4889         case "x$VERSION" in
4890         (x)
4891                 { echo "$as_me:4891: WARNING: VERSION was not set" >&5
4892 echo "$as_me: WARNING: VERSION was not set" >&2;}
4893                 ;;
4894         (x*.*.*)
4895                 ABI_VERSION="$VERSION"
4896                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4897
4898 echo "${as_me:-configure}:4898: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4899
4900                 ;;
4901         (x*:*:*)
4902                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4903                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4904
4905 echo "${as_me:-configure}:4905: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4906
4907                 ;;
4908         (*)
4909                 { echo "$as_me:4909: WARNING: unexpected VERSION value: $VERSION" >&5
4910 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4911                 ;;
4912         esac
4913 fi
4914
4915 LIBTOOL=
4916
4917 # common library maintenance symbols that are convenient for libtool scripts:
4918 LIB_CREATE='${AR} -cr'
4919 LIB_OBJECT='${OBJECTS}'
4920 LIB_SUFFIX=.a
4921 LIB_PREP="$RANLIB"
4922
4923 # symbols used to prop libtool up to enable it to determine what it should be
4924 # doing:
4925 LIB_CLEAN=
4926 LIB_COMPILE=
4927 LIB_LINK='${CC}'
4928 LIB_INSTALL=
4929 LIB_UNINSTALL=
4930
4931 echo "$as_me:4931: checking if you want to build libraries with libtool" >&5
4932 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4933
4934 # Check whether --with-libtool or --without-libtool was given.
4935 if test "${with_libtool+set}" = set; then
4936   withval="$with_libtool"
4937   with_libtool=$withval
4938 else
4939   with_libtool=no
4940 fi;
4941 echo "$as_me:4941: result: $with_libtool" >&5
4942 echo "${ECHO_T}$with_libtool" >&6
4943 if test "$with_libtool" != "no"; then
4944
4945         if test "$with_libtool" != "yes" ; then
4946
4947 if test "x$prefix" != xNONE; then
4948         cf_path_syntax="$prefix"
4949 else
4950         cf_path_syntax="$ac_default_prefix"
4951 fi
4952
4953 case ".$with_libtool" in
4954 (.\$\(*\)*|.\'*\'*)
4955         ;;
4956 (..|./*|.\\*)
4957         ;;
4958 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4959         ;;
4960 (.\${*prefix}*|.\${*dir}*)
4961         eval with_libtool="$with_libtool"
4962         case ".$with_libtool" in
4963         (.NONE/*)
4964                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4965                 ;;
4966         esac
4967         ;;
4968 (.no|.NONE/*)
4969         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4970         ;;
4971 (*)
4972         { { echo "$as_me:4972: error: expected a pathname, not \"$with_libtool\"" >&5
4973 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4974    { (exit 1); exit 1; }; }
4975         ;;
4976 esac
4977
4978                 LIBTOOL=$with_libtool
4979         else
4980                 if test -n "$ac_tool_prefix"; then
4981   for ac_prog in libtool glibtool
4982   do
4983     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4984 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4985 echo "$as_me:4985: checking for $ac_word" >&5
4986 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4987 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4988   echo $ECHO_N "(cached) $ECHO_C" >&6
4989 else
4990   if test -n "$LIBTOOL"; then
4991   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4992 else
4993   ac_save_IFS=$IFS; IFS=$ac_path_separator
4994 ac_dummy="$PATH"
4995 for ac_dir in $ac_dummy; do
4996   IFS=$ac_save_IFS
4997   test -z "$ac_dir" && ac_dir=.
4998   $as_executable_p "$ac_dir/$ac_word" || continue
4999 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5000 echo "$as_me:5000: found $ac_dir/$ac_word" >&5
5001 break
5002 done
5003
5004 fi
5005 fi
5006 LIBTOOL=$ac_cv_prog_LIBTOOL
5007 if test -n "$LIBTOOL"; then
5008   echo "$as_me:5008: result: $LIBTOOL" >&5
5009 echo "${ECHO_T}$LIBTOOL" >&6
5010 else
5011   echo "$as_me:5011: result: no" >&5
5012 echo "${ECHO_T}no" >&6
5013 fi
5014
5015     test -n "$LIBTOOL" && break
5016   done
5017 fi
5018 if test -z "$LIBTOOL"; then
5019   ac_ct_LIBTOOL=$LIBTOOL
5020   for ac_prog in libtool glibtool
5021 do
5022   # Extract the first word of "$ac_prog", so it can be a program name with args.
5023 set dummy $ac_prog; ac_word=$2
5024 echo "$as_me:5024: checking for $ac_word" >&5
5025 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5026 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5027   echo $ECHO_N "(cached) $ECHO_C" >&6
5028 else
5029   if test -n "$ac_ct_LIBTOOL"; then
5030   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5031 else
5032   ac_save_IFS=$IFS; IFS=$ac_path_separator
5033 ac_dummy="$PATH"
5034 for ac_dir in $ac_dummy; do
5035   IFS=$ac_save_IFS
5036   test -z "$ac_dir" && ac_dir=.
5037   $as_executable_p "$ac_dir/$ac_word" || continue
5038 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5039 echo "$as_me:5039: found $ac_dir/$ac_word" >&5
5040 break
5041 done
5042
5043 fi
5044 fi
5045 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5046 if test -n "$ac_ct_LIBTOOL"; then
5047   echo "$as_me:5047: result: $ac_ct_LIBTOOL" >&5
5048 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5049 else
5050   echo "$as_me:5050: result: no" >&5
5051 echo "${ECHO_T}no" >&6
5052 fi
5053
5054   test -n "$ac_ct_LIBTOOL" && break
5055 done
5056 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5057
5058   LIBTOOL=$ac_ct_LIBTOOL
5059 fi
5060
5061 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5062 then
5063         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.].*//'`
5064 else
5065         cf_cv_libtool_version=
5066 fi
5067 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5068
5069                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5070                 then
5071
5072 unset ac_cv_prog_ac_ct_LIBTOOL
5073 unset ac_ct_LIBTOOL
5074 unset LIBTOOL
5075
5076                         if test -n "$ac_tool_prefix"; then
5077   for ac_prog in glibtool
5078   do
5079     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5080 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5081 echo "$as_me:5081: checking for $ac_word" >&5
5082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5083 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5084   echo $ECHO_N "(cached) $ECHO_C" >&6
5085 else
5086   if test -n "$LIBTOOL"; then
5087   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5088 else
5089   ac_save_IFS=$IFS; IFS=$ac_path_separator
5090 ac_dummy="$PATH"
5091 for ac_dir in $ac_dummy; do
5092   IFS=$ac_save_IFS
5093   test -z "$ac_dir" && ac_dir=.
5094   $as_executable_p "$ac_dir/$ac_word" || continue
5095 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5096 echo "$as_me:5096: found $ac_dir/$ac_word" >&5
5097 break
5098 done
5099
5100 fi
5101 fi
5102 LIBTOOL=$ac_cv_prog_LIBTOOL
5103 if test -n "$LIBTOOL"; then
5104   echo "$as_me:5104: result: $LIBTOOL" >&5
5105 echo "${ECHO_T}$LIBTOOL" >&6
5106 else
5107   echo "$as_me:5107: result: no" >&5
5108 echo "${ECHO_T}no" >&6
5109 fi
5110
5111     test -n "$LIBTOOL" && break
5112   done
5113 fi
5114 if test -z "$LIBTOOL"; then
5115   ac_ct_LIBTOOL=$LIBTOOL
5116   for ac_prog in glibtool
5117 do
5118   # Extract the first word of "$ac_prog", so it can be a program name with args.
5119 set dummy $ac_prog; ac_word=$2
5120 echo "$as_me:5120: checking for $ac_word" >&5
5121 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5122 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5123   echo $ECHO_N "(cached) $ECHO_C" >&6
5124 else
5125   if test -n "$ac_ct_LIBTOOL"; then
5126   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5127 else
5128   ac_save_IFS=$IFS; IFS=$ac_path_separator
5129 ac_dummy="$PATH"
5130 for ac_dir in $ac_dummy; do
5131   IFS=$ac_save_IFS
5132   test -z "$ac_dir" && ac_dir=.
5133   $as_executable_p "$ac_dir/$ac_word" || continue
5134 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5135 echo "$as_me:5135: found $ac_dir/$ac_word" >&5
5136 break
5137 done
5138
5139 fi
5140 fi
5141 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5142 if test -n "$ac_ct_LIBTOOL"; then
5143   echo "$as_me:5143: result: $ac_ct_LIBTOOL" >&5
5144 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5145 else
5146   echo "$as_me:5146: result: no" >&5
5147 echo "${ECHO_T}no" >&6
5148 fi
5149
5150   test -n "$ac_ct_LIBTOOL" && break
5151 done
5152 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5153
5154   LIBTOOL=$ac_ct_LIBTOOL
5155 fi
5156
5157 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5158 then
5159         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.].*//'`
5160 else
5161         cf_cv_libtool_version=
5162 fi
5163 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5164
5165                 fi
5166         fi
5167         if test -z "$LIBTOOL" ; then
5168                 { { echo "$as_me:5168: error: Cannot find libtool" >&5
5169 echo "$as_me: error: Cannot find libtool" >&2;}
5170    { (exit 1); exit 1; }; }
5171         fi
5172         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5173         LIB_OBJECT='${OBJECTS:.o=.lo}'
5174         LIB_SUFFIX=.la
5175         LIB_CLEAN='${LIBTOOL} --mode=clean'
5176         LIB_COMPILE='${LIBTOOL} --mode=compile'
5177         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5178         LIB_INSTALL='${LIBTOOL} --mode=install'
5179         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5180         LIB_PREP=:
5181
5182 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5183 then
5184         echo "$as_me:5184: checking version of $LIBTOOL" >&5
5185 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5186
5187 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5188 then
5189         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.].*//'`
5190 else
5191         cf_cv_libtool_version=
5192 fi
5193 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5194
5195         echo "$as_me:5195: result: $cf_cv_libtool_version" >&5
5196 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5197         if test -z "$cf_cv_libtool_version" ; then
5198                 { { echo "$as_me:5198: error: This is not GNU libtool" >&5
5199 echo "$as_me: error: This is not GNU libtool" >&2;}
5200    { (exit 1); exit 1; }; }
5201         fi
5202 else
5203         { { echo "$as_me:5203: error: GNU libtool has not been found" >&5
5204 echo "$as_me: error: GNU libtool has not been found" >&2;}
5205    { (exit 1); exit 1; }; }
5206 fi
5207
5208         # special hack to add -no-undefined (which libtool should do for itself)
5209         LT_UNDEF=
5210         case "$cf_cv_system_name" in
5211         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5212                 LT_UNDEF=-no-undefined
5213                 ;;
5214         esac
5215
5216         # special hack to add --tag option for C++ compiler
5217         case $cf_cv_libtool_version in
5218         (1.[5-9]*|[2-9].[0-9.a-z]*)
5219                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5220                 LIBTOOL="$LIBTOOL --tag=CC"
5221                 ;;
5222         (*)
5223                 LIBTOOL_CXX="$LIBTOOL"
5224                 ;;
5225         esac
5226 else
5227         LIBTOOL=""
5228         LIBTOOL_CXX=""
5229 fi
5230
5231 test -z "$LIBTOOL" && ECHO_LT=
5232
5233 if test "$with_libtool" != "no" ; then
5234
5235 cf_list_models="$cf_list_models libtool"
5236
5237 else
5238
5239 echo "$as_me:5239: checking if you want to build shared libraries" >&5
5240 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5241
5242 # Check whether --with-shared or --without-shared was given.
5243 if test "${with_shared+set}" = set; then
5244   withval="$with_shared"
5245   with_shared=$withval
5246 else
5247   with_shared=no
5248 fi;
5249 echo "$as_me:5249: result: $with_shared" >&5
5250 echo "${ECHO_T}$with_shared" >&6
5251 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5252
5253 echo "$as_me:5253: checking if you want to build static libraries" >&5
5254 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5255
5256 # Check whether --with-normal or --without-normal was given.
5257 if test "${with_normal+set}" = set; then
5258   withval="$with_normal"
5259   with_normal=$withval
5260 else
5261   with_normal=yes
5262 fi;
5263 echo "$as_me:5263: result: $with_normal" >&5
5264 echo "${ECHO_T}$with_normal" >&6
5265 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5266
5267 echo "$as_me:5267: checking if you want to build debug libraries" >&5
5268 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5269
5270 # Check whether --with-debug or --without-debug was given.
5271 if test "${with_debug+set}" = set; then
5272   withval="$with_debug"
5273   with_debug=$withval
5274 else
5275   with_debug=yes
5276 fi;
5277 echo "$as_me:5277: result: $with_debug" >&5
5278 echo "${ECHO_T}$with_debug" >&6
5279 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5280
5281 echo "$as_me:5281: checking if you want to build profiling libraries" >&5
5282 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5283
5284 # Check whether --with-profile or --without-profile was given.
5285 if test "${with_profile+set}" = set; then
5286   withval="$with_profile"
5287   with_profile=$withval
5288 else
5289   with_profile=no
5290 fi;
5291 echo "$as_me:5291: result: $with_profile" >&5
5292 echo "${ECHO_T}$with_profile" >&6
5293 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5294
5295 fi
5296
5297 if test "X$cf_with_cxx_binding" != Xno; then
5298 if test "x$with_shared" = "xyes"; then
5299 echo "$as_me:5299: checking if you want to build C++ shared libraries" >&5
5300 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5301
5302 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5303 if test "${with_cxx_shared+set}" = set; then
5304   withval="$with_cxx_shared"
5305   with_shared_cxx=$withval
5306 else
5307   with_shared_cxx=no
5308 fi;
5309 echo "$as_me:5309: result: $with_shared_cxx" >&5
5310 echo "${ECHO_T}$with_shared_cxx" >&6
5311 fi
5312 fi
5313
5314 ###############################################################################
5315
5316 echo "$as_me:5316: checking for specified models" >&5
5317 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5318 test -z "$cf_list_models" && cf_list_models=normal
5319 test "$with_libtool" != "no" && cf_list_models=libtool
5320 echo "$as_me:5320: result: $cf_list_models" >&5
5321 echo "${ECHO_T}$cf_list_models" >&6
5322
5323 ### Use the first model as the default, and save its suffix for use in building
5324 ### up test-applications.
5325 echo "$as_me:5325: checking for default model" >&5
5326 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5327 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5328 echo "$as_me:5328: result: $DFT_LWR_MODEL" >&5
5329 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5330
5331 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5332
5333 TICS_NAME=tic
5334
5335 TINFO_NAME=tinfo
5336
5337 LIB_NAME=ncurses
5338
5339 LIB_DIR=../lib
5340 LIB_2ND=../../lib
5341
5342 echo "$as_me:5342: checking if you want to have a library-prefix" >&5
5343 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5344
5345 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5346 if test "${with_lib_prefix+set}" = set; then
5347   withval="$with_lib_prefix"
5348   with_lib_prefix=$withval
5349 else
5350   with_lib_prefix=auto
5351 fi;
5352 echo "$as_me:5352: result: $with_lib_prefix" >&5
5353 echo "${ECHO_T}$with_lib_prefix" >&6
5354
5355 if test $with_lib_prefix = auto
5356 then
5357
5358         case $cf_cv_system_name in
5359         (OS/2*|os2*)
5360                 if test "$DFT_LWR_MODEL" = libtool; then
5361                         LIB_PREFIX='lib'
5362                 else
5363                         LIB_PREFIX=''
5364                 fi
5365                 ;;
5366         (*)     LIB_PREFIX='lib'
5367                 ;;
5368         esac
5369 cf_prefix=$LIB_PREFIX
5370
5371 elif test $with_lib_prefix = no
5372 then
5373         LIB_PREFIX=
5374 else
5375         LIB_PREFIX=$with_lib_prefix
5376 fi
5377
5378 LIB_SUFFIX=
5379
5380         echo "$as_me:5380: checking for PATH separator" >&5
5381 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5382         case $cf_cv_system_name in
5383         (os2*)  PATH_SEPARATOR=';'  ;;
5384         (*)     ${PATH_SEPARATOR:=':'}  ;;
5385         esac
5386
5387         echo "$as_me:5387: result: $PATH_SEPARATOR" >&5
5388 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5389
5390 ###############################################################################
5391
5392 echo "$as_me:5392: checking if you want to build a separate terminfo library" >&5
5393 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5394
5395 # Check whether --with-termlib or --without-termlib was given.
5396 if test "${with_termlib+set}" = set; then
5397   withval="$with_termlib"
5398   with_termlib=$withval
5399 else
5400   with_termlib=no
5401 fi;
5402 echo "$as_me:5402: result: $with_termlib" >&5
5403 echo "${ECHO_T}$with_termlib" >&6
5404
5405 echo "$as_me:5405: checking if you want to build a separate tic library" >&5
5406 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5407
5408 # Check whether --with-ticlib or --without-ticlib was given.
5409 if test "${with_ticlib+set}" = set; then
5410   withval="$with_ticlib"
5411   with_ticlib=$withval
5412 else
5413   with_ticlib=no
5414 fi;
5415 echo "$as_me:5415: result: $with_ticlib" >&5
5416 echo "${ECHO_T}$with_ticlib" >&6
5417
5418 if test X"$CC_G_OPT" = X"" ; then
5419         CC_G_OPT='-g'
5420         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5421 fi
5422
5423 if test X"$CXX_G_OPT" = X"" ; then
5424         CXX_G_OPT='-g'
5425         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5426 fi
5427
5428 echo "$as_me:5428: checking for default loader flags" >&5
5429 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5430 case $DFT_LWR_MODEL in
5431 (libtool) LD_MODEL=''   ;;
5432 (normal)  LD_MODEL=''   ;;
5433 (debug)   LD_MODEL=$CC_G_OPT ;;
5434 (profile) LD_MODEL='-pg';;
5435 (shared)  LD_MODEL=''   ;;
5436 esac
5437 echo "$as_me:5437: result: $LD_MODEL" >&5
5438 echo "${ECHO_T}$LD_MODEL" >&6
5439
5440 case $DFT_LWR_MODEL in
5441 (shared)
5442
5443 echo "$as_me:5443: checking if rpath option should be used" >&5
5444 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5445
5446 # Check whether --enable-rpath or --disable-rpath was given.
5447 if test "${enable_rpath+set}" = set; then
5448   enableval="$enable_rpath"
5449   cf_cv_enable_rpath=$enableval
5450 else
5451   cf_cv_enable_rpath=no
5452 fi;
5453 echo "$as_me:5453: result: $cf_cv_enable_rpath" >&5
5454 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5455
5456 echo "$as_me:5456: checking if shared libraries should be relinked during install" >&5
5457 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5458
5459 # Check whether --enable-relink or --disable-relink was given.
5460 if test "${enable_relink+set}" = set; then
5461   enableval="$enable_relink"
5462   cf_cv_do_relink=$enableval
5463 else
5464   cf_cv_do_relink=yes
5465 fi;
5466 echo "$as_me:5466: result: $cf_cv_do_relink" >&5
5467 echo "${ECHO_T}$cf_cv_do_relink" >&6
5468         ;;
5469 esac
5470
5471 # we will build libraries one-level down.
5472 rel_builddir=..
5473
5474 LD_RPATH_OPT=
5475 if test "x$cf_cv_enable_rpath" != xno
5476 then
5477         echo "$as_me:5477: checking for an rpath option" >&5
5478 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5479         case $cf_cv_system_name in
5480         (irix*)
5481                 if test "$GCC" = yes; then
5482                         LD_RPATH_OPT="-Wl,-rpath,"
5483                 else
5484                         LD_RPATH_OPT="-rpath "
5485                 fi
5486                 ;;
5487         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5488                 LD_RPATH_OPT="-Wl,-rpath,"
5489                 ;;
5490         (openbsd[2-9].*|mirbsd*)
5491                 LD_RPATH_OPT="-Wl,-rpath,"
5492                 ;;
5493         (dragonfly*)
5494                 LD_RPATH_OPT="-rpath "
5495                 ;;
5496         (netbsd*)
5497                 LD_RPATH_OPT="-Wl,-rpath,"
5498                 ;;
5499         (osf*|mls+*)
5500                 LD_RPATH_OPT="-rpath "
5501                 ;;
5502         (solaris2*)
5503                 LD_RPATH_OPT="-R"
5504                 ;;
5505         (*)
5506                 ;;
5507         esac
5508         echo "$as_me:5508: result: $LD_RPATH_OPT" >&5
5509 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5510
5511         case "x$LD_RPATH_OPT" in
5512         (x-R*)
5513                 echo "$as_me:5513: checking if we need a space after rpath option" >&5
5514 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5515                 cf_save_LIBS="$LIBS"
5516
5517 cf_add_libs="${LD_RPATH_OPT}$libdir"
5518 # Filter out duplicates - this happens with badly-designed ".pc" files...
5519 for cf_add_1lib in $LIBS
5520 do
5521         for cf_add_2lib in $cf_add_libs
5522         do
5523                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5524                 then
5525                         cf_add_1lib=
5526                         break
5527                 fi
5528         done
5529         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5530 done
5531 LIBS="$cf_add_libs"
5532
5533                 cat >conftest.$ac_ext <<_ACEOF
5534 #line 5534 "configure"
5535 #include "confdefs.h"
5536
5537 int
5538 main (void)
5539 {
5540
5541   ;
5542   return 0;
5543 }
5544 _ACEOF
5545 rm -f conftest.$ac_objext conftest$ac_exeext
5546 if { (eval echo "$as_me:5546: \"$ac_link\"") >&5
5547   (eval $ac_link) 2>&5
5548   ac_status=$?
5549   echo "$as_me:5549: \$? = $ac_status" >&5
5550   (exit $ac_status); } &&
5551          { ac_try='test -s conftest$ac_exeext'
5552   { (eval echo "$as_me:5552: \"$ac_try\"") >&5
5553   (eval $ac_try) 2>&5
5554   ac_status=$?
5555   echo "$as_me:5555: \$? = $ac_status" >&5
5556   (exit $ac_status); }; }; then
5557   cf_rpath_space=no
5558 else
5559   echo "$as_me: failed program was:" >&5
5560 cat conftest.$ac_ext >&5
5561 cf_rpath_space=yes
5562 fi
5563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5564                 LIBS="$cf_save_LIBS"
5565                 echo "$as_me:5565: result: $cf_rpath_space" >&5
5566 echo "${ECHO_T}$cf_rpath_space" >&6
5567                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5568                 ;;
5569         esac
5570 fi
5571
5572         RM_SHARED_OPTS=
5573         LOCAL_LDFLAGS=
5574         LOCAL_LDFLAGS2=
5575         LD_SHARED_OPTS=
5576         INSTALL_LIB="-m 644"
5577         : ${rel_builddir:=.}
5578
5579         shlibdir=$libdir
5580
5581         MAKE_DLLS="#"
5582
5583         cf_cv_do_symlinks=no
5584         cf_ld_rpath_opt=
5585         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5586
5587         echo "$as_me:5587: checking if release/abi version should be used for shared libs" >&5
5588 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5589
5590 # Check whether --with-shlib-version or --without-shlib-version was given.
5591 if test "${with_shlib_version+set}" = set; then
5592   withval="$with_shlib_version"
5593   test -z "$withval" && withval=auto
5594         case $withval in
5595         (yes)
5596                 cf_cv_shlib_version=auto
5597                 ;;
5598         (rel|abi|auto)
5599                 cf_cv_shlib_version=$withval
5600                 ;;
5601         (*)
5602                 echo "$as_me:5602: result: $withval" >&5
5603 echo "${ECHO_T}$withval" >&6
5604                 { { echo "$as_me:5604: error: option value must be one of: rel, abi, or auto" >&5
5605 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5606    { (exit 1); exit 1; }; }
5607                 ;;
5608         esac
5609
5610 else
5611   cf_cv_shlib_version=auto
5612 fi;
5613         echo "$as_me:5613: result: $cf_cv_shlib_version" >&5
5614 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5615
5616         cf_cv_rm_so_locs=no
5617         cf_try_cflags=
5618
5619         # Some less-capable ports of gcc support only -fpic
5620         CC_SHARED_OPTS=
5621
5622         cf_try_fPIC=no
5623         if test "$GCC" = yes
5624         then
5625                 cf_try_fPIC=yes
5626         else
5627                 case $cf_cv_system_name in
5628                 (*linux*)       # e.g., PGI compiler
5629                         cf_try_fPIC=yes
5630                         ;;
5631                 esac
5632         fi
5633
5634         if test "$cf_try_fPIC" = yes
5635         then
5636                 echo "$as_me:5636: checking which $CC option to use" >&5
5637 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5638                 cf_save_CFLAGS="$CFLAGS"
5639                 for CC_SHARED_OPTS in -fPIC -fpic ''
5640                 do
5641                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5642                         cat >conftest.$ac_ext <<_ACEOF
5643 #line 5643 "configure"
5644 #include "confdefs.h"
5645 #include <stdio.h>
5646 int
5647 main (void)
5648 {
5649 int x = 1
5650   ;
5651   return 0;
5652 }
5653 _ACEOF
5654 rm -f conftest.$ac_objext
5655 if { (eval echo "$as_me:5655: \"$ac_compile\"") >&5
5656   (eval $ac_compile) 2>&5
5657   ac_status=$?
5658   echo "$as_me:5658: \$? = $ac_status" >&5
5659   (exit $ac_status); } &&
5660          { ac_try='test -s conftest.$ac_objext'
5661   { (eval echo "$as_me:5661: \"$ac_try\"") >&5
5662   (eval $ac_try) 2>&5
5663   ac_status=$?
5664   echo "$as_me:5664: \$? = $ac_status" >&5
5665   (exit $ac_status); }; }; then
5666   break
5667 else
5668   echo "$as_me: failed program was:" >&5
5669 cat conftest.$ac_ext >&5
5670 fi
5671 rm -f conftest.$ac_objext conftest.$ac_ext
5672                 done
5673                 echo "$as_me:5673: result: $CC_SHARED_OPTS" >&5
5674 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5675                 CFLAGS="$cf_save_CFLAGS"
5676         fi
5677
5678         cf_cv_shlib_version_infix=no
5679
5680         case $cf_cv_system_name in
5681         (aix4.3-9*|aix[5-7]*)
5682                 if test "$GCC" = yes; then
5683                         CC_SHARED_OPTS='-Wl,-brtl'
5684                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5685                 else
5686                         CC_SHARED_OPTS='-brtl'
5687                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5688                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5689                 fi
5690                 ;;
5691         (beos*)
5692                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5693                 ;;
5694         (cygwin*)
5695                 CC_SHARED_OPTS=
5696                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5697                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5698                 cf_cv_shlib_version=cygdll
5699                 cf_cv_shlib_version_infix=cygdll
5700                 shlibdir=$bindir
5701                 MAKE_DLLS=
5702                 cat >mk_shared_lib.sh <<-CF_EOF
5703                 #!$SHELL
5704                 SHARED_LIB=\$1
5705                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5706                 shift
5707                 cat <<-EOF
5708                 Linking shared library
5709                 ** SHARED_LIB \$SHARED_LIB
5710                 ** IMPORT_LIB \$IMPORT_LIB
5711 EOF
5712                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5713 CF_EOF
5714                 chmod +x mk_shared_lib.sh
5715                 ;;
5716         (msys*)
5717                 CC_SHARED_OPTS=
5718                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5719                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5720                 cf_cv_shlib_version=msysdll
5721                 cf_cv_shlib_version_infix=msysdll
5722                 shlibdir=$bindir
5723                 MAKE_DLLS=
5724                 cat >mk_shared_lib.sh <<-CF_EOF
5725                 #!$SHELL
5726                 SHARED_LIB=\$1
5727                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5728                 shift
5729                 cat <<-EOF
5730                 Linking shared library
5731                 ** SHARED_LIB \$SHARED_LIB
5732                 ** IMPORT_LIB \$IMPORT_LIB
5733 EOF
5734                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5735 CF_EOF
5736                 chmod +x mk_shared_lib.sh
5737                 ;;
5738         (darwin*)
5739                 cf_try_cflags="no-cpp-precomp"
5740                 CC_SHARED_OPTS="-dynamic"
5741                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5742                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5743                 cf_cv_shlib_version_infix=yes
5744                 echo "$as_me:5744: checking if ld -search_paths_first works" >&5
5745 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5746 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5747   echo $ECHO_N "(cached) $ECHO_C" >&6
5748 else
5749
5750                         cf_save_LDFLAGS=$LDFLAGS
5751                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5752                         cat >conftest.$ac_ext <<_ACEOF
5753 #line 5753 "configure"
5754 #include "confdefs.h"
5755
5756 int
5757 main (void)
5758 {
5759 int i;
5760   ;
5761   return 0;
5762 }
5763 _ACEOF
5764 rm -f conftest.$ac_objext conftest$ac_exeext
5765 if { (eval echo "$as_me:5765: \"$ac_link\"") >&5
5766   (eval $ac_link) 2>&5
5767   ac_status=$?
5768   echo "$as_me:5768: \$? = $ac_status" >&5
5769   (exit $ac_status); } &&
5770          { ac_try='test -s conftest$ac_exeext'
5771   { (eval echo "$as_me:5771: \"$ac_try\"") >&5
5772   (eval $ac_try) 2>&5
5773   ac_status=$?
5774   echo "$as_me:5774: \$? = $ac_status" >&5
5775   (exit $ac_status); }; }; then
5776   cf_cv_ldflags_search_paths_first=yes
5777 else
5778   echo "$as_me: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
5780 cf_cv_ldflags_search_paths_first=no
5781 fi
5782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5783                                 LDFLAGS=$cf_save_LDFLAGS
5784 fi
5785 echo "$as_me:5785: result: $cf_cv_ldflags_search_paths_first" >&5
5786 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5787                 if test $cf_cv_ldflags_search_paths_first = yes; then
5788                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5789                 fi
5790                 ;;
5791         (hpux[7-8]*)
5792                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5793                 if test "$GCC" != yes; then
5794                         CC_SHARED_OPTS='+Z'
5795                 fi
5796                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5797                 INSTALL_LIB="-m 555"
5798                 ;;
5799         (hpux*)
5800                 # (tested with gcc 2.7.2 -- I don't have c89)
5801                 if test "$GCC" = yes; then
5802                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5803                 else
5804                         CC_SHARED_OPTS='+Z'
5805                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5806                 fi
5807                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5808                 # HP-UX shared libraries must be executable, and should be
5809                 # readonly to exploit a quirk in the memory manager.
5810                 INSTALL_LIB="-m 555"
5811                 ;;
5812         (interix*)
5813                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5814                 if test "$cf_cv_shlib_version" = rel; then
5815                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5816                 else
5817                         cf_shared_soname='`basename $@`'
5818                 fi
5819                 CC_SHARED_OPTS=
5820                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5821                 ;;
5822         (irix*)
5823                 if test "$cf_cv_enable_rpath" = yes ; then
5824                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5825                 fi
5826                 # tested with IRIX 5.2 and 'cc'.
5827                 if test "$GCC" != yes; then
5828                         CC_SHARED_OPTS='-KPIC'
5829                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5830                 else
5831                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5832                 fi
5833                 cf_cv_rm_so_locs=yes
5834                 ;;
5835         (linux*|gnu*|k*bsd*-gnu)
5836                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5837                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5838                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5839                 fi
5840                 if test "$cf_cv_enable_rpath" = yes ; then
5841                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5842                 fi
5843
5844         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5845         if test "$cf_cv_shlib_version" = rel; then
5846                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5847         else
5848                 cf_cv_shared_soname='`basename $@`'
5849         fi
5850
5851                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5852                 ;;
5853         (mingw*)
5854                 cf_cv_shlib_version=mingw
5855                 cf_cv_shlib_version_infix=mingw
5856                 shlibdir=$bindir
5857                 MAKE_DLLS=
5858                 if test "$DFT_LWR_MODEL" = "shared" ; then
5859                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5860                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5861                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5862                 fi
5863                 CC_SHARED_OPTS=
5864                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5865                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5866                 cat >mk_shared_lib.sh <<-CF_EOF
5867                 #!$SHELL
5868                 SHARED_LIB=\$1
5869                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5870                 shift
5871                 cat <<-EOF
5872                 Linking shared library
5873                 ** SHARED_LIB \$SHARED_LIB
5874                 ** IMPORT_LIB \$IMPORT_LIB
5875 EOF
5876                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5877 CF_EOF
5878                 chmod +x mk_shared_lib.sh
5879                 ;;
5880         (openbsd[2-9].*|mirbsd*)
5881                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5882                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5883                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5884                 fi
5885                 if test "$cf_cv_enable_rpath" = yes ; then
5886                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5887                 fi
5888                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5889
5890         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5891         if test "$cf_cv_shlib_version" = rel; then
5892                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5893         else
5894                 cf_cv_shared_soname='`basename $@`'
5895         fi
5896
5897                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5898                 ;;
5899         (nto-qnx*|openbsd*|freebsd[12].*)
5900                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5901                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5902                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5903                 ;;
5904         (dragonfly*|freebsd*)
5905                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5906                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5907                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5908                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5909                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5910                 fi
5911
5912         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5913         if test "$cf_cv_shlib_version" = rel; then
5914                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5915         else
5916                 cf_cv_shared_soname='`basename $@`'
5917         fi
5918
5919                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5920                 ;;
5921         (netbsd*)
5922                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5923                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5924                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5925                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5926                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5927                         if test "$cf_cv_shlib_version" = auto; then
5928                         if test -f /usr/libexec/ld.elf_so; then
5929                                 cf_cv_shlib_version=abi
5930                         else
5931                                 cf_cv_shlib_version=rel
5932                         fi
5933                         fi
5934
5935         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5936         if test "$cf_cv_shlib_version" = rel; then
5937                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5938         else
5939                 cf_cv_shared_soname='`basename $@`'
5940         fi
5941
5942                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5943                 else
5944                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5945                 fi
5946                 ;;
5947         (osf*|mls+*)
5948                 # tested with OSF/1 V3.2 and 'cc'
5949                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5950                 # link with shared libs).
5951                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5952                 case $host_os in
5953                 (osf4*)
5954                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5955                         ;;
5956                 esac
5957                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5958                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5959                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5960                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5961                 fi
5962                 cf_cv_rm_so_locs=yes
5963                 ;;
5964         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5965                 # tested with osr5.0.5
5966                 if test "$GCC" != yes; then
5967                         CC_SHARED_OPTS='-belf -KPIC'
5968                 fi
5969                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5970                 if test "$cf_cv_enable_rpath" = yes ; then
5971                         # only way is to set LD_RUN_PATH but no switch for it
5972                         RUN_PATH=$libdir
5973                 fi
5974                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5975                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5976                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5977                 ;;
5978         (sunos4*)
5979                 # tested with SunOS 4.1.1 and gcc 2.7.0
5980                 if test "$GCC" != yes; then
5981                         CC_SHARED_OPTS='-KPIC'
5982                 fi
5983                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5984                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5985                 ;;
5986         (solaris2*)
5987                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5988                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5989                 if test "$DFT_LWR_MODEL" = "shared" ; then
5990                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5991                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5992                 fi
5993                 if test "$cf_cv_enable_rpath" = yes ; then
5994                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5995                 fi
5996
5997         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5998         if test "$cf_cv_shlib_version" = rel; then
5999                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6000         else
6001                 cf_cv_shared_soname='`basename $@`'
6002         fi
6003
6004                 if test "$GCC" != yes; then
6005                         cf_save_CFLAGS="$CFLAGS"
6006                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6007                         do
6008                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6009                                 cat >conftest.$ac_ext <<_ACEOF
6010 #line 6010 "configure"
6011 #include "confdefs.h"
6012 #include <stdio.h>
6013 int
6014 main (void)
6015 {
6016 printf("Hello\n");
6017   ;
6018   return 0;
6019 }
6020 _ACEOF
6021 rm -f conftest.$ac_objext
6022 if { (eval echo "$as_me:6022: \"$ac_compile\"") >&5
6023   (eval $ac_compile) 2>&5
6024   ac_status=$?
6025   echo "$as_me:6025: \$? = $ac_status" >&5
6026   (exit $ac_status); } &&
6027          { ac_try='test -s conftest.$ac_objext'
6028   { (eval echo "$as_me:6028: \"$ac_try\"") >&5
6029   (eval $ac_try) 2>&5
6030   ac_status=$?
6031   echo "$as_me:6031: \$? = $ac_status" >&5
6032   (exit $ac_status); }; }; then
6033   break
6034 else
6035   echo "$as_me: failed program was:" >&5
6036 cat conftest.$ac_ext >&5
6037 fi
6038 rm -f conftest.$ac_objext conftest.$ac_ext
6039                         done
6040                         CFLAGS="$cf_save_CFLAGS"
6041                         CC_SHARED_OPTS=$cf_shared_opts
6042                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6043                 else
6044                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6045                 fi
6046                 ;;
6047         (sysv5uw7*|unix_sv*)
6048                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6049                 if test "$GCC" != yes; then
6050                         CC_SHARED_OPTS='-KPIC'
6051                 fi
6052                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6053                 ;;
6054         (*)
6055                 CC_SHARED_OPTS='unknown'
6056                 MK_SHARED_LIB='echo unknown'
6057                 ;;
6058         esac
6059
6060         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6061         case "$cf_cv_shlib_version" in
6062         (rel|abi)
6063                 case "$MK_SHARED_LIB" in
6064                 (*'-o $@')
6065                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6066                         ;;
6067                 (*)
6068                         { echo "$as_me:6068: WARNING: ignored --with-shlib-version" >&5
6069 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6070                         ;;
6071                 esac
6072                 ;;
6073         esac
6074
6075         if test -n "$cf_try_cflags"
6076         then
6077 cat > conftest.$ac_ext <<EOF
6078 #line 6078 "${as_me:-configure}"
6079 #include <stdio.h>
6080 int main(int argc, char *argv[])
6081 {
6082         printf("hello\n");
6083         return (argv[argc-1] == 0) ;
6084 }
6085 EOF
6086                 cf_save_CFLAGS="$CFLAGS"
6087                 for cf_opt in $cf_try_cflags
6088                 do
6089                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6090                         echo "$as_me:6090: checking if CFLAGS option -$cf_opt works" >&5
6091 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6092                         if { (eval echo "$as_me:6092: \"$ac_compile\"") >&5
6093   (eval $ac_compile) 2>&5
6094   ac_status=$?
6095   echo "$as_me:6095: \$? = $ac_status" >&5
6096   (exit $ac_status); }; then
6097                                 echo "$as_me:6097: result: yes" >&5
6098 echo "${ECHO_T}yes" >&6
6099                                 cf_save_CFLAGS="$CFLAGS"
6100                         else
6101                                 echo "$as_me:6101: result: no" >&5
6102 echo "${ECHO_T}no" >&6
6103                         fi
6104                 done
6105                 CFLAGS="$cf_save_CFLAGS"
6106         fi
6107
6108         # RPATH_LIST is a colon-separated list of directories
6109         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6110         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6111
6112         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6113
6114         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6115
6116 echo "${as_me:-configure}:6116: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6117
6118         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6119
6120 echo "${as_me:-configure}:6120: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6121
6122 for model in $cf_list_models; do
6123         case $model in
6124         (libtool)
6125
6126 echo "$as_me:6126: checking for additional libtool options" >&5
6127 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6128
6129 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6130 if test "${with_libtool_opts+set}" = set; then
6131   withval="$with_libtool_opts"
6132   with_libtool_opts=$withval
6133 else
6134   with_libtool_opts=no
6135 fi;
6136 echo "$as_me:6136: result: $with_libtool_opts" >&5
6137 echo "${ECHO_T}$with_libtool_opts" >&6
6138
6139 case .$with_libtool_opts in
6140 (.yes|.no|.)
6141         ;;
6142 (*)
6143         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6144         ;;
6145 esac
6146
6147 echo "$as_me:6147: checking if exported-symbols file should be used" >&5
6148 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6149
6150 # Check whether --with-export-syms or --without-export-syms was given.
6151 if test "${with_export_syms+set}" = set; then
6152   withval="$with_export_syms"
6153   with_export_syms=$withval
6154 else
6155   with_export_syms=no
6156 fi;
6157 if test "x$with_export_syms" = xyes
6158 then
6159         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6160
6161 fi
6162 echo "$as_me:6162: result: $with_export_syms" >&5
6163 echo "${ECHO_T}$with_export_syms" >&6
6164 if test "x$with_export_syms" != xno
6165 then
6166         EXPORT_SYMS="-export-symbols $with_export_syms"
6167
6168 fi
6169
6170                 ;;
6171         (shared)
6172                 if test "$CC_SHARED_OPTS" = "unknown"; then
6173                         { { echo "$as_me:6173: error: Shared libraries are not supported in this version" >&5
6174 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6175    { (exit 1); exit 1; }; }
6176                 fi
6177                 # workaround for inept transition to PIE vs PIC...
6178                 echo "$as_me:6178: checking if current CFLAGS link properly" >&5
6179 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6180                 cat >conftest.$ac_ext <<_ACEOF
6181 #line 6181 "configure"
6182 #include "confdefs.h"
6183 #include <stdio.h>
6184 int
6185 main (void)
6186 {
6187 printf("Hello work\n");
6188   ;
6189   return 0;
6190 }
6191 _ACEOF
6192 rm -f conftest.$ac_objext conftest$ac_exeext
6193 if { (eval echo "$as_me:6193: \"$ac_link\"") >&5
6194   (eval $ac_link) 2>&5
6195   ac_status=$?
6196   echo "$as_me:6196: \$? = $ac_status" >&5
6197   (exit $ac_status); } &&
6198          { ac_try='test -s conftest$ac_exeext'
6199   { (eval echo "$as_me:6199: \"$ac_try\"") >&5
6200   (eval $ac_try) 2>&5
6201   ac_status=$?
6202   echo "$as_me:6202: \$? = $ac_status" >&5
6203   (exit $ac_status); }; }; then
6204   cf_cflags_work=yes
6205 else
6206   echo "$as_me: failed program was:" >&5
6207 cat conftest.$ac_ext >&5
6208 cf_cflags_work=no
6209 fi
6210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6211                 echo "$as_me:6211: result: $cf_cflags_work" >&5
6212 echo "${ECHO_T}$cf_cflags_work" >&6
6213                 if test "$cf_cflags_work" = no
6214                 then
6215                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6216
6217 echo "${as_me:-configure}:6217: testing try to work around by appending shared-options ..." 1>&5
6218
6219                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6220                 fi
6221
6222 echo "$as_me:6222: checking if versioned-symbols file should be used" >&5
6223 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6224
6225 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6226 if test "${with_versioned_syms+set}" = set; then
6227   withval="$with_versioned_syms"
6228   with_versioned_syms=$withval
6229 else
6230   with_versioned_syms=no
6231 fi;
6232 case "x$with_versioned_syms" in
6233 (xyes)
6234         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6235
6236         ;;
6237 (xno)
6238         ;;
6239 (x/*)
6240         test -f "$with_versioned_syms" || { { echo "$as_me:6240: error: expected a filename: $with_versioned_syms" >&5
6241 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6242    { (exit 1); exit 1; }; }
6243         ;;
6244 (*)
6245         test -f "$with_versioned_syms" || { { echo "$as_me:6245: error: expected a filename: $with_versioned_syms" >&5
6246 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6247    { (exit 1); exit 1; }; }
6248         with_versioned_syms=`pwd`/"$with_versioned_syms"
6249         ;;
6250 esac
6251 echo "$as_me:6251: result: $with_versioned_syms" >&5
6252 echo "${ECHO_T}$with_versioned_syms" >&6
6253
6254 RESULTING_SYMS=
6255 VERSIONED_SYMS=
6256 WILDCARD_SYMS=
6257
6258 if test "x$with_versioned_syms" != xno
6259 then
6260         RESULTING_SYMS=$with_versioned_syms
6261         case "x$MK_SHARED_LIB" in
6262         (*-Wl,*)
6263                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6264                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6265                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6266
6267 echo "${as_me:-configure}:6267: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6268
6269                 ;;
6270         (*-dy\ *)
6271                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6272                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6273                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6274
6275 echo "${as_me:-configure}:6275: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6276
6277                 ;;
6278         (*)
6279                 { echo "$as_me:6279: WARNING: this system does not support versioned-symbols" >&5
6280 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6281                 ;;
6282         esac
6283
6284         # Linux ld can selectively override scope, e.g., of symbols beginning with
6285         # "_" by first declaring some as global, and then using a wildcard to
6286         # declare the others as local.  Some other loaders cannot do this.  Check
6287         # by constructing a (very) simple shared library and inspecting its
6288         # symbols.
6289         if test "x$VERSIONED_SYMS" != "x"
6290         then
6291                 echo "$as_me:6291: checking if wildcards can be used to selectively omit symbols" >&5
6292 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6293                 WILDCARD_SYMS=no
6294
6295                 # make sources
6296                 rm -f conftest.*
6297
6298                 cat >conftest.ver <<EOF
6299 module_1.0 {
6300 global:
6301         globalf1;
6302 local:
6303         localf1;
6304 };
6305 module_2.0 {
6306 global:
6307         globalf2;
6308 local:
6309         localf2;
6310         _*;
6311 } module_1.0;
6312 submodule_1.0 {
6313 global:
6314         subglobalf1;
6315         _ismissing;
6316 local:
6317         sublocalf1;
6318 };
6319 submodule_2.0 {
6320 global:
6321         subglobalf2;
6322 local:
6323         sublocalf2;
6324         _*;
6325 } submodule_1.0;
6326 EOF
6327                 cat >conftest.$ac_ext <<EOF
6328 #line 6328 "configure"
6329 int     _ismissing(void) { return 1; }
6330 int     _localf1(void) { return 1; }
6331 int     _localf2(void) { return 2; }
6332 int     globalf1(void) { return 1; }
6333 int     globalf2(void) { return 2; }
6334 int     _sublocalf1(void) { return 1; }
6335 int     _sublocalf2(void) { return 2; }
6336 int     subglobalf1(void) { return 1; }
6337 int     subglobalf2(void) { return 2; }
6338 EOF
6339                 cat >conftest.mk <<EOF
6340 CC=${CC}
6341 CFLAGS=${CFLAGS}
6342 CPPFLAGS=${CPPFLAGS}
6343 LDFLAGS=${LDFLAGS}
6344 LIBS=${LIBS}
6345 VERSIONED_SYMS=${VERSIONED_SYMS}
6346 RESULTING_SYMS=conftest.ver
6347 MK_SHARED_LIB=${MK_SHARED_LIB}
6348 conftest.so: conftest.$ac_cv_objext
6349                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6350 EOF
6351
6352                 # compile source, make library
6353                 if make -f conftest.mk 2>&5 >/dev/null
6354                 then
6355                         # test for missing symbol in either Data or Text section
6356                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6357                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6358                 fi
6359                 echo "$as_me:6359: result: $WILDCARD_SYMS" >&5
6360 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6361                 rm -f conftest.*
6362         fi
6363 fi
6364
6365                 ;;
6366         esac
6367 done
6368
6369 ### Checks for special libraries, must be done up-front.
6370 SHLIB_LIST=""
6371
6372 echo "$as_me:6372: checking if you want to link with the GPM mouse library" >&5
6373 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6374
6375 # Check whether --with-gpm or --without-gpm was given.
6376 if test "${with_gpm+set}" = set; then
6377   withval="$with_gpm"
6378   with_gpm=$withval
6379 else
6380   with_gpm=maybe
6381 fi;
6382 echo "$as_me:6382: result: $with_gpm" >&5
6383 echo "${ECHO_T}$with_gpm" >&6
6384
6385 if test "$with_gpm" != no ; then
6386         echo "$as_me:6386: checking for gpm.h" >&5
6387 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6388 if test "${ac_cv_header_gpm_h+set}" = set; then
6389   echo $ECHO_N "(cached) $ECHO_C" >&6
6390 else
6391   cat >conftest.$ac_ext <<_ACEOF
6392 #line 6392 "configure"
6393 #include "confdefs.h"
6394 #include <gpm.h>
6395 _ACEOF
6396 if { (eval echo "$as_me:6396: \"$ac_cpp conftest.$ac_ext\"") >&5
6397   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6398   ac_status=$?
6399   egrep -v '^ *\+' conftest.er1 >conftest.err
6400   rm -f conftest.er1
6401   cat conftest.err >&5
6402   echo "$as_me:6402: \$? = $ac_status" >&5
6403   (exit $ac_status); } >/dev/null; then
6404   if test -s conftest.err; then
6405     ac_cpp_err=$ac_c_preproc_warn_flag
6406   else
6407     ac_cpp_err=
6408   fi
6409 else
6410   ac_cpp_err=yes
6411 fi
6412 if test -z "$ac_cpp_err"; then
6413   ac_cv_header_gpm_h=yes
6414 else
6415   echo "$as_me: failed program was:" >&5
6416   cat conftest.$ac_ext >&5
6417   ac_cv_header_gpm_h=no
6418 fi
6419 rm -f conftest.err conftest.$ac_ext
6420 fi
6421 echo "$as_me:6421: result: $ac_cv_header_gpm_h" >&5
6422 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6423 if test $ac_cv_header_gpm_h = yes; then
6424
6425 cat >>confdefs.h <<\EOF
6426 #define HAVE_GPM_H 1
6427 EOF
6428
6429                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6430                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6431
6432 echo "${as_me:-configure}:6432: testing assuming we really have GPM library ..." 1>&5
6433
6434 cat >>confdefs.h <<\EOF
6435 #define HAVE_LIBGPM 1
6436 EOF
6437
6438                         with_gpm=yes
6439                 else
6440                         echo "$as_me:6440: checking for Gpm_Open in -lgpm" >&5
6441 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6442 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6443   echo $ECHO_N "(cached) $ECHO_C" >&6
6444 else
6445   ac_check_lib_save_LIBS=$LIBS
6446 LIBS="-lgpm  $LIBS"
6447 cat >conftest.$ac_ext <<_ACEOF
6448 #line 6448 "configure"
6449 #include "confdefs.h"
6450
6451 /* Override any gcc2 internal prototype to avoid an error.  */
6452 #ifdef __cplusplus
6453 extern "C"
6454 #endif
6455 /* We use char because int might match the return type of a gcc2
6456    builtin and then its argument prototype would still apply.  */
6457 char Gpm_Open ();
6458 int
6459 main (void)
6460 {
6461 Gpm_Open ();
6462   ;
6463   return 0;
6464 }
6465 _ACEOF
6466 rm -f conftest.$ac_objext conftest$ac_exeext
6467 if { (eval echo "$as_me:6467: \"$ac_link\"") >&5
6468   (eval $ac_link) 2>&5
6469   ac_status=$?
6470   echo "$as_me:6470: \$? = $ac_status" >&5
6471   (exit $ac_status); } &&
6472          { ac_try='test -s conftest$ac_exeext'
6473   { (eval echo "$as_me:6473: \"$ac_try\"") >&5
6474   (eval $ac_try) 2>&5
6475   ac_status=$?
6476   echo "$as_me:6476: \$? = $ac_status" >&5
6477   (exit $ac_status); }; }; then
6478   ac_cv_lib_gpm_Gpm_Open=yes
6479 else
6480   echo "$as_me: failed program was:" >&5
6481 cat conftest.$ac_ext >&5
6482 ac_cv_lib_gpm_Gpm_Open=no
6483 fi
6484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6485 LIBS=$ac_check_lib_save_LIBS
6486 fi
6487 echo "$as_me:6487: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6488 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6489 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6490   with_gpm=yes
6491 else
6492
6493                                 if test "$with_gpm" = maybe; then
6494                                         { echo "$as_me:6494: WARNING: Cannot link with GPM library" >&5
6495 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6496                                         with_gpm=no
6497                                 else
6498                                         { { echo "$as_me:6498: error: Cannot link with GPM library" >&5
6499 echo "$as_me: error: Cannot link with GPM library" >&2;}
6500    { (exit 1); exit 1; }; }
6501                                 fi
6502
6503 fi
6504
6505                 fi
6506
6507 else
6508
6509                 test "$with_gpm" != maybe && { echo "$as_me:6509: WARNING: Cannot find GPM header" >&5
6510 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6511                 with_gpm=no
6512
6513 fi
6514
6515 fi
6516
6517 if test "$with_gpm" != no ; then
6518         echo "$as_me:6518: checking if you want to load GPM dynamically" >&5
6519 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6520
6521 # Check whether --with-dlsym or --without-dlsym was given.
6522 if test "${with_dlsym+set}" = set; then
6523   withval="$with_dlsym"
6524   with_dlsym=$withval
6525 else
6526   with_dlsym=yes
6527 fi;
6528         echo "$as_me:6528: result: $with_dlsym" >&5
6529 echo "${ECHO_T}$with_dlsym" >&6
6530         if test "x$with_dlsym" = xyes ; then
6531
6532 cf_have_dlsym=no
6533 echo "$as_me:6533: checking for dlsym" >&5
6534 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6535 if test "${ac_cv_func_dlsym+set}" = set; then
6536   echo $ECHO_N "(cached) $ECHO_C" >&6
6537 else
6538   cat >conftest.$ac_ext <<_ACEOF
6539 #line 6539 "configure"
6540 #include "confdefs.h"
6541 #define dlsym autoconf_temporary
6542 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6543 #undef dlsym
6544
6545 #ifdef __cplusplus
6546 extern "C"
6547 #endif
6548
6549 /* We use char because int might match the return type of a gcc2
6550    builtin and then its argument prototype would still apply.  */
6551 char dlsym (void);
6552
6553 int
6554 main (void)
6555 {
6556
6557 /* The GNU C library defines stubs for functions which it implements
6558     to always fail with ENOSYS.  Some functions are actually named
6559     something starting with __ and the normal name is an alias.  */
6560 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6561 #error found stub for dlsym
6562 #endif
6563
6564         return dlsym ();
6565   ;
6566   return 0;
6567 }
6568 _ACEOF
6569 rm -f conftest.$ac_objext conftest$ac_exeext
6570 if { (eval echo "$as_me:6570: \"$ac_link\"") >&5
6571   (eval $ac_link) 2>&5
6572   ac_status=$?
6573   echo "$as_me:6573: \$? = $ac_status" >&5
6574   (exit $ac_status); } &&
6575          { ac_try='test -s conftest$ac_exeext'
6576   { (eval echo "$as_me:6576: \"$ac_try\"") >&5
6577   (eval $ac_try) 2>&5
6578   ac_status=$?
6579   echo "$as_me:6579: \$? = $ac_status" >&5
6580   (exit $ac_status); }; }; then
6581   ac_cv_func_dlsym=yes
6582 else
6583   echo "$as_me: failed program was:" >&5
6584 cat conftest.$ac_ext >&5
6585 ac_cv_func_dlsym=no
6586 fi
6587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6588 fi
6589 echo "$as_me:6589: result: $ac_cv_func_dlsym" >&5
6590 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6591 if test $ac_cv_func_dlsym = yes; then
6592   cf_have_dlsym=yes
6593 else
6594
6595 cf_have_libdl=no
6596 echo "$as_me:6596: checking for dlsym in -ldl" >&5
6597 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6598 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6599   echo $ECHO_N "(cached) $ECHO_C" >&6
6600 else
6601   ac_check_lib_save_LIBS=$LIBS
6602 LIBS="-ldl  $LIBS"
6603 cat >conftest.$ac_ext <<_ACEOF
6604 #line 6604 "configure"
6605 #include "confdefs.h"
6606
6607 /* Override any gcc2 internal prototype to avoid an error.  */
6608 #ifdef __cplusplus
6609 extern "C"
6610 #endif
6611 /* We use char because int might match the return type of a gcc2
6612    builtin and then its argument prototype would still apply.  */
6613 char dlsym ();
6614 int
6615 main (void)
6616 {
6617 dlsym ();
6618   ;
6619   return 0;
6620 }
6621 _ACEOF
6622 rm -f conftest.$ac_objext conftest$ac_exeext
6623 if { (eval echo "$as_me:6623: \"$ac_link\"") >&5
6624   (eval $ac_link) 2>&5
6625   ac_status=$?
6626   echo "$as_me:6626: \$? = $ac_status" >&5
6627   (exit $ac_status); } &&
6628          { ac_try='test -s conftest$ac_exeext'
6629   { (eval echo "$as_me:6629: \"$ac_try\"") >&5
6630   (eval $ac_try) 2>&5
6631   ac_status=$?
6632   echo "$as_me:6632: \$? = $ac_status" >&5
6633   (exit $ac_status); }; }; then
6634   ac_cv_lib_dl_dlsym=yes
6635 else
6636   echo "$as_me: failed program was:" >&5
6637 cat conftest.$ac_ext >&5
6638 ac_cv_lib_dl_dlsym=no
6639 fi
6640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6641 LIBS=$ac_check_lib_save_LIBS
6642 fi
6643 echo "$as_me:6643: result: $ac_cv_lib_dl_dlsym" >&5
6644 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6645 if test $ac_cv_lib_dl_dlsym = yes; then
6646
6647         cf_have_dlsym=yes
6648         cf_have_libdl=yes
6649 fi
6650
6651 fi
6652
6653 if test "$cf_have_dlsym" = yes ; then
6654         test "$cf_have_libdl" = yes && {
6655 cf_add_libs="-ldl"
6656 # Filter out duplicates - this happens with badly-designed ".pc" files...
6657 for cf_add_1lib in $LIBS
6658 do
6659         for cf_add_2lib in $cf_add_libs
6660         do
6661                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6662                 then
6663                         cf_add_1lib=
6664                         break
6665                 fi
6666         done
6667         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6668 done
6669 LIBS="$cf_add_libs"
6670  }
6671
6672         echo "$as_me:6672: checking whether able to link to dl*() functions" >&5
6673 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6674         cat >conftest.$ac_ext <<_ACEOF
6675 #line 6675 "configure"
6676 #include "confdefs.h"
6677 #include <dlfcn.h>
6678 int
6679 main (void)
6680 {
6681
6682                 void *obj;
6683                 if ((obj = dlopen("filename", 0)) != 0) {
6684                         if (dlsym(obj, "symbolname") == 0) {
6685                         dlclose(obj);
6686                         }
6687                 }
6688   ;
6689   return 0;
6690 }
6691 _ACEOF
6692 rm -f conftest.$ac_objext conftest$ac_exeext
6693 if { (eval echo "$as_me:6693: \"$ac_link\"") >&5
6694   (eval $ac_link) 2>&5
6695   ac_status=$?
6696   echo "$as_me:6696: \$? = $ac_status" >&5
6697   (exit $ac_status); } &&
6698          { ac_try='test -s conftest$ac_exeext'
6699   { (eval echo "$as_me:6699: \"$ac_try\"") >&5
6700   (eval $ac_try) 2>&5
6701   ac_status=$?
6702   echo "$as_me:6702: \$? = $ac_status" >&5
6703   (exit $ac_status); }; }; then
6704
6705 cat >>confdefs.h <<\EOF
6706 #define HAVE_LIBDL 1
6707 EOF
6708
6709 else
6710   echo "$as_me: failed program was:" >&5
6711 cat conftest.$ac_ext >&5
6712
6713                 { { echo "$as_me:6713: error: Cannot link test program for libdl" >&5
6714 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6715    { (exit 1); exit 1; }; }
6716 fi
6717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6718         echo "$as_me:6718: result: ok" >&5
6719 echo "${ECHO_T}ok" >&6
6720 else
6721         { { echo "$as_me:6721: error: Cannot find dlsym function" >&5
6722 echo "$as_me: error: Cannot find dlsym function" >&2;}
6723    { (exit 1); exit 1; }; }
6724 fi
6725
6726                 if test "x$with_gpm" != xyes ; then
6727                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6728
6729 echo "${as_me:-configure}:6729: testing assuming soname for gpm is $with_gpm ..." 1>&5
6730
6731                         cf_cv_gpm_soname="$with_gpm"
6732                 else
6733
6734 echo "$as_me:6734: checking for soname of gpm library" >&5
6735 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6736 if test "${cf_cv_gpm_soname+set}" = set; then
6737   echo $ECHO_N "(cached) $ECHO_C" >&6
6738 else
6739
6740 cf_cv_gpm_soname=unknown
6741 if test "$cross_compiling" != yes ; then
6742 cat >conftest.$ac_ext <<CF_EOF
6743 #include <gpm.h>
6744 int main(void)
6745 {
6746 if (Gpm_Open(0,0)) Gpm_Close();
6747         ${cf_cv_main_return:-return}(0);
6748 }
6749 CF_EOF
6750 cf_save_LIBS="$LIBS"
6751
6752 cf_add_libs="-lgpm"
6753 # Filter out duplicates - this happens with badly-designed ".pc" files...
6754 for cf_add_1lib in $LIBS
6755 do
6756         for cf_add_2lib in $cf_add_libs
6757         do
6758                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6759                 then
6760                         cf_add_1lib=
6761                         break
6762                 fi
6763         done
6764         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6765 done
6766 LIBS="$cf_add_libs"
6767
6768         if { (eval echo "$as_me:6768: \"$ac_compile\"") >&5
6769   (eval $ac_compile) 2>&5
6770   ac_status=$?
6771   echo "$as_me:6771: \$? = $ac_status" >&5
6772   (exit $ac_status); } ; then
6773                 if { (eval echo "$as_me:6773: \"$ac_link\"") >&5
6774   (eval $ac_link) 2>&5
6775   ac_status=$?
6776   echo "$as_me:6776: \$? = $ac_status" >&5
6777   (exit $ac_status); } ; then
6778                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6779                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6780                 fi
6781         fi
6782 rm -rf conftest*
6783 LIBS="$cf_save_LIBS"
6784 fi
6785
6786 fi
6787 echo "$as_me:6787: result: $cf_cv_gpm_soname" >&5
6788 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6789
6790                 fi
6791                 test "$cf_cv_gpm_soname" != "unknown" &&
6792 cat >>confdefs.h <<EOF
6793 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6794 EOF
6795
6796                 SHLIB_LIST="-ldl $SHLIB_LIST"
6797
6798 cf_add_libs="-ldl"
6799 # Filter out duplicates - this happens with badly-designed ".pc" files...
6800 for cf_add_1lib in $PRIVATE_LIBS
6801 do
6802         for cf_add_2lib in $cf_add_libs
6803         do
6804                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6805                 then
6806                         cf_add_1lib=
6807                         break
6808                 fi
6809         done
6810         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6811 done
6812 PRIVATE_LIBS="$cf_add_libs"
6813
6814         else
6815                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6816
6817 cf_add_libs="-lgpm"
6818 # Filter out duplicates - this happens with badly-designed ".pc" files...
6819 for cf_add_1lib in $TEST_LIBS
6820 do
6821         for cf_add_2lib in $cf_add_libs
6822         do
6823                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6824                 then
6825                         cf_add_1lib=
6826                         break
6827                 fi
6828         done
6829         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6830 done
6831 TEST_LIBS="$cf_add_libs"
6832
6833 cf_add_libs="-lgpm"
6834 # Filter out duplicates - this happens with badly-designed ".pc" files...
6835 for cf_add_1lib in $PRIVATE_LIBS
6836 do
6837         for cf_add_2lib in $cf_add_libs
6838         do
6839                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6840                 then
6841                         cf_add_1lib=
6842                         break
6843                 fi
6844         done
6845         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6846 done
6847 PRIVATE_LIBS="$cf_add_libs"
6848
6849         fi
6850
6851 cat >>confdefs.h <<\EOF
6852 #define HAVE_LIBGPM 1
6853 EOF
6854
6855 echo "$as_me:6855: checking for Gpm_Wgetch in -lgpm" >&5
6856 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6857 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6858   echo $ECHO_N "(cached) $ECHO_C" >&6
6859 else
6860   ac_check_lib_save_LIBS=$LIBS
6861 LIBS="-lgpm  $LIBS"
6862 cat >conftest.$ac_ext <<_ACEOF
6863 #line 6863 "configure"
6864 #include "confdefs.h"
6865
6866 /* Override any gcc2 internal prototype to avoid an error.  */
6867 #ifdef __cplusplus
6868 extern "C"
6869 #endif
6870 /* We use char because int might match the return type of a gcc2
6871    builtin and then its argument prototype would still apply.  */
6872 char Gpm_Wgetch ();
6873 int
6874 main (void)
6875 {
6876 Gpm_Wgetch ();
6877   ;
6878   return 0;
6879 }
6880 _ACEOF
6881 rm -f conftest.$ac_objext conftest$ac_exeext
6882 if { (eval echo "$as_me:6882: \"$ac_link\"") >&5
6883   (eval $ac_link) 2>&5
6884   ac_status=$?
6885   echo "$as_me:6885: \$? = $ac_status" >&5
6886   (exit $ac_status); } &&
6887          { ac_try='test -s conftest$ac_exeext'
6888   { (eval echo "$as_me:6888: \"$ac_try\"") >&5
6889   (eval $ac_try) 2>&5
6890   ac_status=$?
6891   echo "$as_me:6891: \$? = $ac_status" >&5
6892   (exit $ac_status); }; }; then
6893   ac_cv_lib_gpm_Gpm_Wgetch=yes
6894 else
6895   echo "$as_me: failed program was:" >&5
6896 cat conftest.$ac_ext >&5
6897 ac_cv_lib_gpm_Gpm_Wgetch=no
6898 fi
6899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6900 LIBS=$ac_check_lib_save_LIBS
6901 fi
6902 echo "$as_me:6902: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6903 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6904 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6905
6906 echo "$as_me:6906: checking if GPM is weakly bound to curses library" >&5
6907 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6908 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6909   echo $ECHO_N "(cached) $ECHO_C" >&6
6910 else
6911
6912 cf_cv_check_gpm_wgetch=unknown
6913 if test "$cross_compiling" != yes ; then
6914
6915 cat >conftest.$ac_ext <<CF_EOF
6916 #include <gpm.h>
6917 int main(void)
6918 {
6919         Gpm_Wgetch();
6920         ${cf_cv_main_return:-return}(0);
6921 }
6922 CF_EOF
6923
6924         cf_save_LIBS="$LIBS"
6925         # This only works if we can look at the symbol table.  If a shared
6926         # library is stripped for install, we cannot use that.  So we're forced
6927         # to rely on the static library, noting that some packagers may not
6928         # include it.
6929         LIBS="-static -lgpm -dynamic $LIBS"
6930         if { (eval echo "$as_me:6930: \"$ac_compile\"") >&5
6931   (eval $ac_compile) 2>&5
6932   ac_status=$?
6933   echo "$as_me:6933: \$? = $ac_status" >&5
6934   (exit $ac_status); } ; then
6935                 if { (eval echo "$as_me:6935: \"$ac_link\"") >&5
6936   (eval $ac_link) 2>&5
6937   ac_status=$?
6938   echo "$as_me:6938: \$? = $ac_status" >&5
6939   (exit $ac_status); } ; then
6940                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6941                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6942                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6943                 fi
6944         fi
6945         rm -rf conftest*
6946         LIBS="$cf_save_LIBS"
6947 fi
6948
6949 fi
6950 echo "$as_me:6950: result: $cf_cv_check_gpm_wgetch" >&5
6951 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6952
6953 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6954         { echo "$as_me:6954: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6955 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6956 fi
6957
6958 fi
6959
6960 fi
6961
6962 echo "$as_me:6962: checking if you want to use PCRE2 for regular-expressions" >&5
6963 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
6964
6965 # Check whether --with-pcre2 or --without-pcre2 was given.
6966 if test "${with_pcre2+set}" = set; then
6967   withval="$with_pcre2"
6968
6969 fi;
6970 test -z "$with_pcre2" && with_pcre2=no
6971 echo "$as_me:6971: result: $with_pcre2" >&5
6972 echo "${ECHO_T}$with_pcre2" >&6
6973
6974 if test "x$with_pcre2" != xno ; then
6975
6976 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
6977         test -n "$verbose" && echo "    found package libpcre2" 1>&6
6978
6979 echo "${as_me:-configure}:6979: testing found package libpcre2 ..." 1>&5
6980
6981         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
6982         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
6983         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
6984
6985 echo "${as_me:-configure}:6985: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
6986
6987         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
6988
6989 echo "${as_me:-configure}:6989: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
6990
6991 cf_fix_cppflags=no
6992 cf_new_cflags=
6993 cf_new_cppflags=
6994 cf_new_extra_cppflags=
6995
6996 for cf_add_cflags in $cf_pkgconfig_incs
6997 do
6998 case $cf_fix_cppflags in
6999 (no)
7000         case $cf_add_cflags in
7001         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7002                 case $cf_add_cflags in
7003                 (-D*)
7004                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7005
7006                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7007                                 && test -z "${cf_tst_cflags}" \
7008                                 && cf_fix_cppflags=yes
7009
7010                         if test $cf_fix_cppflags = yes ; then
7011
7012         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7013         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7014
7015                                 continue
7016                         elif test "${cf_tst_cflags}" = "\"'" ; then
7017
7018         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7019         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7020
7021                                 continue
7022                         fi
7023                         ;;
7024                 esac
7025                 case "$CPPFLAGS" in
7026                 (*$cf_add_cflags)
7027                         ;;
7028                 (*)
7029                         case $cf_add_cflags in
7030                         (-D*)
7031                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7032
7033 CPPFLAGS=`echo "$CPPFLAGS" | \
7034         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7035                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7036
7037                                 ;;
7038                         esac
7039
7040         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7041         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7042
7043                         ;;
7044                 esac
7045                 ;;
7046         (*)
7047
7048         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7049         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7050
7051                 ;;
7052         esac
7053         ;;
7054 (yes)
7055
7056         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7057         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7058
7059         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7060
7061         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7062                 && test -z "${cf_tst_cflags}" \
7063                 && cf_fix_cppflags=no
7064         ;;
7065 esac
7066 done
7067
7068 if test -n "$cf_new_cflags" ; then
7069
7070         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7071         CFLAGS="${CFLAGS}$cf_new_cflags"
7072
7073 fi
7074
7075 if test -n "$cf_new_cppflags" ; then
7076
7077         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7078         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7079
7080 fi
7081
7082 if test -n "$cf_new_extra_cppflags" ; then
7083
7084         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7085         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7086
7087 fi
7088
7089 cf_add_libs="$cf_pkgconfig_libs"
7090 # Filter out duplicates - this happens with badly-designed ".pc" files...
7091 for cf_add_1lib in $LIBS
7092 do
7093         for cf_add_2lib in $cf_add_libs
7094         do
7095                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7096                 then
7097                         cf_add_1lib=
7098                         break
7099                 fi
7100         done
7101         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7102 done
7103 LIBS="$cf_add_libs"
7104
7105         :
7106 else
7107         cf_pkgconfig_incs=
7108         cf_pkgconfig_libs=
7109
7110 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7111         test -n "$verbose" && echo "    found package libpcre" 1>&6
7112
7113 echo "${as_me:-configure}:7113: testing found package libpcre ..." 1>&5
7114
7115         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7116         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7117         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7118
7119 echo "${as_me:-configure}:7119: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7120
7121         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7122
7123 echo "${as_me:-configure}:7123: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7124
7125 cf_fix_cppflags=no
7126 cf_new_cflags=
7127 cf_new_cppflags=
7128 cf_new_extra_cppflags=
7129
7130 for cf_add_cflags in $cf_pkgconfig_incs
7131 do
7132 case $cf_fix_cppflags in
7133 (no)
7134         case $cf_add_cflags in
7135         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7136                 case $cf_add_cflags in
7137                 (-D*)
7138                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7139
7140                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7141                                 && test -z "${cf_tst_cflags}" \
7142                                 && cf_fix_cppflags=yes
7143
7144                         if test $cf_fix_cppflags = yes ; then
7145
7146         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7147         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7148
7149                                 continue
7150                         elif test "${cf_tst_cflags}" = "\"'" ; then
7151
7152         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7153         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7154
7155                                 continue
7156                         fi
7157                         ;;
7158                 esac
7159                 case "$CPPFLAGS" in
7160                 (*$cf_add_cflags)
7161                         ;;
7162                 (*)
7163                         case $cf_add_cflags in
7164                         (-D*)
7165                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7166
7167 CPPFLAGS=`echo "$CPPFLAGS" | \
7168         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7169                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7170
7171                                 ;;
7172                         esac
7173
7174         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7175         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7176
7177                         ;;
7178                 esac
7179                 ;;
7180         (*)
7181
7182         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7183         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7184
7185                 ;;
7186         esac
7187         ;;
7188 (yes)
7189
7190         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7191         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7192
7193         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7194
7195         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7196                 && test -z "${cf_tst_cflags}" \
7197                 && cf_fix_cppflags=no
7198         ;;
7199 esac
7200 done
7201
7202 if test -n "$cf_new_cflags" ; then
7203
7204         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7205         CFLAGS="${CFLAGS}$cf_new_cflags"
7206
7207 fi
7208
7209 if test -n "$cf_new_cppflags" ; then
7210
7211         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7212         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7213
7214 fi
7215
7216 if test -n "$cf_new_extra_cppflags" ; then
7217
7218         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7219         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7220
7221 fi
7222
7223 cf_add_libs="$cf_pkgconfig_libs"
7224 # Filter out duplicates - this happens with badly-designed ".pc" files...
7225 for cf_add_1lib in $LIBS
7226 do
7227         for cf_add_2lib in $cf_add_libs
7228         do
7229                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7230                 then
7231                         cf_add_1lib=
7232                         break
7233                 fi
7234         done
7235         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7236 done
7237 LIBS="$cf_add_libs"
7238
7239         :
7240 else
7241         cf_pkgconfig_incs=
7242         cf_pkgconfig_libs=
7243
7244                         { { echo "$as_me:7244: error: Cannot find PCRE2 library" >&5
7245 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7246    { (exit 1); exit 1; }; }
7247 fi
7248
7249 fi
7250
7251 cat >>confdefs.h <<\EOF
7252 #define HAVE_LIB_PCRE2 1
7253 EOF
7254
7255         # if pkgconfig gave no results, look for the libraries directly
7256         case $LIBS in
7257         (*pcre2-posix*|*pcreposix*)
7258                 ;;
7259         (*)
7260                 echo "$as_me:7260: checking for regcomp in -lpcre2-posix" >&5
7261 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7262 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7263   echo $ECHO_N "(cached) $ECHO_C" >&6
7264 else
7265   ac_check_lib_save_LIBS=$LIBS
7266 LIBS="-lpcre2-posix  $LIBS"
7267 cat >conftest.$ac_ext <<_ACEOF
7268 #line 7268 "configure"
7269 #include "confdefs.h"
7270
7271 /* Override any gcc2 internal prototype to avoid an error.  */
7272 #ifdef __cplusplus
7273 extern "C"
7274 #endif
7275 /* We use char because int might match the return type of a gcc2
7276    builtin and then its argument prototype would still apply.  */
7277 char regcomp ();
7278 int
7279 main (void)
7280 {
7281 regcomp ();
7282   ;
7283   return 0;
7284 }
7285 _ACEOF
7286 rm -f conftest.$ac_objext conftest$ac_exeext
7287 if { (eval echo "$as_me:7287: \"$ac_link\"") >&5
7288   (eval $ac_link) 2>&5
7289   ac_status=$?
7290   echo "$as_me:7290: \$? = $ac_status" >&5
7291   (exit $ac_status); } &&
7292          { ac_try='test -s conftest$ac_exeext'
7293   { (eval echo "$as_me:7293: \"$ac_try\"") >&5
7294   (eval $ac_try) 2>&5
7295   ac_status=$?
7296   echo "$as_me:7296: \$? = $ac_status" >&5
7297   (exit $ac_status); }; }; then
7298   ac_cv_lib_pcre2_posix_regcomp=yes
7299 else
7300   echo "$as_me: failed program was:" >&5
7301 cat conftest.$ac_ext >&5
7302 ac_cv_lib_pcre2_posix_regcomp=no
7303 fi
7304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7305 LIBS=$ac_check_lib_save_LIBS
7306 fi
7307 echo "$as_me:7307: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7308 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7309 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7310
7311 cf_add_libs="-lpcre2-posix"
7312 # Filter out duplicates - this happens with badly-designed ".pc" files...
7313 for cf_add_1lib in $LIBS
7314 do
7315         for cf_add_2lib in $cf_add_libs
7316         do
7317                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7318                 then
7319                         cf_add_1lib=
7320                         break
7321                 fi
7322         done
7323         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7324 done
7325 LIBS="$cf_add_libs"
7326
7327 else
7328   echo "$as_me:7328: checking for regcomp in -lpcreposix" >&5
7329 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7330 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7331   echo $ECHO_N "(cached) $ECHO_C" >&6
7332 else
7333   ac_check_lib_save_LIBS=$LIBS
7334 LIBS="-lpcreposix  $LIBS"
7335 cat >conftest.$ac_ext <<_ACEOF
7336 #line 7336 "configure"
7337 #include "confdefs.h"
7338
7339 /* Override any gcc2 internal prototype to avoid an error.  */
7340 #ifdef __cplusplus
7341 extern "C"
7342 #endif
7343 /* We use char because int might match the return type of a gcc2
7344    builtin and then its argument prototype would still apply.  */
7345 char regcomp ();
7346 int
7347 main (void)
7348 {
7349 regcomp ();
7350   ;
7351   return 0;
7352 }
7353 _ACEOF
7354 rm -f conftest.$ac_objext conftest$ac_exeext
7355 if { (eval echo "$as_me:7355: \"$ac_link\"") >&5
7356   (eval $ac_link) 2>&5
7357   ac_status=$?
7358   echo "$as_me:7358: \$? = $ac_status" >&5
7359   (exit $ac_status); } &&
7360          { ac_try='test -s conftest$ac_exeext'
7361   { (eval echo "$as_me:7361: \"$ac_try\"") >&5
7362   (eval $ac_try) 2>&5
7363   ac_status=$?
7364   echo "$as_me:7364: \$? = $ac_status" >&5
7365   (exit $ac_status); }; }; then
7366   ac_cv_lib_pcreposix_regcomp=yes
7367 else
7368   echo "$as_me: failed program was:" >&5
7369 cat conftest.$ac_ext >&5
7370 ac_cv_lib_pcreposix_regcomp=no
7371 fi
7372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7373 LIBS=$ac_check_lib_save_LIBS
7374 fi
7375 echo "$as_me:7375: result: $ac_cv_lib_pcreposix_regcomp" >&5
7376 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7377 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7378
7379 cf_add_libs="-lpcreposix"
7380 # Filter out duplicates - this happens with badly-designed ".pc" files...
7381 for cf_add_1lib in $LIBS
7382 do
7383         for cf_add_2lib in $cf_add_libs
7384         do
7385                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7386                 then
7387                         cf_add_1lib=
7388                         break
7389                 fi
7390         done
7391         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7392 done
7393 LIBS="$cf_add_libs"
7394
7395 else
7396   { { echo "$as_me:7396: error: Cannot find PCRE2 POSIX library" >&5
7397 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7398    { (exit 1); exit 1; }; }
7399 fi
7400
7401 fi
7402
7403                 ;;
7404         esac
7405
7406         # either way, check for the library header files
7407
7408 for ac_header in pcre2-posix.h pcreposix.h
7409 do
7410 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7411 echo "$as_me:7411: checking for $ac_header" >&5
7412 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7413 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7414   echo $ECHO_N "(cached) $ECHO_C" >&6
7415 else
7416   cat >conftest.$ac_ext <<_ACEOF
7417 #line 7417 "configure"
7418 #include "confdefs.h"
7419 #include <$ac_header>
7420 _ACEOF
7421 if { (eval echo "$as_me:7421: \"$ac_cpp conftest.$ac_ext\"") >&5
7422   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7423   ac_status=$?
7424   egrep -v '^ *\+' conftest.er1 >conftest.err
7425   rm -f conftest.er1
7426   cat conftest.err >&5
7427   echo "$as_me:7427: \$? = $ac_status" >&5
7428   (exit $ac_status); } >/dev/null; then
7429   if test -s conftest.err; then
7430     ac_cpp_err=$ac_c_preproc_warn_flag
7431   else
7432     ac_cpp_err=
7433   fi
7434 else
7435   ac_cpp_err=yes
7436 fi
7437 if test -z "$ac_cpp_err"; then
7438   eval "$as_ac_Header=yes"
7439 else
7440   echo "$as_me: failed program was:" >&5
7441   cat conftest.$ac_ext >&5
7442   eval "$as_ac_Header=no"
7443 fi
7444 rm -f conftest.err conftest.$ac_ext
7445 fi
7446 echo "$as_me:7446: result: `eval echo '${'$as_ac_Header'}'`" >&5
7447 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7448 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7449   cat >>confdefs.h <<EOF
7450 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7451 EOF
7452
7453 fi
7454 done
7455
7456 fi
7457
7458 # not everyone has "test -c"
7459 if test -c /dev/sysmouse 2>/dev/null ; then
7460 echo "$as_me:7460: checking if you want to use sysmouse" >&5
7461 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7462
7463 # Check whether --with-sysmouse or --without-sysmouse was given.
7464 if test "${with_sysmouse+set}" = set; then
7465   withval="$with_sysmouse"
7466   cf_with_sysmouse=$withval
7467 else
7468   cf_with_sysmouse=maybe
7469 fi;
7470         if test "$cf_with_sysmouse" != no ; then
7471         cat >conftest.$ac_ext <<_ACEOF
7472 #line 7472 "configure"
7473 #include "confdefs.h"
7474
7475 #include <osreldate.h>
7476 #if (__FreeBSD_version >= 400017)
7477 #include <sys/consio.h>
7478 #include <sys/fbio.h>
7479 #else
7480 #include <machine/console.h>
7481 #endif
7482
7483 int
7484 main (void)
7485 {
7486
7487         struct mouse_info the_mouse;
7488         ioctl(0, CONS_MOUSECTL, &the_mouse);
7489
7490   ;
7491   return 0;
7492 }
7493 _ACEOF
7494 rm -f conftest.$ac_objext
7495 if { (eval echo "$as_me:7495: \"$ac_compile\"") >&5
7496   (eval $ac_compile) 2>&5
7497   ac_status=$?
7498   echo "$as_me:7498: \$? = $ac_status" >&5
7499   (exit $ac_status); } &&
7500          { ac_try='test -s conftest.$ac_objext'
7501   { (eval echo "$as_me:7501: \"$ac_try\"") >&5
7502   (eval $ac_try) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); }; }; then
7506   cf_with_sysmouse=yes
7507 else
7508   echo "$as_me: failed program was:" >&5
7509 cat conftest.$ac_ext >&5
7510 cf_with_sysmouse=no
7511 fi
7512 rm -f conftest.$ac_objext conftest.$ac_ext
7513         fi
7514 echo "$as_me:7514: result: $cf_with_sysmouse" >&5
7515 echo "${ECHO_T}$cf_with_sysmouse" >&6
7516 test "$cf_with_sysmouse" = yes &&
7517 cat >>confdefs.h <<\EOF
7518 #define USE_SYSMOUSE 1
7519 EOF
7520
7521 fi
7522
7523 # pretend that ncurses==ncursesw==ncursest
7524 echo "$as_me:7524: checking if you want to disable library suffixes" >&5
7525 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7526
7527 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7528 if test "${enable_lib_suffixes+set}" = set; then
7529   enableval="$enable_lib_suffixes"
7530   test "$enableval" != no && enableval=yes
7531         if test "$enableval" != "yes" ; then
7532     disable_lib_suffixes=yes
7533         else
7534                 disable_lib_suffixes=no
7535         fi
7536 else
7537   enableval=yes
7538         disable_lib_suffixes=no
7539
7540 fi;
7541 echo "$as_me:7541: result: $disable_lib_suffixes" >&5
7542 echo "${ECHO_T}$disable_lib_suffixes" >&6
7543
7544 ### If we're building with rpath, try to link non-standard libs that way too.
7545 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7546
7547 echo "$as_me:7547: checking if rpath-hack should be disabled" >&5
7548 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7549
7550 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7551 if test "${enable_rpath_hack+set}" = set; then
7552   enableval="$enable_rpath_hack"
7553   test "$enableval" != no && enableval=yes
7554         if test "$enableval" != "yes" ; then
7555     cf_disable_rpath_hack=yes
7556         else
7557                 cf_disable_rpath_hack=no
7558         fi
7559 else
7560   enableval=yes
7561         cf_disable_rpath_hack=no
7562
7563 fi;
7564 echo "$as_me:7564: result: $cf_disable_rpath_hack" >&5
7565 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7566 if test "$cf_disable_rpath_hack" = no ; then
7567
7568 echo "$as_me:7568: checking for updated LDFLAGS" >&5
7569 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7570 if test -n "$LD_RPATH_OPT" ; then
7571         echo "$as_me:7571: result: maybe" >&5
7572 echo "${ECHO_T}maybe" >&6
7573
7574         for ac_prog in ldd
7575 do
7576   # Extract the first word of "$ac_prog", so it can be a program name with args.
7577 set dummy $ac_prog; ac_word=$2
7578 echo "$as_me:7578: checking for $ac_word" >&5
7579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7580 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7581   echo $ECHO_N "(cached) $ECHO_C" >&6
7582 else
7583   if test -n "$cf_ldd_prog"; then
7584   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7585 else
7586   ac_save_IFS=$IFS; IFS=$ac_path_separator
7587 ac_dummy="$PATH"
7588 for ac_dir in $ac_dummy; do
7589   IFS=$ac_save_IFS
7590   test -z "$ac_dir" && ac_dir=.
7591   $as_executable_p "$ac_dir/$ac_word" || continue
7592 ac_cv_prog_cf_ldd_prog="$ac_prog"
7593 echo "$as_me:7593: found $ac_dir/$ac_word" >&5
7594 break
7595 done
7596
7597 fi
7598 fi
7599 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7600 if test -n "$cf_ldd_prog"; then
7601   echo "$as_me:7601: result: $cf_ldd_prog" >&5
7602 echo "${ECHO_T}$cf_ldd_prog" >&6
7603 else
7604   echo "$as_me:7604: result: no" >&5
7605 echo "${ECHO_T}no" >&6
7606 fi
7607
7608   test -n "$cf_ldd_prog" && break
7609 done
7610 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7611
7612         cf_rpath_list="/usr/lib /lib"
7613         if test "$cf_ldd_prog" != no
7614         then
7615                 cf_rpath_oops=
7616
7617 cat >conftest.$ac_ext <<_ACEOF
7618 #line 7618 "configure"
7619 #include "confdefs.h"
7620 #include <stdio.h>
7621 int
7622 main (void)
7623 {
7624 printf("Hello");
7625   ;
7626   return 0;
7627 }
7628 _ACEOF
7629 rm -f conftest.$ac_objext conftest$ac_exeext
7630 if { (eval echo "$as_me:7630: \"$ac_link\"") >&5
7631   (eval $ac_link) 2>&5
7632   ac_status=$?
7633   echo "$as_me:7633: \$? = $ac_status" >&5
7634   (exit $ac_status); } &&
7635          { ac_try='test -s conftest$ac_exeext'
7636   { (eval echo "$as_me:7636: \"$ac_try\"") >&5
7637   (eval $ac_try) 2>&5
7638   ac_status=$?
7639   echo "$as_me:7639: \$? = $ac_status" >&5
7640   (exit $ac_status); }; }; then
7641   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7642                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7643 else
7644   echo "$as_me: failed program was:" >&5
7645 cat conftest.$ac_ext >&5
7646 fi
7647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7648
7649                 # If we passed the link-test, but get a "not found" on a given library,
7650                 # this could be due to inept reconfiguration of gcc to make it only
7651                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7652                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7653                 # /usr/local libraries.
7654                 if test -n "$cf_rpath_oops"
7655                 then
7656                         for cf_rpath_src in $cf_rpath_oops
7657                         do
7658                                 for cf_rpath_dir in \
7659                                         /usr/local \
7660                                         /usr/pkg \
7661                                         /opt/sfw
7662                                 do
7663                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7664                                         then
7665                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7666
7667 echo "${as_me:-configure}:7667: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7668
7669                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7670                                                 break
7671                                         fi
7672                                 done
7673                         done
7674                 fi
7675         fi
7676
7677         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7678
7679 echo "${as_me:-configure}:7679: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7680
7681 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7682
7683 echo "${as_me:-configure}:7683: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7684
7685 cf_rpath_dst=
7686 for cf_rpath_src in $LDFLAGS
7687 do
7688         case $cf_rpath_src in
7689         (-L*)
7690
7691                 # check if this refers to a directory which we will ignore
7692                 cf_rpath_skip=no
7693                 if test -n "$cf_rpath_list"
7694                 then
7695                         for cf_rpath_item in $cf_rpath_list
7696                         do
7697                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7698                                 then
7699                                         cf_rpath_skip=yes
7700                                         break
7701                                 fi
7702                         done
7703                 fi
7704
7705                 if test "$cf_rpath_skip" = no
7706                 then
7707                         # transform the option
7708                         if test "$LD_RPATH_OPT" = "-R " ; then
7709                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7710                         else
7711                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7712                         fi
7713
7714                         # if we have not already added this, add it now
7715                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7716                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7717                         then
7718                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7719
7720 echo "${as_me:-configure}:7720: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7721
7722                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7723                         fi
7724                 fi
7725                 ;;
7726         esac
7727         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7728 done
7729 LDFLAGS=$cf_rpath_dst
7730
7731 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7732
7733 echo "${as_me:-configure}:7733: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7734
7735 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7736
7737 echo "${as_me:-configure}:7737: testing ...checking LIBS $LIBS ..." 1>&5
7738
7739 cf_rpath_dst=
7740 for cf_rpath_src in $LIBS
7741 do
7742         case $cf_rpath_src in
7743         (-L*)
7744
7745                 # check if this refers to a directory which we will ignore
7746                 cf_rpath_skip=no
7747                 if test -n "$cf_rpath_list"
7748                 then
7749                         for cf_rpath_item in $cf_rpath_list
7750                         do
7751                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7752                                 then
7753                                         cf_rpath_skip=yes
7754                                         break
7755                                 fi
7756                         done
7757                 fi
7758
7759                 if test "$cf_rpath_skip" = no
7760                 then
7761                         # transform the option
7762                         if test "$LD_RPATH_OPT" = "-R " ; then
7763                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7764                         else
7765                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7766                         fi
7767
7768                         # if we have not already added this, add it now
7769                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7770                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7771                         then
7772                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7773
7774 echo "${as_me:-configure}:7774: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7775
7776                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7777                         fi
7778                 fi
7779                 ;;
7780         esac
7781         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7782 done
7783 LIBS=$cf_rpath_dst
7784
7785 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7786
7787 echo "${as_me:-configure}:7787: testing ...checked LIBS $LIBS ..." 1>&5
7788
7789         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7790
7791 echo "${as_me:-configure}:7791: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7792
7793 else
7794         echo "$as_me:7794: result: no" >&5
7795 echo "${ECHO_T}no" >&6
7796 fi
7797
7798 fi
7799
7800 fi
7801
7802 ###############################################################################
7803
7804 ###     use option --with-extra-suffix to append suffix to headers and libraries
7805 echo "$as_me:7805: checking if you wish to append extra suffix to header/library paths" >&5
7806 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7807 EXTRA_SUFFIX=
7808
7809 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7810 if test "${with_extra_suffix+set}" = set; then
7811   withval="$with_extra_suffix"
7812   case x$withval in
7813         (no)
7814                 ;;
7815         (xyes|x)
7816                 EXTRA_SUFFIX=$cf_cv_abi_version
7817                 ;;
7818         (*)
7819                 EXTRA_SUFFIX=$withval
7820                 ;;
7821         esac
7822
7823 fi;
7824 echo "$as_me:7824: result: $EXTRA_SUFFIX" >&5
7825 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7826
7827 ###     use option --disable-overwrite to leave out the link to -lcurses
7828 echo "$as_me:7828: checking if you wish to install ncurses overwriting curses" >&5
7829 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7830
7831 # Check whether --enable-overwrite or --disable-overwrite was given.
7832 if test "${enable_overwrite+set}" = set; then
7833   enableval="$enable_overwrite"
7834   with_overwrite=$enableval
7835 else
7836   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7837 fi;
7838 echo "$as_me:7838: result: $with_overwrite" >&5
7839 echo "${ECHO_T}$with_overwrite" >&6
7840
7841 echo "$as_me:7841: checking if external terminfo-database is used" >&5
7842 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7843
7844 # Check whether --enable-database or --disable-database was given.
7845 if test "${enable_database+set}" = set; then
7846   enableval="$enable_database"
7847   use_database=$enableval
7848 else
7849   use_database=yes
7850 fi;
7851 echo "$as_me:7851: result: $use_database" >&5
7852 echo "${ECHO_T}$use_database" >&6
7853
7854 case $host_os in
7855 (os2*)
7856         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7857         ;;
7858 (*)
7859         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7860         ;;
7861 esac
7862
7863 NCURSES_USE_DATABASE=0
7864 if test "$use_database" != no ; then
7865         NCURSES_USE_DATABASE=1
7866
7867         echo "$as_me:7867: checking which terminfo source-file will be installed" >&5
7868 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7869
7870 # Check whether --with-database or --without-database was given.
7871 if test "${with_database+set}" = set; then
7872   withval="$with_database"
7873   TERMINFO_SRC=$withval
7874 fi;
7875         echo "$as_me:7875: result: $TERMINFO_SRC" >&5
7876 echo "${ECHO_T}$TERMINFO_SRC" >&6
7877
7878         echo "$as_me:7878: checking whether to use hashed database instead of directory/tree" >&5
7879 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7880
7881 # Check whether --with-hashed-db or --without-hashed-db was given.
7882 if test "${with_hashed_db+set}" = set; then
7883   withval="$with_hashed_db"
7884
7885 else
7886   with_hashed_db=no
7887 fi;
7888         echo "$as_me:7888: result: $with_hashed_db" >&5
7889 echo "${ECHO_T}$with_hashed_db" >&6
7890 else
7891         with_hashed_db=no
7892 fi
7893
7894 echo "$as_me:7894: checking for list of fallback descriptions" >&5
7895 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7896
7897 # Check whether --with-fallbacks or --without-fallbacks was given.
7898 if test "${with_fallbacks+set}" = set; then
7899   withval="$with_fallbacks"
7900   with_fallback=$withval
7901 else
7902   with_fallback=
7903 fi;
7904 echo "$as_me:7904: result: $with_fallback" >&5
7905 echo "${ECHO_T}$with_fallback" >&6
7906
7907 case ".$with_fallback" in
7908 (.|.no)
7909         FALLBACK_LIST=
7910         ;;
7911 (.yes)
7912         { echo "$as_me:7912: WARNING: expected a list of terminal descriptions" >&5
7913 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
7914         ;;
7915 (*)
7916         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7917         ;;
7918 esac
7919
7920 USE_FALLBACKS=
7921 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
7922
7923 echo "$as_me:7923: checking if you want modern xterm or antique" >&5
7924 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7925
7926 # Check whether --with-xterm-new or --without-xterm-new was given.
7927 if test "${with_xterm_new+set}" = set; then
7928   withval="$with_xterm_new"
7929   with_xterm_new=$withval
7930 else
7931   with_xterm_new=yes
7932 fi;
7933 case $with_xterm_new in
7934 (no) with_xterm_new=xterm-old;;
7935 (*)      with_xterm_new=xterm-new;;
7936 esac
7937 echo "$as_me:7937: result: $with_xterm_new" >&5
7938 echo "${ECHO_T}$with_xterm_new" >&6
7939 WHICH_XTERM=$with_xterm_new
7940
7941 echo "$as_me:7941: checking if xterm backspace sends BS or DEL" >&5
7942 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7943
7944 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7945 if test "${with_xterm_kbs+set}" = set; then
7946   withval="$with_xterm_kbs"
7947   with_xterm_kbs=$withval
7948 else
7949   with_xterm_kbs=BS
7950 fi;
7951 case x$with_xterm_kbs in
7952 (xyes|xno|xBS|xbs|x8)
7953         with_xterm_kbs=BS
7954         ;;
7955 (xDEL|xdel|x127)
7956         with_xterm_kbs=DEL
7957         ;;
7958 (*)
7959         with_xterm_kbs=$withval
7960         ;;
7961 esac
7962 echo "$as_me:7962: result: $with_xterm_kbs" >&5
7963 echo "${ECHO_T}$with_xterm_kbs" >&6
7964 XTERM_KBS=$with_xterm_kbs
7965
7966 MAKE_TERMINFO=
7967 if test "$use_database" = no ; then
7968         TERMINFO="${datadir}/terminfo"
7969         MAKE_TERMINFO="#"
7970 else
7971
7972 echo "$as_me:7972: checking for list of terminfo directories" >&5
7973 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7974
7975 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7976 if test "${with_terminfo_dirs+set}" = set; then
7977   withval="$with_terminfo_dirs"
7978
7979 else
7980   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7981 fi;
7982 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7983 cf_dst_path=
7984 for cf_src_path in $withval
7985 do
7986
7987 if test "x$prefix" != xNONE; then
7988         cf_path_syntax="$prefix"
7989 else
7990         cf_path_syntax="$ac_default_prefix"
7991 fi
7992
7993 case ".$cf_src_path" in
7994 (.\$\(*\)*|.\'*\'*)
7995         ;;
7996 (..|./*|.\\*)
7997         ;;
7998 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7999         ;;
8000 (.\${*prefix}*|.\${*dir}*)
8001         eval cf_src_path="$cf_src_path"
8002         case ".$cf_src_path" in
8003         (.NONE/*)
8004                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8005                 ;;
8006         esac
8007         ;;
8008 (.no|.NONE/*)
8009         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8010         ;;
8011 (*)
8012         { { echo "$as_me:8012: error: expected a pathname, not \"$cf_src_path\"" >&5
8013 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8014    { (exit 1); exit 1; }; }
8015         ;;
8016 esac
8017
8018   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8019   cf_dst_path="${cf_dst_path}${cf_src_path}"
8020 done
8021 IFS="$ac_save_ifs"
8022
8023 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8024 # so we have to check/work around.  We do prefer the result of "eval"...
8025 eval cf_dst_eval="$cf_dst_path"
8026 case "x$cf_dst_eval" in
8027 (xNONE*)
8028         TERMINFO_DIRS=$cf_dst_path
8029         ;;
8030 (*)
8031         TERMINFO_DIRS="$cf_dst_eval"
8032         ;;
8033 esac
8034
8035 echo "$as_me:8035: result: $TERMINFO_DIRS" >&5
8036 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8037 test -n "$TERMINFO_DIRS" &&
8038 cat >>confdefs.h <<EOF
8039 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8040 EOF
8041
8042 case "x$TERMINFO" in
8043 x???:*)
8044         { echo "$as_me:8044: WARNING: ignoring non-directory/file TERMINFO value" >&5
8045 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8046         unset TERMINFO
8047         ;;
8048 esac
8049
8050 echo "$as_me:8050: checking for default terminfo directory" >&5
8051 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8052
8053 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8054 if test "${with_default_terminfo_dir+set}" = set; then
8055   withval="$with_default_terminfo_dir"
8056
8057 else
8058   withval="${TERMINFO:-${datadir}/terminfo}"
8059 fi; if test -n "${datadir}/terminfo" ; then
8060
8061 if test "x$prefix" != xNONE; then
8062         cf_path_syntax="$prefix"
8063 else
8064         cf_path_syntax="$ac_default_prefix"
8065 fi
8066
8067 case ".$withval" in
8068 (.\$\(*\)*|.\'*\'*)
8069         ;;
8070 (..|./*|.\\*)
8071         ;;
8072 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8073         ;;
8074 (.\${*prefix}*|.\${*dir}*)
8075         eval withval="$withval"
8076         case ".$withval" in
8077         (.NONE/*)
8078                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8079                 ;;
8080         esac
8081         ;;
8082 (.no|.NONE/*)
8083         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8084         ;;
8085 (*)
8086         { { echo "$as_me:8086: error: expected a pathname, not \"$withval\"" >&5
8087 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8088    { (exit 1); exit 1; }; }
8089         ;;
8090 esac
8091
8092 fi
8093 eval TERMINFO="$withval"
8094
8095 echo "$as_me:8095: result: $TERMINFO" >&5
8096 echo "${ECHO_T}$TERMINFO" >&6
8097
8098 cat >>confdefs.h <<EOF
8099 #define TERMINFO "$TERMINFO"
8100 EOF
8101
8102 fi
8103
8104 ###     use option --disable-big-core to make tic run on small machines
8105 ###     We need 4Mb, check if we can allocate 50% more than that.
8106 echo "$as_me:8106: checking if big-core option selected" >&5
8107 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8108
8109 # Check whether --enable-big-core or --disable-big-core was given.
8110 if test "${enable_big_core+set}" = set; then
8111   enableval="$enable_big_core"
8112   with_big_core=$enableval
8113 else
8114   if test "$cross_compiling" = yes; then
8115   with_big_core=no
8116 else
8117   cat >conftest.$ac_ext <<_ACEOF
8118 #line 8118 "configure"
8119 #include "confdefs.h"
8120
8121 #include <stdlib.h>
8122 #include <string.h>
8123 int main() {
8124         unsigned long n = 6000000L;
8125         char *s = malloc(n);
8126         if (s != 0)
8127                 s[0] = s[n-1] = 0;
8128         ${cf_cv_main_return:-return}(s == 0);
8129 }
8130 _ACEOF
8131 rm -f conftest$ac_exeext
8132 if { (eval echo "$as_me:8132: \"$ac_link\"") >&5
8133   (eval $ac_link) 2>&5
8134   ac_status=$?
8135   echo "$as_me:8135: \$? = $ac_status" >&5
8136   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8137   { (eval echo "$as_me:8137: \"$ac_try\"") >&5
8138   (eval $ac_try) 2>&5
8139   ac_status=$?
8140   echo "$as_me:8140: \$? = $ac_status" >&5
8141   (exit $ac_status); }; }; then
8142   with_big_core=yes
8143 else
8144   echo "$as_me: program exited with status $ac_status" >&5
8145 echo "$as_me: failed program was:" >&5
8146 cat conftest.$ac_ext >&5
8147 with_big_core=no
8148 fi
8149 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8150 fi
8151 fi;
8152 echo "$as_me:8152: result: $with_big_core" >&5
8153 echo "${ECHO_T}$with_big_core" >&6
8154 test "x$with_big_core" = "xyes" &&
8155 cat >>confdefs.h <<\EOF
8156 #define HAVE_BIG_CORE 1
8157 EOF
8158
8159 ### ISO C only guarantees 512-char strings, we have tables which load faster
8160 ### when constructed using "big" strings.  More than the C compiler, the awk
8161 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8162 echo "$as_me:8162: checking if big-strings option selected" >&5
8163 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8164
8165 # Check whether --enable-big-strings or --disable-big-strings was given.
8166 if test "${enable_big_strings+set}" = set; then
8167   enableval="$enable_big_strings"
8168   with_big_strings=$enableval
8169 else
8170
8171         case x$AWK in
8172         (x)
8173                 eval with_big_strings=no
8174                 ;;
8175         (*)
8176                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8177                         | $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
8178                         eval with_big_strings=yes
8179                 else
8180                         eval with_big_strings=no
8181                 fi
8182                 ;;
8183         esac
8184
8185 fi;
8186 echo "$as_me:8186: result: $with_big_strings" >&5
8187 echo "${ECHO_T}$with_big_strings" >&6
8188
8189 USE_BIG_STRINGS=0
8190 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8191
8192 ###     use option --enable-termcap to compile in the termcap fallback support
8193 echo "$as_me:8193: checking if you want termcap-fallback support" >&5
8194 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8195
8196 # Check whether --enable-termcap or --disable-termcap was given.
8197 if test "${enable_termcap+set}" = set; then
8198   enableval="$enable_termcap"
8199   with_termcap=$enableval
8200 else
8201   with_termcap=no
8202 fi;
8203 echo "$as_me:8203: result: $with_termcap" >&5
8204 echo "${ECHO_T}$with_termcap" >&6
8205
8206 NCURSES_USE_TERMCAP=0
8207 if test "x$with_termcap" != "xyes" ; then
8208         if test "$use_database" = no ; then
8209                 if test -z "$with_fallback" ; then
8210                         { { echo "$as_me:8210: error: You have disabled the database w/o specifying fallbacks" >&5
8211 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8212    { (exit 1); exit 1; }; }
8213                 fi
8214         fi
8215
8216 cat >>confdefs.h <<\EOF
8217 #define PURE_TERMINFO 1
8218 EOF
8219
8220 else
8221
8222         if test "$with_ticlib" != no ; then
8223                 { { echo "$as_me:8223: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8224 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8225    { (exit 1); exit 1; }; }
8226         fi
8227
8228         NCURSES_USE_TERMCAP=1
8229         echo "$as_me:8229: checking for list of termcap files" >&5
8230 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8231
8232 # Check whether --with-termpath or --without-termpath was given.
8233 if test "${with_termpath+set}" = set; then
8234   withval="$with_termpath"
8235
8236 else
8237   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8238 fi;
8239 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8240 cf_dst_path=
8241 for cf_src_path in $withval
8242 do
8243
8244 if test "x$prefix" != xNONE; then
8245         cf_path_syntax="$prefix"
8246 else
8247         cf_path_syntax="$ac_default_prefix"
8248 fi
8249
8250 case ".$cf_src_path" in
8251 (.\$\(*\)*|.\'*\'*)
8252         ;;
8253 (..|./*|.\\*)
8254         ;;
8255 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8256         ;;
8257 (.\${*prefix}*|.\${*dir}*)
8258         eval cf_src_path="$cf_src_path"
8259         case ".$cf_src_path" in
8260         (.NONE/*)
8261                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8262                 ;;
8263         esac
8264         ;;
8265 (.no|.NONE/*)
8266         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8267         ;;
8268 (*)
8269         { { echo "$as_me:8269: error: expected a pathname, not \"$cf_src_path\"" >&5
8270 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8271    { (exit 1); exit 1; }; }
8272         ;;
8273 esac
8274
8275   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8276   cf_dst_path="${cf_dst_path}${cf_src_path}"
8277 done
8278 IFS="$ac_save_ifs"
8279
8280 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8281 # so we have to check/work around.  We do prefer the result of "eval"...
8282 eval cf_dst_eval="$cf_dst_path"
8283 case "x$cf_dst_eval" in
8284 (xNONE*)
8285         TERMPATH=$cf_dst_path
8286         ;;
8287 (*)
8288         TERMPATH="$cf_dst_eval"
8289         ;;
8290 esac
8291
8292         echo "$as_me:8292: result: $TERMPATH" >&5
8293 echo "${ECHO_T}$TERMPATH" >&6
8294         test -n "$TERMPATH" &&
8295 cat >>confdefs.h <<EOF
8296 #define TERMPATH "$TERMPATH"
8297 EOF
8298
8299         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8300         echo "$as_me:8300: checking if fast termcap-loader is needed" >&5
8301 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8302
8303 # Check whether --enable-getcap or --disable-getcap was given.
8304 if test "${enable_getcap+set}" = set; then
8305   enableval="$enable_getcap"
8306   with_getcap=$enableval
8307 else
8308   with_getcap=no
8309 fi;
8310         echo "$as_me:8310: result: $with_getcap" >&5
8311 echo "${ECHO_T}$with_getcap" >&6
8312         test "x$with_getcap" = "xyes" &&
8313 cat >>confdefs.h <<\EOF
8314 #define USE_GETCAP 1
8315 EOF
8316
8317         echo "$as_me:8317: checking if translated termcaps will be cached in ~/.terminfo" >&5
8318 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8319
8320 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8321 if test "${enable_getcap_cache+set}" = set; then
8322   enableval="$enable_getcap_cache"
8323   with_getcap_cache=$enableval
8324 else
8325   with_getcap_cache=no
8326 fi;
8327         echo "$as_me:8327: result: $with_getcap_cache" >&5
8328 echo "${ECHO_T}$with_getcap_cache" >&6
8329         test "x$with_getcap_cache" = "xyes" &&
8330 cat >>confdefs.h <<\EOF
8331 #define USE_GETCAP_CACHE 1
8332 EOF
8333
8334 fi
8335
8336 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8337 echo "$as_me:8337: checking if ~/.terminfo is wanted" >&5
8338 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8339
8340 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8341 if test "${enable_home_terminfo+set}" = set; then
8342   enableval="$enable_home_terminfo"
8343   with_home_terminfo=$enableval
8344 else
8345   with_home_terminfo=yes
8346 fi;
8347 echo "$as_me:8347: result: $with_home_terminfo" >&5
8348 echo "${ECHO_T}$with_home_terminfo" >&6
8349 test "x$with_home_terminfo" = "xyes" &&
8350 cat >>confdefs.h <<\EOF
8351 #define USE_HOME_TERMINFO 1
8352 EOF
8353
8354 echo "$as_me:8354: checking if you want to use restricted environment when running as root" >&5
8355 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8356
8357 # Check whether --enable-root-environ or --disable-root-environ was given.
8358 if test "${enable_root_environ+set}" = set; then
8359   enableval="$enable_root_environ"
8360   with_root_environ=$enableval
8361 else
8362   with_root_environ=yes
8363 fi;
8364 echo "$as_me:8364: result: $with_root_environ" >&5
8365 echo "${ECHO_T}$with_root_environ" >&6
8366 test "x$with_root_environ" = xyes &&
8367 cat >>confdefs.h <<\EOF
8368 #define USE_ROOT_ENVIRON 1
8369 EOF
8370
8371 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8372 ###   to reduce storage requirements for the terminfo database.
8373
8374 for ac_header in \
8375 unistd.h \
8376
8377 do
8378 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8379 echo "$as_me:8379: checking for $ac_header" >&5
8380 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8381 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8382   echo $ECHO_N "(cached) $ECHO_C" >&6
8383 else
8384   cat >conftest.$ac_ext <<_ACEOF
8385 #line 8385 "configure"
8386 #include "confdefs.h"
8387 #include <$ac_header>
8388 _ACEOF
8389 if { (eval echo "$as_me:8389: \"$ac_cpp conftest.$ac_ext\"") >&5
8390   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8391   ac_status=$?
8392   egrep -v '^ *\+' conftest.er1 >conftest.err
8393   rm -f conftest.er1
8394   cat conftest.err >&5
8395   echo "$as_me:8395: \$? = $ac_status" >&5
8396   (exit $ac_status); } >/dev/null; then
8397   if test -s conftest.err; then
8398     ac_cpp_err=$ac_c_preproc_warn_flag
8399   else
8400     ac_cpp_err=
8401   fi
8402 else
8403   ac_cpp_err=yes
8404 fi
8405 if test -z "$ac_cpp_err"; then
8406   eval "$as_ac_Header=yes"
8407 else
8408   echo "$as_me: failed program was:" >&5
8409   cat conftest.$ac_ext >&5
8410   eval "$as_ac_Header=no"
8411 fi
8412 rm -f conftest.err conftest.$ac_ext
8413 fi
8414 echo "$as_me:8414: result: `eval echo '${'$as_ac_Header'}'`" >&5
8415 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8416 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8417   cat >>confdefs.h <<EOF
8418 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8419 EOF
8420
8421 fi
8422 done
8423
8424 for ac_func in \
8425         remove \
8426         unlink
8427 do
8428 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8429 echo "$as_me:8429: checking for $ac_func" >&5
8430 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8431 if eval "test \"\${$as_ac_var+set}\" = set"; then
8432   echo $ECHO_N "(cached) $ECHO_C" >&6
8433 else
8434   cat >conftest.$ac_ext <<_ACEOF
8435 #line 8435 "configure"
8436 #include "confdefs.h"
8437 #define $ac_func autoconf_temporary
8438 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8439 #undef $ac_func
8440
8441 #ifdef __cplusplus
8442 extern "C"
8443 #endif
8444
8445 /* We use char because int might match the return type of a gcc2
8446    builtin and then its argument prototype would still apply.  */
8447 char $ac_func (void);
8448
8449 int
8450 main (void)
8451 {
8452
8453 /* The GNU C library defines stubs for functions which it implements
8454     to always fail with ENOSYS.  Some functions are actually named
8455     something starting with __ and the normal name is an alias.  */
8456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8457 #error found stub for $ac_func
8458 #endif
8459
8460         return $ac_func ();
8461   ;
8462   return 0;
8463 }
8464 _ACEOF
8465 rm -f conftest.$ac_objext conftest$ac_exeext
8466 if { (eval echo "$as_me:8466: \"$ac_link\"") >&5
8467   (eval $ac_link) 2>&5
8468   ac_status=$?
8469   echo "$as_me:8469: \$? = $ac_status" >&5
8470   (exit $ac_status); } &&
8471          { ac_try='test -s conftest$ac_exeext'
8472   { (eval echo "$as_me:8472: \"$ac_try\"") >&5
8473   (eval $ac_try) 2>&5
8474   ac_status=$?
8475   echo "$as_me:8475: \$? = $ac_status" >&5
8476   (exit $ac_status); }; }; then
8477   eval "$as_ac_var=yes"
8478 else
8479   echo "$as_me: failed program was:" >&5
8480 cat conftest.$ac_ext >&5
8481 eval "$as_ac_var=no"
8482 fi
8483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8484 fi
8485 echo "$as_me:8485: result: `eval echo '${'$as_ac_var'}'`" >&5
8486 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8487 if test `eval echo '${'$as_ac_var'}'` = yes; then
8488   cat >>confdefs.h <<EOF
8489 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8490 EOF
8491
8492 fi
8493 done
8494
8495 if test "$cross_compiling" = yes ; then
8496
8497 for ac_func in \
8498                 link \
8499                 symlink
8500 do
8501 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8502 echo "$as_me:8502: checking for $ac_func" >&5
8503 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8504 if eval "test \"\${$as_ac_var+set}\" = set"; then
8505   echo $ECHO_N "(cached) $ECHO_C" >&6
8506 else
8507   cat >conftest.$ac_ext <<_ACEOF
8508 #line 8508 "configure"
8509 #include "confdefs.h"
8510 #define $ac_func autoconf_temporary
8511 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8512 #undef $ac_func
8513
8514 #ifdef __cplusplus
8515 extern "C"
8516 #endif
8517
8518 /* We use char because int might match the return type of a gcc2
8519    builtin and then its argument prototype would still apply.  */
8520 char $ac_func (void);
8521
8522 int
8523 main (void)
8524 {
8525
8526 /* The GNU C library defines stubs for functions which it implements
8527     to always fail with ENOSYS.  Some functions are actually named
8528     something starting with __ and the normal name is an alias.  */
8529 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8530 #error found stub for $ac_func
8531 #endif
8532
8533         return $ac_func ();
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 rm -f conftest.$ac_objext conftest$ac_exeext
8539 if { (eval echo "$as_me:8539: \"$ac_link\"") >&5
8540   (eval $ac_link) 2>&5
8541   ac_status=$?
8542   echo "$as_me:8542: \$? = $ac_status" >&5
8543   (exit $ac_status); } &&
8544          { ac_try='test -s conftest$ac_exeext'
8545   { (eval echo "$as_me:8545: \"$ac_try\"") >&5
8546   (eval $ac_try) 2>&5
8547   ac_status=$?
8548   echo "$as_me:8548: \$? = $ac_status" >&5
8549   (exit $ac_status); }; }; then
8550   eval "$as_ac_var=yes"
8551 else
8552   echo "$as_me: failed program was:" >&5
8553 cat conftest.$ac_ext >&5
8554 eval "$as_ac_var=no"
8555 fi
8556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8557 fi
8558 echo "$as_me:8558: result: `eval echo '${'$as_ac_var'}'`" >&5
8559 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8560 if test `eval echo '${'$as_ac_var'}'` = yes; then
8561   cat >>confdefs.h <<EOF
8562 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8563 EOF
8564
8565 fi
8566 done
8567
8568 else
8569         echo "$as_me:8569: checking if link/symlink functions work" >&5
8570 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
8571 if test "${cf_cv_link_funcs+set}" = set; then
8572   echo $ECHO_N "(cached) $ECHO_C" >&6
8573 else
8574
8575                 cf_cv_link_funcs=
8576                 for cf_func in link symlink ; do
8577                         if test "$cross_compiling" = yes; then
8578
8579                         eval 'ac_cv_func_'$cf_func'=error'
8580 else
8581   cat >conftest.$ac_ext <<_ACEOF
8582 #line 8582 "configure"
8583 #include "confdefs.h"
8584
8585 #include <sys/types.h>
8586 #include <sys/stat.h>
8587 #ifdef HAVE_UNISTD_H
8588 #include <unistd.h>
8589 #endif
8590 int main(void)
8591 {
8592         int fail = 0;
8593         char *src = "config.log";
8594         char *dst = "conftest.chk";
8595         struct stat src_sb;
8596         struct stat dst_sb;
8597
8598         stat(src, &src_sb);
8599         fail = ($cf_func("config.log", "conftest.chk") < 0)
8600             || (stat(dst, &dst_sb) < 0)
8601             || (dst_sb.st_mtime != src_sb.st_mtime);
8602 #ifdef HAVE_UNLINK
8603         unlink(dst);
8604 #else
8605         remove(dst);
8606 #endif
8607         ${cf_cv_main_return:-return} (fail);
8608 }
8609
8610 _ACEOF
8611 rm -f conftest$ac_exeext
8612 if { (eval echo "$as_me:8612: \"$ac_link\"") >&5
8613   (eval $ac_link) 2>&5
8614   ac_status=$?
8615   echo "$as_me:8615: \$? = $ac_status" >&5
8616   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8617   { (eval echo "$as_me:8617: \"$ac_try\"") >&5
8618   (eval $ac_try) 2>&5
8619   ac_status=$?
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); }; }; then
8622
8623                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
8624                         eval 'ac_cv_func_'$cf_func'=yes'
8625 else
8626   echo "$as_me: program exited with status $ac_status" >&5
8627 echo "$as_me: failed program was:" >&5
8628 cat conftest.$ac_ext >&5
8629
8630                         eval 'ac_cv_func_'$cf_func'=no'
8631 fi
8632 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8633 fi
8634                 done
8635                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
8636
8637 fi
8638 echo "$as_me:8638: result: $cf_cv_link_funcs" >&5
8639 echo "${ECHO_T}$cf_cv_link_funcs" >&6
8640         test "$ac_cv_func_link"    = yes &&
8641 cat >>confdefs.h <<\EOF
8642 #define HAVE_LINK 1
8643 EOF
8644
8645         test "$ac_cv_func_symlink" = yes &&
8646 cat >>confdefs.h <<\EOF
8647 #define HAVE_SYMLINK 1
8648 EOF
8649
8650 fi
8651
8652 with_links=no
8653 with_symlinks=no
8654
8655 # soft links (symbolic links) are useful for some systems where hard links do
8656 # not work, or to make it simpler to copy terminfo trees around.
8657 if test "x$ac_cv_func_symlink" = xyes ; then
8658         echo "$as_me:8658: checking if tic should use symbolic links" >&5
8659 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
8660
8661 # Check whether --enable-symlinks or --disable-symlinks was given.
8662 if test "${enable_symlinks+set}" = set; then
8663   enableval="$enable_symlinks"
8664   with_symlinks=$enableval
8665 else
8666   with_symlinks=no
8667 fi;
8668         echo "$as_me:8668: result: $with_symlinks" >&5
8669 echo "${ECHO_T}$with_symlinks" >&6
8670 fi
8671
8672 # If we have hard links and did not choose to use soft links instead, there is
8673 # no reason to make this choice optional - use the hard links.
8674 if test "$with_symlinks" = no ; then
8675         echo "$as_me:8675: checking if tic should use hard links" >&5
8676 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8677         if test "x$ac_cv_func_link" = xyes ; then
8678                 with_links=yes
8679         else
8680                 with_links=no
8681         fi
8682         echo "$as_me:8682: result: $with_links" >&5
8683 echo "${ECHO_T}$with_links" >&6
8684 fi
8685
8686 test "x$with_links" = xyes &&
8687 cat >>confdefs.h <<\EOF
8688 #define USE_LINKS 1
8689 EOF
8690
8691 test "x$with_symlinks" = xyes &&
8692 cat >>confdefs.h <<\EOF
8693 #define USE_SYMLINKS 1
8694 EOF
8695
8696 ###   use option --enable-broken-linker to force on use of broken-linker support
8697 echo "$as_me:8697: checking if you want broken-linker support code" >&5
8698 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8699
8700 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8701 if test "${enable_broken_linker+set}" = set; then
8702   enableval="$enable_broken_linker"
8703   with_broken_linker=$enableval
8704 else
8705   with_broken_linker=${BROKEN_LINKER:-no}
8706 fi;
8707 echo "$as_me:8707: result: $with_broken_linker" >&5
8708 echo "${ECHO_T}$with_broken_linker" >&6
8709
8710 BROKEN_LINKER=0
8711 if test "x$with_broken_linker" = xyes ; then
8712
8713 cat >>confdefs.h <<\EOF
8714 #define BROKEN_LINKER 1
8715 EOF
8716
8717         BROKEN_LINKER=1
8718 elif test "$DFT_LWR_MODEL" = shared ; then
8719         case $cf_cv_system_name in
8720         (cygwin*)
8721
8722 cat >>confdefs.h <<\EOF
8723 #define BROKEN_LINKER 1
8724 EOF
8725
8726                 BROKEN_LINKER=1
8727                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8728
8729 echo "${as_me:-configure}:8729: testing cygwin linker is broken anyway ..." 1>&5
8730
8731                 ;;
8732         esac
8733 fi
8734
8735 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8736 echo "$as_me:8736: checking if tputs should process BSD-style prefix padding" >&5
8737 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8738
8739 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8740 if test "${enable_bsdpad+set}" = set; then
8741   enableval="$enable_bsdpad"
8742   with_bsdpad=$enableval
8743 else
8744   with_bsdpad=no
8745 fi;
8746 echo "$as_me:8746: result: $with_bsdpad" >&5
8747 echo "${ECHO_T}$with_bsdpad" >&6
8748 test "x$with_bsdpad" = xyes &&
8749 cat >>confdefs.h <<\EOF
8750 #define BSD_TPUTS 1
8751 EOF
8752
8753 ###   use option --enable-widec to turn on use of wide-character support
8754 NCURSES_CH_T=chtype
8755 NCURSES_LIBUTF8=0
8756
8757 NEED_WCHAR_H=0
8758 NCURSES_MBSTATE_T=0
8759 NCURSES_WCHAR_T=0
8760 NCURSES_WINT_T=0
8761
8762 # Check to define _XOPEN_SOURCE "automatically"
8763 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8764
8765 echo "$as_me:8765: checking if the POSIX test-macros are already defined" >&5
8766 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
8767 if test "${cf_cv_posix_visible+set}" = set; then
8768   echo $ECHO_N "(cached) $ECHO_C" >&6
8769 else
8770
8771 cat >conftest.$ac_ext <<_ACEOF
8772 #line 8772 "configure"
8773 #include "confdefs.h"
8774 #include <stdio.h>
8775 int
8776 main (void)
8777 {
8778
8779 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
8780         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
8781         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
8782         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
8783 #error conflicting symbols found
8784 #endif
8785
8786   ;
8787   return 0;
8788 }
8789 _ACEOF
8790 rm -f conftest.$ac_objext
8791 if { (eval echo "$as_me:8791: \"$ac_compile\"") >&5
8792   (eval $ac_compile) 2>&5
8793   ac_status=$?
8794   echo "$as_me:8794: \$? = $ac_status" >&5
8795   (exit $ac_status); } &&
8796          { ac_try='test -s conftest.$ac_objext'
8797   { (eval echo "$as_me:8797: \"$ac_try\"") >&5
8798   (eval $ac_try) 2>&5
8799   ac_status=$?
8800   echo "$as_me:8800: \$? = $ac_status" >&5
8801   (exit $ac_status); }; }; then
8802   cf_cv_posix_visible=no
8803 else
8804   echo "$as_me: failed program was:" >&5
8805 cat conftest.$ac_ext >&5
8806 cf_cv_posix_visible=yes
8807 fi
8808 rm -f conftest.$ac_objext conftest.$ac_ext
8809
8810 fi
8811 echo "$as_me:8811: result: $cf_cv_posix_visible" >&5
8812 echo "${ECHO_T}$cf_cv_posix_visible" >&6
8813
8814 if test "$cf_cv_posix_visible" = no; then
8815
8816 cf_XOPEN_SOURCE=600
8817 cf_POSIX_C_SOURCE=199506L
8818 cf_xopen_source=
8819
8820 case $host_os in
8821 (aix[4-7]*)
8822         cf_xopen_source="-D_ALL_SOURCE"
8823         ;;
8824 (msys)
8825         cf_XOPEN_SOURCE=600
8826         ;;
8827 (darwin[0-8].*)
8828         cf_xopen_source="-D_APPLE_C_SOURCE"
8829         ;;
8830 (darwin*)
8831         cf_xopen_source="-D_DARWIN_C_SOURCE"
8832         cf_XOPEN_SOURCE=
8833         ;;
8834 (freebsd*|dragonfly*|midnightbsd*)
8835         # 5.x headers associate
8836         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8837         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8838         cf_POSIX_C_SOURCE=200112L
8839         cf_XOPEN_SOURCE=600
8840         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8841         ;;
8842 (hpux11*)
8843         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8844         ;;
8845 (hpux*)
8846         cf_xopen_source="-D_HPUX_SOURCE"
8847         ;;
8848 (irix[56].*)
8849         cf_xopen_source="-D_SGI_SOURCE"
8850         cf_XOPEN_SOURCE=
8851         ;;
8852 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8853
8854 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
8855
8856 echo "$as_me:8856: checking if this is the GNU C library" >&5
8857 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
8858 if test "${cf_cv_gnu_library+set}" = set; then
8859   echo $ECHO_N "(cached) $ECHO_C" >&6
8860 else
8861
8862 cat >conftest.$ac_ext <<_ACEOF
8863 #line 8863 "configure"
8864 #include "confdefs.h"
8865 #include <sys/types.h>
8866 int
8867 main (void)
8868 {
8869
8870         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
8871                 return 0;
8872         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
8873                 return 0;
8874         #else
8875         #       error not GNU C library
8876         #endif
8877   ;
8878   return 0;
8879 }
8880 _ACEOF
8881 rm -f conftest.$ac_objext
8882 if { (eval echo "$as_me:8882: \"$ac_compile\"") >&5
8883   (eval $ac_compile) 2>&5
8884   ac_status=$?
8885   echo "$as_me:8885: \$? = $ac_status" >&5
8886   (exit $ac_status); } &&
8887          { ac_try='test -s conftest.$ac_objext'
8888   { (eval echo "$as_me:8888: \"$ac_try\"") >&5
8889   (eval $ac_try) 2>&5
8890   ac_status=$?
8891   echo "$as_me:8891: \$? = $ac_status" >&5
8892   (exit $ac_status); }; }; then
8893   cf_cv_gnu_library=yes
8894 else
8895   echo "$as_me: failed program was:" >&5
8896 cat conftest.$ac_ext >&5
8897 cf_cv_gnu_library=no
8898 fi
8899 rm -f conftest.$ac_objext conftest.$ac_ext
8900
8901 fi
8902 echo "$as_me:8902: result: $cf_cv_gnu_library" >&5
8903 echo "${ECHO_T}$cf_cv_gnu_library" >&6
8904
8905 if test x$cf_cv_gnu_library = xyes; then
8906
8907         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
8908         # was changed to help a little.  newlib incorporated the change about 4
8909         # years later.
8910         echo "$as_me:8910: checking if _DEFAULT_SOURCE can be used as a basis" >&5
8911 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
8912 if test "${cf_cv_gnu_library_219+set}" = set; then
8913   echo $ECHO_N "(cached) $ECHO_C" >&6
8914 else
8915
8916                 cf_save="$CPPFLAGS"
8917
8918         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8919         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
8920
8921                 cat >conftest.$ac_ext <<_ACEOF
8922 #line 8922 "configure"
8923 #include "confdefs.h"
8924 #include <sys/types.h>
8925 int
8926 main (void)
8927 {
8928
8929                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
8930                                 return 0;
8931                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
8932                                 return 0;
8933                         #else
8934                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
8935                         #endif
8936   ;
8937   return 0;
8938 }
8939 _ACEOF
8940 rm -f conftest.$ac_objext
8941 if { (eval echo "$as_me:8941: \"$ac_compile\"") >&5
8942   (eval $ac_compile) 2>&5
8943   ac_status=$?
8944   echo "$as_me:8944: \$? = $ac_status" >&5
8945   (exit $ac_status); } &&
8946          { ac_try='test -s conftest.$ac_objext'
8947   { (eval echo "$as_me:8947: \"$ac_try\"") >&5
8948   (eval $ac_try) 2>&5
8949   ac_status=$?
8950   echo "$as_me:8950: \$? = $ac_status" >&5
8951   (exit $ac_status); }; }; then
8952   cf_cv_gnu_library_219=yes
8953 else
8954   echo "$as_me: failed program was:" >&5
8955 cat conftest.$ac_ext >&5
8956 cf_cv_gnu_library_219=no
8957 fi
8958 rm -f conftest.$ac_objext conftest.$ac_ext
8959                 CPPFLAGS="$cf_save"
8960
8961 fi
8962 echo "$as_me:8962: result: $cf_cv_gnu_library_219" >&5
8963 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
8964
8965         if test "x$cf_cv_gnu_library_219" = xyes; then
8966                 cf_save="$CPPFLAGS"
8967                 echo "$as_me:8967: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
8968 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
8969 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
8970   echo $ECHO_N "(cached) $ECHO_C" >&6
8971 else
8972
8973 cf_fix_cppflags=no
8974 cf_new_cflags=
8975 cf_new_cppflags=
8976 cf_new_extra_cppflags=
8977
8978 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
8979 do
8980 case $cf_fix_cppflags in
8981 (no)
8982         case $cf_add_cflags in
8983         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8984                 case $cf_add_cflags in
8985                 (-D*)
8986                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8987
8988                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8989                                 && test -z "${cf_tst_cflags}" \
8990                                 && cf_fix_cppflags=yes
8991
8992                         if test $cf_fix_cppflags = yes ; then
8993
8994         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8995         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8996
8997                                 continue
8998                         elif test "${cf_tst_cflags}" = "\"'" ; then
8999
9000         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9001         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9002
9003                                 continue
9004                         fi
9005                         ;;
9006                 esac
9007                 case "$CPPFLAGS" in
9008                 (*$cf_add_cflags)
9009                         ;;
9010                 (*)
9011                         case $cf_add_cflags in
9012                         (-D*)
9013                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9014
9015 CPPFLAGS=`echo "$CPPFLAGS" | \
9016         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9017                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9018
9019                                 ;;
9020                         esac
9021
9022         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9023         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9024
9025                         ;;
9026                 esac
9027                 ;;
9028         (*)
9029
9030         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9031         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9032
9033                 ;;
9034         esac
9035         ;;
9036 (yes)
9037
9038         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9039         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9040
9041         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9042
9043         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9044                 && test -z "${cf_tst_cflags}" \
9045                 && cf_fix_cppflags=no
9046         ;;
9047 esac
9048 done
9049
9050 if test -n "$cf_new_cflags" ; then
9051
9052         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9053         CFLAGS="${CFLAGS}$cf_new_cflags"
9054
9055 fi
9056
9057 if test -n "$cf_new_cppflags" ; then
9058
9059         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9060         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9061
9062 fi
9063
9064 if test -n "$cf_new_extra_cppflags" ; then
9065
9066         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9067         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9068
9069 fi
9070
9071                         cat >conftest.$ac_ext <<_ACEOF
9072 #line 9072 "configure"
9073 #include "confdefs.h"
9074
9075                                 #include <limits.h>
9076                                 #include <sys/types.h>
9077
9078 int
9079 main (void)
9080 {
9081
9082                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9083                                         return 0;
9084                                 #else
9085                                 #       error GNU C library is too old
9086                                 #endif
9087   ;
9088   return 0;
9089 }
9090 _ACEOF
9091 rm -f conftest.$ac_objext
9092 if { (eval echo "$as_me:9092: \"$ac_compile\"") >&5
9093   (eval $ac_compile) 2>&5
9094   ac_status=$?
9095   echo "$as_me:9095: \$? = $ac_status" >&5
9096   (exit $ac_status); } &&
9097          { ac_try='test -s conftest.$ac_objext'
9098   { (eval echo "$as_me:9098: \"$ac_try\"") >&5
9099   (eval $ac_try) 2>&5
9100   ac_status=$?
9101   echo "$as_me:9101: \$? = $ac_status" >&5
9102   (exit $ac_status); }; }; then
9103   cf_cv_gnu_dftsrc_219=yes
9104 else
9105   echo "$as_me: failed program was:" >&5
9106 cat conftest.$ac_ext >&5
9107 cf_cv_gnu_dftsrc_219=no
9108 fi
9109 rm -f conftest.$ac_objext conftest.$ac_ext
9110
9111 fi
9112 echo "$as_me:9112: result: $cf_cv_gnu_dftsrc_219" >&5
9113 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9114                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9115         else
9116                 cf_cv_gnu_dftsrc_219=maybe
9117         fi
9118
9119         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9120
9121                 echo "$as_me:9121: checking if we must define _GNU_SOURCE" >&5
9122 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9123 if test "${cf_cv_gnu_source+set}" = set; then
9124   echo $ECHO_N "(cached) $ECHO_C" >&6
9125 else
9126
9127                 cat >conftest.$ac_ext <<_ACEOF
9128 #line 9128 "configure"
9129 #include "confdefs.h"
9130 #include <sys/types.h>
9131 int
9132 main (void)
9133 {
9134
9135                         #ifndef _XOPEN_SOURCE
9136                         #error  expected _XOPEN_SOURCE to be defined
9137                         #endif
9138   ;
9139   return 0;
9140 }
9141 _ACEOF
9142 rm -f conftest.$ac_objext
9143 if { (eval echo "$as_me:9143: \"$ac_compile\"") >&5
9144   (eval $ac_compile) 2>&5
9145   ac_status=$?
9146   echo "$as_me:9146: \$? = $ac_status" >&5
9147   (exit $ac_status); } &&
9148          { ac_try='test -s conftest.$ac_objext'
9149   { (eval echo "$as_me:9149: \"$ac_try\"") >&5
9150   (eval $ac_try) 2>&5
9151   ac_status=$?
9152   echo "$as_me:9152: \$? = $ac_status" >&5
9153   (exit $ac_status); }; }; then
9154   cf_cv_gnu_source=no
9155 else
9156   echo "$as_me: failed program was:" >&5
9157 cat conftest.$ac_ext >&5
9158 cf_save="$CPPFLAGS"
9159
9160 cf_fix_cppflags=no
9161 cf_new_cflags=
9162 cf_new_cppflags=
9163 cf_new_extra_cppflags=
9164
9165 for cf_add_cflags in -D_GNU_SOURCE
9166 do
9167 case $cf_fix_cppflags in
9168 (no)
9169         case $cf_add_cflags in
9170         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9171                 case $cf_add_cflags in
9172                 (-D*)
9173                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9174
9175                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9176                                 && test -z "${cf_tst_cflags}" \
9177                                 && cf_fix_cppflags=yes
9178
9179                         if test $cf_fix_cppflags = yes ; then
9180
9181         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9182         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9183
9184                                 continue
9185                         elif test "${cf_tst_cflags}" = "\"'" ; then
9186
9187         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9188         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9189
9190                                 continue
9191                         fi
9192                         ;;
9193                 esac
9194                 case "$CPPFLAGS" in
9195                 (*$cf_add_cflags)
9196                         ;;
9197                 (*)
9198                         case $cf_add_cflags in
9199                         (-D*)
9200                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9201
9202 CPPFLAGS=`echo "$CPPFLAGS" | \
9203         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9204                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9205
9206                                 ;;
9207                         esac
9208
9209         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9210         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9211
9212                         ;;
9213                 esac
9214                 ;;
9215         (*)
9216
9217         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9218         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9219
9220                 ;;
9221         esac
9222         ;;
9223 (yes)
9224
9225         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9226         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9227
9228         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9229
9230         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9231                 && test -z "${cf_tst_cflags}" \
9232                 && cf_fix_cppflags=no
9233         ;;
9234 esac
9235 done
9236
9237 if test -n "$cf_new_cflags" ; then
9238
9239         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9240         CFLAGS="${CFLAGS}$cf_new_cflags"
9241
9242 fi
9243
9244 if test -n "$cf_new_cppflags" ; then
9245
9246         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9247         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9248
9249 fi
9250
9251 if test -n "$cf_new_extra_cppflags" ; then
9252
9253         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9254         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9255
9256 fi
9257
9258                          cat >conftest.$ac_ext <<_ACEOF
9259 #line 9259 "configure"
9260 #include "confdefs.h"
9261 #include <sys/types.h>
9262 int
9263 main (void)
9264 {
9265
9266                                 #ifdef _XOPEN_SOURCE
9267                                 #error  expected _XOPEN_SOURCE to be undefined
9268                                 #endif
9269   ;
9270   return 0;
9271 }
9272 _ACEOF
9273 rm -f conftest.$ac_objext
9274 if { (eval echo "$as_me:9274: \"$ac_compile\"") >&5
9275   (eval $ac_compile) 2>&5
9276   ac_status=$?
9277   echo "$as_me:9277: \$? = $ac_status" >&5
9278   (exit $ac_status); } &&
9279          { ac_try='test -s conftest.$ac_objext'
9280   { (eval echo "$as_me:9280: \"$ac_try\"") >&5
9281   (eval $ac_try) 2>&5
9282   ac_status=$?
9283   echo "$as_me:9283: \$? = $ac_status" >&5
9284   (exit $ac_status); }; }; then
9285   cf_cv_gnu_source=no
9286 else
9287   echo "$as_me: failed program was:" >&5
9288 cat conftest.$ac_ext >&5
9289 cf_cv_gnu_source=yes
9290 fi
9291 rm -f conftest.$ac_objext conftest.$ac_ext
9292                         CPPFLAGS="$cf_save"
9293
9294 fi
9295 rm -f conftest.$ac_objext conftest.$ac_ext
9296
9297 fi
9298 echo "$as_me:9298: result: $cf_cv_gnu_source" >&5
9299 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9300
9301                 if test "$cf_cv_gnu_source" = yes
9302                 then
9303                 echo "$as_me:9303: checking if we should also define _DEFAULT_SOURCE" >&5
9304 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9305 if test "${cf_cv_default_source+set}" = set; then
9306   echo $ECHO_N "(cached) $ECHO_C" >&6
9307 else
9308
9309         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9310         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9311
9312                         cat >conftest.$ac_ext <<_ACEOF
9313 #line 9313 "configure"
9314 #include "confdefs.h"
9315 #include <sys/types.h>
9316 int
9317 main (void)
9318 {
9319
9320                                 #ifdef _DEFAULT_SOURCE
9321                                 #error  expected _DEFAULT_SOURCE to be undefined
9322                                 #endif
9323   ;
9324   return 0;
9325 }
9326 _ACEOF
9327 rm -f conftest.$ac_objext
9328 if { (eval echo "$as_me:9328: \"$ac_compile\"") >&5
9329   (eval $ac_compile) 2>&5
9330   ac_status=$?
9331   echo "$as_me:9331: \$? = $ac_status" >&5
9332   (exit $ac_status); } &&
9333          { ac_try='test -s conftest.$ac_objext'
9334   { (eval echo "$as_me:9334: \"$ac_try\"") >&5
9335   (eval $ac_try) 2>&5
9336   ac_status=$?
9337   echo "$as_me:9337: \$? = $ac_status" >&5
9338   (exit $ac_status); }; }; then
9339   cf_cv_default_source=no
9340 else
9341   echo "$as_me: failed program was:" >&5
9342 cat conftest.$ac_ext >&5
9343 cf_cv_default_source=yes
9344 fi
9345 rm -f conftest.$ac_objext conftest.$ac_ext
9346
9347 fi
9348 echo "$as_me:9348: result: $cf_cv_default_source" >&5
9349 echo "${ECHO_T}$cf_cv_default_source" >&6
9350                         if test "$cf_cv_default_source" = yes
9351                         then
9352
9353         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9354         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9355
9356                         fi
9357                 fi
9358         fi
9359
9360 fi
9361
9362         ;;
9363 (minix*)
9364         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9365         ;;
9366 (mirbsd*)
9367         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9368         cf_XOPEN_SOURCE=
9369
9370 if test "$cf_cv_posix_visible" = no; then
9371
9372 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9373
9374 cf_save_CFLAGS="$CFLAGS"
9375 cf_save_CPPFLAGS="$CPPFLAGS"
9376
9377 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9378         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9379                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9380
9381 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9382         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9383                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9384
9385 echo "$as_me:9385: checking if we should define _POSIX_C_SOURCE" >&5
9386 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9387 if test "${cf_cv_posix_c_source+set}" = set; then
9388   echo $ECHO_N "(cached) $ECHO_C" >&6
9389 else
9390
9391 echo "${as_me:-configure}:9391: testing if the symbol is already defined go no further ..." 1>&5
9392
9393         cat >conftest.$ac_ext <<_ACEOF
9394 #line 9394 "configure"
9395 #include "confdefs.h"
9396 #include <sys/types.h>
9397 int
9398 main (void)
9399 {
9400
9401 #ifndef _POSIX_C_SOURCE
9402 make an error
9403 #endif
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_posix_c_source=no
9421 else
9422   echo "$as_me: failed program was:" >&5
9423 cat conftest.$ac_ext >&5
9424 cf_want_posix_source=no
9425          case .$cf_POSIX_C_SOURCE in
9426          (.[12]??*)
9427                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9428                 ;;
9429          (.2)
9430                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9431                 cf_want_posix_source=yes
9432                 ;;
9433          (.*)
9434                 cf_want_posix_source=yes
9435                 ;;
9436          esac
9437          if test "$cf_want_posix_source" = yes ; then
9438                 cat >conftest.$ac_ext <<_ACEOF
9439 #line 9439 "configure"
9440 #include "confdefs.h"
9441 #include <sys/types.h>
9442 int
9443 main (void)
9444 {
9445
9446 #ifdef _POSIX_SOURCE
9447 make an error
9448 #endif
9449   ;
9450   return 0;
9451 }
9452 _ACEOF
9453 rm -f conftest.$ac_objext
9454 if { (eval echo "$as_me:9454: \"$ac_compile\"") >&5
9455   (eval $ac_compile) 2>&5
9456   ac_status=$?
9457   echo "$as_me:9457: \$? = $ac_status" >&5
9458   (exit $ac_status); } &&
9459          { ac_try='test -s conftest.$ac_objext'
9460   { (eval echo "$as_me:9460: \"$ac_try\"") >&5
9461   (eval $ac_try) 2>&5
9462   ac_status=$?
9463   echo "$as_me:9463: \$? = $ac_status" >&5
9464   (exit $ac_status); }; }; then
9465   :
9466 else
9467   echo "$as_me: failed program was:" >&5
9468 cat conftest.$ac_ext >&5
9469 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9470 fi
9471 rm -f conftest.$ac_objext conftest.$ac_ext
9472          fi
9473
9474 echo "${as_me:-configure}:9474: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9475
9476          CFLAGS="$cf_trim_CFLAGS"
9477          CPPFLAGS="$cf_trim_CPPFLAGS"
9478
9479         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9480         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9481
9482 echo "${as_me:-configure}:9482: testing if the second compile does not leave our definition intact error ..." 1>&5
9483
9484          cat >conftest.$ac_ext <<_ACEOF
9485 #line 9485 "configure"
9486 #include "confdefs.h"
9487 #include <sys/types.h>
9488 int
9489 main (void)
9490 {
9491
9492 #ifndef _POSIX_C_SOURCE
9493 make an error
9494 #endif
9495   ;
9496   return 0;
9497 }
9498 _ACEOF
9499 rm -f conftest.$ac_objext
9500 if { (eval echo "$as_me:9500: \"$ac_compile\"") >&5
9501   (eval $ac_compile) 2>&5
9502   ac_status=$?
9503   echo "$as_me:9503: \$? = $ac_status" >&5
9504   (exit $ac_status); } &&
9505          { ac_try='test -s conftest.$ac_objext'
9506   { (eval echo "$as_me:9506: \"$ac_try\"") >&5
9507   (eval $ac_try) 2>&5
9508   ac_status=$?
9509   echo "$as_me:9509: \$? = $ac_status" >&5
9510   (exit $ac_status); }; }; then
9511   :
9512 else
9513   echo "$as_me: failed program was:" >&5
9514 cat conftest.$ac_ext >&5
9515 cf_cv_posix_c_source=no
9516 fi
9517 rm -f conftest.$ac_objext conftest.$ac_ext
9518          CFLAGS="$cf_save_CFLAGS"
9519          CPPFLAGS="$cf_save_CPPFLAGS"
9520
9521 fi
9522 rm -f conftest.$ac_objext conftest.$ac_ext
9523
9524 fi
9525 echo "$as_me:9525: result: $cf_cv_posix_c_source" >&5
9526 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9527
9528 if test "$cf_cv_posix_c_source" != no ; then
9529         CFLAGS="$cf_trim_CFLAGS"
9530         CPPFLAGS="$cf_trim_CPPFLAGS"
9531
9532 cf_fix_cppflags=no
9533 cf_new_cflags=
9534 cf_new_cppflags=
9535 cf_new_extra_cppflags=
9536
9537 for cf_add_cflags in $cf_cv_posix_c_source
9538 do
9539 case $cf_fix_cppflags in
9540 (no)
9541         case $cf_add_cflags in
9542         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9543                 case $cf_add_cflags in
9544                 (-D*)
9545                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9546
9547                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9548                                 && test -z "${cf_tst_cflags}" \
9549                                 && cf_fix_cppflags=yes
9550
9551                         if test $cf_fix_cppflags = yes ; then
9552
9553         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9554         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9555
9556                                 continue
9557                         elif test "${cf_tst_cflags}" = "\"'" ; then
9558
9559         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9560         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9561
9562                                 continue
9563                         fi
9564                         ;;
9565                 esac
9566                 case "$CPPFLAGS" in
9567                 (*$cf_add_cflags)
9568                         ;;
9569                 (*)
9570                         case $cf_add_cflags in
9571                         (-D*)
9572                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9573
9574 CPPFLAGS=`echo "$CPPFLAGS" | \
9575         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9576                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9577
9578                                 ;;
9579                         esac
9580
9581         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9582         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9583
9584                         ;;
9585                 esac
9586                 ;;
9587         (*)
9588
9589         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9590         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9591
9592                 ;;
9593         esac
9594         ;;
9595 (yes)
9596
9597         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9598         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9599
9600         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9601
9602         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9603                 && test -z "${cf_tst_cflags}" \
9604                 && cf_fix_cppflags=no
9605         ;;
9606 esac
9607 done
9608
9609 if test -n "$cf_new_cflags" ; then
9610
9611         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9612         CFLAGS="${CFLAGS}$cf_new_cflags"
9613
9614 fi
9615
9616 if test -n "$cf_new_cppflags" ; then
9617
9618         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9619         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9620
9621 fi
9622
9623 if test -n "$cf_new_extra_cppflags" ; then
9624
9625         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9626         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9627
9628 fi
9629
9630 fi
9631
9632 fi # cf_cv_posix_visible
9633
9634         ;;
9635 (netbsd*)
9636         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
9637         ;;
9638 (openbsd[4-9]*)
9639         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
9640         cf_xopen_source="-D_BSD_SOURCE"
9641         cf_XOPEN_SOURCE=600
9642         ;;
9643 (openbsd*)
9644         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
9645         ;;
9646 (osf[45]*)
9647         cf_xopen_source="-D_OSF_SOURCE"
9648         ;;
9649 (nto-qnx*)
9650         cf_xopen_source="-D_QNX_SOURCE"
9651         ;;
9652 (sco*)
9653         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
9654         ;;
9655 (solaris2.*)
9656         cf_xopen_source="-D__EXTENSIONS__"
9657         cf_cv_xopen_source=broken
9658         ;;
9659 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
9660         cf_XOPEN_SOURCE=
9661         cf_POSIX_C_SOURCE=
9662         ;;
9663 (*)
9664
9665 echo "$as_me:9665: checking if we should define _XOPEN_SOURCE" >&5
9666 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9667 if test "${cf_cv_xopen_source+set}" = set; then
9668   echo $ECHO_N "(cached) $ECHO_C" >&6
9669 else
9670
9671         cat >conftest.$ac_ext <<_ACEOF
9672 #line 9672 "configure"
9673 #include "confdefs.h"
9674
9675 #include <stdlib.h>
9676 #include <string.h>
9677 #include <sys/types.h>
9678
9679 int
9680 main (void)
9681 {
9682
9683 #ifndef _XOPEN_SOURCE
9684 make an error
9685 #endif
9686   ;
9687   return 0;
9688 }
9689 _ACEOF
9690 rm -f conftest.$ac_objext
9691 if { (eval echo "$as_me:9691: \"$ac_compile\"") >&5
9692   (eval $ac_compile) 2>&5
9693   ac_status=$?
9694   echo "$as_me:9694: \$? = $ac_status" >&5
9695   (exit $ac_status); } &&
9696          { ac_try='test -s conftest.$ac_objext'
9697   { (eval echo "$as_me:9697: \"$ac_try\"") >&5
9698   (eval $ac_try) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit $ac_status); }; }; then
9702   cf_cv_xopen_source=no
9703 else
9704   echo "$as_me: failed program was:" >&5
9705 cat conftest.$ac_ext >&5
9706 cf_save="$CPPFLAGS"
9707
9708         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9709         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9710
9711          cat >conftest.$ac_ext <<_ACEOF
9712 #line 9712 "configure"
9713 #include "confdefs.h"
9714
9715 #include <stdlib.h>
9716 #include <string.h>
9717 #include <sys/types.h>
9718
9719 int
9720 main (void)
9721 {
9722
9723 #ifdef _XOPEN_SOURCE
9724 make an error
9725 #endif
9726   ;
9727   return 0;
9728 }
9729 _ACEOF
9730 rm -f conftest.$ac_objext
9731 if { (eval echo "$as_me:9731: \"$ac_compile\"") >&5
9732   (eval $ac_compile) 2>&5
9733   ac_status=$?
9734   echo "$as_me:9734: \$? = $ac_status" >&5
9735   (exit $ac_status); } &&
9736          { ac_try='test -s conftest.$ac_objext'
9737   { (eval echo "$as_me:9737: \"$ac_try\"") >&5
9738   (eval $ac_try) 2>&5
9739   ac_status=$?
9740   echo "$as_me:9740: \$? = $ac_status" >&5
9741   (exit $ac_status); }; }; then
9742   cf_cv_xopen_source=no
9743 else
9744   echo "$as_me: failed program was:" >&5
9745 cat conftest.$ac_ext >&5
9746 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9747 fi
9748 rm -f conftest.$ac_objext conftest.$ac_ext
9749         CPPFLAGS="$cf_save"
9750
9751 fi
9752 rm -f conftest.$ac_objext conftest.$ac_ext
9753
9754 fi
9755 echo "$as_me:9755: result: $cf_cv_xopen_source" >&5
9756 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9757
9758 if test "$cf_cv_xopen_source" != no ; then
9759
9760 CFLAGS=`echo "$CFLAGS" | \
9761         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9762                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9763
9764 CPPFLAGS=`echo "$CPPFLAGS" | \
9765         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9766                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9767
9768         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9769
9770 cf_fix_cppflags=no
9771 cf_new_cflags=
9772 cf_new_cppflags=
9773 cf_new_extra_cppflags=
9774
9775 for cf_add_cflags in $cf_temp_xopen_source
9776 do
9777 case $cf_fix_cppflags in
9778 (no)
9779         case $cf_add_cflags in
9780         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9781                 case $cf_add_cflags in
9782                 (-D*)
9783                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9784
9785                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9786                                 && test -z "${cf_tst_cflags}" \
9787                                 && cf_fix_cppflags=yes
9788
9789                         if test $cf_fix_cppflags = yes ; then
9790
9791         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9792         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9793
9794                                 continue
9795                         elif test "${cf_tst_cflags}" = "\"'" ; then
9796
9797         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9798         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9799
9800                                 continue
9801                         fi
9802                         ;;
9803                 esac
9804                 case "$CPPFLAGS" in
9805                 (*$cf_add_cflags)
9806                         ;;
9807                 (*)
9808                         case $cf_add_cflags in
9809                         (-D*)
9810                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9811
9812 CPPFLAGS=`echo "$CPPFLAGS" | \
9813         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9814                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9815
9816                                 ;;
9817                         esac
9818
9819         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9820         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9821
9822                         ;;
9823                 esac
9824                 ;;
9825         (*)
9826
9827         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9828         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9829
9830                 ;;
9831         esac
9832         ;;
9833 (yes)
9834
9835         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9836         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9837
9838         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9839
9840         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9841                 && test -z "${cf_tst_cflags}" \
9842                 && cf_fix_cppflags=no
9843         ;;
9844 esac
9845 done
9846
9847 if test -n "$cf_new_cflags" ; then
9848
9849         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9850         CFLAGS="${CFLAGS}$cf_new_cflags"
9851
9852 fi
9853
9854 if test -n "$cf_new_cppflags" ; then
9855
9856         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9857         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9858
9859 fi
9860
9861 if test -n "$cf_new_extra_cppflags" ; then
9862
9863         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9864         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9865
9866 fi
9867
9868 fi
9869
9870 if test "$cf_cv_posix_visible" = no; then
9871
9872 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9873
9874 cf_save_CFLAGS="$CFLAGS"
9875 cf_save_CPPFLAGS="$CPPFLAGS"
9876
9877 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9878         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9879                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9880
9881 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9882         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9883                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9884
9885 echo "$as_me:9885: checking if we should define _POSIX_C_SOURCE" >&5
9886 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9887 if test "${cf_cv_posix_c_source+set}" = set; then
9888   echo $ECHO_N "(cached) $ECHO_C" >&6
9889 else
9890
9891 echo "${as_me:-configure}:9891: testing if the symbol is already defined go no further ..." 1>&5
9892
9893         cat >conftest.$ac_ext <<_ACEOF
9894 #line 9894 "configure"
9895 #include "confdefs.h"
9896 #include <sys/types.h>
9897 int
9898 main (void)
9899 {
9900
9901 #ifndef _POSIX_C_SOURCE
9902 make an error
9903 #endif
9904   ;
9905   return 0;
9906 }
9907 _ACEOF
9908 rm -f conftest.$ac_objext
9909 if { (eval echo "$as_me:9909: \"$ac_compile\"") >&5
9910   (eval $ac_compile) 2>&5
9911   ac_status=$?
9912   echo "$as_me:9912: \$? = $ac_status" >&5
9913   (exit $ac_status); } &&
9914          { ac_try='test -s conftest.$ac_objext'
9915   { (eval echo "$as_me:9915: \"$ac_try\"") >&5
9916   (eval $ac_try) 2>&5
9917   ac_status=$?
9918   echo "$as_me:9918: \$? = $ac_status" >&5
9919   (exit $ac_status); }; }; then
9920   cf_cv_posix_c_source=no
9921 else
9922   echo "$as_me: failed program was:" >&5
9923 cat conftest.$ac_ext >&5
9924 cf_want_posix_source=no
9925          case .$cf_POSIX_C_SOURCE in
9926          (.[12]??*)
9927                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9928                 ;;
9929          (.2)
9930                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9931                 cf_want_posix_source=yes
9932                 ;;
9933          (.*)
9934                 cf_want_posix_source=yes
9935                 ;;
9936          esac
9937          if test "$cf_want_posix_source" = yes ; then
9938                 cat >conftest.$ac_ext <<_ACEOF
9939 #line 9939 "configure"
9940 #include "confdefs.h"
9941 #include <sys/types.h>
9942 int
9943 main (void)
9944 {
9945
9946 #ifdef _POSIX_SOURCE
9947 make an error
9948 #endif
9949   ;
9950   return 0;
9951 }
9952 _ACEOF
9953 rm -f conftest.$ac_objext
9954 if { (eval echo "$as_me:9954: \"$ac_compile\"") >&5
9955   (eval $ac_compile) 2>&5
9956   ac_status=$?
9957   echo "$as_me:9957: \$? = $ac_status" >&5
9958   (exit $ac_status); } &&
9959          { ac_try='test -s conftest.$ac_objext'
9960   { (eval echo "$as_me:9960: \"$ac_try\"") >&5
9961   (eval $ac_try) 2>&5
9962   ac_status=$?
9963   echo "$as_me:9963: \$? = $ac_status" >&5
9964   (exit $ac_status); }; }; then
9965   :
9966 else
9967   echo "$as_me: failed program was:" >&5
9968 cat conftest.$ac_ext >&5
9969 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9970 fi
9971 rm -f conftest.$ac_objext conftest.$ac_ext
9972          fi
9973
9974 echo "${as_me:-configure}:9974: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9975
9976          CFLAGS="$cf_trim_CFLAGS"
9977          CPPFLAGS="$cf_trim_CPPFLAGS"
9978
9979         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9980         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9981
9982 echo "${as_me:-configure}:9982: testing if the second compile does not leave our definition intact error ..." 1>&5
9983
9984          cat >conftest.$ac_ext <<_ACEOF
9985 #line 9985 "configure"
9986 #include "confdefs.h"
9987 #include <sys/types.h>
9988 int
9989 main (void)
9990 {
9991
9992 #ifndef _POSIX_C_SOURCE
9993 make an error
9994 #endif
9995   ;
9996   return 0;
9997 }
9998 _ACEOF
9999 rm -f conftest.$ac_objext
10000 if { (eval echo "$as_me:10000: \"$ac_compile\"") >&5
10001   (eval $ac_compile) 2>&5
10002   ac_status=$?
10003   echo "$as_me:10003: \$? = $ac_status" >&5
10004   (exit $ac_status); } &&
10005          { ac_try='test -s conftest.$ac_objext'
10006   { (eval echo "$as_me:10006: \"$ac_try\"") >&5
10007   (eval $ac_try) 2>&5
10008   ac_status=$?
10009   echo "$as_me:10009: \$? = $ac_status" >&5
10010   (exit $ac_status); }; }; then
10011   :
10012 else
10013   echo "$as_me: failed program was:" >&5
10014 cat conftest.$ac_ext >&5
10015 cf_cv_posix_c_source=no
10016 fi
10017 rm -f conftest.$ac_objext conftest.$ac_ext
10018          CFLAGS="$cf_save_CFLAGS"
10019          CPPFLAGS="$cf_save_CPPFLAGS"
10020
10021 fi
10022 rm -f conftest.$ac_objext conftest.$ac_ext
10023
10024 fi
10025 echo "$as_me:10025: result: $cf_cv_posix_c_source" >&5
10026 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10027
10028 if test "$cf_cv_posix_c_source" != no ; then
10029         CFLAGS="$cf_trim_CFLAGS"
10030         CPPFLAGS="$cf_trim_CPPFLAGS"
10031
10032 cf_fix_cppflags=no
10033 cf_new_cflags=
10034 cf_new_cppflags=
10035 cf_new_extra_cppflags=
10036
10037 for cf_add_cflags in $cf_cv_posix_c_source
10038 do
10039 case $cf_fix_cppflags in
10040 (no)
10041         case $cf_add_cflags in
10042         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10043                 case $cf_add_cflags in
10044                 (-D*)
10045                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10046
10047                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10048                                 && test -z "${cf_tst_cflags}" \
10049                                 && cf_fix_cppflags=yes
10050
10051                         if test $cf_fix_cppflags = yes ; then
10052
10053         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10054         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10055
10056                                 continue
10057                         elif test "${cf_tst_cflags}" = "\"'" ; then
10058
10059         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10060         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10061
10062                                 continue
10063                         fi
10064                         ;;
10065                 esac
10066                 case "$CPPFLAGS" in
10067                 (*$cf_add_cflags)
10068                         ;;
10069                 (*)
10070                         case $cf_add_cflags in
10071                         (-D*)
10072                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10073
10074 CPPFLAGS=`echo "$CPPFLAGS" | \
10075         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10076                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10077
10078                                 ;;
10079                         esac
10080
10081         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10082         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10083
10084                         ;;
10085                 esac
10086                 ;;
10087         (*)
10088
10089         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10090         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10091
10092                 ;;
10093         esac
10094         ;;
10095 (yes)
10096
10097         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10098         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10099
10100         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10101
10102         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10103                 && test -z "${cf_tst_cflags}" \
10104                 && cf_fix_cppflags=no
10105         ;;
10106 esac
10107 done
10108
10109 if test -n "$cf_new_cflags" ; then
10110
10111         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10112         CFLAGS="${CFLAGS}$cf_new_cflags"
10113
10114 fi
10115
10116 if test -n "$cf_new_cppflags" ; then
10117
10118         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10119         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10120
10121 fi
10122
10123 if test -n "$cf_new_extra_cppflags" ; then
10124
10125         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10126         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10127
10128 fi
10129
10130 fi
10131
10132 fi # cf_cv_posix_visible
10133
10134         ;;
10135 esac
10136
10137 if test -n "$cf_xopen_source" ; then
10138
10139 cf_fix_cppflags=no
10140 cf_new_cflags=
10141 cf_new_cppflags=
10142 cf_new_extra_cppflags=
10143
10144 for cf_add_cflags in $cf_xopen_source
10145 do
10146 case $cf_fix_cppflags in
10147 (no)
10148         case $cf_add_cflags in
10149         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10150                 case $cf_add_cflags in
10151                 (-D*)
10152                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10153
10154                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10155                                 && test -z "${cf_tst_cflags}" \
10156                                 && cf_fix_cppflags=yes
10157
10158                         if test $cf_fix_cppflags = yes ; then
10159
10160         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10161         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10162
10163                                 continue
10164                         elif test "${cf_tst_cflags}" = "\"'" ; then
10165
10166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10168
10169                                 continue
10170                         fi
10171                         ;;
10172                 esac
10173                 case "$CPPFLAGS" in
10174                 (*$cf_add_cflags)
10175                         ;;
10176                 (*)
10177                         case $cf_add_cflags in
10178                         (-D*)
10179                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10180
10181 CPPFLAGS=`echo "$CPPFLAGS" | \
10182         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10183                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10184
10185                                 ;;
10186                         esac
10187
10188         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10189         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10190
10191                         ;;
10192                 esac
10193                 ;;
10194         (*)
10195
10196         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10197         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10198
10199                 ;;
10200         esac
10201         ;;
10202 (yes)
10203
10204         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10205         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10206
10207         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10208
10209         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10210                 && test -z "${cf_tst_cflags}" \
10211                 && cf_fix_cppflags=no
10212         ;;
10213 esac
10214 done
10215
10216 if test -n "$cf_new_cflags" ; then
10217         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10218
10219 echo "${as_me:-configure}:10219: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10220
10221         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10222         CFLAGS="${CFLAGS}$cf_new_cflags"
10223
10224 fi
10225
10226 if test -n "$cf_new_cppflags" ; then
10227         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10228
10229 echo "${as_me:-configure}:10229: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10230
10231         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10232         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10233
10234 fi
10235
10236 if test -n "$cf_new_extra_cppflags" ; then
10237         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10238
10239 echo "${as_me:-configure}:10239: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10240
10241         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10242         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10243
10244 fi
10245
10246 fi
10247
10248 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10249         echo "$as_me:10249: checking if _XOPEN_SOURCE really is set" >&5
10250 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10251         cat >conftest.$ac_ext <<_ACEOF
10252 #line 10252 "configure"
10253 #include "confdefs.h"
10254 #include <stdlib.h>
10255 int
10256 main (void)
10257 {
10258
10259 #ifndef _XOPEN_SOURCE
10260 make an error
10261 #endif
10262   ;
10263   return 0;
10264 }
10265 _ACEOF
10266 rm -f conftest.$ac_objext
10267 if { (eval echo "$as_me:10267: \"$ac_compile\"") >&5
10268   (eval $ac_compile) 2>&5
10269   ac_status=$?
10270   echo "$as_me:10270: \$? = $ac_status" >&5
10271   (exit $ac_status); } &&
10272          { ac_try='test -s conftest.$ac_objext'
10273   { (eval echo "$as_me:10273: \"$ac_try\"") >&5
10274   (eval $ac_try) 2>&5
10275   ac_status=$?
10276   echo "$as_me:10276: \$? = $ac_status" >&5
10277   (exit $ac_status); }; }; then
10278   cf_XOPEN_SOURCE_set=yes
10279 else
10280   echo "$as_me: failed program was:" >&5
10281 cat conftest.$ac_ext >&5
10282 cf_XOPEN_SOURCE_set=no
10283 fi
10284 rm -f conftest.$ac_objext conftest.$ac_ext
10285         echo "$as_me:10285: result: $cf_XOPEN_SOURCE_set" >&5
10286 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10287         if test $cf_XOPEN_SOURCE_set = yes
10288         then
10289                 cat >conftest.$ac_ext <<_ACEOF
10290 #line 10290 "configure"
10291 #include "confdefs.h"
10292 #include <stdlib.h>
10293 int
10294 main (void)
10295 {
10296
10297 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10298 make an error
10299 #endif
10300   ;
10301   return 0;
10302 }
10303 _ACEOF
10304 rm -f conftest.$ac_objext
10305 if { (eval echo "$as_me:10305: \"$ac_compile\"") >&5
10306   (eval $ac_compile) 2>&5
10307   ac_status=$?
10308   echo "$as_me:10308: \$? = $ac_status" >&5
10309   (exit $ac_status); } &&
10310          { ac_try='test -s conftest.$ac_objext'
10311   { (eval echo "$as_me:10311: \"$ac_try\"") >&5
10312   (eval $ac_try) 2>&5
10313   ac_status=$?
10314   echo "$as_me:10314: \$? = $ac_status" >&5
10315   (exit $ac_status); }; }; then
10316   cf_XOPEN_SOURCE_set_ok=yes
10317 else
10318   echo "$as_me: failed program was:" >&5
10319 cat conftest.$ac_ext >&5
10320 cf_XOPEN_SOURCE_set_ok=no
10321 fi
10322 rm -f conftest.$ac_objext conftest.$ac_ext
10323                 if test $cf_XOPEN_SOURCE_set_ok = no
10324                 then
10325                         { echo "$as_me:10325: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10326 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10327                 fi
10328         else
10329
10330 echo "$as_me:10330: checking if we should define _XOPEN_SOURCE" >&5
10331 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10332 if test "${cf_cv_xopen_source+set}" = set; then
10333   echo $ECHO_N "(cached) $ECHO_C" >&6
10334 else
10335
10336         cat >conftest.$ac_ext <<_ACEOF
10337 #line 10337 "configure"
10338 #include "confdefs.h"
10339
10340 #include <stdlib.h>
10341 #include <string.h>
10342 #include <sys/types.h>
10343
10344 int
10345 main (void)
10346 {
10347
10348 #ifndef _XOPEN_SOURCE
10349 make an error
10350 #endif
10351   ;
10352   return 0;
10353 }
10354 _ACEOF
10355 rm -f conftest.$ac_objext
10356 if { (eval echo "$as_me:10356: \"$ac_compile\"") >&5
10357   (eval $ac_compile) 2>&5
10358   ac_status=$?
10359   echo "$as_me:10359: \$? = $ac_status" >&5
10360   (exit $ac_status); } &&
10361          { ac_try='test -s conftest.$ac_objext'
10362   { (eval echo "$as_me:10362: \"$ac_try\"") >&5
10363   (eval $ac_try) 2>&5
10364   ac_status=$?
10365   echo "$as_me:10365: \$? = $ac_status" >&5
10366   (exit $ac_status); }; }; then
10367   cf_cv_xopen_source=no
10368 else
10369   echo "$as_me: failed program was:" >&5
10370 cat conftest.$ac_ext >&5
10371 cf_save="$CPPFLAGS"
10372
10373         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10374         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10375
10376          cat >conftest.$ac_ext <<_ACEOF
10377 #line 10377 "configure"
10378 #include "confdefs.h"
10379
10380 #include <stdlib.h>
10381 #include <string.h>
10382 #include <sys/types.h>
10383
10384 int
10385 main (void)
10386 {
10387
10388 #ifdef _XOPEN_SOURCE
10389 make an error
10390 #endif
10391   ;
10392   return 0;
10393 }
10394 _ACEOF
10395 rm -f conftest.$ac_objext
10396 if { (eval echo "$as_me:10396: \"$ac_compile\"") >&5
10397   (eval $ac_compile) 2>&5
10398   ac_status=$?
10399   echo "$as_me:10399: \$? = $ac_status" >&5
10400   (exit $ac_status); } &&
10401          { ac_try='test -s conftest.$ac_objext'
10402   { (eval echo "$as_me:10402: \"$ac_try\"") >&5
10403   (eval $ac_try) 2>&5
10404   ac_status=$?
10405   echo "$as_me:10405: \$? = $ac_status" >&5
10406   (exit $ac_status); }; }; then
10407   cf_cv_xopen_source=no
10408 else
10409   echo "$as_me: failed program was:" >&5
10410 cat conftest.$ac_ext >&5
10411 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10412 fi
10413 rm -f conftest.$ac_objext conftest.$ac_ext
10414         CPPFLAGS="$cf_save"
10415
10416 fi
10417 rm -f conftest.$ac_objext conftest.$ac_ext
10418
10419 fi
10420 echo "$as_me:10420: result: $cf_cv_xopen_source" >&5
10421 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10422
10423 if test "$cf_cv_xopen_source" != no ; then
10424
10425 CFLAGS=`echo "$CFLAGS" | \
10426         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10427                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10428
10429 CPPFLAGS=`echo "$CPPFLAGS" | \
10430         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10431                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10432
10433         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10434
10435 cf_fix_cppflags=no
10436 cf_new_cflags=
10437 cf_new_cppflags=
10438 cf_new_extra_cppflags=
10439
10440 for cf_add_cflags in $cf_temp_xopen_source
10441 do
10442 case $cf_fix_cppflags in
10443 (no)
10444         case $cf_add_cflags in
10445         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10446                 case $cf_add_cflags in
10447                 (-D*)
10448                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10449
10450                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10451                                 && test -z "${cf_tst_cflags}" \
10452                                 && cf_fix_cppflags=yes
10453
10454                         if test $cf_fix_cppflags = yes ; then
10455
10456         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10457         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10458
10459                                 continue
10460                         elif test "${cf_tst_cflags}" = "\"'" ; then
10461
10462         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10463         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10464
10465                                 continue
10466                         fi
10467                         ;;
10468                 esac
10469                 case "$CPPFLAGS" in
10470                 (*$cf_add_cflags)
10471                         ;;
10472                 (*)
10473                         case $cf_add_cflags in
10474                         (-D*)
10475                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10476
10477 CPPFLAGS=`echo "$CPPFLAGS" | \
10478         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10479                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10480
10481                                 ;;
10482                         esac
10483
10484         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10485         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10486
10487                         ;;
10488                 esac
10489                 ;;
10490         (*)
10491
10492         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10493         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10494
10495                 ;;
10496         esac
10497         ;;
10498 (yes)
10499
10500         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10501         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10502
10503         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10504
10505         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10506                 && test -z "${cf_tst_cflags}" \
10507                 && cf_fix_cppflags=no
10508         ;;
10509 esac
10510 done
10511
10512 if test -n "$cf_new_cflags" ; then
10513
10514         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10515         CFLAGS="${CFLAGS}$cf_new_cflags"
10516
10517 fi
10518
10519 if test -n "$cf_new_cppflags" ; then
10520
10521         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10522         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10523
10524 fi
10525
10526 if test -n "$cf_new_extra_cppflags" ; then
10527
10528         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10529         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10530
10531 fi
10532
10533 fi
10534
10535         fi
10536 fi
10537 fi # cf_cv_posix_visible
10538
10539 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10540
10541 # Work around breakage on OS X
10542
10543 echo "$as_me:10543: checking if SIGWINCH is defined" >&5
10544 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10545 if test "${cf_cv_define_sigwinch+set}" = set; then
10546   echo $ECHO_N "(cached) $ECHO_C" >&6
10547 else
10548
10549         cat >conftest.$ac_ext <<_ACEOF
10550 #line 10550 "configure"
10551 #include "confdefs.h"
10552
10553 #include <sys/types.h>
10554 #include <sys/signal.h>
10555
10556 int
10557 main (void)
10558 {
10559 int x = SIGWINCH
10560   ;
10561   return 0;
10562 }
10563 _ACEOF
10564 rm -f conftest.$ac_objext
10565 if { (eval echo "$as_me:10565: \"$ac_compile\"") >&5
10566   (eval $ac_compile) 2>&5
10567   ac_status=$?
10568   echo "$as_me:10568: \$? = $ac_status" >&5
10569   (exit $ac_status); } &&
10570          { ac_try='test -s conftest.$ac_objext'
10571   { (eval echo "$as_me:10571: \"$ac_try\"") >&5
10572   (eval $ac_try) 2>&5
10573   ac_status=$?
10574   echo "$as_me:10574: \$? = $ac_status" >&5
10575   (exit $ac_status); }; }; then
10576   cf_cv_define_sigwinch=yes
10577 else
10578   echo "$as_me: failed program was:" >&5
10579 cat conftest.$ac_ext >&5
10580 cat >conftest.$ac_ext <<_ACEOF
10581 #line 10581 "configure"
10582 #include "confdefs.h"
10583
10584 #undef _XOPEN_SOURCE
10585 #undef _POSIX_SOURCE
10586 #undef _POSIX_C_SOURCE
10587 #include <sys/types.h>
10588 #include <sys/signal.h>
10589
10590 int
10591 main (void)
10592 {
10593 int x = SIGWINCH
10594   ;
10595   return 0;
10596 }
10597 _ACEOF
10598 rm -f conftest.$ac_objext
10599 if { (eval echo "$as_me:10599: \"$ac_compile\"") >&5
10600   (eval $ac_compile) 2>&5
10601   ac_status=$?
10602   echo "$as_me:10602: \$? = $ac_status" >&5
10603   (exit $ac_status); } &&
10604          { ac_try='test -s conftest.$ac_objext'
10605   { (eval echo "$as_me:10605: \"$ac_try\"") >&5
10606   (eval $ac_try) 2>&5
10607   ac_status=$?
10608   echo "$as_me:10608: \$? = $ac_status" >&5
10609   (exit $ac_status); }; }; then
10610   cf_cv_define_sigwinch=maybe
10611 else
10612   echo "$as_me: failed program was:" >&5
10613 cat conftest.$ac_ext >&5
10614 cf_cv_define_sigwinch=no
10615 fi
10616 rm -f conftest.$ac_objext conftest.$ac_ext
10617
10618 fi
10619 rm -f conftest.$ac_objext conftest.$ac_ext
10620
10621 fi
10622 echo "$as_me:10622: result: $cf_cv_define_sigwinch" >&5
10623 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
10624
10625 if test "$cf_cv_define_sigwinch" = maybe ; then
10626 echo "$as_me:10626: checking for actual SIGWINCH definition" >&5
10627 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
10628 if test "${cf_cv_fixup_sigwinch+set}" = set; then
10629   echo $ECHO_N "(cached) $ECHO_C" >&6
10630 else
10631
10632 cf_cv_fixup_sigwinch=unknown
10633 cf_sigwinch=32
10634 while test $cf_sigwinch != 1
10635 do
10636         cat >conftest.$ac_ext <<_ACEOF
10637 #line 10637 "configure"
10638 #include "confdefs.h"
10639
10640 #undef _XOPEN_SOURCE
10641 #undef _POSIX_SOURCE
10642 #undef _POSIX_C_SOURCE
10643 #include <sys/types.h>
10644 #include <sys/signal.h>
10645
10646 int
10647 main (void)
10648 {
10649
10650 #if SIGWINCH != $cf_sigwinch
10651 make an error
10652 #endif
10653 int x = SIGWINCH
10654   ;
10655   return 0;
10656 }
10657 _ACEOF
10658 rm -f conftest.$ac_objext
10659 if { (eval echo "$as_me:10659: \"$ac_compile\"") >&5
10660   (eval $ac_compile) 2>&5
10661   ac_status=$?
10662   echo "$as_me:10662: \$? = $ac_status" >&5
10663   (exit $ac_status); } &&
10664          { ac_try='test -s conftest.$ac_objext'
10665   { (eval echo "$as_me:10665: \"$ac_try\"") >&5
10666   (eval $ac_try) 2>&5
10667   ac_status=$?
10668   echo "$as_me:10668: \$? = $ac_status" >&5
10669   (exit $ac_status); }; }; then
10670   cf_cv_fixup_sigwinch=$cf_sigwinch
10671          break
10672 else
10673   echo "$as_me: failed program was:" >&5
10674 cat conftest.$ac_ext >&5
10675 fi
10676 rm -f conftest.$ac_objext conftest.$ac_ext
10677
10678 cf_sigwinch=`expr $cf_sigwinch - 1`
10679 done
10680
10681 fi
10682 echo "$as_me:10682: result: $cf_cv_fixup_sigwinch" >&5
10683 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
10684
10685         if test "$cf_cv_fixup_sigwinch" != unknown ; then
10686                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
10687         fi
10688 fi
10689
10690 # Checks for CODESET support.
10691
10692 echo "$as_me:10692: checking for nl_langinfo and CODESET" >&5
10693 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10694 if test "${am_cv_langinfo_codeset+set}" = set; then
10695   echo $ECHO_N "(cached) $ECHO_C" >&6
10696 else
10697   cat >conftest.$ac_ext <<_ACEOF
10698 #line 10698 "configure"
10699 #include "confdefs.h"
10700 #include <langinfo.h>
10701 int
10702 main (void)
10703 {
10704 char* cs = nl_langinfo(CODESET);
10705   ;
10706   return 0;
10707 }
10708 _ACEOF
10709 rm -f conftest.$ac_objext conftest$ac_exeext
10710 if { (eval echo "$as_me:10710: \"$ac_link\"") >&5
10711   (eval $ac_link) 2>&5
10712   ac_status=$?
10713   echo "$as_me:10713: \$? = $ac_status" >&5
10714   (exit $ac_status); } &&
10715          { ac_try='test -s conftest$ac_exeext'
10716   { (eval echo "$as_me:10716: \"$ac_try\"") >&5
10717   (eval $ac_try) 2>&5
10718   ac_status=$?
10719   echo "$as_me:10719: \$? = $ac_status" >&5
10720   (exit $ac_status); }; }; then
10721   am_cv_langinfo_codeset=yes
10722 else
10723   echo "$as_me: failed program was:" >&5
10724 cat conftest.$ac_ext >&5
10725 am_cv_langinfo_codeset=no
10726 fi
10727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10728
10729 fi
10730 echo "$as_me:10730: result: $am_cv_langinfo_codeset" >&5
10731 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10732         if test $am_cv_langinfo_codeset = yes; then
10733
10734 cat >>confdefs.h <<\EOF
10735 #define HAVE_LANGINFO_CODESET 1
10736 EOF
10737
10738         fi
10739
10740 # use these variables to work around a defect in gcc's fixincludes.
10741 NCURSES_OK_WCHAR_T=
10742 NCURSES_OK_WINT_T=
10743
10744 echo "$as_me:10744: checking if you want wide-character code" >&5
10745 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
10746
10747 # Check whether --enable-widec or --disable-widec was given.
10748 if test "${enable_widec+set}" = set; then
10749   enableval="$enable_widec"
10750   with_widec=$enableval
10751 else
10752   with_widec=no
10753 fi;
10754 echo "$as_me:10754: result: $with_widec" >&5
10755 echo "${ECHO_T}$with_widec" >&6
10756
10757 NCURSES_WCWIDTH_GRAPHICS=1
10758
10759 if test "x$with_widec" = xyes ; then
10760         if test "x$disable_lib_suffixes" = xno ; then
10761                 LIB_SUFFIX="w${LIB_SUFFIX}"
10762         fi
10763
10764 cat >>confdefs.h <<\EOF
10765 #define USE_WIDEC_SUPPORT 1
10766 EOF
10767
10768 cat >>confdefs.h <<\EOF
10769 #define NCURSES_WIDECHAR 1
10770 EOF
10771
10772 for ac_header in \
10773 wchar.h \
10774 wctype.h \
10775
10776 do
10777 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10778 echo "$as_me:10778: checking for $ac_header" >&5
10779 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10780 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10781   echo $ECHO_N "(cached) $ECHO_C" >&6
10782 else
10783   cat >conftest.$ac_ext <<_ACEOF
10784 #line 10784 "configure"
10785 #include "confdefs.h"
10786 #include <$ac_header>
10787 _ACEOF
10788 if { (eval echo "$as_me:10788: \"$ac_cpp conftest.$ac_ext\"") >&5
10789   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10790   ac_status=$?
10791   egrep -v '^ *\+' conftest.er1 >conftest.err
10792   rm -f conftest.er1
10793   cat conftest.err >&5
10794   echo "$as_me:10794: \$? = $ac_status" >&5
10795   (exit $ac_status); } >/dev/null; then
10796   if test -s conftest.err; then
10797     ac_cpp_err=$ac_c_preproc_warn_flag
10798   else
10799     ac_cpp_err=
10800   fi
10801 else
10802   ac_cpp_err=yes
10803 fi
10804 if test -z "$ac_cpp_err"; then
10805   eval "$as_ac_Header=yes"
10806 else
10807   echo "$as_me: failed program was:" >&5
10808   cat conftest.$ac_ext >&5
10809   eval "$as_ac_Header=no"
10810 fi
10811 rm -f conftest.err conftest.$ac_ext
10812 fi
10813 echo "$as_me:10813: result: `eval echo '${'$as_ac_Header'}'`" >&5
10814 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10815 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10816   cat >>confdefs.h <<EOF
10817 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10818 EOF
10819
10820 fi
10821 done
10822
10823 echo "$as_me:10823: checking if wchar.h can be used as is" >&5
10824 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
10825 if test "${cf_cv_wchar_h_okay+set}" = set; then
10826   echo $ECHO_N "(cached) $ECHO_C" >&6
10827 else
10828
10829 cat >conftest.$ac_ext <<_ACEOF
10830 #line 10830 "configure"
10831 #include "confdefs.h"
10832
10833 #include <stdlib.h>
10834 #ifdef HAVE_WCHAR_H
10835 #include <wchar.h>
10836 #endif
10837 #ifdef HAVE_WCTYPE_H
10838 #include <wctype.h>
10839 #endif
10840
10841 int
10842 main (void)
10843 {
10844
10845         wint_t foo = 0;
10846         int bar = iswpunct(foo)
10847   ;
10848   return 0;
10849 }
10850 _ACEOF
10851 rm -f conftest.$ac_objext
10852 if { (eval echo "$as_me:10852: \"$ac_compile\"") >&5
10853   (eval $ac_compile) 2>&5
10854   ac_status=$?
10855   echo "$as_me:10855: \$? = $ac_status" >&5
10856   (exit $ac_status); } &&
10857          { ac_try='test -s conftest.$ac_objext'
10858   { (eval echo "$as_me:10858: \"$ac_try\"") >&5
10859   (eval $ac_try) 2>&5
10860   ac_status=$?
10861   echo "$as_me:10861: \$? = $ac_status" >&5
10862   (exit $ac_status); }; }; then
10863   cf_cv_wchar_h_okay=yes
10864 else
10865   echo "$as_me: failed program was:" >&5
10866 cat conftest.$ac_ext >&5
10867 cf_cv_wchar_h_okay=no
10868 fi
10869 rm -f conftest.$ac_objext conftest.$ac_ext
10870 fi
10871 echo "$as_me:10871: result: $cf_cv_wchar_h_okay" >&5
10872 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
10873
10874 if test $cf_cv_wchar_h_okay = no
10875 then
10876
10877 echo "$as_me:10877: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
10878 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
10879 cat >conftest.$ac_ext <<_ACEOF
10880 #line 10880 "configure"
10881 #include "confdefs.h"
10882 #include <sys/types.h>
10883
10884 int
10885 main (void)
10886 {
10887
10888 #ifndef _XOPEN_SOURCE_EXTENDED
10889 make an error
10890 #endif
10891   ;
10892   return 0;
10893 }
10894 _ACEOF
10895 rm -f conftest.$ac_objext
10896 if { (eval echo "$as_me:10896: \"$ac_compile\"") >&5
10897   (eval $ac_compile) 2>&5
10898   ac_status=$?
10899   echo "$as_me:10899: \$? = $ac_status" >&5
10900   (exit $ac_status); } &&
10901          { ac_try='test -s conftest.$ac_objext'
10902   { (eval echo "$as_me:10902: \"$ac_try\"") >&5
10903   (eval $ac_try) 2>&5
10904   ac_status=$?
10905   echo "$as_me:10905: \$? = $ac_status" >&5
10906   (exit $ac_status); }; }; then
10907   cf_result=no
10908 else
10909   echo "$as_me: failed program was:" >&5
10910 cat conftest.$ac_ext >&5
10911 cf_result=yes
10912 fi
10913 rm -f conftest.$ac_objext conftest.$ac_ext
10914 echo "$as_me:10914: result: $cf_result" >&5
10915 echo "${ECHO_T}$cf_result" >&6
10916
10917 if test "$cf_result" = yes ; then
10918         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
10919 elif test "x" != "x" ; then
10920         echo "$as_me:10920: checking checking for compatible value versus " >&5
10921 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
10922         cat >conftest.$ac_ext <<_ACEOF
10923 #line 10923 "configure"
10924 #include "confdefs.h"
10925 #include <sys/types.h>
10926
10927 int
10928 main (void)
10929 {
10930
10931 #if _XOPEN_SOURCE_EXTENDED- < 0
10932 make an error
10933 #endif
10934   ;
10935   return 0;
10936 }
10937 _ACEOF
10938 rm -f conftest.$ac_objext
10939 if { (eval echo "$as_me:10939: \"$ac_compile\"") >&5
10940   (eval $ac_compile) 2>&5
10941   ac_status=$?
10942   echo "$as_me:10942: \$? = $ac_status" >&5
10943   (exit $ac_status); } &&
10944          { ac_try='test -s conftest.$ac_objext'
10945   { (eval echo "$as_me:10945: \"$ac_try\"") >&5
10946   (eval $ac_try) 2>&5
10947   ac_status=$?
10948   echo "$as_me:10948: \$? = $ac_status" >&5
10949   (exit $ac_status); }; }; then
10950   cf_result=yes
10951 else
10952   echo "$as_me: failed program was:" >&5
10953 cat conftest.$ac_ext >&5
10954 cf_result=no
10955 fi
10956 rm -f conftest.$ac_objext conftest.$ac_ext
10957         echo "$as_me:10957: result: $cf_result" >&5
10958 echo "${ECHO_T}$cf_result" >&6
10959         if test "$cf_result" = no ; then
10960                 # perhaps we can override it - try...
10961                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
10962         fi
10963 fi
10964
10965 fi
10966
10967 echo "$as_me:10967: checking if wcwidth agrees graphics are single-width" >&5
10968 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
10969 if test "${cf_cv_wcwidth_graphics+set}" = set; then
10970   echo $ECHO_N "(cached) $ECHO_C" >&6
10971 else
10972
10973 cat >conftest.in <<CF_EOF
10974 -       VT100 symbols
10975 0x250c  upper left corner
10976 0x2514  lower left corner
10977 0x2510  upper right corner
10978 0x2518  lower right corner
10979 0x251c  tee pointing left
10980 0x2524  tee pointing right
10981 0x2534  tee pointing up
10982 0x252c  tee pointing down
10983 0x2500  horizontal line
10984 0x2502  vertical line
10985 0x253c  large plus or crossover
10986 0x23ba  scan line 1
10987 0x23bd  scan line 9
10988 0x25c6  diamond
10989 0x2592  checker board (stipple)
10990 0x00b0  degree symbol
10991 0x00b1  plus/minus
10992 0x00b7  bullet
10993 -       Teletype 5410v1 symbols
10994 0x2190  arrow pointing left
10995 0x2192  arrow pointing right
10996 0x2193  arrow pointing down
10997 0x2191  arrow pointing up
10998 0x2592  board of squares
10999 0x2603  lantern symbol
11000 0x25ae  solid square block
11001 -       these defaults were invented for ncurses
11002 0x23bb  scan line 3
11003 0x23bc  scan line 7
11004 0x2264  less-than-or-equal-to
11005 0x2265  greater-than-or-equal-to
11006 0x03c0  greek pi
11007 0x2260  not-equal
11008 0x00a3  pound-sterling symbol
11009 -       thick-line-drawing
11010 0x250f  upper left corner
11011 0x2517  lower left corner
11012 0x2513  upper right corner
11013 0x251b  lower right corner
11014 0x2523  tee pointing left
11015 0x252b  tee pointing right
11016 0x253b  tee pointing up
11017 0x2533  tee pointing down
11018 0x2501  horizontal line
11019 0x2503  vertical line
11020 0x254b  large plus or crossover
11021 -       double-line-drawing
11022 0x2554  upper left corner
11023 0x255a  lower left corner
11024 0x2557  upper right corner
11025 0x255d  lower right corner
11026 0x2563  tee pointing left
11027 0x2560  tee pointing right
11028 0x2569  tee pointing up
11029 0x2566  tee pointing down
11030 0x2550  horizontal line
11031 0x2551  vertical line
11032 0x256c  large plus or crossover
11033 CF_EOF
11034 if test "$cross_compiling" = yes; then
11035   cf_cv_wcwidth_graphics=unknown
11036 else
11037   cat >conftest.$ac_ext <<_ACEOF
11038 #line 11038 "configure"
11039 #include "confdefs.h"
11040
11041 #include <locale.h>
11042 #include <stdio.h>
11043 #include <wchar.h>
11044
11045 #define MY_LEN 80
11046
11047 int
11048 main(void)
11049 {
11050         FILE *fp;
11051         int value;
11052         char buffer[MY_LEN + 1];
11053         char notes[MY_LEN + 1];
11054         int totals = 0;
11055         int passed = 0;
11056
11057         if (setlocale(LC_ALL, "en_US.UTF8") ||
11058                 setlocale(LC_ALL, "en_US.UTF-8") ||
11059                 setlocale(LC_ALL, "en_US.utf8") ||
11060                 setlocale(LC_ALL, "en_US.utf-8")) {
11061                 if ((fp = fopen("conftest.in", "r")) != 0) {
11062                         while (fgets(buffer, MY_LEN, fp) != 0) {
11063                                 if (*buffer == '-') {
11064                                         fprintf(stderr, "\t%s", buffer);
11065                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11066                                         ++totals;
11067                                         if (wcwidth(value) == 1)
11068                                                 ++passed;
11069                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11070                                 } else {
11071                                         fprintf(stderr, "?\t%s", buffer);
11072                                 }
11073                         }
11074                 }
11075         }
11076         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11077         return (totals == passed) ? 0 : 1;
11078 }
11079
11080 _ACEOF
11081 rm -f conftest$ac_exeext
11082 if { (eval echo "$as_me:11082: \"$ac_link\"") >&5
11083   (eval $ac_link) 2>&5
11084   ac_status=$?
11085   echo "$as_me:11085: \$? = $ac_status" >&5
11086   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11087   { (eval echo "$as_me:11087: \"$ac_try\"") >&5
11088   (eval $ac_try) 2>&5
11089   ac_status=$?
11090   echo "$as_me:11090: \$? = $ac_status" >&5
11091   (exit $ac_status); }; }; then
11092   cf_cv_wcwidth_graphics=yes
11093 else
11094   echo "$as_me: program exited with status $ac_status" >&5
11095 echo "$as_me: failed program was:" >&5
11096 cat conftest.$ac_ext >&5
11097 cf_cv_wcwidth_graphics=no
11098 fi
11099 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11100 fi
11101
11102 fi
11103 echo "$as_me:11103: result: $cf_cv_wcwidth_graphics" >&5
11104 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11105
11106         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11107
11108         # with_overwrite=no
11109         NCURSES_CH_T=cchar_t
11110
11111 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11112 do
11113 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11114 echo "$as_me:11114: checking for $ac_func" >&5
11115 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11116 if eval "test \"\${$as_ac_var+set}\" = set"; then
11117   echo $ECHO_N "(cached) $ECHO_C" >&6
11118 else
11119   cat >conftest.$ac_ext <<_ACEOF
11120 #line 11120 "configure"
11121 #include "confdefs.h"
11122 #define $ac_func autoconf_temporary
11123 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11124 #undef $ac_func
11125
11126 #ifdef __cplusplus
11127 extern "C"
11128 #endif
11129
11130 /* We use char because int might match the return type of a gcc2
11131    builtin and then its argument prototype would still apply.  */
11132 char $ac_func (void);
11133
11134 int
11135 main (void)
11136 {
11137
11138 /* The GNU C library defines stubs for functions which it implements
11139     to always fail with ENOSYS.  Some functions are actually named
11140     something starting with __ and the normal name is an alias.  */
11141 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11142 #error found stub for $ac_func
11143 #endif
11144
11145         return $ac_func ();
11146   ;
11147   return 0;
11148 }
11149 _ACEOF
11150 rm -f conftest.$ac_objext conftest$ac_exeext
11151 if { (eval echo "$as_me:11151: \"$ac_link\"") >&5
11152   (eval $ac_link) 2>&5
11153   ac_status=$?
11154   echo "$as_me:11154: \$? = $ac_status" >&5
11155   (exit $ac_status); } &&
11156          { ac_try='test -s conftest$ac_exeext'
11157   { (eval echo "$as_me:11157: \"$ac_try\"") >&5
11158   (eval $ac_try) 2>&5
11159   ac_status=$?
11160   echo "$as_me:11160: \$? = $ac_status" >&5
11161   (exit $ac_status); }; }; then
11162   eval "$as_ac_var=yes"
11163 else
11164   echo "$as_me: failed program was:" >&5
11165 cat conftest.$ac_ext >&5
11166 eval "$as_ac_var=no"
11167 fi
11168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11169 fi
11170 echo "$as_me:11170: result: `eval echo '${'$as_ac_var'}'`" >&5
11171 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11172 if test `eval echo '${'$as_ac_var'}'` = yes; then
11173   cat >>confdefs.h <<EOF
11174 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11175 EOF
11176
11177 fi
11178 done
11179
11180         if test "x$ac_cv_func_putwc" != xyes ; then
11181
11182 echo "$as_me:11182: checking for multibyte character support" >&5
11183 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11184 if test "${cf_cv_utf8_lib+set}" = set; then
11185   echo $ECHO_N "(cached) $ECHO_C" >&6
11186 else
11187
11188         cf_save_LIBS="$LIBS"
11189         cat >conftest.$ac_ext <<_ACEOF
11190 #line 11190 "configure"
11191 #include "confdefs.h"
11192
11193 #include <stdlib.h>
11194 int
11195 main (void)
11196 {
11197 putwc(0,0);
11198   ;
11199   return 0;
11200 }
11201 _ACEOF
11202 rm -f conftest.$ac_objext conftest$ac_exeext
11203 if { (eval echo "$as_me:11203: \"$ac_link\"") >&5
11204   (eval $ac_link) 2>&5
11205   ac_status=$?
11206   echo "$as_me:11206: \$? = $ac_status" >&5
11207   (exit $ac_status); } &&
11208          { ac_try='test -s conftest$ac_exeext'
11209   { (eval echo "$as_me:11209: \"$ac_try\"") >&5
11210   (eval $ac_try) 2>&5
11211   ac_status=$?
11212   echo "$as_me:11212: \$? = $ac_status" >&5
11213   (exit $ac_status); }; }; then
11214   cf_cv_utf8_lib=yes
11215 else
11216   echo "$as_me: failed program was:" >&5
11217 cat conftest.$ac_ext >&5
11218
11219 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11220 # will be set on completion of the AC_TRY_LINK below.
11221 cf_cv_header_path_utf8=
11222 cf_cv_library_path_utf8=
11223
11224 echo "${as_me:-configure}:11224: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11225
11226 cf_save_LIBS="$LIBS"
11227
11228 cat >conftest.$ac_ext <<_ACEOF
11229 #line 11229 "configure"
11230 #include "confdefs.h"
11231
11232 #include <libutf8.h>
11233 int
11234 main (void)
11235 {
11236 putwc(0,0);
11237   ;
11238   return 0;
11239 }
11240 _ACEOF
11241 rm -f conftest.$ac_objext conftest$ac_exeext
11242 if { (eval echo "$as_me:11242: \"$ac_link\"") >&5
11243   (eval $ac_link) 2>&5
11244   ac_status=$?
11245   echo "$as_me:11245: \$? = $ac_status" >&5
11246   (exit $ac_status); } &&
11247          { ac_try='test -s conftest$ac_exeext'
11248   { (eval echo "$as_me:11248: \"$ac_try\"") >&5
11249   (eval $ac_try) 2>&5
11250   ac_status=$?
11251   echo "$as_me:11251: \$? = $ac_status" >&5
11252   (exit $ac_status); }; }; then
11253
11254         cf_cv_find_linkage_utf8=yes
11255         cf_cv_header_path_utf8=/usr/include
11256         cf_cv_library_path_utf8=/usr/lib
11257
11258 else
11259   echo "$as_me: failed program was:" >&5
11260 cat conftest.$ac_ext >&5
11261
11262 LIBS="-lutf8  $cf_save_LIBS"
11263
11264 cat >conftest.$ac_ext <<_ACEOF
11265 #line 11265 "configure"
11266 #include "confdefs.h"
11267
11268 #include <libutf8.h>
11269 int
11270 main (void)
11271 {
11272 putwc(0,0);
11273   ;
11274   return 0;
11275 }
11276 _ACEOF
11277 rm -f conftest.$ac_objext conftest$ac_exeext
11278 if { (eval echo "$as_me:11278: \"$ac_link\"") >&5
11279   (eval $ac_link) 2>&5
11280   ac_status=$?
11281   echo "$as_me:11281: \$? = $ac_status" >&5
11282   (exit $ac_status); } &&
11283          { ac_try='test -s conftest$ac_exeext'
11284   { (eval echo "$as_me:11284: \"$ac_try\"") >&5
11285   (eval $ac_try) 2>&5
11286   ac_status=$?
11287   echo "$as_me:11287: \$? = $ac_status" >&5
11288   (exit $ac_status); }; }; then
11289
11290         cf_cv_find_linkage_utf8=yes
11291         cf_cv_header_path_utf8=/usr/include
11292         cf_cv_library_path_utf8=/usr/lib
11293         cf_cv_library_file_utf8="-lutf8"
11294
11295 else
11296   echo "$as_me: failed program was:" >&5
11297 cat conftest.$ac_ext >&5
11298
11299         cf_cv_find_linkage_utf8=no
11300         LIBS="$cf_save_LIBS"
11301
11302         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11303
11304 echo "${as_me:-configure}:11304: testing find linkage for utf8 library ..." 1>&5
11305
11306 echo "${as_me:-configure}:11306: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11307
11308         cf_save_CPPFLAGS="$CPPFLAGS"
11309         cf_test_CPPFLAGS="$CPPFLAGS"
11310
11311 cf_search=
11312
11313 # collect the current set of include-directories from compiler flags
11314 cf_header_path_list=""
11315 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11316         for cf_header_path in $CPPFLAGS $CFLAGS
11317         do
11318                 case $cf_header_path in
11319                 (-I*)
11320                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11321
11322 test "x$cf_header_path" != "xNONE" && \
11323 test -d "$cf_header_path" && \
11324  {
11325         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11326         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11327         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11328         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11329         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11330         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11331 }
11332
11333                         cf_header_path_list="$cf_header_path_list $cf_search"
11334                         ;;
11335                 esac
11336         done
11337 fi
11338
11339 # add the variations for the package we are looking for
11340
11341 cf_search=
11342
11343 test "x$prefix" != "xNONE" && \
11344 test -d "$prefix" && \
11345  {
11346         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11347         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11348         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11349         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11350         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11351         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11352 }
11353
11354 for cf_subdir_prefix in \
11355         /usr \
11356         /usr/local \
11357         /usr/pkg \
11358         /opt \
11359         /opt/local \
11360         $HOME
11361 do
11362
11363 test "x$cf_subdir_prefix" != "x$prefix" && \
11364 test -d "$cf_subdir_prefix" && \
11365 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11366         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11367         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11368         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11369         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11370         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11371         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11372 }
11373
11374 done
11375
11376 test "$includedir" != NONE && \
11377 test "$includedir" != "/usr/include" && \
11378 test -d "$includedir" && {
11379         test -d $includedir &&    cf_search="$cf_search $includedir"
11380         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11381 }
11382
11383 test "$oldincludedir" != NONE && \
11384 test "$oldincludedir" != "/usr/include" && \
11385 test -d "$oldincludedir" && {
11386         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11387         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11388 }
11389
11390 cf_search="$cf_search $cf_header_path_list"
11391
11392         for cf_cv_header_path_utf8 in $cf_search
11393         do
11394                 if test -d $cf_cv_header_path_utf8 ; then
11395                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11396
11397 echo "${as_me:-configure}:11397: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11398
11399                         CPPFLAGS="$cf_save_CPPFLAGS"
11400
11401         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11402         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11403
11404                         cat >conftest.$ac_ext <<_ACEOF
11405 #line 11405 "configure"
11406 #include "confdefs.h"
11407
11408 #include <libutf8.h>
11409 int
11410 main (void)
11411 {
11412 putwc(0,0);
11413   ;
11414   return 0;
11415 }
11416 _ACEOF
11417 rm -f conftest.$ac_objext
11418 if { (eval echo "$as_me:11418: \"$ac_compile\"") >&5
11419   (eval $ac_compile) 2>&5
11420   ac_status=$?
11421   echo "$as_me:11421: \$? = $ac_status" >&5
11422   (exit $ac_status); } &&
11423          { ac_try='test -s conftest.$ac_objext'
11424   { (eval echo "$as_me:11424: \"$ac_try\"") >&5
11425   (eval $ac_try) 2>&5
11426   ac_status=$?
11427   echo "$as_me:11427: \$? = $ac_status" >&5
11428   (exit $ac_status); }; }; then
11429
11430                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11431
11432 echo "${as_me:-configure}:11432: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11433
11434                                 cf_cv_find_linkage_utf8=maybe
11435                                 cf_test_CPPFLAGS="$CPPFLAGS"
11436                                 break
11437 else
11438   echo "$as_me: failed program was:" >&5
11439 cat conftest.$ac_ext >&5
11440
11441                                 CPPFLAGS="$cf_save_CPPFLAGS"
11442
11443 fi
11444 rm -f conftest.$ac_objext conftest.$ac_ext
11445                 fi
11446         done
11447
11448         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11449
11450 echo "${as_me:-configure}:11450: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11451
11452                 cf_save_LIBS="$LIBS"
11453                 cf_save_LDFLAGS="$LDFLAGS"
11454
11455                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11456
11457 cf_search=
11458 cf_library_path_list=""
11459 if test -n "${LDFLAGS}${LIBS}" ; then
11460         for cf_library_path in $LDFLAGS $LIBS
11461         do
11462                 case $cf_library_path in
11463                 (-L*)
11464                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11465
11466 test "x$cf_library_path" != "xNONE" && \
11467 test -d "$cf_library_path" && \
11468  {
11469         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11470         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11471         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11472         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11473         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11474         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11475 }
11476
11477                         cf_library_path_list="$cf_library_path_list $cf_search"
11478                         ;;
11479                 esac
11480         done
11481 fi
11482
11483 cf_search=
11484
11485 test "x$prefix" != "xNONE" && \
11486 test -d "$prefix" && \
11487  {
11488         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11489         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11490         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11491         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11492         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11493         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11494 }
11495
11496 for cf_subdir_prefix in \
11497         /usr \
11498         /usr/local \
11499         /usr/pkg \
11500         /opt \
11501         /opt/local \
11502         $HOME
11503 do
11504
11505 test "x$cf_subdir_prefix" != "x$prefix" && \
11506 test -d "$cf_subdir_prefix" && \
11507 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11508         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11509         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11510         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11511         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11512         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11513         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11514 }
11515
11516 done
11517
11518 cf_search="$cf_library_path_list $cf_search"
11519
11520                         for cf_cv_library_path_utf8 in $cf_search
11521                         do
11522                                 if test -d $cf_cv_library_path_utf8 ; then
11523                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11524
11525 echo "${as_me:-configure}:11525: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11526
11527                                         CPPFLAGS="$cf_test_CPPFLAGS"
11528                                         LIBS="-lutf8  $cf_save_LIBS"
11529                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11530                                         cat >conftest.$ac_ext <<_ACEOF
11531 #line 11531 "configure"
11532 #include "confdefs.h"
11533
11534 #include <libutf8.h>
11535 int
11536 main (void)
11537 {
11538 putwc(0,0);
11539   ;
11540   return 0;
11541 }
11542 _ACEOF
11543 rm -f conftest.$ac_objext conftest$ac_exeext
11544 if { (eval echo "$as_me:11544: \"$ac_link\"") >&5
11545   (eval $ac_link) 2>&5
11546   ac_status=$?
11547   echo "$as_me:11547: \$? = $ac_status" >&5
11548   (exit $ac_status); } &&
11549          { ac_try='test -s conftest$ac_exeext'
11550   { (eval echo "$as_me:11550: \"$ac_try\"") >&5
11551   (eval $ac_try) 2>&5
11552   ac_status=$?
11553   echo "$as_me:11553: \$? = $ac_status" >&5
11554   (exit $ac_status); }; }; then
11555
11556                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11557
11558 echo "${as_me:-configure}:11558: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11559
11560                                         cf_cv_find_linkage_utf8=yes
11561                                         cf_cv_library_file_utf8="-lutf8"
11562                                         break
11563 else
11564   echo "$as_me: failed program was:" >&5
11565 cat conftest.$ac_ext >&5
11566
11567                                         CPPFLAGS="$cf_save_CPPFLAGS"
11568                                         LIBS="$cf_save_LIBS"
11569                                         LDFLAGS="$cf_save_LDFLAGS"
11570
11571 fi
11572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11573                                 fi
11574                         done
11575                         CPPFLAGS="$cf_save_CPPFLAGS"
11576                         LDFLAGS="$cf_save_LDFLAGS"
11577                 fi
11578
11579         else
11580                 cf_cv_find_linkage_utf8=no
11581         fi
11582
11583 fi
11584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11585
11586 fi
11587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11588
11589 LIBS="$cf_save_LIBS"
11590
11591 if test "$cf_cv_find_linkage_utf8" = yes ; then
11592 cf_cv_utf8_lib=add-on
11593 else
11594 cf_cv_utf8_lib=no
11595 fi
11596
11597 fi
11598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11599 fi
11600 echo "$as_me:11600: result: $cf_cv_utf8_lib" >&5
11601 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
11602
11603 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
11604 # ncurses/ncursesw:
11605 if test "$cf_cv_utf8_lib" = "add-on" ; then
11606
11607 cat >>confdefs.h <<\EOF
11608 #define HAVE_LIBUTF8_H 1
11609 EOF
11610
11611 if test -n "$cf_cv_header_path_utf8" ; then
11612   for cf_add_incdir in $cf_cv_header_path_utf8
11613   do
11614         while test $cf_add_incdir != /usr/include
11615         do
11616           if test -d $cf_add_incdir
11617           then
11618                 cf_have_incdir=no
11619                 if test -n "$CFLAGS$CPPFLAGS" ; then
11620                   # a loop is needed to ensure we can add subdirs of existing dirs
11621                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11622                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11623                           cf_have_incdir=yes; break
11624                         fi
11625                   done
11626                 fi
11627
11628                 if test "$cf_have_incdir" = no ; then
11629                   if test "$cf_add_incdir" = /usr/local/include ; then
11630                         if test "$GCC" = yes
11631                         then
11632                           cf_save_CPPFLAGS=$CPPFLAGS
11633
11634         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11635         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11636
11637                           cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11640 #include <stdio.h>
11641 int
11642 main (void)
11643 {
11644 printf("Hello")
11645   ;
11646   return 0;
11647 }
11648 _ACEOF
11649 rm -f conftest.$ac_objext
11650 if { (eval echo "$as_me:11650: \"$ac_compile\"") >&5
11651   (eval $ac_compile) 2>&5
11652   ac_status=$?
11653   echo "$as_me:11653: \$? = $ac_status" >&5
11654   (exit $ac_status); } &&
11655          { ac_try='test -s conftest.$ac_objext'
11656   { (eval echo "$as_me:11656: \"$ac_try\"") >&5
11657   (eval $ac_try) 2>&5
11658   ac_status=$?
11659   echo "$as_me:11659: \$? = $ac_status" >&5
11660   (exit $ac_status); }; }; then
11661   :
11662 else
11663   echo "$as_me: failed program was:" >&5
11664 cat conftest.$ac_ext >&5
11665 cf_have_incdir=yes
11666 fi
11667 rm -f conftest.$ac_objext conftest.$ac_ext
11668                           CPPFLAGS=$cf_save_CPPFLAGS
11669                         fi
11670                   fi
11671                 fi
11672
11673                 if test "$cf_have_incdir" = no ; then
11674                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11675
11676 echo "${as_me:-configure}:11676: testing adding $cf_add_incdir to include-path ..." 1>&5
11677
11678                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11679
11680                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11681                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11682                   cf_add_incdir="$cf_top_incdir"
11683                 else
11684                   break
11685                 fi
11686           else
11687                 break
11688           fi
11689         done
11690   done
11691 fi
11692
11693 if test -n "$cf_cv_library_path_utf8" ; then
11694         for cf_add_libdir in $cf_cv_library_path_utf8
11695         do
11696                 if test $cf_add_libdir = /usr/lib ; then
11697                         :
11698                 elif test -d $cf_add_libdir
11699                 then
11700                         cf_have_libdir=no
11701                         if test -n "$LDFLAGS$LIBS" ; then
11702                                 # a loop is needed to ensure we can add subdirs of existing dirs
11703                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
11704                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11705                                                 cf_have_libdir=yes; break
11706                                         fi
11707                                 done
11708                         fi
11709                         if test "$cf_have_libdir" = no ; then
11710                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11711
11712 echo "${as_me:-configure}:11712: testing adding $cf_add_libdir to library-path ..." 1>&5
11713
11714                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11715                         fi
11716                 fi
11717         done
11718 fi
11719
11720 cf_add_libs="$cf_cv_library_file_utf8"
11721 # Filter out duplicates - this happens with badly-designed ".pc" files...
11722 for cf_add_1lib in $LIBS
11723 do
11724         for cf_add_2lib in $cf_add_libs
11725         do
11726                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11727                 then
11728                         cf_add_1lib=
11729                         break
11730                 fi
11731         done
11732         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11733 done
11734 LIBS="$cf_add_libs"
11735
11736 fi
11737
11738                 if test "$cf_cv_utf8_lib" != no ; then
11739                         NCURSES_LIBUTF8=1
11740                 fi
11741         fi
11742
11743 # This is needed on Tru64 5.0 to declare mbstate_t
11744 echo "$as_me:11744: checking if we must include wchar.h to declare mbstate_t" >&5
11745 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
11746 if test "${cf_cv_mbstate_t+set}" = set; then
11747   echo $ECHO_N "(cached) $ECHO_C" >&6
11748 else
11749
11750 cat >conftest.$ac_ext <<_ACEOF
11751 #line 11751 "configure"
11752 #include "confdefs.h"
11753
11754 #include <stdlib.h>
11755 #include <stdarg.h>
11756 #include <stdio.h>
11757 #ifdef HAVE_LIBUTF8_H
11758 #include <libutf8.h>
11759 #endif
11760 int
11761 main (void)
11762 {
11763 mbstate_t state
11764   ;
11765   return 0;
11766 }
11767 _ACEOF
11768 rm -f conftest.$ac_objext
11769 if { (eval echo "$as_me:11769: \"$ac_compile\"") >&5
11770   (eval $ac_compile) 2>&5
11771   ac_status=$?
11772   echo "$as_me:11772: \$? = $ac_status" >&5
11773   (exit $ac_status); } &&
11774          { ac_try='test -s conftest.$ac_objext'
11775   { (eval echo "$as_me:11775: \"$ac_try\"") >&5
11776   (eval $ac_try) 2>&5
11777   ac_status=$?
11778   echo "$as_me:11778: \$? = $ac_status" >&5
11779   (exit $ac_status); }; }; then
11780   cf_cv_mbstate_t=no
11781 else
11782   echo "$as_me: failed program was:" >&5
11783 cat conftest.$ac_ext >&5
11784 cat >conftest.$ac_ext <<_ACEOF
11785 #line 11785 "configure"
11786 #include "confdefs.h"
11787
11788 #include <stdlib.h>
11789 #include <stdarg.h>
11790 #include <stdio.h>
11791 #include <wchar.h>
11792 #ifdef HAVE_LIBUTF8_H
11793 #include <libutf8.h>
11794 #endif
11795 int
11796 main (void)
11797 {
11798 mbstate_t value
11799   ;
11800   return 0;
11801 }
11802 _ACEOF
11803 rm -f conftest.$ac_objext
11804 if { (eval echo "$as_me:11804: \"$ac_compile\"") >&5
11805   (eval $ac_compile) 2>&5
11806   ac_status=$?
11807   echo "$as_me:11807: \$? = $ac_status" >&5
11808   (exit $ac_status); } &&
11809          { ac_try='test -s conftest.$ac_objext'
11810   { (eval echo "$as_me:11810: \"$ac_try\"") >&5
11811   (eval $ac_try) 2>&5
11812   ac_status=$?
11813   echo "$as_me:11813: \$? = $ac_status" >&5
11814   (exit $ac_status); }; }; then
11815   cf_cv_mbstate_t=yes
11816 else
11817   echo "$as_me: failed program was:" >&5
11818 cat conftest.$ac_ext >&5
11819 cf_cv_mbstate_t=unknown
11820 fi
11821 rm -f conftest.$ac_objext conftest.$ac_ext
11822 fi
11823 rm -f conftest.$ac_objext conftest.$ac_ext
11824 fi
11825 echo "$as_me:11825: result: $cf_cv_mbstate_t" >&5
11826 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
11827
11828 if test "$cf_cv_mbstate_t" = yes ; then
11829
11830 cat >>confdefs.h <<\EOF
11831 #define NEED_WCHAR_H 1
11832 EOF
11833
11834         NEED_WCHAR_H=1
11835 fi
11836
11837 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
11838 if test "$cf_cv_mbstate_t" = unknown ; then
11839         NCURSES_MBSTATE_T=1
11840 fi
11841
11842 # This is needed on Tru64 5.0 to declare wchar_t
11843 echo "$as_me:11843: checking if we must include wchar.h to declare wchar_t" >&5
11844 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
11845 if test "${cf_cv_wchar_t+set}" = set; then
11846   echo $ECHO_N "(cached) $ECHO_C" >&6
11847 else
11848
11849 cat >conftest.$ac_ext <<_ACEOF
11850 #line 11850 "configure"
11851 #include "confdefs.h"
11852
11853 #include <stdlib.h>
11854 #include <stdarg.h>
11855 #include <stdio.h>
11856 #ifdef HAVE_LIBUTF8_H
11857 #include <libutf8.h>
11858 #endif
11859 int
11860 main (void)
11861 {
11862 wchar_t state
11863   ;
11864   return 0;
11865 }
11866 _ACEOF
11867 rm -f conftest.$ac_objext
11868 if { (eval echo "$as_me:11868: \"$ac_compile\"") >&5
11869   (eval $ac_compile) 2>&5
11870   ac_status=$?
11871   echo "$as_me:11871: \$? = $ac_status" >&5
11872   (exit $ac_status); } &&
11873          { ac_try='test -s conftest.$ac_objext'
11874   { (eval echo "$as_me:11874: \"$ac_try\"") >&5
11875   (eval $ac_try) 2>&5
11876   ac_status=$?
11877   echo "$as_me:11877: \$? = $ac_status" >&5
11878   (exit $ac_status); }; }; then
11879   cf_cv_wchar_t=no
11880 else
11881   echo "$as_me: failed program was:" >&5
11882 cat conftest.$ac_ext >&5
11883 cat >conftest.$ac_ext <<_ACEOF
11884 #line 11884 "configure"
11885 #include "confdefs.h"
11886
11887 #include <stdlib.h>
11888 #include <stdarg.h>
11889 #include <stdio.h>
11890 #include <wchar.h>
11891 #ifdef HAVE_LIBUTF8_H
11892 #include <libutf8.h>
11893 #endif
11894 int
11895 main (void)
11896 {
11897 wchar_t value
11898   ;
11899   return 0;
11900 }
11901 _ACEOF
11902 rm -f conftest.$ac_objext
11903 if { (eval echo "$as_me:11903: \"$ac_compile\"") >&5
11904   (eval $ac_compile) 2>&5
11905   ac_status=$?
11906   echo "$as_me:11906: \$? = $ac_status" >&5
11907   (exit $ac_status); } &&
11908          { ac_try='test -s conftest.$ac_objext'
11909   { (eval echo "$as_me:11909: \"$ac_try\"") >&5
11910   (eval $ac_try) 2>&5
11911   ac_status=$?
11912   echo "$as_me:11912: \$? = $ac_status" >&5
11913   (exit $ac_status); }; }; then
11914   cf_cv_wchar_t=yes
11915 else
11916   echo "$as_me: failed program was:" >&5
11917 cat conftest.$ac_ext >&5
11918 cf_cv_wchar_t=unknown
11919 fi
11920 rm -f conftest.$ac_objext conftest.$ac_ext
11921 fi
11922 rm -f conftest.$ac_objext conftest.$ac_ext
11923 fi
11924 echo "$as_me:11924: result: $cf_cv_wchar_t" >&5
11925 echo "${ECHO_T}$cf_cv_wchar_t" >&6
11926
11927 if test "$cf_cv_wchar_t" = yes ; then
11928
11929 cat >>confdefs.h <<\EOF
11930 #define NEED_WCHAR_H 1
11931 EOF
11932
11933         NEED_WCHAR_H=1
11934 fi
11935
11936 # if we do not find wchar_t in either place, use substitution to provide a fallback.
11937 if test "$cf_cv_wchar_t" = unknown ; then
11938         NCURSES_WCHAR_T=1
11939 fi
11940
11941 # if we find wchar_t in either place, use substitution to provide a fallback.
11942 if test "$cf_cv_wchar_t" != unknown ; then
11943         NCURSES_OK_WCHAR_T=1
11944 fi
11945
11946 # This is needed on Tru64 5.0 to declare wint_t
11947 echo "$as_me:11947: checking if we must include wchar.h to declare wint_t" >&5
11948 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
11949 if test "${cf_cv_wint_t+set}" = set; then
11950   echo $ECHO_N "(cached) $ECHO_C" >&6
11951 else
11952
11953 cat >conftest.$ac_ext <<_ACEOF
11954 #line 11954 "configure"
11955 #include "confdefs.h"
11956
11957 #include <stdlib.h>
11958 #include <stdarg.h>
11959 #include <stdio.h>
11960 #ifdef HAVE_LIBUTF8_H
11961 #include <libutf8.h>
11962 #endif
11963 int
11964 main (void)
11965 {
11966 wint_t state
11967   ;
11968   return 0;
11969 }
11970 _ACEOF
11971 rm -f conftest.$ac_objext
11972 if { (eval echo "$as_me:11972: \"$ac_compile\"") >&5
11973   (eval $ac_compile) 2>&5
11974   ac_status=$?
11975   echo "$as_me:11975: \$? = $ac_status" >&5
11976   (exit $ac_status); } &&
11977          { ac_try='test -s conftest.$ac_objext'
11978   { (eval echo "$as_me:11978: \"$ac_try\"") >&5
11979   (eval $ac_try) 2>&5
11980   ac_status=$?
11981   echo "$as_me:11981: \$? = $ac_status" >&5
11982   (exit $ac_status); }; }; then
11983   cf_cv_wint_t=no
11984 else
11985   echo "$as_me: failed program was:" >&5
11986 cat conftest.$ac_ext >&5
11987 cat >conftest.$ac_ext <<_ACEOF
11988 #line 11988 "configure"
11989 #include "confdefs.h"
11990
11991 #include <stdlib.h>
11992 #include <stdarg.h>
11993 #include <stdio.h>
11994 #include <wchar.h>
11995 #ifdef HAVE_LIBUTF8_H
11996 #include <libutf8.h>
11997 #endif
11998 int
11999 main (void)
12000 {
12001 wint_t value
12002   ;
12003   return 0;
12004 }
12005 _ACEOF
12006 rm -f conftest.$ac_objext
12007 if { (eval echo "$as_me:12007: \"$ac_compile\"") >&5
12008   (eval $ac_compile) 2>&5
12009   ac_status=$?
12010   echo "$as_me:12010: \$? = $ac_status" >&5
12011   (exit $ac_status); } &&
12012          { ac_try='test -s conftest.$ac_objext'
12013   { (eval echo "$as_me:12013: \"$ac_try\"") >&5
12014   (eval $ac_try) 2>&5
12015   ac_status=$?
12016   echo "$as_me:12016: \$? = $ac_status" >&5
12017   (exit $ac_status); }; }; then
12018   cf_cv_wint_t=yes
12019 else
12020   echo "$as_me: failed program was:" >&5
12021 cat conftest.$ac_ext >&5
12022 cf_cv_wint_t=unknown
12023 fi
12024 rm -f conftest.$ac_objext conftest.$ac_ext
12025 fi
12026 rm -f conftest.$ac_objext conftest.$ac_ext
12027 fi
12028 echo "$as_me:12028: result: $cf_cv_wint_t" >&5
12029 echo "${ECHO_T}$cf_cv_wint_t" >&6
12030
12031 if test "$cf_cv_wint_t" = yes ; then
12032
12033 cat >>confdefs.h <<\EOF
12034 #define NEED_WCHAR_H 1
12035 EOF
12036
12037         NEED_WCHAR_H=1
12038 fi
12039
12040 # if we do not find wint_t in either place, use substitution to provide a fallback.
12041 if test "$cf_cv_wint_t" = unknown ; then
12042         NCURSES_WINT_T=1
12043 fi
12044
12045 # if we find wint_t in either place, use substitution to provide a fallback.
12046 if test "$cf_cv_wint_t" != unknown ; then
12047         NCURSES_OK_WINT_T=1
12048 fi
12049
12050         if test "$NCURSES_MBSTATE_T" != 0; then
12051
12052 cat >>confdefs.h <<\EOF
12053 #define NEED_MBSTATE_T_DEF 1
12054 EOF
12055
12056         fi
12057 fi
12058
12059 ###   use option --disable-lp64 to allow long chtype
12060 echo "$as_me:12060: checking whether to enable _LP64 definition in curses.h" >&5
12061 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12062
12063 # Check whether --enable-lp64 or --disable-lp64 was given.
12064 if test "${enable_lp64+set}" = set; then
12065   enableval="$enable_lp64"
12066   with_lp64=$enableval
12067 else
12068   with_lp64=$cf_dft_with_lp64
12069 fi;
12070 echo "$as_me:12070: result: $with_lp64" >&5
12071 echo "${ECHO_T}$with_lp64" >&6
12072
12073 if test "x$with_lp64" = xyes ; then
12074         cf_cv_enable_lp64=1
12075 else
12076         cf_cv_enable_lp64=0
12077 fi
12078
12079 # Check whether --enable-largefile or --disable-largefile was given.
12080 if test "${enable_largefile+set}" = set; then
12081   enableval="$enable_largefile"
12082
12083 fi;
12084 if test "$enable_largefile" != no; then
12085
12086   echo "$as_me:12086: checking for special C compiler options needed for large files" >&5
12087 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12088 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12089   echo $ECHO_N "(cached) $ECHO_C" >&6
12090 else
12091   ac_cv_sys_largefile_CC=no
12092      if test "$GCC" != yes; then
12093        ac_save_CC=$CC
12094        while :; do
12095          # IRIX 6.2 and later do not support large files by default,
12096          # so use the C compiler's -n32 option if that helps.
12097          cat >conftest.$ac_ext <<_ACEOF
12098 #line 12098 "configure"
12099 #include "confdefs.h"
12100 #include <sys/types.h>
12101  /* Check that off_t can represent 2**63 - 1 correctly.
12102     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12103     since some C++ compilers masquerading as C compilers
12104     incorrectly reject 9223372036854775807.  */
12105 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12106   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12107                        && LARGE_OFF_T % 2147483647 == 1)
12108                       ? 1 : -1];
12109 int
12110 main (void)
12111 {
12112
12113   ;
12114   return 0;
12115 }
12116 _ACEOF
12117          rm -f conftest.$ac_objext
12118 if { (eval echo "$as_me:12118: \"$ac_compile\"") >&5
12119   (eval $ac_compile) 2>&5
12120   ac_status=$?
12121   echo "$as_me:12121: \$? = $ac_status" >&5
12122   (exit $ac_status); } &&
12123          { ac_try='test -s conftest.$ac_objext'
12124   { (eval echo "$as_me:12124: \"$ac_try\"") >&5
12125   (eval $ac_try) 2>&5
12126   ac_status=$?
12127   echo "$as_me:12127: \$? = $ac_status" >&5
12128   (exit $ac_status); }; }; then
12129   break
12130 else
12131   echo "$as_me: failed program was:" >&5
12132 cat conftest.$ac_ext >&5
12133 fi
12134 rm -f conftest.$ac_objext
12135          CC="$CC -n32"
12136          rm -f conftest.$ac_objext
12137 if { (eval echo "$as_me:12137: \"$ac_compile\"") >&5
12138   (eval $ac_compile) 2>&5
12139   ac_status=$?
12140   echo "$as_me:12140: \$? = $ac_status" >&5
12141   (exit $ac_status); } &&
12142          { ac_try='test -s conftest.$ac_objext'
12143   { (eval echo "$as_me:12143: \"$ac_try\"") >&5
12144   (eval $ac_try) 2>&5
12145   ac_status=$?
12146   echo "$as_me:12146: \$? = $ac_status" >&5
12147   (exit $ac_status); }; }; then
12148   ac_cv_sys_largefile_CC=' -n32'; break
12149 else
12150   echo "$as_me: failed program was:" >&5
12151 cat conftest.$ac_ext >&5
12152 fi
12153 rm -f conftest.$ac_objext
12154          break
12155        done
12156        CC=$ac_save_CC
12157        rm -f conftest.$ac_ext
12158     fi
12159 fi
12160 echo "$as_me:12160: result: $ac_cv_sys_largefile_CC" >&5
12161 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12162   if test "$ac_cv_sys_largefile_CC" != no; then
12163     CC=$CC$ac_cv_sys_largefile_CC
12164   fi
12165
12166   echo "$as_me:12166: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12167 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12168 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12169   echo $ECHO_N "(cached) $ECHO_C" >&6
12170 else
12171   while :; do
12172   ac_cv_sys_file_offset_bits=no
12173   cat >conftest.$ac_ext <<_ACEOF
12174 #line 12174 "configure"
12175 #include "confdefs.h"
12176 #include <sys/types.h>
12177  /* Check that off_t can represent 2**63 - 1 correctly.
12178     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12179     since some C++ compilers masquerading as C compilers
12180     incorrectly reject 9223372036854775807.  */
12181 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12182   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12183                        && LARGE_OFF_T % 2147483647 == 1)
12184                       ? 1 : -1];
12185 int
12186 main (void)
12187 {
12188
12189   ;
12190   return 0;
12191 }
12192 _ACEOF
12193 rm -f conftest.$ac_objext
12194 if { (eval echo "$as_me:12194: \"$ac_compile\"") >&5
12195   (eval $ac_compile) 2>&5
12196   ac_status=$?
12197   echo "$as_me:12197: \$? = $ac_status" >&5
12198   (exit $ac_status); } &&
12199          { ac_try='test -s conftest.$ac_objext'
12200   { (eval echo "$as_me:12200: \"$ac_try\"") >&5
12201   (eval $ac_try) 2>&5
12202   ac_status=$?
12203   echo "$as_me:12203: \$? = $ac_status" >&5
12204   (exit $ac_status); }; }; then
12205   break
12206 else
12207   echo "$as_me: failed program was:" >&5
12208 cat conftest.$ac_ext >&5
12209 fi
12210 rm -f conftest.$ac_objext conftest.$ac_ext
12211   cat >conftest.$ac_ext <<_ACEOF
12212 #line 12212 "configure"
12213 #include "confdefs.h"
12214 #define _FILE_OFFSET_BITS 64
12215 #include <sys/types.h>
12216  /* Check that off_t can represent 2**63 - 1 correctly.
12217     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12218     since some C++ compilers masquerading as C compilers
12219     incorrectly reject 9223372036854775807.  */
12220 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12221   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12222                        && LARGE_OFF_T % 2147483647 == 1)
12223                       ? 1 : -1];
12224 int
12225 main (void)
12226 {
12227
12228   ;
12229   return 0;
12230 }
12231 _ACEOF
12232 rm -f conftest.$ac_objext
12233 if { (eval echo "$as_me:12233: \"$ac_compile\"") >&5
12234   (eval $ac_compile) 2>&5
12235   ac_status=$?
12236   echo "$as_me:12236: \$? = $ac_status" >&5
12237   (exit $ac_status); } &&
12238          { ac_try='test -s conftest.$ac_objext'
12239   { (eval echo "$as_me:12239: \"$ac_try\"") >&5
12240   (eval $ac_try) 2>&5
12241   ac_status=$?
12242   echo "$as_me:12242: \$? = $ac_status" >&5
12243   (exit $ac_status); }; }; then
12244   ac_cv_sys_file_offset_bits=64; break
12245 else
12246   echo "$as_me: failed program was:" >&5
12247 cat conftest.$ac_ext >&5
12248 fi
12249 rm -f conftest.$ac_objext conftest.$ac_ext
12250   break
12251 done
12252 fi
12253 echo "$as_me:12253: result: $ac_cv_sys_file_offset_bits" >&5
12254 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12255 if test "$ac_cv_sys_file_offset_bits" != no; then
12256
12257 cat >>confdefs.h <<EOF
12258 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12259 EOF
12260
12261 fi
12262 rm -rf conftest*
12263   echo "$as_me:12263: checking for _LARGE_FILES value needed for large files" >&5
12264 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12265 if test "${ac_cv_sys_large_files+set}" = set; then
12266   echo $ECHO_N "(cached) $ECHO_C" >&6
12267 else
12268   while :; do
12269   ac_cv_sys_large_files=no
12270   cat >conftest.$ac_ext <<_ACEOF
12271 #line 12271 "configure"
12272 #include "confdefs.h"
12273 #include <sys/types.h>
12274  /* Check that off_t can represent 2**63 - 1 correctly.
12275     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12276     since some C++ compilers masquerading as C compilers
12277     incorrectly reject 9223372036854775807.  */
12278 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12279   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12280                        && LARGE_OFF_T % 2147483647 == 1)
12281                       ? 1 : -1];
12282 int
12283 main (void)
12284 {
12285
12286   ;
12287   return 0;
12288 }
12289 _ACEOF
12290 rm -f conftest.$ac_objext
12291 if { (eval echo "$as_me:12291: \"$ac_compile\"") >&5
12292   (eval $ac_compile) 2>&5
12293   ac_status=$?
12294   echo "$as_me:12294: \$? = $ac_status" >&5
12295   (exit $ac_status); } &&
12296          { ac_try='test -s conftest.$ac_objext'
12297   { (eval echo "$as_me:12297: \"$ac_try\"") >&5
12298   (eval $ac_try) 2>&5
12299   ac_status=$?
12300   echo "$as_me:12300: \$? = $ac_status" >&5
12301   (exit $ac_status); }; }; then
12302   break
12303 else
12304   echo "$as_me: failed program was:" >&5
12305 cat conftest.$ac_ext >&5
12306 fi
12307 rm -f conftest.$ac_objext conftest.$ac_ext
12308   cat >conftest.$ac_ext <<_ACEOF
12309 #line 12309 "configure"
12310 #include "confdefs.h"
12311 #define _LARGE_FILES 1
12312 #include <sys/types.h>
12313  /* Check that off_t can represent 2**63 - 1 correctly.
12314     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12315     since some C++ compilers masquerading as C compilers
12316     incorrectly reject 9223372036854775807.  */
12317 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12318   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12319                        && LARGE_OFF_T % 2147483647 == 1)
12320                       ? 1 : -1];
12321 int
12322 main (void)
12323 {
12324
12325   ;
12326   return 0;
12327 }
12328 _ACEOF
12329 rm -f conftest.$ac_objext
12330 if { (eval echo "$as_me:12330: \"$ac_compile\"") >&5
12331   (eval $ac_compile) 2>&5
12332   ac_status=$?
12333   echo "$as_me:12333: \$? = $ac_status" >&5
12334   (exit $ac_status); } &&
12335          { ac_try='test -s conftest.$ac_objext'
12336   { (eval echo "$as_me:12336: \"$ac_try\"") >&5
12337   (eval $ac_try) 2>&5
12338   ac_status=$?
12339   echo "$as_me:12339: \$? = $ac_status" >&5
12340   (exit $ac_status); }; }; then
12341   ac_cv_sys_large_files=1; break
12342 else
12343   echo "$as_me: failed program was:" >&5
12344 cat conftest.$ac_ext >&5
12345 fi
12346 rm -f conftest.$ac_objext conftest.$ac_ext
12347   break
12348 done
12349 fi
12350 echo "$as_me:12350: result: $ac_cv_sys_large_files" >&5
12351 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12352 if test "$ac_cv_sys_large_files" != no; then
12353
12354 cat >>confdefs.h <<EOF
12355 #define _LARGE_FILES $ac_cv_sys_large_files
12356 EOF
12357
12358 fi
12359 rm -rf conftest*
12360 fi
12361
12362         if test "$enable_largefile" != no ; then
12363         echo "$as_me:12363: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12364 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12365 if test "${ac_cv_sys_largefile_source+set}" = set; then
12366   echo $ECHO_N "(cached) $ECHO_C" >&6
12367 else
12368   while :; do
12369   ac_cv_sys_largefile_source=no
12370   cat >conftest.$ac_ext <<_ACEOF
12371 #line 12371 "configure"
12372 #include "confdefs.h"
12373 #include <stdio.h>
12374 int
12375 main (void)
12376 {
12377 return !fseeko;
12378   ;
12379   return 0;
12380 }
12381 _ACEOF
12382 rm -f conftest.$ac_objext
12383 if { (eval echo "$as_me:12383: \"$ac_compile\"") >&5
12384   (eval $ac_compile) 2>&5
12385   ac_status=$?
12386   echo "$as_me:12386: \$? = $ac_status" >&5
12387   (exit $ac_status); } &&
12388          { ac_try='test -s conftest.$ac_objext'
12389   { (eval echo "$as_me:12389: \"$ac_try\"") >&5
12390   (eval $ac_try) 2>&5
12391   ac_status=$?
12392   echo "$as_me:12392: \$? = $ac_status" >&5
12393   (exit $ac_status); }; }; then
12394   break
12395 else
12396   echo "$as_me: failed program was:" >&5
12397 cat conftest.$ac_ext >&5
12398 fi
12399 rm -f conftest.$ac_objext conftest.$ac_ext
12400   cat >conftest.$ac_ext <<_ACEOF
12401 #line 12401 "configure"
12402 #include "confdefs.h"
12403 #define _LARGEFILE_SOURCE 1
12404 #include <stdio.h>
12405 int
12406 main (void)
12407 {
12408 return !fseeko;
12409   ;
12410   return 0;
12411 }
12412 _ACEOF
12413 rm -f conftest.$ac_objext
12414 if { (eval echo "$as_me:12414: \"$ac_compile\"") >&5
12415   (eval $ac_compile) 2>&5
12416   ac_status=$?
12417   echo "$as_me:12417: \$? = $ac_status" >&5
12418   (exit $ac_status); } &&
12419          { ac_try='test -s conftest.$ac_objext'
12420   { (eval echo "$as_me:12420: \"$ac_try\"") >&5
12421   (eval $ac_try) 2>&5
12422   ac_status=$?
12423   echo "$as_me:12423: \$? = $ac_status" >&5
12424   (exit $ac_status); }; }; then
12425   ac_cv_sys_largefile_source=1; break
12426 else
12427   echo "$as_me: failed program was:" >&5
12428 cat conftest.$ac_ext >&5
12429 fi
12430 rm -f conftest.$ac_objext conftest.$ac_ext
12431   break
12432 done
12433 fi
12434 echo "$as_me:12434: result: $ac_cv_sys_largefile_source" >&5
12435 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12436 if test "$ac_cv_sys_largefile_source" != no; then
12437
12438 cat >>confdefs.h <<EOF
12439 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12440 EOF
12441
12442 fi
12443 rm -rf conftest*
12444
12445 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12446 # in glibc 2.1.3, but that breaks too many other things.
12447 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12448 echo "$as_me:12448: checking for fseeko" >&5
12449 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12450 if test "${ac_cv_func_fseeko+set}" = set; then
12451   echo $ECHO_N "(cached) $ECHO_C" >&6
12452 else
12453   cat >conftest.$ac_ext <<_ACEOF
12454 #line 12454 "configure"
12455 #include "confdefs.h"
12456 #include <stdio.h>
12457 int
12458 main (void)
12459 {
12460 return fseeko && fseeko (stdin, 0, 0);
12461   ;
12462   return 0;
12463 }
12464 _ACEOF
12465 rm -f conftest.$ac_objext conftest$ac_exeext
12466 if { (eval echo "$as_me:12466: \"$ac_link\"") >&5
12467   (eval $ac_link) 2>&5
12468   ac_status=$?
12469   echo "$as_me:12469: \$? = $ac_status" >&5
12470   (exit $ac_status); } &&
12471          { ac_try='test -s conftest$ac_exeext'
12472   { (eval echo "$as_me:12472: \"$ac_try\"") >&5
12473   (eval $ac_try) 2>&5
12474   ac_status=$?
12475   echo "$as_me:12475: \$? = $ac_status" >&5
12476   (exit $ac_status); }; }; then
12477   ac_cv_func_fseeko=yes
12478 else
12479   echo "$as_me: failed program was:" >&5
12480 cat conftest.$ac_ext >&5
12481 ac_cv_func_fseeko=no
12482 fi
12483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12484 fi
12485 echo "$as_me:12485: result: $ac_cv_func_fseeko" >&5
12486 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12487 if test $ac_cv_func_fseeko = yes; then
12488
12489 cat >>confdefs.h <<\EOF
12490 #define HAVE_FSEEKO 1
12491 EOF
12492
12493 fi
12494
12495         # Normally we would collect these definitions in the config.h,
12496         # but (like _XOPEN_SOURCE), some environments rely on having these
12497         # defined before any of the system headers are included.  Another
12498         # case comes up with C++, e.g., on AIX the compiler compiles the
12499         # header files by themselves before looking at the body files it is
12500         # told to compile.  For ncurses, those header files do not include
12501         # the config.h
12502         if test "$ac_cv_sys_large_files" != no
12503         then
12504
12505         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12506         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12507
12508         fi
12509         if test "$ac_cv_sys_largefile_source" != no
12510         then
12511
12512         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12513         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12514
12515         fi
12516         if test "$ac_cv_sys_file_offset_bits" != no
12517         then
12518
12519         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12520         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12521
12522         fi
12523
12524         echo "$as_me:12524: checking whether to use struct dirent64" >&5
12525 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12526 if test "${cf_cv_struct_dirent64+set}" = set; then
12527   echo $ECHO_N "(cached) $ECHO_C" >&6
12528 else
12529
12530                 cat >conftest.$ac_ext <<_ACEOF
12531 #line 12531 "configure"
12532 #include "confdefs.h"
12533
12534 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12535 #include <sys/types.h>
12536 #include <dirent.h>
12537
12538 int
12539 main (void)
12540 {
12541
12542                 /* if transitional largefile support is setup, this is true */
12543                 extern struct dirent64 * readdir(DIR *);
12544                 struct dirent64 *x = readdir((DIR *)0);
12545                 struct dirent *y = readdir((DIR *)0);
12546                 int z = x - y;
12547
12548   ;
12549   return 0;
12550 }
12551 _ACEOF
12552 rm -f conftest.$ac_objext
12553 if { (eval echo "$as_me:12553: \"$ac_compile\"") >&5
12554   (eval $ac_compile) 2>&5
12555   ac_status=$?
12556   echo "$as_me:12556: \$? = $ac_status" >&5
12557   (exit $ac_status); } &&
12558          { ac_try='test -s conftest.$ac_objext'
12559   { (eval echo "$as_me:12559: \"$ac_try\"") >&5
12560   (eval $ac_try) 2>&5
12561   ac_status=$?
12562   echo "$as_me:12562: \$? = $ac_status" >&5
12563   (exit $ac_status); }; }; then
12564   cf_cv_struct_dirent64=yes
12565 else
12566   echo "$as_me: failed program was:" >&5
12567 cat conftest.$ac_ext >&5
12568 cf_cv_struct_dirent64=no
12569 fi
12570 rm -f conftest.$ac_objext conftest.$ac_ext
12571
12572 fi
12573 echo "$as_me:12573: result: $cf_cv_struct_dirent64" >&5
12574 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12575         test "$cf_cv_struct_dirent64" = yes &&
12576 cat >>confdefs.h <<\EOF
12577 #define HAVE_STRUCT_DIRENT64 1
12578 EOF
12579
12580         fi
12581
12582 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
12583 echo "$as_me:12583: checking if you want tparm not to use X/Open fixed-parameter list" >&5
12584 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
12585
12586 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
12587 if test "${enable_tparm_varargs+set}" = set; then
12588   enableval="$enable_tparm_varargs"
12589   with_tparm_varargs=$enableval
12590 else
12591   with_tparm_varargs=yes
12592 fi;
12593 echo "$as_me:12593: result: $with_tparm_varargs" >&5
12594 echo "${ECHO_T}$with_tparm_varargs" >&6
12595 NCURSES_TPARM_VARARGS=0
12596 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
12597
12598 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
12599 if test "$with_ticlib" != no ; then
12600 echo "$as_me:12600: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
12601 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
12602
12603 # Check whether --enable-tic-depends or --disable-tic-depends was given.
12604 if test "${enable_tic_depends+set}" = set; then
12605   enableval="$enable_tic_depends"
12606   with_tic_depends=$enableval
12607 else
12608   with_tic_depends=yes
12609 fi;
12610 echo "$as_me:12610: result: $with_tic_depends" >&5
12611 echo "${ECHO_T}$with_tic_depends" >&6
12612 else
12613         with_tic_depends=no
12614 fi
12615
12616 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
12617 echo "$as_me:12617: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
12618 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
12619
12620 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
12621 if test "${enable_wattr_macros+set}" = set; then
12622   enableval="$enable_wattr_macros"
12623   with_wattr_macros=$enableval
12624 else
12625   with_wattr_macros=yes
12626 fi;
12627 if [ "x$with_wattr_macros" != xyes ]; then
12628         NCURSES_WATTR_MACROS=0
12629         echo "$as_me:12629: result: yes" >&5
12630 echo "${ECHO_T}yes" >&6
12631 else
12632         NCURSES_WATTR_MACROS=1
12633         echo "$as_me:12633: result: no" >&5
12634 echo "${ECHO_T}no" >&6
12635 fi
12636
12637 echo "$as_me:12637: checking for X11 rgb file" >&5
12638 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
12639
12640 # Check whether --with-x11-rgb or --without-x11-rgb was given.
12641 if test "${with_x11_rgb+set}" = set; then
12642   withval="$with_x11_rgb"
12643   RGB_PATH=$withval
12644 else
12645   RGB_PATH=auto
12646 fi;
12647
12648 if test "x$RGB_PATH" = xauto
12649 then
12650         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
12651         for cf_path in \
12652                 /opt/local/share/X11/rgb.txt \
12653                 /opt/X11/share/X11/rgb.txt \
12654                 /usr/share/X11/rgb.txt \
12655                 /usr/X11/share/X11/rgb.txt \
12656                 /usr/X11/lib/X11/rgb.txt \
12657                 /usr/lib/X11/rgb.txt \
12658                 /etc/X11/rgb.txt \
12659                 /usr/pkg/lib/X11/rgb.txt \
12660                 /usr/X11R7/lib/X11/rgb.txt \
12661                 /usr/X11R6/lib/X11/rgb.txt \
12662                 /usr/X11R5/lib/X11/rgb.txt \
12663                 /usr/X11R4/lib/X11/rgb.txt \
12664                 /usr/local/lib/X11/rgb.txt \
12665                 /usr/local/share/X11/rgb.txt \
12666                 /usr/lib64/X11/rgb.txt
12667         do
12668                 if test -f "$cf_path" ; then
12669                         RGB_PATH="$cf_path"
12670                         break
12671                 fi
12672         done
12673 else
12674         cf_path=$RGB_PATH
12675
12676 if test "x$prefix" != xNONE; then
12677         cf_path_syntax="$prefix"
12678 else
12679         cf_path_syntax="$ac_default_prefix"
12680 fi
12681
12682 case ".$cf_path" in
12683 (.\$\(*\)*|.\'*\'*)
12684         ;;
12685 (..|./*|.\\*)
12686         ;;
12687 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
12688         ;;
12689 (.\${*prefix}*|.\${*dir}*)
12690         eval cf_path="$cf_path"
12691         case ".$cf_path" in
12692         (.NONE/*)
12693                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12694                 ;;
12695         esac
12696         ;;
12697 (.no|.NONE/*)
12698         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12699         ;;
12700 (*)
12701         { { echo "$as_me:12701: error: expected a pathname, not \"$cf_path\"" >&5
12702 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
12703    { (exit 1); exit 1; }; }
12704         ;;
12705 esac
12706
12707 fi
12708
12709 echo "$as_me:12709: result: $RGB_PATH" >&5
12710 echo "${ECHO_T}$RGB_PATH" >&6
12711
12712 cat >>confdefs.h <<EOF
12713 #define RGB_PATH "$cf_path"
12714 EOF
12715
12716 no_x11_rgb=
12717 if test "$RGB_PATH" = no
12718 then
12719         no_x11_rgb="#"
12720 fi
12721
12722 ###   use option --with-bool to override bool's type
12723 echo "$as_me:12723: checking for type of bool" >&5
12724 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
12725
12726 # Check whether --with-bool or --without-bool was given.
12727 if test "${with_bool+set}" = set; then
12728   withval="$with_bool"
12729   NCURSES_BOOL="$withval"
12730 else
12731   NCURSES_BOOL=auto
12732 fi;
12733 echo "$as_me:12733: result: $NCURSES_BOOL" >&5
12734 echo "${ECHO_T}$NCURSES_BOOL" >&6
12735
12736 echo "$as_me:12736: checking for alternate terminal capabilities file" >&5
12737 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
12738
12739 # Check whether --with-caps or --without-caps was given.
12740 if test "${with_caps+set}" = set; then
12741   withval="$with_caps"
12742   TERMINFO_CAPS=Caps.$withval
12743 else
12744   TERMINFO_CAPS=Caps
12745 fi;
12746 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
12747 echo "$as_me:12747: result: $TERMINFO_CAPS" >&5
12748 echo "${ECHO_T}$TERMINFO_CAPS" >&6
12749
12750 ###   use option --with-chtype to override chtype's type
12751 echo "$as_me:12751: checking for type of chtype" >&5
12752 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12753
12754 # Check whether --with-chtype or --without-chtype was given.
12755 if test "${with_chtype+set}" = set; then
12756   withval="$with_chtype"
12757   NCURSES_CHTYPE="$withval"
12758 else
12759   NCURSES_CHTYPE=$cf_dft_chtype
12760 fi;
12761 echo "$as_me:12761: result: $NCURSES_CHTYPE" >&5
12762 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
12763
12764 ###   use option --with-ospeed to override ospeed's type
12765 echo "$as_me:12765: checking for type of ospeed" >&5
12766 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
12767
12768 # Check whether --with-ospeed or --without-ospeed was given.
12769 if test "${with_ospeed+set}" = set; then
12770   withval="$with_ospeed"
12771   NCURSES_OSPEED="$withval"
12772 else
12773   NCURSES_OSPEED=short
12774 fi;
12775 echo "$as_me:12775: result: $NCURSES_OSPEED" >&5
12776 echo "${ECHO_T}$NCURSES_OSPEED" >&6
12777
12778 ###   use option --with-mmask-t to override mmask_t's type
12779 echo "$as_me:12779: checking for type of mmask_t" >&5
12780 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
12781
12782 # Check whether --with-mmask-t or --without-mmask-t was given.
12783 if test "${with_mmask_t+set}" = set; then
12784   withval="$with_mmask_t"
12785   NCURSES_MMASK_T="$withval"
12786 else
12787   NCURSES_MMASK_T=$cf_dft_mmask_t
12788 fi;
12789 echo "$as_me:12789: result: $NCURSES_MMASK_T" >&5
12790 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
12791
12792 ###   use option --with-ccharw-max to override CCHARW_MAX size
12793 echo "$as_me:12793: checking for size CCHARW_MAX" >&5
12794 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
12795
12796 # Check whether --with-ccharw-max or --without-ccharw-max was given.
12797 if test "${with_ccharw_max+set}" = set; then
12798   withval="$with_ccharw_max"
12799   NCURSES_CCHARW_MAX="$withval"
12800 else
12801   NCURSES_CCHARW_MAX=5
12802 fi;
12803 echo "$as_me:12803: result: $NCURSES_CCHARW_MAX" >&5
12804 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
12805
12806 echo "$as_me:12806: checking for ANSI C header files" >&5
12807 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12808 if test "${ac_cv_header_stdc+set}" = set; then
12809   echo $ECHO_N "(cached) $ECHO_C" >&6
12810 else
12811   cat >conftest.$ac_ext <<_ACEOF
12812 #line 12812 "configure"
12813 #include "confdefs.h"
12814 #include <stdlib.h>
12815 #include <stdarg.h>
12816 #include <string.h>
12817 #include <float.h>
12818
12819 _ACEOF
12820 if { (eval echo "$as_me:12820: \"$ac_cpp conftest.$ac_ext\"") >&5
12821   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12822   ac_status=$?
12823   egrep -v '^ *\+' conftest.er1 >conftest.err
12824   rm -f conftest.er1
12825   cat conftest.err >&5
12826   echo "$as_me:12826: \$? = $ac_status" >&5
12827   (exit $ac_status); } >/dev/null; then
12828   if test -s conftest.err; then
12829     ac_cpp_err=$ac_c_preproc_warn_flag
12830   else
12831     ac_cpp_err=
12832   fi
12833 else
12834   ac_cpp_err=yes
12835 fi
12836 if test -z "$ac_cpp_err"; then
12837   ac_cv_header_stdc=yes
12838 else
12839   echo "$as_me: failed program was:" >&5
12840   cat conftest.$ac_ext >&5
12841   ac_cv_header_stdc=no
12842 fi
12843 rm -f conftest.err conftest.$ac_ext
12844
12845 if test $ac_cv_header_stdc = yes; then
12846   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12847   cat >conftest.$ac_ext <<_ACEOF
12848 #line 12848 "configure"
12849 #include "confdefs.h"
12850 #include <string.h>
12851
12852 _ACEOF
12853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12854   egrep "memchr" >/dev/null 2>&1; then
12855   :
12856 else
12857   ac_cv_header_stdc=no
12858 fi
12859 rm -rf conftest*
12860
12861 fi
12862
12863 if test $ac_cv_header_stdc = yes; then
12864   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12865   cat >conftest.$ac_ext <<_ACEOF
12866 #line 12866 "configure"
12867 #include "confdefs.h"
12868 #include <stdlib.h>
12869
12870 _ACEOF
12871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12872   egrep "free" >/dev/null 2>&1; then
12873   :
12874 else
12875   ac_cv_header_stdc=no
12876 fi
12877 rm -rf conftest*
12878
12879 fi
12880
12881 if test $ac_cv_header_stdc = yes; then
12882   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12883   if test "$cross_compiling" = yes; then
12884   :
12885 else
12886   cat >conftest.$ac_ext <<_ACEOF
12887 #line 12887 "configure"
12888 #include "confdefs.h"
12889 #include <ctype.h>
12890 #if ((' ' & 0x0FF) == 0x020)
12891 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12892 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12893 #else
12894 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12895                      || ('j' <= (c) && (c) <= 'r') \
12896                      || ('s' <= (c) && (c) <= 'z'))
12897 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12898 #endif
12899
12900 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12901 int
12902 main (void)
12903 {
12904   int i;
12905   for (i = 0; i < 256; i++)
12906     if (XOR (islower (i), ISLOWER (i))
12907         || toupper (i) != TOUPPER (i))
12908       $ac_main_return(2);
12909   $ac_main_return (0);
12910 }
12911 _ACEOF
12912 rm -f conftest$ac_exeext
12913 if { (eval echo "$as_me:12913: \"$ac_link\"") >&5
12914   (eval $ac_link) 2>&5
12915   ac_status=$?
12916   echo "$as_me:12916: \$? = $ac_status" >&5
12917   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12918   { (eval echo "$as_me:12918: \"$ac_try\"") >&5
12919   (eval $ac_try) 2>&5
12920   ac_status=$?
12921   echo "$as_me:12921: \$? = $ac_status" >&5
12922   (exit $ac_status); }; }; then
12923   :
12924 else
12925   echo "$as_me: program exited with status $ac_status" >&5
12926 echo "$as_me: failed program was:" >&5
12927 cat conftest.$ac_ext >&5
12928 ac_cv_header_stdc=no
12929 fi
12930 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12931 fi
12932 fi
12933 fi
12934 echo "$as_me:12934: result: $ac_cv_header_stdc" >&5
12935 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12936 if test $ac_cv_header_stdc = yes; then
12937
12938 cat >>confdefs.h <<\EOF
12939 #define STDC_HEADERS 1
12940 EOF
12941
12942 fi
12943
12944 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12945
12946 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12947                   inttypes.h stdint.h unistd.h
12948 do
12949 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12950 echo "$as_me:12950: checking for $ac_header" >&5
12951 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12952 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12953   echo $ECHO_N "(cached) $ECHO_C" >&6
12954 else
12955   cat >conftest.$ac_ext <<_ACEOF
12956 #line 12956 "configure"
12957 #include "confdefs.h"
12958 $ac_includes_default
12959 #include <$ac_header>
12960 _ACEOF
12961 rm -f conftest.$ac_objext
12962 if { (eval echo "$as_me:12962: \"$ac_compile\"") >&5
12963   (eval $ac_compile) 2>&5
12964   ac_status=$?
12965   echo "$as_me:12965: \$? = $ac_status" >&5
12966   (exit $ac_status); } &&
12967          { ac_try='test -s conftest.$ac_objext'
12968   { (eval echo "$as_me:12968: \"$ac_try\"") >&5
12969   (eval $ac_try) 2>&5
12970   ac_status=$?
12971   echo "$as_me:12971: \$? = $ac_status" >&5
12972   (exit $ac_status); }; }; then
12973   eval "$as_ac_Header=yes"
12974 else
12975   echo "$as_me: failed program was:" >&5
12976 cat conftest.$ac_ext >&5
12977 eval "$as_ac_Header=no"
12978 fi
12979 rm -f conftest.$ac_objext conftest.$ac_ext
12980 fi
12981 echo "$as_me:12981: result: `eval echo '${'$as_ac_Header'}'`" >&5
12982 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12983 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12984   cat >>confdefs.h <<EOF
12985 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12986 EOF
12987
12988 fi
12989 done
12990
12991 echo "$as_me:12991: checking for signed char" >&5
12992 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12993 if test "${ac_cv_type_signed_char+set}" = set; then
12994   echo $ECHO_N "(cached) $ECHO_C" >&6
12995 else
12996   cat >conftest.$ac_ext <<_ACEOF
12997 #line 12997 "configure"
12998 #include "confdefs.h"
12999 $ac_includes_default
13000 int
13001 main (void)
13002 {
13003 if ((signed char *) 0)
13004   return 0;
13005 if (sizeof (signed char))
13006   return 0;
13007   ;
13008   return 0;
13009 }
13010 _ACEOF
13011 rm -f conftest.$ac_objext
13012 if { (eval echo "$as_me:13012: \"$ac_compile\"") >&5
13013   (eval $ac_compile) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit $ac_status); } &&
13017          { ac_try='test -s conftest.$ac_objext'
13018   { (eval echo "$as_me:13018: \"$ac_try\"") >&5
13019   (eval $ac_try) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit $ac_status); }; }; then
13023   ac_cv_type_signed_char=yes
13024 else
13025   echo "$as_me: failed program was:" >&5
13026 cat conftest.$ac_ext >&5
13027 ac_cv_type_signed_char=no
13028 fi
13029 rm -f conftest.$ac_objext conftest.$ac_ext
13030 fi
13031 echo "$as_me:13031: result: $ac_cv_type_signed_char" >&5
13032 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13033
13034 echo "$as_me:13034: checking size of signed char" >&5
13035 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13036 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13037   echo $ECHO_N "(cached) $ECHO_C" >&6
13038 else
13039   if test "$ac_cv_type_signed_char" = yes; then
13040   if test "$cross_compiling" = yes; then
13041   # Depending upon the size, compute the lo and hi bounds.
13042 cat >conftest.$ac_ext <<_ACEOF
13043 #line 13043 "configure"
13044 #include "confdefs.h"
13045 $ac_includes_default
13046 int
13047 main (void)
13048 {
13049 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13050   ;
13051   return 0;
13052 }
13053 _ACEOF
13054 rm -f conftest.$ac_objext
13055 if { (eval echo "$as_me:13055: \"$ac_compile\"") >&5
13056   (eval $ac_compile) 2>&5
13057   ac_status=$?
13058   echo "$as_me:13058: \$? = $ac_status" >&5
13059   (exit $ac_status); } &&
13060          { ac_try='test -s conftest.$ac_objext'
13061   { (eval echo "$as_me:13061: \"$ac_try\"") >&5
13062   (eval $ac_try) 2>&5
13063   ac_status=$?
13064   echo "$as_me:13064: \$? = $ac_status" >&5
13065   (exit $ac_status); }; }; then
13066   ac_lo=0 ac_mid=0
13067   while :; do
13068     cat >conftest.$ac_ext <<_ACEOF
13069 #line 13069 "configure"
13070 #include "confdefs.h"
13071 $ac_includes_default
13072 int
13073 main (void)
13074 {
13075 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13076   ;
13077   return 0;
13078 }
13079 _ACEOF
13080 rm -f conftest.$ac_objext
13081 if { (eval echo "$as_me:13081: \"$ac_compile\"") >&5
13082   (eval $ac_compile) 2>&5
13083   ac_status=$?
13084   echo "$as_me:13084: \$? = $ac_status" >&5
13085   (exit $ac_status); } &&
13086          { ac_try='test -s conftest.$ac_objext'
13087   { (eval echo "$as_me:13087: \"$ac_try\"") >&5
13088   (eval $ac_try) 2>&5
13089   ac_status=$?
13090   echo "$as_me:13090: \$? = $ac_status" >&5
13091   (exit $ac_status); }; }; then
13092   ac_hi=$ac_mid; break
13093 else
13094   echo "$as_me: failed program was:" >&5
13095 cat conftest.$ac_ext >&5
13096 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13097 fi
13098 rm -f conftest.$ac_objext conftest.$ac_ext
13099   done
13100 else
13101   echo "$as_me: failed program was:" >&5
13102 cat conftest.$ac_ext >&5
13103 ac_hi=-1 ac_mid=-1
13104   while :; do
13105     cat >conftest.$ac_ext <<_ACEOF
13106 #line 13106 "configure"
13107 #include "confdefs.h"
13108 $ac_includes_default
13109 int
13110 main (void)
13111 {
13112 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13113   ;
13114   return 0;
13115 }
13116 _ACEOF
13117 rm -f conftest.$ac_objext
13118 if { (eval echo "$as_me:13118: \"$ac_compile\"") >&5
13119   (eval $ac_compile) 2>&5
13120   ac_status=$?
13121   echo "$as_me:13121: \$? = $ac_status" >&5
13122   (exit $ac_status); } &&
13123          { ac_try='test -s conftest.$ac_objext'
13124   { (eval echo "$as_me:13124: \"$ac_try\"") >&5
13125   (eval $ac_try) 2>&5
13126   ac_status=$?
13127   echo "$as_me:13127: \$? = $ac_status" >&5
13128   (exit $ac_status); }; }; then
13129   ac_lo=$ac_mid; break
13130 else
13131   echo "$as_me: failed program was:" >&5
13132 cat conftest.$ac_ext >&5
13133 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13134 fi
13135 rm -f conftest.$ac_objext conftest.$ac_ext
13136   done
13137 fi
13138 rm -f conftest.$ac_objext conftest.$ac_ext
13139 # Binary search between lo and hi bounds.
13140 while test "x$ac_lo" != "x$ac_hi"; do
13141   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13142   cat >conftest.$ac_ext <<_ACEOF
13143 #line 13143 "configure"
13144 #include "confdefs.h"
13145 $ac_includes_default
13146 int
13147 main (void)
13148 {
13149 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13150   ;
13151   return 0;
13152 }
13153 _ACEOF
13154 rm -f conftest.$ac_objext
13155 if { (eval echo "$as_me:13155: \"$ac_compile\"") >&5
13156   (eval $ac_compile) 2>&5
13157   ac_status=$?
13158   echo "$as_me:13158: \$? = $ac_status" >&5
13159   (exit $ac_status); } &&
13160          { ac_try='test -s conftest.$ac_objext'
13161   { (eval echo "$as_me:13161: \"$ac_try\"") >&5
13162   (eval $ac_try) 2>&5
13163   ac_status=$?
13164   echo "$as_me:13164: \$? = $ac_status" >&5
13165   (exit $ac_status); }; }; then
13166   ac_hi=$ac_mid
13167 else
13168   echo "$as_me: failed program was:" >&5
13169 cat conftest.$ac_ext >&5
13170 ac_lo=`expr $ac_mid + 1`
13171 fi
13172 rm -f conftest.$ac_objext conftest.$ac_ext
13173 done
13174 ac_cv_sizeof_signed_char=$ac_lo
13175 else
13176   if test "$cross_compiling" = yes; then
13177   { { echo "$as_me:13177: error: cannot run test program while cross compiling" >&5
13178 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13179    { (exit 1); exit 1; }; }
13180 else
13181   cat >conftest.$ac_ext <<_ACEOF
13182 #line 13182 "configure"
13183 #include "confdefs.h"
13184 $ac_includes_default
13185 int
13186 main (void)
13187 {
13188 FILE *f = fopen ("conftest.val", "w");
13189 if (!f)
13190   $ac_main_return (1);
13191 fprintf (f, "%d", (sizeof (signed char)));
13192 fclose (f);
13193   ;
13194   return 0;
13195 }
13196 _ACEOF
13197 rm -f conftest$ac_exeext
13198 if { (eval echo "$as_me:13198: \"$ac_link\"") >&5
13199   (eval $ac_link) 2>&5
13200   ac_status=$?
13201   echo "$as_me:13201: \$? = $ac_status" >&5
13202   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13203   { (eval echo "$as_me:13203: \"$ac_try\"") >&5
13204   (eval $ac_try) 2>&5
13205   ac_status=$?
13206   echo "$as_me:13206: \$? = $ac_status" >&5
13207   (exit $ac_status); }; }; then
13208   ac_cv_sizeof_signed_char=`cat conftest.val`
13209 else
13210   echo "$as_me: program exited with status $ac_status" >&5
13211 echo "$as_me: failed program was:" >&5
13212 cat conftest.$ac_ext >&5
13213 fi
13214 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13215 fi
13216 fi
13217 rm -f conftest.val
13218 else
13219   ac_cv_sizeof_signed_char=0
13220 fi
13221 fi
13222 echo "$as_me:13222: result: $ac_cv_sizeof_signed_char" >&5
13223 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13224 cat >>confdefs.h <<EOF
13225 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13226 EOF
13227
13228 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13229         NCURSES_SBOOL="signed char"
13230 else
13231         NCURSES_SBOOL="char"
13232 fi
13233 echo "$as_me:13233: checking if you want to use signed Boolean array in term.h" >&5
13234 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13235
13236 # Check whether --enable-signed-char or --disable-signed-char was given.
13237 if test "${enable_signed_char+set}" = set; then
13238   enableval="$enable_signed_char"
13239   with_signed_char=$enableval
13240 else
13241   with_signed_char=no
13242 fi;
13243 echo "$as_me:13243: result: $with_signed_char" >&5
13244 echo "${ECHO_T}$with_signed_char" >&6
13245 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13246
13247 ###   use option --with-tparm-arg to override tparm's argument type
13248 echo "$as_me:13248: checking for type of tparm args" >&5
13249 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13250
13251 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13252 if test "${with_tparm_arg+set}" = set; then
13253   withval="$with_tparm_arg"
13254   NCURSES_TPARM_ARG="$withval"
13255 else
13256   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13257 fi;
13258 echo "$as_me:13258: result: $NCURSES_TPARM_ARG" >&5
13259 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13260
13261 ### Enable compiling-in rcs id's
13262 echo "$as_me:13262: checking if RCS identifiers should be compiled-in" >&5
13263 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13264
13265 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13266 if test "${with_rcs_ids+set}" = set; then
13267   withval="$with_rcs_ids"
13268   with_rcs_ids=$withval
13269 else
13270   with_rcs_ids=no
13271 fi;
13272 echo "$as_me:13272: result: $with_rcs_ids" >&5
13273 echo "${ECHO_T}$with_rcs_ids" >&6
13274 test "x$with_rcs_ids" = xyes &&
13275 cat >>confdefs.h <<\EOF
13276 #define USE_RCS_IDS 1
13277 EOF
13278
13279 ###############################################################################
13280
13281 echo "$as_me:13281: checking format of man-pages" >&5
13282 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13283
13284 # Check whether --with-manpage-format or --without-manpage-format was given.
13285 if test "${with_manpage_format+set}" = set; then
13286   withval="$with_manpage_format"
13287   MANPAGE_FORMAT=$withval
13288 else
13289   MANPAGE_FORMAT=unknown
13290 fi;
13291
13292 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13293 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13294
13295 cf_unknown=
13296
13297 case $MANPAGE_FORMAT in
13298 (unknown)
13299         if test -z "$MANPATH" ; then
13300                 MANPATH="/usr/man:/usr/share/man"
13301         fi
13302
13303         # look for the 'date' man-page (it's most likely to be installed!)
13304         MANPAGE_FORMAT=
13305         cf_preform=no
13306         cf_catonly=yes
13307         cf_example=date
13308
13309         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13310         for cf_dir in $MANPATH; do
13311                 test -z "$cf_dir" && cf_dir=/usr/man
13312                 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
13313                 do
13314                         cf_test=`echo $cf_name | sed -e 's/*//'`
13315                         if test "x$cf_test" = "x$cf_name" ; then
13316
13317                                 case "$cf_name" in
13318                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13319                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13320                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13321                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13322                                 esac
13323
13324                                 case "$cf_name" in
13325                                 ($cf_dir/man*)
13326                                         cf_catonly=no
13327                                         ;;
13328                                 ($cf_dir/cat*)
13329                                         cf_preform=yes
13330                                         ;;
13331                                 esac
13332                                 break
13333                         fi
13334
13335                         # if we found a match in either man* or cat*, stop looking
13336                         if test -n "$MANPAGE_FORMAT" ; then
13337                                 cf_found=no
13338                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13339                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13340                                 case "$cf_name" in
13341                                 ($cf_dir/cat*)
13342                                         cf_found=yes
13343                                         ;;
13344                                 esac
13345                                 test $cf_found=yes && break
13346                         fi
13347                 done
13348                 # only check the first directory in $MANPATH where we find manpages
13349                 if test -n "$MANPAGE_FORMAT" ; then
13350                         break
13351                 fi
13352         done
13353         # if we did not find the example, just assume it is normal
13354         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13355         IFS="$ac_save_ifs"
13356         ;;
13357 (*)
13358         for cf_option in $MANPAGE_FORMAT; do
13359         case $cf_option in
13360         (gzip|compress|BSDI|normal|formatted|catonly)
13361                 ;;
13362         (*)
13363                 cf_unknown="$cf_unknown $cf_option"
13364                 ;;
13365         esac
13366         done
13367         ;;
13368 esac
13369
13370 echo "$as_me:13370: result: $MANPAGE_FORMAT" >&5
13371 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13372 if test -n "$cf_unknown" ; then
13373         { echo "$as_me:13373: WARNING: Unexpected manpage-format $cf_unknown" >&5
13374 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13375 fi
13376
13377 echo "$as_me:13377: checking for manpage renaming" >&5
13378 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13379
13380 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13381 if test "${with_manpage_renames+set}" = set; then
13382   withval="$with_manpage_renames"
13383   MANPAGE_RENAMES=$withval
13384 else
13385   MANPAGE_RENAMES=yes
13386 fi;
13387
13388 case ".$MANPAGE_RENAMES" in
13389 (.no)
13390         ;;
13391 (.|.yes)
13392         # Debian 'man' program?
13393         if test -f /etc/debian_version ; then
13394                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13395         else
13396                 MANPAGE_RENAMES=no
13397         fi
13398         ;;
13399 esac
13400
13401 if test "$MANPAGE_RENAMES" != no ; then
13402         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13403                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13404         elif test ! -f $MANPAGE_RENAMES ; then
13405                 { { echo "$as_me:13405: error: not a filename: $MANPAGE_RENAMES" >&5
13406 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13407    { (exit 1); exit 1; }; }
13408         fi
13409
13410         test ! -d man && mkdir man
13411
13412         # Construct a sed-script to perform renaming within man-pages
13413         if test -n "$MANPAGE_RENAMES" ; then
13414                 test ! -d man && mkdir man
13415                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13416         fi
13417 fi
13418
13419 echo "$as_me:13419: result: $MANPAGE_RENAMES" >&5
13420 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13421
13422 echo "$as_me:13422: checking if manpage aliases will be installed" >&5
13423 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13424
13425 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13426 if test "${with_manpage_aliases+set}" = set; then
13427   withval="$with_manpage_aliases"
13428   MANPAGE_ALIASES=$withval
13429 else
13430   MANPAGE_ALIASES=yes
13431 fi;
13432
13433 echo "$as_me:13433: result: $MANPAGE_ALIASES" >&5
13434 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13435
13436 case "x$LN_S" in
13437 (xln*)
13438         cf_use_symlinks=yes
13439         ;;
13440 (*)
13441         cf_use_symlinks=no
13442         ;;
13443 esac
13444
13445 MANPAGE_SYMLINKS=no
13446 if test "$MANPAGE_ALIASES" = yes ; then
13447 echo "$as_me:13447: checking if manpage symlinks should be used" >&5
13448 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13449
13450 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13451 if test "${with_manpage_symlinks+set}" = set; then
13452   withval="$with_manpage_symlinks"
13453   MANPAGE_SYMLINKS=$withval
13454 else
13455   MANPAGE_SYMLINKS=$cf_use_symlinks
13456 fi;
13457
13458 if test "$$cf_use_symlinks" = no; then
13459 if test "$MANPAGE_SYMLINKS" = yes ; then
13460         { echo "$as_me:13460: WARNING: cannot make symlinks" >&5
13461 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13462         MANPAGE_SYMLINKS=no
13463 fi
13464 fi
13465
13466 echo "$as_me:13466: result: $MANPAGE_SYMLINKS" >&5
13467 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13468 fi
13469
13470 echo "$as_me:13470: checking for manpage tbl" >&5
13471 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13472
13473 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13474 if test "${with_manpage_tbl+set}" = set; then
13475   withval="$with_manpage_tbl"
13476   MANPAGE_TBL=$withval
13477 else
13478   MANPAGE_TBL=no
13479 fi;
13480
13481 echo "$as_me:13481: result: $MANPAGE_TBL" >&5
13482 echo "${ECHO_T}$MANPAGE_TBL" >&6
13483
13484 if test "$prefix" = "NONE" ; then
13485         cf_prefix="$ac_default_prefix"
13486 else
13487         cf_prefix="$prefix"
13488 fi
13489
13490 case "$MANPAGE_FORMAT" in
13491 (*catonly*)
13492         cf_format=yes
13493         cf_inboth=no
13494         ;;
13495 (*formatted*)
13496         cf_format=yes
13497         cf_inboth=yes
13498         ;;
13499 (*)
13500         cf_format=no
13501         cf_inboth=no
13502         ;;
13503 esac
13504
13505 test ! -d man && mkdir man
13506
13507 cf_so_strip=
13508 cf_compress=
13509 case "$MANPAGE_FORMAT" in
13510 (*compress*)
13511         cf_so_strip="Z"
13512         cf_compress=compress
13513         ;;
13514 (*gzip*)
13515         cf_so_strip="gz"
13516         cf_compress=gzip
13517         ;;
13518 esac
13519
13520 cf_edit_man=./edit_man.sh
13521 cf_man_alias=`pwd`/man_alias.sed
13522
13523 cat >$cf_edit_man <<CF_EOF
13524 #! $SHELL
13525 # this script is generated by the configure-script CF_MAN_PAGES macro.
13526
13527 prefix="$cf_prefix"
13528 datarootdir="$datarootdir"
13529 datadir="$datadir"
13530
13531 NCURSES_MAJOR="$NCURSES_MAJOR"
13532 NCURSES_MINOR="$NCURSES_MINOR"
13533 NCURSES_PATCH="$NCURSES_PATCH"
13534
13535 NCURSES_OSPEED="$NCURSES_OSPEED"
13536 TERMINFO="$TERMINFO"
13537
13538 INSTALL="$INSTALL"
13539 INSTALL_DATA="$INSTALL_DATA"
13540
13541 transform="$program_transform_name"
13542
13543 TMP=\${TMPDIR:=/tmp}/man\$\$
13544 trap "rm -f \$TMP" 0 1 2 3 15
13545
13546 form=\$1
13547 shift || exit 1
13548
13549 verb=\$1
13550 shift || exit 1
13551
13552 mandir=\$1
13553 shift || exit 1
13554
13555 srcdir=\$1
13556 top_srcdir=\$srcdir/..
13557 shift || exit 1
13558
13559 if test "\$form" = normal ; then
13560         if test "$cf_format" = yes ; then
13561         if test "$cf_inboth" = no ; then
13562                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13563                 exit $?
13564         fi
13565         fi
13566         cf_subdir=\$mandir/man
13567         cf_tables=$MANPAGE_TBL
13568 else
13569         cf_subdir=\$mandir/cat
13570         cf_tables=yes
13571 fi
13572
13573 # process the list of source-files
13574 for i in \$* ; do
13575 case \$i in
13576 (*.orig|*.rej) ;;
13577 (*.[0-9]*)
13578         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
13579         if test \$verb = installing ; then
13580         if test ! -d \$cf_subdir\${section} ; then
13581                 mkdir -p \$cf_subdir\$section
13582         fi
13583         fi
13584
13585         # replace variables in man page
13586         if test ! -f $cf_man_alias ; then
13587 cat >>$cf_man_alias <<-CF_EOF2
13588                 s,@DATADIR@,\$datadir,g
13589                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
13590                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
13591                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
13592                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
13593                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
13594                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
13595 CF_EOF
13596
13597         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
13598         do
13599                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13600                 cf_name=`echo $cf_name|sed "$program_transform_name"`
13601 cat >>$cf_edit_man <<-CF_EOF
13602                 s,@$cf_NAME@,$cf_name,g
13603 CF_EOF
13604         done
13605
13606 cat >>$cf_edit_man <<CF_EOF
13607 CF_EOF2
13608                 echo "...made $cf_man_alias"
13609         fi
13610
13611         aliases=
13612         cf_source=\`basename \$i\`
13613         inalias=\$cf_source
13614         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
13615         if test ! -f \$inalias ; then
13616                 echo .. skipped \$cf_source
13617                 continue
13618         fi
13619 CF_EOF
13620
13621 if test "$MANPAGE_ALIASES" != no ; then
13622 cat >>$cf_edit_man <<CF_EOF
13623         nCurses=ignore.3x
13624         test $with_curses_h = yes && nCurses=ncurses.3x
13625         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
13626 CF_EOF
13627 fi
13628
13629 if test "$MANPAGE_RENAMES" = no ; then
13630 cat >>$cf_edit_man <<CF_EOF
13631         # perform program transformations for section 1 man pages
13632         if test \$section = 1 ; then
13633                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
13634         else
13635                 cf_target=\$cf_subdir\${section}/\$cf_source
13636         fi
13637 CF_EOF
13638 else
13639 cat >>$cf_edit_man <<CF_EOF
13640         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
13641         if test -z "\$cf_target" ; then
13642                 echo '? missing rename for '\$cf_source
13643                 cf_target="\$cf_source"
13644         fi
13645         cf_target="\$cf_subdir\${section}/\${cf_target}"
13646
13647 CF_EOF
13648 fi
13649
13650 cat >>$cf_edit_man <<CF_EOF
13651         sed     -f $cf_man_alias \\
13652 CF_EOF
13653
13654 if test -f $MANPAGE_RENAMES ; then
13655 cat >>$cf_edit_man <<CF_EOF
13656                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
13657 CF_EOF
13658 else
13659 cat >>$cf_edit_man <<CF_EOF
13660                 < \$i >\$TMP
13661 CF_EOF
13662 fi
13663
13664 cat >>$cf_edit_man <<CF_EOF
13665 if test \$cf_tables = yes ; then
13666         tbl \$TMP >\$TMP.out
13667         mv \$TMP.out \$TMP
13668 fi
13669 CF_EOF
13670
13671 if test $with_overwrite != yes ; then
13672 cat >>$cf_edit_man <<CF_EOF
13673         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
13674         mv \$TMP.out \$TMP
13675 CF_EOF
13676 fi
13677
13678 if test $with_curses_h != yes ; then
13679 cat >>$cf_edit_man <<CF_EOF
13680         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
13681         mv \$TMP.out \$TMP
13682 CF_EOF
13683 fi
13684
13685 cat >>$cf_edit_man <<CF_EOF
13686         if test \$form = format ; then
13687                 nroff -man \$TMP >\$TMP.out
13688                 mv \$TMP.out \$TMP
13689         fi
13690 CF_EOF
13691
13692 if test -n "$cf_compress" ; then
13693 cat >>$cf_edit_man <<CF_EOF
13694         if test \$verb = installing ; then
13695         if ( $cf_compress -f \$TMP )
13696         then
13697                 mv \$TMP.$cf_so_strip \$TMP
13698         fi
13699         fi
13700         cf_target="\$cf_target.$cf_so_strip"
13701 CF_EOF
13702 fi
13703
13704 case "$MANPAGE_FORMAT" in
13705 (*BSDI*)
13706 cat >>$cf_edit_man <<CF_EOF
13707         if test \$form = format ; then
13708                 # BSDI installs only .0 suffixes in the cat directories
13709                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
13710         fi
13711 CF_EOF
13712   ;;
13713 esac
13714
13715 cat >>$cf_edit_man <<CF_EOF
13716         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
13717         if test \$verb = installing ; then
13718                 echo \$verb \$cf_target
13719                 \$INSTALL_DATA \$TMP \$cf_target
13720                 test -d \$cf_subdir\${section} &&
13721                 test -n "\$aliases" && (
13722                         cd \$cf_subdir\${section} && (
13723                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
13724                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
13725                                 cf_target=\`basename \$cf_target\`
13726                                 for cf_alias in \$aliases
13727                                 do
13728                                         if test \$section = 1 ; then
13729                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13730                                         fi
13731
13732                                         if test "$MANPAGE_SYMLINKS" = yes ; then
13733                                                 if test -f \$cf_alias\${suffix} ; then
13734                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
13735                                                         then
13736                                                                 continue
13737                                                         fi
13738                                                 fi
13739                                                 echo .. \$verb alias \$cf_alias\${suffix}
13740 CF_EOF
13741 case "x$LN_S" in
13742 (*-f)
13743 cat >>$cf_edit_man <<CF_EOF
13744                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13745 CF_EOF
13746         ;;
13747 (*)
13748 cat >>$cf_edit_man <<CF_EOF
13749                                                 rm -f \$cf_alias\${suffix}
13750                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13751 CF_EOF
13752         ;;
13753 esac
13754 cat >>$cf_edit_man <<CF_EOF
13755                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
13756                                                 echo ".so \$cf_source" >\$TMP
13757 CF_EOF
13758 if test -n "$cf_compress" ; then
13759 cat >>$cf_edit_man <<CF_EOF
13760                                                 if test -n "$cf_so_strip" ; then
13761                                                         $cf_compress -f \$TMP
13762                                                         mv \$TMP.$cf_so_strip \$TMP
13763                                                 fi
13764 CF_EOF
13765 fi
13766 cat >>$cf_edit_man <<CF_EOF
13767                                                 echo .. \$verb alias \$cf_alias\${suffix}
13768                                                 rm -f \$cf_alias\${suffix}
13769                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
13770                                         fi
13771                                 done
13772                         )
13773                 )
13774         elif test \$verb = removing ; then
13775                 test -f \$cf_target && (
13776                         echo \$verb \$cf_target
13777                         rm -f \$cf_target
13778                 )
13779                 test -d \$cf_subdir\${section} &&
13780                 test -n "\$aliases" && (
13781                         cd \$cf_subdir\${section} && (
13782                                 for cf_alias in \$aliases
13783                                 do
13784                                         if test \$section = 1 ; then
13785                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13786                                         fi
13787
13788                                         echo .. \$verb alias \$cf_alias\${suffix}
13789                                         rm -f \$cf_alias\${suffix}
13790                                 done
13791                         )
13792                 )
13793         else
13794 #               echo ".hy 0"
13795                 cat \$TMP
13796         fi
13797         ;;
13798 esac
13799 done
13800
13801 if test $cf_inboth = yes ; then
13802 if test \$form != format ; then
13803         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13804 fi
13805 fi
13806
13807 exit 0
13808 CF_EOF
13809 chmod 755 $cf_edit_man
13810
13811 ###############################################################################
13812
13813 ### Note that some functions (such as const) are normally disabled anyway.
13814 echo "$as_me:13814: checking if you want to build with function extensions" >&5
13815 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13816
13817 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13818 if test "${enable_ext_funcs+set}" = set; then
13819   enableval="$enable_ext_funcs"
13820   with_ext_funcs=$enableval
13821 else
13822   with_ext_funcs=yes
13823 fi;
13824 echo "$as_me:13824: result: $with_ext_funcs" >&5
13825 echo "${ECHO_T}$with_ext_funcs" >&6
13826 if test "x$with_ext_funcs" = xyes ; then
13827         NCURSES_EXT_FUNCS=1
13828
13829 cat >>confdefs.h <<\EOF
13830 #define NCURSES_EXT_FUNCS 1
13831 EOF
13832
13833 cat >>confdefs.h <<\EOF
13834 #define HAVE_ASSUME_DEFAULT_COLORS 1
13835 EOF
13836
13837 cat >>confdefs.h <<\EOF
13838 #define HAVE_CURSES_VERSION 1
13839 EOF
13840
13841 cat >>confdefs.h <<\EOF
13842 #define HAVE_HAS_KEY 1
13843 EOF
13844
13845 cat >>confdefs.h <<\EOF
13846 #define HAVE_RESIZETERM 1
13847 EOF
13848
13849 cat >>confdefs.h <<\EOF
13850 #define HAVE_RESIZE_TERM 1
13851 EOF
13852
13853 cat >>confdefs.h <<\EOF
13854 #define HAVE_TERM_ENTRY_H 1
13855 EOF
13856
13857 cat >>confdefs.h <<\EOF
13858 #define HAVE_USE_DEFAULT_COLORS 1
13859 EOF
13860
13861 cat >>confdefs.h <<\EOF
13862 #define HAVE_USE_EXTENDED_NAMES 1
13863 EOF
13864
13865 cat >>confdefs.h <<\EOF
13866 #define HAVE_USE_SCREEN 1
13867 EOF
13868
13869 cat >>confdefs.h <<\EOF
13870 #define HAVE_USE_WINDOW 1
13871 EOF
13872
13873 cat >>confdefs.h <<\EOF
13874 #define HAVE_WRESIZE 1
13875 EOF
13876
13877         GENERATED_EXT_FUNCS=generated
13878         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
13879 else
13880         NCURSES_EXT_FUNCS=0
13881         GENERATED_EXT_FUNCS=
13882 fi
13883
13884 echo "$as_me:13884: checking if you want to build with SCREEN extensions" >&5
13885 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
13886
13887 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
13888 if test "${enable_sp_funcs+set}" = set; then
13889   enableval="$enable_sp_funcs"
13890   with_sp_funcs=$enableval
13891 else
13892   with_sp_funcs=$cf_dft_ext_spfuncs
13893 fi;
13894 echo "$as_me:13894: result: $with_sp_funcs" >&5
13895 echo "${ECHO_T}$with_sp_funcs" >&6
13896 if test "x$with_sp_funcs" = xyes ; then
13897         NCURSES_SP_FUNCS=1
13898
13899 cat >>confdefs.h <<\EOF
13900 #define NCURSES_SP_FUNCS 1
13901 EOF
13902
13903 cat >>confdefs.h <<\EOF
13904 #define HAVE_TPUTS_SP 1
13905 EOF
13906
13907         GENERATED_SP_FUNCS=generated
13908 else
13909         NCURSES_SP_FUNCS=0
13910         GENERATED_SP_FUNCS=
13911 fi
13912
13913 echo "$as_me:13913: checking if you want to build with terminal-driver" >&5
13914 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
13915
13916 # Check whether --enable-term-driver or --disable-term-driver was given.
13917 if test "${enable_term_driver+set}" = set; then
13918   enableval="$enable_term_driver"
13919   with_term_driver=$enableval
13920 else
13921   with_term_driver=no
13922 fi;
13923 echo "$as_me:13923: result: $with_term_driver" >&5
13924 echo "${ECHO_T}$with_term_driver" >&6
13925 if test "x$with_term_driver" = xyes ; then
13926
13927 cat >>confdefs.h <<\EOF
13928 #define USE_TERM_DRIVER 1
13929 EOF
13930
13931         if test "x$with_termlib" != xno ; then
13932                 { { echo "$as_me:13932: error: The term-driver option conflicts with the termlib option" >&5
13933 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
13934    { (exit 1); exit 1; }; }
13935         fi
13936         if test "x$with_sp_funcs" != xyes ; then
13937                 { { echo "$as_me:13937: error: The term-driver option relies upon sp-funcs" >&5
13938 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
13939    { (exit 1); exit 1; }; }
13940         fi
13941 fi
13942
13943 ###   use option --enable-const to turn on use of const beyond that in XSI.
13944 echo "$as_me:13944: checking for extended use of const keyword" >&5
13945 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13946
13947 # Check whether --enable-const or --disable-const was given.
13948 if test "${enable_const+set}" = set; then
13949   enableval="$enable_const"
13950   with_ext_const=$enableval
13951 else
13952   with_ext_const=$cf_dft_ext_const
13953 fi;
13954 echo "$as_me:13954: result: $with_ext_const" >&5
13955 echo "${ECHO_T}$with_ext_const" >&6
13956 NCURSES_CONST='/*nothing*/'
13957 if test "x$with_ext_const" = xyes ; then
13958         NCURSES_CONST=const
13959 fi
13960
13961 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
13962 echo "$as_me:13962: checking if you want to use extended colors" >&5
13963 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
13964
13965 # Check whether --enable-ext-colors or --disable-ext-colors was given.
13966 if test "${enable_ext_colors+set}" = set; then
13967   enableval="$enable_ext_colors"
13968   with_ext_colors=$enableval
13969 else
13970   with_ext_colors=$cf_dft_ext_colors
13971 fi;
13972 echo "$as_me:13972: result: $with_ext_colors" >&5
13973 echo "${ECHO_T}$with_ext_colors" >&6
13974 NCURSES_EXT_COLORS=0
13975 if test "x$with_ext_colors" = xyes ; then
13976         if test "x$with_widec" != xyes ; then
13977                 { echo "$as_me:13977: WARNING: This option applies only to wide-character library" >&5
13978 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
13979         else
13980                 # cannot be ABI 5 since it changes sizeof(cchar_t)
13981
13982 if test "${with_abi_version+set}" != set; then
13983         case $cf_cv_rel_version in
13984         (5.*)
13985                 cf_cv_rel_version=6.0
13986                 cf_cv_abi_version=6
13987                 { echo "$as_me:13987: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13988 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13989                 ;;
13990         esac
13991 fi
13992
13993                 NCURSES_EXT_COLORS=1
13994
13995 cat >>confdefs.h <<\EOF
13996 #define NCURSES_EXT_COLORS 1
13997 EOF
13998
13999 cat >>confdefs.h <<\EOF
14000 #define HAVE_ALLOC_PAIR 1
14001 EOF
14002
14003 cat >>confdefs.h <<\EOF
14004 #define HAVE_INIT_EXTENDED_COLOR 1
14005 EOF
14006
14007 cat >>confdefs.h <<\EOF
14008 #define HAVE_RESET_COLOR_PAIRS 1
14009 EOF
14010
14011         fi
14012 fi
14013
14014 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14015 echo "$as_me:14015: checking if you want to use extended mouse encoding" >&5
14016 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14017
14018 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14019 if test "${enable_ext_mouse+set}" = set; then
14020   enableval="$enable_ext_mouse"
14021   with_ext_mouse=$enableval
14022 else
14023   with_ext_mouse=$cf_dft_ext_mouse
14024 fi;
14025 echo "$as_me:14025: result: $with_ext_mouse" >&5
14026 echo "${ECHO_T}$with_ext_mouse" >&6
14027 NCURSES_MOUSE_VERSION=1
14028 if test "x$with_ext_mouse" = xyes ; then
14029         NCURSES_MOUSE_VERSION=2
14030
14031 if test "${with_abi_version+set}" != set; then
14032         case $cf_cv_rel_version in
14033         (5.*)
14034                 cf_cv_rel_version=6.0
14035                 cf_cv_abi_version=6
14036                 { echo "$as_me:14036: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14037 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14038                 ;;
14039         esac
14040 fi
14041
14042 fi
14043
14044 ###   use option --enable-ext-putwin to turn on extended screendumps
14045 echo "$as_me:14045: checking if you want to use extended putwin/screendump" >&5
14046 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14047
14048 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14049 if test "${enable_ext_putwin+set}" = set; then
14050   enableval="$enable_ext_putwin"
14051   with_ext_putwin=$enableval
14052 else
14053   with_ext_putwin=$cf_dft_ext_putwin
14054 fi;
14055 echo "$as_me:14055: result: $with_ext_putwin" >&5
14056 echo "${ECHO_T}$with_ext_putwin" >&6
14057 if test "x$with_ext_putwin" = xyes ; then
14058
14059 cat >>confdefs.h <<\EOF
14060 #define NCURSES_EXT_PUTWIN 1
14061 EOF
14062
14063 fi
14064
14065 echo "$as_me:14065: checking if you want \$NCURSES_NO_PADDING code" >&5
14066 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14067
14068 # Check whether --enable-no-padding or --disable-no-padding was given.
14069 if test "${enable_no_padding+set}" = set; then
14070   enableval="$enable_no_padding"
14071   with_no_padding=$enableval
14072 else
14073   with_no_padding=$with_ext_funcs
14074 fi;
14075 echo "$as_me:14075: result: $with_no_padding" >&5
14076 echo "${ECHO_T}$with_no_padding" >&6
14077 test "x$with_no_padding" = xyes &&
14078 cat >>confdefs.h <<\EOF
14079 #define NCURSES_NO_PADDING 1
14080 EOF
14081
14082 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14083 echo "$as_me:14083: checking if you want SIGWINCH handler" >&5
14084 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14085
14086 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14087 if test "${enable_sigwinch+set}" = set; then
14088   enableval="$enable_sigwinch"
14089   with_sigwinch=$enableval
14090 else
14091   with_sigwinch=$with_ext_funcs
14092 fi;
14093 echo "$as_me:14093: result: $with_sigwinch" >&5
14094 echo "${ECHO_T}$with_sigwinch" >&6
14095 test "x$with_sigwinch" = xyes &&
14096 cat >>confdefs.h <<\EOF
14097 #define USE_SIGWINCH 1
14098 EOF
14099
14100 ###   use option --enable-tcap-names to allow user to define new capabilities
14101 echo "$as_me:14101: checking if you want user-definable terminal capabilities like termcap" >&5
14102 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14103
14104 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14105 if test "${enable_tcap_names+set}" = set; then
14106   enableval="$enable_tcap_names"
14107   with_tcap_names=$enableval
14108 else
14109   with_tcap_names=$with_ext_funcs
14110 fi;
14111 echo "$as_me:14111: result: $with_tcap_names" >&5
14112 echo "${ECHO_T}$with_tcap_names" >&6
14113 NCURSES_XNAMES=0
14114 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14115
14116 ##############################################################################
14117
14118 echo "$as_me:14118: checking if you want to link with the pthread library" >&5
14119 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14120
14121 # Check whether --with-pthread or --without-pthread was given.
14122 if test "${with_pthread+set}" = set; then
14123   withval="$with_pthread"
14124   with_pthread=$withval
14125 else
14126   with_pthread=no
14127 fi;
14128 echo "$as_me:14128: result: $with_pthread" >&5
14129 echo "${ECHO_T}$with_pthread" >&6
14130
14131 if test "$with_pthread" != no ; then
14132         echo "$as_me:14132: checking for pthread.h" >&5
14133 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14134 if test "${ac_cv_header_pthread_h+set}" = set; then
14135   echo $ECHO_N "(cached) $ECHO_C" >&6
14136 else
14137   cat >conftest.$ac_ext <<_ACEOF
14138 #line 14138 "configure"
14139 #include "confdefs.h"
14140 #include <pthread.h>
14141 _ACEOF
14142 if { (eval echo "$as_me:14142: \"$ac_cpp conftest.$ac_ext\"") >&5
14143   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14144   ac_status=$?
14145   egrep -v '^ *\+' conftest.er1 >conftest.err
14146   rm -f conftest.er1
14147   cat conftest.err >&5
14148   echo "$as_me:14148: \$? = $ac_status" >&5
14149   (exit $ac_status); } >/dev/null; then
14150   if test -s conftest.err; then
14151     ac_cpp_err=$ac_c_preproc_warn_flag
14152   else
14153     ac_cpp_err=
14154   fi
14155 else
14156   ac_cpp_err=yes
14157 fi
14158 if test -z "$ac_cpp_err"; then
14159   ac_cv_header_pthread_h=yes
14160 else
14161   echo "$as_me: failed program was:" >&5
14162   cat conftest.$ac_ext >&5
14163   ac_cv_header_pthread_h=no
14164 fi
14165 rm -f conftest.err conftest.$ac_ext
14166 fi
14167 echo "$as_me:14167: result: $ac_cv_header_pthread_h" >&5
14168 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14169 if test $ac_cv_header_pthread_h = yes; then
14170
14171 cat >>confdefs.h <<\EOF
14172 #define HAVE_PTHREADS_H 1
14173 EOF
14174
14175         for cf_lib_pthread in pthread c_r
14176         do
14177             echo "$as_me:14177: checking if we can link with the $cf_lib_pthread library" >&5
14178 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14179             cf_save_LIBS="$LIBS"
14180
14181 cf_add_libs="-l$cf_lib_pthread"
14182 # Filter out duplicates - this happens with badly-designed ".pc" files...
14183 for cf_add_1lib in $LIBS
14184 do
14185         for cf_add_2lib in $cf_add_libs
14186         do
14187                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14188                 then
14189                         cf_add_1lib=
14190                         break
14191                 fi
14192         done
14193         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14194 done
14195 LIBS="$cf_add_libs"
14196
14197             cat >conftest.$ac_ext <<_ACEOF
14198 #line 14198 "configure"
14199 #include "confdefs.h"
14200
14201 #include <pthread.h>
14202
14203 int
14204 main (void)
14205 {
14206
14207                 int rc = pthread_create(0,0,0,0);
14208                 int r2 = pthread_mutexattr_settype(0, 0);
14209
14210   ;
14211   return 0;
14212 }
14213 _ACEOF
14214 rm -f conftest.$ac_objext conftest$ac_exeext
14215 if { (eval echo "$as_me:14215: \"$ac_link\"") >&5
14216   (eval $ac_link) 2>&5
14217   ac_status=$?
14218   echo "$as_me:14218: \$? = $ac_status" >&5
14219   (exit $ac_status); } &&
14220          { ac_try='test -s conftest$ac_exeext'
14221   { (eval echo "$as_me:14221: \"$ac_try\"") >&5
14222   (eval $ac_try) 2>&5
14223   ac_status=$?
14224   echo "$as_me:14224: \$? = $ac_status" >&5
14225   (exit $ac_status); }; }; then
14226   with_pthread=yes
14227 else
14228   echo "$as_me: failed program was:" >&5
14229 cat conftest.$ac_ext >&5
14230 with_pthread=no
14231 fi
14232 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14233             LIBS="$cf_save_LIBS"
14234             echo "$as_me:14234: result: $with_pthread" >&5
14235 echo "${ECHO_T}$with_pthread" >&6
14236             test "$with_pthread" = yes && break
14237         done
14238
14239         if test "$with_pthread" = yes ; then
14240
14241 cf_add_libs="-l$cf_lib_pthread"
14242 # Filter out duplicates - this happens with badly-designed ".pc" files...
14243 for cf_add_1lib in $LIBS
14244 do
14245         for cf_add_2lib in $cf_add_libs
14246         do
14247                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14248                 then
14249                         cf_add_1lib=
14250                         break
14251                 fi
14252         done
14253         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14254 done
14255 LIBS="$cf_add_libs"
14256
14257 cat >>confdefs.h <<\EOF
14258 #define HAVE_LIBPTHREADS 1
14259 EOF
14260
14261         else
14262             { { echo "$as_me:14262: error: Cannot link with pthread library" >&5
14263 echo "$as_me: error: Cannot link with pthread library" >&2;}
14264    { (exit 1); exit 1; }; }
14265         fi
14266
14267 fi
14268
14269 fi
14270
14271 if test "x$with_pthread" != xno; then
14272         echo "$as_me:14272: checking for pthread_kill" >&5
14273 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14274 if test "${ac_cv_func_pthread_kill+set}" = set; then
14275   echo $ECHO_N "(cached) $ECHO_C" >&6
14276 else
14277   cat >conftest.$ac_ext <<_ACEOF
14278 #line 14278 "configure"
14279 #include "confdefs.h"
14280 #define pthread_kill autoconf_temporary
14281 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14282 #undef pthread_kill
14283
14284 #ifdef __cplusplus
14285 extern "C"
14286 #endif
14287
14288 /* We use char because int might match the return type of a gcc2
14289    builtin and then its argument prototype would still apply.  */
14290 char pthread_kill (void);
14291
14292 int
14293 main (void)
14294 {
14295
14296 /* The GNU C library defines stubs for functions which it implements
14297     to always fail with ENOSYS.  Some functions are actually named
14298     something starting with __ and the normal name is an alias.  */
14299 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14300 #error found stub for pthread_kill
14301 #endif
14302
14303         return pthread_kill ();
14304   ;
14305   return 0;
14306 }
14307 _ACEOF
14308 rm -f conftest.$ac_objext conftest$ac_exeext
14309 if { (eval echo "$as_me:14309: \"$ac_link\"") >&5
14310   (eval $ac_link) 2>&5
14311   ac_status=$?
14312   echo "$as_me:14312: \$? = $ac_status" >&5
14313   (exit $ac_status); } &&
14314          { ac_try='test -s conftest$ac_exeext'
14315   { (eval echo "$as_me:14315: \"$ac_try\"") >&5
14316   (eval $ac_try) 2>&5
14317   ac_status=$?
14318   echo "$as_me:14318: \$? = $ac_status" >&5
14319   (exit $ac_status); }; }; then
14320   ac_cv_func_pthread_kill=yes
14321 else
14322   echo "$as_me: failed program was:" >&5
14323 cat conftest.$ac_ext >&5
14324 ac_cv_func_pthread_kill=no
14325 fi
14326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14327 fi
14328 echo "$as_me:14328: result: $ac_cv_func_pthread_kill" >&5
14329 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14330 if test $ac_cv_func_pthread_kill = yes; then
14331
14332                 echo "$as_me:14332: checking if you want to allow EINTR in wgetch with pthreads" >&5
14333 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14334
14335 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14336 if test "${enable_pthreads_eintr+set}" = set; then
14337   enableval="$enable_pthreads_eintr"
14338   use_pthreads_eintr=$enableval
14339 else
14340   use_pthreads_eintr=no
14341 fi;
14342                 echo "$as_me:14342: result: $use_pthreads_eintr" >&5
14343 echo "${ECHO_T}$use_pthreads_eintr" >&6
14344                 if test "x$use_pthreads_eintr" = xyes ; then
14345
14346 cat >>confdefs.h <<\EOF
14347 #define USE_PTHREADS_EINTR 1
14348 EOF
14349
14350                 fi
14351 fi
14352
14353         echo "$as_me:14353: checking if you want to use weak-symbols for pthreads" >&5
14354 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14355
14356 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14357 if test "${enable_weak_symbols+set}" = set; then
14358   enableval="$enable_weak_symbols"
14359   use_weak_symbols=$enableval
14360 else
14361   use_weak_symbols=no
14362 fi;
14363         echo "$as_me:14363: result: $use_weak_symbols" >&5
14364 echo "${ECHO_T}$use_weak_symbols" >&6
14365         if test "x$use_weak_symbols" = xyes ; then
14366
14367 echo "$as_me:14367: checking if $CC supports weak symbols" >&5
14368 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14369 if test "${cf_cv_weak_symbols+set}" = set; then
14370   echo $ECHO_N "(cached) $ECHO_C" >&6
14371 else
14372
14373 cat >conftest.$ac_ext <<_ACEOF
14374 #line 14374 "configure"
14375 #include "confdefs.h"
14376
14377 #include <stdio.h>
14378 int
14379 main (void)
14380 {
14381
14382 #if defined(__GNUC__)
14383 #  if defined __USE_ISOC99
14384 #    define _cat_pragma(exp)    _Pragma(#exp)
14385 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14386 #  else
14387 #    define _weak_pragma(exp)
14388 #  endif
14389 #  define _declare(name)        __extension__ extern __typeof__(name) name
14390 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14391 #endif
14392
14393 weak_symbol(fopen);
14394
14395   ;
14396   return 0;
14397 }
14398 _ACEOF
14399 rm -f conftest.$ac_objext
14400 if { (eval echo "$as_me:14400: \"$ac_compile\"") >&5
14401   (eval $ac_compile) 2>&5
14402   ac_status=$?
14403   echo "$as_me:14403: \$? = $ac_status" >&5
14404   (exit $ac_status); } &&
14405          { ac_try='test -s conftest.$ac_objext'
14406   { (eval echo "$as_me:14406: \"$ac_try\"") >&5
14407   (eval $ac_try) 2>&5
14408   ac_status=$?
14409   echo "$as_me:14409: \$? = $ac_status" >&5
14410   (exit $ac_status); }; }; then
14411   cf_cv_weak_symbols=yes
14412 else
14413   echo "$as_me: failed program was:" >&5
14414 cat conftest.$ac_ext >&5
14415 cf_cv_weak_symbols=no
14416 fi
14417 rm -f conftest.$ac_objext conftest.$ac_ext
14418
14419 fi
14420 echo "$as_me:14420: result: $cf_cv_weak_symbols" >&5
14421 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14422
14423         else
14424                 cf_cv_weak_symbols=no
14425         fi
14426
14427         if test "x$cf_cv_weak_symbols" = xyes ; then
14428
14429 cat >>confdefs.h <<\EOF
14430 #define USE_WEAK_SYMBOLS 1
14431 EOF
14432
14433         fi
14434 fi
14435
14436 PTHREAD=
14437 if test "x$with_pthread" = "xyes" ; then
14438
14439 cat >>confdefs.h <<\EOF
14440 #define USE_PTHREADS 1
14441 EOF
14442
14443         enable_reentrant=yes
14444         if test "x$cf_cv_weak_symbols" = xyes ; then
14445                 PTHREAD=-lpthread
14446
14447 cf_add_libs="-lpthread"
14448 # Filter out duplicates - this happens with badly-designed ".pc" files...
14449 for cf_add_1lib in $PRIVATE_LIBS
14450 do
14451         for cf_add_2lib in $cf_add_libs
14452         do
14453                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14454                 then
14455                         cf_add_1lib=
14456                         break
14457                 fi
14458         done
14459         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14460 done
14461 PRIVATE_LIBS="$cf_add_libs"
14462
14463         fi
14464 fi
14465
14466 # Reentrant code has to be opaque; there's little advantage to making ncurses
14467 # opaque outside of that, so there is no --enable-opaque option.  We can use
14468 # this option without --with-pthreads, but this will be always set for
14469 # pthreads.
14470 echo "$as_me:14470: checking if you want reentrant code" >&5
14471 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14472
14473 # Check whether --enable-reentrant or --disable-reentrant was given.
14474 if test "${enable_reentrant+set}" = set; then
14475   enableval="$enable_reentrant"
14476   with_reentrant=$enableval
14477 else
14478   with_reentrant=no
14479 fi;
14480 echo "$as_me:14480: result: $with_reentrant" >&5
14481 echo "${ECHO_T}$with_reentrant" >&6
14482 if test "x$with_reentrant" = xyes ; then
14483         cf_cv_enable_reentrant=1
14484         cf_cv_enable_opaque="NCURSES_INTERNALS"
14485         NCURSES_SIZE_T=int
14486         if test "x$cf_cv_weak_symbols" = xyes ; then
14487
14488 # remove pthread library from $LIBS
14489 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14490
14491 cf_add_libs="-lpthread"
14492 # Filter out duplicates - this happens with badly-designed ".pc" files...
14493 for cf_add_1lib in $TEST_LIBS
14494 do
14495         for cf_add_2lib in $cf_add_libs
14496         do
14497                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14498                 then
14499                         cf_add_1lib=
14500                         break
14501                 fi
14502         done
14503         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14504 done
14505 TEST_LIBS="$cf_add_libs"
14506
14507 cf_add_libs="-lpthread"
14508 # Filter out duplicates - this happens with badly-designed ".pc" files...
14509 for cf_add_1lib in $TEST_LIBS2
14510 do
14511         for cf_add_2lib in $cf_add_libs
14512         do
14513                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14514                 then
14515                         cf_add_1lib=
14516                         break
14517                 fi
14518         done
14519         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14520 done
14521 TEST_LIBS2="$cf_add_libs"
14522
14523 cf_add_libs="-lpthread"
14524 # Filter out duplicates - this happens with badly-designed ".pc" files...
14525 for cf_add_1lib in $PRIVATE_LIBS
14526 do
14527         for cf_add_2lib in $cf_add_libs
14528         do
14529                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14530                 then
14531                         cf_add_1lib=
14532                         break
14533                 fi
14534         done
14535         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14536 done
14537 PRIVATE_LIBS="$cf_add_libs"
14538
14539         else
14540                 # when not using weak symbols but with_reentrant,
14541                 # add 't' to the library suffix on all platforms
14542                 # except cygwin, where we only do that if ALSO
14543                 # compiling with full thread support.
14544                 case "$host" in
14545                 (*cygwin* | *msys*)
14546                         if test "$with_pthread" = "yes" ; then
14547                                 if test "x$disable_lib_suffixes" = "xno" ; then
14548                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14549                                 fi
14550                         fi ;;
14551                 (*)
14552                         if test "x$disable_lib_suffixes" = "xno" ; then
14553                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14554                         fi
14555                         ;;
14556                 esac
14557         fi
14558
14559 cat >>confdefs.h <<\EOF
14560 #define USE_REENTRANT 1
14561 EOF
14562
14563 if test "${with_abi_version+set}" != set; then
14564         case $cf_cv_rel_version in
14565         (5.*)
14566                 cf_cv_rel_version=6.0
14567                 cf_cv_abi_version=6
14568                 { echo "$as_me:14568: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14569 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14570                 ;;
14571         esac
14572 fi
14573
14574 else
14575         cf_cv_enable_reentrant=0
14576         cf_cv_enable_opaque="NCURSES_OPAQUE"
14577         NCURSES_SIZE_T=short
14578 fi
14579
14580 echo "$as_me:14580: checking if you want opaque curses-library structures" >&5
14581 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
14582
14583 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
14584 if test "${enable_opaque_curses+set}" = set; then
14585   enableval="$enable_opaque_curses"
14586   test "$enableval" != yes && enableval=no
14587         if test "$enableval" != "no" ; then
14588     enable_opaque_curses=yes
14589         else
14590
14591          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14592          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14593
14594         fi
14595 else
14596   enableval=no
14597
14598          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14599          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14600
14601 fi;
14602 echo "$as_me:14602: result: $enable_opaque_curses" >&5
14603 echo "${ECHO_T}$enable_opaque_curses" >&6
14604
14605 test "$cf_cv_enable_reentrant" = 1 && \
14606 test "$enable_opaque_curses" = no && \
14607 { { echo "$as_me:14607: error: reentrant configuration requires opaque library" >&5
14608 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
14609    { (exit 1); exit 1; }; }
14610
14611 echo "$as_me:14611: checking if you want opaque form-library structures" >&5
14612 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
14613
14614 # Check whether --enable-opaque-form or --disable-opaque-form was given.
14615 if test "${enable_opaque_form+set}" = set; then
14616   enableval="$enable_opaque_form"
14617   enable_opaque_form=yes
14618 else
14619   enable_opaque_form=no
14620 fi;
14621 echo "$as_me:14621: result: $enable_opaque_form" >&5
14622 echo "${ECHO_T}$enable_opaque_form" >&6
14623
14624 echo "$as_me:14624: checking if you want opaque menu-library structures" >&5
14625 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
14626
14627 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
14628 if test "${enable_opaque_menu+set}" = set; then
14629   enableval="$enable_opaque_menu"
14630   enable_opaque_menu=yes
14631 else
14632   enable_opaque_menu=no
14633 fi;
14634 echo "$as_me:14634: result: $enable_opaque_menu" >&5
14635 echo "${ECHO_T}$enable_opaque_menu" >&6
14636
14637 echo "$as_me:14637: checking if you want opaque panel-library structures" >&5
14638 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
14639
14640 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
14641 if test "${enable_opaque_panel+set}" = set; then
14642   enableval="$enable_opaque_panel"
14643   enable_opaque_panel=yes
14644 else
14645   enable_opaque_panel=no
14646 fi;
14647 echo "$as_me:14647: result: $enable_opaque_panel" >&5
14648 echo "${ECHO_T}$enable_opaque_panel" >&6
14649
14650 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
14651 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
14652 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
14653 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
14654
14655 ### Allow using a different wrap-prefix
14656 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14657         echo "$as_me:14657: checking for prefix used to wrap public variables" >&5
14658 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14659
14660 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14661 if test "${with_wrap_prefix+set}" = set; then
14662   withval="$with_wrap_prefix"
14663   NCURSES_WRAP_PREFIX=$withval
14664 else
14665   NCURSES_WRAP_PREFIX=_nc_
14666 fi;
14667         echo "$as_me:14667: result: $NCURSES_WRAP_PREFIX" >&5
14668 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14669 else
14670         NCURSES_WRAP_PREFIX=_nc_
14671 fi
14672
14673 cat >>confdefs.h <<EOF
14674 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14675 EOF
14676
14677 ###############################################################################
14678 # These options are relatively safe to experiment with.
14679
14680 echo "$as_me:14680: checking if you want all development code" >&5
14681 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14682
14683 # Check whether --with-develop or --without-develop was given.
14684 if test "${with_develop+set}" = set; then
14685   withval="$with_develop"
14686   with_develop=$withval
14687 else
14688   with_develop=no
14689 fi;
14690 echo "$as_me:14690: result: $with_develop" >&5
14691 echo "${ECHO_T}$with_develop" >&6
14692
14693 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
14694 echo "$as_me:14694: checking if you want hard-tabs code" >&5
14695 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
14696
14697 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
14698 if test "${enable_hard_tabs+set}" = set; then
14699   enableval="$enable_hard_tabs"
14700
14701 else
14702   enable_hard_tabs=$with_develop
14703 fi;
14704 echo "$as_me:14704: result: $enable_hard_tabs" >&5
14705 echo "${ECHO_T}$enable_hard_tabs" >&6
14706 test "x$enable_hard_tabs" = xyes &&
14707 cat >>confdefs.h <<\EOF
14708 #define USE_HARD_TABS 1
14709 EOF
14710
14711 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
14712 echo "$as_me:14712: checking if you want limited support for xmc" >&5
14713 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
14714
14715 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
14716 if test "${enable_xmc_glitch+set}" = set; then
14717   enableval="$enable_xmc_glitch"
14718
14719 else
14720   enable_xmc_glitch=$with_develop
14721 fi;
14722 echo "$as_me:14722: result: $enable_xmc_glitch" >&5
14723 echo "${ECHO_T}$enable_xmc_glitch" >&6
14724 test "x$enable_xmc_glitch" = xyes &&
14725 cat >>confdefs.h <<\EOF
14726 #define USE_XMC_SUPPORT 1
14727 EOF
14728
14729 ###############################################################################
14730 # These are just experimental, probably should not be in a package:
14731
14732 echo "$as_me:14732: checking if you do not want to assume colors are white-on-black" >&5
14733 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
14734
14735 # Check whether --enable-assumed-color or --disable-assumed-color was given.
14736 if test "${enable_assumed_color+set}" = set; then
14737   enableval="$enable_assumed_color"
14738   with_assumed_color=$enableval
14739 else
14740   with_assumed_color=yes
14741 fi;
14742 echo "$as_me:14742: result: $with_assumed_color" >&5
14743 echo "${ECHO_T}$with_assumed_color" >&6
14744 test "x$with_assumed_color" = xyes &&
14745 cat >>confdefs.h <<\EOF
14746 #define USE_ASSUMED_COLOR 1
14747 EOF
14748
14749 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
14750 echo "$as_me:14750: checking if you want hashmap scrolling-optimization code" >&5
14751 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
14752
14753 # Check whether --enable-hashmap or --disable-hashmap was given.
14754 if test "${enable_hashmap+set}" = set; then
14755   enableval="$enable_hashmap"
14756   with_hashmap=$enableval
14757 else
14758   with_hashmap=yes
14759 fi;
14760 echo "$as_me:14760: result: $with_hashmap" >&5
14761 echo "${ECHO_T}$with_hashmap" >&6
14762 test "x$with_hashmap" = xyes &&
14763 cat >>confdefs.h <<\EOF
14764 #define USE_HASHMAP 1
14765 EOF
14766
14767 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
14768 echo "$as_me:14768: checking if you want colorfgbg code" >&5
14769 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
14770
14771 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
14772 if test "${enable_colorfgbg+set}" = set; then
14773   enableval="$enable_colorfgbg"
14774   with_colorfgbg=$enableval
14775 else
14776   with_colorfgbg=no
14777 fi;
14778 echo "$as_me:14778: result: $with_colorfgbg" >&5
14779 echo "${ECHO_T}$with_colorfgbg" >&6
14780 test "x$with_colorfgbg" = xyes &&
14781 cat >>confdefs.h <<\EOF
14782 #define USE_COLORFGBG 1
14783 EOF
14784
14785 ###   use option --enable-interop to turn on use of bindings used for interop
14786 echo "$as_me:14786: checking if you want interop bindings" >&5
14787 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
14788
14789 # Check whether --enable-interop or --disable-interop was given.
14790 if test "${enable_interop+set}" = set; then
14791   enableval="$enable_interop"
14792   with_exp_interop=$enableval
14793 else
14794   with_exp_interop=$cf_dft_interop
14795 fi;
14796 echo "$as_me:14796: result: $with_exp_interop" >&5
14797 echo "${ECHO_T}$with_exp_interop" >&6
14798
14799 NCURSES_INTEROP_FUNCS=0
14800 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
14801
14802 echo "$as_me:14802: checking if you want experimental safe-sprintf code" >&5
14803 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
14804
14805 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
14806 if test "${enable_safe_sprintf+set}" = set; then
14807   enableval="$enable_safe_sprintf"
14808   with_safe_sprintf=$enableval
14809 else
14810   with_safe_sprintf=no
14811 fi;
14812 echo "$as_me:14812: result: $with_safe_sprintf" >&5
14813 echo "${ECHO_T}$with_safe_sprintf" >&6
14814
14815 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
14816 # when hashmap is used scroll hints are useless
14817 if test "$with_hashmap" = no ; then
14818 echo "$as_me:14818: checking if you want to experiment without scrolling-hints code" >&5
14819 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
14820
14821 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
14822 if test "${enable_scroll_hints+set}" = set; then
14823   enableval="$enable_scroll_hints"
14824   with_scroll_hints=$enableval
14825 else
14826   with_scroll_hints=yes
14827 fi;
14828 echo "$as_me:14828: result: $with_scroll_hints" >&5
14829 echo "${ECHO_T}$with_scroll_hints" >&6
14830 test "x$with_scroll_hints" = xyes &&
14831 cat >>confdefs.h <<\EOF
14832 #define USE_SCROLL_HINTS 1
14833 EOF
14834
14835 fi
14836
14837 echo "$as_me:14837: checking if you want wgetch-events code" >&5
14838 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
14839
14840 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
14841 if test "${enable_wgetch_events+set}" = set; then
14842   enableval="$enable_wgetch_events"
14843   with_wgetch_events=$enableval
14844 else
14845   with_wgetch_events=no
14846 fi;
14847 echo "$as_me:14847: result: $with_wgetch_events" >&5
14848 echo "${ECHO_T}$with_wgetch_events" >&6
14849 test "x$with_wgetch_events" = xyes &&
14850 cat >>confdefs.h <<\EOF
14851 #define NCURSES_WGETCH_EVENTS 1
14852 EOF
14853
14854 ###############################################################################
14855
14856 ###     use option --disable-echo to suppress full display compiling commands
14857
14858 echo "$as_me:14858: checking if you want to see long compiling messages" >&5
14859 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14860
14861 # Check whether --enable-echo or --disable-echo was given.
14862 if test "${enable_echo+set}" = set; then
14863   enableval="$enable_echo"
14864   test "$enableval" != no && enableval=yes
14865         if test "$enableval" != "yes" ; then
14866
14867         ECHO_LT='--silent'
14868         ECHO_LD='@echo linking $@;'
14869         RULE_CC='@echo compiling $<'
14870         SHOW_CC='@echo compiling $@'
14871         ECHO_CC='@'
14872
14873         else
14874
14875         ECHO_LT=''
14876         ECHO_LD=''
14877         RULE_CC=''
14878         SHOW_CC=''
14879         ECHO_CC=''
14880
14881         fi
14882 else
14883   enableval=yes
14884
14885         ECHO_LT=''
14886         ECHO_LD=''
14887         RULE_CC=''
14888         SHOW_CC=''
14889         ECHO_CC=''
14890
14891 fi;
14892 echo "$as_me:14892: result: $enableval" >&5
14893 echo "${ECHO_T}$enableval" >&6
14894
14895 if test "x$enable_echo" = xyes; then
14896         ECHO_LINK=
14897 else
14898         ECHO_LINK='@ echo linking $@ ... ;'
14899         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
14900         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
14901 fi
14902
14903 # --disable-stripping is used for debugging
14904
14905 echo "$as_me:14905: checking if you want to install stripped executables" >&5
14906 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
14907
14908 # Check whether --enable-stripping or --disable-stripping was given.
14909 if test "${enable_stripping+set}" = set; then
14910   enableval="$enable_stripping"
14911   test "$enableval" != no && enableval=yes
14912         if test "$enableval" != "yes" ; then
14913     with_stripping=no
14914         else
14915                 with_stripping=yes
14916         fi
14917 else
14918   enableval=yes
14919         with_stripping=yes
14920
14921 fi;
14922 echo "$as_me:14922: result: $with_stripping" >&5
14923 echo "${ECHO_T}$with_stripping" >&6
14924
14925 if test "$with_stripping" = yes
14926 then
14927         INSTALL_OPT_S="-s"
14928 else
14929         INSTALL_OPT_S=
14930 fi
14931
14932 : ${INSTALL:=install}
14933 echo "$as_me:14933: checking if install accepts -p option" >&5
14934 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
14935 if test "${cf_cv_install_p+set}" = set; then
14936   echo $ECHO_N "(cached) $ECHO_C" >&6
14937 else
14938
14939         rm -rf conftest*
14940         date >conftest.in
14941         mkdir conftest.out
14942         sleep 3
14943         if $INSTALL -p conftest.in conftest.out 2>/dev/null
14944         then
14945                 if test -f conftest.out/conftest.in
14946                 then
14947                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
14948                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
14949                         if test -s conftest.err
14950                         then
14951                                 cf_cv_install_p=no
14952                         else
14953                                 cf_cv_install_p=yes
14954                         fi
14955                 else
14956                         cf_cv_install_p=no
14957                 fi
14958         else
14959                 cf_cv_install_p=no
14960         fi
14961         rm -rf conftest*
14962
14963 fi
14964 echo "$as_me:14964: result: $cf_cv_install_p" >&5
14965 echo "${ECHO_T}$cf_cv_install_p" >&6
14966
14967 echo "$as_me:14967: checking if install needs to be told about ownership" >&5
14968 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
14969 case `$ac_config_guess` in
14970 (*minix)
14971         with_install_o=yes
14972         ;;
14973 (*)
14974         with_install_o=no
14975         ;;
14976 esac
14977
14978 echo "$as_me:14978: result: $with_install_o" >&5
14979 echo "${ECHO_T}$with_install_o" >&6
14980 if test "x$with_install_o" = xyes
14981 then
14982         INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
14983 else
14984         INSTALL_OPT_O=
14985 fi
14986
14987 # If we're avoiding relinking of shared libraries during install, that is to
14988 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
14989 # the install program has "-p" (for preserving timestamps).
14990 cf_cv_do_reranlib=yes
14991 if test "x$cf_cv_install_p" = xyes
14992 then
14993         if test "x$cf_cv_do_relink" != xyes
14994         then
14995                 cf_cv_do_reranlib=no
14996                 INSTALL_OPT_P="-p"
14997                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
14998         fi
14999 fi
15000
15001 ###     use option --enable-warnings to turn on all gcc warnings
15002 echo "$as_me:15002: checking if you want to see compiler warnings" >&5
15003 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15004
15005 # Check whether --enable-warnings or --disable-warnings was given.
15006 if test "${enable_warnings+set}" = set; then
15007   enableval="$enable_warnings"
15008   with_warnings=$enableval
15009 fi;
15010 echo "$as_me:15010: result: $with_warnings" >&5
15011 echo "${ECHO_T}$with_warnings" >&6
15012
15013 if test "x$with_warnings" = "xyes"; then
15014
15015         ADAFLAGS="$ADAFLAGS -gnatg"
15016
15017 INTEL_COMPILER=no
15018
15019 if test "$GCC" = yes ; then
15020         case $host_os in
15021         (linux*|gnu*)
15022                 echo "$as_me:15022: checking if this is really Intel C compiler" >&5
15023 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
15024                 cf_save_CFLAGS="$CFLAGS"
15025                 CFLAGS="$CFLAGS -no-gcc"
15026                 cat >conftest.$ac_ext <<_ACEOF
15027 #line 15027 "configure"
15028 #include "confdefs.h"
15029
15030 int
15031 main (void)
15032 {
15033
15034 #ifdef __INTEL_COMPILER
15035 #else
15036 make an error
15037 #endif
15038
15039   ;
15040   return 0;
15041 }
15042 _ACEOF
15043 rm -f conftest.$ac_objext
15044 if { (eval echo "$as_me:15044: \"$ac_compile\"") >&5
15045   (eval $ac_compile) 2>&5
15046   ac_status=$?
15047   echo "$as_me:15047: \$? = $ac_status" >&5
15048   (exit $ac_status); } &&
15049          { ac_try='test -s conftest.$ac_objext'
15050   { (eval echo "$as_me:15050: \"$ac_try\"") >&5
15051   (eval $ac_try) 2>&5
15052   ac_status=$?
15053   echo "$as_me:15053: \$? = $ac_status" >&5
15054   (exit $ac_status); }; }; then
15055   INTEL_COMPILER=yes
15056 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15057
15058 else
15059   echo "$as_me: failed program was:" >&5
15060 cat conftest.$ac_ext >&5
15061 fi
15062 rm -f conftest.$ac_objext conftest.$ac_ext
15063                 CFLAGS="$cf_save_CFLAGS"
15064                 echo "$as_me:15064: result: $INTEL_COMPILER" >&5
15065 echo "${ECHO_T}$INTEL_COMPILER" >&6
15066                 ;;
15067         esac
15068 fi
15069
15070 CLANG_COMPILER=no
15071
15072 if test "$GCC" = yes ; then
15073         echo "$as_me:15073: checking if this is really Clang C compiler" >&5
15074 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
15075         cf_save_CFLAGS="$CFLAGS"
15076         CFLAGS="$CFLAGS -Qunused-arguments"
15077         cat >conftest.$ac_ext <<_ACEOF
15078 #line 15078 "configure"
15079 #include "confdefs.h"
15080
15081 int
15082 main (void)
15083 {
15084
15085 #ifdef __clang__
15086 #else
15087 make an error
15088 #endif
15089
15090   ;
15091   return 0;
15092 }
15093 _ACEOF
15094 rm -f conftest.$ac_objext
15095 if { (eval echo "$as_me:15095: \"$ac_compile\"") >&5
15096   (eval $ac_compile) 2>&5
15097   ac_status=$?
15098   echo "$as_me:15098: \$? = $ac_status" >&5
15099   (exit $ac_status); } &&
15100          { ac_try='test -s conftest.$ac_objext'
15101   { (eval echo "$as_me:15101: \"$ac_try\"") >&5
15102   (eval $ac_try) 2>&5
15103   ac_status=$?
15104   echo "$as_me:15104: \$? = $ac_status" >&5
15105   (exit $ac_status); }; }; then
15106   CLANG_COMPILER=yes
15107 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15108
15109 else
15110   echo "$as_me: failed program was:" >&5
15111 cat conftest.$ac_ext >&5
15112 fi
15113 rm -f conftest.$ac_objext conftest.$ac_ext
15114         CFLAGS="$cf_save_CFLAGS"
15115         echo "$as_me:15115: result: $CLANG_COMPILER" >&5
15116 echo "${ECHO_T}$CLANG_COMPILER" >&6
15117 fi
15118
15119 if test "x$have_x" = xyes; then
15120 cat >conftest.$ac_ext <<_ACEOF
15121 #line 15121 "configure"
15122 #include "confdefs.h"
15123
15124 #include <stdlib.h>
15125 #include <X11/Intrinsic.h>
15126
15127 int
15128 main (void)
15129 {
15130 String foo = malloc(1)
15131   ;
15132   return 0;
15133 }
15134 _ACEOF
15135 rm -f conftest.$ac_objext
15136 if { (eval echo "$as_me:15136: \"$ac_compile\"") >&5
15137   (eval $ac_compile) 2>&5
15138   ac_status=$?
15139   echo "$as_me:15139: \$? = $ac_status" >&5
15140   (exit $ac_status); } &&
15141          { ac_try='test -s conftest.$ac_objext'
15142   { (eval echo "$as_me:15142: \"$ac_try\"") >&5
15143   (eval $ac_try) 2>&5
15144   ac_status=$?
15145   echo "$as_me:15145: \$? = $ac_status" >&5
15146   (exit $ac_status); }; }; then
15147
15148 echo "$as_me:15148: checking for X11/Xt const-feature" >&5
15149 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15150 if test "${cf_cv_const_x_string+set}" = set; then
15151   echo $ECHO_N "(cached) $ECHO_C" >&6
15152 else
15153
15154         cat >conftest.$ac_ext <<_ACEOF
15155 #line 15155 "configure"
15156 #include "confdefs.h"
15157
15158 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15159 #undef  XTSTRINGDEFINES /* X11R5 and later */
15160 #include <stdlib.h>
15161 #include <X11/Intrinsic.h>
15162
15163 int
15164 main (void)
15165 {
15166 String foo = malloc(1); *foo = 0
15167   ;
15168   return 0;
15169 }
15170 _ACEOF
15171 rm -f conftest.$ac_objext
15172 if { (eval echo "$as_me:15172: \"$ac_compile\"") >&5
15173   (eval $ac_compile) 2>&5
15174   ac_status=$?
15175   echo "$as_me:15175: \$? = $ac_status" >&5
15176   (exit $ac_status); } &&
15177          { ac_try='test -s conftest.$ac_objext'
15178   { (eval echo "$as_me:15178: \"$ac_try\"") >&5
15179   (eval $ac_try) 2>&5
15180   ac_status=$?
15181   echo "$as_me:15181: \$? = $ac_status" >&5
15182   (exit $ac_status); }; }; then
15183
15184                         cf_cv_const_x_string=no
15185
15186 else
15187   echo "$as_me: failed program was:" >&5
15188 cat conftest.$ac_ext >&5
15189
15190                         cf_cv_const_x_string=yes
15191
15192 fi
15193 rm -f conftest.$ac_objext conftest.$ac_ext
15194
15195 fi
15196 echo "$as_me:15196: result: $cf_cv_const_x_string" >&5
15197 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15198
15199 case $cf_cv_const_x_string in
15200 (no)
15201
15202         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15203         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15204
15205         ;;
15206 (*)
15207
15208         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15209         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15210
15211         ;;
15212 esac
15213
15214 else
15215   echo "$as_me: failed program was:" >&5
15216 cat conftest.$ac_ext >&5
15217 fi
15218 rm -f conftest.$ac_objext conftest.$ac_ext
15219  fi
15220 cat > conftest.$ac_ext <<EOF
15221 #line 15221 "${as_me:-configure}"
15222 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15223 EOF
15224 if test "$INTEL_COMPILER" = yes
15225 then
15226 # The "-wdXXX" options suppress warnings:
15227 # remark #1419: external declaration in primary source file
15228 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15229 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15230 # remark #193: zero used for undefined preprocessing identifier
15231 # remark #593: variable "curs_sb_left_arrow" was set but never used
15232 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15233 # remark #869: parameter "tw" was never referenced
15234 # remark #981: operands are evaluated in unspecified order
15235 # warning #279: controlling expression is constant
15236
15237         { echo "$as_me:15237: checking for $CC warning options..." >&5
15238 echo "$as_me: checking for $CC warning options..." >&6;}
15239         cf_save_CFLAGS="$CFLAGS"
15240         EXTRA_CFLAGS="-Wall"
15241         for cf_opt in \
15242                 wd1419 \
15243                 wd1683 \
15244                 wd1684 \
15245                 wd193 \
15246                 wd593 \
15247                 wd279 \
15248                 wd810 \
15249                 wd869 \
15250                 wd981
15251         do
15252                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15253                 if { (eval echo "$as_me:15253: \"$ac_compile\"") >&5
15254   (eval $ac_compile) 2>&5
15255   ac_status=$?
15256   echo "$as_me:15256: \$? = $ac_status" >&5
15257   (exit $ac_status); }; then
15258                         test -n "$verbose" && echo "$as_me:15258: result: ... -$cf_opt" >&5
15259 echo "${ECHO_T}... -$cf_opt" >&6
15260                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15261                 fi
15262         done
15263         CFLAGS="$cf_save_CFLAGS"
15264 elif test "$GCC" = yes
15265 then
15266         { echo "$as_me:15266: checking for $CC warning options..." >&5
15267 echo "$as_me: checking for $CC warning options..." >&6;}
15268         cf_save_CFLAGS="$CFLAGS"
15269         EXTRA_CFLAGS=
15270         cf_warn_CONST=""
15271         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15272         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15273         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15274         for cf_opt in W Wall \
15275                 Wbad-function-cast \
15276                 Wcast-align \
15277                 Wcast-qual \
15278                 Wdeclaration-after-statement \
15279                 Wextra \
15280                 Winline \
15281                 Wmissing-declarations \
15282                 Wmissing-prototypes \
15283                 Wnested-externs \
15284                 Wpointer-arith \
15285                 Wshadow \
15286                 Wstrict-prototypes \
15287                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15288         do
15289                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15290                 if { (eval echo "$as_me:15290: \"$ac_compile\"") >&5
15291   (eval $ac_compile) 2>&5
15292   ac_status=$?
15293   echo "$as_me:15293: \$? = $ac_status" >&5
15294   (exit $ac_status); }; then
15295                         test -n "$verbose" && echo "$as_me:15295: result: ... -$cf_opt" >&5
15296 echo "${ECHO_T}... -$cf_opt" >&6
15297                         case $cf_opt in
15298                         (Winline)
15299                                 case $GCC_VERSION in
15300                                 ([34].*)
15301                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15302
15303 echo "${as_me:-configure}:15303: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15304
15305                                         continue;;
15306                                 esac
15307                                 ;;
15308                         (Wpointer-arith)
15309                                 case $GCC_VERSION in
15310                                 ([12].*)
15311                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15312
15313 echo "${as_me:-configure}:15313: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15314
15315                                         continue;;
15316                                 esac
15317                                 ;;
15318                         esac
15319                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15320                 fi
15321         done
15322         CFLAGS="$cf_save_CFLAGS"
15323 fi
15324 rm -rf conftest*
15325
15326         if test "x$cf_with_cxx" = xyes ; then
15327
15328 INTEL_CPLUSPLUS=no
15329
15330 if test "$GCC" = yes ; then
15331         case $host_os in
15332         (linux*|gnu*)
15333                 echo "$as_me:15333: checking if this is really Intel C++ compiler" >&5
15334 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15335                 cf_save_CFLAGS="$CXXFLAGS"
15336                 CXXFLAGS="$CXXFLAGS -no-gcc"
15337                 cat >conftest.$ac_ext <<_ACEOF
15338 #line 15338 "configure"
15339 #include "confdefs.h"
15340
15341 int
15342 main (void)
15343 {
15344
15345 #ifdef __INTEL_COMPILER
15346 #else
15347 make an error
15348 #endif
15349
15350   ;
15351   return 0;
15352 }
15353 _ACEOF
15354 rm -f conftest.$ac_objext
15355 if { (eval echo "$as_me:15355: \"$ac_compile\"") >&5
15356   (eval $ac_compile) 2>&5
15357   ac_status=$?
15358   echo "$as_me:15358: \$? = $ac_status" >&5
15359   (exit $ac_status); } &&
15360          { ac_try='test -s conftest.$ac_objext'
15361   { (eval echo "$as_me:15361: \"$ac_try\"") >&5
15362   (eval $ac_try) 2>&5
15363   ac_status=$?
15364   echo "$as_me:15364: \$? = $ac_status" >&5
15365   (exit $ac_status); }; }; then
15366   INTEL_CPLUSPLUS=yes
15367 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15368
15369 else
15370   echo "$as_me: failed program was:" >&5
15371 cat conftest.$ac_ext >&5
15372 fi
15373 rm -f conftest.$ac_objext conftest.$ac_ext
15374                 CXXFLAGS="$cf_save_CFLAGS"
15375                 echo "$as_me:15375: result: $INTEL_CPLUSPLUS" >&5
15376 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15377                 ;;
15378         esac
15379 fi
15380
15381 CLANG_CPLUSPLUS=no
15382
15383 if test "$GCC" = yes ; then
15384         echo "$as_me:15384: checking if this is really Clang C++ compiler" >&5
15385 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15386         cf_save_CFLAGS="$CXXFLAGS"
15387         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15388         cat >conftest.$ac_ext <<_ACEOF
15389 #line 15389 "configure"
15390 #include "confdefs.h"
15391
15392 int
15393 main (void)
15394 {
15395
15396 #ifdef __clang__
15397 #else
15398 make an error
15399 #endif
15400
15401   ;
15402   return 0;
15403 }
15404 _ACEOF
15405 rm -f conftest.$ac_objext
15406 if { (eval echo "$as_me:15406: \"$ac_compile\"") >&5
15407   (eval $ac_compile) 2>&5
15408   ac_status=$?
15409   echo "$as_me:15409: \$? = $ac_status" >&5
15410   (exit $ac_status); } &&
15411          { ac_try='test -s conftest.$ac_objext'
15412   { (eval echo "$as_me:15412: \"$ac_try\"") >&5
15413   (eval $ac_try) 2>&5
15414   ac_status=$?
15415   echo "$as_me:15415: \$? = $ac_status" >&5
15416   (exit $ac_status); }; }; then
15417   CLANG_CPLUSPLUS=yes
15418 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15419
15420 else
15421   echo "$as_me: failed program was:" >&5
15422 cat conftest.$ac_ext >&5
15423 fi
15424 rm -f conftest.$ac_objext conftest.$ac_ext
15425         CXXFLAGS="$cf_save_CFLAGS"
15426         echo "$as_me:15426: result: $CLANG_CPLUSPLUS" >&5
15427 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15428 fi
15429
15430 ac_ext=cc
15431 ac_cpp='$CXXCPP $CPPFLAGS'
15432 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15433 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15434 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15435 ac_main_return=return
15436
15437 cat > conftest.$ac_ext <<EOF
15438 #line 15438 "configure"
15439 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15440 EOF
15441
15442 if test "$INTEL_CPLUSPLUS" = yes
15443 then
15444 # The "-wdXXX" options suppress warnings:
15445 # remark #1419: external declaration in primary source file
15446 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15447 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15448 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15449 # remark #193: zero used for undefined preprocessing identifier
15450 # remark #593: variable "curs_sb_left_arrow" was set but never used
15451 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15452 # remark #869: parameter "tw" was never referenced
15453 # remark #981: operands are evaluated in unspecified order
15454 # warning #269: invalid format string conversion
15455
15456         { echo "$as_me:15456: checking for $CC warning options..." >&5
15457 echo "$as_me: checking for $CC warning options..." >&6;}
15458         cf_save_CXXFLAGS="$CXXFLAGS"
15459         EXTRA_CXXFLAGS="-Wall"
15460         for cf_opt in \
15461                 wd1419 \
15462                 wd1682 \
15463                 wd1683 \
15464                 wd1684 \
15465                 wd193 \
15466                 wd279 \
15467                 wd593 \
15468                 wd810 \
15469                 wd869 \
15470                 wd981
15471         do
15472                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15473                 if { (eval echo "$as_me:15473: \"$ac_compile\"") >&5
15474   (eval $ac_compile) 2>&5
15475   ac_status=$?
15476   echo "$as_me:15476: \$? = $ac_status" >&5
15477   (exit $ac_status); }; then
15478                         test -n "$verbose" && echo "$as_me:15478: result: ... -$cf_opt" >&5
15479 echo "${ECHO_T}... -$cf_opt" >&6
15480                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15481                 fi
15482         done
15483         CXXFLAGS="$cf_save_CXXFLAGS"
15484
15485 elif test "$GXX" = yes
15486 then
15487         { echo "$as_me:15487: checking for $CXX warning options..." >&5
15488 echo "$as_me: checking for $CXX warning options..." >&6;}
15489         cf_save_CXXFLAGS="$CXXFLAGS"
15490         EXTRA_CXXFLAGS="-W -Wall"
15491         cf_gxx_extra_warnings=""
15492         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15493         case "$GCC_VERSION" in
15494         ([1-2].*)
15495                 ;;
15496         (*)
15497                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15498                 ;;
15499         esac
15500         for cf_opt in \
15501                 Wabi \
15502                 fabi-version=0 \
15503                 Wextra \
15504                 Wignored-qualifiers \
15505                 Wlogical-op \
15506                 Woverloaded-virtual \
15507                 Wsign-promo \
15508                 Wsynth \
15509                 Wold-style-cast \
15510                 Wcast-align \
15511                 Wcast-qual \
15512                 Wpointer-arith \
15513                 Wshadow \
15514                 Wundef $cf_gxx_extra_warnings Wno-unused
15515         do
15516                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15517                 if { (eval echo "$as_me:15517: \"$ac_compile\"") >&5
15518   (eval $ac_compile) 2>&5
15519   ac_status=$?
15520   echo "$as_me:15520: \$? = $ac_status" >&5
15521   (exit $ac_status); }; then
15522                         test -n "$verbose" && echo "$as_me:15522: result: ... -$cf_opt" >&5
15523 echo "${ECHO_T}... -$cf_opt" >&6
15524                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15525                 else
15526                         test -n "$verbose" && echo "$as_me:15526: result: ... no -$cf_opt" >&5
15527 echo "${ECHO_T}... no -$cf_opt" >&6
15528                 fi
15529         done
15530         CXXFLAGS="$cf_save_CXXFLAGS"
15531 fi
15532
15533 rm -rf conftest*
15534 ac_ext=c
15535 ac_cpp='$CPP $CPPFLAGS'
15536 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15537 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15538 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15539 ac_main_return=return
15540
15541         fi
15542 fi
15543
15544 if test "$GCC" = yes
15545 then
15546 cat > conftest.i <<EOF
15547 #ifndef GCC_PRINTF
15548 #define GCC_PRINTF 0
15549 #endif
15550 #ifndef GCC_SCANF
15551 #define GCC_SCANF 0
15552 #endif
15553 #ifndef GCC_NORETURN
15554 #define GCC_NORETURN /* nothing */
15555 #endif
15556 #ifndef GCC_UNUSED
15557 #define GCC_UNUSED /* nothing */
15558 #endif
15559 EOF
15560 if test "$GCC" = yes
15561 then
15562         { echo "$as_me:15562: checking for $CC __attribute__ directives..." >&5
15563 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15564 cat > conftest.$ac_ext <<EOF
15565 #line 15565 "${as_me:-configure}"
15566 #include "confdefs.h"
15567 #include "conftest.h"
15568 #include "conftest.i"
15569 #if     GCC_PRINTF
15570 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15571 #else
15572 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15573 #endif
15574 #if     GCC_SCANF
15575 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15576 #else
15577 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15578 #endif
15579 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15580 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15581 extern void foo(void) GCC_NORETURN;
15582 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15583 EOF
15584         cf_printf_attribute=no
15585         cf_scanf_attribute=no
15586         for cf_attribute in scanf printf unused noreturn
15587         do
15588
15589 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15590
15591                 cf_directive="__attribute__(($cf_attribute))"
15592                 echo "checking for $CC $cf_directive" 1>&5
15593
15594                 case $cf_attribute in
15595                 (printf)
15596                         cf_printf_attribute=yes
15597                         cat >conftest.h <<EOF
15598 #define GCC_$cf_ATTRIBUTE 1
15599 EOF
15600                         ;;
15601                 (scanf)
15602                         cf_scanf_attribute=yes
15603                         cat >conftest.h <<EOF
15604 #define GCC_$cf_ATTRIBUTE 1
15605 EOF
15606                         ;;
15607                 (*)
15608                         cat >conftest.h <<EOF
15609 #define GCC_$cf_ATTRIBUTE $cf_directive
15610 EOF
15611                         ;;
15612                 esac
15613
15614                 if { (eval echo "$as_me:15614: \"$ac_compile\"") >&5
15615   (eval $ac_compile) 2>&5
15616   ac_status=$?
15617   echo "$as_me:15617: \$? = $ac_status" >&5
15618   (exit $ac_status); }; then
15619                         test -n "$verbose" && echo "$as_me:15619: result: ... $cf_attribute" >&5
15620 echo "${ECHO_T}... $cf_attribute" >&6
15621                         cat conftest.h >>confdefs.h
15622                         case $cf_attribute in
15623                         (noreturn)
15624
15625 cat >>confdefs.h <<EOF
15626 #define GCC_NORETURN $cf_directive
15627 EOF
15628
15629                                 ;;
15630                         (printf)
15631                                 cf_value='/* nothing */'
15632                                 if test "$cf_printf_attribute" != no ; then
15633                                         cf_value='__attribute__((format(printf,fmt,var)))'
15634
15635 cat >>confdefs.h <<\EOF
15636 #define GCC_PRINTF 1
15637 EOF
15638
15639                                 fi
15640
15641 cat >>confdefs.h <<EOF
15642 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15643 EOF
15644
15645                                 ;;
15646                         (scanf)
15647                                 cf_value='/* nothing */'
15648                                 if test "$cf_scanf_attribute" != no ; then
15649                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15650
15651 cat >>confdefs.h <<\EOF
15652 #define GCC_SCANF 1
15653 EOF
15654
15655                                 fi
15656
15657 cat >>confdefs.h <<EOF
15658 #define GCC_SCANFLIKE(fmt,var) $cf_value
15659 EOF
15660
15661                                 ;;
15662                         (unused)
15663
15664 cat >>confdefs.h <<EOF
15665 #define GCC_UNUSED $cf_directive
15666 EOF
15667
15668                                 ;;
15669                         esac
15670                 fi
15671         done
15672 else
15673         fgrep define conftest.i >>confdefs.h
15674 fi
15675 rm -rf conftest*
15676 fi
15677
15678 echo "$as_me:15678: checking if you want to work around bogus compiler/loader warnings" >&5
15679 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
15680
15681 # Check whether --enable-string-hacks or --disable-string-hacks was given.
15682 if test "${enable_string_hacks+set}" = set; then
15683   enableval="$enable_string_hacks"
15684   with_string_hacks=$enableval
15685 else
15686   with_string_hacks=no
15687 fi;
15688 echo "$as_me:15688: result: $with_string_hacks" >&5
15689 echo "${ECHO_T}$with_string_hacks" >&6
15690
15691 if test "x$with_string_hacks" = "xyes"; then
15692
15693 cat >>confdefs.h <<\EOF
15694 #define USE_STRING_HACKS 1
15695 EOF
15696
15697         { echo "$as_me:15697: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
15698 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
15699         echo "$as_me:15699: checking for strlcat" >&5
15700 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
15701 if test "${ac_cv_func_strlcat+set}" = set; then
15702   echo $ECHO_N "(cached) $ECHO_C" >&6
15703 else
15704   cat >conftest.$ac_ext <<_ACEOF
15705 #line 15705 "configure"
15706 #include "confdefs.h"
15707 #define strlcat autoconf_temporary
15708 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15709 #undef strlcat
15710
15711 #ifdef __cplusplus
15712 extern "C"
15713 #endif
15714
15715 /* We use char because int might match the return type of a gcc2
15716    builtin and then its argument prototype would still apply.  */
15717 char strlcat (void);
15718
15719 int
15720 main (void)
15721 {
15722
15723 /* The GNU C library defines stubs for functions which it implements
15724     to always fail with ENOSYS.  Some functions are actually named
15725     something starting with __ and the normal name is an alias.  */
15726 #if defined (__stub_strlcat) || defined (__stub___strlcat)
15727 #error found stub for strlcat
15728 #endif
15729
15730         return strlcat ();
15731   ;
15732   return 0;
15733 }
15734 _ACEOF
15735 rm -f conftest.$ac_objext conftest$ac_exeext
15736 if { (eval echo "$as_me:15736: \"$ac_link\"") >&5
15737   (eval $ac_link) 2>&5
15738   ac_status=$?
15739   echo "$as_me:15739: \$? = $ac_status" >&5
15740   (exit $ac_status); } &&
15741          { ac_try='test -s conftest$ac_exeext'
15742   { (eval echo "$as_me:15742: \"$ac_try\"") >&5
15743   (eval $ac_try) 2>&5
15744   ac_status=$?
15745   echo "$as_me:15745: \$? = $ac_status" >&5
15746   (exit $ac_status); }; }; then
15747   ac_cv_func_strlcat=yes
15748 else
15749   echo "$as_me: failed program was:" >&5
15750 cat conftest.$ac_ext >&5
15751 ac_cv_func_strlcat=no
15752 fi
15753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15754 fi
15755 echo "$as_me:15755: result: $ac_cv_func_strlcat" >&5
15756 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
15757 if test $ac_cv_func_strlcat = yes; then
15758
15759 cat >>confdefs.h <<\EOF
15760 #define HAVE_STRLCAT 1
15761 EOF
15762
15763 else
15764
15765                 echo "$as_me:15765: checking for strlcat in -lbsd" >&5
15766 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
15767 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
15768   echo $ECHO_N "(cached) $ECHO_C" >&6
15769 else
15770   ac_check_lib_save_LIBS=$LIBS
15771 LIBS="-lbsd  $LIBS"
15772 cat >conftest.$ac_ext <<_ACEOF
15773 #line 15773 "configure"
15774 #include "confdefs.h"
15775
15776 /* Override any gcc2 internal prototype to avoid an error.  */
15777 #ifdef __cplusplus
15778 extern "C"
15779 #endif
15780 /* We use char because int might match the return type of a gcc2
15781    builtin and then its argument prototype would still apply.  */
15782 char strlcat ();
15783 int
15784 main (void)
15785 {
15786 strlcat ();
15787   ;
15788   return 0;
15789 }
15790 _ACEOF
15791 rm -f conftest.$ac_objext conftest$ac_exeext
15792 if { (eval echo "$as_me:15792: \"$ac_link\"") >&5
15793   (eval $ac_link) 2>&5
15794   ac_status=$?
15795   echo "$as_me:15795: \$? = $ac_status" >&5
15796   (exit $ac_status); } &&
15797          { ac_try='test -s conftest$ac_exeext'
15798   { (eval echo "$as_me:15798: \"$ac_try\"") >&5
15799   (eval $ac_try) 2>&5
15800   ac_status=$?
15801   echo "$as_me:15801: \$? = $ac_status" >&5
15802   (exit $ac_status); }; }; then
15803   ac_cv_lib_bsd_strlcat=yes
15804 else
15805   echo "$as_me: failed program was:" >&5
15806 cat conftest.$ac_ext >&5
15807 ac_cv_lib_bsd_strlcat=no
15808 fi
15809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15810 LIBS=$ac_check_lib_save_LIBS
15811 fi
15812 echo "$as_me:15812: result: $ac_cv_lib_bsd_strlcat" >&5
15813 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
15814 if test $ac_cv_lib_bsd_strlcat = yes; then
15815
15816 cf_add_libs="-lbsd"
15817 # Filter out duplicates - this happens with badly-designed ".pc" files...
15818 for cf_add_1lib in $LIBS
15819 do
15820         for cf_add_2lib in $cf_add_libs
15821         do
15822                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15823                 then
15824                         cf_add_1lib=
15825                         break
15826                 fi
15827         done
15828         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15829 done
15830 LIBS="$cf_add_libs"
15831
15832 for ac_header in bsd/string.h
15833 do
15834 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15835 echo "$as_me:15835: checking for $ac_header" >&5
15836 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15837 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15838   echo $ECHO_N "(cached) $ECHO_C" >&6
15839 else
15840   cat >conftest.$ac_ext <<_ACEOF
15841 #line 15841 "configure"
15842 #include "confdefs.h"
15843 #include <$ac_header>
15844 _ACEOF
15845 if { (eval echo "$as_me:15845: \"$ac_cpp conftest.$ac_ext\"") >&5
15846   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15847   ac_status=$?
15848   egrep -v '^ *\+' conftest.er1 >conftest.err
15849   rm -f conftest.er1
15850   cat conftest.err >&5
15851   echo "$as_me:15851: \$? = $ac_status" >&5
15852   (exit $ac_status); } >/dev/null; then
15853   if test -s conftest.err; then
15854     ac_cpp_err=$ac_c_preproc_warn_flag
15855   else
15856     ac_cpp_err=
15857   fi
15858 else
15859   ac_cpp_err=yes
15860 fi
15861 if test -z "$ac_cpp_err"; then
15862   eval "$as_ac_Header=yes"
15863 else
15864   echo "$as_me: failed program was:" >&5
15865   cat conftest.$ac_ext >&5
15866   eval "$as_ac_Header=no"
15867 fi
15868 rm -f conftest.err conftest.$ac_ext
15869 fi
15870 echo "$as_me:15870: result: `eval echo '${'$as_ac_Header'}'`" >&5
15871 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15872 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15873   cat >>confdefs.h <<EOF
15874 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15875 EOF
15876
15877 fi
15878 done
15879
15880 cat >>confdefs.h <<\EOF
15881 #define HAVE_STRLCAT 1
15882 EOF
15883
15884 fi
15885
15886 fi
15887
15888 for ac_func in strlcpy snprintf
15889 do
15890 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15891 echo "$as_me:15891: checking for $ac_func" >&5
15892 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15893 if eval "test \"\${$as_ac_var+set}\" = set"; then
15894   echo $ECHO_N "(cached) $ECHO_C" >&6
15895 else
15896   cat >conftest.$ac_ext <<_ACEOF
15897 #line 15897 "configure"
15898 #include "confdefs.h"
15899 #define $ac_func autoconf_temporary
15900 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15901 #undef $ac_func
15902
15903 #ifdef __cplusplus
15904 extern "C"
15905 #endif
15906
15907 /* We use char because int might match the return type of a gcc2
15908    builtin and then its argument prototype would still apply.  */
15909 char $ac_func (void);
15910
15911 int
15912 main (void)
15913 {
15914
15915 /* The GNU C library defines stubs for functions which it implements
15916     to always fail with ENOSYS.  Some functions are actually named
15917     something starting with __ and the normal name is an alias.  */
15918 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15919 #error found stub for $ac_func
15920 #endif
15921
15922         return $ac_func ();
15923   ;
15924   return 0;
15925 }
15926 _ACEOF
15927 rm -f conftest.$ac_objext conftest$ac_exeext
15928 if { (eval echo "$as_me:15928: \"$ac_link\"") >&5
15929   (eval $ac_link) 2>&5
15930   ac_status=$?
15931   echo "$as_me:15931: \$? = $ac_status" >&5
15932   (exit $ac_status); } &&
15933          { ac_try='test -s conftest$ac_exeext'
15934   { (eval echo "$as_me:15934: \"$ac_try\"") >&5
15935   (eval $ac_try) 2>&5
15936   ac_status=$?
15937   echo "$as_me:15937: \$? = $ac_status" >&5
15938   (exit $ac_status); }; }; then
15939   eval "$as_ac_var=yes"
15940 else
15941   echo "$as_me: failed program was:" >&5
15942 cat conftest.$ac_ext >&5
15943 eval "$as_ac_var=no"
15944 fi
15945 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15946 fi
15947 echo "$as_me:15947: result: `eval echo '${'$as_ac_var'}'`" >&5
15948 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15949 if test `eval echo '${'$as_ac_var'}'` = yes; then
15950   cat >>confdefs.h <<EOF
15951 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15952 EOF
15953
15954 fi
15955 done
15956
15957 fi
15958
15959 ###     use option --enable-assertions to turn on generation of assertion code
15960 echo "$as_me:15960: checking if you want to enable runtime assertions" >&5
15961 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15962
15963 # Check whether --enable-assertions or --disable-assertions was given.
15964 if test "${enable_assertions+set}" = set; then
15965   enableval="$enable_assertions"
15966   with_assertions=$enableval
15967 else
15968   with_assertions=no
15969 fi;
15970 echo "$as_me:15970: result: $with_assertions" >&5
15971 echo "${ECHO_T}$with_assertions" >&6
15972 if test -n "$GCC"
15973 then
15974         if test "$with_assertions" = no
15975         then
15976                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15977         else
15978
15979         ADAFLAGS="$ADAFLAGS -gnata"
15980
15981         fi
15982 fi
15983
15984 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
15985
15986 echo "$as_me:15986: checking if you want to use dmalloc for testing" >&5
15987 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
15988
15989 # Check whether --with-dmalloc or --without-dmalloc was given.
15990 if test "${with_dmalloc+set}" = set; then
15991   withval="$with_dmalloc"
15992
15993 cat >>confdefs.h <<EOF
15994 #define USE_DMALLOC 1
15995 EOF
15996
15997         : ${with_cflags:=-g}
15998         : ${with_no_leaks:=yes}
15999          with_dmalloc=yes
16000 else
16001   with_dmalloc=
16002 fi;
16003 echo "$as_me:16003: result: ${with_dmalloc:-no}" >&5
16004 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16005
16006 case .$with_cflags in
16007 (.*-g*)
16008         case .$CFLAGS in
16009         (.*-g*)
16010                 ;;
16011         (*)
16012
16013 cf_fix_cppflags=no
16014 cf_new_cflags=
16015 cf_new_cppflags=
16016 cf_new_extra_cppflags=
16017
16018 for cf_add_cflags in -g
16019 do
16020 case $cf_fix_cppflags in
16021 (no)
16022         case $cf_add_cflags in
16023         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16024                 case $cf_add_cflags in
16025                 (-D*)
16026                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16027
16028                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16029                                 && test -z "${cf_tst_cflags}" \
16030                                 && cf_fix_cppflags=yes
16031
16032                         if test $cf_fix_cppflags = yes ; then
16033
16034         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16035         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16036
16037                                 continue
16038                         elif test "${cf_tst_cflags}" = "\"'" ; then
16039
16040         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16041         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16042
16043                                 continue
16044                         fi
16045                         ;;
16046                 esac
16047                 case "$CPPFLAGS" in
16048                 (*$cf_add_cflags)
16049                         ;;
16050                 (*)
16051                         case $cf_add_cflags in
16052                         (-D*)
16053                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16054
16055 CPPFLAGS=`echo "$CPPFLAGS" | \
16056         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16057                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16058
16059                                 ;;
16060                         esac
16061
16062         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16063         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16064
16065                         ;;
16066                 esac
16067                 ;;
16068         (*)
16069
16070         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16071         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16072
16073                 ;;
16074         esac
16075         ;;
16076 (yes)
16077
16078         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16079         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16080
16081         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16082
16083         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16084                 && test -z "${cf_tst_cflags}" \
16085                 && cf_fix_cppflags=no
16086         ;;
16087 esac
16088 done
16089
16090 if test -n "$cf_new_cflags" ; then
16091
16092         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16093         CFLAGS="${CFLAGS}$cf_new_cflags"
16094
16095 fi
16096
16097 if test -n "$cf_new_cppflags" ; then
16098
16099         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16100         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16101
16102 fi
16103
16104 if test -n "$cf_new_extra_cppflags" ; then
16105
16106         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16107         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16108
16109 fi
16110
16111                 ;;
16112         esac
16113         ;;
16114 esac
16115
16116 if test "$with_dmalloc" = yes ; then
16117         echo "$as_me:16117: checking for dmalloc.h" >&5
16118 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16119 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16120   echo $ECHO_N "(cached) $ECHO_C" >&6
16121 else
16122   cat >conftest.$ac_ext <<_ACEOF
16123 #line 16123 "configure"
16124 #include "confdefs.h"
16125 #include <dmalloc.h>
16126 _ACEOF
16127 if { (eval echo "$as_me:16127: \"$ac_cpp conftest.$ac_ext\"") >&5
16128   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16129   ac_status=$?
16130   egrep -v '^ *\+' conftest.er1 >conftest.err
16131   rm -f conftest.er1
16132   cat conftest.err >&5
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); } >/dev/null; then
16135   if test -s conftest.err; then
16136     ac_cpp_err=$ac_c_preproc_warn_flag
16137   else
16138     ac_cpp_err=
16139   fi
16140 else
16141   ac_cpp_err=yes
16142 fi
16143 if test -z "$ac_cpp_err"; then
16144   ac_cv_header_dmalloc_h=yes
16145 else
16146   echo "$as_me: failed program was:" >&5
16147   cat conftest.$ac_ext >&5
16148   ac_cv_header_dmalloc_h=no
16149 fi
16150 rm -f conftest.err conftest.$ac_ext
16151 fi
16152 echo "$as_me:16152: result: $ac_cv_header_dmalloc_h" >&5
16153 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16154 if test $ac_cv_header_dmalloc_h = yes; then
16155
16156 echo "$as_me:16156: checking for dmalloc_debug in -ldmalloc" >&5
16157 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16158 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16159   echo $ECHO_N "(cached) $ECHO_C" >&6
16160 else
16161   ac_check_lib_save_LIBS=$LIBS
16162 LIBS="-ldmalloc  $LIBS"
16163 cat >conftest.$ac_ext <<_ACEOF
16164 #line 16164 "configure"
16165 #include "confdefs.h"
16166
16167 /* Override any gcc2 internal prototype to avoid an error.  */
16168 #ifdef __cplusplus
16169 extern "C"
16170 #endif
16171 /* We use char because int might match the return type of a gcc2
16172    builtin and then its argument prototype would still apply.  */
16173 char dmalloc_debug ();
16174 int
16175 main (void)
16176 {
16177 dmalloc_debug ();
16178   ;
16179   return 0;
16180 }
16181 _ACEOF
16182 rm -f conftest.$ac_objext conftest$ac_exeext
16183 if { (eval echo "$as_me:16183: \"$ac_link\"") >&5
16184   (eval $ac_link) 2>&5
16185   ac_status=$?
16186   echo "$as_me:16186: \$? = $ac_status" >&5
16187   (exit $ac_status); } &&
16188          { ac_try='test -s conftest$ac_exeext'
16189   { (eval echo "$as_me:16189: \"$ac_try\"") >&5
16190   (eval $ac_try) 2>&5
16191   ac_status=$?
16192   echo "$as_me:16192: \$? = $ac_status" >&5
16193   (exit $ac_status); }; }; then
16194   ac_cv_lib_dmalloc_dmalloc_debug=yes
16195 else
16196   echo "$as_me: failed program was:" >&5
16197 cat conftest.$ac_ext >&5
16198 ac_cv_lib_dmalloc_dmalloc_debug=no
16199 fi
16200 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16201 LIBS=$ac_check_lib_save_LIBS
16202 fi
16203 echo "$as_me:16203: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16204 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16205 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16206   cat >>confdefs.h <<EOF
16207 #define HAVE_LIBDMALLOC 1
16208 EOF
16209
16210   LIBS="-ldmalloc $LIBS"
16211
16212 fi
16213
16214 fi
16215
16216 fi
16217
16218 echo "$as_me:16218: checking if you want to use dbmalloc for testing" >&5
16219 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16220
16221 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16222 if test "${with_dbmalloc+set}" = set; then
16223   withval="$with_dbmalloc"
16224
16225 cat >>confdefs.h <<EOF
16226 #define USE_DBMALLOC 1
16227 EOF
16228
16229         : ${with_cflags:=-g}
16230         : ${with_no_leaks:=yes}
16231          with_dbmalloc=yes
16232 else
16233   with_dbmalloc=
16234 fi;
16235 echo "$as_me:16235: result: ${with_dbmalloc:-no}" >&5
16236 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16237
16238 case .$with_cflags in
16239 (.*-g*)
16240         case .$CFLAGS in
16241         (.*-g*)
16242                 ;;
16243         (*)
16244
16245 cf_fix_cppflags=no
16246 cf_new_cflags=
16247 cf_new_cppflags=
16248 cf_new_extra_cppflags=
16249
16250 for cf_add_cflags in -g
16251 do
16252 case $cf_fix_cppflags in
16253 (no)
16254         case $cf_add_cflags in
16255         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16256                 case $cf_add_cflags in
16257                 (-D*)
16258                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16259
16260                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16261                                 && test -z "${cf_tst_cflags}" \
16262                                 && cf_fix_cppflags=yes
16263
16264                         if test $cf_fix_cppflags = yes ; then
16265
16266         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16267         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16268
16269                                 continue
16270                         elif test "${cf_tst_cflags}" = "\"'" ; then
16271
16272         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16273         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16274
16275                                 continue
16276                         fi
16277                         ;;
16278                 esac
16279                 case "$CPPFLAGS" in
16280                 (*$cf_add_cflags)
16281                         ;;
16282                 (*)
16283                         case $cf_add_cflags in
16284                         (-D*)
16285                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16286
16287 CPPFLAGS=`echo "$CPPFLAGS" | \
16288         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16289                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16290
16291                                 ;;
16292                         esac
16293
16294         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16295         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16296
16297                         ;;
16298                 esac
16299                 ;;
16300         (*)
16301
16302         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16303         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16304
16305                 ;;
16306         esac
16307         ;;
16308 (yes)
16309
16310         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16311         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16312
16313         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16314
16315         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16316                 && test -z "${cf_tst_cflags}" \
16317                 && cf_fix_cppflags=no
16318         ;;
16319 esac
16320 done
16321
16322 if test -n "$cf_new_cflags" ; then
16323
16324         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16325         CFLAGS="${CFLAGS}$cf_new_cflags"
16326
16327 fi
16328
16329 if test -n "$cf_new_cppflags" ; then
16330
16331         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16332         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16333
16334 fi
16335
16336 if test -n "$cf_new_extra_cppflags" ; then
16337
16338         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16339         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16340
16341 fi
16342
16343                 ;;
16344         esac
16345         ;;
16346 esac
16347
16348 if test "$with_dbmalloc" = yes ; then
16349         echo "$as_me:16349: checking for dbmalloc.h" >&5
16350 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16351 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16352   echo $ECHO_N "(cached) $ECHO_C" >&6
16353 else
16354   cat >conftest.$ac_ext <<_ACEOF
16355 #line 16355 "configure"
16356 #include "confdefs.h"
16357 #include <dbmalloc.h>
16358 _ACEOF
16359 if { (eval echo "$as_me:16359: \"$ac_cpp conftest.$ac_ext\"") >&5
16360   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16361   ac_status=$?
16362   egrep -v '^ *\+' conftest.er1 >conftest.err
16363   rm -f conftest.er1
16364   cat conftest.err >&5
16365   echo "$as_me:16365: \$? = $ac_status" >&5
16366   (exit $ac_status); } >/dev/null; then
16367   if test -s conftest.err; then
16368     ac_cpp_err=$ac_c_preproc_warn_flag
16369   else
16370     ac_cpp_err=
16371   fi
16372 else
16373   ac_cpp_err=yes
16374 fi
16375 if test -z "$ac_cpp_err"; then
16376   ac_cv_header_dbmalloc_h=yes
16377 else
16378   echo "$as_me: failed program was:" >&5
16379   cat conftest.$ac_ext >&5
16380   ac_cv_header_dbmalloc_h=no
16381 fi
16382 rm -f conftest.err conftest.$ac_ext
16383 fi
16384 echo "$as_me:16384: result: $ac_cv_header_dbmalloc_h" >&5
16385 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16386 if test $ac_cv_header_dbmalloc_h = yes; then
16387
16388 echo "$as_me:16388: checking for debug_malloc in -ldbmalloc" >&5
16389 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16390 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16391   echo $ECHO_N "(cached) $ECHO_C" >&6
16392 else
16393   ac_check_lib_save_LIBS=$LIBS
16394 LIBS="-ldbmalloc  $LIBS"
16395 cat >conftest.$ac_ext <<_ACEOF
16396 #line 16396 "configure"
16397 #include "confdefs.h"
16398
16399 /* Override any gcc2 internal prototype to avoid an error.  */
16400 #ifdef __cplusplus
16401 extern "C"
16402 #endif
16403 /* We use char because int might match the return type of a gcc2
16404    builtin and then its argument prototype would still apply.  */
16405 char debug_malloc ();
16406 int
16407 main (void)
16408 {
16409 debug_malloc ();
16410   ;
16411   return 0;
16412 }
16413 _ACEOF
16414 rm -f conftest.$ac_objext conftest$ac_exeext
16415 if { (eval echo "$as_me:16415: \"$ac_link\"") >&5
16416   (eval $ac_link) 2>&5
16417   ac_status=$?
16418   echo "$as_me:16418: \$? = $ac_status" >&5
16419   (exit $ac_status); } &&
16420          { ac_try='test -s conftest$ac_exeext'
16421   { (eval echo "$as_me:16421: \"$ac_try\"") >&5
16422   (eval $ac_try) 2>&5
16423   ac_status=$?
16424   echo "$as_me:16424: \$? = $ac_status" >&5
16425   (exit $ac_status); }; }; then
16426   ac_cv_lib_dbmalloc_debug_malloc=yes
16427 else
16428   echo "$as_me: failed program was:" >&5
16429 cat conftest.$ac_ext >&5
16430 ac_cv_lib_dbmalloc_debug_malloc=no
16431 fi
16432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16433 LIBS=$ac_check_lib_save_LIBS
16434 fi
16435 echo "$as_me:16435: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16436 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16437 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16438   cat >>confdefs.h <<EOF
16439 #define HAVE_LIBDBMALLOC 1
16440 EOF
16441
16442   LIBS="-ldbmalloc $LIBS"
16443
16444 fi
16445
16446 fi
16447
16448 fi
16449
16450 echo "$as_me:16450: checking if you want to use valgrind for testing" >&5
16451 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16452
16453 # Check whether --with-valgrind or --without-valgrind was given.
16454 if test "${with_valgrind+set}" = set; then
16455   withval="$with_valgrind"
16456
16457 cat >>confdefs.h <<EOF
16458 #define USE_VALGRIND 1
16459 EOF
16460
16461         : ${with_cflags:=-g}
16462         : ${with_no_leaks:=yes}
16463          with_valgrind=yes
16464 else
16465   with_valgrind=
16466 fi;
16467 echo "$as_me:16467: result: ${with_valgrind:-no}" >&5
16468 echo "${ECHO_T}${with_valgrind:-no}" >&6
16469
16470 case .$with_cflags in
16471 (.*-g*)
16472         case .$CFLAGS in
16473         (.*-g*)
16474                 ;;
16475         (*)
16476
16477 cf_fix_cppflags=no
16478 cf_new_cflags=
16479 cf_new_cppflags=
16480 cf_new_extra_cppflags=
16481
16482 for cf_add_cflags in -g
16483 do
16484 case $cf_fix_cppflags in
16485 (no)
16486         case $cf_add_cflags in
16487         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16488                 case $cf_add_cflags in
16489                 (-D*)
16490                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16491
16492                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16493                                 && test -z "${cf_tst_cflags}" \
16494                                 && cf_fix_cppflags=yes
16495
16496                         if test $cf_fix_cppflags = yes ; then
16497
16498         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16499         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16500
16501                                 continue
16502                         elif test "${cf_tst_cflags}" = "\"'" ; then
16503
16504         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16505         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16506
16507                                 continue
16508                         fi
16509                         ;;
16510                 esac
16511                 case "$CPPFLAGS" in
16512                 (*$cf_add_cflags)
16513                         ;;
16514                 (*)
16515                         case $cf_add_cflags in
16516                         (-D*)
16517                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16518
16519 CPPFLAGS=`echo "$CPPFLAGS" | \
16520         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16521                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16522
16523                                 ;;
16524                         esac
16525
16526         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16527         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16528
16529                         ;;
16530                 esac
16531                 ;;
16532         (*)
16533
16534         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16535         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16536
16537                 ;;
16538         esac
16539         ;;
16540 (yes)
16541
16542         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16543         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16544
16545         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16546
16547         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16548                 && test -z "${cf_tst_cflags}" \
16549                 && cf_fix_cppflags=no
16550         ;;
16551 esac
16552 done
16553
16554 if test -n "$cf_new_cflags" ; then
16555
16556         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16557         CFLAGS="${CFLAGS}$cf_new_cflags"
16558
16559 fi
16560
16561 if test -n "$cf_new_cppflags" ; then
16562
16563         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16564         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16565
16566 fi
16567
16568 if test -n "$cf_new_extra_cppflags" ; then
16569
16570         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16571         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16572
16573 fi
16574
16575                 ;;
16576         esac
16577         ;;
16578 esac
16579
16580 echo "$as_me:16580: checking if you want to perform memory-leak testing" >&5
16581 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16582
16583 # Check whether --enable-leaks or --disable-leaks was given.
16584 if test "${enable_leaks+set}" = set; then
16585   enableval="$enable_leaks"
16586   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16587 else
16588   : ${with_no_leaks:=no}
16589 fi;
16590 echo "$as_me:16590: result: $with_no_leaks" >&5
16591 echo "${ECHO_T}$with_no_leaks" >&6
16592
16593 if test "$with_no_leaks" = yes ; then
16594
16595 cat >>confdefs.h <<\EOF
16596 #define NO_LEAKS 1
16597 EOF
16598
16599 cat >>confdefs.h <<\EOF
16600 #define YY_NO_LEAKS 1
16601 EOF
16602
16603 fi
16604
16605 cat >>confdefs.h <<\EOF
16606 #define HAVE_NC_ALLOC_H 1
16607 EOF
16608
16609 ###     use option --enable-expanded to generate certain macros as functions
16610
16611 # Check whether --enable-expanded or --disable-expanded was given.
16612 if test "${enable_expanded+set}" = set; then
16613   enableval="$enable_expanded"
16614   test "x$enableval" = xyes &&
16615 cat >>confdefs.h <<\EOF
16616 #define NCURSES_EXPANDED 1
16617 EOF
16618
16619 fi;
16620
16621 ###     use option --disable-macros to suppress macros in favor of functions
16622
16623 # Check whether --enable-macros or --disable-macros was given.
16624 if test "${enable_macros+set}" = set; then
16625   enableval="$enable_macros"
16626   test "$enableval" = no &&
16627 cat >>confdefs.h <<\EOF
16628 #define NCURSES_NOMACROS 1
16629 EOF
16630
16631 fi;
16632
16633 # Normally we only add trace() to the debug-library.  Allow this to be
16634 # extended to all models of the ncurses library:
16635 cf_all_traces=no
16636 case "$CFLAGS $CPPFLAGS" in
16637 (*-DTRACE*)
16638         cf_all_traces=yes
16639         ;;
16640 esac
16641
16642 echo "$as_me:16642: checking whether to add trace feature to all models" >&5
16643 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16644
16645 # Check whether --with-trace or --without-trace was given.
16646 if test "${with_trace+set}" = set; then
16647   withval="$with_trace"
16648   cf_with_trace=$withval
16649 else
16650   cf_with_trace=$cf_all_traces
16651 fi;
16652 echo "$as_me:16652: result: $cf_with_trace" >&5
16653 echo "${ECHO_T}$cf_with_trace" >&6
16654
16655 if test "x$cf_with_trace" = xyes ; then
16656         LIB_TRACING=all
16657         ADA_TRACE=TRUE
16658
16659 cf_fix_cppflags=no
16660 cf_new_cflags=
16661 cf_new_cppflags=
16662 cf_new_extra_cppflags=
16663
16664 for cf_add_cflags in -DTRACE
16665 do
16666 case $cf_fix_cppflags in
16667 (no)
16668         case $cf_add_cflags in
16669         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16670                 case $cf_add_cflags in
16671                 (-D*)
16672                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16673
16674                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16675                                 && test -z "${cf_tst_cflags}" \
16676                                 && cf_fix_cppflags=yes
16677
16678                         if test $cf_fix_cppflags = yes ; then
16679
16680         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16681         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16682
16683                                 continue
16684                         elif test "${cf_tst_cflags}" = "\"'" ; then
16685
16686         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16687         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16688
16689                                 continue
16690                         fi
16691                         ;;
16692                 esac
16693                 case "$CPPFLAGS" in
16694                 (*$cf_add_cflags)
16695                         ;;
16696                 (*)
16697                         case $cf_add_cflags in
16698                         (-D*)
16699                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16700
16701 CPPFLAGS=`echo "$CPPFLAGS" | \
16702         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16703                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16704
16705                                 ;;
16706                         esac
16707
16708         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16709         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16710
16711                         ;;
16712                 esac
16713                 ;;
16714         (*)
16715
16716         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16717         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16718
16719                 ;;
16720         esac
16721         ;;
16722 (yes)
16723
16724         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16725         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16726
16727         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16728
16729         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16730                 && test -z "${cf_tst_cflags}" \
16731                 && cf_fix_cppflags=no
16732         ;;
16733 esac
16734 done
16735
16736 if test -n "$cf_new_cflags" ; then
16737
16738         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16739         CFLAGS="${CFLAGS}$cf_new_cflags"
16740
16741 fi
16742
16743 if test -n "$cf_new_cppflags" ; then
16744
16745         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16746         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16747
16748 fi
16749
16750 if test -n "$cf_new_extra_cppflags" ; then
16751
16752         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16753         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16754
16755 fi
16756
16757 cat >>confdefs.h <<\EOF
16758 #define HAVE__TRACEF 1
16759 EOF
16760
16761 else
16762         LIB_TRACING=DEBUG
16763         ADA_TRACE=FALSE
16764 fi
16765
16766 echo "$as_me:16766: checking if we want to use GNAT projects" >&5
16767 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16768
16769 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16770 if test "${enable_gnat_projects+set}" = set; then
16771   enableval="$enable_gnat_projects"
16772   test "$enableval" != no && enableval=yes
16773         if test "$enableval" != "yes" ; then
16774     enable_gnat_projects=no
16775         else
16776                 enable_gnat_projects=yes
16777         fi
16778 else
16779   enableval=yes
16780         enable_gnat_projects=yes
16781
16782 fi;
16783 echo "$as_me:16783: result: $enable_gnat_projects" >&5
16784 echo "${ECHO_T}$enable_gnat_projects" >&6
16785
16786 ###     Checks for libraries.
16787 case $cf_cv_system_name in
16788 (*mingw32*|*mingw64*)
16789         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
16790         LIBS=" -lpsapi $LIBS"
16791         ;;
16792 (*)
16793 echo "$as_me:16793: checking for gettimeofday" >&5
16794 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16795 if test "${ac_cv_func_gettimeofday+set}" = set; then
16796   echo $ECHO_N "(cached) $ECHO_C" >&6
16797 else
16798   cat >conftest.$ac_ext <<_ACEOF
16799 #line 16799 "configure"
16800 #include "confdefs.h"
16801 #define gettimeofday autoconf_temporary
16802 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16803 #undef gettimeofday
16804
16805 #ifdef __cplusplus
16806 extern "C"
16807 #endif
16808
16809 /* We use char because int might match the return type of a gcc2
16810    builtin and then its argument prototype would still apply.  */
16811 char gettimeofday (void);
16812
16813 int
16814 main (void)
16815 {
16816
16817 /* The GNU C library defines stubs for functions which it implements
16818     to always fail with ENOSYS.  Some functions are actually named
16819     something starting with __ and the normal name is an alias.  */
16820 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16821 #error found stub for gettimeofday
16822 #endif
16823
16824         return gettimeofday ();
16825   ;
16826   return 0;
16827 }
16828 _ACEOF
16829 rm -f conftest.$ac_objext conftest$ac_exeext
16830 if { (eval echo "$as_me:16830: \"$ac_link\"") >&5
16831   (eval $ac_link) 2>&5
16832   ac_status=$?
16833   echo "$as_me:16833: \$? = $ac_status" >&5
16834   (exit $ac_status); } &&
16835          { ac_try='test -s conftest$ac_exeext'
16836   { (eval echo "$as_me:16836: \"$ac_try\"") >&5
16837   (eval $ac_try) 2>&5
16838   ac_status=$?
16839   echo "$as_me:16839: \$? = $ac_status" >&5
16840   (exit $ac_status); }; }; then
16841   ac_cv_func_gettimeofday=yes
16842 else
16843   echo "$as_me: failed program was:" >&5
16844 cat conftest.$ac_ext >&5
16845 ac_cv_func_gettimeofday=no
16846 fi
16847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16848 fi
16849 echo "$as_me:16849: result: $ac_cv_func_gettimeofday" >&5
16850 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16851 if test $ac_cv_func_gettimeofday = yes; then
16852
16853 cat >>confdefs.h <<\EOF
16854 #define HAVE_GETTIMEOFDAY 1
16855 EOF
16856
16857 else
16858
16859 echo "$as_me:16859: checking for gettimeofday in -lbsd" >&5
16860 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16861 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16862   echo $ECHO_N "(cached) $ECHO_C" >&6
16863 else
16864   ac_check_lib_save_LIBS=$LIBS
16865 LIBS="-lbsd  $LIBS"
16866 cat >conftest.$ac_ext <<_ACEOF
16867 #line 16867 "configure"
16868 #include "confdefs.h"
16869
16870 /* Override any gcc2 internal prototype to avoid an error.  */
16871 #ifdef __cplusplus
16872 extern "C"
16873 #endif
16874 /* We use char because int might match the return type of a gcc2
16875    builtin and then its argument prototype would still apply.  */
16876 char gettimeofday ();
16877 int
16878 main (void)
16879 {
16880 gettimeofday ();
16881   ;
16882   return 0;
16883 }
16884 _ACEOF
16885 rm -f conftest.$ac_objext conftest$ac_exeext
16886 if { (eval echo "$as_me:16886: \"$ac_link\"") >&5
16887   (eval $ac_link) 2>&5
16888   ac_status=$?
16889   echo "$as_me:16889: \$? = $ac_status" >&5
16890   (exit $ac_status); } &&
16891          { ac_try='test -s conftest$ac_exeext'
16892   { (eval echo "$as_me:16892: \"$ac_try\"") >&5
16893   (eval $ac_try) 2>&5
16894   ac_status=$?
16895   echo "$as_me:16895: \$? = $ac_status" >&5
16896   (exit $ac_status); }; }; then
16897   ac_cv_lib_bsd_gettimeofday=yes
16898 else
16899   echo "$as_me: failed program was:" >&5
16900 cat conftest.$ac_ext >&5
16901 ac_cv_lib_bsd_gettimeofday=no
16902 fi
16903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16904 LIBS=$ac_check_lib_save_LIBS
16905 fi
16906 echo "$as_me:16906: result: $ac_cv_lib_bsd_gettimeofday" >&5
16907 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16908 if test $ac_cv_lib_bsd_gettimeofday = yes; then
16909
16910 cat >>confdefs.h <<\EOF
16911 #define HAVE_GETTIMEOFDAY 1
16912 EOF
16913
16914 cf_add_libs="-lbsd"
16915 # Filter out duplicates - this happens with badly-designed ".pc" files...
16916 for cf_add_1lib in $LIBS
16917 do
16918         for cf_add_2lib in $cf_add_libs
16919         do
16920                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16921                 then
16922                         cf_add_1lib=
16923                         break
16924                 fi
16925         done
16926         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16927 done
16928 LIBS="$cf_add_libs"
16929
16930 fi
16931
16932 fi
16933         ;;
16934 esac
16935
16936 echo "$as_me:16936: checking if -lm needed for math functions" >&5
16937 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
16938 if test "${cf_cv_need_libm+set}" = set; then
16939   echo $ECHO_N "(cached) $ECHO_C" >&6
16940 else
16941
16942         cat >conftest.$ac_ext <<_ACEOF
16943 #line 16943 "configure"
16944 #include "confdefs.h"
16945
16946         #include <stdio.h>
16947         #include <stdlib.h>
16948         #include <math.h>
16949
16950 int
16951 main (void)
16952 {
16953 double x = rand(); printf("result = %g\n", pow(sin(x),x))
16954   ;
16955   return 0;
16956 }
16957 _ACEOF
16958 rm -f conftest.$ac_objext conftest$ac_exeext
16959 if { (eval echo "$as_me:16959: \"$ac_link\"") >&5
16960   (eval $ac_link) 2>&5
16961   ac_status=$?
16962   echo "$as_me:16962: \$? = $ac_status" >&5
16963   (exit $ac_status); } &&
16964          { ac_try='test -s conftest$ac_exeext'
16965   { (eval echo "$as_me:16965: \"$ac_try\"") >&5
16966   (eval $ac_try) 2>&5
16967   ac_status=$?
16968   echo "$as_me:16968: \$? = $ac_status" >&5
16969   (exit $ac_status); }; }; then
16970   cf_cv_need_libm=no
16971 else
16972   echo "$as_me: failed program was:" >&5
16973 cat conftest.$ac_ext >&5
16974 cf_cv_need_libm=yes
16975 fi
16976 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16977 fi
16978 echo "$as_me:16978: result: $cf_cv_need_libm" >&5
16979 echo "${ECHO_T}$cf_cv_need_libm" >&6
16980 if test "$cf_cv_need_libm" = yes
16981 then
16982 MATH_LIB=-lm
16983 fi
16984
16985 ###     Checks for header files.
16986 echo "$as_me:16986: checking for ANSI C header files" >&5
16987 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16988 if test "${ac_cv_header_stdc+set}" = set; then
16989   echo $ECHO_N "(cached) $ECHO_C" >&6
16990 else
16991   cat >conftest.$ac_ext <<_ACEOF
16992 #line 16992 "configure"
16993 #include "confdefs.h"
16994 #include <stdlib.h>
16995 #include <stdarg.h>
16996 #include <string.h>
16997 #include <float.h>
16998
16999 _ACEOF
17000 if { (eval echo "$as_me:17000: \"$ac_cpp conftest.$ac_ext\"") >&5
17001   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17002   ac_status=$?
17003   egrep -v '^ *\+' conftest.er1 >conftest.err
17004   rm -f conftest.er1
17005   cat conftest.err >&5
17006   echo "$as_me:17006: \$? = $ac_status" >&5
17007   (exit $ac_status); } >/dev/null; then
17008   if test -s conftest.err; then
17009     ac_cpp_err=$ac_c_preproc_warn_flag
17010   else
17011     ac_cpp_err=
17012   fi
17013 else
17014   ac_cpp_err=yes
17015 fi
17016 if test -z "$ac_cpp_err"; then
17017   ac_cv_header_stdc=yes
17018 else
17019   echo "$as_me: failed program was:" >&5
17020   cat conftest.$ac_ext >&5
17021   ac_cv_header_stdc=no
17022 fi
17023 rm -f conftest.err conftest.$ac_ext
17024
17025 if test $ac_cv_header_stdc = yes; then
17026   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17027   cat >conftest.$ac_ext <<_ACEOF
17028 #line 17028 "configure"
17029 #include "confdefs.h"
17030 #include <string.h>
17031
17032 _ACEOF
17033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17034   egrep "memchr" >/dev/null 2>&1; then
17035   :
17036 else
17037   ac_cv_header_stdc=no
17038 fi
17039 rm -rf conftest*
17040
17041 fi
17042
17043 if test $ac_cv_header_stdc = yes; then
17044   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17045   cat >conftest.$ac_ext <<_ACEOF
17046 #line 17046 "configure"
17047 #include "confdefs.h"
17048 #include <stdlib.h>
17049
17050 _ACEOF
17051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17052   egrep "free" >/dev/null 2>&1; then
17053   :
17054 else
17055   ac_cv_header_stdc=no
17056 fi
17057 rm -rf conftest*
17058
17059 fi
17060
17061 if test $ac_cv_header_stdc = yes; then
17062   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17063   if test "$cross_compiling" = yes; then
17064   :
17065 else
17066   cat >conftest.$ac_ext <<_ACEOF
17067 #line 17067 "configure"
17068 #include "confdefs.h"
17069 #include <ctype.h>
17070 #if ((' ' & 0x0FF) == 0x020)
17071 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17072 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17073 #else
17074 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17075                      || ('j' <= (c) && (c) <= 'r') \
17076                      || ('s' <= (c) && (c) <= 'z'))
17077 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17078 #endif
17079
17080 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17081 int
17082 main (void)
17083 {
17084   int i;
17085   for (i = 0; i < 256; i++)
17086     if (XOR (islower (i), ISLOWER (i))
17087         || toupper (i) != TOUPPER (i))
17088       $ac_main_return(2);
17089   $ac_main_return (0);
17090 }
17091 _ACEOF
17092 rm -f conftest$ac_exeext
17093 if { (eval echo "$as_me:17093: \"$ac_link\"") >&5
17094   (eval $ac_link) 2>&5
17095   ac_status=$?
17096   echo "$as_me:17096: \$? = $ac_status" >&5
17097   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17098   { (eval echo "$as_me:17098: \"$ac_try\"") >&5
17099   (eval $ac_try) 2>&5
17100   ac_status=$?
17101   echo "$as_me:17101: \$? = $ac_status" >&5
17102   (exit $ac_status); }; }; then
17103   :
17104 else
17105   echo "$as_me: program exited with status $ac_status" >&5
17106 echo "$as_me: failed program was:" >&5
17107 cat conftest.$ac_ext >&5
17108 ac_cv_header_stdc=no
17109 fi
17110 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17111 fi
17112 fi
17113 fi
17114 echo "$as_me:17114: result: $ac_cv_header_stdc" >&5
17115 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17116 if test $ac_cv_header_stdc = yes; then
17117
17118 cat >>confdefs.h <<\EOF
17119 #define STDC_HEADERS 1
17120 EOF
17121
17122 fi
17123
17124 ac_header_dirent=no
17125 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17126   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17127 echo "$as_me:17127: checking for $ac_hdr that defines DIR" >&5
17128 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17129 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17130   echo $ECHO_N "(cached) $ECHO_C" >&6
17131 else
17132   cat >conftest.$ac_ext <<_ACEOF
17133 #line 17133 "configure"
17134 #include "confdefs.h"
17135 #include <sys/types.h>
17136 #include <$ac_hdr>
17137
17138 int
17139 main (void)
17140 {
17141 if ((DIR *) 0)
17142 return 0;
17143   ;
17144   return 0;
17145 }
17146 _ACEOF
17147 rm -f conftest.$ac_objext
17148 if { (eval echo "$as_me:17148: \"$ac_compile\"") >&5
17149   (eval $ac_compile) 2>&5
17150   ac_status=$?
17151   echo "$as_me:17151: \$? = $ac_status" >&5
17152   (exit $ac_status); } &&
17153          { ac_try='test -s conftest.$ac_objext'
17154   { (eval echo "$as_me:17154: \"$ac_try\"") >&5
17155   (eval $ac_try) 2>&5
17156   ac_status=$?
17157   echo "$as_me:17157: \$? = $ac_status" >&5
17158   (exit $ac_status); }; }; then
17159   eval "$as_ac_Header=yes"
17160 else
17161   echo "$as_me: failed program was:" >&5
17162 cat conftest.$ac_ext >&5
17163 eval "$as_ac_Header=no"
17164 fi
17165 rm -f conftest.$ac_objext conftest.$ac_ext
17166 fi
17167 echo "$as_me:17167: result: `eval echo '${'$as_ac_Header'}'`" >&5
17168 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17169 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17170   cat >>confdefs.h <<EOF
17171 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17172 EOF
17173
17174 ac_header_dirent=$ac_hdr; break
17175 fi
17176
17177 done
17178 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17179 if test $ac_header_dirent = dirent.h; then
17180   echo "$as_me:17180: checking for opendir in -ldir" >&5
17181 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17182 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17183   echo $ECHO_N "(cached) $ECHO_C" >&6
17184 else
17185   ac_check_lib_save_LIBS=$LIBS
17186 LIBS="-ldir  $LIBS"
17187 cat >conftest.$ac_ext <<_ACEOF
17188 #line 17188 "configure"
17189 #include "confdefs.h"
17190
17191 /* Override any gcc2 internal prototype to avoid an error.  */
17192 #ifdef __cplusplus
17193 extern "C"
17194 #endif
17195 /* We use char because int might match the return type of a gcc2
17196    builtin and then its argument prototype would still apply.  */
17197 char opendir ();
17198 int
17199 main (void)
17200 {
17201 opendir ();
17202   ;
17203   return 0;
17204 }
17205 _ACEOF
17206 rm -f conftest.$ac_objext conftest$ac_exeext
17207 if { (eval echo "$as_me:17207: \"$ac_link\"") >&5
17208   (eval $ac_link) 2>&5
17209   ac_status=$?
17210   echo "$as_me:17210: \$? = $ac_status" >&5
17211   (exit $ac_status); } &&
17212          { ac_try='test -s conftest$ac_exeext'
17213   { (eval echo "$as_me:17213: \"$ac_try\"") >&5
17214   (eval $ac_try) 2>&5
17215   ac_status=$?
17216   echo "$as_me:17216: \$? = $ac_status" >&5
17217   (exit $ac_status); }; }; then
17218   ac_cv_lib_dir_opendir=yes
17219 else
17220   echo "$as_me: failed program was:" >&5
17221 cat conftest.$ac_ext >&5
17222 ac_cv_lib_dir_opendir=no
17223 fi
17224 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17225 LIBS=$ac_check_lib_save_LIBS
17226 fi
17227 echo "$as_me:17227: result: $ac_cv_lib_dir_opendir" >&5
17228 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17229 if test $ac_cv_lib_dir_opendir = yes; then
17230   LIBS="$LIBS -ldir"
17231 fi
17232
17233 else
17234   echo "$as_me:17234: checking for opendir in -lx" >&5
17235 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17236 if test "${ac_cv_lib_x_opendir+set}" = set; then
17237   echo $ECHO_N "(cached) $ECHO_C" >&6
17238 else
17239   ac_check_lib_save_LIBS=$LIBS
17240 LIBS="-lx  $LIBS"
17241 cat >conftest.$ac_ext <<_ACEOF
17242 #line 17242 "configure"
17243 #include "confdefs.h"
17244
17245 /* Override any gcc2 internal prototype to avoid an error.  */
17246 #ifdef __cplusplus
17247 extern "C"
17248 #endif
17249 /* We use char because int might match the return type of a gcc2
17250    builtin and then its argument prototype would still apply.  */
17251 char opendir ();
17252 int
17253 main (void)
17254 {
17255 opendir ();
17256   ;
17257   return 0;
17258 }
17259 _ACEOF
17260 rm -f conftest.$ac_objext conftest$ac_exeext
17261 if { (eval echo "$as_me:17261: \"$ac_link\"") >&5
17262   (eval $ac_link) 2>&5
17263   ac_status=$?
17264   echo "$as_me:17264: \$? = $ac_status" >&5
17265   (exit $ac_status); } &&
17266          { ac_try='test -s conftest$ac_exeext'
17267   { (eval echo "$as_me:17267: \"$ac_try\"") >&5
17268   (eval $ac_try) 2>&5
17269   ac_status=$?
17270   echo "$as_me:17270: \$? = $ac_status" >&5
17271   (exit $ac_status); }; }; then
17272   ac_cv_lib_x_opendir=yes
17273 else
17274   echo "$as_me: failed program was:" >&5
17275 cat conftest.$ac_ext >&5
17276 ac_cv_lib_x_opendir=no
17277 fi
17278 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17279 LIBS=$ac_check_lib_save_LIBS
17280 fi
17281 echo "$as_me:17281: result: $ac_cv_lib_x_opendir" >&5
17282 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17283 if test $ac_cv_lib_x_opendir = yes; then
17284   LIBS="$LIBS -lx"
17285 fi
17286
17287 fi
17288
17289 echo "$as_me:17289: checking whether time.h and sys/time.h may both be included" >&5
17290 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17291 if test "${ac_cv_header_time+set}" = set; then
17292   echo $ECHO_N "(cached) $ECHO_C" >&6
17293 else
17294   cat >conftest.$ac_ext <<_ACEOF
17295 #line 17295 "configure"
17296 #include "confdefs.h"
17297 #include <sys/types.h>
17298 #include <sys/time.h>
17299 #include <time.h>
17300
17301 int
17302 main (void)
17303 {
17304 if ((struct tm *) 0)
17305 return 0;
17306   ;
17307   return 0;
17308 }
17309 _ACEOF
17310 rm -f conftest.$ac_objext
17311 if { (eval echo "$as_me:17311: \"$ac_compile\"") >&5
17312   (eval $ac_compile) 2>&5
17313   ac_status=$?
17314   echo "$as_me:17314: \$? = $ac_status" >&5
17315   (exit $ac_status); } &&
17316          { ac_try='test -s conftest.$ac_objext'
17317   { (eval echo "$as_me:17317: \"$ac_try\"") >&5
17318   (eval $ac_try) 2>&5
17319   ac_status=$?
17320   echo "$as_me:17320: \$? = $ac_status" >&5
17321   (exit $ac_status); }; }; then
17322   ac_cv_header_time=yes
17323 else
17324   echo "$as_me: failed program was:" >&5
17325 cat conftest.$ac_ext >&5
17326 ac_cv_header_time=no
17327 fi
17328 rm -f conftest.$ac_objext conftest.$ac_ext
17329 fi
17330 echo "$as_me:17330: result: $ac_cv_header_time" >&5
17331 echo "${ECHO_T}$ac_cv_header_time" >&6
17332 if test $ac_cv_header_time = yes; then
17333
17334 cat >>confdefs.h <<\EOF
17335 #define TIME_WITH_SYS_TIME 1
17336 EOF
17337
17338 fi
17339
17340 cf_regex_func=no
17341
17342 cf_regex_libs="regex re"
17343 case $host_os in
17344 (mingw*)
17345         cf_regex_libs="gnurx $cf_regex_libs"
17346         ;;
17347 esac
17348
17349 echo "$as_me:17349: checking for regcomp" >&5
17350 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17351 if test "${ac_cv_func_regcomp+set}" = set; then
17352   echo $ECHO_N "(cached) $ECHO_C" >&6
17353 else
17354   cat >conftest.$ac_ext <<_ACEOF
17355 #line 17355 "configure"
17356 #include "confdefs.h"
17357 #define regcomp autoconf_temporary
17358 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17359 #undef regcomp
17360
17361 #ifdef __cplusplus
17362 extern "C"
17363 #endif
17364
17365 /* We use char because int might match the return type of a gcc2
17366    builtin and then its argument prototype would still apply.  */
17367 char regcomp (void);
17368
17369 int
17370 main (void)
17371 {
17372
17373 /* The GNU C library defines stubs for functions which it implements
17374     to always fail with ENOSYS.  Some functions are actually named
17375     something starting with __ and the normal name is an alias.  */
17376 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17377 #error found stub for regcomp
17378 #endif
17379
17380         return regcomp ();
17381   ;
17382   return 0;
17383 }
17384 _ACEOF
17385 rm -f conftest.$ac_objext conftest$ac_exeext
17386 if { (eval echo "$as_me:17386: \"$ac_link\"") >&5
17387   (eval $ac_link) 2>&5
17388   ac_status=$?
17389   echo "$as_me:17389: \$? = $ac_status" >&5
17390   (exit $ac_status); } &&
17391          { ac_try='test -s conftest$ac_exeext'
17392   { (eval echo "$as_me:17392: \"$ac_try\"") >&5
17393   (eval $ac_try) 2>&5
17394   ac_status=$?
17395   echo "$as_me:17395: \$? = $ac_status" >&5
17396   (exit $ac_status); }; }; then
17397   ac_cv_func_regcomp=yes
17398 else
17399   echo "$as_me: failed program was:" >&5
17400 cat conftest.$ac_ext >&5
17401 ac_cv_func_regcomp=no
17402 fi
17403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17404 fi
17405 echo "$as_me:17405: result: $ac_cv_func_regcomp" >&5
17406 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17407 if test $ac_cv_func_regcomp = yes; then
17408   cf_regex_func=regcomp
17409 else
17410
17411         for cf_regex_lib in $cf_regex_libs
17412         do
17413                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17414 echo "$as_me:17414: checking for regcomp in -l$cf_regex_lib" >&5
17415 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17416 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17417   echo $ECHO_N "(cached) $ECHO_C" >&6
17418 else
17419   ac_check_lib_save_LIBS=$LIBS
17420 LIBS="-l$cf_regex_lib  $LIBS"
17421 cat >conftest.$ac_ext <<_ACEOF
17422 #line 17422 "configure"
17423 #include "confdefs.h"
17424
17425 /* Override any gcc2 internal prototype to avoid an error.  */
17426 #ifdef __cplusplus
17427 extern "C"
17428 #endif
17429 /* We use char because int might match the return type of a gcc2
17430    builtin and then its argument prototype would still apply.  */
17431 char regcomp ();
17432 int
17433 main (void)
17434 {
17435 regcomp ();
17436   ;
17437   return 0;
17438 }
17439 _ACEOF
17440 rm -f conftest.$ac_objext conftest$ac_exeext
17441 if { (eval echo "$as_me:17441: \"$ac_link\"") >&5
17442   (eval $ac_link) 2>&5
17443   ac_status=$?
17444   echo "$as_me:17444: \$? = $ac_status" >&5
17445   (exit $ac_status); } &&
17446          { ac_try='test -s conftest$ac_exeext'
17447   { (eval echo "$as_me:17447: \"$ac_try\"") >&5
17448   (eval $ac_try) 2>&5
17449   ac_status=$?
17450   echo "$as_me:17450: \$? = $ac_status" >&5
17451   (exit $ac_status); }; }; then
17452   eval "$as_ac_Lib=yes"
17453 else
17454   echo "$as_me: failed program was:" >&5
17455 cat conftest.$ac_ext >&5
17456 eval "$as_ac_Lib=no"
17457 fi
17458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17459 LIBS=$ac_check_lib_save_LIBS
17460 fi
17461 echo "$as_me:17461: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17462 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17463 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17464
17465 cf_add_libs="-l$cf_regex_lib"
17466 # Filter out duplicates - this happens with badly-designed ".pc" files...
17467 for cf_add_1lib in $LIBS
17468 do
17469         for cf_add_2lib in $cf_add_libs
17470         do
17471                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17472                 then
17473                         cf_add_1lib=
17474                         break
17475                 fi
17476         done
17477         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17478 done
17479 LIBS="$cf_add_libs"
17480
17481                                 cf_regex_func=regcomp
17482                                 break
17483 fi
17484
17485         done
17486
17487 fi
17488
17489 if test "$cf_regex_func" = no ; then
17490         echo "$as_me:17490: checking for compile" >&5
17491 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17492 if test "${ac_cv_func_compile+set}" = set; then
17493   echo $ECHO_N "(cached) $ECHO_C" >&6
17494 else
17495   cat >conftest.$ac_ext <<_ACEOF
17496 #line 17496 "configure"
17497 #include "confdefs.h"
17498 #define compile autoconf_temporary
17499 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17500 #undef compile
17501
17502 #ifdef __cplusplus
17503 extern "C"
17504 #endif
17505
17506 /* We use char because int might match the return type of a gcc2
17507    builtin and then its argument prototype would still apply.  */
17508 char compile (void);
17509
17510 int
17511 main (void)
17512 {
17513
17514 /* The GNU C library defines stubs for functions which it implements
17515     to always fail with ENOSYS.  Some functions are actually named
17516     something starting with __ and the normal name is an alias.  */
17517 #if defined (__stub_compile) || defined (__stub___compile)
17518 #error found stub for compile
17519 #endif
17520
17521         return compile ();
17522   ;
17523   return 0;
17524 }
17525 _ACEOF
17526 rm -f conftest.$ac_objext conftest$ac_exeext
17527 if { (eval echo "$as_me:17527: \"$ac_link\"") >&5
17528   (eval $ac_link) 2>&5
17529   ac_status=$?
17530   echo "$as_me:17530: \$? = $ac_status" >&5
17531   (exit $ac_status); } &&
17532          { ac_try='test -s conftest$ac_exeext'
17533   { (eval echo "$as_me:17533: \"$ac_try\"") >&5
17534   (eval $ac_try) 2>&5
17535   ac_status=$?
17536   echo "$as_me:17536: \$? = $ac_status" >&5
17537   (exit $ac_status); }; }; then
17538   ac_cv_func_compile=yes
17539 else
17540   echo "$as_me: failed program was:" >&5
17541 cat conftest.$ac_ext >&5
17542 ac_cv_func_compile=no
17543 fi
17544 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17545 fi
17546 echo "$as_me:17546: result: $ac_cv_func_compile" >&5
17547 echo "${ECHO_T}$ac_cv_func_compile" >&6
17548 if test $ac_cv_func_compile = yes; then
17549   cf_regex_func=compile
17550 else
17551
17552                 echo "$as_me:17552: checking for compile in -lgen" >&5
17553 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17554 if test "${ac_cv_lib_gen_compile+set}" = set; then
17555   echo $ECHO_N "(cached) $ECHO_C" >&6
17556 else
17557   ac_check_lib_save_LIBS=$LIBS
17558 LIBS="-lgen  $LIBS"
17559 cat >conftest.$ac_ext <<_ACEOF
17560 #line 17560 "configure"
17561 #include "confdefs.h"
17562
17563 /* Override any gcc2 internal prototype to avoid an error.  */
17564 #ifdef __cplusplus
17565 extern "C"
17566 #endif
17567 /* We use char because int might match the return type of a gcc2
17568    builtin and then its argument prototype would still apply.  */
17569 char compile ();
17570 int
17571 main (void)
17572 {
17573 compile ();
17574   ;
17575   return 0;
17576 }
17577 _ACEOF
17578 rm -f conftest.$ac_objext conftest$ac_exeext
17579 if { (eval echo "$as_me:17579: \"$ac_link\"") >&5
17580   (eval $ac_link) 2>&5
17581   ac_status=$?
17582   echo "$as_me:17582: \$? = $ac_status" >&5
17583   (exit $ac_status); } &&
17584          { ac_try='test -s conftest$ac_exeext'
17585   { (eval echo "$as_me:17585: \"$ac_try\"") >&5
17586   (eval $ac_try) 2>&5
17587   ac_status=$?
17588   echo "$as_me:17588: \$? = $ac_status" >&5
17589   (exit $ac_status); }; }; then
17590   ac_cv_lib_gen_compile=yes
17591 else
17592   echo "$as_me: failed program was:" >&5
17593 cat conftest.$ac_ext >&5
17594 ac_cv_lib_gen_compile=no
17595 fi
17596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17597 LIBS=$ac_check_lib_save_LIBS
17598 fi
17599 echo "$as_me:17599: result: $ac_cv_lib_gen_compile" >&5
17600 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17601 if test $ac_cv_lib_gen_compile = yes; then
17602
17603 cf_add_libs="-lgen"
17604 # Filter out duplicates - this happens with badly-designed ".pc" files...
17605 for cf_add_1lib in $LIBS
17606 do
17607         for cf_add_2lib in $cf_add_libs
17608         do
17609                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17610                 then
17611                         cf_add_1lib=
17612                         break
17613                 fi
17614         done
17615         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17616 done
17617 LIBS="$cf_add_libs"
17618
17619                                 cf_regex_func=compile
17620 fi
17621
17622 fi
17623
17624 fi
17625
17626 if test "$cf_regex_func" = no ; then
17627         { echo "$as_me:17627: WARNING: cannot find regular expression library" >&5
17628 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17629 fi
17630
17631 echo "$as_me:17631: checking for regular-expression headers" >&5
17632 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17633 if test "${cf_cv_regex_hdrs+set}" = set; then
17634   echo $ECHO_N "(cached) $ECHO_C" >&6
17635 else
17636
17637 cf_cv_regex_hdrs=no
17638 case $cf_regex_func in
17639 (compile)
17640         for cf_regex_hdr in regexp.h regexpr.h
17641         do
17642                 cat >conftest.$ac_ext <<_ACEOF
17643 #line 17643 "configure"
17644 #include "confdefs.h"
17645 #include <$cf_regex_hdr>
17646 int
17647 main (void)
17648 {
17649
17650                         char *p = compile("", "", "", 0);
17651                         int x = step("", "");
17652
17653   ;
17654   return 0;
17655 }
17656 _ACEOF
17657 rm -f conftest.$ac_objext conftest$ac_exeext
17658 if { (eval echo "$as_me:17658: \"$ac_link\"") >&5
17659   (eval $ac_link) 2>&5
17660   ac_status=$?
17661   echo "$as_me:17661: \$? = $ac_status" >&5
17662   (exit $ac_status); } &&
17663          { ac_try='test -s conftest$ac_exeext'
17664   { (eval echo "$as_me:17664: \"$ac_try\"") >&5
17665   (eval $ac_try) 2>&5
17666   ac_status=$?
17667   echo "$as_me:17667: \$? = $ac_status" >&5
17668   (exit $ac_status); }; }; then
17669
17670                         cf_cv_regex_hdrs=$cf_regex_hdr
17671                         break
17672
17673 else
17674   echo "$as_me: failed program was:" >&5
17675 cat conftest.$ac_ext >&5
17676 fi
17677 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17678         done
17679         ;;
17680 (*)
17681         for cf_regex_hdr in regex.h
17682         do
17683                 cat >conftest.$ac_ext <<_ACEOF
17684 #line 17684 "configure"
17685 #include "confdefs.h"
17686 #include <sys/types.h>
17687 #include <$cf_regex_hdr>
17688 int
17689 main (void)
17690 {
17691
17692                         regex_t *p;
17693                         int x = regcomp(p, "", 0);
17694                         int y = regexec(p, "", 0, 0, 0);
17695                         regfree(p);
17696
17697   ;
17698   return 0;
17699 }
17700 _ACEOF
17701 rm -f conftest.$ac_objext conftest$ac_exeext
17702 if { (eval echo "$as_me:17702: \"$ac_link\"") >&5
17703   (eval $ac_link) 2>&5
17704   ac_status=$?
17705   echo "$as_me:17705: \$? = $ac_status" >&5
17706   (exit $ac_status); } &&
17707          { ac_try='test -s conftest$ac_exeext'
17708   { (eval echo "$as_me:17708: \"$ac_try\"") >&5
17709   (eval $ac_try) 2>&5
17710   ac_status=$?
17711   echo "$as_me:17711: \$? = $ac_status" >&5
17712   (exit $ac_status); }; }; then
17713
17714                         cf_cv_regex_hdrs=$cf_regex_hdr
17715                         break
17716
17717 else
17718   echo "$as_me: failed program was:" >&5
17719 cat conftest.$ac_ext >&5
17720 fi
17721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17722         done
17723         ;;
17724 esac
17725
17726 fi
17727 echo "$as_me:17727: result: $cf_cv_regex_hdrs" >&5
17728 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
17729
17730 case $cf_cv_regex_hdrs in
17731         (no)            { echo "$as_me:17731: WARNING: no regular expression header found" >&5
17732 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
17733         (regex.h)
17734 cat >>confdefs.h <<\EOF
17735 #define HAVE_REGEX_H_FUNCS 1
17736 EOF
17737  ;;
17738         (regexp.h)
17739 cat >>confdefs.h <<\EOF
17740 #define HAVE_REGEXP_H_FUNCS 1
17741 EOF
17742  ;;
17743         (regexpr.h)
17744 cat >>confdefs.h <<\EOF
17745 #define HAVE_REGEXPR_H_FUNCS 1
17746 EOF
17747  ;;
17748 esac
17749
17750 for ac_header in \
17751 fcntl.h \
17752 getopt.h \
17753 limits.h \
17754 locale.h \
17755 math.h \
17756 poll.h \
17757 sys/bsdtypes.h \
17758 sys/ioctl.h \
17759 sys/param.h \
17760 sys/poll.h \
17761 sys/select.h \
17762 sys/time.h \
17763 sys/times.h \
17764 ttyent.h \
17765 unistd.h \
17766 wctype.h \
17767
17768 do
17769 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17770 echo "$as_me:17770: checking for $ac_header" >&5
17771 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17772 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17773   echo $ECHO_N "(cached) $ECHO_C" >&6
17774 else
17775   cat >conftest.$ac_ext <<_ACEOF
17776 #line 17776 "configure"
17777 #include "confdefs.h"
17778 #include <$ac_header>
17779 _ACEOF
17780 if { (eval echo "$as_me:17780: \"$ac_cpp conftest.$ac_ext\"") >&5
17781   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17782   ac_status=$?
17783   egrep -v '^ *\+' conftest.er1 >conftest.err
17784   rm -f conftest.er1
17785   cat conftest.err >&5
17786   echo "$as_me:17786: \$? = $ac_status" >&5
17787   (exit $ac_status); } >/dev/null; then
17788   if test -s conftest.err; then
17789     ac_cpp_err=$ac_c_preproc_warn_flag
17790   else
17791     ac_cpp_err=
17792   fi
17793 else
17794   ac_cpp_err=yes
17795 fi
17796 if test -z "$ac_cpp_err"; then
17797   eval "$as_ac_Header=yes"
17798 else
17799   echo "$as_me: failed program was:" >&5
17800   cat conftest.$ac_ext >&5
17801   eval "$as_ac_Header=no"
17802 fi
17803 rm -f conftest.err conftest.$ac_ext
17804 fi
17805 echo "$as_me:17805: result: `eval echo '${'$as_ac_Header'}'`" >&5
17806 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17807 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17808   cat >>confdefs.h <<EOF
17809 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17810 EOF
17811
17812 fi
17813 done
17814
17815 for ac_header in unistd.h getopt.h
17816 do
17817 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17818 echo "$as_me:17818: checking for $ac_header" >&5
17819 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17820 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17821   echo $ECHO_N "(cached) $ECHO_C" >&6
17822 else
17823   cat >conftest.$ac_ext <<_ACEOF
17824 #line 17824 "configure"
17825 #include "confdefs.h"
17826 #include <$ac_header>
17827 _ACEOF
17828 if { (eval echo "$as_me:17828: \"$ac_cpp conftest.$ac_ext\"") >&5
17829   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17830   ac_status=$?
17831   egrep -v '^ *\+' conftest.er1 >conftest.err
17832   rm -f conftest.er1
17833   cat conftest.err >&5
17834   echo "$as_me:17834: \$? = $ac_status" >&5
17835   (exit $ac_status); } >/dev/null; then
17836   if test -s conftest.err; then
17837     ac_cpp_err=$ac_c_preproc_warn_flag
17838   else
17839     ac_cpp_err=
17840   fi
17841 else
17842   ac_cpp_err=yes
17843 fi
17844 if test -z "$ac_cpp_err"; then
17845   eval "$as_ac_Header=yes"
17846 else
17847   echo "$as_me: failed program was:" >&5
17848   cat conftest.$ac_ext >&5
17849   eval "$as_ac_Header=no"
17850 fi
17851 rm -f conftest.err conftest.$ac_ext
17852 fi
17853 echo "$as_me:17853: result: `eval echo '${'$as_ac_Header'}'`" >&5
17854 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17855 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17856   cat >>confdefs.h <<EOF
17857 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17858 EOF
17859
17860 fi
17861 done
17862
17863 echo "$as_me:17863: checking for header declaring getopt variables" >&5
17864 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17865 if test "${cf_cv_getopt_header+set}" = set; then
17866   echo $ECHO_N "(cached) $ECHO_C" >&6
17867 else
17868
17869 cf_cv_getopt_header=none
17870 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17871 do
17872 cat >conftest.$ac_ext <<_ACEOF
17873 #line 17873 "configure"
17874 #include "confdefs.h"
17875
17876 #include <$cf_header>
17877 int
17878 main (void)
17879 {
17880 int x = optind; char *y = optarg
17881   ;
17882   return 0;
17883 }
17884 _ACEOF
17885 rm -f conftest.$ac_objext
17886 if { (eval echo "$as_me:17886: \"$ac_compile\"") >&5
17887   (eval $ac_compile) 2>&5
17888   ac_status=$?
17889   echo "$as_me:17889: \$? = $ac_status" >&5
17890   (exit $ac_status); } &&
17891          { ac_try='test -s conftest.$ac_objext'
17892   { (eval echo "$as_me:17892: \"$ac_try\"") >&5
17893   (eval $ac_try) 2>&5
17894   ac_status=$?
17895   echo "$as_me:17895: \$? = $ac_status" >&5
17896   (exit $ac_status); }; }; then
17897   cf_cv_getopt_header=$cf_header
17898  break
17899 else
17900   echo "$as_me: failed program was:" >&5
17901 cat conftest.$ac_ext >&5
17902 fi
17903 rm -f conftest.$ac_objext conftest.$ac_ext
17904 done
17905
17906 fi
17907 echo "$as_me:17907: result: $cf_cv_getopt_header" >&5
17908 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17909 if test $cf_cv_getopt_header != none ; then
17910
17911 cat >>confdefs.h <<\EOF
17912 #define HAVE_GETOPT_HEADER 1
17913 EOF
17914
17915 fi
17916 if test $cf_cv_getopt_header = getopt.h ; then
17917
17918 cat >>confdefs.h <<\EOF
17919 #define NEED_GETOPT_H 1
17920 EOF
17921
17922 fi
17923
17924 echo "$as_me:17924: checking if external environ is declared" >&5
17925 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
17926 if test "${cf_cv_dcl_environ+set}" = set; then
17927   echo $ECHO_N "(cached) $ECHO_C" >&6
17928 else
17929
17930     cat >conftest.$ac_ext <<_ACEOF
17931 #line 17931 "configure"
17932 #include "confdefs.h"
17933
17934 #ifdef HAVE_STDLIB_H
17935 #include <stdlib.h>
17936 #endif
17937 #include <unistd.h>
17938 int
17939 main (void)
17940 {
17941 int x = (int) environ
17942   ;
17943   return 0;
17944 }
17945 _ACEOF
17946 rm -f conftest.$ac_objext
17947 if { (eval echo "$as_me:17947: \"$ac_compile\"") >&5
17948   (eval $ac_compile) 2>&5
17949   ac_status=$?
17950   echo "$as_me:17950: \$? = $ac_status" >&5
17951   (exit $ac_status); } &&
17952          { ac_try='test -s conftest.$ac_objext'
17953   { (eval echo "$as_me:17953: \"$ac_try\"") >&5
17954   (eval $ac_try) 2>&5
17955   ac_status=$?
17956   echo "$as_me:17956: \$? = $ac_status" >&5
17957   (exit $ac_status); }; }; then
17958   cf_cv_dcl_environ=yes
17959 else
17960   echo "$as_me: failed program was:" >&5
17961 cat conftest.$ac_ext >&5
17962 cf_cv_dcl_environ=no
17963 fi
17964 rm -f conftest.$ac_objext conftest.$ac_ext
17965
17966 fi
17967 echo "$as_me:17967: result: $cf_cv_dcl_environ" >&5
17968 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
17969
17970 if test "$cf_cv_dcl_environ" = no ; then
17971
17972 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17973
17974     cat >>confdefs.h <<EOF
17975 #define $cf_result 1
17976 EOF
17977
17978 fi
17979
17980 # It's possible (for near-UNIX clones) that the data doesn't exist
17981
17982 echo "$as_me:17982: checking if external environ exists" >&5
17983 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
17984 if test "${cf_cv_have_environ+set}" = set; then
17985   echo $ECHO_N "(cached) $ECHO_C" >&6
17986 else
17987
17988         cat >conftest.$ac_ext <<_ACEOF
17989 #line 17989 "configure"
17990 #include "confdefs.h"
17991
17992 #undef environ
17993 extern int environ;
17994
17995 int
17996 main (void)
17997 {
17998 environ = 2
17999   ;
18000   return 0;
18001 }
18002 _ACEOF
18003 rm -f conftest.$ac_objext conftest$ac_exeext
18004 if { (eval echo "$as_me:18004: \"$ac_link\"") >&5
18005   (eval $ac_link) 2>&5
18006   ac_status=$?
18007   echo "$as_me:18007: \$? = $ac_status" >&5
18008   (exit $ac_status); } &&
18009          { ac_try='test -s conftest$ac_exeext'
18010   { (eval echo "$as_me:18010: \"$ac_try\"") >&5
18011   (eval $ac_try) 2>&5
18012   ac_status=$?
18013   echo "$as_me:18013: \$? = $ac_status" >&5
18014   (exit $ac_status); }; }; then
18015   cf_cv_have_environ=yes
18016 else
18017   echo "$as_me: failed program was:" >&5
18018 cat conftest.$ac_ext >&5
18019 cf_cv_have_environ=no
18020 fi
18021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18022
18023 fi
18024 echo "$as_me:18024: result: $cf_cv_have_environ" >&5
18025 echo "${ECHO_T}$cf_cv_have_environ" >&6
18026
18027 if test "$cf_cv_have_environ" = yes ; then
18028
18029 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18030
18031         cat >>confdefs.h <<EOF
18032 #define $cf_result 1
18033 EOF
18034
18035 fi
18036
18037 echo "$as_me:18037: checking for getenv" >&5
18038 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18039 if test "${ac_cv_func_getenv+set}" = set; then
18040   echo $ECHO_N "(cached) $ECHO_C" >&6
18041 else
18042   cat >conftest.$ac_ext <<_ACEOF
18043 #line 18043 "configure"
18044 #include "confdefs.h"
18045 #define getenv autoconf_temporary
18046 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18047 #undef getenv
18048
18049 #ifdef __cplusplus
18050 extern "C"
18051 #endif
18052
18053 /* We use char because int might match the return type of a gcc2
18054    builtin and then its argument prototype would still apply.  */
18055 char getenv (void);
18056
18057 int
18058 main (void)
18059 {
18060
18061 /* The GNU C library defines stubs for functions which it implements
18062     to always fail with ENOSYS.  Some functions are actually named
18063     something starting with __ and the normal name is an alias.  */
18064 #if defined (__stub_getenv) || defined (__stub___getenv)
18065 #error found stub for getenv
18066 #endif
18067
18068         return getenv ();
18069   ;
18070   return 0;
18071 }
18072 _ACEOF
18073 rm -f conftest.$ac_objext conftest$ac_exeext
18074 if { (eval echo "$as_me:18074: \"$ac_link\"") >&5
18075   (eval $ac_link) 2>&5
18076   ac_status=$?
18077   echo "$as_me:18077: \$? = $ac_status" >&5
18078   (exit $ac_status); } &&
18079          { ac_try='test -s conftest$ac_exeext'
18080   { (eval echo "$as_me:18080: \"$ac_try\"") >&5
18081   (eval $ac_try) 2>&5
18082   ac_status=$?
18083   echo "$as_me:18083: \$? = $ac_status" >&5
18084   (exit $ac_status); }; }; then
18085   ac_cv_func_getenv=yes
18086 else
18087   echo "$as_me: failed program was:" >&5
18088 cat conftest.$ac_ext >&5
18089 ac_cv_func_getenv=no
18090 fi
18091 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18092 fi
18093 echo "$as_me:18093: result: $ac_cv_func_getenv" >&5
18094 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18095
18096 for ac_func in putenv setenv strdup
18097 do
18098 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18099 echo "$as_me:18099: checking for $ac_func" >&5
18100 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18101 if eval "test \"\${$as_ac_var+set}\" = set"; then
18102   echo $ECHO_N "(cached) $ECHO_C" >&6
18103 else
18104   cat >conftest.$ac_ext <<_ACEOF
18105 #line 18105 "configure"
18106 #include "confdefs.h"
18107 #define $ac_func autoconf_temporary
18108 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18109 #undef $ac_func
18110
18111 #ifdef __cplusplus
18112 extern "C"
18113 #endif
18114
18115 /* We use char because int might match the return type of a gcc2
18116    builtin and then its argument prototype would still apply.  */
18117 char $ac_func (void);
18118
18119 int
18120 main (void)
18121 {
18122
18123 /* The GNU C library defines stubs for functions which it implements
18124     to always fail with ENOSYS.  Some functions are actually named
18125     something starting with __ and the normal name is an alias.  */
18126 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18127 #error found stub for $ac_func
18128 #endif
18129
18130         return $ac_func ();
18131   ;
18132   return 0;
18133 }
18134 _ACEOF
18135 rm -f conftest.$ac_objext conftest$ac_exeext
18136 if { (eval echo "$as_me:18136: \"$ac_link\"") >&5
18137   (eval $ac_link) 2>&5
18138   ac_status=$?
18139   echo "$as_me:18139: \$? = $ac_status" >&5
18140   (exit $ac_status); } &&
18141          { ac_try='test -s conftest$ac_exeext'
18142   { (eval echo "$as_me:18142: \"$ac_try\"") >&5
18143   (eval $ac_try) 2>&5
18144   ac_status=$?
18145   echo "$as_me:18145: \$? = $ac_status" >&5
18146   (exit $ac_status); }; }; then
18147   eval "$as_ac_var=yes"
18148 else
18149   echo "$as_me: failed program was:" >&5
18150 cat conftest.$ac_ext >&5
18151 eval "$as_ac_var=no"
18152 fi
18153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18154 fi
18155 echo "$as_me:18155: result: `eval echo '${'$as_ac_var'}'`" >&5
18156 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18157 if test `eval echo '${'$as_ac_var'}'` = yes; then
18158   cat >>confdefs.h <<EOF
18159 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18160 EOF
18161
18162 fi
18163 done
18164
18165 echo "$as_me:18165: checking if getenv returns consistent values" >&5
18166 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
18167 if test "${cf_cv_consistent_getenv+set}" = set; then
18168   echo $ECHO_N "(cached) $ECHO_C" >&6
18169 else
18170
18171 if test "$cross_compiling" = yes; then
18172   cf_cv_consistent_getenv=unknown
18173 else
18174   cat >conftest.$ac_ext <<_ACEOF
18175 #line 18175 "configure"
18176 #include "confdefs.h"
18177
18178 #include <stdlib.h>
18179 #include <unistd.h>
18180 #include <stdio.h>
18181 #include <string.h>
18182 #include <sys/types.h>
18183
18184 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
18185 extern char **environ;  /* POSIX, but some systems are not... */
18186 #endif
18187
18188 #if defined(HAVE_STRDUP)
18189 #define str_alloc(s) strdup(s)
18190 #else
18191 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
18192 #endif
18193
18194 static void set_value(const char *name, const char *value)
18195 {
18196 #if defined(HAVE_SETENV)
18197         setenv(name, value, 1);
18198 #elif defined(HAVE_PUTENV)
18199         char buffer[1024];
18200         sprintf(buffer, "%s=%s", name, value);
18201         putenv(str_alloc(buffer));
18202 #else
18203 #error neither putenv/setenv found
18204 #endif
18205 }
18206 int main(void)
18207 {
18208         int pass;
18209         size_t numenv, limit, j;
18210         char **mynames;
18211         char **myvalues;
18212         char **mypointer;
18213         char *equals;
18214         for (numenv = 0; environ[numenv]; ++numenv) ;
18215         limit = numenv + 10;
18216         mynames = (char **) calloc(limit + 1, sizeof(char *));
18217         myvalues = (char **) calloc(limit + 1, sizeof(char *));
18218         mypointer = (char **) calloc(limit + 1, sizeof(char *));
18219 #if defined(HAVE_ENVIRON)
18220         for (j = 0; environ[j]; ++j) {
18221                 mynames[j] = str_alloc(environ[j]);
18222                 equals = strchr(mynames[j], '=');
18223                 if (equals != 0) {
18224                         *equals++ = '\0';
18225                         myvalues[j] = str_alloc(equals);
18226                 } else {
18227                         myvalues[j] = str_alloc("");
18228                 }
18229         }
18230 #endif
18231         for (j = numenv; j < limit; ++j) {
18232                 char name[80];
18233                 char value[80];
18234                 size_t found;
18235                 size_t k = 0;
18236                 do {
18237                         size_t jk;
18238                         found = 0;
18239                         sprintf(name, "TERM%lu", (unsigned long) k);
18240                         for (jk = 0; jk < j; ++jk) {
18241                                 if (!strcmp(name, mynames[jk])) {
18242                                         found = 1;
18243                                         ++k;
18244                                         break;
18245                                 }
18246                         }
18247                 } while (found);
18248                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
18249                 set_value(name, value);
18250                 mynames[j] = str_alloc(name);
18251                 myvalues[j] = str_alloc(value);
18252         }
18253         for (pass = 0; pass < 3; ++pass) {
18254                 for (j = 0; j < limit; ++j) {
18255                         char *value = getenv(mynames[j]);
18256                         if (pass) {
18257                                 if (value == 0) {
18258                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
18259                                         ${cf_cv_main_return:-return}(1);
18260                                 } else if (value != mypointer[j]) {
18261                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
18262                                         ${cf_cv_main_return:-return}(1);
18263                                 } else if (strcmp(value, myvalues[j])) {
18264                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
18265                                         ${cf_cv_main_return:-return}(1);
18266                                 }
18267                         } else {
18268                                 size_t k;
18269                                 mypointer[j] = value;
18270                                 for (k = 0; k < j; ++k) {
18271                                         if (mypointer[j] == mypointer[k]) {
18272                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
18273                                                 ${cf_cv_main_return:-return}(1);
18274                                         }
18275                                 }
18276                         }
18277                 }
18278         }
18279         ${cf_cv_main_return:-return}(0);
18280 }
18281
18282 _ACEOF
18283 rm -f conftest$ac_exeext
18284 if { (eval echo "$as_me:18284: \"$ac_link\"") >&5
18285   (eval $ac_link) 2>&5
18286   ac_status=$?
18287   echo "$as_me:18287: \$? = $ac_status" >&5
18288   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18289   { (eval echo "$as_me:18289: \"$ac_try\"") >&5
18290   (eval $ac_try) 2>&5
18291   ac_status=$?
18292   echo "$as_me:18292: \$? = $ac_status" >&5
18293   (exit $ac_status); }; }; then
18294   cf_cv_consistent_getenv=yes
18295 else
18296   echo "$as_me: program exited with status $ac_status" >&5
18297 echo "$as_me: failed program was:" >&5
18298 cat conftest.$ac_ext >&5
18299 cf_cv_consistent_getenv=no
18300 fi
18301 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18302 fi
18303
18304 fi
18305 echo "$as_me:18305: result: $cf_cv_consistent_getenv" >&5
18306 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
18307
18308 if test "x$cf_cv_consistent_getenv" = xno
18309 then
18310
18311 cat >>confdefs.h <<\EOF
18312 #define HAVE_CONSISTENT_GETENV 1
18313 EOF
18314
18315 fi
18316
18317 if test "x$cf_cv_consistent_getenv" = xno && \
18318         test "x$cf_with_trace" = xyes
18319 then
18320         { echo "$as_me:18320: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
18321 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
18322 fi
18323
18324 # check for ISC (this may also define _POSIX_SOURCE)
18325 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
18326 if test "x$ISC" = xyes ; then
18327
18328 echo "$as_me:18328: checking for main in -lcposix" >&5
18329 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
18330 if test "${ac_cv_lib_cposix_main+set}" = set; then
18331   echo $ECHO_N "(cached) $ECHO_C" >&6
18332 else
18333   ac_check_lib_save_LIBS=$LIBS
18334 LIBS="-lcposix  $LIBS"
18335 cat >conftest.$ac_ext <<_ACEOF
18336 #line 18336 "configure"
18337 #include "confdefs.h"
18338
18339 int
18340 main (void)
18341 {
18342 main ();
18343   ;
18344   return 0;
18345 }
18346 _ACEOF
18347 rm -f conftest.$ac_objext conftest$ac_exeext
18348 if { (eval echo "$as_me:18348: \"$ac_link\"") >&5
18349   (eval $ac_link) 2>&5
18350   ac_status=$?
18351   echo "$as_me:18351: \$? = $ac_status" >&5
18352   (exit $ac_status); } &&
18353          { ac_try='test -s conftest$ac_exeext'
18354   { (eval echo "$as_me:18354: \"$ac_try\"") >&5
18355   (eval $ac_try) 2>&5
18356   ac_status=$?
18357   echo "$as_me:18357: \$? = $ac_status" >&5
18358   (exit $ac_status); }; }; then
18359   ac_cv_lib_cposix_main=yes
18360 else
18361   echo "$as_me: failed program was:" >&5
18362 cat conftest.$ac_ext >&5
18363 ac_cv_lib_cposix_main=no
18364 fi
18365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18366 LIBS=$ac_check_lib_save_LIBS
18367 fi
18368 echo "$as_me:18368: result: $ac_cv_lib_cposix_main" >&5
18369 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
18370 if test $ac_cv_lib_cposix_main = yes; then
18371   cat >>confdefs.h <<EOF
18372 #define HAVE_LIBCPOSIX 1
18373 EOF
18374
18375   LIBS="-lcposix $LIBS"
18376
18377 fi
18378
18379         echo "$as_me:18379: checking for bzero in -linet" >&5
18380 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
18381 if test "${ac_cv_lib_inet_bzero+set}" = set; then
18382   echo $ECHO_N "(cached) $ECHO_C" >&6
18383 else
18384   ac_check_lib_save_LIBS=$LIBS
18385 LIBS="-linet  $LIBS"
18386 cat >conftest.$ac_ext <<_ACEOF
18387 #line 18387 "configure"
18388 #include "confdefs.h"
18389
18390 /* Override any gcc2 internal prototype to avoid an error.  */
18391 #ifdef __cplusplus
18392 extern "C"
18393 #endif
18394 /* We use char because int might match the return type of a gcc2
18395    builtin and then its argument prototype would still apply.  */
18396 char bzero ();
18397 int
18398 main (void)
18399 {
18400 bzero ();
18401   ;
18402   return 0;
18403 }
18404 _ACEOF
18405 rm -f conftest.$ac_objext conftest$ac_exeext
18406 if { (eval echo "$as_me:18406: \"$ac_link\"") >&5
18407   (eval $ac_link) 2>&5
18408   ac_status=$?
18409   echo "$as_me:18409: \$? = $ac_status" >&5
18410   (exit $ac_status); } &&
18411          { ac_try='test -s conftest$ac_exeext'
18412   { (eval echo "$as_me:18412: \"$ac_try\"") >&5
18413   (eval $ac_try) 2>&5
18414   ac_status=$?
18415   echo "$as_me:18415: \$? = $ac_status" >&5
18416   (exit $ac_status); }; }; then
18417   ac_cv_lib_inet_bzero=yes
18418 else
18419   echo "$as_me: failed program was:" >&5
18420 cat conftest.$ac_ext >&5
18421 ac_cv_lib_inet_bzero=no
18422 fi
18423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18424 LIBS=$ac_check_lib_save_LIBS
18425 fi
18426 echo "$as_me:18426: result: $ac_cv_lib_inet_bzero" >&5
18427 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
18428 if test $ac_cv_lib_inet_bzero = yes; then
18429
18430 cf_add_libs="-linet"
18431 # Filter out duplicates - this happens with badly-designed ".pc" files...
18432 for cf_add_1lib in $LIBS
18433 do
18434         for cf_add_2lib in $cf_add_libs
18435         do
18436                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18437                 then
18438                         cf_add_1lib=
18439                         break
18440                 fi
18441         done
18442         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18443 done
18444 LIBS="$cf_add_libs"
18445
18446 fi
18447 fi
18448
18449 echo "$as_me:18449: checking if sys/time.h works with sys/select.h" >&5
18450 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18451 if test "${cf_cv_sys_time_select+set}" = set; then
18452   echo $ECHO_N "(cached) $ECHO_C" >&6
18453 else
18454
18455 cat >conftest.$ac_ext <<_ACEOF
18456 #line 18456 "configure"
18457 #include "confdefs.h"
18458
18459 #include <sys/types.h>
18460 #ifdef HAVE_SYS_TIME_H
18461 #include <sys/time.h>
18462 #endif
18463 #ifdef HAVE_SYS_SELECT_H
18464 #include <sys/select.h>
18465 #endif
18466
18467 int
18468 main (void)
18469 {
18470
18471   ;
18472   return 0;
18473 }
18474 _ACEOF
18475 rm -f conftest.$ac_objext
18476 if { (eval echo "$as_me:18476: \"$ac_compile\"") >&5
18477   (eval $ac_compile) 2>&5
18478   ac_status=$?
18479   echo "$as_me:18479: \$? = $ac_status" >&5
18480   (exit $ac_status); } &&
18481          { ac_try='test -s conftest.$ac_objext'
18482   { (eval echo "$as_me:18482: \"$ac_try\"") >&5
18483   (eval $ac_try) 2>&5
18484   ac_status=$?
18485   echo "$as_me:18485: \$? = $ac_status" >&5
18486   (exit $ac_status); }; }; then
18487   cf_cv_sys_time_select=yes
18488 else
18489   echo "$as_me: failed program was:" >&5
18490 cat conftest.$ac_ext >&5
18491 cf_cv_sys_time_select=no
18492 fi
18493 rm -f conftest.$ac_objext conftest.$ac_ext
18494
18495 fi
18496
18497 echo "$as_me:18497: result: $cf_cv_sys_time_select" >&5
18498 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18499 test "$cf_cv_sys_time_select" = yes &&
18500 cat >>confdefs.h <<\EOF
18501 #define HAVE_SYS_TIME_SELECT 1
18502 EOF
18503
18504 ###     checks for compiler characteristics
18505 ac_ext=c
18506 ac_cpp='$CPP $CPPFLAGS'
18507 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18508 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18509 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18510 ac_main_return=return
18511
18512 echo "$as_me:18512: checking for an ANSI C-conforming const" >&5
18513 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18514 if test "${ac_cv_c_const+set}" = set; then
18515   echo $ECHO_N "(cached) $ECHO_C" >&6
18516 else
18517   cat >conftest.$ac_ext <<_ACEOF
18518 #line 18518 "configure"
18519 #include "confdefs.h"
18520
18521 int
18522 main (void)
18523 {
18524 /* FIXME: Include the comments suggested by Paul. */
18525 #ifndef __cplusplus
18526   /* Ultrix mips cc rejects this.  */
18527   typedef int charset[2];
18528   const charset x;
18529   /* SunOS 4.1.1 cc rejects this.  */
18530   char const *const *ccp;
18531   char **p;
18532   /* NEC SVR4.0.2 mips cc rejects this.  */
18533   struct point {int x, y;};
18534   static struct point const zero = {0,0};
18535   /* AIX XL C 1.02.0.0 rejects this.
18536      It does not let you subtract one const X* pointer from another in
18537      an arm of an if-expression whose if-part is not a constant
18538      expression */
18539   const char *g = "string";
18540   ccp = &g + (g ? g-g : 0);
18541   /* HPUX 7.0 cc rejects these. */
18542   ++ccp;
18543   p = (char**) ccp;
18544   ccp = (char const *const *) p;
18545   { /* SCO 3.2v4 cc rejects this.  */
18546     char *t;
18547     char const *s = 0 ? (char *) 0 : (char const *) 0;
18548
18549     *t++ = 0;
18550   }
18551   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
18552     int x[] = {25, 17};
18553     const int *foo = &x[0];
18554     ++foo;
18555   }
18556   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18557     typedef const int *iptr;
18558     iptr p = 0;
18559     ++p;
18560   }
18561   { /* AIX XL C 1.02.0.0 rejects this saying
18562        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18563     struct s { int j; const int *ap[3]; };
18564     struct s *b; b->j = 5;
18565   }
18566   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18567     const int foo = 10;
18568   }
18569 #endif
18570
18571   ;
18572   return 0;
18573 }
18574 _ACEOF
18575 rm -f conftest.$ac_objext
18576 if { (eval echo "$as_me:18576: \"$ac_compile\"") >&5
18577   (eval $ac_compile) 2>&5
18578   ac_status=$?
18579   echo "$as_me:18579: \$? = $ac_status" >&5
18580   (exit $ac_status); } &&
18581          { ac_try='test -s conftest.$ac_objext'
18582   { (eval echo "$as_me:18582: \"$ac_try\"") >&5
18583   (eval $ac_try) 2>&5
18584   ac_status=$?
18585   echo "$as_me:18585: \$? = $ac_status" >&5
18586   (exit $ac_status); }; }; then
18587   ac_cv_c_const=yes
18588 else
18589   echo "$as_me: failed program was:" >&5
18590 cat conftest.$ac_ext >&5
18591 ac_cv_c_const=no
18592 fi
18593 rm -f conftest.$ac_objext conftest.$ac_ext
18594 fi
18595 echo "$as_me:18595: result: $ac_cv_c_const" >&5
18596 echo "${ECHO_T}$ac_cv_c_const" >&6
18597 if test $ac_cv_c_const = no; then
18598
18599 cat >>confdefs.h <<\EOF
18600 #define const
18601 EOF
18602
18603 fi
18604
18605 echo "$as_me:18605: checking for inline" >&5
18606 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18607 if test "${ac_cv_c_inline+set}" = set; then
18608   echo $ECHO_N "(cached) $ECHO_C" >&6
18609 else
18610   ac_cv_c_inline=no
18611 for ac_kw in inline __inline__ __inline; do
18612   cat >conftest.$ac_ext <<_ACEOF
18613 #line 18613 "configure"
18614 #include "confdefs.h"
18615 #ifndef __cplusplus
18616 static $ac_kw int static_foo () {return 0; }
18617 $ac_kw int foo () {return 0; }
18618 #endif
18619
18620 _ACEOF
18621 rm -f conftest.$ac_objext
18622 if { (eval echo "$as_me:18622: \"$ac_compile\"") >&5
18623   (eval $ac_compile) 2>&5
18624   ac_status=$?
18625   echo "$as_me:18625: \$? = $ac_status" >&5
18626   (exit $ac_status); } &&
18627          { ac_try='test -s conftest.$ac_objext'
18628   { (eval echo "$as_me:18628: \"$ac_try\"") >&5
18629   (eval $ac_try) 2>&5
18630   ac_status=$?
18631   echo "$as_me:18631: \$? = $ac_status" >&5
18632   (exit $ac_status); }; }; then
18633   ac_cv_c_inline=$ac_kw; break
18634 else
18635   echo "$as_me: failed program was:" >&5
18636 cat conftest.$ac_ext >&5
18637 fi
18638 rm -f conftest.$ac_objext conftest.$ac_ext
18639 done
18640
18641 fi
18642 echo "$as_me:18642: result: $ac_cv_c_inline" >&5
18643 echo "${ECHO_T}$ac_cv_c_inline" >&6
18644 case $ac_cv_c_inline in
18645   inline | yes) ;;
18646   no)
18647 cat >>confdefs.h <<\EOF
18648 #define inline
18649 EOF
18650  ;;
18651   *)  cat >>confdefs.h <<EOF
18652 #define inline $ac_cv_c_inline
18653 EOF
18654  ;;
18655 esac
18656
18657 NCURSES_INLINE=
18658 if test "$ac_cv_c_inline" != no ; then
18659         NCURSES_INLINE=inline
18660         if test "$INTEL_COMPILER" = yes
18661         then
18662                 :
18663         elif test "$CLANG_COMPILER" = yes
18664         then
18665                 :
18666         elif test "$GCC" = yes
18667         then
18668                 echo "$as_me:18668: checking if $CC supports options to tune inlining" >&5
18669 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
18670 if test "${cf_cv_gcc_inline+set}" = set; then
18671   echo $ECHO_N "(cached) $ECHO_C" >&6
18672 else
18673
18674                 cf_save_CFLAGS=$CFLAGS
18675                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
18676                 cat >conftest.$ac_ext <<_ACEOF
18677 #line 18677 "configure"
18678 #include "confdefs.h"
18679 inline int foo(void) { return 1; }
18680 int
18681 main (void)
18682 {
18683 ${cf_cv_main_return:-return} foo()
18684   ;
18685   return 0;
18686 }
18687 _ACEOF
18688 rm -f conftest.$ac_objext
18689 if { (eval echo "$as_me:18689: \"$ac_compile\"") >&5
18690   (eval $ac_compile) 2>&5
18691   ac_status=$?
18692   echo "$as_me:18692: \$? = $ac_status" >&5
18693   (exit $ac_status); } &&
18694          { ac_try='test -s conftest.$ac_objext'
18695   { (eval echo "$as_me:18695: \"$ac_try\"") >&5
18696   (eval $ac_try) 2>&5
18697   ac_status=$?
18698   echo "$as_me:18698: \$? = $ac_status" >&5
18699   (exit $ac_status); }; }; then
18700   cf_cv_gcc_inline=yes
18701 else
18702   echo "$as_me: failed program was:" >&5
18703 cat conftest.$ac_ext >&5
18704 cf_cv_gcc_inline=no
18705 fi
18706 rm -f conftest.$ac_objext conftest.$ac_ext
18707                 CFLAGS=$cf_save_CFLAGS
18708
18709 fi
18710 echo "$as_me:18710: result: $cf_cv_gcc_inline" >&5
18711 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
18712                 if test "$cf_cv_gcc_inline" = yes ; then
18713
18714 cf_fix_cppflags=no
18715 cf_new_cflags=
18716 cf_new_cppflags=
18717 cf_new_extra_cppflags=
18718
18719 for cf_add_cflags in --param max-inline-insns-single=1200
18720 do
18721 case $cf_fix_cppflags in
18722 (no)
18723         case $cf_add_cflags in
18724         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18725                 case $cf_add_cflags in
18726                 (-D*)
18727                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18728
18729                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18730                                 && test -z "${cf_tst_cflags}" \
18731                                 && cf_fix_cppflags=yes
18732
18733                         if test $cf_fix_cppflags = yes ; then
18734
18735         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18736         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18737
18738                                 continue
18739                         elif test "${cf_tst_cflags}" = "\"'" ; then
18740
18741         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18742         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18743
18744                                 continue
18745                         fi
18746                         ;;
18747                 esac
18748                 case "$CPPFLAGS" in
18749                 (*$cf_add_cflags)
18750                         ;;
18751                 (*)
18752                         case $cf_add_cflags in
18753                         (-D*)
18754                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18755
18756 CPPFLAGS=`echo "$CPPFLAGS" | \
18757         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18758                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18759
18760                                 ;;
18761                         esac
18762
18763         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18764         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18765
18766                         ;;
18767                 esac
18768                 ;;
18769         (*)
18770
18771         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18772         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18773
18774                 ;;
18775         esac
18776         ;;
18777 (yes)
18778
18779         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18780         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18781
18782         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18783
18784         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18785                 && test -z "${cf_tst_cflags}" \
18786                 && cf_fix_cppflags=no
18787         ;;
18788 esac
18789 done
18790
18791 if test -n "$cf_new_cflags" ; then
18792
18793         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18794         CFLAGS="${CFLAGS}$cf_new_cflags"
18795
18796 fi
18797
18798 if test -n "$cf_new_cppflags" ; then
18799
18800         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18801         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18802
18803 fi
18804
18805 if test -n "$cf_new_extra_cppflags" ; then
18806
18807         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18808         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18809
18810 fi
18811
18812                 fi
18813         fi
18814 fi
18815
18816 echo "$as_me:18816: checking for signal global datatype" >&5
18817 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
18818 if test "${cf_cv_sig_atomic_t+set}" = set; then
18819   echo $ECHO_N "(cached) $ECHO_C" >&6
18820 else
18821
18822         for cf_type in \
18823                 "volatile sig_atomic_t" \
18824                 "sig_atomic_t" \
18825                 "int"
18826         do
18827         cat >conftest.$ac_ext <<_ACEOF
18828 #line 18828 "configure"
18829 #include "confdefs.h"
18830
18831 #include <sys/types.h>
18832 #include <signal.h>
18833 #include <stdio.h>
18834
18835 extern $cf_type x;
18836 $cf_type x;
18837 static void handler(int sig)
18838 {
18839         x = 5;
18840 }
18841 int
18842 main (void)
18843 {
18844 signal(SIGINT, handler);
18845                  x = 1
18846   ;
18847   return 0;
18848 }
18849 _ACEOF
18850 rm -f conftest.$ac_objext
18851 if { (eval echo "$as_me:18851: \"$ac_compile\"") >&5
18852   (eval $ac_compile) 2>&5
18853   ac_status=$?
18854   echo "$as_me:18854: \$? = $ac_status" >&5
18855   (exit $ac_status); } &&
18856          { ac_try='test -s conftest.$ac_objext'
18857   { (eval echo "$as_me:18857: \"$ac_try\"") >&5
18858   (eval $ac_try) 2>&5
18859   ac_status=$?
18860   echo "$as_me:18860: \$? = $ac_status" >&5
18861   (exit $ac_status); }; }; then
18862   cf_cv_sig_atomic_t=$cf_type
18863 else
18864   echo "$as_me: failed program was:" >&5
18865 cat conftest.$ac_ext >&5
18866 cf_cv_sig_atomic_t=no
18867 fi
18868 rm -f conftest.$ac_objext conftest.$ac_ext
18869                 test "$cf_cv_sig_atomic_t" != no && break
18870         done
18871
18872 fi
18873
18874 echo "$as_me:18874: result: $cf_cv_sig_atomic_t" >&5
18875 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
18876 test "$cf_cv_sig_atomic_t" != no &&
18877 cat >>confdefs.h <<EOF
18878 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
18879 EOF
18880
18881 if test $NCURSES_CHTYPE = auto ; then
18882
18883 echo "$as_me:18883: checking for type of chtype" >&5
18884 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
18885 if test "${cf_cv_typeof_chtype+set}" = set; then
18886   echo $ECHO_N "(cached) $ECHO_C" >&6
18887 else
18888
18889                 if test "$cross_compiling" = yes; then
18890   cf_cv_typeof_chtype=long
18891 else
18892   cat >conftest.$ac_ext <<_ACEOF
18893 #line 18893 "configure"
18894 #include "confdefs.h"
18895
18896 #define WANT_BITS 31
18897 #include <stdio.h>
18898 int main(void)
18899 {
18900         FILE *fp = fopen("cf_test.out", "w");
18901         if (fp != 0) {
18902                 char *result = "long";
18903                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
18904                         int n;
18905                         unsigned int x, y;
18906                         for (n = 0; n < WANT_BITS; n++) {
18907                                 x = (1 << n);
18908                                 y = (x >> n);
18909                                 if (y != 1 || x == 0) {
18910                                         x = 0;
18911                                         break;
18912                                 }
18913                         }
18914                         /*
18915                          * If x is nonzero, an int is big enough for the bits
18916                          * that we want.
18917                          */
18918                         result = (x != 0) ? "int" : "long";
18919                 }
18920                 fputs(result, fp);
18921                 fclose(fp);
18922         }
18923         ${cf_cv_main_return:-return}(0);
18924 }
18925
18926 _ACEOF
18927 rm -f conftest$ac_exeext
18928 if { (eval echo "$as_me:18928: \"$ac_link\"") >&5
18929   (eval $ac_link) 2>&5
18930   ac_status=$?
18931   echo "$as_me:18931: \$? = $ac_status" >&5
18932   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18933   { (eval echo "$as_me:18933: \"$ac_try\"") >&5
18934   (eval $ac_try) 2>&5
18935   ac_status=$?
18936   echo "$as_me:18936: \$? = $ac_status" >&5
18937   (exit $ac_status); }; }; then
18938   cf_cv_typeof_chtype=`cat cf_test.out`
18939 else
18940   echo "$as_me: program exited with status $ac_status" >&5
18941 echo "$as_me: failed program was:" >&5
18942 cat conftest.$ac_ext >&5
18943 cf_cv_typeof_chtype=long
18944 fi
18945 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18946 fi
18947                 rm -f cf_test.out
18948
18949 fi
18950
18951 echo "$as_me:18951: result: $cf_cv_typeof_chtype" >&5
18952 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
18953
18954 cat >>confdefs.h <<EOF
18955 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
18956 EOF
18957
18958 else
18959         cf_cv_typeof_chtype=$NCURSES_CHTYPE
18960 fi
18961 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
18962
18963 echo "$as_me:18963: checking if unsigned literals are legal" >&5
18964 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
18965 if test "${cf_cv_unsigned_literals+set}" = set; then
18966   echo $ECHO_N "(cached) $ECHO_C" >&6
18967 else
18968
18969         cat >conftest.$ac_ext <<_ACEOF
18970 #line 18970 "configure"
18971 #include "confdefs.h"
18972
18973 int
18974 main (void)
18975 {
18976 long x = 1L + 1UL + 1U + 1
18977   ;
18978   return 0;
18979 }
18980 _ACEOF
18981 rm -f conftest.$ac_objext
18982 if { (eval echo "$as_me:18982: \"$ac_compile\"") >&5
18983   (eval $ac_compile) 2>&5
18984   ac_status=$?
18985   echo "$as_me:18985: \$? = $ac_status" >&5
18986   (exit $ac_status); } &&
18987          { ac_try='test -s conftest.$ac_objext'
18988   { (eval echo "$as_me:18988: \"$ac_try\"") >&5
18989   (eval $ac_try) 2>&5
18990   ac_status=$?
18991   echo "$as_me:18991: \$? = $ac_status" >&5
18992   (exit $ac_status); }; }; then
18993   cf_cv_unsigned_literals=yes
18994 else
18995   echo "$as_me: failed program was:" >&5
18996 cat conftest.$ac_ext >&5
18997 cf_cv_unsigned_literals=no
18998 fi
18999 rm -f conftest.$ac_objext conftest.$ac_ext
19000
19001 fi
19002
19003 echo "$as_me:19003: result: $cf_cv_unsigned_literals" >&5
19004 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19005
19006 cf_cv_1UL="1"
19007 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19008 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19009
19010 if test $NCURSES_MMASK_T = auto ; then
19011         cf_cv_typeof_mmask_t=long
19012 else
19013         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19014 fi
19015 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19016
19017 ###     Checks for external-data
19018
19019 echo "$as_me:19019: checking if external errno is declared" >&5
19020 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19021 if test "${cf_cv_dcl_errno+set}" = set; then
19022   echo $ECHO_N "(cached) $ECHO_C" >&6
19023 else
19024
19025         cat >conftest.$ac_ext <<_ACEOF
19026 #line 19026 "configure"
19027 #include "confdefs.h"
19028
19029 #ifdef HAVE_STDLIB_H
19030 #include <stdlib.h>
19031 #endif
19032 #include <stdio.h>
19033 #include <sys/types.h>
19034 #include <errno.h>
19035 int
19036 main (void)
19037 {
19038 int x = (int) errno
19039   ;
19040   return 0;
19041 }
19042 _ACEOF
19043 rm -f conftest.$ac_objext
19044 if { (eval echo "$as_me:19044: \"$ac_compile\"") >&5
19045   (eval $ac_compile) 2>&5
19046   ac_status=$?
19047   echo "$as_me:19047: \$? = $ac_status" >&5
19048   (exit $ac_status); } &&
19049          { ac_try='test -s conftest.$ac_objext'
19050   { (eval echo "$as_me:19050: \"$ac_try\"") >&5
19051   (eval $ac_try) 2>&5
19052   ac_status=$?
19053   echo "$as_me:19053: \$? = $ac_status" >&5
19054   (exit $ac_status); }; }; then
19055   cf_cv_dcl_errno=yes
19056 else
19057   echo "$as_me: failed program was:" >&5
19058 cat conftest.$ac_ext >&5
19059 cf_cv_dcl_errno=no
19060 fi
19061 rm -f conftest.$ac_objext conftest.$ac_ext
19062
19063 fi
19064 echo "$as_me:19064: result: $cf_cv_dcl_errno" >&5
19065 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19066
19067 if test "$cf_cv_dcl_errno" = no ; then
19068
19069 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19070
19071         cat >>confdefs.h <<EOF
19072 #define $cf_result 1
19073 EOF
19074
19075 fi
19076
19077 # It's possible (for near-UNIX clones) that the data doesn't exist
19078
19079 echo "$as_me:19079: checking if external errno exists" >&5
19080 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19081 if test "${cf_cv_have_errno+set}" = set; then
19082   echo $ECHO_N "(cached) $ECHO_C" >&6
19083 else
19084
19085         cat >conftest.$ac_ext <<_ACEOF
19086 #line 19086 "configure"
19087 #include "confdefs.h"
19088
19089 #undef errno
19090 extern int errno;
19091
19092 int
19093 main (void)
19094 {
19095 errno = 2
19096   ;
19097   return 0;
19098 }
19099 _ACEOF
19100 rm -f conftest.$ac_objext conftest$ac_exeext
19101 if { (eval echo "$as_me:19101: \"$ac_link\"") >&5
19102   (eval $ac_link) 2>&5
19103   ac_status=$?
19104   echo "$as_me:19104: \$? = $ac_status" >&5
19105   (exit $ac_status); } &&
19106          { ac_try='test -s conftest$ac_exeext'
19107   { (eval echo "$as_me:19107: \"$ac_try\"") >&5
19108   (eval $ac_try) 2>&5
19109   ac_status=$?
19110   echo "$as_me:19110: \$? = $ac_status" >&5
19111   (exit $ac_status); }; }; then
19112   cf_cv_have_errno=yes
19113 else
19114   echo "$as_me: failed program was:" >&5
19115 cat conftest.$ac_ext >&5
19116 cf_cv_have_errno=no
19117 fi
19118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19119
19120 fi
19121 echo "$as_me:19121: result: $cf_cv_have_errno" >&5
19122 echo "${ECHO_T}$cf_cv_have_errno" >&6
19123
19124 if test "$cf_cv_have_errno" = yes ; then
19125
19126 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19127
19128         cat >>confdefs.h <<EOF
19129 #define $cf_result 1
19130 EOF
19131
19132 fi
19133
19134 echo "$as_me:19134: checking if data-only library module links" >&5
19135 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19136 if test "${cf_cv_link_dataonly+set}" = set; then
19137   echo $ECHO_N "(cached) $ECHO_C" >&6
19138 else
19139
19140         rm -f conftest.a
19141         cat >conftest.$ac_ext <<EOF
19142 #line 19142 "configure"
19143 int     testdata[3] = { 123, 456, 789 };
19144 EOF
19145         if { (eval echo "$as_me:19145: \"$ac_compile\"") >&5
19146   (eval $ac_compile) 2>&5
19147   ac_status=$?
19148   echo "$as_me:19148: \$? = $ac_status" >&5
19149   (exit $ac_status); } ; then
19150                 mv conftest.o data.o && \
19151                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19152         fi
19153         rm -f conftest.$ac_ext data.o
19154         cat >conftest.$ac_ext <<EOF
19155 #line 19155 "configure"
19156 int     testfunc(void)
19157 {
19158 #if defined(NeXT)
19159         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
19160 #else
19161         extern int testdata[3];
19162         return testdata[0] == 123
19163            &&  testdata[1] == 456
19164            &&  testdata[2] == 789;
19165 #endif
19166 }
19167 EOF
19168         if { (eval echo "$as_me:19168: \"$ac_compile\"") >&5
19169   (eval $ac_compile) 2>&5
19170   ac_status=$?
19171   echo "$as_me:19171: \$? = $ac_status" >&5
19172   (exit $ac_status); }; then
19173                 mv conftest.o func.o && \
19174                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19175         fi
19176         rm -f conftest.$ac_ext func.o
19177         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19178         cf_saveLIBS="$LIBS"
19179         LIBS="conftest.a $LIBS"
19180         if test "$cross_compiling" = yes; then
19181   cf_cv_link_dataonly=unknown
19182 else
19183   cat >conftest.$ac_ext <<_ACEOF
19184 #line 19184 "configure"
19185 #include "confdefs.h"
19186
19187         int main(void)
19188         {
19189                 extern int testfunc();
19190                 ${cf_cv_main_return:-return} (!testfunc());
19191         }
19192
19193 _ACEOF
19194 rm -f conftest$ac_exeext
19195 if { (eval echo "$as_me:19195: \"$ac_link\"") >&5
19196   (eval $ac_link) 2>&5
19197   ac_status=$?
19198   echo "$as_me:19198: \$? = $ac_status" >&5
19199   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19200   { (eval echo "$as_me:19200: \"$ac_try\"") >&5
19201   (eval $ac_try) 2>&5
19202   ac_status=$?
19203   echo "$as_me:19203: \$? = $ac_status" >&5
19204   (exit $ac_status); }; }; then
19205   cf_cv_link_dataonly=yes
19206 else
19207   echo "$as_me: program exited with status $ac_status" >&5
19208 echo "$as_me: failed program was:" >&5
19209 cat conftest.$ac_ext >&5
19210 cf_cv_link_dataonly=no
19211 fi
19212 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19213 fi
19214         LIBS="$cf_saveLIBS"
19215
19216 fi
19217
19218 echo "$as_me:19218: result: $cf_cv_link_dataonly" >&5
19219 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19220
19221 if test "$cf_cv_link_dataonly" = no ; then
19222
19223 cat >>confdefs.h <<\EOF
19224 #define BROKEN_LINKER 1
19225 EOF
19226
19227         BROKEN_LINKER=1
19228 fi
19229
19230 ###     Checks for library functions.
19231
19232 for ac_func in \
19233 getcwd \
19234 getegid \
19235 geteuid \
19236 getopt \
19237 getttynam \
19238 issetugid \
19239 localeconv \
19240 poll \
19241 putenv \
19242 remove \
19243 select \
19244 setbuf \
19245 setbuffer \
19246 setenv \
19247 setvbuf \
19248 sigaction \
19249 sigvec \
19250 strdup \
19251 strstr \
19252 sysconf \
19253 tcgetpgrp \
19254 times \
19255 tsearch \
19256 vsnprintf \
19257
19258 do
19259 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19260 echo "$as_me:19260: checking for $ac_func" >&5
19261 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19262 if eval "test \"\${$as_ac_var+set}\" = set"; then
19263   echo $ECHO_N "(cached) $ECHO_C" >&6
19264 else
19265   cat >conftest.$ac_ext <<_ACEOF
19266 #line 19266 "configure"
19267 #include "confdefs.h"
19268 #define $ac_func autoconf_temporary
19269 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19270 #undef $ac_func
19271
19272 #ifdef __cplusplus
19273 extern "C"
19274 #endif
19275
19276 /* We use char because int might match the return type of a gcc2
19277    builtin and then its argument prototype would still apply.  */
19278 char $ac_func (void);
19279
19280 int
19281 main (void)
19282 {
19283
19284 /* The GNU C library defines stubs for functions which it implements
19285     to always fail with ENOSYS.  Some functions are actually named
19286     something starting with __ and the normal name is an alias.  */
19287 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19288 #error found stub for $ac_func
19289 #endif
19290
19291         return $ac_func ();
19292   ;
19293   return 0;
19294 }
19295 _ACEOF
19296 rm -f conftest.$ac_objext conftest$ac_exeext
19297 if { (eval echo "$as_me:19297: \"$ac_link\"") >&5
19298   (eval $ac_link) 2>&5
19299   ac_status=$?
19300   echo "$as_me:19300: \$? = $ac_status" >&5
19301   (exit $ac_status); } &&
19302          { ac_try='test -s conftest$ac_exeext'
19303   { (eval echo "$as_me:19303: \"$ac_try\"") >&5
19304   (eval $ac_try) 2>&5
19305   ac_status=$?
19306   echo "$as_me:19306: \$? = $ac_status" >&5
19307   (exit $ac_status); }; }; then
19308   eval "$as_ac_var=yes"
19309 else
19310   echo "$as_me: failed program was:" >&5
19311 cat conftest.$ac_ext >&5
19312 eval "$as_ac_var=no"
19313 fi
19314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19315 fi
19316 echo "$as_me:19316: result: `eval echo '${'$as_ac_var'}'`" >&5
19317 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19318 if test `eval echo '${'$as_ac_var'}'` = yes; then
19319   cat >>confdefs.h <<EOF
19320 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19321 EOF
19322
19323 fi
19324 done
19325
19326 if test "x$ac_cv_func_getopt" = xno && \
19327    test "x$cf_with_progs$cf_with_tests" != xnono; then
19328         { { echo "$as_me:19328: error: getopt is required for building programs" >&5
19329 echo "$as_me: error: getopt is required for building programs" >&2;}
19330    { (exit 1); exit 1; }; }
19331 fi
19332
19333 if test "x$with_safe_sprintf" = xyes
19334 then
19335         if test "x$ac_cv_func_vsnprintf" = xyes
19336         then
19337                 { echo "$as_me:19337: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
19338 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
19339         else
19340
19341 cat >>confdefs.h <<\EOF
19342 #define USE_SAFE_SPRINTF 1
19343 EOF
19344
19345         fi
19346 fi
19347
19348 if test "x$with_getcap" = "xyes" ; then
19349
19350 echo "$as_me:19350: checking for terminal-capability database functions" >&5
19351 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
19352 if test "${cf_cv_cgetent+set}" = set; then
19353   echo $ECHO_N "(cached) $ECHO_C" >&6
19354 else
19355
19356 cat >conftest.$ac_ext <<_ACEOF
19357 #line 19357 "configure"
19358 #include "confdefs.h"
19359
19360 #include <stdlib.h>
19361 int
19362 main (void)
19363 {
19364
19365         char temp[128];
19366         char *buf = temp;
19367         char *db_array = temp;
19368         cgetent(&buf, &db_array, "vt100");
19369         cgetcap(buf, "tc", '=');
19370         cgetmatch(buf, "tc");
19371
19372   ;
19373   return 0;
19374 }
19375 _ACEOF
19376 rm -f conftest.$ac_objext conftest$ac_exeext
19377 if { (eval echo "$as_me:19377: \"$ac_link\"") >&5
19378   (eval $ac_link) 2>&5
19379   ac_status=$?
19380   echo "$as_me:19380: \$? = $ac_status" >&5
19381   (exit $ac_status); } &&
19382          { ac_try='test -s conftest$ac_exeext'
19383   { (eval echo "$as_me:19383: \"$ac_try\"") >&5
19384   (eval $ac_try) 2>&5
19385   ac_status=$?
19386   echo "$as_me:19386: \$? = $ac_status" >&5
19387   (exit $ac_status); }; }; then
19388   cf_cv_cgetent=yes
19389 else
19390   echo "$as_me: failed program was:" >&5
19391 cat conftest.$ac_ext >&5
19392 cf_cv_cgetent=no
19393 fi
19394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19395
19396 fi
19397 echo "$as_me:19397: result: $cf_cv_cgetent" >&5
19398 echo "${ECHO_T}$cf_cv_cgetent" >&6
19399
19400 if test "$cf_cv_cgetent" = yes
19401 then
19402
19403 cat >>confdefs.h <<\EOF
19404 #define HAVE_BSD_CGETENT 1
19405 EOF
19406
19407 echo "$as_me:19407: checking if cgetent uses const parameter" >&5
19408 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
19409 if test "${cf_cv_cgetent_const+set}" = set; then
19410   echo $ECHO_N "(cached) $ECHO_C" >&6
19411 else
19412
19413 cat >conftest.$ac_ext <<_ACEOF
19414 #line 19414 "configure"
19415 #include "confdefs.h"
19416
19417 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
19418 #include <stdlib.h>
19419 int
19420 main (void)
19421 {
19422
19423         char temp[128];
19424         char *buf = temp;
19425 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
19426         const char *db_array = temp;
19427         cgetent(&buf, &db_array, "vt100");
19428 #endif
19429         cgetcap(buf, "tc", '=');
19430         cgetmatch(buf, "tc");
19431
19432   ;
19433   return 0;
19434 }
19435 _ACEOF
19436 rm -f conftest.$ac_objext conftest$ac_exeext
19437 if { (eval echo "$as_me:19437: \"$ac_link\"") >&5
19438   (eval $ac_link) 2>&5
19439   ac_status=$?
19440   echo "$as_me:19440: \$? = $ac_status" >&5
19441   (exit $ac_status); } &&
19442          { ac_try='test -s conftest$ac_exeext'
19443   { (eval echo "$as_me:19443: \"$ac_try\"") >&5
19444   (eval $ac_try) 2>&5
19445   ac_status=$?
19446   echo "$as_me:19446: \$? = $ac_status" >&5
19447   (exit $ac_status); }; }; then
19448   cf_cv_cgetent_const=yes
19449 else
19450   echo "$as_me: failed program was:" >&5
19451 cat conftest.$ac_ext >&5
19452 cf_cv_cgetent_const=no
19453 fi
19454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19455
19456 fi
19457 echo "$as_me:19457: result: $cf_cv_cgetent_const" >&5
19458 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
19459         if test "$cf_cv_cgetent_const" = yes
19460         then
19461
19462 cat >>confdefs.h <<EOF
19463 #define CGETENT_CONST const
19464 EOF
19465
19466         fi
19467 fi
19468
19469 fi
19470
19471 echo "$as_me:19471: checking for isascii" >&5
19472 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
19473 if test "${cf_cv_have_isascii+set}" = set; then
19474   echo $ECHO_N "(cached) $ECHO_C" >&6
19475 else
19476
19477         cat >conftest.$ac_ext <<_ACEOF
19478 #line 19478 "configure"
19479 #include "confdefs.h"
19480 #include <ctype.h>
19481 int
19482 main (void)
19483 {
19484 int x = isascii(' ')
19485   ;
19486   return 0;
19487 }
19488 _ACEOF
19489 rm -f conftest.$ac_objext conftest$ac_exeext
19490 if { (eval echo "$as_me:19490: \"$ac_link\"") >&5
19491   (eval $ac_link) 2>&5
19492   ac_status=$?
19493   echo "$as_me:19493: \$? = $ac_status" >&5
19494   (exit $ac_status); } &&
19495          { ac_try='test -s conftest$ac_exeext'
19496   { (eval echo "$as_me:19496: \"$ac_try\"") >&5
19497   (eval $ac_try) 2>&5
19498   ac_status=$?
19499   echo "$as_me:19499: \$? = $ac_status" >&5
19500   (exit $ac_status); }; }; then
19501   cf_cv_have_isascii=yes
19502 else
19503   echo "$as_me: failed program was:" >&5
19504 cat conftest.$ac_ext >&5
19505 cf_cv_have_isascii=no
19506 fi
19507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19508
19509 fi
19510 echo "$as_me:19510: result: $cf_cv_have_isascii" >&5
19511 echo "${ECHO_T}$cf_cv_have_isascii" >&6
19512 test "$cf_cv_have_isascii" = yes &&
19513 cat >>confdefs.h <<\EOF
19514 #define HAVE_ISASCII 1
19515 EOF
19516
19517 if test "$ac_cv_func_sigaction" = yes; then
19518 echo "$as_me:19518: checking whether sigaction needs _POSIX_SOURCE" >&5
19519 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
19520 cat >conftest.$ac_ext <<_ACEOF
19521 #line 19521 "configure"
19522 #include "confdefs.h"
19523
19524 #include <sys/types.h>
19525 #include <signal.h>
19526 int
19527 main (void)
19528 {
19529 struct sigaction act
19530   ;
19531   return 0;
19532 }
19533 _ACEOF
19534 rm -f conftest.$ac_objext
19535 if { (eval echo "$as_me:19535: \"$ac_compile\"") >&5
19536   (eval $ac_compile) 2>&5
19537   ac_status=$?
19538   echo "$as_me:19538: \$? = $ac_status" >&5
19539   (exit $ac_status); } &&
19540          { ac_try='test -s conftest.$ac_objext'
19541   { (eval echo "$as_me:19541: \"$ac_try\"") >&5
19542   (eval $ac_try) 2>&5
19543   ac_status=$?
19544   echo "$as_me:19544: \$? = $ac_status" >&5
19545   (exit $ac_status); }; }; then
19546   sigact_bad=no
19547 else
19548   echo "$as_me: failed program was:" >&5
19549 cat conftest.$ac_ext >&5
19550
19551 cat >conftest.$ac_ext <<_ACEOF
19552 #line 19552 "configure"
19553 #include "confdefs.h"
19554
19555 #define _POSIX_SOURCE
19556 #include <sys/types.h>
19557 #include <signal.h>
19558 int
19559 main (void)
19560 {
19561 struct sigaction act
19562   ;
19563   return 0;
19564 }
19565 _ACEOF
19566 rm -f conftest.$ac_objext
19567 if { (eval echo "$as_me:19567: \"$ac_compile\"") >&5
19568   (eval $ac_compile) 2>&5
19569   ac_status=$?
19570   echo "$as_me:19570: \$? = $ac_status" >&5
19571   (exit $ac_status); } &&
19572          { ac_try='test -s conftest.$ac_objext'
19573   { (eval echo "$as_me:19573: \"$ac_try\"") >&5
19574   (eval $ac_try) 2>&5
19575   ac_status=$?
19576   echo "$as_me:19576: \$? = $ac_status" >&5
19577   (exit $ac_status); }; }; then
19578   sigact_bad=yes
19579
19580 cat >>confdefs.h <<\EOF
19581 #define _POSIX_SOURCE 1
19582 EOF
19583
19584 else
19585   echo "$as_me: failed program was:" >&5
19586 cat conftest.$ac_ext >&5
19587 sigact_bad=unknown
19588 fi
19589 rm -f conftest.$ac_objext conftest.$ac_ext
19590 fi
19591 rm -f conftest.$ac_objext conftest.$ac_ext
19592 echo "$as_me:19592: result: $sigact_bad" >&5
19593 echo "${ECHO_T}$sigact_bad" >&6
19594 fi
19595
19596 echo "$as_me:19596: checking if nanosleep really works" >&5
19597 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19598 if test "${cf_cv_func_nanosleep+set}" = set; then
19599   echo $ECHO_N "(cached) $ECHO_C" >&6
19600 else
19601
19602 if test "$cross_compiling" = yes; then
19603   cf_cv_func_nanosleep=unknown
19604 else
19605   cat >conftest.$ac_ext <<_ACEOF
19606 #line 19606 "configure"
19607 #include "confdefs.h"
19608
19609 #include <stdio.h>
19610 #include <errno.h>
19611 #include <time.h>
19612
19613 #ifdef HAVE_SYS_TIME_H
19614 #include <sys/time.h>
19615 #endif
19616
19617 int main(void) {
19618         struct timespec ts1, ts2;
19619         int code;
19620         ts1.tv_sec  = 0;
19621         ts1.tv_nsec = 750000000;
19622         ts2.tv_sec  = 0;
19623         ts2.tv_nsec = 0;
19624         errno = 0;
19625         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19626         ${cf_cv_main_return:-return}(code != 0);
19627 }
19628
19629 _ACEOF
19630 rm -f conftest$ac_exeext
19631 if { (eval echo "$as_me:19631: \"$ac_link\"") >&5
19632   (eval $ac_link) 2>&5
19633   ac_status=$?
19634   echo "$as_me:19634: \$? = $ac_status" >&5
19635   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19636   { (eval echo "$as_me:19636: \"$ac_try\"") >&5
19637   (eval $ac_try) 2>&5
19638   ac_status=$?
19639   echo "$as_me:19639: \$? = $ac_status" >&5
19640   (exit $ac_status); }; }; then
19641   cf_cv_func_nanosleep=yes
19642 else
19643   echo "$as_me: program exited with status $ac_status" >&5
19644 echo "$as_me: failed program was:" >&5
19645 cat conftest.$ac_ext >&5
19646 cf_cv_func_nanosleep=no
19647 fi
19648 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19649 fi
19650 fi
19651 echo "$as_me:19651: result: $cf_cv_func_nanosleep" >&5
19652 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19653
19654 test "$cf_cv_func_nanosleep" = "yes" &&
19655 cat >>confdefs.h <<\EOF
19656 #define HAVE_NANOSLEEP 1
19657 EOF
19658
19659 for ac_header in \
19660 termio.h \
19661 termios.h \
19662 unistd.h \
19663 sys/ioctl.h \
19664 sys/termio.h \
19665
19666 do
19667 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19668 echo "$as_me:19668: checking for $ac_header" >&5
19669 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19670 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19671   echo $ECHO_N "(cached) $ECHO_C" >&6
19672 else
19673   cat >conftest.$ac_ext <<_ACEOF
19674 #line 19674 "configure"
19675 #include "confdefs.h"
19676 #include <$ac_header>
19677 _ACEOF
19678 if { (eval echo "$as_me:19678: \"$ac_cpp conftest.$ac_ext\"") >&5
19679   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19680   ac_status=$?
19681   egrep -v '^ *\+' conftest.er1 >conftest.err
19682   rm -f conftest.er1
19683   cat conftest.err >&5
19684   echo "$as_me:19684: \$? = $ac_status" >&5
19685   (exit $ac_status); } >/dev/null; then
19686   if test -s conftest.err; then
19687     ac_cpp_err=$ac_c_preproc_warn_flag
19688   else
19689     ac_cpp_err=
19690   fi
19691 else
19692   ac_cpp_err=yes
19693 fi
19694 if test -z "$ac_cpp_err"; then
19695   eval "$as_ac_Header=yes"
19696 else
19697   echo "$as_me: failed program was:" >&5
19698   cat conftest.$ac_ext >&5
19699   eval "$as_ac_Header=no"
19700 fi
19701 rm -f conftest.err conftest.$ac_ext
19702 fi
19703 echo "$as_me:19703: result: `eval echo '${'$as_ac_Header'}'`" >&5
19704 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19705 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19706   cat >>confdefs.h <<EOF
19707 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19708 EOF
19709
19710 fi
19711 done
19712
19713 if test "$ac_cv_header_termios_h" = yes ; then
19714         case "$CFLAGS $CPPFLAGS" in
19715         (*-D_POSIX_SOURCE*)
19716                 termios_bad=dunno ;;
19717         (*)     termios_bad=maybe ;;
19718         esac
19719         if test "$termios_bad" = maybe ; then
19720         echo "$as_me:19720: checking whether termios.h needs _POSIX_SOURCE" >&5
19721 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
19722         cat >conftest.$ac_ext <<_ACEOF
19723 #line 19723 "configure"
19724 #include "confdefs.h"
19725 #include <termios.h>
19726 int
19727 main (void)
19728 {
19729 struct termios foo; int x = foo.c_iflag
19730   ;
19731   return 0;
19732 }
19733 _ACEOF
19734 rm -f conftest.$ac_objext
19735 if { (eval echo "$as_me:19735: \"$ac_compile\"") >&5
19736   (eval $ac_compile) 2>&5
19737   ac_status=$?
19738   echo "$as_me:19738: \$? = $ac_status" >&5
19739   (exit $ac_status); } &&
19740          { ac_try='test -s conftest.$ac_objext'
19741   { (eval echo "$as_me:19741: \"$ac_try\"") >&5
19742   (eval $ac_try) 2>&5
19743   ac_status=$?
19744   echo "$as_me:19744: \$? = $ac_status" >&5
19745   (exit $ac_status); }; }; then
19746   termios_bad=no
19747 else
19748   echo "$as_me: failed program was:" >&5
19749 cat conftest.$ac_ext >&5
19750
19751                 cat >conftest.$ac_ext <<_ACEOF
19752 #line 19752 "configure"
19753 #include "confdefs.h"
19754
19755 #define _POSIX_SOURCE
19756 #include <termios.h>
19757 int
19758 main (void)
19759 {
19760 struct termios foo; int x = foo.c_iflag
19761   ;
19762   return 0;
19763 }
19764 _ACEOF
19765 rm -f conftest.$ac_objext
19766 if { (eval echo "$as_me:19766: \"$ac_compile\"") >&5
19767   (eval $ac_compile) 2>&5
19768   ac_status=$?
19769   echo "$as_me:19769: \$? = $ac_status" >&5
19770   (exit $ac_status); } &&
19771          { ac_try='test -s conftest.$ac_objext'
19772   { (eval echo "$as_me:19772: \"$ac_try\"") >&5
19773   (eval $ac_try) 2>&5
19774   ac_status=$?
19775   echo "$as_me:19775: \$? = $ac_status" >&5
19776   (exit $ac_status); }; }; then
19777   termios_bad=unknown
19778 else
19779   echo "$as_me: failed program was:" >&5
19780 cat conftest.$ac_ext >&5
19781 termios_bad=yes
19782 cat >>confdefs.h <<\EOF
19783 #define _POSIX_SOURCE 1
19784 EOF
19785
19786 fi
19787 rm -f conftest.$ac_objext conftest.$ac_ext
19788
19789 fi
19790 rm -f conftest.$ac_objext conftest.$ac_ext
19791         echo "$as_me:19791: result: $termios_bad" >&5
19792 echo "${ECHO_T}$termios_bad" >&6
19793         fi
19794 fi
19795
19796 echo "$as_me:19796: checking for tcgetattr" >&5
19797 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
19798 if test "${cf_cv_have_tcgetattr+set}" = set; then
19799   echo $ECHO_N "(cached) $ECHO_C" >&6
19800 else
19801
19802 cat >conftest.$ac_ext <<_ACEOF
19803 #line 19803 "configure"
19804 #include "confdefs.h"
19805
19806 #include <sys/types.h>
19807 #ifdef HAVE_UNISTD_H
19808 #include <unistd.h>
19809 #endif
19810 #ifdef HAVE_TERMIOS_H
19811 #include <termios.h>
19812 #define TTY struct termios
19813 #else
19814 #ifdef HAVE_TERMIO_H
19815 #include <termio.h>
19816 #define TTY struct termio
19817 #endif
19818 #endif
19819
19820 int
19821 main (void)
19822 {
19823
19824 TTY foo;
19825 tcgetattr(1, &foo);
19826   ;
19827   return 0;
19828 }
19829 _ACEOF
19830 rm -f conftest.$ac_objext conftest$ac_exeext
19831 if { (eval echo "$as_me:19831: \"$ac_link\"") >&5
19832   (eval $ac_link) 2>&5
19833   ac_status=$?
19834   echo "$as_me:19834: \$? = $ac_status" >&5
19835   (exit $ac_status); } &&
19836          { ac_try='test -s conftest$ac_exeext'
19837   { (eval echo "$as_me:19837: \"$ac_try\"") >&5
19838   (eval $ac_try) 2>&5
19839   ac_status=$?
19840   echo "$as_me:19840: \$? = $ac_status" >&5
19841   (exit $ac_status); }; }; then
19842   cf_cv_have_tcgetattr=yes
19843 else
19844   echo "$as_me: failed program was:" >&5
19845 cat conftest.$ac_ext >&5
19846 cf_cv_have_tcgetattr=no
19847 fi
19848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19849 fi
19850 echo "$as_me:19850: result: $cf_cv_have_tcgetattr" >&5
19851 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
19852 test "$cf_cv_have_tcgetattr" = yes &&
19853 cat >>confdefs.h <<\EOF
19854 #define HAVE_TCGETATTR 1
19855 EOF
19856
19857 echo "$as_me:19857: checking for vsscanf function or workaround" >&5
19858 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
19859 if test "${cf_cv_func_vsscanf+set}" = set; then
19860   echo $ECHO_N "(cached) $ECHO_C" >&6
19861 else
19862
19863 cat >conftest.$ac_ext <<_ACEOF
19864 #line 19864 "configure"
19865 #include "confdefs.h"
19866
19867 #include <stdarg.h>
19868 #include <stdio.h>
19869 int
19870 main (void)
19871 {
19872
19873         va_list ap;
19874         vsscanf("from", "%d", ap)
19875   ;
19876   return 0;
19877 }
19878 _ACEOF
19879 rm -f conftest.$ac_objext conftest$ac_exeext
19880 if { (eval echo "$as_me:19880: \"$ac_link\"") >&5
19881   (eval $ac_link) 2>&5
19882   ac_status=$?
19883   echo "$as_me:19883: \$? = $ac_status" >&5
19884   (exit $ac_status); } &&
19885          { ac_try='test -s conftest$ac_exeext'
19886   { (eval echo "$as_me:19886: \"$ac_try\"") >&5
19887   (eval $ac_try) 2>&5
19888   ac_status=$?
19889   echo "$as_me:19889: \$? = $ac_status" >&5
19890   (exit $ac_status); }; }; then
19891   cf_cv_func_vsscanf=vsscanf
19892 else
19893   echo "$as_me: failed program was:" >&5
19894 cat conftest.$ac_ext >&5
19895
19896 cat >conftest.$ac_ext <<_ACEOF
19897 #line 19897 "configure"
19898 #include "confdefs.h"
19899
19900 #include <stdarg.h>
19901 #include <stdio.h>
19902 int
19903 main (void)
19904 {
19905
19906         FILE strbuf;
19907         char *str = "from";
19908
19909         strbuf._flag = _IOREAD;
19910         strbuf._ptr = strbuf._base = (unsigned char *) str;
19911         strbuf._cnt = strlen(str);
19912         strbuf._file = _NFILE;
19913         return (vfscanf(&strbuf, "%d", ap))
19914   ;
19915   return 0;
19916 }
19917 _ACEOF
19918 rm -f conftest.$ac_objext conftest$ac_exeext
19919 if { (eval echo "$as_me:19919: \"$ac_link\"") >&5
19920   (eval $ac_link) 2>&5
19921   ac_status=$?
19922   echo "$as_me:19922: \$? = $ac_status" >&5
19923   (exit $ac_status); } &&
19924          { ac_try='test -s conftest$ac_exeext'
19925   { (eval echo "$as_me:19925: \"$ac_try\"") >&5
19926   (eval $ac_try) 2>&5
19927   ac_status=$?
19928   echo "$as_me:19928: \$? = $ac_status" >&5
19929   (exit $ac_status); }; }; then
19930   cf_cv_func_vsscanf=vfscanf
19931 else
19932   echo "$as_me: failed program was:" >&5
19933 cat conftest.$ac_ext >&5
19934
19935 cat >conftest.$ac_ext <<_ACEOF
19936 #line 19936 "configure"
19937 #include "confdefs.h"
19938
19939 #include <stdarg.h>
19940 #include <stdio.h>
19941 int
19942 main (void)
19943 {
19944
19945         FILE strbuf;
19946         char *str = "from";
19947
19948         strbuf._flag = _IOREAD;
19949         strbuf._ptr = strbuf._base = (unsigned char *) str;
19950         strbuf._cnt = strlen(str);
19951         strbuf._file = _NFILE;
19952         return (_doscan(&strbuf, "%d", ap))
19953   ;
19954   return 0;
19955 }
19956 _ACEOF
19957 rm -f conftest.$ac_objext conftest$ac_exeext
19958 if { (eval echo "$as_me:19958: \"$ac_link\"") >&5
19959   (eval $ac_link) 2>&5
19960   ac_status=$?
19961   echo "$as_me:19961: \$? = $ac_status" >&5
19962   (exit $ac_status); } &&
19963          { ac_try='test -s conftest$ac_exeext'
19964   { (eval echo "$as_me:19964: \"$ac_try\"") >&5
19965   (eval $ac_try) 2>&5
19966   ac_status=$?
19967   echo "$as_me:19967: \$? = $ac_status" >&5
19968   (exit $ac_status); }; }; then
19969   cf_cv_func_vsscanf=_doscan
19970 else
19971   echo "$as_me: failed program was:" >&5
19972 cat conftest.$ac_ext >&5
19973
19974 cf_cv_func_vsscanf=no
19975 fi
19976 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19977 fi
19978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19979 fi
19980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19981 fi
19982 echo "$as_me:19982: result: $cf_cv_func_vsscanf" >&5
19983 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
19984
19985 case $cf_cv_func_vsscanf in
19986 (vsscanf)
19987 cat >>confdefs.h <<\EOF
19988 #define HAVE_VSSCANF 1
19989 EOF
19990 ;;
19991 (vfscanf)
19992 cat >>confdefs.h <<\EOF
19993 #define HAVE_VFSCANF 1
19994 EOF
19995 ;;
19996 (_doscan)
19997 cat >>confdefs.h <<\EOF
19998 #define HAVE__DOSCAN 1
19999 EOF
20000 ;;
20001 esac
20002
20003 for ac_header in \
20004 unistd.h \
20005
20006 do
20007 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20008 echo "$as_me:20008: checking for $ac_header" >&5
20009 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20010 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20011   echo $ECHO_N "(cached) $ECHO_C" >&6
20012 else
20013   cat >conftest.$ac_ext <<_ACEOF
20014 #line 20014 "configure"
20015 #include "confdefs.h"
20016 #include <$ac_header>
20017 _ACEOF
20018 if { (eval echo "$as_me:20018: \"$ac_cpp conftest.$ac_ext\"") >&5
20019   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20020   ac_status=$?
20021   egrep -v '^ *\+' conftest.er1 >conftest.err
20022   rm -f conftest.er1
20023   cat conftest.err >&5
20024   echo "$as_me:20024: \$? = $ac_status" >&5
20025   (exit $ac_status); } >/dev/null; then
20026   if test -s conftest.err; then
20027     ac_cpp_err=$ac_c_preproc_warn_flag
20028   else
20029     ac_cpp_err=
20030   fi
20031 else
20032   ac_cpp_err=yes
20033 fi
20034 if test -z "$ac_cpp_err"; then
20035   eval "$as_ac_Header=yes"
20036 else
20037   echo "$as_me: failed program was:" >&5
20038   cat conftest.$ac_ext >&5
20039   eval "$as_ac_Header=no"
20040 fi
20041 rm -f conftest.err conftest.$ac_ext
20042 fi
20043 echo "$as_me:20043: result: `eval echo '${'$as_ac_Header'}'`" >&5
20044 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20045 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20046   cat >>confdefs.h <<EOF
20047 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20048 EOF
20049
20050 fi
20051 done
20052
20053 echo "$as_me:20053: checking for working mkstemp" >&5
20054 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20055 if test "${cf_cv_func_mkstemp+set}" = set; then
20056   echo $ECHO_N "(cached) $ECHO_C" >&6
20057 else
20058
20059 rm -rf conftest*
20060 if test "$cross_compiling" = yes; then
20061   cf_cv_func_mkstemp=maybe
20062 else
20063   cat >conftest.$ac_ext <<_ACEOF
20064 #line 20064 "configure"
20065 #include "confdefs.h"
20066
20067 #include <sys/types.h>
20068 #ifdef HAVE_UNISTD_H
20069 #include <unistd.h>
20070 #endif
20071 #include <stdlib.h>
20072 #include <stdio.h>
20073 #include <string.h>
20074 #include <sys/stat.h>
20075 int main(void)
20076 {
20077         char *tmpl = "conftestXXXXXX";
20078         char name[2][80];
20079         int n;
20080         int result = 0;
20081         int fd;
20082         struct stat sb;
20083
20084         umask(077);
20085         for (n = 0; n < 2; ++n) {
20086                 strcpy(name[n], tmpl);
20087                 if ((fd = mkstemp(name[n])) >= 0) {
20088                         if (!strcmp(name[n], tmpl)
20089                          || stat(name[n], &sb) != 0
20090                          || (sb.st_mode & S_IFMT) != S_IFREG
20091                          || (sb.st_mode & 077) != 0) {
20092                                 result = 1;
20093                         }
20094                         close(fd);
20095                 }
20096         }
20097         if (result == 0
20098          && !strcmp(name[0], name[1]))
20099                 result = 1;
20100         ${cf_cv_main_return:-return}(result);
20101 }
20102
20103 _ACEOF
20104 rm -f conftest$ac_exeext
20105 if { (eval echo "$as_me:20105: \"$ac_link\"") >&5
20106   (eval $ac_link) 2>&5
20107   ac_status=$?
20108   echo "$as_me:20108: \$? = $ac_status" >&5
20109   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20110   { (eval echo "$as_me:20110: \"$ac_try\"") >&5
20111   (eval $ac_try) 2>&5
20112   ac_status=$?
20113   echo "$as_me:20113: \$? = $ac_status" >&5
20114   (exit $ac_status); }; }; then
20115   cf_cv_func_mkstemp=yes
20116
20117 else
20118   echo "$as_me: program exited with status $ac_status" >&5
20119 echo "$as_me: failed program was:" >&5
20120 cat conftest.$ac_ext >&5
20121 cf_cv_func_mkstemp=no
20122
20123 fi
20124 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20125 fi
20126
20127 fi
20128 echo "$as_me:20128: result: $cf_cv_func_mkstemp" >&5
20129 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20130 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20131         echo "$as_me:20131: checking for mkstemp" >&5
20132 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20133 if test "${ac_cv_func_mkstemp+set}" = set; then
20134   echo $ECHO_N "(cached) $ECHO_C" >&6
20135 else
20136   cat >conftest.$ac_ext <<_ACEOF
20137 #line 20137 "configure"
20138 #include "confdefs.h"
20139 #define mkstemp autoconf_temporary
20140 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20141 #undef mkstemp
20142
20143 #ifdef __cplusplus
20144 extern "C"
20145 #endif
20146
20147 /* We use char because int might match the return type of a gcc2
20148    builtin and then its argument prototype would still apply.  */
20149 char mkstemp (void);
20150
20151 int
20152 main (void)
20153 {
20154
20155 /* The GNU C library defines stubs for functions which it implements
20156     to always fail with ENOSYS.  Some functions are actually named
20157     something starting with __ and the normal name is an alias.  */
20158 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20159 #error found stub for mkstemp
20160 #endif
20161
20162         return mkstemp ();
20163   ;
20164   return 0;
20165 }
20166 _ACEOF
20167 rm -f conftest.$ac_objext conftest$ac_exeext
20168 if { (eval echo "$as_me:20168: \"$ac_link\"") >&5
20169   (eval $ac_link) 2>&5
20170   ac_status=$?
20171   echo "$as_me:20171: \$? = $ac_status" >&5
20172   (exit $ac_status); } &&
20173          { ac_try='test -s conftest$ac_exeext'
20174   { (eval echo "$as_me:20174: \"$ac_try\"") >&5
20175   (eval $ac_try) 2>&5
20176   ac_status=$?
20177   echo "$as_me:20177: \$? = $ac_status" >&5
20178   (exit $ac_status); }; }; then
20179   ac_cv_func_mkstemp=yes
20180 else
20181   echo "$as_me: failed program was:" >&5
20182 cat conftest.$ac_ext >&5
20183 ac_cv_func_mkstemp=no
20184 fi
20185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20186 fi
20187 echo "$as_me:20187: result: $ac_cv_func_mkstemp" >&5
20188 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20189
20190 fi
20191 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20192
20193 cat >>confdefs.h <<\EOF
20194 #define HAVE_MKSTEMP 1
20195 EOF
20196
20197 fi
20198
20199 # setup for prototype of fallback for vsscanf()
20200
20201 if test "$cf_cv_func_vsscanf" = vsscanf ; then
20202         HAVE_VSSCANF=1
20203 else
20204         HAVE_VSSCANF=0
20205 fi
20206
20207 if test "x$cross_compiling" = xyes ; then
20208         { echo "$as_me:20208: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20209 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20210 else
20211         echo "$as_me:20211: checking whether setvbuf arguments are reversed" >&5
20212 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20213 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20214   echo $ECHO_N "(cached) $ECHO_C" >&6
20215 else
20216   if test "$cross_compiling" = yes; then
20217   { { echo "$as_me:20217: error: cannot run test program while cross compiling" >&5
20218 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20219    { (exit 1); exit 1; }; }
20220 else
20221   cat >conftest.$ac_ext <<_ACEOF
20222 #line 20222 "configure"
20223 #include "confdefs.h"
20224 #include <stdio.h>
20225 /* If setvbuf has the reversed format, exit 0. */
20226 int
20227 main (void)
20228 {
20229   /* This call has the arguments reversed.
20230      A reversed system may check and see that the address of main
20231      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20232   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20233     $ac_main_return(1);
20234   putc('\r', stdout);
20235   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
20236 }
20237 _ACEOF
20238 rm -f conftest$ac_exeext
20239 if { (eval echo "$as_me:20239: \"$ac_link\"") >&5
20240   (eval $ac_link) 2>&5
20241   ac_status=$?
20242   echo "$as_me:20242: \$? = $ac_status" >&5
20243   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20244   { (eval echo "$as_me:20244: \"$ac_try\"") >&5
20245   (eval $ac_try) 2>&5
20246   ac_status=$?
20247   echo "$as_me:20247: \$? = $ac_status" >&5
20248   (exit $ac_status); }; }; then
20249   ac_cv_func_setvbuf_reversed=yes
20250 else
20251   echo "$as_me: program exited with status $ac_status" >&5
20252 echo "$as_me: failed program was:" >&5
20253 cat conftest.$ac_ext >&5
20254 ac_cv_func_setvbuf_reversed=no
20255 fi
20256 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20257 fi
20258 rm -f core core.* *.core
20259 fi
20260 echo "$as_me:20260: result: $ac_cv_func_setvbuf_reversed" >&5
20261 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
20262 if test $ac_cv_func_setvbuf_reversed = yes; then
20263
20264 cat >>confdefs.h <<\EOF
20265 #define SETVBUF_REVERSED 1
20266 EOF
20267
20268 fi
20269
20270 fi
20271 echo "$as_me:20271: checking for intptr_t" >&5
20272 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
20273 if test "${ac_cv_type_intptr_t+set}" = set; then
20274   echo $ECHO_N "(cached) $ECHO_C" >&6
20275 else
20276   cat >conftest.$ac_ext <<_ACEOF
20277 #line 20277 "configure"
20278 #include "confdefs.h"
20279 $ac_includes_default
20280 int
20281 main (void)
20282 {
20283 if ((intptr_t *) 0)
20284   return 0;
20285 if (sizeof (intptr_t))
20286   return 0;
20287   ;
20288   return 0;
20289 }
20290 _ACEOF
20291 rm -f conftest.$ac_objext
20292 if { (eval echo "$as_me:20292: \"$ac_compile\"") >&5
20293   (eval $ac_compile) 2>&5
20294   ac_status=$?
20295   echo "$as_me:20295: \$? = $ac_status" >&5
20296   (exit $ac_status); } &&
20297          { ac_try='test -s conftest.$ac_objext'
20298   { (eval echo "$as_me:20298: \"$ac_try\"") >&5
20299   (eval $ac_try) 2>&5
20300   ac_status=$?
20301   echo "$as_me:20301: \$? = $ac_status" >&5
20302   (exit $ac_status); }; }; then
20303   ac_cv_type_intptr_t=yes
20304 else
20305   echo "$as_me: failed program was:" >&5
20306 cat conftest.$ac_ext >&5
20307 ac_cv_type_intptr_t=no
20308 fi
20309 rm -f conftest.$ac_objext conftest.$ac_ext
20310 fi
20311 echo "$as_me:20311: result: $ac_cv_type_intptr_t" >&5
20312 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
20313 if test $ac_cv_type_intptr_t = yes; then
20314   :
20315 else
20316
20317 cat >>confdefs.h <<EOF
20318 #define intptr_t long
20319 EOF
20320
20321 fi
20322
20323 echo "$as_me:20323: checking for ssize_t" >&5
20324 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
20325 if test "${ac_cv_type_ssize_t+set}" = set; then
20326   echo $ECHO_N "(cached) $ECHO_C" >&6
20327 else
20328   cat >conftest.$ac_ext <<_ACEOF
20329 #line 20329 "configure"
20330 #include "confdefs.h"
20331 $ac_includes_default
20332 int
20333 main (void)
20334 {
20335 if ((ssize_t *) 0)
20336   return 0;
20337 if (sizeof (ssize_t))
20338   return 0;
20339   ;
20340   return 0;
20341 }
20342 _ACEOF
20343 rm -f conftest.$ac_objext
20344 if { (eval echo "$as_me:20344: \"$ac_compile\"") >&5
20345   (eval $ac_compile) 2>&5
20346   ac_status=$?
20347   echo "$as_me:20347: \$? = $ac_status" >&5
20348   (exit $ac_status); } &&
20349          { ac_try='test -s conftest.$ac_objext'
20350   { (eval echo "$as_me:20350: \"$ac_try\"") >&5
20351   (eval $ac_try) 2>&5
20352   ac_status=$?
20353   echo "$as_me:20353: \$? = $ac_status" >&5
20354   (exit $ac_status); }; }; then
20355   ac_cv_type_ssize_t=yes
20356 else
20357   echo "$as_me: failed program was:" >&5
20358 cat conftest.$ac_ext >&5
20359 ac_cv_type_ssize_t=no
20360 fi
20361 rm -f conftest.$ac_objext conftest.$ac_ext
20362 fi
20363 echo "$as_me:20363: result: $ac_cv_type_ssize_t" >&5
20364 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
20365 if test $ac_cv_type_ssize_t = yes; then
20366   :
20367 else
20368
20369 cat >>confdefs.h <<EOF
20370 #define ssize_t int
20371 EOF
20372
20373 fi
20374
20375 echo "$as_me:20375: checking for type sigaction_t" >&5
20376 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
20377 if test "${cf_cv_type_sigaction+set}" = set; then
20378   echo $ECHO_N "(cached) $ECHO_C" >&6
20379 else
20380
20381         cat >conftest.$ac_ext <<_ACEOF
20382 #line 20382 "configure"
20383 #include "confdefs.h"
20384
20385 #include <signal.h>
20386 int
20387 main (void)
20388 {
20389 sigaction_t x
20390   ;
20391   return 0;
20392 }
20393 _ACEOF
20394 rm -f conftest.$ac_objext
20395 if { (eval echo "$as_me:20395: \"$ac_compile\"") >&5
20396   (eval $ac_compile) 2>&5
20397   ac_status=$?
20398   echo "$as_me:20398: \$? = $ac_status" >&5
20399   (exit $ac_status); } &&
20400          { ac_try='test -s conftest.$ac_objext'
20401   { (eval echo "$as_me:20401: \"$ac_try\"") >&5
20402   (eval $ac_try) 2>&5
20403   ac_status=$?
20404   echo "$as_me:20404: \$? = $ac_status" >&5
20405   (exit $ac_status); }; }; then
20406   cf_cv_type_sigaction=yes
20407 else
20408   echo "$as_me: failed program was:" >&5
20409 cat conftest.$ac_ext >&5
20410 cf_cv_type_sigaction=no
20411 fi
20412 rm -f conftest.$ac_objext conftest.$ac_ext
20413 fi
20414
20415 echo "$as_me:20415: result: $cf_cv_type_sigaction" >&5
20416 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
20417 test "$cf_cv_type_sigaction" = yes &&
20418 cat >>confdefs.h <<\EOF
20419 #define HAVE_TYPE_SIGACTION 1
20420 EOF
20421
20422 echo "$as_me:20422: checking declaration of size-change" >&5
20423 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
20424 if test "${cf_cv_sizechange+set}" = set; then
20425   echo $ECHO_N "(cached) $ECHO_C" >&6
20426 else
20427
20428         cf_cv_sizechange=unknown
20429         cf_save_CPPFLAGS="$CPPFLAGS"
20430
20431 for cf_opts in "" "NEED_PTEM_H"
20432 do
20433
20434         CPPFLAGS="$cf_save_CPPFLAGS"
20435         if test -n "$cf_opts"
20436         then
20437
20438         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20439         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
20440
20441         fi
20442         cat >conftest.$ac_ext <<_ACEOF
20443 #line 20443 "configure"
20444 #include "confdefs.h"
20445 #include <sys/types.h>
20446 #ifdef HAVE_TERMIOS_H
20447 #include <termios.h>
20448 #else
20449 #ifdef HAVE_TERMIO_H
20450 #include <termio.h>
20451 #endif
20452 #endif
20453
20454 #ifdef NEED_PTEM_H
20455 /* This is a workaround for SCO:  they neglected to define struct winsize in
20456  * termios.h -- it's only in termio.h and ptem.h
20457  */
20458 #include <sys/stream.h>
20459 #include <sys/ptem.h>
20460 #endif
20461
20462 #ifdef HAVE_SYS_IOCTL_H
20463 #include <sys/ioctl.h>
20464 #endif
20465
20466 int
20467 main (void)
20468 {
20469
20470 #ifdef TIOCGSIZE
20471         struct ttysize win;     /* SunOS 3.0... */
20472         int y = win.ts_lines;
20473         int x = win.ts_cols;
20474 #else
20475 #ifdef TIOCGWINSZ
20476         struct winsize win;     /* everything else */
20477         int y = win.ws_row;
20478         int x = win.ws_col;
20479 #else
20480         no TIOCGSIZE or TIOCGWINSZ
20481 #endif /* TIOCGWINSZ */
20482 #endif /* TIOCGSIZE */
20483
20484   ;
20485   return 0;
20486 }
20487 _ACEOF
20488 rm -f conftest.$ac_objext
20489 if { (eval echo "$as_me:20489: \"$ac_compile\"") >&5
20490   (eval $ac_compile) 2>&5
20491   ac_status=$?
20492   echo "$as_me:20492: \$? = $ac_status" >&5
20493   (exit $ac_status); } &&
20494          { ac_try='test -s conftest.$ac_objext'
20495   { (eval echo "$as_me:20495: \"$ac_try\"") >&5
20496   (eval $ac_try) 2>&5
20497   ac_status=$?
20498   echo "$as_me:20498: \$? = $ac_status" >&5
20499   (exit $ac_status); }; }; then
20500   cf_cv_sizechange=yes
20501 else
20502   echo "$as_me: failed program was:" >&5
20503 cat conftest.$ac_ext >&5
20504 cf_cv_sizechange=no
20505 fi
20506 rm -f conftest.$ac_objext conftest.$ac_ext
20507
20508         CPPFLAGS="$cf_save_CPPFLAGS"
20509         if test "$cf_cv_sizechange" = yes ; then
20510                 echo "size-change succeeded ($cf_opts)" >&5
20511                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
20512                 break
20513         fi
20514 done
20515
20516 fi
20517 echo "$as_me:20517: result: $cf_cv_sizechange" >&5
20518 echo "${ECHO_T}$cf_cv_sizechange" >&6
20519 if test "$cf_cv_sizechange" != no ; then
20520
20521 cat >>confdefs.h <<\EOF
20522 #define HAVE_SIZECHANGE 1
20523 EOF
20524
20525         case $cf_cv_sizechange in
20526         (NEED*)
20527                 cat >>confdefs.h <<EOF
20528 #define $cf_cv_sizechange  1
20529 EOF
20530
20531                 ;;
20532         esac
20533 fi
20534
20535 echo "$as_me:20535: checking for memmove" >&5
20536 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
20537 if test "${ac_cv_func_memmove+set}" = set; then
20538   echo $ECHO_N "(cached) $ECHO_C" >&6
20539 else
20540   cat >conftest.$ac_ext <<_ACEOF
20541 #line 20541 "configure"
20542 #include "confdefs.h"
20543 #define memmove autoconf_temporary
20544 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20545 #undef memmove
20546
20547 #ifdef __cplusplus
20548 extern "C"
20549 #endif
20550
20551 /* We use char because int might match the return type of a gcc2
20552    builtin and then its argument prototype would still apply.  */
20553 char memmove (void);
20554
20555 int
20556 main (void)
20557 {
20558
20559 /* The GNU C library defines stubs for functions which it implements
20560     to always fail with ENOSYS.  Some functions are actually named
20561     something starting with __ and the normal name is an alias.  */
20562 #if defined (__stub_memmove) || defined (__stub___memmove)
20563 #error found stub for memmove
20564 #endif
20565
20566         return memmove ();
20567   ;
20568   return 0;
20569 }
20570 _ACEOF
20571 rm -f conftest.$ac_objext conftest$ac_exeext
20572 if { (eval echo "$as_me:20572: \"$ac_link\"") >&5
20573   (eval $ac_link) 2>&5
20574   ac_status=$?
20575   echo "$as_me:20575: \$? = $ac_status" >&5
20576   (exit $ac_status); } &&
20577          { ac_try='test -s conftest$ac_exeext'
20578   { (eval echo "$as_me:20578: \"$ac_try\"") >&5
20579   (eval $ac_try) 2>&5
20580   ac_status=$?
20581   echo "$as_me:20581: \$? = $ac_status" >&5
20582   (exit $ac_status); }; }; then
20583   ac_cv_func_memmove=yes
20584 else
20585   echo "$as_me: failed program was:" >&5
20586 cat conftest.$ac_ext >&5
20587 ac_cv_func_memmove=no
20588 fi
20589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20590 fi
20591 echo "$as_me:20591: result: $ac_cv_func_memmove" >&5
20592 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20593 if test $ac_cv_func_memmove = yes; then
20594   :
20595 else
20596
20597 echo "$as_me:20597: checking for bcopy" >&5
20598 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20599 if test "${ac_cv_func_bcopy+set}" = set; then
20600   echo $ECHO_N "(cached) $ECHO_C" >&6
20601 else
20602   cat >conftest.$ac_ext <<_ACEOF
20603 #line 20603 "configure"
20604 #include "confdefs.h"
20605 #define bcopy autoconf_temporary
20606 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20607 #undef bcopy
20608
20609 #ifdef __cplusplus
20610 extern "C"
20611 #endif
20612
20613 /* We use char because int might match the return type of a gcc2
20614    builtin and then its argument prototype would still apply.  */
20615 char bcopy (void);
20616
20617 int
20618 main (void)
20619 {
20620
20621 /* The GNU C library defines stubs for functions which it implements
20622     to always fail with ENOSYS.  Some functions are actually named
20623     something starting with __ and the normal name is an alias.  */
20624 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20625 #error found stub for bcopy
20626 #endif
20627
20628         return bcopy ();
20629   ;
20630   return 0;
20631 }
20632 _ACEOF
20633 rm -f conftest.$ac_objext conftest$ac_exeext
20634 if { (eval echo "$as_me:20634: \"$ac_link\"") >&5
20635   (eval $ac_link) 2>&5
20636   ac_status=$?
20637   echo "$as_me:20637: \$? = $ac_status" >&5
20638   (exit $ac_status); } &&
20639          { ac_try='test -s conftest$ac_exeext'
20640   { (eval echo "$as_me:20640: \"$ac_try\"") >&5
20641   (eval $ac_try) 2>&5
20642   ac_status=$?
20643   echo "$as_me:20643: \$? = $ac_status" >&5
20644   (exit $ac_status); }; }; then
20645   ac_cv_func_bcopy=yes
20646 else
20647   echo "$as_me: failed program was:" >&5
20648 cat conftest.$ac_ext >&5
20649 ac_cv_func_bcopy=no
20650 fi
20651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20652 fi
20653 echo "$as_me:20653: result: $ac_cv_func_bcopy" >&5
20654 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
20655 if test $ac_cv_func_bcopy = yes; then
20656
20657         echo "$as_me:20657: checking if bcopy does overlapping moves" >&5
20658 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
20659 if test "${cf_cv_good_bcopy+set}" = set; then
20660   echo $ECHO_N "(cached) $ECHO_C" >&6
20661 else
20662
20663                 if test "$cross_compiling" = yes; then
20664   cf_cv_good_bcopy=unknown
20665 else
20666   cat >conftest.$ac_ext <<_ACEOF
20667 #line 20667 "configure"
20668 #include "confdefs.h"
20669
20670 int main(void) {
20671         static char data[] = "abcdefghijklmnopqrstuwwxyz";
20672         char temp[40];
20673         bcopy(data, temp, sizeof(data));
20674         bcopy(temp+10, temp, 15);
20675         bcopy(temp+5, temp+15, 10);
20676         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
20677 }
20678
20679 _ACEOF
20680 rm -f conftest$ac_exeext
20681 if { (eval echo "$as_me:20681: \"$ac_link\"") >&5
20682   (eval $ac_link) 2>&5
20683   ac_status=$?
20684   echo "$as_me:20684: \$? = $ac_status" >&5
20685   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20686   { (eval echo "$as_me:20686: \"$ac_try\"") >&5
20687   (eval $ac_try) 2>&5
20688   ac_status=$?
20689   echo "$as_me:20689: \$? = $ac_status" >&5
20690   (exit $ac_status); }; }; then
20691   cf_cv_good_bcopy=yes
20692 else
20693   echo "$as_me: program exited with status $ac_status" >&5
20694 echo "$as_me: failed program was:" >&5
20695 cat conftest.$ac_ext >&5
20696 cf_cv_good_bcopy=no
20697 fi
20698 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20699 fi
20700
20701 fi
20702 echo "$as_me:20702: result: $cf_cv_good_bcopy" >&5
20703 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
20704
20705 else
20706   cf_cv_good_bcopy=no
20707 fi
20708
20709         if test "$cf_cv_good_bcopy" = yes ; then
20710
20711 cat >>confdefs.h <<\EOF
20712 #define USE_OK_BCOPY 1
20713 EOF
20714
20715         else
20716
20717 cat >>confdefs.h <<\EOF
20718 #define USE_MY_MEMMOVE 1
20719 EOF
20720
20721         fi
20722
20723 fi
20724
20725 tty 2>&1 >/dev/null || {
20726 for ac_func in posix_openpt
20727 do
20728 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20729 echo "$as_me:20729: checking for $ac_func" >&5
20730 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20731 if eval "test \"\${$as_ac_var+set}\" = set"; then
20732   echo $ECHO_N "(cached) $ECHO_C" >&6
20733 else
20734   cat >conftest.$ac_ext <<_ACEOF
20735 #line 20735 "configure"
20736 #include "confdefs.h"
20737 #define $ac_func autoconf_temporary
20738 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20739 #undef $ac_func
20740
20741 #ifdef __cplusplus
20742 extern "C"
20743 #endif
20744
20745 /* We use char because int might match the return type of a gcc2
20746    builtin and then its argument prototype would still apply.  */
20747 char $ac_func (void);
20748
20749 int
20750 main (void)
20751 {
20752
20753 /* The GNU C library defines stubs for functions which it implements
20754     to always fail with ENOSYS.  Some functions are actually named
20755     something starting with __ and the normal name is an alias.  */
20756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20757 #error found stub for $ac_func
20758 #endif
20759
20760         return $ac_func ();
20761   ;
20762   return 0;
20763 }
20764 _ACEOF
20765 rm -f conftest.$ac_objext conftest$ac_exeext
20766 if { (eval echo "$as_me:20766: \"$ac_link\"") >&5
20767   (eval $ac_link) 2>&5
20768   ac_status=$?
20769   echo "$as_me:20769: \$? = $ac_status" >&5
20770   (exit $ac_status); } &&
20771          { ac_try='test -s conftest$ac_exeext'
20772   { (eval echo "$as_me:20772: \"$ac_try\"") >&5
20773   (eval $ac_try) 2>&5
20774   ac_status=$?
20775   echo "$as_me:20775: \$? = $ac_status" >&5
20776   (exit $ac_status); }; }; then
20777   eval "$as_ac_var=yes"
20778 else
20779   echo "$as_me: failed program was:" >&5
20780 cat conftest.$ac_ext >&5
20781 eval "$as_ac_var=no"
20782 fi
20783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20784 fi
20785 echo "$as_me:20785: result: `eval echo '${'$as_ac_var'}'`" >&5
20786 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20787 if test `eval echo '${'$as_ac_var'}'` = yes; then
20788   cat >>confdefs.h <<EOF
20789 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20790 EOF
20791
20792 fi
20793 done
20794  }
20795 echo "$as_me:20795: checking if poll really works" >&5
20796 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
20797 if test "${cf_cv_working_poll+set}" = set; then
20798   echo $ECHO_N "(cached) $ECHO_C" >&6
20799 else
20800
20801 if test "$cross_compiling" = yes; then
20802   cf_cv_working_poll=unknown
20803 else
20804   cat >conftest.$ac_ext <<_ACEOF
20805 #line 20805 "configure"
20806 #include "confdefs.h"
20807
20808 #include <stdlib.h>
20809 #include <stdio.h>
20810 #include <unistd.h>
20811 #include <fcntl.h>
20812 #ifdef HAVE_POLL_H
20813 #include <poll.h>
20814 #else
20815 #include <sys/poll.h>
20816 #endif
20817 int main(void) {
20818         struct pollfd myfds;
20819         int ret;
20820
20821         /* check for Darwin bug with respect to "devices" */
20822         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
20823         if (myfds.fd < 0)
20824                 myfds.fd = 0;
20825         myfds.events = POLLIN;
20826         myfds.revents = 0;
20827
20828         ret = poll(&myfds, 1, 100);
20829
20830         if (ret < 0 || (myfds.revents & POLLNVAL)) {
20831                 ret = -1;
20832         } else {
20833                 int fd = 0;
20834                 if (!isatty(fd)) {
20835                         fd = open("/dev/tty", 2);       /* O_RDWR */
20836                 }
20837 #ifdef HAVE_POSIX_OPENPT
20838                 if (fd < 0) {
20839                         fd = posix_openpt(O_RDWR);
20840                 }
20841 #endif
20842
20843                 if (fd >= 0) {
20844                         /* also check with standard input */
20845                         myfds.fd = fd;
20846                         myfds.events = POLLIN;
20847                         myfds.revents = 0;
20848                         ret = poll(&myfds, 1, 100);
20849                 } else {
20850                         ret = -1;
20851                 }
20852         }
20853         ${cf_cv_main_return:-return}(ret < 0);
20854 }
20855 _ACEOF
20856 rm -f conftest$ac_exeext
20857 if { (eval echo "$as_me:20857: \"$ac_link\"") >&5
20858   (eval $ac_link) 2>&5
20859   ac_status=$?
20860   echo "$as_me:20860: \$? = $ac_status" >&5
20861   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20862   { (eval echo "$as_me:20862: \"$ac_try\"") >&5
20863   (eval $ac_try) 2>&5
20864   ac_status=$?
20865   echo "$as_me:20865: \$? = $ac_status" >&5
20866   (exit $ac_status); }; }; then
20867   cf_cv_working_poll=yes
20868 else
20869   echo "$as_me: program exited with status $ac_status" >&5
20870 echo "$as_me: failed program was:" >&5
20871 cat conftest.$ac_ext >&5
20872 cf_cv_working_poll=no
20873 fi
20874 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20875 fi
20876 fi
20877 echo "$as_me:20877: result: $cf_cv_working_poll" >&5
20878 echo "${ECHO_T}$cf_cv_working_poll" >&6
20879 test "$cf_cv_working_poll" = "yes" &&
20880 cat >>confdefs.h <<\EOF
20881 #define HAVE_WORKING_POLL 1
20882 EOF
20883
20884 echo "$as_me:20884: checking for va_copy" >&5
20885 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
20886 if test "${cf_cv_have_va_copy+set}" = set; then
20887   echo $ECHO_N "(cached) $ECHO_C" >&6
20888 else
20889
20890 cat >conftest.$ac_ext <<_ACEOF
20891 #line 20891 "configure"
20892 #include "confdefs.h"
20893
20894 #include <stdarg.h>
20895
20896 int
20897 main (void)
20898 {
20899
20900         static va_list dst;
20901         static va_list src;
20902         va_copy(dst, src)
20903   ;
20904   return 0;
20905 }
20906 _ACEOF
20907 rm -f conftest.$ac_objext conftest$ac_exeext
20908 if { (eval echo "$as_me:20908: \"$ac_link\"") >&5
20909   (eval $ac_link) 2>&5
20910   ac_status=$?
20911   echo "$as_me:20911: \$? = $ac_status" >&5
20912   (exit $ac_status); } &&
20913          { ac_try='test -s conftest$ac_exeext'
20914   { (eval echo "$as_me:20914: \"$ac_try\"") >&5
20915   (eval $ac_try) 2>&5
20916   ac_status=$?
20917   echo "$as_me:20917: \$? = $ac_status" >&5
20918   (exit $ac_status); }; }; then
20919   cf_cv_have_va_copy=yes
20920 else
20921   echo "$as_me: failed program was:" >&5
20922 cat conftest.$ac_ext >&5
20923 cf_cv_have_va_copy=no
20924 fi
20925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20926 fi
20927 echo "$as_me:20927: result: $cf_cv_have_va_copy" >&5
20928 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
20929
20930 if test "$cf_cv_have_va_copy" = yes;
20931 then
20932
20933 cat >>confdefs.h <<\EOF
20934 #define HAVE_VA_COPY 1
20935 EOF
20936
20937 else # !cf_cv_have_va_copy
20938
20939 echo "$as_me:20939: checking for __va_copy" >&5
20940 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
20941 if test "${cf_cv_have___va_copy+set}" = set; then
20942   echo $ECHO_N "(cached) $ECHO_C" >&6
20943 else
20944
20945 cat >conftest.$ac_ext <<_ACEOF
20946 #line 20946 "configure"
20947 #include "confdefs.h"
20948
20949 #include <stdarg.h>
20950
20951 int
20952 main (void)
20953 {
20954
20955         static va_list dst;
20956         static va_list src;
20957         __va_copy(dst, src)
20958   ;
20959   return 0;
20960 }
20961 _ACEOF
20962 rm -f conftest.$ac_objext conftest$ac_exeext
20963 if { (eval echo "$as_me:20963: \"$ac_link\"") >&5
20964   (eval $ac_link) 2>&5
20965   ac_status=$?
20966   echo "$as_me:20966: \$? = $ac_status" >&5
20967   (exit $ac_status); } &&
20968          { ac_try='test -s conftest$ac_exeext'
20969   { (eval echo "$as_me:20969: \"$ac_try\"") >&5
20970   (eval $ac_try) 2>&5
20971   ac_status=$?
20972   echo "$as_me:20972: \$? = $ac_status" >&5
20973   (exit $ac_status); }; }; then
20974   cf_cv_have___va_copy=yes
20975 else
20976   echo "$as_me: failed program was:" >&5
20977 cat conftest.$ac_ext >&5
20978 cf_cv_have___va_copy=no
20979 fi
20980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20981 fi
20982 echo "$as_me:20982: result: $cf_cv_have___va_copy" >&5
20983 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
20984
20985 if test "$cf_cv_have___va_copy" = yes
20986 then
20987
20988 cat >>confdefs.h <<\EOF
20989 #define HAVE___VA_COPY 1
20990 EOF
20991
20992 else # !cf_cv_have___va_copy
20993
20994 echo "$as_me:20994: checking for __builtin_va_copy" >&5
20995 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
20996 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
20997   echo $ECHO_N "(cached) $ECHO_C" >&6
20998 else
20999
21000 cat >conftest.$ac_ext <<_ACEOF
21001 #line 21001 "configure"
21002 #include "confdefs.h"
21003
21004 #include <stdarg.h>
21005
21006 int
21007 main (void)
21008 {
21009
21010         static va_list dst;
21011         static va_list src;
21012         __builtin_va_copy(dst, src)
21013   ;
21014   return 0;
21015 }
21016 _ACEOF
21017 rm -f conftest.$ac_objext conftest$ac_exeext
21018 if { (eval echo "$as_me:21018: \"$ac_link\"") >&5
21019   (eval $ac_link) 2>&5
21020   ac_status=$?
21021   echo "$as_me:21021: \$? = $ac_status" >&5
21022   (exit $ac_status); } &&
21023          { ac_try='test -s conftest$ac_exeext'
21024   { (eval echo "$as_me:21024: \"$ac_try\"") >&5
21025   (eval $ac_try) 2>&5
21026   ac_status=$?
21027   echo "$as_me:21027: \$? = $ac_status" >&5
21028   (exit $ac_status); }; }; then
21029   cf_cv_have___builtin_va_copy=yes
21030 else
21031   echo "$as_me: failed program was:" >&5
21032 cat conftest.$ac_ext >&5
21033 cf_cv_have___builtin_va_copy=no
21034 fi
21035 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21036 fi
21037 echo "$as_me:21037: result: $cf_cv_have___builtin_va_copy" >&5
21038 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21039
21040 test "$cf_cv_have___builtin_va_copy" = yes &&
21041
21042 cat >>confdefs.h <<\EOF
21043 #define HAVE___BUILTIN_VA_COPY 1
21044 EOF
21045
21046 fi # cf_cv_have___va_copy
21047
21048 fi # cf_cv_have_va_copy
21049
21050 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21051 (*yes*)
21052         ;;
21053
21054 (*)
21055         echo "$as_me:21055: checking if we can simply copy va_list" >&5
21056 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21057 if test "${cf_cv_pointer_va_list+set}" = set; then
21058   echo $ECHO_N "(cached) $ECHO_C" >&6
21059 else
21060
21061 cat >conftest.$ac_ext <<_ACEOF
21062 #line 21062 "configure"
21063 #include "confdefs.h"
21064
21065 #include <stdarg.h>
21066
21067 int
21068 main (void)
21069 {
21070
21071         va_list dst;
21072         va_list src;
21073         dst = src
21074   ;
21075   return 0;
21076 }
21077 _ACEOF
21078 rm -f conftest.$ac_objext conftest$ac_exeext
21079 if { (eval echo "$as_me:21079: \"$ac_link\"") >&5
21080   (eval $ac_link) 2>&5
21081   ac_status=$?
21082   echo "$as_me:21082: \$? = $ac_status" >&5
21083   (exit $ac_status); } &&
21084          { ac_try='test -s conftest$ac_exeext'
21085   { (eval echo "$as_me:21085: \"$ac_try\"") >&5
21086   (eval $ac_try) 2>&5
21087   ac_status=$?
21088   echo "$as_me:21088: \$? = $ac_status" >&5
21089   (exit $ac_status); }; }; then
21090   cf_cv_pointer_va_list=yes
21091 else
21092   echo "$as_me: failed program was:" >&5
21093 cat conftest.$ac_ext >&5
21094 cf_cv_pointer_va_list=no
21095 fi
21096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21097 fi
21098 echo "$as_me:21098: result: $cf_cv_pointer_va_list" >&5
21099 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21100
21101         if test "$cf_cv_pointer_va_list" = no
21102         then
21103                 echo "$as_me:21103: checking if we can copy va_list indirectly" >&5
21104 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21105 if test "${cf_cv_array_va_list+set}" = set; then
21106   echo $ECHO_N "(cached) $ECHO_C" >&6
21107 else
21108
21109 cat >conftest.$ac_ext <<_ACEOF
21110 #line 21110 "configure"
21111 #include "confdefs.h"
21112
21113 #include <stdarg.h>
21114
21115 int
21116 main (void)
21117 {
21118
21119         va_list dst;
21120         va_list src;
21121         *dst = *src
21122   ;
21123   return 0;
21124 }
21125 _ACEOF
21126 rm -f conftest.$ac_objext conftest$ac_exeext
21127 if { (eval echo "$as_me:21127: \"$ac_link\"") >&5
21128   (eval $ac_link) 2>&5
21129   ac_status=$?
21130   echo "$as_me:21130: \$? = $ac_status" >&5
21131   (exit $ac_status); } &&
21132          { ac_try='test -s conftest$ac_exeext'
21133   { (eval echo "$as_me:21133: \"$ac_try\"") >&5
21134   (eval $ac_try) 2>&5
21135   ac_status=$?
21136   echo "$as_me:21136: \$? = $ac_status" >&5
21137   (exit $ac_status); }; }; then
21138   cf_cv_array_va_list=yes
21139 else
21140   echo "$as_me: failed program was:" >&5
21141 cat conftest.$ac_ext >&5
21142 cf_cv_array_va_list=no
21143 fi
21144 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21145 fi
21146 echo "$as_me:21146: result: $cf_cv_array_va_list" >&5
21147 echo "${ECHO_T}$cf_cv_array_va_list" >&6
21148                 test "$cf_cv_array_va_list" = yes &&
21149 cat >>confdefs.h <<\EOF
21150 #define ARRAY_VA_LIST 1
21151 EOF
21152
21153         fi
21154         ;;
21155 esac
21156
21157 echo "$as_me:21157: checking for pid_t" >&5
21158 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21159 if test "${ac_cv_type_pid_t+set}" = set; then
21160   echo $ECHO_N "(cached) $ECHO_C" >&6
21161 else
21162   cat >conftest.$ac_ext <<_ACEOF
21163 #line 21163 "configure"
21164 #include "confdefs.h"
21165 $ac_includes_default
21166 int
21167 main (void)
21168 {
21169 if ((pid_t *) 0)
21170   return 0;
21171 if (sizeof (pid_t))
21172   return 0;
21173   ;
21174   return 0;
21175 }
21176 _ACEOF
21177 rm -f conftest.$ac_objext
21178 if { (eval echo "$as_me:21178: \"$ac_compile\"") >&5
21179   (eval $ac_compile) 2>&5
21180   ac_status=$?
21181   echo "$as_me:21181: \$? = $ac_status" >&5
21182   (exit $ac_status); } &&
21183          { ac_try='test -s conftest.$ac_objext'
21184   { (eval echo "$as_me:21184: \"$ac_try\"") >&5
21185   (eval $ac_try) 2>&5
21186   ac_status=$?
21187   echo "$as_me:21187: \$? = $ac_status" >&5
21188   (exit $ac_status); }; }; then
21189   ac_cv_type_pid_t=yes
21190 else
21191   echo "$as_me: failed program was:" >&5
21192 cat conftest.$ac_ext >&5
21193 ac_cv_type_pid_t=no
21194 fi
21195 rm -f conftest.$ac_objext conftest.$ac_ext
21196 fi
21197 echo "$as_me:21197: result: $ac_cv_type_pid_t" >&5
21198 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21199 if test $ac_cv_type_pid_t = yes; then
21200   :
21201 else
21202
21203 cat >>confdefs.h <<EOF
21204 #define pid_t int
21205 EOF
21206
21207 fi
21208
21209 for ac_header in unistd.h vfork.h
21210 do
21211 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21212 echo "$as_me:21212: checking for $ac_header" >&5
21213 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21214 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21215   echo $ECHO_N "(cached) $ECHO_C" >&6
21216 else
21217   cat >conftest.$ac_ext <<_ACEOF
21218 #line 21218 "configure"
21219 #include "confdefs.h"
21220 #include <$ac_header>
21221 _ACEOF
21222 if { (eval echo "$as_me:21222: \"$ac_cpp conftest.$ac_ext\"") >&5
21223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21224   ac_status=$?
21225   egrep -v '^ *\+' conftest.er1 >conftest.err
21226   rm -f conftest.er1
21227   cat conftest.err >&5
21228   echo "$as_me:21228: \$? = $ac_status" >&5
21229   (exit $ac_status); } >/dev/null; then
21230   if test -s conftest.err; then
21231     ac_cpp_err=$ac_c_preproc_warn_flag
21232   else
21233     ac_cpp_err=
21234   fi
21235 else
21236   ac_cpp_err=yes
21237 fi
21238 if test -z "$ac_cpp_err"; then
21239   eval "$as_ac_Header=yes"
21240 else
21241   echo "$as_me: failed program was:" >&5
21242   cat conftest.$ac_ext >&5
21243   eval "$as_ac_Header=no"
21244 fi
21245 rm -f conftest.err conftest.$ac_ext
21246 fi
21247 echo "$as_me:21247: result: `eval echo '${'$as_ac_Header'}'`" >&5
21248 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21249 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21250   cat >>confdefs.h <<EOF
21251 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21252 EOF
21253
21254 fi
21255 done
21256
21257 for ac_func in fork vfork
21258 do
21259 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21260 echo "$as_me:21260: checking for $ac_func" >&5
21261 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21262 if eval "test \"\${$as_ac_var+set}\" = set"; then
21263   echo $ECHO_N "(cached) $ECHO_C" >&6
21264 else
21265   cat >conftest.$ac_ext <<_ACEOF
21266 #line 21266 "configure"
21267 #include "confdefs.h"
21268 #define $ac_func autoconf_temporary
21269 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21270 #undef $ac_func
21271
21272 #ifdef __cplusplus
21273 extern "C"
21274 #endif
21275
21276 /* We use char because int might match the return type of a gcc2
21277    builtin and then its argument prototype would still apply.  */
21278 char $ac_func (void);
21279
21280 int
21281 main (void)
21282 {
21283
21284 /* The GNU C library defines stubs for functions which it implements
21285     to always fail with ENOSYS.  Some functions are actually named
21286     something starting with __ and the normal name is an alias.  */
21287 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21288 #error found stub for $ac_func
21289 #endif
21290
21291         return $ac_func ();
21292   ;
21293   return 0;
21294 }
21295 _ACEOF
21296 rm -f conftest.$ac_objext conftest$ac_exeext
21297 if { (eval echo "$as_me:21297: \"$ac_link\"") >&5
21298   (eval $ac_link) 2>&5
21299   ac_status=$?
21300   echo "$as_me:21300: \$? = $ac_status" >&5
21301   (exit $ac_status); } &&
21302          { ac_try='test -s conftest$ac_exeext'
21303   { (eval echo "$as_me:21303: \"$ac_try\"") >&5
21304   (eval $ac_try) 2>&5
21305   ac_status=$?
21306   echo "$as_me:21306: \$? = $ac_status" >&5
21307   (exit $ac_status); }; }; then
21308   eval "$as_ac_var=yes"
21309 else
21310   echo "$as_me: failed program was:" >&5
21311 cat conftest.$ac_ext >&5
21312 eval "$as_ac_var=no"
21313 fi
21314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21315 fi
21316 echo "$as_me:21316: result: `eval echo '${'$as_ac_var'}'`" >&5
21317 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21318 if test `eval echo '${'$as_ac_var'}'` = yes; then
21319   cat >>confdefs.h <<EOF
21320 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21321 EOF
21322
21323 fi
21324 done
21325
21326 ac_cv_func_fork_works=$ac_cv_func_fork
21327 if test "x$ac_cv_func_fork" = xyes; then
21328   echo "$as_me:21328: checking for working fork" >&5
21329 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21330 if test "${ac_cv_func_fork_works+set}" = set; then
21331   echo $ECHO_N "(cached) $ECHO_C" >&6
21332 else
21333   if test "$cross_compiling" = yes; then
21334   ac_cv_func_fork_works=cross
21335 else
21336   cat >conftest.$ac_ext <<_ACEOF
21337 /* By Rüdiger Kuhlmann. */
21338       #include <sys/types.h>
21339       #if HAVE_UNISTD_H
21340       # include <unistd.h>
21341       #endif
21342       /* Some systems only have a dummy stub for fork() */
21343       int main (void)
21344       {
21345         if (fork() < 0)
21346           $ac_main_return (1);
21347         $ac_main_return (0);
21348       }
21349 _ACEOF
21350 rm -f conftest$ac_exeext
21351 if { (eval echo "$as_me:21351: \"$ac_link\"") >&5
21352   (eval $ac_link) 2>&5
21353   ac_status=$?
21354   echo "$as_me:21354: \$? = $ac_status" >&5
21355   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21356   { (eval echo "$as_me:21356: \"$ac_try\"") >&5
21357   (eval $ac_try) 2>&5
21358   ac_status=$?
21359   echo "$as_me:21359: \$? = $ac_status" >&5
21360   (exit $ac_status); }; }; then
21361   ac_cv_func_fork_works=yes
21362 else
21363   echo "$as_me: program exited with status $ac_status" >&5
21364 echo "$as_me: failed program was:" >&5
21365 cat conftest.$ac_ext >&5
21366 ac_cv_func_fork_works=no
21367 fi
21368 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21369 fi
21370 fi
21371 echo "$as_me:21371: result: $ac_cv_func_fork_works" >&5
21372 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21373
21374 fi
21375 if test "x$ac_cv_func_fork_works" = xcross; then
21376   case $host in
21377     *-*-amigaos* | *-*-msdosdjgpp*)
21378       # Override, as these systems have only a dummy fork() stub
21379       ac_cv_func_fork_works=no
21380       ;;
21381     *)
21382       ac_cv_func_fork_works=yes
21383       ;;
21384   esac
21385   { echo "$as_me:21385: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
21386 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
21387 fi
21388 ac_cv_func_vfork_works=$ac_cv_func_vfork
21389 if test "x$ac_cv_func_vfork" = xyes; then
21390   echo "$as_me:21390: checking for working vfork" >&5
21391 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21392 if test "${ac_cv_func_vfork_works+set}" = set; then
21393   echo $ECHO_N "(cached) $ECHO_C" >&6
21394 else
21395   if test "$cross_compiling" = yes; then
21396   ac_cv_func_vfork_works=cross
21397 else
21398   cat >conftest.$ac_ext <<_ACEOF
21399 #line 21399 "configure"
21400 #include "confdefs.h"
21401 /* Thanks to Paul Eggert for this test.  */
21402 #include <stdio.h>
21403 #include <sys/types.h>
21404 #include <sys/stat.h>
21405 #if HAVE_UNISTD_H
21406 # include <unistd.h>
21407 #endif
21408 #if HAVE_VFORK_H
21409 # include <vfork.h>
21410 #endif
21411 /* On some sparc systems, changes by the child to local and incoming
21412    argument registers are propagated back to the parent.  The compiler
21413    is told about this with #include <vfork.h>, but some compilers
21414    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
21415    static variable whose address is put into a register that is
21416    clobbered by the vfork.  */
21417 static
21418 #ifdef __cplusplus
21419 sparc_address_test (int arg)
21420 # else
21421 sparc_address_test (arg) int arg;
21422 #endif
21423 {
21424   static pid_t child;
21425   if (!child) {
21426     child = vfork ();
21427     if (child < 0) {
21428       perror ("vfork");
21429       _exit(2);
21430     }
21431     if (!child) {
21432       arg = getpid();
21433       write(-1, "", 0);
21434       _exit (arg);
21435     }
21436   }
21437 }
21438
21439 int
21440 main (void)
21441 {
21442   pid_t parent = getpid ();
21443   pid_t child;
21444
21445   sparc_address_test ();
21446
21447   child = vfork ();
21448
21449   if (child == 0) {
21450     /* Here is another test for sparc vfork register problems.  This
21451        test uses lots of local variables, at least as many local
21452        variables as main has allocated so far including compiler
21453        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
21454        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
21455        reuse the register of parent for one of the local variables,
21456        since it will think that parent can't possibly be used any more
21457        in this routine.  Assigning to the local variable will thus
21458        munge parent in the parent process.  */
21459     pid_t
21460       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21461       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21462     /* Convince the compiler that p..p7 are live; otherwise, it might
21463        use the same hardware register for all 8 local variables.  */
21464     if (p != p1 || p != p2 || p != p3 || p != p4
21465         || p != p5 || p != p6 || p != p7)
21466       _exit(1);
21467
21468     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21469        from child file descriptors.  If the child closes a descriptor
21470        before it execs or exits, this munges the parent's descriptor
21471        as well.  Test for this by closing stdout in the child.  */
21472     _exit(close(fileno(stdout)) != 0);
21473   } else {
21474     int status;
21475     struct stat st;
21476
21477     while (wait(&status) != child)
21478       ;
21479     $ac_main_return(
21480          /* Was there some problem with vforking?  */
21481          child < 0
21482
21483          /* Did the child fail?  (This shouldn't happen.)  */
21484          || status
21485
21486          /* Did the vfork/compiler bug occur?  */
21487          || parent != getpid()
21488
21489          /* Did the file descriptor bug occur?  */
21490          || fstat(fileno(stdout), &st) != 0
21491          );
21492   }
21493 }
21494 _ACEOF
21495 rm -f conftest$ac_exeext
21496 if { (eval echo "$as_me:21496: \"$ac_link\"") >&5
21497   (eval $ac_link) 2>&5
21498   ac_status=$?
21499   echo "$as_me:21499: \$? = $ac_status" >&5
21500   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21501   { (eval echo "$as_me:21501: \"$ac_try\"") >&5
21502   (eval $ac_try) 2>&5
21503   ac_status=$?
21504   echo "$as_me:21504: \$? = $ac_status" >&5
21505   (exit $ac_status); }; }; then
21506   ac_cv_func_vfork_works=yes
21507 else
21508   echo "$as_me: program exited with status $ac_status" >&5
21509 echo "$as_me: failed program was:" >&5
21510 cat conftest.$ac_ext >&5
21511 ac_cv_func_vfork_works=no
21512 fi
21513 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21514 fi
21515 fi
21516 echo "$as_me:21516: result: $ac_cv_func_vfork_works" >&5
21517 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
21518
21519 fi;
21520 if test "x$ac_cv_func_fork_works" = xcross; then
21521   ac_cv_func_vfork_works=ac_cv_func_vfork
21522   { echo "$as_me:21522: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
21523 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
21524 fi
21525
21526 if test "x$ac_cv_func_vfork_works" = xyes; then
21527
21528 cat >>confdefs.h <<\EOF
21529 #define HAVE_WORKING_VFORK 1
21530 EOF
21531
21532 else
21533
21534 cat >>confdefs.h <<\EOF
21535 #define vfork fork
21536 EOF
21537
21538 fi
21539 if test "x$ac_cv_func_fork_works" = xyes; then
21540
21541 cat >>confdefs.h <<\EOF
21542 #define HAVE_WORKING_FORK 1
21543 EOF
21544
21545 fi
21546
21547 echo "$as_me:21547: checking if fopen accepts explicit binary mode" >&5
21548 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
21549 if test "${cf_cv_fopen_bin_r+set}" = set; then
21550   echo $ECHO_N "(cached) $ECHO_C" >&6
21551 else
21552
21553         if test "$cross_compiling" = yes; then
21554   cf_cv_fopen_bin_r=unknown
21555 else
21556   cat >conftest.$ac_ext <<_ACEOF
21557 #line 21557 "configure"
21558 #include "confdefs.h"
21559
21560 #include <stdio.h>
21561 int main(void) {
21562         FILE *fp = fopen("conftest.tmp", "wb");
21563         int rc = 0;
21564         if (fp != 0) {
21565                 int p, q;
21566                 for (p = 0; p < 256; ++p) {
21567                         fputc(p, fp);
21568                 }
21569                 fclose(fp);
21570                 fp = fopen("conftest.tmp", "rb");
21571                 if (fp != 0) {
21572                         for (p = 0; p < 256; ++p) {
21573                                 q = fgetc(fp);
21574                                 if (q != p) {
21575                                         rc = 1;
21576                                         break;
21577                                 }
21578                         }
21579                 } else {
21580                         rc = 1;
21581                 }
21582         } else {
21583                 rc = 1;
21584         }
21585         ${cf_cv_main_return:-return} (rc);
21586 }
21587
21588 _ACEOF
21589 rm -f conftest$ac_exeext
21590 if { (eval echo "$as_me:21590: \"$ac_link\"") >&5
21591   (eval $ac_link) 2>&5
21592   ac_status=$?
21593   echo "$as_me:21593: \$? = $ac_status" >&5
21594   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21595   { (eval echo "$as_me:21595: \"$ac_try\"") >&5
21596   (eval $ac_try) 2>&5
21597   ac_status=$?
21598   echo "$as_me:21598: \$? = $ac_status" >&5
21599   (exit $ac_status); }; }; then
21600   cf_cv_fopen_bin_r=yes
21601 else
21602   echo "$as_me: program exited with status $ac_status" >&5
21603 echo "$as_me: failed program was:" >&5
21604 cat conftest.$ac_ext >&5
21605 cf_cv_fopen_bin_r=no
21606 fi
21607 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21608 fi
21609
21610 fi
21611 echo "$as_me:21611: result: $cf_cv_fopen_bin_r" >&5
21612 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
21613 test "x$cf_cv_fopen_bin_r" != xno && cat >>confdefs.h <<\EOF
21614 #define USE_FOPEN_BIN_R 1
21615 EOF
21616
21617 # special check for test/ditto.c
21618
21619 echo "$as_me:21619: checking for openpty in -lutil" >&5
21620 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
21621 if test "${ac_cv_lib_util_openpty+set}" = set; then
21622   echo $ECHO_N "(cached) $ECHO_C" >&6
21623 else
21624   ac_check_lib_save_LIBS=$LIBS
21625 LIBS="-lutil  $LIBS"
21626 cat >conftest.$ac_ext <<_ACEOF
21627 #line 21627 "configure"
21628 #include "confdefs.h"
21629
21630 /* Override any gcc2 internal prototype to avoid an error.  */
21631 #ifdef __cplusplus
21632 extern "C"
21633 #endif
21634 /* We use char because int might match the return type of a gcc2
21635    builtin and then its argument prototype would still apply.  */
21636 char openpty ();
21637 int
21638 main (void)
21639 {
21640 openpty ();
21641   ;
21642   return 0;
21643 }
21644 _ACEOF
21645 rm -f conftest.$ac_objext conftest$ac_exeext
21646 if { (eval echo "$as_me:21646: \"$ac_link\"") >&5
21647   (eval $ac_link) 2>&5
21648   ac_status=$?
21649   echo "$as_me:21649: \$? = $ac_status" >&5
21650   (exit $ac_status); } &&
21651          { ac_try='test -s conftest$ac_exeext'
21652   { (eval echo "$as_me:21652: \"$ac_try\"") >&5
21653   (eval $ac_try) 2>&5
21654   ac_status=$?
21655   echo "$as_me:21655: \$? = $ac_status" >&5
21656   (exit $ac_status); }; }; then
21657   ac_cv_lib_util_openpty=yes
21658 else
21659   echo "$as_me: failed program was:" >&5
21660 cat conftest.$ac_ext >&5
21661 ac_cv_lib_util_openpty=no
21662 fi
21663 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21664 LIBS=$ac_check_lib_save_LIBS
21665 fi
21666 echo "$as_me:21666: result: $ac_cv_lib_util_openpty" >&5
21667 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
21668 if test $ac_cv_lib_util_openpty = yes; then
21669   cf_cv_lib_util=yes
21670 else
21671   cf_cv_lib_util=no
21672 fi
21673
21674 echo "$as_me:21674: checking for openpty header" >&5
21675 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
21676 if test "${cf_cv_func_openpty+set}" = set; then
21677   echo $ECHO_N "(cached) $ECHO_C" >&6
21678 else
21679
21680         cf_save_LIBS="$LIBS"
21681         test $cf_cv_lib_util = yes && {
21682 cf_add_libs="-lutil"
21683 # Filter out duplicates - this happens with badly-designed ".pc" files...
21684 for cf_add_1lib in $LIBS
21685 do
21686         for cf_add_2lib in $cf_add_libs
21687         do
21688                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21689                 then
21690                         cf_add_1lib=
21691                         break
21692                 fi
21693         done
21694         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21695 done
21696 LIBS="$cf_add_libs"
21697  }
21698         for cf_header in pty.h libutil.h util.h
21699         do
21700         cat >conftest.$ac_ext <<_ACEOF
21701 #line 21701 "configure"
21702 #include "confdefs.h"
21703
21704 #include <$cf_header>
21705
21706 int
21707 main (void)
21708 {
21709
21710         int x = openpty((int *)0, (int *)0, (char *)0,
21711                                    (struct termios *)0, (struct winsize *)0);
21712
21713   ;
21714   return 0;
21715 }
21716 _ACEOF
21717 rm -f conftest.$ac_objext conftest$ac_exeext
21718 if { (eval echo "$as_me:21718: \"$ac_link\"") >&5
21719   (eval $ac_link) 2>&5
21720   ac_status=$?
21721   echo "$as_me:21721: \$? = $ac_status" >&5
21722   (exit $ac_status); } &&
21723          { ac_try='test -s conftest$ac_exeext'
21724   { (eval echo "$as_me:21724: \"$ac_try\"") >&5
21725   (eval $ac_try) 2>&5
21726   ac_status=$?
21727   echo "$as_me:21727: \$? = $ac_status" >&5
21728   (exit $ac_status); }; }; then
21729
21730                 cf_cv_func_openpty=$cf_header
21731                 break
21732
21733 else
21734   echo "$as_me: failed program was:" >&5
21735 cat conftest.$ac_ext >&5
21736
21737                 cf_cv_func_openpty=no
21738
21739 fi
21740 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21741         done
21742         LIBS="$cf_save_LIBS"
21743
21744 fi
21745 echo "$as_me:21745: result: $cf_cv_func_openpty" >&5
21746 echo "${ECHO_T}$cf_cv_func_openpty" >&6
21747
21748 if test "$cf_cv_func_openpty" != no ; then
21749
21750 cat >>confdefs.h <<EOF
21751 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
21752 EOF
21753
21754 cat >>confdefs.h <<\EOF
21755 #define USE_XTERM_PTY 1
21756 EOF
21757
21758         if test "x$cf_cv_lib_util" = xyes ; then
21759
21760 cf_add_libs="-lutil"
21761 # Filter out duplicates - this happens with badly-designed ".pc" files...
21762 for cf_add_1lib in $TEST_LIBS
21763 do
21764         for cf_add_2lib in $cf_add_libs
21765         do
21766                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21767                 then
21768                         cf_add_1lib=
21769                         break
21770                 fi
21771         done
21772         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21773 done
21774 TEST_LIBS="$cf_add_libs"
21775
21776         fi
21777 fi
21778
21779 if test "$with_hashed_db" != no ; then
21780
21781 cat >>confdefs.h <<\EOF
21782 #define USE_HASHED_DB 1
21783 EOF
21784
21785 case $with_hashed_db in
21786 (yes|*able*)
21787         ;;
21788 (*)
21789         if test -d "$with_hashed_db" ; then
21790
21791 if test -n "$with_hashed_db/include" ; then
21792   for cf_add_incdir in $with_hashed_db/include
21793   do
21794         while test $cf_add_incdir != /usr/include
21795         do
21796           if test -d $cf_add_incdir
21797           then
21798                 cf_have_incdir=no
21799                 if test -n "$CFLAGS$CPPFLAGS" ; then
21800                   # a loop is needed to ensure we can add subdirs of existing dirs
21801                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21802                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21803                           cf_have_incdir=yes; break
21804                         fi
21805                   done
21806                 fi
21807
21808                 if test "$cf_have_incdir" = no ; then
21809                   if test "$cf_add_incdir" = /usr/local/include ; then
21810                         if test "$GCC" = yes
21811                         then
21812                           cf_save_CPPFLAGS=$CPPFLAGS
21813
21814         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21815         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21816
21817                           cat >conftest.$ac_ext <<_ACEOF
21818 #line 21818 "configure"
21819 #include "confdefs.h"
21820 #include <stdio.h>
21821 int
21822 main (void)
21823 {
21824 printf("Hello")
21825   ;
21826   return 0;
21827 }
21828 _ACEOF
21829 rm -f conftest.$ac_objext
21830 if { (eval echo "$as_me:21830: \"$ac_compile\"") >&5
21831   (eval $ac_compile) 2>&5
21832   ac_status=$?
21833   echo "$as_me:21833: \$? = $ac_status" >&5
21834   (exit $ac_status); } &&
21835          { ac_try='test -s conftest.$ac_objext'
21836   { (eval echo "$as_me:21836: \"$ac_try\"") >&5
21837   (eval $ac_try) 2>&5
21838   ac_status=$?
21839   echo "$as_me:21839: \$? = $ac_status" >&5
21840   (exit $ac_status); }; }; then
21841   :
21842 else
21843   echo "$as_me: failed program was:" >&5
21844 cat conftest.$ac_ext >&5
21845 cf_have_incdir=yes
21846 fi
21847 rm -f conftest.$ac_objext conftest.$ac_ext
21848                           CPPFLAGS=$cf_save_CPPFLAGS
21849                         fi
21850                   fi
21851                 fi
21852
21853                 if test "$cf_have_incdir" = no ; then
21854                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21855
21856 echo "${as_me:-configure}:21856: testing adding $cf_add_incdir to include-path ..." 1>&5
21857
21858                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21859
21860                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21861                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21862                   cf_add_incdir="$cf_top_incdir"
21863                 else
21864                   break
21865                 fi
21866           else
21867                 break
21868           fi
21869         done
21870   done
21871 fi
21872
21873 if test -n "$with_hashed_db/lib" ; then
21874         for cf_add_libdir in $with_hashed_db/lib
21875         do
21876                 if test $cf_add_libdir = /usr/lib ; then
21877                         :
21878                 elif test -d $cf_add_libdir
21879                 then
21880                         cf_have_libdir=no
21881                         if test -n "$LDFLAGS$LIBS" ; then
21882                                 # a loop is needed to ensure we can add subdirs of existing dirs
21883                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21884                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21885                                                 cf_have_libdir=yes; break
21886                                         fi
21887                                 done
21888                         fi
21889                         if test "$cf_have_libdir" = no ; then
21890                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21891
21892 echo "${as_me:-configure}:21892: testing adding $cf_add_libdir to library-path ..." 1>&5
21893
21894                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21895                         fi
21896                 fi
21897         done
21898 fi
21899
21900         else
21901                 case "$with_hashed_db" in
21902                 (./*|../*|/*)
21903                         { echo "$as_me:21903: WARNING: no such directory $with_hashed_db" >&5
21904 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
21905                         ;;
21906                 (*)
21907
21908 cf_search=
21909
21910 test "x$prefix" != "xNONE" && \
21911 test -d "$prefix" && \
21912  {
21913         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
21914         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
21915         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
21916         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
21917         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
21918         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
21919 }
21920
21921 for cf_subdir_prefix in \
21922         /usr \
21923         /usr/local \
21924         /usr/pkg \
21925         /opt \
21926         /opt/local \
21927         $HOME
21928 do
21929
21930 test "x$cf_subdir_prefix" != "x$prefix" && \
21931 test -d "$cf_subdir_prefix" && \
21932 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21933         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
21934         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
21935         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
21936         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
21937         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
21938         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"
21939 }
21940
21941 done
21942
21943         for cf_item in $cf_search
21944         do
21945                 case $cf_item in
21946                 (*/$with_hashed_db)
21947
21948 if test -n "$cf_item" ; then
21949   for cf_add_incdir in $cf_item
21950   do
21951         while test $cf_add_incdir != /usr/include
21952         do
21953           if test -d $cf_add_incdir
21954           then
21955                 cf_have_incdir=no
21956                 if test -n "$CFLAGS$CPPFLAGS" ; then
21957                   # a loop is needed to ensure we can add subdirs of existing dirs
21958                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21959                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21960                           cf_have_incdir=yes; break
21961                         fi
21962                   done
21963                 fi
21964
21965                 if test "$cf_have_incdir" = no ; then
21966                   if test "$cf_add_incdir" = /usr/local/include ; then
21967                         if test "$GCC" = yes
21968                         then
21969                           cf_save_CPPFLAGS=$CPPFLAGS
21970
21971         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21972         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21973
21974                           cat >conftest.$ac_ext <<_ACEOF
21975 #line 21975 "configure"
21976 #include "confdefs.h"
21977 #include <stdio.h>
21978 int
21979 main (void)
21980 {
21981 printf("Hello")
21982   ;
21983   return 0;
21984 }
21985 _ACEOF
21986 rm -f conftest.$ac_objext
21987 if { (eval echo "$as_me:21987: \"$ac_compile\"") >&5
21988   (eval $ac_compile) 2>&5
21989   ac_status=$?
21990   echo "$as_me:21990: \$? = $ac_status" >&5
21991   (exit $ac_status); } &&
21992          { ac_try='test -s conftest.$ac_objext'
21993   { (eval echo "$as_me:21993: \"$ac_try\"") >&5
21994   (eval $ac_try) 2>&5
21995   ac_status=$?
21996   echo "$as_me:21996: \$? = $ac_status" >&5
21997   (exit $ac_status); }; }; then
21998   :
21999 else
22000   echo "$as_me: failed program was:" >&5
22001 cat conftest.$ac_ext >&5
22002 cf_have_incdir=yes
22003 fi
22004 rm -f conftest.$ac_objext conftest.$ac_ext
22005                           CPPFLAGS=$cf_save_CPPFLAGS
22006                         fi
22007                   fi
22008                 fi
22009
22010                 if test "$cf_have_incdir" = no ; then
22011                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22012
22013 echo "${as_me:-configure}:22013: testing adding $cf_add_incdir to include-path ..." 1>&5
22014
22015                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22016
22017                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22018                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22019                   cf_add_incdir="$cf_top_incdir"
22020                 else
22021                   break
22022                 fi
22023           else
22024                 break
22025           fi
22026         done
22027   done
22028 fi
22029
22030                         ;;
22031                 esac
22032         done
22033
22034 cf_search=
22035
22036 test "x$prefix" != "xNONE" && \
22037 test -d "$prefix" && \
22038  {
22039         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22040         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22041         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22042         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22043         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22044         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22045 }
22046
22047 for cf_subdir_prefix in \
22048         /usr \
22049         /usr/local \
22050         /usr/pkg \
22051         /opt \
22052         /opt/local \
22053         $HOME
22054 do
22055
22056 test "x$cf_subdir_prefix" != "x$prefix" && \
22057 test -d "$cf_subdir_prefix" && \
22058 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22059         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22060         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22061         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22062         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22063         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22064         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"
22065 }
22066
22067 done
22068
22069         for cf_item in $cf_search
22070         do
22071                 case $cf_item in
22072                 (*/$with_hashed_db)
22073
22074 if test -n "$cf_item" ; then
22075         for cf_add_libdir in $cf_item
22076         do
22077                 if test $cf_add_libdir = /usr/lib ; then
22078                         :
22079                 elif test -d $cf_add_libdir
22080                 then
22081                         cf_have_libdir=no
22082                         if test -n "$LDFLAGS$LIBS" ; then
22083                                 # a loop is needed to ensure we can add subdirs of existing dirs
22084                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22085                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22086                                                 cf_have_libdir=yes; break
22087                                         fi
22088                                 done
22089                         fi
22090                         if test "$cf_have_libdir" = no ; then
22091                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22092
22093 echo "${as_me:-configure}:22093: testing adding $cf_add_libdir to library-path ..." 1>&5
22094
22095                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22096                         fi
22097                 fi
22098         done
22099 fi
22100
22101                         ;;
22102                 esac
22103         done
22104
22105                         ;;
22106                 esac
22107         fi
22108 esac
22109
22110 echo "$as_me:22110: checking for db.h" >&5
22111 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22112 if test "${ac_cv_header_db_h+set}" = set; then
22113   echo $ECHO_N "(cached) $ECHO_C" >&6
22114 else
22115   cat >conftest.$ac_ext <<_ACEOF
22116 #line 22116 "configure"
22117 #include "confdefs.h"
22118 #include <db.h>
22119 _ACEOF
22120 if { (eval echo "$as_me:22120: \"$ac_cpp conftest.$ac_ext\"") >&5
22121   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22122   ac_status=$?
22123   egrep -v '^ *\+' conftest.er1 >conftest.err
22124   rm -f conftest.er1
22125   cat conftest.err >&5
22126   echo "$as_me:22126: \$? = $ac_status" >&5
22127   (exit $ac_status); } >/dev/null; then
22128   if test -s conftest.err; then
22129     ac_cpp_err=$ac_c_preproc_warn_flag
22130   else
22131     ac_cpp_err=
22132   fi
22133 else
22134   ac_cpp_err=yes
22135 fi
22136 if test -z "$ac_cpp_err"; then
22137   ac_cv_header_db_h=yes
22138 else
22139   echo "$as_me: failed program was:" >&5
22140   cat conftest.$ac_ext >&5
22141   ac_cv_header_db_h=no
22142 fi
22143 rm -f conftest.err conftest.$ac_ext
22144 fi
22145 echo "$as_me:22145: result: $ac_cv_header_db_h" >&5
22146 echo "${ECHO_T}$ac_cv_header_db_h" >&6
22147 if test $ac_cv_header_db_h = yes; then
22148
22149 echo "$as_me:22149: checking for version of db" >&5
22150 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22151 if test "${cf_cv_hashed_db_version+set}" = set; then
22152   echo $ECHO_N "(cached) $ECHO_C" >&6
22153 else
22154
22155 cf_cv_hashed_db_version=unknown
22156
22157 for cf_db_version in 1 2 3 4 5 6
22158 do
22159
22160 echo "${as_me:-configure}:22160: testing checking for db version $cf_db_version ..." 1>&5
22161
22162         cat >conftest.$ac_ext <<_ACEOF
22163 #line 22163 "configure"
22164 #include "confdefs.h"
22165
22166 $ac_includes_default
22167 #include <db.h>
22168
22169 #ifdef DB_VERSION_MAJOR
22170         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22171 #if $cf_db_version == DB_VERSION_MAJOR
22172         /* ok */
22173 #else
22174         make an error
22175 #endif
22176 #else
22177 #if $cf_db_version == 1
22178         /* ok: assuming this is DB 1.8.5 */
22179 #else
22180         make an error
22181 #endif
22182 #endif
22183
22184 int
22185 main (void)
22186 {
22187 DBT *foo = 0
22188   ;
22189   return 0;
22190 }
22191 _ACEOF
22192 rm -f conftest.$ac_objext
22193 if { (eval echo "$as_me:22193: \"$ac_compile\"") >&5
22194   (eval $ac_compile) 2>&5
22195   ac_status=$?
22196   echo "$as_me:22196: \$? = $ac_status" >&5
22197   (exit $ac_status); } &&
22198          { ac_try='test -s conftest.$ac_objext'
22199   { (eval echo "$as_me:22199: \"$ac_try\"") >&5
22200   (eval $ac_try) 2>&5
22201   ac_status=$?
22202   echo "$as_me:22202: \$? = $ac_status" >&5
22203   (exit $ac_status); }; }; then
22204
22205         cf_cv_hashed_db_version=$cf_db_version
22206         break
22207
22208 else
22209   echo "$as_me: failed program was:" >&5
22210 cat conftest.$ac_ext >&5
22211 fi
22212 rm -f conftest.$ac_objext conftest.$ac_ext
22213 done
22214
22215 fi
22216 echo "$as_me:22216: result: $cf_cv_hashed_db_version" >&5
22217 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22218
22219 if test "$cf_cv_hashed_db_version" = unknown ; then
22220         { { echo "$as_me:22220: error: Cannot determine version of db" >&5
22221 echo "$as_me: error: Cannot determine version of db" >&2;}
22222    { (exit 1); exit 1; }; }
22223 else
22224
22225 echo "$as_me:22225: checking for db libraries" >&5
22226 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22227 if test "${cf_cv_hashed_db_libs+set}" = set; then
22228   echo $ECHO_N "(cached) $ECHO_C" >&6
22229 else
22230
22231 cf_cv_hashed_db_libs=unknown
22232 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22233 do
22234         cf_save_libs="$LIBS"
22235         if test -n "$cf_db_libs"; then
22236
22237 cf_add_libs="-l$cf_db_libs"
22238 # Filter out duplicates - this happens with badly-designed ".pc" files...
22239 for cf_add_1lib in $LIBS
22240 do
22241         for cf_add_2lib in $cf_add_libs
22242         do
22243                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22244                 then
22245                         cf_add_1lib=
22246                         break
22247                 fi
22248         done
22249         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22250 done
22251 LIBS="$cf_add_libs"
22252
22253         fi
22254
22255 echo "${as_me:-configure}:22255: testing checking for library "$cf_db_libs" ..." 1>&5
22256
22257         cat >conftest.$ac_ext <<_ACEOF
22258 #line 22258 "configure"
22259 #include "confdefs.h"
22260
22261 $ac_includes_default
22262 #include <db.h>
22263
22264 int
22265 main (void)
22266 {
22267
22268         char *path = "/tmp/foo";
22269 #ifdef DB_VERSION_MAJOR
22270 #if DB_VERSION_MAJOR >= 4
22271         DB *result = 0;
22272         db_create(&result, NULL, 0);
22273         result->open(result,
22274                 NULL,
22275                 path,
22276                 path,
22277                 DB_HASH,
22278                 DB_CREATE,
22279                 0644);
22280 #elif DB_VERSION_MAJOR >= 3
22281         DB *result = 0;
22282         db_create(&result, NULL, 0);
22283         result->open(result,
22284                 path,
22285                 path,
22286                 DB_HASH,
22287                 DB_CREATE,
22288                 0644);
22289 #elif DB_VERSION_MAJOR >= 2
22290         DB *result = 0;
22291         db_open(path,
22292                 DB_HASH,
22293                 DB_CREATE,
22294                 0644,
22295                 (DB_ENV *) 0,
22296                 (DB_INFO *) 0,
22297                 &result);
22298 #endif /* DB_VERSION_MAJOR */
22299 #else
22300         DB *result = dbopen(path,
22301                      2,
22302                      0644,
22303                      DB_HASH,
22304                      0);
22305 #endif
22306         ${cf_cv_main_return:-return}(result != 0)
22307
22308   ;
22309   return 0;
22310 }
22311 _ACEOF
22312 rm -f conftest.$ac_objext conftest$ac_exeext
22313 if { (eval echo "$as_me:22313: \"$ac_link\"") >&5
22314   (eval $ac_link) 2>&5
22315   ac_status=$?
22316   echo "$as_me:22316: \$? = $ac_status" >&5
22317   (exit $ac_status); } &&
22318          { ac_try='test -s conftest$ac_exeext'
22319   { (eval echo "$as_me:22319: \"$ac_try\"") >&5
22320   (eval $ac_try) 2>&5
22321   ac_status=$?
22322   echo "$as_me:22322: \$? = $ac_status" >&5
22323   (exit $ac_status); }; }; then
22324
22325         if test -n "$cf_db_libs" ; then
22326                 cf_cv_hashed_db_libs=$cf_db_libs
22327         else
22328                 cf_cv_hashed_db_libs=default
22329         fi
22330         LIBS="$cf_save_libs"
22331         break
22332
22333 else
22334   echo "$as_me: failed program was:" >&5
22335 cat conftest.$ac_ext >&5
22336 fi
22337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22338         LIBS="$cf_save_libs"
22339 done
22340
22341 fi
22342 echo "$as_me:22342: result: $cf_cv_hashed_db_libs" >&5
22343 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
22344
22345         if test "$cf_cv_hashed_db_libs" = unknown ; then
22346                 { { echo "$as_me:22346: error: Cannot determine library for db" >&5
22347 echo "$as_me: error: Cannot determine library for db" >&2;}
22348    { (exit 1); exit 1; }; }
22349         elif test "$cf_cv_hashed_db_libs" != default ; then
22350
22351 cf_add_libs="-l$cf_cv_hashed_db_libs"
22352 # Filter out duplicates - this happens with badly-designed ".pc" files...
22353 for cf_add_1lib in $LIBS
22354 do
22355         for cf_add_2lib in $cf_add_libs
22356         do
22357                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22358                 then
22359                         cf_add_1lib=
22360                         break
22361                 fi
22362         done
22363         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22364 done
22365 LIBS="$cf_add_libs"
22366
22367         fi
22368 fi
22369
22370 else
22371
22372         { { echo "$as_me:22372: error: Cannot find db.h" >&5
22373 echo "$as_me: error: Cannot find db.h" >&2;}
22374    { (exit 1); exit 1; }; }
22375
22376 fi
22377
22378 fi
22379
22380 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
22381         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22382         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22383 fi
22384
22385 # Just in case, check if the C compiler has a bool type.
22386
22387 echo "$as_me:22387: checking if we should include stdbool.h" >&5
22388 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22389
22390 if test "${cf_cv_header_stdbool_h+set}" = set; then
22391   echo $ECHO_N "(cached) $ECHO_C" >&6
22392 else
22393
22394         cat >conftest.$ac_ext <<_ACEOF
22395 #line 22395 "configure"
22396 #include "confdefs.h"
22397
22398 int
22399 main (void)
22400 {
22401 bool foo = false
22402   ;
22403   return 0;
22404 }
22405 _ACEOF
22406 rm -f conftest.$ac_objext
22407 if { (eval echo "$as_me:22407: \"$ac_compile\"") >&5
22408   (eval $ac_compile) 2>&5
22409   ac_status=$?
22410   echo "$as_me:22410: \$? = $ac_status" >&5
22411   (exit $ac_status); } &&
22412          { ac_try='test -s conftest.$ac_objext'
22413   { (eval echo "$as_me:22413: \"$ac_try\"") >&5
22414   (eval $ac_try) 2>&5
22415   ac_status=$?
22416   echo "$as_me:22416: \$? = $ac_status" >&5
22417   (exit $ac_status); }; }; then
22418   cf_cv_header_stdbool_h=0
22419 else
22420   echo "$as_me: failed program was:" >&5
22421 cat conftest.$ac_ext >&5
22422 cat >conftest.$ac_ext <<_ACEOF
22423 #line 22423 "configure"
22424 #include "confdefs.h"
22425
22426 #ifndef __BEOS__
22427 #include <stdbool.h>
22428 #endif
22429
22430 int
22431 main (void)
22432 {
22433 bool foo = false
22434   ;
22435   return 0;
22436 }
22437 _ACEOF
22438 rm -f conftest.$ac_objext
22439 if { (eval echo "$as_me:22439: \"$ac_compile\"") >&5
22440   (eval $ac_compile) 2>&5
22441   ac_status=$?
22442   echo "$as_me:22442: \$? = $ac_status" >&5
22443   (exit $ac_status); } &&
22444          { ac_try='test -s conftest.$ac_objext'
22445   { (eval echo "$as_me:22445: \"$ac_try\"") >&5
22446   (eval $ac_try) 2>&5
22447   ac_status=$?
22448   echo "$as_me:22448: \$? = $ac_status" >&5
22449   (exit $ac_status); }; }; then
22450   cf_cv_header_stdbool_h=1
22451 else
22452   echo "$as_me: failed program was:" >&5
22453 cat conftest.$ac_ext >&5
22454 cf_cv_header_stdbool_h=0
22455 fi
22456 rm -f conftest.$ac_objext conftest.$ac_ext
22457 fi
22458 rm -f conftest.$ac_objext conftest.$ac_ext
22459 fi
22460
22461 if test "$cf_cv_header_stdbool_h" = 1
22462 then    echo "$as_me:22462: result: yes" >&5
22463 echo "${ECHO_T}yes" >&6
22464 else    echo "$as_me:22464: result: no" >&5
22465 echo "${ECHO_T}no" >&6
22466 fi
22467
22468 echo "$as_me:22468: checking for builtin bool type" >&5
22469 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22470
22471 if test "${cf_cv_cc_bool_type+set}" = set; then
22472   echo $ECHO_N "(cached) $ECHO_C" >&6
22473 else
22474
22475         cat >conftest.$ac_ext <<_ACEOF
22476 #line 22476 "configure"
22477 #include "confdefs.h"
22478
22479 #include <stdio.h>
22480 #include <sys/types.h>
22481
22482 int
22483 main (void)
22484 {
22485 bool x = false
22486   ;
22487   return 0;
22488 }
22489 _ACEOF
22490 rm -f conftest.$ac_objext
22491 if { (eval echo "$as_me:22491: \"$ac_compile\"") >&5
22492   (eval $ac_compile) 2>&5
22493   ac_status=$?
22494   echo "$as_me:22494: \$? = $ac_status" >&5
22495   (exit $ac_status); } &&
22496          { ac_try='test -s conftest.$ac_objext'
22497   { (eval echo "$as_me:22497: \"$ac_try\"") >&5
22498   (eval $ac_try) 2>&5
22499   ac_status=$?
22500   echo "$as_me:22500: \$? = $ac_status" >&5
22501   (exit $ac_status); }; }; then
22502   cf_cv_cc_bool_type=1
22503 else
22504   echo "$as_me: failed program was:" >&5
22505 cat conftest.$ac_ext >&5
22506 cf_cv_cc_bool_type=0
22507 fi
22508 rm -f conftest.$ac_objext conftest.$ac_ext
22509
22510 fi
22511
22512 if test "$cf_cv_cc_bool_type" = 1
22513 then    echo "$as_me:22513: result: yes" >&5
22514 echo "${ECHO_T}yes" >&6
22515 else    echo "$as_me:22515: result: no" >&5
22516 echo "${ECHO_T}no" >&6
22517 fi
22518
22519 # Check for C++ compiler characteristics (and ensure that it's there!)
22520 if test -n "$CXX" ; then
22521         ac_ext=cc
22522 ac_cpp='$CXXCPP $CPPFLAGS'
22523 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22524 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22525 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22526 ac_main_return=return
22527
22528 if test -n "$GXX" ; then
22529
22530         cf_save="$LIBS"
22531         LIBS="$LIBS $CXXLIBS"
22532         echo "$as_me:22532: checking if we already have C++ library" >&5
22533 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
22534         cat >conftest.$ac_ext <<_ACEOF
22535 #line 22535 "configure"
22536 #include "confdefs.h"
22537
22538                         #include <iostream>
22539 int
22540 main (void)
22541 {
22542
22543                         std::cout << "Hello World!" << std::endl;
22544   ;
22545   return 0;
22546 }
22547 _ACEOF
22548 rm -f conftest.$ac_objext conftest$ac_exeext
22549 if { (eval echo "$as_me:22549: \"$ac_link\"") >&5
22550   (eval $ac_link) 2>&5
22551   ac_status=$?
22552   echo "$as_me:22552: \$? = $ac_status" >&5
22553   (exit $ac_status); } &&
22554          { ac_try='test -s conftest$ac_exeext'
22555   { (eval echo "$as_me:22555: \"$ac_try\"") >&5
22556   (eval $ac_try) 2>&5
22557   ac_status=$?
22558   echo "$as_me:22558: \$? = $ac_status" >&5
22559   (exit $ac_status); }; }; then
22560   cf_have_libstdcpp=yes
22561 else
22562   echo "$as_me: failed program was:" >&5
22563 cat conftest.$ac_ext >&5
22564 cf_have_libstdcpp=no
22565 fi
22566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22567         echo "$as_me:22567: result: $cf_have_libstdcpp" >&5
22568 echo "${ECHO_T}$cf_have_libstdcpp" >&6
22569         LIBS="$cf_save"
22570
22571         if test $cf_have_libstdcpp != yes
22572         then
22573                 case $cf_cv_system_name in
22574                 (os2*)
22575                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
22576                                 cf_stdcpp_libname=stdcpp
22577                         else
22578                                 cf_stdcpp_libname=stdc++
22579                         fi
22580                         ;;
22581                 (*)
22582                         cf_stdcpp_libname=stdc++
22583                         ;;
22584                 esac
22585
22586                 echo "$as_me:22586: checking for library $cf_stdcpp_libname" >&5
22587 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
22588 if test "${cf_cv_libstdcpp+set}" = set; then
22589   echo $ECHO_N "(cached) $ECHO_C" >&6
22590 else
22591
22592                         cf_save="$LIBS"
22593                         LIBS="$LIBS $CXXLIBS"
22594
22595 cf_add_libs="-l$cf_stdcpp_libname"
22596 # Filter out duplicates - this happens with badly-designed ".pc" files...
22597 for cf_add_1lib in $LIBS
22598 do
22599         for cf_add_2lib in $cf_add_libs
22600         do
22601                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22602                 then
22603                         cf_add_1lib=
22604                         break
22605                 fi
22606         done
22607         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22608 done
22609 LIBS="$cf_add_libs"
22610
22611                 cat >conftest.$ac_ext <<_ACEOF
22612 #line 22612 "configure"
22613 #include "confdefs.h"
22614
22615                                 #include <iostream>
22616 int
22617 main (void)
22618 {
22619
22620                                 std::cout << "Hello World!" << std::endl;
22621   ;
22622   return 0;
22623 }
22624 _ACEOF
22625 rm -f conftest.$ac_objext conftest$ac_exeext
22626 if { (eval echo "$as_me:22626: \"$ac_link\"") >&5
22627   (eval $ac_link) 2>&5
22628   ac_status=$?
22629   echo "$as_me:22629: \$? = $ac_status" >&5
22630   (exit $ac_status); } &&
22631          { ac_try='test -s conftest$ac_exeext'
22632   { (eval echo "$as_me:22632: \"$ac_try\"") >&5
22633   (eval $ac_try) 2>&5
22634   ac_status=$?
22635   echo "$as_me:22635: \$? = $ac_status" >&5
22636   (exit $ac_status); }; }; then
22637   cf_cv_libstdcpp=yes
22638 else
22639   echo "$as_me: failed program was:" >&5
22640 cat conftest.$ac_ext >&5
22641 cf_cv_libstdcpp=no
22642 fi
22643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22644                         LIBS="$cf_save"
22645
22646 fi
22647 echo "$as_me:22647: result: $cf_cv_libstdcpp" >&5
22648 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
22649                 test "$cf_cv_libstdcpp" = yes && {
22650 cf_add_libs="-l$cf_stdcpp_libname"
22651 # Filter out duplicates - this happens with badly-designed ".pc" files...
22652 for cf_add_1lib in $CXXLIBS
22653 do
22654         for cf_add_2lib in $cf_add_libs
22655         do
22656                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22657                 then
22658                         cf_add_1lib=
22659                         break
22660                 fi
22661         done
22662         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22663 done
22664 CXXLIBS="$cf_add_libs"
22665  }
22666         fi
22667 fi
22668
22669         echo "$as_me:22669: checking whether $CXX understands -c and -o together" >&5
22670 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
22671 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
22672   echo $ECHO_N "(cached) $ECHO_C" >&6
22673 else
22674
22675 cat > conftest.$ac_ext <<CF_EOF
22676 int main(void)
22677 {
22678         ${cf_cv_main_return:-return}(0);
22679 }
22680 CF_EOF
22681 # We do the test twice because some compilers refuse to overwrite an
22682 # existing .o file with -o, though they will create one.
22683 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
22684 if { (eval echo "$as_me:22684: \"$ac_try\"") >&5
22685   (eval $ac_try) 2>&5
22686   ac_status=$?
22687   echo "$as_me:22687: \$? = $ac_status" >&5
22688   (exit $ac_status); } &&
22689   test -f conftest2.$ac_objext && { (eval echo "$as_me:22689: \"$ac_try\"") >&5
22690   (eval $ac_try) 2>&5
22691   ac_status=$?
22692   echo "$as_me:22692: \$? = $ac_status" >&5
22693   (exit $ac_status); };
22694 then
22695   eval cf_cv_prog_CXX_c_o=yes
22696 else
22697   eval cf_cv_prog_CXX_c_o=no
22698 fi
22699 rm -rf conftest*
22700
22701 fi
22702 if test $cf_cv_prog_CXX_c_o = yes; then
22703   echo "$as_me:22703: result: yes" >&5
22704 echo "${ECHO_T}yes" >&6
22705 else
22706   echo "$as_me:22706: result: no" >&5
22707 echo "${ECHO_T}no" >&6
22708 fi
22709
22710         case $GXX_VERSION in
22711         (1*|2.0-6*)
22712                 cf_cxx_library=yes
22713                 ;;
22714         (*-2.7*|2.7*)
22715
22716 cf_cxx_library=unknown
22717 case $cf_cv_system_name in
22718 (os2*)
22719         cf_gpp_libname=gpp
22720         ;;
22721 (*)
22722         cf_gpp_libname=g++
22723         ;;
22724 esac
22725 if test "$GXX" = yes; then
22726         echo "$as_me:22726: checking for lib$cf_gpp_libname" >&5
22727 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
22728         cf_save="$LIBS"
22729
22730 cf_add_libs="-l$cf_gpp_libname"
22731 # Filter out duplicates - this happens with badly-designed ".pc" files...
22732 for cf_add_1lib in $LIBS
22733 do
22734         for cf_add_2lib in $cf_add_libs
22735         do
22736                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22737                 then
22738                         cf_add_1lib=
22739                         break
22740                 fi
22741         done
22742         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22743 done
22744 LIBS="$cf_add_libs"
22745
22746         cat >conftest.$ac_ext <<_ACEOF
22747 #line 22747 "configure"
22748 #include "confdefs.h"
22749
22750 #include <$cf_gpp_libname/builtin.h>
22751
22752 int
22753 main (void)
22754 {
22755 two_arg_error_handler_t foo2 = lib_error_handler
22756   ;
22757   return 0;
22758 }
22759 _ACEOF
22760 rm -f conftest.$ac_objext conftest$ac_exeext
22761 if { (eval echo "$as_me:22761: \"$ac_link\"") >&5
22762   (eval $ac_link) 2>&5
22763   ac_status=$?
22764   echo "$as_me:22764: \$? = $ac_status" >&5
22765   (exit $ac_status); } &&
22766          { ac_try='test -s conftest$ac_exeext'
22767   { (eval echo "$as_me:22767: \"$ac_try\"") >&5
22768   (eval $ac_try) 2>&5
22769   ac_status=$?
22770   echo "$as_me:22770: \$? = $ac_status" >&5
22771   (exit $ac_status); }; }; then
22772   cf_cxx_library=yes
22773
22774 cf_add_libs="-l$cf_gpp_libname"
22775 # Filter out duplicates - this happens with badly-designed ".pc" files...
22776 for cf_add_1lib in $CXXLIBS
22777 do
22778         for cf_add_2lib in $cf_add_libs
22779         do
22780                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22781                 then
22782                         cf_add_1lib=
22783                         break
22784                 fi
22785         done
22786         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22787 done
22788 CXXLIBS="$cf_add_libs"
22789
22790          if test "$cf_gpp_libname" = cpp ; then
22791
22792 cat >>confdefs.h <<\EOF
22793 #define HAVE_GPP_BUILTIN_H 1
22794 EOF
22795
22796          else
22797
22798 cat >>confdefs.h <<\EOF
22799 #define HAVE_GXX_BUILTIN_H 1
22800 EOF
22801
22802          fi
22803 else
22804   echo "$as_me: failed program was:" >&5
22805 cat conftest.$ac_ext >&5
22806 cat >conftest.$ac_ext <<_ACEOF
22807 #line 22807 "configure"
22808 #include "confdefs.h"
22809
22810 #include <builtin.h>
22811
22812 int
22813 main (void)
22814 {
22815 two_arg_error_handler_t foo2 = lib_error_handler
22816   ;
22817   return 0;
22818 }
22819 _ACEOF
22820 rm -f conftest.$ac_objext conftest$ac_exeext
22821 if { (eval echo "$as_me:22821: \"$ac_link\"") >&5
22822   (eval $ac_link) 2>&5
22823   ac_status=$?
22824   echo "$as_me:22824: \$? = $ac_status" >&5
22825   (exit $ac_status); } &&
22826          { ac_try='test -s conftest$ac_exeext'
22827   { (eval echo "$as_me:22827: \"$ac_try\"") >&5
22828   (eval $ac_try) 2>&5
22829   ac_status=$?
22830   echo "$as_me:22830: \$? = $ac_status" >&5
22831   (exit $ac_status); }; }; then
22832   cf_cxx_library=yes
22833
22834 cf_add_libs="-l$cf_gpp_libname"
22835 # Filter out duplicates - this happens with badly-designed ".pc" files...
22836 for cf_add_1lib in $CXXLIBS
22837 do
22838         for cf_add_2lib in $cf_add_libs
22839         do
22840                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22841                 then
22842                         cf_add_1lib=
22843                         break
22844                 fi
22845         done
22846         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22847 done
22848 CXXLIBS="$cf_add_libs"
22849
22850 cat >>confdefs.h <<\EOF
22851 #define HAVE_BUILTIN_H 1
22852 EOF
22853
22854 else
22855   echo "$as_me: failed program was:" >&5
22856 cat conftest.$ac_ext >&5
22857 cf_cxx_library=no
22858 fi
22859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22860 fi
22861 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22862         LIBS="$cf_save"
22863         echo "$as_me:22863: result: $cf_cxx_library" >&5
22864 echo "${ECHO_T}$cf_cxx_library" >&6
22865 fi
22866
22867                 ;;
22868         (*)
22869                 cf_cxx_library=no
22870                 ;;
22871         esac
22872
22873         ac_ext=cc
22874 ac_cpp='$CXXCPP $CPPFLAGS'
22875 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22876 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22877 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22878 ac_main_return=return
22879 echo "$as_me:22879: checking how to run the C++ preprocessor" >&5
22880 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
22881 if test -z "$CXXCPP"; then
22882   if test "${ac_cv_prog_CXXCPP+set}" = set; then
22883   echo $ECHO_N "(cached) $ECHO_C" >&6
22884 else
22885       # Double quotes because CXXCPP needs to be expanded
22886     for CXXCPP in "$CXX -E" "/lib/cpp"
22887     do
22888       ac_preproc_ok=false
22889 for ac_cxx_preproc_warn_flag in '' yes
22890 do
22891   # Use a header file that comes with gcc, so configuring glibc
22892   # with a fresh cross-compiler works.
22893   # On the NeXT, cc -E runs the code through the compiler's parser,
22894   # not just through cpp. "Syntax error" is here to catch this case.
22895   cat >conftest.$ac_ext <<_ACEOF
22896 #line 22896 "configure"
22897 #include "confdefs.h"
22898 #include <assert.h>
22899                      Syntax error
22900 _ACEOF
22901 if { (eval echo "$as_me:22901: \"$ac_cpp conftest.$ac_ext\"") >&5
22902   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22903   ac_status=$?
22904   egrep -v '^ *\+' conftest.er1 >conftest.err
22905   rm -f conftest.er1
22906   cat conftest.err >&5
22907   echo "$as_me:22907: \$? = $ac_status" >&5
22908   (exit $ac_status); } >/dev/null; then
22909   if test -s conftest.err; then
22910     ac_cpp_err=$ac_cxx_preproc_warn_flag
22911   else
22912     ac_cpp_err=
22913   fi
22914 else
22915   ac_cpp_err=yes
22916 fi
22917 if test -z "$ac_cpp_err"; then
22918   :
22919 else
22920   echo "$as_me: failed program was:" >&5
22921   cat conftest.$ac_ext >&5
22922   # Broken: fails on valid input.
22923 continue
22924 fi
22925 rm -f conftest.err conftest.$ac_ext
22926
22927   # OK, works on sane cases.  Now check whether non-existent headers
22928   # can be detected and how.
22929   cat >conftest.$ac_ext <<_ACEOF
22930 #line 22930 "configure"
22931 #include "confdefs.h"
22932 #include <ac_nonexistent.h>
22933 _ACEOF
22934 if { (eval echo "$as_me:22934: \"$ac_cpp conftest.$ac_ext\"") >&5
22935   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22936   ac_status=$?
22937   egrep -v '^ *\+' conftest.er1 >conftest.err
22938   rm -f conftest.er1
22939   cat conftest.err >&5
22940   echo "$as_me:22940: \$? = $ac_status" >&5
22941   (exit $ac_status); } >/dev/null; then
22942   if test -s conftest.err; then
22943     ac_cpp_err=$ac_cxx_preproc_warn_flag
22944   else
22945     ac_cpp_err=
22946   fi
22947 else
22948   ac_cpp_err=yes
22949 fi
22950 if test -z "$ac_cpp_err"; then
22951   # Broken: success on invalid input.
22952 continue
22953 else
22954   echo "$as_me: failed program was:" >&5
22955   cat conftest.$ac_ext >&5
22956   # Passes both tests.
22957 ac_preproc_ok=:
22958 break
22959 fi
22960 rm -f conftest.err conftest.$ac_ext
22961
22962 done
22963 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22964 rm -f conftest.err conftest.$ac_ext
22965 if $ac_preproc_ok; then
22966   break
22967 fi
22968
22969     done
22970     ac_cv_prog_CXXCPP=$CXXCPP
22971
22972 fi
22973   CXXCPP=$ac_cv_prog_CXXCPP
22974 else
22975   ac_cv_prog_CXXCPP=$CXXCPP
22976 fi
22977 echo "$as_me:22977: result: $CXXCPP" >&5
22978 echo "${ECHO_T}$CXXCPP" >&6
22979 ac_preproc_ok=false
22980 for ac_cxx_preproc_warn_flag in '' yes
22981 do
22982   # Use a header file that comes with gcc, so configuring glibc
22983   # with a fresh cross-compiler works.
22984   # On the NeXT, cc -E runs the code through the compiler's parser,
22985   # not just through cpp. "Syntax error" is here to catch this case.
22986   cat >conftest.$ac_ext <<_ACEOF
22987 #line 22987 "configure"
22988 #include "confdefs.h"
22989 #include <assert.h>
22990                      Syntax error
22991 _ACEOF
22992 if { (eval echo "$as_me:22992: \"$ac_cpp conftest.$ac_ext\"") >&5
22993   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22994   ac_status=$?
22995   egrep -v '^ *\+' conftest.er1 >conftest.err
22996   rm -f conftest.er1
22997   cat conftest.err >&5
22998   echo "$as_me:22998: \$? = $ac_status" >&5
22999   (exit $ac_status); } >/dev/null; then
23000   if test -s conftest.err; then
23001     ac_cpp_err=$ac_cxx_preproc_warn_flag
23002   else
23003     ac_cpp_err=
23004   fi
23005 else
23006   ac_cpp_err=yes
23007 fi
23008 if test -z "$ac_cpp_err"; then
23009   :
23010 else
23011   echo "$as_me: failed program was:" >&5
23012   cat conftest.$ac_ext >&5
23013   # Broken: fails on valid input.
23014 continue
23015 fi
23016 rm -f conftest.err conftest.$ac_ext
23017
23018   # OK, works on sane cases.  Now check whether non-existent headers
23019   # can be detected and how.
23020   cat >conftest.$ac_ext <<_ACEOF
23021 #line 23021 "configure"
23022 #include "confdefs.h"
23023 #include <ac_nonexistent.h>
23024 _ACEOF
23025 if { (eval echo "$as_me:23025: \"$ac_cpp conftest.$ac_ext\"") >&5
23026   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23027   ac_status=$?
23028   egrep -v '^ *\+' conftest.er1 >conftest.err
23029   rm -f conftest.er1
23030   cat conftest.err >&5
23031   echo "$as_me:23031: \$? = $ac_status" >&5
23032   (exit $ac_status); } >/dev/null; then
23033   if test -s conftest.err; then
23034     ac_cpp_err=$ac_cxx_preproc_warn_flag
23035   else
23036     ac_cpp_err=
23037   fi
23038 else
23039   ac_cpp_err=yes
23040 fi
23041 if test -z "$ac_cpp_err"; then
23042   # Broken: success on invalid input.
23043 continue
23044 else
23045   echo "$as_me: failed program was:" >&5
23046   cat conftest.$ac_ext >&5
23047   # Passes both tests.
23048 ac_preproc_ok=:
23049 break
23050 fi
23051 rm -f conftest.err conftest.$ac_ext
23052
23053 done
23054 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23055 rm -f conftest.err conftest.$ac_ext
23056 if $ac_preproc_ok; then
23057   :
23058 else
23059   { { echo "$as_me:23059: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23060 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23061    { (exit 1); exit 1; }; }
23062 fi
23063
23064 ac_ext=cc
23065 ac_cpp='$CXXCPP $CPPFLAGS'
23066 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23067 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23068 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23069 ac_main_return=return
23070
23071 for ac_header in typeinfo
23072 do
23073 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23074 echo "$as_me:23074: checking for $ac_header" >&5
23075 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23076 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23077   echo $ECHO_N "(cached) $ECHO_C" >&6
23078 else
23079   cat >conftest.$ac_ext <<_ACEOF
23080 #line 23080 "configure"
23081 #include "confdefs.h"
23082 #include <$ac_header>
23083 _ACEOF
23084 if { (eval echo "$as_me:23084: \"$ac_cpp conftest.$ac_ext\"") >&5
23085   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23086   ac_status=$?
23087   egrep -v '^ *\+' conftest.er1 >conftest.err
23088   rm -f conftest.er1
23089   cat conftest.err >&5
23090   echo "$as_me:23090: \$? = $ac_status" >&5
23091   (exit $ac_status); } >/dev/null; then
23092   if test -s conftest.err; then
23093     ac_cpp_err=$ac_cxx_preproc_warn_flag
23094   else
23095     ac_cpp_err=
23096   fi
23097 else
23098   ac_cpp_err=yes
23099 fi
23100 if test -z "$ac_cpp_err"; then
23101   eval "$as_ac_Header=yes"
23102 else
23103   echo "$as_me: failed program was:" >&5
23104   cat conftest.$ac_ext >&5
23105   eval "$as_ac_Header=no"
23106 fi
23107 rm -f conftest.err conftest.$ac_ext
23108 fi
23109 echo "$as_me:23109: result: `eval echo '${'$as_ac_Header'}'`" >&5
23110 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23111 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23112   cat >>confdefs.h <<EOF
23113 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23114 EOF
23115
23116 fi
23117 done
23118
23119 for ac_header in iostream
23120 do
23121 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23122 echo "$as_me:23122: checking for $ac_header" >&5
23123 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23124 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23125   echo $ECHO_N "(cached) $ECHO_C" >&6
23126 else
23127   cat >conftest.$ac_ext <<_ACEOF
23128 #line 23128 "configure"
23129 #include "confdefs.h"
23130 #include <$ac_header>
23131 _ACEOF
23132 if { (eval echo "$as_me:23132: \"$ac_cpp conftest.$ac_ext\"") >&5
23133   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23134   ac_status=$?
23135   egrep -v '^ *\+' conftest.er1 >conftest.err
23136   rm -f conftest.er1
23137   cat conftest.err >&5
23138   echo "$as_me:23138: \$? = $ac_status" >&5
23139   (exit $ac_status); } >/dev/null; then
23140   if test -s conftest.err; then
23141     ac_cpp_err=$ac_cxx_preproc_warn_flag
23142   else
23143     ac_cpp_err=
23144   fi
23145 else
23146   ac_cpp_err=yes
23147 fi
23148 if test -z "$ac_cpp_err"; then
23149   eval "$as_ac_Header=yes"
23150 else
23151   echo "$as_me: failed program was:" >&5
23152   cat conftest.$ac_ext >&5
23153   eval "$as_ac_Header=no"
23154 fi
23155 rm -f conftest.err conftest.$ac_ext
23156 fi
23157 echo "$as_me:23157: result: `eval echo '${'$as_ac_Header'}'`" >&5
23158 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23159 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23160   cat >>confdefs.h <<EOF
23161 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23162 EOF
23163
23164 fi
23165 done
23166
23167 if test x"$ac_cv_header_iostream" = xyes ; then
23168         echo "$as_me:23168: checking if iostream uses std-namespace" >&5
23169 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23170         cat >conftest.$ac_ext <<_ACEOF
23171 #line 23171 "configure"
23172 #include "confdefs.h"
23173
23174 #include <iostream>
23175 using std::endl;
23176 using std::cerr;
23177 int
23178 main (void)
23179 {
23180
23181 cerr << "testing" << endl;
23182
23183   ;
23184   return 0;
23185 }
23186 _ACEOF
23187 rm -f conftest.$ac_objext
23188 if { (eval echo "$as_me:23188: \"$ac_compile\"") >&5
23189   (eval $ac_compile) 2>&5
23190   ac_status=$?
23191   echo "$as_me:23191: \$? = $ac_status" >&5
23192   (exit $ac_status); } &&
23193          { ac_try='test -s conftest.$ac_objext'
23194   { (eval echo "$as_me:23194: \"$ac_try\"") >&5
23195   (eval $ac_try) 2>&5
23196   ac_status=$?
23197   echo "$as_me:23197: \$? = $ac_status" >&5
23198   (exit $ac_status); }; }; then
23199   cf_iostream_namespace=yes
23200 else
23201   echo "$as_me: failed program was:" >&5
23202 cat conftest.$ac_ext >&5
23203 cf_iostream_namespace=no
23204 fi
23205 rm -f conftest.$ac_objext conftest.$ac_ext
23206         echo "$as_me:23206: result: $cf_iostream_namespace" >&5
23207 echo "${ECHO_T}$cf_iostream_namespace" >&6
23208         if test "$cf_iostream_namespace" = yes ; then
23209
23210 cat >>confdefs.h <<\EOF
23211 #define IOSTREAM_NAMESPACE 1
23212 EOF
23213
23214         fi
23215 fi
23216
23217 echo "$as_me:23217: checking if we should include stdbool.h" >&5
23218 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23219
23220 if test "${cf_cv_header_stdbool_h+set}" = set; then
23221   echo $ECHO_N "(cached) $ECHO_C" >&6
23222 else
23223
23224         cat >conftest.$ac_ext <<_ACEOF
23225 #line 23225 "configure"
23226 #include "confdefs.h"
23227
23228 int
23229 main (void)
23230 {
23231 bool foo = false
23232   ;
23233   return 0;
23234 }
23235 _ACEOF
23236 rm -f conftest.$ac_objext
23237 if { (eval echo "$as_me:23237: \"$ac_compile\"") >&5
23238   (eval $ac_compile) 2>&5
23239   ac_status=$?
23240   echo "$as_me:23240: \$? = $ac_status" >&5
23241   (exit $ac_status); } &&
23242          { ac_try='test -s conftest.$ac_objext'
23243   { (eval echo "$as_me:23243: \"$ac_try\"") >&5
23244   (eval $ac_try) 2>&5
23245   ac_status=$?
23246   echo "$as_me:23246: \$? = $ac_status" >&5
23247   (exit $ac_status); }; }; then
23248   cf_cv_header_stdbool_h=0
23249 else
23250   echo "$as_me: failed program was:" >&5
23251 cat conftest.$ac_ext >&5
23252 cat >conftest.$ac_ext <<_ACEOF
23253 #line 23253 "configure"
23254 #include "confdefs.h"
23255
23256 #ifndef __BEOS__
23257 #include <stdbool.h>
23258 #endif
23259
23260 int
23261 main (void)
23262 {
23263 bool foo = false
23264   ;
23265   return 0;
23266 }
23267 _ACEOF
23268 rm -f conftest.$ac_objext
23269 if { (eval echo "$as_me:23269: \"$ac_compile\"") >&5
23270   (eval $ac_compile) 2>&5
23271   ac_status=$?
23272   echo "$as_me:23272: \$? = $ac_status" >&5
23273   (exit $ac_status); } &&
23274          { ac_try='test -s conftest.$ac_objext'
23275   { (eval echo "$as_me:23275: \"$ac_try\"") >&5
23276   (eval $ac_try) 2>&5
23277   ac_status=$?
23278   echo "$as_me:23278: \$? = $ac_status" >&5
23279   (exit $ac_status); }; }; then
23280   cf_cv_header_stdbool_h=1
23281 else
23282   echo "$as_me: failed program was:" >&5
23283 cat conftest.$ac_ext >&5
23284 cf_cv_header_stdbool_h=0
23285 fi
23286 rm -f conftest.$ac_objext conftest.$ac_ext
23287 fi
23288 rm -f conftest.$ac_objext conftest.$ac_ext
23289 fi
23290
23291 if test "$cf_cv_header_stdbool_h" = 1
23292 then    echo "$as_me:23292: result: yes" >&5
23293 echo "${ECHO_T}yes" >&6
23294 else    echo "$as_me:23294: result: no" >&5
23295 echo "${ECHO_T}no" >&6
23296 fi
23297
23298 echo "$as_me:23298: checking for builtin bool type" >&5
23299 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23300
23301 if test "${cf_cv_builtin_bool+set}" = set; then
23302   echo $ECHO_N "(cached) $ECHO_C" >&6
23303 else
23304
23305         cat >conftest.$ac_ext <<_ACEOF
23306 #line 23306 "configure"
23307 #include "confdefs.h"
23308
23309 #include <stdio.h>
23310 #include <sys/types.h>
23311
23312 int
23313 main (void)
23314 {
23315 bool x = false
23316   ;
23317   return 0;
23318 }
23319 _ACEOF
23320 rm -f conftest.$ac_objext
23321 if { (eval echo "$as_me:23321: \"$ac_compile\"") >&5
23322   (eval $ac_compile) 2>&5
23323   ac_status=$?
23324   echo "$as_me:23324: \$? = $ac_status" >&5
23325   (exit $ac_status); } &&
23326          { ac_try='test -s conftest.$ac_objext'
23327   { (eval echo "$as_me:23327: \"$ac_try\"") >&5
23328   (eval $ac_try) 2>&5
23329   ac_status=$?
23330   echo "$as_me:23330: \$? = $ac_status" >&5
23331   (exit $ac_status); }; }; then
23332   cf_cv_builtin_bool=1
23333 else
23334   echo "$as_me: failed program was:" >&5
23335 cat conftest.$ac_ext >&5
23336 cf_cv_builtin_bool=0
23337 fi
23338 rm -f conftest.$ac_objext conftest.$ac_ext
23339
23340 fi
23341
23342 if test "$cf_cv_builtin_bool" = 1
23343 then    echo "$as_me:23343: result: yes" >&5
23344 echo "${ECHO_T}yes" >&6
23345 else    echo "$as_me:23345: result: no" >&5
23346 echo "${ECHO_T}no" >&6
23347 fi
23348
23349 echo "$as_me:23349: checking for size of bool" >&5
23350 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23351 if test "${cf_cv_type_of_bool+set}" = set; then
23352   echo $ECHO_N "(cached) $ECHO_C" >&6
23353 else
23354
23355         rm -f cf_test.out
23356         if test "$cross_compiling" = yes; then
23357   cf_cv_type_of_bool=unknown
23358 else
23359   cat >conftest.$ac_ext <<_ACEOF
23360 #line 23360 "configure"
23361 #include "confdefs.h"
23362
23363 #include <stdlib.h>
23364 #include <stdio.h>
23365
23366 #if defined(__cplusplus)
23367
23368 #ifdef HAVE_GXX_BUILTIN_H
23369 #include <g++/builtin.h>
23370 #elif HAVE_GPP_BUILTIN_H
23371 #include <gpp/builtin.h>
23372 #elif HAVE_BUILTIN_H
23373 #include <builtin.h>
23374 #endif
23375
23376 #else
23377
23378 #if $cf_cv_header_stdbool_h
23379 #include <stdbool.h>
23380 #endif
23381
23382 #endif
23383
23384 int main(void)
23385 {
23386         FILE *fp = fopen("cf_test.out", "w");
23387         if (fp != 0) {
23388                 bool x = true;
23389                 if ((bool)(-x) >= 0)
23390                         fputs("unsigned ", fp);
23391                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23392                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23393                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
23394                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23395                 fclose(fp);
23396         }
23397         ${cf_cv_main_return:-return}(0);
23398 }
23399
23400 _ACEOF
23401 rm -f conftest$ac_exeext
23402 if { (eval echo "$as_me:23402: \"$ac_link\"") >&5
23403   (eval $ac_link) 2>&5
23404   ac_status=$?
23405   echo "$as_me:23405: \$? = $ac_status" >&5
23406   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23407   { (eval echo "$as_me:23407: \"$ac_try\"") >&5
23408   (eval $ac_try) 2>&5
23409   ac_status=$?
23410   echo "$as_me:23410: \$? = $ac_status" >&5
23411   (exit $ac_status); }; }; then
23412   cf_cv_type_of_bool=`cat cf_test.out`
23413                  if test -z "$cf_cv_type_of_bool"; then
23414                    cf_cv_type_of_bool=unknown
23415                  fi
23416 else
23417   echo "$as_me: program exited with status $ac_status" >&5
23418 echo "$as_me: failed program was:" >&5
23419 cat conftest.$ac_ext >&5
23420 cf_cv_type_of_bool=unknown
23421 fi
23422 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23423 fi
23424
23425 fi
23426
23427         rm -f cf_test.out
23428 echo "$as_me:23428: result: $cf_cv_type_of_bool" >&5
23429 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23430 if test "$cf_cv_type_of_bool" = unknown ; then
23431         case .$NCURSES_BOOL in
23432         (.auto|.) NCURSES_BOOL=unsigned;;
23433         esac
23434         { echo "$as_me:23434: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23435 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23436         cf_cv_type_of_bool=$NCURSES_BOOL
23437 fi
23438
23439 echo "$as_me:23439: checking for special defines needed for etip.h" >&5
23440 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
23441 cf_save_CXXFLAGS="$CXXFLAGS"
23442 cf_result="none"
23443
23444 # etip.h includes ncurses.h which includes ncurses_dll.h
23445 # But ncurses_dll.h is generated - fix here.
23446 test -d include || mkdir include
23447 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
23448
23449 for cf_math in "" MATH_H
23450 do
23451 for cf_excp in "" MATH_EXCEPTION
23452 do
23453         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
23454         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
23455         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
23456 cat >conftest.$ac_ext <<_ACEOF
23457 #line 23457 "configure"
23458 #include "confdefs.h"
23459
23460 #include <etip.h.in>
23461
23462 int
23463 main (void)
23464 {
23465
23466   ;
23467   return 0;
23468 }
23469 _ACEOF
23470 rm -f conftest.$ac_objext
23471 if { (eval echo "$as_me:23471: \"$ac_compile\"") >&5
23472   (eval $ac_compile) 2>&5
23473   ac_status=$?
23474   echo "$as_me:23474: \$? = $ac_status" >&5
23475   (exit $ac_status); } &&
23476          { ac_try='test -s conftest.$ac_objext'
23477   { (eval echo "$as_me:23477: \"$ac_try\"") >&5
23478   (eval $ac_try) 2>&5
23479   ac_status=$?
23480   echo "$as_me:23480: \$? = $ac_status" >&5
23481   (exit $ac_status); }; }; then
23482
23483         test -n "$cf_math" && cat >>confdefs.h <<EOF
23484 #define ETIP_NEEDS_${cf_math} 1
23485 EOF
23486
23487         test -n "$cf_excp" && cat >>confdefs.h <<EOF
23488 #define ETIP_NEEDS_${cf_excp} 1
23489 EOF
23490
23491         cf_result="$cf_math $cf_excp"
23492         break 2
23493
23494 else
23495   echo "$as_me: failed program was:" >&5
23496 cat conftest.$ac_ext >&5
23497 fi
23498 rm -f conftest.$ac_objext conftest.$ac_ext
23499 done
23500 done
23501 echo "$as_me:23501: result: $cf_result" >&5
23502 echo "${ECHO_T}$cf_result" >&6
23503 CXXFLAGS="$cf_save_CXXFLAGS"
23504
23505 if test -n "$CXX"; then
23506 echo "$as_me:23506: checking if $CXX accepts parameter initialization" >&5
23507 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
23508 if test "${cf_cv_cpp_param_init+set}" = set; then
23509   echo $ECHO_N "(cached) $ECHO_C" >&6
23510 else
23511
23512         ac_ext=cc
23513 ac_cpp='$CXXCPP $CPPFLAGS'
23514 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23515 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23516 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23517 ac_main_return=return
23518
23519         if test "$cross_compiling" = yes; then
23520   cf_cv_cpp_param_init=unknown
23521 else
23522   cat >conftest.$ac_ext <<_ACEOF
23523 #line 23523 "configure"
23524 #include "confdefs.h"
23525
23526 class TEST {
23527 private:
23528         int value;
23529 public:
23530         TEST(int x = 1);
23531         ~TEST();
23532 };
23533
23534 TEST::TEST(int x = 1)   // some compilers do not like second initializer
23535 {
23536         value = x;
23537 }
23538 int main(void) { }
23539
23540 _ACEOF
23541 rm -f conftest$ac_exeext
23542 if { (eval echo "$as_me:23542: \"$ac_link\"") >&5
23543   (eval $ac_link) 2>&5
23544   ac_status=$?
23545   echo "$as_me:23545: \$? = $ac_status" >&5
23546   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23547   { (eval echo "$as_me:23547: \"$ac_try\"") >&5
23548   (eval $ac_try) 2>&5
23549   ac_status=$?
23550   echo "$as_me:23550: \$? = $ac_status" >&5
23551   (exit $ac_status); }; }; then
23552   cf_cv_cpp_param_init=yes
23553 else
23554   echo "$as_me: program exited with status $ac_status" >&5
23555 echo "$as_me: failed program was:" >&5
23556 cat conftest.$ac_ext >&5
23557 cf_cv_cpp_param_init=no
23558 fi
23559 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23560 fi
23561         ac_ext=cc
23562 ac_cpp='$CXXCPP $CPPFLAGS'
23563 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23564 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23565 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23566 ac_main_return=return
23567
23568 fi
23569 echo "$as_me:23569: result: $cf_cv_cpp_param_init" >&5
23570 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
23571 fi
23572 test "$cf_cv_cpp_param_init" = yes &&
23573 cat >>confdefs.h <<\EOF
23574 #define CPP_HAS_PARAM_INIT 1
23575 EOF
23576
23577 if test -n "$CXX"; then
23578
23579 echo "$as_me:23579: checking if $CXX accepts static_cast" >&5
23580 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
23581 if test "${cf_cv_cpp_static_cast+set}" = set; then
23582   echo $ECHO_N "(cached) $ECHO_C" >&6
23583 else
23584
23585         ac_ext=cc
23586 ac_cpp='$CXXCPP $CPPFLAGS'
23587 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23588 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23589 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23590 ac_main_return=return
23591
23592         cat >conftest.$ac_ext <<_ACEOF
23593 #line 23593 "configure"
23594 #include "confdefs.h"
23595
23596 class NCursesPanel
23597 {
23598 public:
23599   NCursesPanel(int nlines,
23600                int ncols,
23601                int begin_y = 0,
23602                int begin_x = 0)
23603   {
23604   }
23605   NCursesPanel();
23606   ~NCursesPanel();
23607 };
23608
23609 template<class T> class NCursesUserPanel : public NCursesPanel
23610 {
23611 public:
23612   NCursesUserPanel (int nlines,
23613                     int ncols,
23614                     int begin_y = 0,
23615                     int begin_x = 0,
23616                     const T* p_UserData = static_cast<T*>(0))
23617     : NCursesPanel (nlines, ncols, begin_y, begin_x)
23618   {
23619   };
23620   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
23621   {
23622   };
23623
23624   virtual ~NCursesUserPanel() {};
23625 };
23626
23627 int
23628 main (void)
23629 {
23630
23631         const char* p_UserData = static_cast<char*>(0)
23632   ;
23633   return 0;
23634 }
23635 _ACEOF
23636 rm -f conftest.$ac_objext
23637 if { (eval echo "$as_me:23637: \"$ac_compile\"") >&5
23638   (eval $ac_compile) 2>&5
23639   ac_status=$?
23640   echo "$as_me:23640: \$? = $ac_status" >&5
23641   (exit $ac_status); } &&
23642          { ac_try='test -s conftest.$ac_objext'
23643   { (eval echo "$as_me:23643: \"$ac_try\"") >&5
23644   (eval $ac_try) 2>&5
23645   ac_status=$?
23646   echo "$as_me:23646: \$? = $ac_status" >&5
23647   (exit $ac_status); }; }; then
23648   cf_cv_cpp_static_cast=yes
23649 else
23650   echo "$as_me: failed program was:" >&5
23651 cat conftest.$ac_ext >&5
23652 cf_cv_cpp_static_cast=no
23653 fi
23654 rm -f conftest.$ac_objext conftest.$ac_ext
23655
23656         ac_ext=cc
23657 ac_cpp='$CXXCPP $CPPFLAGS'
23658 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23659 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23660 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23661 ac_main_return=return
23662
23663 fi
23664 echo "$as_me:23664: result: $cf_cv_cpp_static_cast" >&5
23665 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
23666
23667 fi
23668
23669 test "$cf_cv_cpp_static_cast" = yes &&
23670 cat >>confdefs.h <<\EOF
23671 #define CPP_HAS_STATIC_CAST 1
23672 EOF
23673
23674         CXX_AR='$(AR)'
23675         CXX_ARFLAGS='$(ARFLAGS)'
23676         case $cf_cv_system_name in
23677         (irix*)
23678             if test "$GXX" != yes ; then
23679                 CXX_AR='$(CXX)'
23680                 CXX_ARFLAGS='-ar -o'
23681             fi
23682             ;;
23683         (sco3.2v5*)
23684             CXXLDFLAGS="-u main"
23685             ;;
23686         (solaris2*)
23687             if test "$GXX" != yes ; then
23688                 CXX_AR='$(CXX)'
23689                 CXX_ARFLAGS='-xar -o'
23690             fi
23691             ;;
23692         esac
23693
23694 else
23695         cf_cxx_library=no
23696         cf_cv_builtin_bool=1
23697
23698         # Just because we are not configuring against C++ right now does not
23699         # mean that a user will not want to use C++.  Some distributors disable
23700         # the C++ portion of this configuration as a shortcut (or just to avoid
23701         # compiling the demo in the c++ directory).  So we need a reasonable
23702         # default for the 'bool' type.
23703         #
23704         # Caveat: since the storage of the bool type is not standardized, it
23705         # may change.
23706
23707         if test "$NCURSES_BOOL" != auto ; then
23708                 cf_cv_type_of_bool=$NCURSES_BOOL
23709                 cf_cv_header_stdbool_h=0
23710         else
23711                 if test "$cf_cv_header_stdbool_h" = 1 ; then
23712
23713 echo "$as_me:23713: checking for size of bool" >&5
23714 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23715 if test "${cf_cv_type_of_bool+set}" = set; then
23716   echo $ECHO_N "(cached) $ECHO_C" >&6
23717 else
23718
23719         rm -f cf_test.out
23720         if test "$cross_compiling" = yes; then
23721   cf_cv_type_of_bool=unknown
23722 else
23723   cat >conftest.$ac_ext <<_ACEOF
23724 #line 23724 "configure"
23725 #include "confdefs.h"
23726
23727 #include <stdlib.h>
23728 #include <stdio.h>
23729
23730 #if defined(__cplusplus)
23731
23732 #ifdef HAVE_GXX_BUILTIN_H
23733 #include <g++/builtin.h>
23734 #elif HAVE_GPP_BUILTIN_H
23735 #include <gpp/builtin.h>
23736 #elif HAVE_BUILTIN_H
23737 #include <builtin.h>
23738 #endif
23739
23740 #else
23741
23742 #if $cf_cv_header_stdbool_h
23743 #include <stdbool.h>
23744 #endif
23745
23746 #endif
23747
23748 int main(void)
23749 {
23750         FILE *fp = fopen("cf_test.out", "w");
23751         if (fp != 0) {
23752                 bool x = true;
23753                 if ((bool)(-x) >= 0)
23754                         fputs("unsigned ", fp);
23755                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23756                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23757                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
23758                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23759                 fclose(fp);
23760         }
23761         ${cf_cv_main_return:-return}(0);
23762 }
23763
23764 _ACEOF
23765 rm -f conftest$ac_exeext
23766 if { (eval echo "$as_me:23766: \"$ac_link\"") >&5
23767   (eval $ac_link) 2>&5
23768   ac_status=$?
23769   echo "$as_me:23769: \$? = $ac_status" >&5
23770   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23771   { (eval echo "$as_me:23771: \"$ac_try\"") >&5
23772   (eval $ac_try) 2>&5
23773   ac_status=$?
23774   echo "$as_me:23774: \$? = $ac_status" >&5
23775   (exit $ac_status); }; }; then
23776   cf_cv_type_of_bool=`cat cf_test.out`
23777                  if test -z "$cf_cv_type_of_bool"; then
23778                    cf_cv_type_of_bool=unknown
23779                  fi
23780 else
23781   echo "$as_me: program exited with status $ac_status" >&5
23782 echo "$as_me: failed program was:" >&5
23783 cat conftest.$ac_ext >&5
23784 cf_cv_type_of_bool=unknown
23785 fi
23786 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23787 fi
23788
23789 fi
23790
23791         rm -f cf_test.out
23792 echo "$as_me:23792: result: $cf_cv_type_of_bool" >&5
23793 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23794 if test "$cf_cv_type_of_bool" = unknown ; then
23795         case .$NCURSES_BOOL in
23796         (.auto|.) NCURSES_BOOL=unsigned;;
23797         esac
23798         { echo "$as_me:23798: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23799 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23800         cf_cv_type_of_bool=$NCURSES_BOOL
23801 fi
23802
23803                 else
23804                         echo "$as_me:23804: checking for fallback type of bool" >&5
23805 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
23806                         case "$host_cpu" in
23807                         (i?86)  cf_cv_type_of_bool=char ;;
23808                         (*)     cf_cv_type_of_bool=int  ;;
23809                         esac
23810                         echo "$as_me:23810: result: $cf_cv_type_of_bool" >&5
23811 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23812                 fi
23813         fi
23814 fi
23815
23816 # If the C compiler did not declare bool, and we did not determine that the C++
23817 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
23818 # ncurses library use the same type as C++ bool.  Note that this allows one to
23819 # specify the type of bool in a configure-script option and postpone
23820 # integration with the C++ compiler provided that the types are compatible.
23821 USE_CXX_BOOL=1
23822 if test $cf_cv_cc_bool_type = 1
23823 then
23824         # oops: C has a bool.  Unlikely, but C++ could differ.
23825         USE_CXX_BOOL=0
23826 elif test $cf_cv_builtin_bool = 0
23827 then
23828         # C++ has no bool
23829         USE_CXX_BOOL=0
23830 else
23831         # this is the normal case
23832         USE_CXX_BOOL='defined(__cplusplus)'
23833 fi
23834
23835 if test -f "${srcdir}/Ada95/Makefile.in" ; then
23836
23837         if test "$cf_with_ada" != "no" ; then
23838                 if test "$with_libtool" != "no"; then
23839                         { echo "$as_me:23839: WARNING: libtool does not support Ada - disabling feature" >&5
23840 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
23841                         cf_with_ada=no
23842                 fi
23843         fi
23844
23845         if test "$cf_with_ada" != "no" ; then
23846
23847 cf_ada_make=gnatmake
23848 cf_ada_config="#"
23849 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
23850 set dummy $cf_ada_make; ac_word=$2
23851 echo "$as_me:23851: checking for $ac_word" >&5
23852 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23853 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
23854   echo $ECHO_N "(cached) $ECHO_C" >&6
23855 else
23856   if test -n "$gnatmake_exists"; then
23857   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
23858 else
23859   ac_save_IFS=$IFS; IFS=$ac_path_separator
23860 ac_dummy="$PATH"
23861 for ac_dir in $ac_dummy; do
23862   IFS=$ac_save_IFS
23863   test -z "$ac_dir" && ac_dir=.
23864   $as_executable_p "$ac_dir/$ac_word" || continue
23865 ac_cv_prog_gnatmake_exists="yes"
23866 echo "$as_me:23866: found $ac_dir/$ac_word" >&5
23867 break
23868 done
23869
23870   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
23871 fi
23872 fi
23873 gnatmake_exists=$ac_cv_prog_gnatmake_exists
23874 if test -n "$gnatmake_exists"; then
23875   echo "$as_me:23875: result: $gnatmake_exists" >&5
23876 echo "${ECHO_T}$gnatmake_exists" >&6
23877 else
23878   echo "$as_me:23878: result: no" >&5
23879 echo "${ECHO_T}no" >&6
23880 fi
23881
23882 if test "$ac_cv_prog_gnatmake_exists" = no; then
23883         cf_ada_make=
23884         cf_cv_prog_gnat_correct=no
23885 else
23886         # Extract the first word of "gprconfig", so it can be a program name with args.
23887 set dummy gprconfig; ac_word=$2
23888 echo "$as_me:23888: checking for $ac_word" >&5
23889 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23890 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
23891   echo $ECHO_N "(cached) $ECHO_C" >&6
23892 else
23893   if test -n "$gprconfig_exists"; then
23894   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
23895 else
23896   ac_save_IFS=$IFS; IFS=$ac_path_separator
23897 ac_dummy="$PATH"
23898 for ac_dir in $ac_dummy; do
23899   IFS=$ac_save_IFS
23900   test -z "$ac_dir" && ac_dir=.
23901   $as_executable_p "$ac_dir/$ac_word" || continue
23902 ac_cv_prog_gprconfig_exists="yes"
23903 echo "$as_me:23903: found $ac_dir/$ac_word" >&5
23904 break
23905 done
23906
23907   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
23908 fi
23909 fi
23910 gprconfig_exists=$ac_cv_prog_gprconfig_exists
23911 if test -n "$gprconfig_exists"; then
23912   echo "$as_me:23912: result: $gprconfig_exists" >&5
23913 echo "${ECHO_T}$gprconfig_exists" >&6
23914 else
23915   echo "$as_me:23915: result: no" >&5
23916 echo "${ECHO_T}no" >&6
23917 fi
23918
23919         if test "$ac_cv_prog_gprconfig_exists" = yes
23920         then
23921                 rm -rf conftest* *~conftest*
23922                 if mkdir conftest.src
23923                 then
23924                         cf_ada_config=""
23925                         cd conftest.src
23926                         for cf_gprconfig in Ada C
23927                         do
23928                                 echo "$as_me:23928: checking for gprconfig name for $cf_gprconfig" >&5
23929 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
23930                                 if test $cf_gprconfig = C
23931                                 then
23932                                         for cf_gprconfig_param in \
23933                                                 $cf_gprconfig,,,,GNATGCC \
23934                                                 $cf_gprconfig,,,,GCC \
23935                                                 $cf_gprconfig
23936                                         do
23937                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23938                                                 test -n "$cf_gprconfig_value" && break
23939                                         done
23940                                 else
23941                                         cf_gprconfig_param=$cf_gprconfig
23942                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23943                                 fi
23944                                 if test -n "$cf_gprconfig_value"
23945                                 then
23946                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
23947                                         echo "$as_me:23947: result: $cf_gprconfig_value" >&5
23948 echo "${ECHO_T}$cf_gprconfig_value" >&6
23949                                 else
23950                                         echo "$as_me:23950: result: missing" >&5
23951 echo "${ECHO_T}missing" >&6
23952                                         cf_ada_config="#"
23953                                         break
23954                                 fi
23955                         done
23956                         cd ..
23957                         rm -rf conftest* *~conftest*
23958                 fi
23959         else
23960                 # gprconfig is newer than gnatmake; we can continue...
23961                 cf_ada_config="##"
23962         fi
23963         if test "x$cf_ada_config" != "x#"
23964         then
23965
23966 echo "$as_me:23966: checking for gnat version" >&5
23967 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
23968 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
23969         grep '[0-9].[0-9][0-9]*' |\
23970         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
23971 echo "$as_me:23971: result: $cf_gnat_version" >&5
23972 echo "${ECHO_T}$cf_gnat_version" >&6
23973
23974 case $cf_gnat_version in
23975 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
23976         cf_cv_prog_gnat_correct=yes
23977         ;;
23978 (*)
23979         { echo "$as_me:23979: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
23980 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
23981         cf_cv_prog_gnat_correct=no
23982         ;;
23983 esac
23984
23985                 # Extract the first word of "m4", so it can be a program name with args.
23986 set dummy m4; ac_word=$2
23987 echo "$as_me:23987: checking for $ac_word" >&5
23988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23989 if test "${ac_cv_prog_M4_exists+set}" = set; then
23990   echo $ECHO_N "(cached) $ECHO_C" >&6
23991 else
23992   if test -n "$M4_exists"; then
23993   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
23994 else
23995   ac_save_IFS=$IFS; IFS=$ac_path_separator
23996 ac_dummy="$PATH"
23997 for ac_dir in $ac_dummy; do
23998   IFS=$ac_save_IFS
23999   test -z "$ac_dir" && ac_dir=.
24000   $as_executable_p "$ac_dir/$ac_word" || continue
24001 ac_cv_prog_M4_exists="yes"
24002 echo "$as_me:24002: found $ac_dir/$ac_word" >&5
24003 break
24004 done
24005
24006   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24007 fi
24008 fi
24009 M4_exists=$ac_cv_prog_M4_exists
24010 if test -n "$M4_exists"; then
24011   echo "$as_me:24011: result: $M4_exists" >&5
24012 echo "${ECHO_T}$M4_exists" >&6
24013 else
24014   echo "$as_me:24014: result: no" >&5
24015 echo "${ECHO_T}no" >&6
24016 fi
24017
24018                 if test "$ac_cv_prog_M4_exists" = no; then
24019                         cf_cv_prog_gnat_correct=no
24020                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
24021                 fi
24022                 if test "$cf_cv_prog_gnat_correct" = yes; then
24023                         echo "$as_me:24023: checking if GNAT works" >&5
24024 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24025
24026 rm -rf conftest* *~conftest*
24027 cat >>conftest.ads <<CF_EOF
24028 procedure conftest;
24029 CF_EOF
24030 cat >>conftest.adb <<CF_EOF
24031 with Text_IO;
24032 with GNAT.OS_Lib;
24033 procedure conftest is
24034 begin
24035    Text_IO.Put ("Hello World");
24036    Text_IO.New_Line;
24037    GNAT.OS_Lib.OS_Exit (0);
24038 end conftest;
24039 CF_EOF
24040 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24041    if ( ./conftest 1>&5 2>&1 ) ; then
24042       cf_cv_prog_gnat_correct=yes
24043    else
24044       cf_cv_prog_gnat_correct=no
24045    fi
24046 else
24047    cf_cv_prog_gnat_correct=no
24048 fi
24049 rm -rf conftest* *~conftest*
24050
24051                         echo "$as_me:24051: result: $cf_cv_prog_gnat_correct" >&5
24052 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24053                 fi
24054         else
24055                 cf_cv_prog_gnat_correct=no
24056         fi
24057 fi
24058
24059                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24060
24061         ADAFLAGS="$ADAFLAGS -gnatpn"
24062
24063         echo "$as_me:24063: checking optimization options for ADAFLAGS" >&5
24064 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24065         case "$CFLAGS" in
24066         (*-g*)
24067
24068         ADAFLAGS="$ADAFLAGS -g"
24069
24070                 ;;
24071         esac
24072         case "$CFLAGS" in
24073         (*-O*)
24074                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24075
24076         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24077
24078                 ;;
24079         esac
24080         echo "$as_me:24080: result: $ADAFLAGS" >&5
24081 echo "${ECHO_T}$ADAFLAGS" >&6
24082
24083 echo "$as_me:24083: checking if GNATPREP supports -T option" >&5
24084 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24085 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24086   echo $ECHO_N "(cached) $ECHO_C" >&6
24087 else
24088
24089 cf_cv_gnatprep_opt_t=no
24090 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24091
24092 fi
24093 echo "$as_me:24093: result: $cf_cv_gnatprep_opt_t" >&5
24094 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24095 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24096
24097 echo "$as_me:24097: checking if GNAT supports generics" >&5
24098 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24099 case $cf_gnat_version in
24100 (3.[1-9]*|[4-9].*)
24101         cf_gnat_generics=yes
24102         ;;
24103 (*)
24104         cf_gnat_generics=no
24105         ;;
24106 esac
24107 echo "$as_me:24107: result: $cf_gnat_generics" >&5
24108 echo "${ECHO_T}$cf_gnat_generics" >&6
24109
24110 if test "$cf_gnat_generics" = yes
24111 then
24112         cf_compile_generics=generics
24113         cf_generic_objects="\${GENOBJS}"
24114 else
24115         cf_compile_generics=
24116         cf_generic_objects=
24117 fi
24118
24119 echo "$as_me:24119: checking if GNAT supports SIGINT" >&5
24120 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24121 if test "${cf_cv_gnat_sigint+set}" = set; then
24122   echo $ECHO_N "(cached) $ECHO_C" >&6
24123 else
24124
24125 rm -rf conftest* *~conftest*
24126 cat >>conftest.ads <<CF_EOF
24127 with Ada.Interrupts.Names;
24128
24129 package ConfTest is
24130
24131    pragma Warnings (Off);  --  the next pragma exists since 3.11p
24132    pragma Unreserve_All_Interrupts;
24133    pragma Warnings (On);
24134
24135    protected Process is
24136       procedure Stop;
24137       function Continue return Boolean;
24138       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24139    private
24140       Done : Boolean := False;
24141    end Process;
24142
24143 end ConfTest;
24144 CF_EOF
24145 cat >>conftest.adb <<CF_EOF
24146 package body ConfTest is
24147    protected body Process is
24148       procedure Stop is
24149       begin
24150          Done := True;
24151       end Stop;
24152       function Continue return Boolean is
24153       begin
24154          return not Done;
24155       end Continue;
24156    end Process;
24157 end ConfTest;
24158 CF_EOF
24159 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24160       cf_cv_gnat_sigint=yes
24161 else
24162    cf_cv_gnat_sigint=no
24163 fi
24164 rm -rf conftest* *~conftest*
24165
24166 fi
24167 echo "$as_me:24167: result: $cf_cv_gnat_sigint" >&5
24168 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24169
24170 if test $cf_cv_gnat_sigint = yes ; then
24171         USE_GNAT_SIGINT=""
24172 else
24173         USE_GNAT_SIGINT="#"
24174 fi
24175
24176 cf_gnat_libraries=no
24177 cf_gnat_projects=no
24178
24179 if test "$enable_gnat_projects" != no ; then
24180 echo "$as_me:24180: checking if GNAT supports project files" >&5
24181 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24182 case $cf_gnat_version in
24183 (3.[0-9]*)
24184         ;;
24185 (*)
24186         case $cf_cv_system_name in
24187         (cygwin*|msys*)
24188                 ;;
24189         (*)
24190                 rm -rf conftest* *~conftest*
24191                 if mkdir conftest.src conftest.bin conftest.lib
24192                 then
24193                         cd conftest.src
24194                         rm -rf conftest* *~conftest*
24195                         cat >>library.gpr <<CF_EOF
24196 project Library is
24197   Kind := External ("LIB_KIND");
24198   for Library_Name use "ConfTest";
24199   for Object_Dir use ".";
24200   for Library_ALI_Dir use External("LIBRARY_DIR");
24201   for Library_Version use External ("SONAME");
24202   for Library_Kind use Kind;
24203   for Library_Dir use External("BUILD_DIR");
24204   Source_Dir := External ("SOURCE_DIR");
24205   for Source_Dirs use (Source_Dir);
24206 end Library;
24207 CF_EOF
24208                         cat >>confpackage.ads <<CF_EOF
24209 package ConfPackage is
24210    procedure conftest;
24211 end ConfPackage;
24212 CF_EOF
24213                         cat >>confpackage.adb <<CF_EOF
24214 with Text_IO;
24215 package body ConfPackage is
24216    procedure conftest is
24217    begin
24218       Text_IO.Put ("Hello World");
24219       Text_IO.New_Line;
24220    end conftest;
24221 end ConfPackage;
24222 CF_EOF
24223                         if ( $cf_ada_make $ADAFLAGS \
24224                                         -Plibrary.gpr \
24225                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
24226                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
24227                                         -XSOURCE_DIR=`pwd` \
24228                                         -XSONAME=libConfTest.so.1 \
24229                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
24230                                 cf_gnat_projects=yes
24231                         fi
24232                         cd ..
24233                 fi
24234                 if test -f conftest.lib/confpackage.ali
24235                 then
24236                         cf_gnat_libraries=yes
24237                 fi
24238                 rm -rf conftest* *~conftest*
24239                 ;;
24240         esac
24241         ;;
24242 esac
24243 echo "$as_me:24243: result: $cf_gnat_projects" >&5
24244 echo "${ECHO_T}$cf_gnat_projects" >&6
24245 fi # enable_gnat_projects
24246
24247 if test $cf_gnat_projects = yes
24248 then
24249         echo "$as_me:24249: checking if GNAT supports libraries" >&5
24250 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
24251         echo "$as_me:24251: result: $cf_gnat_libraries" >&5
24252 echo "${ECHO_T}$cf_gnat_libraries" >&6
24253 fi
24254
24255 if test "$cf_gnat_projects" = yes
24256 then
24257         USE_OLD_MAKERULES="#"
24258         USE_GNAT_PROJECTS=""
24259 else
24260         USE_OLD_MAKERULES=""
24261         USE_GNAT_PROJECTS="#"
24262 fi
24263
24264 if test "$cf_gnat_libraries" = yes
24265 then
24266         USE_GNAT_LIBRARIES=""
24267 else
24268         USE_GNAT_LIBRARIES="#"
24269 fi
24270
24271 echo "$as_me:24271: checking for ada-compiler" >&5
24272 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
24273
24274 # Check whether --with-ada-compiler or --without-ada-compiler was given.
24275 if test "${with_ada_compiler+set}" = set; then
24276   withval="$with_ada_compiler"
24277   cf_ada_compiler=$withval
24278 else
24279   cf_ada_compiler=gnatmake
24280 fi;
24281
24282 echo "$as_me:24282: result: $cf_ada_compiler" >&5
24283 echo "${ECHO_T}$cf_ada_compiler" >&6
24284
24285                         cf_ada_package=terminal_interface
24286
24287 echo "$as_me:24287: checking for ada-include" >&5
24288 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
24289
24290 # Check whether --with-ada-include or --without-ada-include was given.
24291 if test "${with_ada_include+set}" = set; then
24292   withval="$with_ada_include"
24293
24294 else
24295   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
24296 fi; if test -n "$prefix/share/ada/adainclude" ; then
24297
24298 if test "x$prefix" != xNONE; then
24299         cf_path_syntax="$prefix"
24300 else
24301         cf_path_syntax="$ac_default_prefix"
24302 fi
24303
24304 case ".$withval" in
24305 (.\$\(*\)*|.\'*\'*)
24306         ;;
24307 (..|./*|.\\*)
24308         ;;
24309 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24310         ;;
24311 (.\${*prefix}*|.\${*dir}*)
24312         eval withval="$withval"
24313         case ".$withval" in
24314         (.NONE/*)
24315                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24316                 ;;
24317         esac
24318         ;;
24319 (.no|.NONE/*)
24320         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24321         ;;
24322 (*)
24323         { { echo "$as_me:24323: error: expected a pathname, not \"$withval\"" >&5
24324 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24325    { (exit 1); exit 1; }; }
24326         ;;
24327 esac
24328
24329 fi
24330 eval ADA_INCLUDE="$withval"
24331
24332 echo "$as_me:24332: result: $ADA_INCLUDE" >&5
24333 echo "${ECHO_T}$ADA_INCLUDE" >&6
24334
24335 echo "$as_me:24335: checking for ada-objects" >&5
24336 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
24337
24338 # Check whether --with-ada-objects or --without-ada-objects was given.
24339 if test "${with_ada_objects+set}" = set; then
24340   withval="$with_ada_objects"
24341
24342 else
24343   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
24344 fi; if test -n "$prefix/lib/ada/adalib" ; then
24345
24346 if test "x$prefix" != xNONE; then
24347         cf_path_syntax="$prefix"
24348 else
24349         cf_path_syntax="$ac_default_prefix"
24350 fi
24351
24352 case ".$withval" in
24353 (.\$\(*\)*|.\'*\'*)
24354         ;;
24355 (..|./*|.\\*)
24356         ;;
24357 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24358         ;;
24359 (.\${*prefix}*|.\${*dir}*)
24360         eval withval="$withval"
24361         case ".$withval" in
24362         (.NONE/*)
24363                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24364                 ;;
24365         esac
24366         ;;
24367 (.no|.NONE/*)
24368         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24369         ;;
24370 (*)
24371         { { echo "$as_me:24371: error: expected a pathname, not \"$withval\"" >&5
24372 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24373    { (exit 1); exit 1; }; }
24374         ;;
24375 esac
24376
24377 fi
24378 eval ADA_OBJECTS="$withval"
24379
24380 echo "$as_me:24380: result: $ADA_OBJECTS" >&5
24381 echo "${ECHO_T}$ADA_OBJECTS" >&6
24382
24383 echo "$as_me:24383: checking if an Ada95 shared-library should be built" >&5
24384 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
24385
24386 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
24387 if test "${with_ada_sharedlib+set}" = set; then
24388   withval="$with_ada_sharedlib"
24389   with_ada_sharedlib=$withval
24390 else
24391   with_ada_sharedlib=no
24392 fi;
24393 echo "$as_me:24393: result: $with_ada_sharedlib" >&5
24394 echo "${ECHO_T}$with_ada_sharedlib" >&6
24395
24396 if test "x$with_ada_sharedlib" != xno
24397 then
24398         if test "x$cf_gnat_projects" != xyes
24399         then
24400                 { echo "$as_me:24400: WARNING: disabling shared-library since GNAT projects are not supported" >&5
24401 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
24402                 with_ada_sharedlib=no
24403         fi
24404 fi
24405
24406 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
24407 MAKE_ADA_SHAREDLIB="#"
24408
24409 if test "x$with_ada_sharedlib" != xno
24410 then
24411         MAKE_ADA_SHAREDLIB=
24412         if test "x$with_ada_sharedlib" != xyes
24413         then
24414                 ADA_SHAREDLIB="$with_ada_sharedlib"
24415         fi
24416 fi
24417
24418                 fi
24419         fi
24420 else
24421         cf_with_ada=no
24422 fi
24423
24424 # do this "late" to avoid conflict with header-checks
24425 if test "x$with_widec" = xyes ; then
24426         echo "$as_me:24426: checking for wchar_t" >&5
24427 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
24428 if test "${ac_cv_type_wchar_t+set}" = set; then
24429   echo $ECHO_N "(cached) $ECHO_C" >&6
24430 else
24431   cat >conftest.$ac_ext <<_ACEOF
24432 #line 24432 "configure"
24433 #include "confdefs.h"
24434 $ac_includes_default
24435 int
24436 main (void)
24437 {
24438 if ((wchar_t *) 0)
24439   return 0;
24440 if (sizeof (wchar_t))
24441   return 0;
24442   ;
24443   return 0;
24444 }
24445 _ACEOF
24446 rm -f conftest.$ac_objext
24447 if { (eval echo "$as_me:24447: \"$ac_compile\"") >&5
24448   (eval $ac_compile) 2>&5
24449   ac_status=$?
24450   echo "$as_me:24450: \$? = $ac_status" >&5
24451   (exit $ac_status); } &&
24452          { ac_try='test -s conftest.$ac_objext'
24453   { (eval echo "$as_me:24453: \"$ac_try\"") >&5
24454   (eval $ac_try) 2>&5
24455   ac_status=$?
24456   echo "$as_me:24456: \$? = $ac_status" >&5
24457   (exit $ac_status); }; }; then
24458   ac_cv_type_wchar_t=yes
24459 else
24460   echo "$as_me: failed program was:" >&5
24461 cat conftest.$ac_ext >&5
24462 ac_cv_type_wchar_t=no
24463 fi
24464 rm -f conftest.$ac_objext conftest.$ac_ext
24465 fi
24466 echo "$as_me:24466: result: $ac_cv_type_wchar_t" >&5
24467 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
24468
24469 echo "$as_me:24469: checking size of wchar_t" >&5
24470 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
24471 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
24472   echo $ECHO_N "(cached) $ECHO_C" >&6
24473 else
24474   if test "$ac_cv_type_wchar_t" = yes; then
24475   if test "$cross_compiling" = yes; then
24476   # Depending upon the size, compute the lo and hi bounds.
24477 cat >conftest.$ac_ext <<_ACEOF
24478 #line 24478 "configure"
24479 #include "confdefs.h"
24480 $ac_includes_default
24481 int
24482 main (void)
24483 {
24484 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
24485   ;
24486   return 0;
24487 }
24488 _ACEOF
24489 rm -f conftest.$ac_objext
24490 if { (eval echo "$as_me:24490: \"$ac_compile\"") >&5
24491   (eval $ac_compile) 2>&5
24492   ac_status=$?
24493   echo "$as_me:24493: \$? = $ac_status" >&5
24494   (exit $ac_status); } &&
24495          { ac_try='test -s conftest.$ac_objext'
24496   { (eval echo "$as_me:24496: \"$ac_try\"") >&5
24497   (eval $ac_try) 2>&5
24498   ac_status=$?
24499   echo "$as_me:24499: \$? = $ac_status" >&5
24500   (exit $ac_status); }; }; then
24501   ac_lo=0 ac_mid=0
24502   while :; do
24503     cat >conftest.$ac_ext <<_ACEOF
24504 #line 24504 "configure"
24505 #include "confdefs.h"
24506 $ac_includes_default
24507 int
24508 main (void)
24509 {
24510 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24511   ;
24512   return 0;
24513 }
24514 _ACEOF
24515 rm -f conftest.$ac_objext
24516 if { (eval echo "$as_me:24516: \"$ac_compile\"") >&5
24517   (eval $ac_compile) 2>&5
24518   ac_status=$?
24519   echo "$as_me:24519: \$? = $ac_status" >&5
24520   (exit $ac_status); } &&
24521          { ac_try='test -s conftest.$ac_objext'
24522   { (eval echo "$as_me:24522: \"$ac_try\"") >&5
24523   (eval $ac_try) 2>&5
24524   ac_status=$?
24525   echo "$as_me:24525: \$? = $ac_status" >&5
24526   (exit $ac_status); }; }; then
24527   ac_hi=$ac_mid; break
24528 else
24529   echo "$as_me: failed program was:" >&5
24530 cat conftest.$ac_ext >&5
24531 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
24532 fi
24533 rm -f conftest.$ac_objext conftest.$ac_ext
24534   done
24535 else
24536   echo "$as_me: failed program was:" >&5
24537 cat conftest.$ac_ext >&5
24538 ac_hi=-1 ac_mid=-1
24539   while :; do
24540     cat >conftest.$ac_ext <<_ACEOF
24541 #line 24541 "configure"
24542 #include "confdefs.h"
24543 $ac_includes_default
24544 int
24545 main (void)
24546 {
24547 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
24548   ;
24549   return 0;
24550 }
24551 _ACEOF
24552 rm -f conftest.$ac_objext
24553 if { (eval echo "$as_me:24553: \"$ac_compile\"") >&5
24554   (eval $ac_compile) 2>&5
24555   ac_status=$?
24556   echo "$as_me:24556: \$? = $ac_status" >&5
24557   (exit $ac_status); } &&
24558          { ac_try='test -s conftest.$ac_objext'
24559   { (eval echo "$as_me:24559: \"$ac_try\"") >&5
24560   (eval $ac_try) 2>&5
24561   ac_status=$?
24562   echo "$as_me:24562: \$? = $ac_status" >&5
24563   (exit $ac_status); }; }; then
24564   ac_lo=$ac_mid; break
24565 else
24566   echo "$as_me: failed program was:" >&5
24567 cat conftest.$ac_ext >&5
24568 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
24569 fi
24570 rm -f conftest.$ac_objext conftest.$ac_ext
24571   done
24572 fi
24573 rm -f conftest.$ac_objext conftest.$ac_ext
24574 # Binary search between lo and hi bounds.
24575 while test "x$ac_lo" != "x$ac_hi"; do
24576   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24577   cat >conftest.$ac_ext <<_ACEOF
24578 #line 24578 "configure"
24579 #include "confdefs.h"
24580 $ac_includes_default
24581 int
24582 main (void)
24583 {
24584 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24585   ;
24586   return 0;
24587 }
24588 _ACEOF
24589 rm -f conftest.$ac_objext
24590 if { (eval echo "$as_me:24590: \"$ac_compile\"") >&5
24591   (eval $ac_compile) 2>&5
24592   ac_status=$?
24593   echo "$as_me:24593: \$? = $ac_status" >&5
24594   (exit $ac_status); } &&
24595          { ac_try='test -s conftest.$ac_objext'
24596   { (eval echo "$as_me:24596: \"$ac_try\"") >&5
24597   (eval $ac_try) 2>&5
24598   ac_status=$?
24599   echo "$as_me:24599: \$? = $ac_status" >&5
24600   (exit $ac_status); }; }; then
24601   ac_hi=$ac_mid
24602 else
24603   echo "$as_me: failed program was:" >&5
24604 cat conftest.$ac_ext >&5
24605 ac_lo=`expr $ac_mid + 1`
24606 fi
24607 rm -f conftest.$ac_objext conftest.$ac_ext
24608 done
24609 ac_cv_sizeof_wchar_t=$ac_lo
24610 else
24611   if test "$cross_compiling" = yes; then
24612   { { echo "$as_me:24612: error: cannot run test program while cross compiling" >&5
24613 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
24614    { (exit 1); exit 1; }; }
24615 else
24616   cat >conftest.$ac_ext <<_ACEOF
24617 #line 24617 "configure"
24618 #include "confdefs.h"
24619 $ac_includes_default
24620 int
24621 main (void)
24622 {
24623 FILE *f = fopen ("conftest.val", "w");
24624 if (!f)
24625   $ac_main_return (1);
24626 fprintf (f, "%d", (sizeof (wchar_t)));
24627 fclose (f);
24628   ;
24629   return 0;
24630 }
24631 _ACEOF
24632 rm -f conftest$ac_exeext
24633 if { (eval echo "$as_me:24633: \"$ac_link\"") >&5
24634   (eval $ac_link) 2>&5
24635   ac_status=$?
24636   echo "$as_me:24636: \$? = $ac_status" >&5
24637   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24638   { (eval echo "$as_me:24638: \"$ac_try\"") >&5
24639   (eval $ac_try) 2>&5
24640   ac_status=$?
24641   echo "$as_me:24641: \$? = $ac_status" >&5
24642   (exit $ac_status); }; }; then
24643   ac_cv_sizeof_wchar_t=`cat conftest.val`
24644 else
24645   echo "$as_me: program exited with status $ac_status" >&5
24646 echo "$as_me: failed program was:" >&5
24647 cat conftest.$ac_ext >&5
24648 fi
24649 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24650 fi
24651 fi
24652 rm -f conftest.val
24653 else
24654   ac_cv_sizeof_wchar_t=0
24655 fi
24656 fi
24657 echo "$as_me:24657: result: $ac_cv_sizeof_wchar_t" >&5
24658 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
24659 cat >>confdefs.h <<EOF
24660 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
24661 EOF
24662
24663 fi
24664
24665 ### Construct the ncurses library-subsets, if any, from this set of keywords:
24666 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
24667 ###
24668 ### ticlib modules may be a separate library, otherwise contained in termlib.
24669 ### termlib modules may be a separate library, otherwise contained in ncurses.
24670 ###
24671 ### The of "+" or " " between the tokens controls the way the script
24672 ### chooses to split module lists into libraries.
24673 ###
24674 ### (see CF_LIB_RULES).
24675 echo "$as_me:24675: checking for library subsets" >&5
24676 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
24677 LIB_SUBSETS=
24678
24679 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
24680         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
24681         if test "$with_ticlib" != no ; then
24682                 LIB_SUBSETS="${LIB_SUBSETS} "
24683         else
24684                 LIB_SUBSETS="${LIB_SUBSETS}+"
24685         fi
24686 fi
24687
24688 LIB_SUBSETS="${LIB_SUBSETS}termlib"
24689 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
24690
24691 if test "$with_termlib" != no ; then
24692         LIB_SUBSETS="${LIB_SUBSETS} "
24693 else
24694         LIB_SUBSETS="${LIB_SUBSETS}+"
24695 fi
24696
24697 LIB_SUBSETS="${LIB_SUBSETS}base"
24698
24699 # Most term-driver calls are to tinfo, but some like init_pair are to the
24700 # base library (so it resides in base).
24701 if test "$with_term_driver" != no ; then
24702         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
24703         case $cf_cv_system_name in
24704         (*mingw32*|*mingw64*)
24705                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
24706                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
24707                 ;;
24708         (*)
24709                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
24710                 ;;
24711         esac
24712 fi
24713
24714 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
24715 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
24716
24717 echo "$as_me:24717: result: $LIB_SUBSETS" >&5
24718 echo "${ECHO_T}$LIB_SUBSETS" >&6
24719
24720 ### Construct the list of include-directories to be generated
24721
24722 if test "$srcdir" != "."; then
24723         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
24724 fi
24725 CPPFLAGS="-I../include $CPPFLAGS"
24726 if test "$srcdir" != "."; then
24727         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
24728 fi
24729 CPPFLAGS="-I. $CPPFLAGS"
24730
24731 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
24732 if test "$srcdir" != "."; then
24733         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
24734 fi
24735 if test "$GCC" != yes; then
24736         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
24737 elif test "$includedir" != "/usr/include"; then
24738         if test "$includedir" = '${prefix}/include' ; then
24739                 if test x$prefix != x/usr ; then
24740                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
24741                 fi
24742         else
24743                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
24744         fi
24745 fi
24746
24747 ### Build up pieces for makefile rules
24748 echo "$as_me:24748: checking default library suffix" >&5
24749 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
24750
24751         case $DFT_LWR_MODEL in
24752         (libtool) DFT_ARG_SUFFIX=''   ;;
24753         (normal)  DFT_ARG_SUFFIX=''   ;;
24754         (debug)   DFT_ARG_SUFFIX='_g' ;;
24755         (profile) DFT_ARG_SUFFIX='_p' ;;
24756         (shared)  DFT_ARG_SUFFIX=''   ;;
24757         esac
24758         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
24759 echo "$as_me:24759: result: $DFT_ARG_SUFFIX" >&5
24760 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
24761
24762 echo "$as_me:24762: checking default library-dependency suffix" >&5
24763 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
24764
24765         case X$DFT_LWR_MODEL in
24766         (Xlibtool)
24767                 DFT_LIB_SUFFIX='.la'
24768                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24769                 ;;
24770         (Xdebug)
24771                 DFT_LIB_SUFFIX='_g.a'
24772                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24773                 ;;
24774         (Xprofile)
24775                 DFT_LIB_SUFFIX='_p.a'
24776                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24777                 ;;
24778         (Xshared)
24779                 case $cf_cv_system_name in
24780                 (aix[5-7]*)
24781                         DFT_LIB_SUFFIX='.so'
24782                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24783                         ;;
24784                 (cygwin*|msys*|mingw*)
24785                         DFT_LIB_SUFFIX='.dll'
24786                         DFT_DEP_SUFFIX='.dll.a'
24787                         ;;
24788                 (darwin*)
24789                         DFT_LIB_SUFFIX='.dylib'
24790                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24791                         ;;
24792                 (hpux*)
24793                         case $target in
24794                         (ia64*)
24795                                 DFT_LIB_SUFFIX='.so'
24796                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24797                                 ;;
24798                         (*)
24799                                 DFT_LIB_SUFFIX='.sl'
24800                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24801                                 ;;
24802                         esac
24803                         ;;
24804                 (*)
24805                         DFT_LIB_SUFFIX='.so'
24806                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24807                         ;;
24808                 esac
24809                 ;;
24810         (*)
24811                 DFT_LIB_SUFFIX='.a'
24812                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24813                 ;;
24814         esac
24815         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24816         then
24817                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
24818                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
24819         fi
24820 echo "$as_me:24820: result: $DFT_DEP_SUFFIX" >&5
24821 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
24822
24823 echo "$as_me:24823: checking default object directory" >&5
24824 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
24825
24826         case $DFT_LWR_MODEL in
24827         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
24828         (normal)  DFT_OBJ_SUBDIR='objects' ;;
24829         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
24830         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
24831         (shared)
24832                 case $cf_cv_system_name in
24833                 (cygwin|msys)
24834                         DFT_OBJ_SUBDIR='objects' ;;
24835                 (*)
24836                         DFT_OBJ_SUBDIR='obj_s' ;;
24837                 esac
24838         esac
24839 echo "$as_me:24839: result: $DFT_OBJ_SUBDIR" >&5
24840 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
24841
24842 if test "x$cf_with_cxx" = xyes ; then
24843 echo "$as_me:24843: checking c++ library-dependency suffix" >&5
24844 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
24845 if test "$with_libtool" != "no"; then
24846         # libtool thinks it can make c++ shared libraries (perhaps only g++)
24847         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
24848 elif test "$with_shared_cxx" != "no"; then
24849         # also for g++ users...
24850         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
24851 else
24852         # we normally make a static library because C/C++ library rules differ
24853
24854         case Xnormal in
24855         (Xlibtool)
24856                 CXX_LIB_SUFFIX='.la'
24857                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24858                 ;;
24859         (Xdebug)
24860                 CXX_LIB_SUFFIX='_g.a'
24861                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24862                 ;;
24863         (Xprofile)
24864                 CXX_LIB_SUFFIX='_p.a'
24865                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24866                 ;;
24867         (Xshared)
24868                 case $cf_cv_system_name in
24869                 (aix[5-7]*)
24870                         CXX_LIB_SUFFIX='.so'
24871                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24872                         ;;
24873                 (cygwin*|msys*|mingw*)
24874                         CXX_LIB_SUFFIX='.dll'
24875                         CXX_DEP_SUFFIX='.dll.a'
24876                         ;;
24877                 (darwin*)
24878                         CXX_LIB_SUFFIX='.dylib'
24879                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24880                         ;;
24881                 (hpux*)
24882                         case $target in
24883                         (ia64*)
24884                                 CXX_LIB_SUFFIX='.so'
24885                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24886                                 ;;
24887                         (*)
24888                                 CXX_LIB_SUFFIX='.sl'
24889                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24890                                 ;;
24891                         esac
24892                         ;;
24893                 (*)
24894                         CXX_LIB_SUFFIX='.so'
24895                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24896                         ;;
24897                 esac
24898                 ;;
24899         (*)
24900                 CXX_LIB_SUFFIX='.a'
24901                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24902                 ;;
24903         esac
24904         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24905         then
24906                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
24907                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
24908         fi
24909
24910 fi
24911 echo "$as_me:24911: result: $CXX_LIB_SUFFIX" >&5
24912 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
24913
24914 fi
24915
24916 # do not want -ldl in build except as needed for -lncurses dependency
24917 if test "x$with_dlsym" = xyes ; then
24918 if test $DFT_LWR_MODEL = shared || \
24919    test $DFT_LWR_MODEL = libtool ; then
24920
24921 # remove dl library from $LIBS
24922 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
24923
24924 fi
24925 fi
24926 ### Set up low-level terminfo dependencies for makefiles.
24927
24928 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
24929 # do not need libdl
24930 TICS_LIST=
24931 if test "x$with_dlsym" = xyes ; then
24932
24933 # remove dl library from $SHLIB_LIST
24934 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
24935
24936 fi
24937
24938 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
24939 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
24940 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
24941 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
24942 then
24943         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
24944 fi
24945
24946 if test "$with_ticlib" != no ; then
24947
24948         if test "x$with_ticlib" != xyes ; then
24949                 TICS_NAME=$with_ticlib
24950                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24951                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24952                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24953                 TICS_LIB_SUFFIX="${with_ticlib}"
24954         else
24955                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
24956                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
24957                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
24958                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
24959         fi
24960         TICS_LDFLAGS="-L${LIB_DIR}"
24961         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
24962 else
24963         TICS_SUFFIX=${DFT_LIB_SUFFIX}
24964         TICS_LDFLAGS="-L${LIB_DIR}"
24965         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24966 fi
24967
24968 if test "$with_termlib" != no ; then
24969
24970         if test "x$with_termlib" != xyes ; then
24971                 TINFO_NAME=$with_termlib
24972                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24973                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24974                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24975                 TINFO_LIB_SUFFIX="${with_termlib}"
24976         else
24977                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24978                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
24979                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
24980                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
24981         fi
24982
24983         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24984         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24985         if test "$DFT_LWR_MODEL" = "libtool"; then
24986                 TEST_ARGS="${TEST_DEPS}"
24987                 TEST_ARG2="${TEST_DEP2}"
24988                 TINFO_LDFLAGS="-L${LIB_DIR}"
24989                 TINFO_LIBS="$TEST_ARGS"
24990                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
24991                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
24992         else
24993                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
24994                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
24995                 if test "x$with_term_driver" != xno ; then
24996                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24997                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
24998                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24999                 else
25000                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25001                         TINFO_LIBS="$TEST_ARGS"
25002                 fi
25003                 TINFO_LDFLAGS="-L${LIB_DIR}"
25004                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25005         fi
25006 else
25007         # the next lines are needed for linking libtic over libncurses
25008         TINFO_NAME=${LIB_NAME}
25009         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25010         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25011         if test "x$with_tic_depends" = xyes ; then
25012                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25013         else
25014                 TICS_LIST="$SHLIB_LIST"
25015         fi
25016
25017         TINFO_LDFLAGS="-L${LIB_DIR}"
25018         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25019 fi
25020
25021 if test "$DFT_LWR_MODEL" = shared ; then
25022         case $cf_cv_system_name in
25023         (cygwin*|msys*)
25024                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25025                 TINFO_SUFFIX=.dll
25026                 ;;
25027         esac
25028 fi
25029
25030 if test "x$with_dlsym" = xyes ; then
25031
25032 # remove dl library from $TICS_LIST
25033 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25034
25035 fi
25036
25037 if test "$DFT_LWR_MODEL" = "libtool"; then
25038         OBJEXT=lo
25039 fi
25040
25041 # needed for Ada95
25042 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25043
25044 case $DFT_LWR_MODEL in
25045 (normal|debug|profile)
25046
25047 if test "$GCC" = yes ; then
25048         case $cf_cv_system_name in
25049         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25050                 LDFLAGS_STATIC=
25051                 LDFLAGS_SHARED=
25052                 ;;
25053         (*)     # normally, except when broken
25054                 LDFLAGS_STATIC=-static
25055                 LDFLAGS_SHARED=-dynamic
25056                 ;;
25057         esac
25058 else
25059         case $cf_cv_system_name in
25060         (aix[4-7]*)     # from ld manpage
25061                 LDFLAGS_STATIC=-bstatic
25062                 LDFLAGS_SHARED=-bdynamic
25063                 ;;
25064         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
25065                 # We could also use just "archive" and "shared".
25066                 LDFLAGS_STATIC=-Wl,-a,archive_shared
25067                 LDFLAGS_SHARED=-Wl,-a,shared_archive
25068                 ;;
25069         (irix*)         # from ld manpage IRIX64
25070                 LDFLAGS_STATIC=-Bstatic
25071                 LDFLAGS_SHARED=-Bdynamic
25072                 ;;
25073         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
25074                 # alternative "-oldstyle_liblookup" (not in cc manpage)
25075                 LDFLAGS_STATIC=-noso
25076                 LDFLAGS_SHARED=-so_archive
25077                 ;;
25078         (solaris2*)
25079                 LDFLAGS_STATIC=-Bstatic
25080                 LDFLAGS_SHARED=-Bdynamic
25081                 ;;
25082         esac
25083 fi
25084
25085 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25086 then
25087         echo "$as_me:25087: checking if linker supports switching between static/dynamic" >&5
25088 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25089
25090         rm -f libconftest.a
25091         cat >conftest.$ac_ext <<EOF
25092 #line 25092 "configure"
25093 #include <stdio.h>
25094 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25095 EOF
25096         if { (eval echo "$as_me:25096: \"$ac_compile\"") >&5
25097   (eval $ac_compile) 2>&5
25098   ac_status=$?
25099   echo "$as_me:25099: \$? = $ac_status" >&5
25100   (exit $ac_status); } ; then
25101                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25102                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25103         fi
25104         rm -f conftest.*
25105
25106         cf_save_LIBS="$LIBS"
25107
25108         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25109         cat >conftest.$ac_ext <<_ACEOF
25110 #line 25110 "configure"
25111 #include "confdefs.h"
25112
25113 #line 25113 "configure"
25114 #include <stdio.h>
25115 int cf_ldflags_static(FILE *fp);
25116
25117 int
25118 main (void)
25119 {
25120
25121         return cf_ldflags_static(stdin);
25122
25123   ;
25124   return 0;
25125 }
25126 _ACEOF
25127 rm -f conftest.$ac_objext conftest$ac_exeext
25128 if { (eval echo "$as_me:25128: \"$ac_link\"") >&5
25129   (eval $ac_link) 2>&5
25130   ac_status=$?
25131   echo "$as_me:25131: \$? = $ac_status" >&5
25132   (exit $ac_status); } &&
25133          { ac_try='test -s conftest$ac_exeext'
25134   { (eval echo "$as_me:25134: \"$ac_try\"") >&5
25135   (eval $ac_try) 2>&5
25136   ac_status=$?
25137   echo "$as_me:25137: \$? = $ac_status" >&5
25138   (exit $ac_status); }; }; then
25139
25140         # some linkers simply ignore the -dynamic
25141         case x`file conftest$ac_exeext 2>/dev/null` in
25142         (*static*)
25143                 cf_ldflags_static=no
25144                 ;;
25145         (*)
25146                 cf_ldflags_static=yes
25147                 ;;
25148         esac
25149
25150 else
25151   echo "$as_me: failed program was:" >&5
25152 cat conftest.$ac_ext >&5
25153 cf_ldflags_static=no
25154 fi
25155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25156
25157         rm -f libconftest.*
25158         LIBS="$cf_save_LIBS"
25159
25160         echo "$as_me:25160: result: $cf_ldflags_static" >&5
25161 echo "${ECHO_T}$cf_ldflags_static" >&6
25162
25163         if test $cf_ldflags_static != yes
25164         then
25165                 LDFLAGS_STATIC=
25166                 LDFLAGS_SHARED=
25167         fi
25168 else
25169         LDFLAGS_STATIC=
25170         LDFLAGS_SHARED=
25171 fi
25172
25173         ;;
25174 esac
25175
25176 echo "$as_me:25176: checking where we will install curses.h" >&5
25177 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
25178
25179 includesubdir=
25180 if test "$with_overwrite" = no && \
25181  ( test "x$includedir" = 'x${prefix}/include' || \
25182    test "x$includedir" = "x${prefix}/include" )
25183 then
25184         includesubdir="/ncurses${USE_LIB_SUFFIX}"
25185 fi
25186 echo "$as_me:25186: result: ${includedir}${includesubdir}" >&5
25187 echo "${ECHO_T}${includedir}${includesubdir}" >&6
25188
25189 ### Resolve a conflict between normal and wide-curses by forcing applications
25190 ### that will need libutf8 to add it to their configure script.
25191 if test "$with_overwrite" != no ; then
25192 if test "$NCURSES_LIBUTF8" = 1 ; then
25193         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
25194         { echo "$as_me:25194: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
25195 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
25196 fi
25197 fi
25198 WITH_OVERWRITE=$with_overwrite
25199
25200 # used to separate tack out of the tree
25201 NCURSES_TREE=
25202
25203 ### predefined stuff for the test programs
25204
25205 cat >>confdefs.h <<\EOF
25206 #define HAVE_SLK_COLOR 1
25207 EOF
25208
25209 ### Construct the list of subdirectories for which we'll customize makefiles
25210 ### with the appropriate compile-rules.
25211
25212 echo "$as_me:25212: checking for src modules" >&5
25213 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
25214
25215 # dependencies and linker-arguments for test-programs
25216 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
25217 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
25218 if test "$DFT_LWR_MODEL" = "libtool"; then
25219         TEST_ARGS="${TEST_DEPS}"
25220         TEST_ARG2="${TEST_DEP2}"
25221 else
25222         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25223         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
25224 fi
25225
25226 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
25227 cf_cv_src_modules=
25228 for cf_dir in $modules_to_build
25229 do
25230         if test -f $srcdir/$cf_dir/modules; then
25231
25232                 # We may/may not have tack in the distribution, though the
25233                 # makefile is.
25234                 if test $cf_dir = tack ; then
25235                         if test "x$cf_with_tack" != "xyes"; then
25236                                 continue
25237                         fi
25238                 fi
25239
25240                 if test -z "$cf_cv_src_modules"; then
25241                         cf_cv_src_modules=$cf_dir
25242                 else
25243                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
25244                 fi
25245
25246                 # Make the ncurses_cfg.h file record the library interface files as
25247                 # well.  These are header files that are the same name as their
25248                 # directory.  Ncurses is the only library that does not follow
25249                 # that pattern.
25250                 if test $cf_dir = tack ; then
25251                         continue
25252                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
25253
25254 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25255
25256                         cat >>confdefs.h <<EOF
25257 #define HAVE_${cf_have_include}_H 1
25258 EOF
25259
25260                         cat >>confdefs.h <<EOF
25261 #define HAVE_LIB${cf_have_include} 1
25262 EOF
25263
25264                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
25265                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
25266                         if test "$DFT_LWR_MODEL" = "libtool"; then
25267                                 TEST_ARGS="${TEST_DEPS}"
25268                                 TEST_ARG2="${TEST_DEP2}"
25269                         else
25270                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
25271                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
25272                         fi
25273                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
25274                 fi
25275         fi
25276 done
25277 echo "$as_me:25277: result: $cf_cv_src_modules" >&5
25278 echo "${ECHO_T}$cf_cv_src_modules" >&6
25279
25280 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
25281 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
25282
25283 SRC_SUBDIRS=
25284 if test "x$cf_with_manpages" != xno ; then
25285         SRC_SUBDIRS="$SRC_SUBDIRS man"
25286 fi
25287 SRC_SUBDIRS="$SRC_SUBDIRS include"
25288 for cf_dir in $cf_cv_src_modules
25289 do
25290         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
25291 done
25292 if test "x$cf_with_tests" != "xno" ; then
25293         SRC_SUBDIRS="$SRC_SUBDIRS test"
25294 fi
25295 # always make this, to install the ncurses-config script
25296 SRC_SUBDIRS="$SRC_SUBDIRS misc"
25297 if test "$cf_with_cxx_binding" != no; then
25298         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
25299         SRC_SUBDIRS="$SRC_SUBDIRS c++"
25300 fi
25301
25302 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
25303 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
25304
25305 ADA_SUBDIRS=
25306 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
25307         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
25308         ADA_SUBDIRS="gen src"
25309         if test "x$cf_with_tests" != "xno" ; then
25310                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
25311         fi
25312 fi
25313
25314 SUB_MAKEFILES=
25315 for cf_dir in $SRC_SUBDIRS
25316 do
25317         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
25318 done
25319
25320 if test -n "$ADA_SUBDIRS"; then
25321         for cf_dir in $ADA_SUBDIRS
25322         do
25323                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
25324         done
25325
25326 fi
25327
25328 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25329    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
25330    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
25331 fi
25332
25333 DIRS_TO_MAKE="lib"
25334 for cf_item in $cf_list_models
25335 do
25336
25337         case $cf_item in
25338         (libtool) cf_subdir='obj_lo'  ;;
25339         (normal)  cf_subdir='objects' ;;
25340         (debug)   cf_subdir='obj_g' ;;
25341         (profile) cf_subdir='obj_p' ;;
25342         (shared)
25343                 case $cf_cv_system_name in
25344                 (cygwin|msys)
25345                         cf_subdir='objects' ;;
25346                 (*)
25347                         cf_subdir='obj_s' ;;
25348                 esac
25349         esac
25350
25351         for cf_item2 in $DIRS_TO_MAKE
25352         do
25353                 test $cf_item2 = $cf_subdir && break
25354         done
25355         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
25356 done
25357 for cf_dir in $DIRS_TO_MAKE
25358 do
25359         test ! -d $cf_dir && mkdir $cf_dir
25360 done
25361
25362 # symbols that differ when compiling Ada95 by itself.
25363 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
25364
25365 # values to use as strings
25366
25367 cat >>confdefs.h <<EOF
25368 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
25369 EOF
25370
25371 cat >>confdefs.h <<EOF
25372 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
25373 EOF
25374
25375 ### Now that we're done running tests, add the compiler-warnings, if any
25376
25377 cf_fix_cppflags=no
25378 cf_new_cflags=
25379 cf_new_cppflags=
25380 cf_new_extra_cppflags=
25381
25382 for cf_add_cflags in $EXTRA_CFLAGS
25383 do
25384 case $cf_fix_cppflags in
25385 (no)
25386         case $cf_add_cflags in
25387         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25388                 case $cf_add_cflags in
25389                 (-D*)
25390                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25391
25392                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25393                                 && test -z "${cf_tst_cflags}" \
25394                                 && cf_fix_cppflags=yes
25395
25396                         if test $cf_fix_cppflags = yes ; then
25397
25398         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25399         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25400
25401                                 continue
25402                         elif test "${cf_tst_cflags}" = "\"'" ; then
25403
25404         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25405         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25406
25407                                 continue
25408                         fi
25409                         ;;
25410                 esac
25411                 case "$CPPFLAGS" in
25412                 (*$cf_add_cflags)
25413                         ;;
25414                 (*)
25415                         case $cf_add_cflags in
25416                         (-D*)
25417                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25418
25419 CPPFLAGS=`echo "$CPPFLAGS" | \
25420         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
25421                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
25422
25423                                 ;;
25424                         esac
25425
25426         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25427         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25428
25429                         ;;
25430                 esac
25431                 ;;
25432         (*)
25433
25434         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25435         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25436
25437                 ;;
25438         esac
25439         ;;
25440 (yes)
25441
25442         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25443         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25444
25445         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
25446
25447         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25448                 && test -z "${cf_tst_cflags}" \
25449                 && cf_fix_cppflags=no
25450         ;;
25451 esac
25452 done
25453
25454 if test -n "$cf_new_cflags" ; then
25455
25456         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25457         CFLAGS="${CFLAGS}$cf_new_cflags"
25458
25459 fi
25460
25461 if test -n "$cf_new_cppflags" ; then
25462
25463         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25464         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
25465
25466 fi
25467
25468 if test -n "$cf_new_extra_cppflags" ; then
25469
25470         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
25471         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
25472
25473 fi
25474
25475 ### Define substitutions for header files to avoid name-pollution
25476
25477 if test "x$cf_cv_have_tcgetattr" = xyes ; then
25478         HAVE_TCGETATTR=1
25479 else
25480         HAVE_TCGETATTR=0
25481 fi
25482
25483 if test "x$ac_cv_header_stdint_h" = xyes ; then
25484         HAVE_STDINT_H=1
25485 else
25486         HAVE_STDINT_H=0
25487 fi
25488
25489 if test "x$ac_cv_header_termio_h" = xyes ; then
25490         HAVE_TERMIO_H=1
25491 else
25492         HAVE_TERMIO_H=0
25493 fi
25494
25495 if test "x$ac_cv_header_termios_h" = xyes ; then
25496         HAVE_TERMIOS_H=1
25497 else
25498         HAVE_TERMIOS_H=0
25499 fi
25500
25501 ################################################################################
25502 test "x$use_database" = xyes && \
25503 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
25504
25505 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
25506 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
25507
25508 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
25509 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
25510 fi
25511
25512 # Extract the first word of "tic", so it can be a program name with args.
25513 set dummy tic; ac_word=$2
25514 echo "$as_me:25514: checking for $ac_word" >&5
25515 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25516 if test "${ac_cv_path_TIC_PATH+set}" = set; then
25517   echo $ECHO_N "(cached) $ECHO_C" >&6
25518 else
25519   case $TIC_PATH in
25520   [\\/]* | ?:[\\/]*)
25521   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
25522   ;;
25523   *)
25524   ac_save_IFS=$IFS; IFS=$ac_path_separator
25525 ac_dummy="$PATH:/usr/local/ncurses/bin"
25526 for ac_dir in $ac_dummy; do
25527   IFS=$ac_save_IFS
25528   test -z "$ac_dir" && ac_dir=.
25529   if $as_executable_p "$ac_dir/$ac_word"; then
25530    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
25531    echo "$as_me:25531: found $ac_dir/$ac_word" >&5
25532    break
25533 fi
25534 done
25535
25536   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
25537   ;;
25538 esac
25539 fi
25540 TIC_PATH=$ac_cv_path_TIC_PATH
25541
25542 if test -n "$TIC_PATH"; then
25543   echo "$as_me:25543: result: $TIC_PATH" >&5
25544 echo "${ECHO_T}$TIC_PATH" >&6
25545 else
25546   echo "$as_me:25546: result: no" >&5
25547 echo "${ECHO_T}no" >&6
25548 fi
25549
25550 if test -n "$FALLBACK_LIST"
25551 then
25552         if test "$TIC_PATH" = unknown
25553         then
25554                 { echo "$as_me:25554: WARNING: no tic program found for fallbacks" >&5
25555 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
25556         fi
25557 fi
25558
25559 if test "x$cf_with_tests" != xno ; then
25560         MAKE_TESTS=
25561 else
25562         MAKE_TESTS="#"
25563 fi
25564
25565 ADAHTML_DIR=../../doc/html/ada
25566
25567 # these could be configurable, but are not currently
25568 PANEL_NAME=panel
25569 MENU_NAME=menu
25570 FORM_NAME=form
25571 CXX_NAME=ncurses++
25572
25573 # workaround for OS/2 (20151017)
25574 case $cf_cv_system_name in
25575 (os2*)
25576         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
25577         ;;
25578 (*)
25579         LIBTOOL_OPTS_CXX=
25580         ;;
25581 esac
25582
25583 # workaround for g++ versus Solaris (20131116)
25584 case $cf_cv_system_name in
25585 (solaris2*)
25586         case "x$CPPFLAGS" in
25587         (*-D_XOPEN_SOURCE_EXTENDED*)
25588                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
25589
25590 echo "${as_me:-configure}:25590: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
25591
25592                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
25593                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
25594                 ;;
25595         esac
25596         ;;
25597 esac
25598
25599 # Help to automatically enable the extended curses features when using either
25600 # the *-config or the ".pc" files by adding defines.
25601 echo "$as_me:25601: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
25602 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
25603 PKG_CFLAGS=
25604 for cf_loop1 in $CPPFLAGS_after_XOPEN
25605 do
25606         cf_found=no
25607         for cf_loop2 in $CPPFLAGS_before_XOPEN
25608         do
25609                 if test "x$cf_loop1" = "x$cf_loop2"
25610                 then
25611                         cf_found=yes
25612                         break
25613                 fi
25614         done
25615         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
25616 done
25617 echo "$as_me:25617: result: $PKG_CFLAGS" >&5
25618 echo "${ECHO_T}$PKG_CFLAGS" >&6
25619
25620 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
25621 case "x$NCURSES_OSPEED" in
25622 (*short*)
25623         cf_compatible=1
25624         ;;
25625 (*)
25626         cf_compatible=0
25627         ;;
25628 esac
25629
25630 cat >>confdefs.h <<EOF
25631 #define NCURSES_OSPEED_COMPAT $cf_compatible
25632 EOF
25633
25634 case "x$cf_cv_typeof_chtype" in
25635 (xshort|xint|xlong)
25636         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
25637         ;;
25638 esac
25639
25640 case "x$cf_cv_typeof_mmask_t" in
25641 (xshort|xint|xlong)
25642         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
25643         ;;
25644 esac
25645
25646 # substitute into misc/Makefile to suppress
25647 # (un)install.data from the
25648 # (un)install rules.
25649 if test "x$cf_with_db_install" = "xno"; then
25650         MISC_INSTALL_DATA=
25651         MISC_UNINSTALL_DATA=
25652 else
25653         MISC_INSTALL_DATA=install.data
25654         MISC_UNINSTALL_DATA=uninstall.data
25655 fi
25656
25657 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
25658         MAKE_DATABASE="#"
25659 else
25660         MAKE_DATABASE="$MAKE_TERMINFO"
25661 fi
25662
25663 SUB_SCRIPTS=
25664
25665 if test -n "$PACKAGE"
25666 then
25667         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
25668         export PACKAGE
25669         echo "package: $PACKAGE"
25670 fi
25671
25672 UNALTERED_SYMS=
25673 cf_filter_syms=no
25674
25675 if test -n "$RESULTING_SYMS"
25676 then
25677         cf_filter_syms=$cf_dft_filter_syms
25678         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
25679
25680 echo "${as_me:-configure}:25680: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
25681
25682 fi
25683
25684 if test "x$WILDCARD_SYMS" = xno
25685 then
25686         cf_filter_syms=yes
25687 fi
25688
25689 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
25690
25691 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
25692 if test $cf_filter_syms = yes
25693 then
25694         RESULTING_SYMS=resulting.map
25695 fi
25696
25697 if test "x$cross_compiling" = xyes ; then
25698         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
25699         CHECK_BUILD="#"
25700 else
25701         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
25702         CHECK_BUILD=
25703 fi
25704
25705 cat >>confdefs.h <<\EOF
25706 #define HAVE_CURSES_DATA_BOOLNAMES 1
25707 EOF
25708
25709 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"
25710 ac_config_commands="$ac_config_commands default"
25711 cat >confcache <<\_ACEOF
25712 # This file is a shell script that caches the results of configure
25713 # tests run on this system so they can be shared between configure
25714 # scripts and configure runs, see configure's option --config-cache.
25715 # It is not useful on other systems.  If it contains results you don't
25716 # want to keep, you may remove or edit it.
25717 #
25718 # config.status only pays attention to the cache file if you give it
25719 # the --recheck option to rerun configure.
25720 #
25721 # `ac_cv_env_foo' variables (set or unset) will be overriden when
25722 # loading this file, other *unset* `ac_cv_foo' will be assigned the
25723 # following values.
25724
25725 _ACEOF
25726
25727 # The following way of writing the cache mishandles newlines in values,
25728 # but we know of no workaround that is simple, portable, and efficient.
25729 # So, don't put newlines in cache variables' values.
25730 # Ultrix sh set writes to stderr and can't be redirected directly,
25731 # and sets the high bit in the cache file unless we assign to the vars.
25732 {
25733   (set) 2>&1 |
25734     case `(ac_space=' '; set | grep ac_space) 2>&1` in
25735     *ac_space=\ *)
25736       # `set' does not quote correctly, so add quotes (double-quote
25737       # substitution turns \\\\ into \\, and sed turns \\ into \).
25738       sed -n \
25739         "s/'/'\\\\''/g;
25740           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
25741       ;;
25742     *)
25743       # `set' quotes correctly as required by POSIX, so do not add quotes.
25744       sed -n \
25745         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
25746       ;;
25747     esac;
25748 } |
25749   sed '
25750      t clear
25751      : clear
25752      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25753      t end
25754      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25755      : end' >>confcache
25756 if cmp -s $cache_file confcache; then :; else
25757   if test -w $cache_file; then
25758     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
25759     cat confcache >$cache_file
25760   else
25761     echo "not updating unwritable cache $cache_file"
25762   fi
25763 fi
25764 rm -f confcache
25765
25766 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25767 # Let make expand exec_prefix.
25768 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25769
25770 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25771 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25772 # trailing colons and then remove the whole line if VPATH becomes empty
25773 # (actually we leave an empty line to preserve line numbers).
25774 if test "x$srcdir" = x.; then
25775   ac_vpsub='/^[         ]*VPATH[        ]*=/{
25776 s/:*\$(srcdir):*/:/;
25777 s/:*\${srcdir}:*/:/;
25778 s/:*@srcdir@:*/:/;
25779 s/^\([^=]*=[    ]*\):*/\1/;
25780 s/:*$//;
25781 s/^[^=]*=[      ]*$//;
25782 }'
25783 fi
25784
25785 DEFS=-DHAVE_CONFIG_H
25786
25787 : ${CONFIG_STATUS=./config.status}
25788 ac_clean_files_save=$ac_clean_files
25789 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25790 { echo "$as_me:25790: creating $CONFIG_STATUS" >&5
25791 echo "$as_me: creating $CONFIG_STATUS" >&6;}
25792 cat >$CONFIG_STATUS <<_ACEOF
25793 #! $SHELL
25794 # Generated automatically by configure.
25795 # Run this file to recreate the current configuration.
25796 # Compiler output produced by configure, useful for debugging
25797 # configure, is in config.log if it exists.
25798
25799 debug=false
25800 SHELL=\${CONFIG_SHELL-$SHELL}
25801 ac_cs_invocation="\$0 \$@"
25802
25803 _ACEOF
25804
25805 cat >>$CONFIG_STATUS <<\_ACEOF
25806 # Be Bourne compatible
25807 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25808   emulate sh
25809   NULLCMD=:
25810 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
25811   set -o posix
25812 fi
25813
25814 # Name of the executable.
25815 as_me=`echo "$0" |sed 's,.*[\\/],,'`
25816
25817 if expr a : '\(a\)' >/dev/null 2>&1; then
25818   as_expr=expr
25819 else
25820   as_expr=false
25821 fi
25822
25823 rm -f conf$$ conf$$.exe conf$$.file
25824 echo >conf$$.file
25825 if ln -s conf$$.file conf$$ 2>/dev/null; then
25826   # We could just check for DJGPP; but this test a) works b) is more generic
25827   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
25828   if test -f conf$$.exe; then
25829     # Don't use ln at all; we don't have any links
25830     as_ln_s='cp -p'
25831   else
25832     as_ln_s='ln -s'
25833   fi
25834 elif ln conf$$.file conf$$ 2>/dev/null; then
25835   as_ln_s=ln
25836 else
25837   as_ln_s='cp -p'
25838 fi
25839 rm -f conf$$ conf$$.exe conf$$.file
25840
25841 as_executable_p="test -f"
25842
25843 # Support unset when possible.
25844 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
25845   as_unset=unset
25846 else
25847   as_unset=false
25848 fi
25849
25850 # NLS nuisances.
25851 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
25852 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
25853 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
25854 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
25855 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
25856 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
25857 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
25858 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
25859
25860 # IFS
25861 # We need space, tab and new line, in precisely that order.
25862 as_nl='
25863 '
25864 IFS="   $as_nl"
25865
25866 # CDPATH.
25867 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
25868
25869 exec 6>&1
25870
25871 _ACEOF
25872
25873 # Files that config.status was made for.
25874 if test -n "$ac_config_files"; then
25875   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
25876 fi
25877
25878 if test -n "$ac_config_headers"; then
25879   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
25880 fi
25881
25882 if test -n "$ac_config_links"; then
25883   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
25884 fi
25885
25886 if test -n "$ac_config_commands"; then
25887   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
25888 fi
25889
25890 cat >>$CONFIG_STATUS <<\EOF
25891
25892 ac_cs_usage="\
25893 \`$as_me' instantiates files from templates according to the
25894 current configuration.
25895
25896 Usage: $0 [OPTIONS] [FILE]...
25897
25898   -h, --help       print this help, then exit
25899   -V, --version    print version number, then exit
25900   -d, --debug      don't remove temporary files
25901       --recheck    update $as_me by reconfiguring in the same conditions
25902   --file=FILE[:TEMPLATE]
25903                    instantiate the configuration file FILE
25904   --header=FILE[:TEMPLATE]
25905                    instantiate the configuration header FILE
25906
25907 Configuration files:
25908 $config_files
25909
25910 Configuration headers:
25911 $config_headers
25912
25913 Configuration commands:
25914 $config_commands
25915
25916 Report bugs to <dickey@invisible-island.net>."
25917 EOF
25918
25919 cat >>$CONFIG_STATUS <<EOF
25920 ac_cs_version="\\
25921 config.status
25922 configured by $0, generated by GNU Autoconf 2.52.20181006,
25923   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
25924
25925 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
25926 Free Software Foundation, Inc.
25927 This config.status script is free software; the Free Software Foundation
25928 gives unlimited permission to copy, distribute and modify it."
25929 srcdir=$srcdir
25930 INSTALL="$INSTALL"
25931 EOF
25932
25933 cat >>$CONFIG_STATUS <<\EOF
25934 # If no file are specified by the user, then we need to provide default
25935 # value.  By we need to know if files were specified by the user.
25936 ac_need_defaults=:
25937 while test $# != 0
25938 do
25939   case $1 in
25940   --*=*)
25941     ac_option=`expr "x$1" : 'x\([^=]*\)='`
25942     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
25943     shift
25944     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
25945     shift
25946     ;;
25947   -*);;
25948   *) # This is not an option, so the user has probably given explicit
25949      # arguments.
25950      ac_need_defaults=false;;
25951   esac
25952
25953   case $1 in
25954   # Handling of the options.
25955 EOF
25956 cat >>$CONFIG_STATUS <<EOF
25957   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25958     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
25959     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
25960 EOF
25961 cat >>$CONFIG_STATUS <<\EOF
25962   --version | --vers* | -V )
25963     echo "$ac_cs_version"; exit 0 ;;
25964   --he | --h)
25965     # Conflict between --help and --header
25966     { { echo "$as_me:25966: error: ambiguous option: $1
25967 Try \`$0 --help' for more information." >&5
25968 echo "$as_me: error: ambiguous option: $1
25969 Try \`$0 --help' for more information." >&2;}
25970    { (exit 1); exit 1; }; };;
25971   --help | --hel | -h )
25972     echo "$ac_cs_usage"; exit 0 ;;
25973   --debug | --d* | -d )
25974     debug=: ;;
25975   --file | --fil | --fi | --f )
25976     shift
25977     CONFIG_FILES="$CONFIG_FILES $1"
25978     ac_need_defaults=false;;
25979   --header | --heade | --head | --hea )
25980     shift
25981     CONFIG_HEADERS="$CONFIG_HEADERS $1"
25982     ac_need_defaults=false;;
25983
25984   # This is an error.
25985   -*) { { echo "$as_me:25985: error: unrecognized option: $1
25986 Try \`$0 --help' for more information." >&5
25987 echo "$as_me: error: unrecognized option: $1
25988 Try \`$0 --help' for more information." >&2;}
25989    { (exit 1); exit 1; }; } ;;
25990
25991   *) ac_config_targets="$ac_config_targets $1" ;;
25992
25993   esac
25994   shift
25995 done
25996
25997 exec 5>>config.log
25998 cat >&5 << _ACEOF
25999
26000 ## ----------------------- ##
26001 ## Running config.status.  ##
26002 ## ----------------------- ##
26003
26004 This file was extended by $as_me 2.52.20181006, executed with
26005   CONFIG_FILES    = $CONFIG_FILES
26006   CONFIG_HEADERS  = $CONFIG_HEADERS
26007   CONFIG_LINKS    = $CONFIG_LINKS
26008   CONFIG_COMMANDS = $CONFIG_COMMANDS
26009   > $ac_cs_invocation
26010 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26011
26012 _ACEOF
26013 EOF
26014
26015 cat >>$CONFIG_STATUS <<EOF
26016 #
26017 # INIT-COMMANDS section.
26018 #
26019
26020 ### Special initialization commands, used to pass information from the
26021 ### configuration-run into config.status
26022
26023 AWK="$AWK"
26024 ALTERNATE_SYMS="$ALTERNATE_SYMS"
26025 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26026 DFT_LWR_MODEL="$DFT_LWR_MODEL"
26027 ECHO_LD="$ECHO_LD"
26028 EXTRA_SUFFIX="$EXTRA_SUFFIX"
26029 LDCONFIG="$LDCONFIG"
26030 LIBTOOL_VERSION="$LIBTOOL_VERSION"
26031 LIB_NAME="$LIB_NAME"
26032 LIB_PREFIX="$LIB_PREFIX"
26033 LIB_SUBSETS="$LIB_SUBSETS"
26034 LIB_SUFFIX="$LIB_SUFFIX"
26035 LIB_TRACING="$LIB_TRACING"
26036 LN_S="$LN_S"
26037 MAKE_TERMINFO="$MAKE_TERMINFO"
26038 NCURSES_MAJOR="$NCURSES_MAJOR"
26039 NCURSES_MINOR="$NCURSES_MINOR"
26040 NCURSES_OSPEED="$NCURSES_OSPEED"
26041 NCURSES_PATCH="$NCURSES_PATCH"
26042 SRC_SUBDIRS="$SRC_SUBDIRS"
26043 TERMINFO="$TERMINFO"
26044 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
26045 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
26046 TICS_NAME="$TICS_NAME"
26047 TICS_SUFFIX="$TICS_SUFFIX"
26048 TIC_PATH="$TIC_PATH"
26049 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
26050 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
26051 TINFO_NAME="$TINFO_NAME"
26052 TINFO_SUFFIX="$TINFO_SUFFIX"
26053 UNALTERED_SYMS="$UNALTERED_SYMS"
26054 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
26055 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
26056 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
26057 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
26058 WILDCARD_SYMS="$WILDCARD_SYMS"
26059 WITH_CURSES_H="$with_curses_h"
26060 WITH_ECHO="${enable_echo:=yes}"
26061 WITH_OVERWRITE="$with_overwrite"
26062 cf_LIST_MODELS="$cf_list_models"
26063 cf_cv_abi_version="$cf_cv_abi_version"
26064 cf_cv_do_relink="$cf_cv_do_relink"
26065 cf_cv_do_reranlib="$cf_cv_do_reranlib"
26066 cf_cv_do_symlinks="$cf_cv_do_symlinks"
26067 cf_cv_enable_lp64="$cf_cv_enable_lp64"
26068 cf_cv_enable_opaque="$cf_cv_enable_opaque"
26069 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
26070 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
26071 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
26072 cf_cv_rel_version="$cf_cv_rel_version"
26073 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
26074 cf_cv_shared_soname='$cf_cv_shared_soname'
26075 cf_cv_shlib_version="$cf_cv_shlib_version"
26076 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
26077 cf_cv_system_name="$cf_cv_system_name"
26078 cf_cv_term_driver="$with_term_driver"
26079 cf_with_ada="$cf_with_ada"
26080 cf_with_cxx_binding="$cf_with_cxx_binding"
26081 cf_with_db_install="$cf_with_db_install"
26082 cf_with_manpages="$cf_with_manpages"
26083 cf_with_tests="$cf_with_tests"
26084 host="$host"
26085 target="$target"
26086 with_shared_cxx="$with_shared_cxx"
26087
26088 EOF
26089
26090 cat >>$CONFIG_STATUS <<\EOF
26091 for ac_config_target in $ac_config_targets
26092 do
26093   case "$ac_config_target" in
26094   # Handling of arguments.
26095   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
26096   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
26097   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
26098   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
26099   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
26100   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
26101   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
26102   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26103   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26104   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
26105   *) { { echo "$as_me:26105: error: invalid argument: $ac_config_target" >&5
26106 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26107    { (exit 1); exit 1; }; };;
26108   esac
26109 done
26110
26111 # If the user did not use the arguments to specify the items to instantiate,
26112 # then the envvar interface is used.  Set only those that are not.
26113 # We use the long form for the default assignment because of an extremely
26114 # bizarre bug on SunOS 4.1.3.
26115 if $ac_need_defaults; then
26116   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26117   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26118   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26119 fi
26120
26121 # Create a temporary directory, and hook for its removal unless debugging.
26122 $debug ||
26123 {
26124   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26125   trap '{ (exit 1); exit 1; }' 1 2 13 15
26126 }
26127
26128 # Create a (secure) tmp directory for tmp files.
26129 : ${TMPDIR=/tmp}
26130 {
26131   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26132   test -n "$tmp" && test -d "$tmp"
26133 }  ||
26134 {
26135   tmp=$TMPDIR/cs$$-$RANDOM
26136   (umask 077 && mkdir $tmp)
26137 } ||
26138 {
26139    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26140    { (exit 1); exit 1; }
26141 }
26142
26143 EOF
26144
26145 cat >>$CONFIG_STATUS <<EOF
26146
26147 #
26148 # CONFIG_FILES section.
26149 #
26150
26151 # No need to generate the scripts if there are no CONFIG_FILES.
26152 # This happens for instance when ./config.status config.h
26153 if test -n "\$CONFIG_FILES"; then
26154   # Protect against being on the right side of a sed subst in config.status.
26155   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26156    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26157 s,@SHELL@,$SHELL,;t t
26158 s,@exec_prefix@,$exec_prefix,;t t
26159 s,@prefix@,$prefix,;t t
26160 s,@program_transform_name@,$program_transform_name,;t t
26161 s,@bindir@,$bindir,;t t
26162 s,@sbindir@,$sbindir,;t t
26163 s,@libexecdir@,$libexecdir,;t t
26164 s,@datarootdir@,$datarootdir,;t t
26165 s,@datadir@,$datadir,;t t
26166 s,@sysconfdir@,$sysconfdir,;t t
26167 s,@sharedstatedir@,$sharedstatedir,;t t
26168 s,@localstatedir@,$localstatedir,;t t
26169 s,@runstatedir@,$runstatedir,;t t
26170 s,@libdir@,$libdir,;t t
26171 s,@includedir@,$includedir,;t t
26172 s,@oldincludedir@,$oldincludedir,;t t
26173 s,@infodir@,$infodir,;t t
26174 s,@mandir@,$mandir,;t t
26175 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26176 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26177 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26178 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26179 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26180 s,@build_alias@,$build_alias,;t t
26181 s,@host_alias@,$host_alias,;t t
26182 s,@target_alias@,$target_alias,;t t
26183 s,@ECHO_C@,$ECHO_C,;t t
26184 s,@ECHO_N@,$ECHO_N,;t t
26185 s,@ECHO_T@,$ECHO_T,;t t
26186 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26187 s,@DEFS@,$DEFS,;t t
26188 s,@LIBS@,$LIBS,;t t
26189 s,@top_builddir@,$top_builddir,;t t
26190 s,@EGREP@,$EGREP,;t t
26191 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
26192 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
26193 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
26194 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
26195 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
26196 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
26197 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
26198 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
26199 s,@VERSION@,$VERSION,;t t
26200 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26201 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26202 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26203 s,@PACKAGE@,$PACKAGE,;t t
26204 s,@build@,$build,;t t
26205 s,@build_cpu@,$build_cpu,;t t
26206 s,@build_vendor@,$build_vendor,;t t
26207 s,@build_os@,$build_os,;t t
26208 s,@host@,$host,;t t
26209 s,@host_cpu@,$host_cpu,;t t
26210 s,@host_vendor@,$host_vendor,;t t
26211 s,@host_os@,$host_os,;t t
26212 s,@target@,$target,;t t
26213 s,@target_cpu@,$target_cpu,;t t
26214 s,@target_vendor@,$target_vendor,;t t
26215 s,@target_os@,$target_os,;t t
26216 s,@CC@,$CC,;t t
26217 s,@CFLAGS@,$CFLAGS,;t t
26218 s,@LDFLAGS@,$LDFLAGS,;t t
26219 s,@CPPFLAGS@,$CPPFLAGS,;t t
26220 s,@ac_ct_CC@,$ac_ct_CC,;t t
26221 s,@EXEEXT@,$EXEEXT,;t t
26222 s,@OBJEXT@,$OBJEXT,;t t
26223 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26224 s,@CPP@,$CPP,;t t
26225 s,@LDCONFIG@,$LDCONFIG,;t t
26226 s,@CXX@,$CXX,;t t
26227 s,@CXXFLAGS@,$CXXFLAGS,;t t
26228 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
26229 s,@AWK@,$AWK,;t t
26230 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26231 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26232 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26233 s,@LINT@,$LINT,;t t
26234 s,@LINT_OPTS@,$LINT_OPTS,;t t
26235 s,@LN_S@,$LN_S,;t t
26236 s,@cf_config_suffix@,$cf_config_suffix,;t t
26237 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26238 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26239 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
26240 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
26241 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
26242 s,@SET_MAKE@,$SET_MAKE,;t t
26243 s,@CTAGS@,$CTAGS,;t t
26244 s,@ETAGS@,$ETAGS,;t t
26245 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26246 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26247 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26248 s,@RANLIB@,$RANLIB,;t t
26249 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26250 s,@LD@,$LD,;t t
26251 s,@ac_ct_LD@,$ac_ct_LD,;t t
26252 s,@AR@,$AR,;t t
26253 s,@ac_ct_AR@,$ac_ct_AR,;t t
26254 s,@NM@,$NM,;t t
26255 s,@ac_ct_NM@,$ac_ct_NM,;t t
26256 s,@ARFLAGS@,$ARFLAGS,;t t
26257 s,@DESTDIR@,$DESTDIR,;t t
26258 s,@BUILD_CC@,$BUILD_CC,;t t
26259 s,@BUILD_CPP@,$BUILD_CPP,;t t
26260 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
26261 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
26262 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
26263 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
26264 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
26265 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
26266 s,@cf_list_models@,$cf_list_models,;t t
26267 s,@ABI_VERSION@,$ABI_VERSION,;t t
26268 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26269 s,@LIBTOOL@,$LIBTOOL,;t t
26270 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26271 s,@LT_UNDEF@,$LT_UNDEF,;t t
26272 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26273 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26274 s,@LIB_CREATE@,$LIB_CREATE,;t t
26275 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26276 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26277 s,@LIB_PREP@,$LIB_PREP,;t t
26278 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26279 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26280 s,@LIB_LINK@,$LIB_LINK,;t t
26281 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26282 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26283 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26284 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
26285 s,@TICS_NAME@,$TICS_NAME,;t t
26286 s,@TINFO_NAME@,$TINFO_NAME,;t t
26287 s,@LIB_NAME@,$LIB_NAME,;t t
26288 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26289 s,@CC_G_OPT@,$CC_G_OPT,;t t
26290 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
26291 s,@LD_MODEL@,$LD_MODEL,;t t
26292 s,@shlibdir@,$shlibdir,;t t
26293 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26294 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26295 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26296 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26297 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26298 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26299 s,@LINK_PROGS@,$LINK_PROGS,;t t
26300 s,@LINK_TESTS@,$LINK_TESTS,;t t
26301 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26302 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26303 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26304 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26305 s,@RPATH_LIST@,$RPATH_LIST,;t t
26306 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26307 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26308 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26309 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26310 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26311 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
26312 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
26313 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
26314 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
26315 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
26316 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
26317 s,@XTERM_KBS@,$XTERM_KBS,;t t
26318 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
26319 s,@TERMINFO@,$TERMINFO,;t t
26320 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
26321 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
26322 s,@TERMPATH@,$TERMPATH,;t t
26323 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
26324 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
26325 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
26326 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
26327 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
26328 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
26329 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
26330 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
26331 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
26332 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
26333 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
26334 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
26335 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
26336 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
26337 s,@RGB_PATH@,$RGB_PATH,;t t
26338 s,@no_x11_rgb@,$no_x11_rgb,;t t
26339 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
26340 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
26341 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
26342 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
26343 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
26344 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
26345 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
26346 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
26347 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
26348 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
26349 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
26350 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
26351 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
26352 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
26353 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
26354 s,@PTHREAD@,$PTHREAD,;t t
26355 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
26356 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
26357 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
26358 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
26359 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
26360 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
26361 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
26362 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
26363 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
26364 s,@ECHO_LT@,$ECHO_LT,;t t
26365 s,@ECHO_LD@,$ECHO_LD,;t t
26366 s,@RULE_CC@,$RULE_CC,;t t
26367 s,@SHOW_CC@,$SHOW_CC,;t t
26368 s,@ECHO_CC@,$ECHO_CC,;t t
26369 s,@ECHO_LINK@,$ECHO_LINK,;t t
26370 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
26371 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
26372 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
26373 s,@ADAFLAGS@,$ADAFLAGS,;t t
26374 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26375 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
26376 s,@ADA_TRACE@,$ADA_TRACE,;t t
26377 s,@MATH_LIB@,$MATH_LIB,;t t
26378 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
26379 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
26380 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
26381 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
26382 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
26383 s,@TEST_LIBS@,$TEST_LIBS,;t t
26384 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
26385 s,@CXXCPP@,$CXXCPP,;t t
26386 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
26387 s,@CXX_AR@,$CXX_AR,;t t
26388 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
26389 s,@CXXLIBS@,$CXXLIBS,;t t
26390 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
26391 s,@gnatmake_exists@,$gnatmake_exists,;t t
26392 s,@gprconfig_exists@,$gprconfig_exists,;t t
26393 s,@M4_exists@,$M4_exists,;t t
26394 s,@cf_ada_make@,$cf_ada_make,;t t
26395 s,@cf_ada_config@,$cf_ada_config,;t t
26396 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
26397 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
26398 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
26399 s,@cf_compile_generics@,$cf_compile_generics,;t t
26400 s,@cf_generic_objects@,$cf_generic_objects,;t t
26401 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
26402 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
26403 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
26404 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
26405 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
26406 s,@cf_ada_package@,$cf_ada_package,;t t
26407 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
26408 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
26409 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
26410 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
26411 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
26412 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
26413 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26414 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
26415 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
26416 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
26417 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
26418 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
26419 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
26420 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
26421 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
26422 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
26423 s,@TICS_LIBS@,$TICS_LIBS,;t t
26424 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
26425 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
26426 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
26427 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
26428 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
26429 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
26430 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
26431 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
26432 s,@includesubdir@,$includesubdir,;t t
26433 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
26434 s,@TICS_LIST@,$TICS_LIST,;t t
26435 s,@TINFO_LIST@,$TINFO_LIST,;t t
26436 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
26437 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
26438 s,@TEST_ARGS@,$TEST_ARGS,;t t
26439 s,@TEST_DEPS@,$TEST_DEPS,;t t
26440 s,@TEST_ARG2@,$TEST_ARG2,;t t
26441 s,@TEST_DEP2@,$TEST_DEP2,;t t
26442 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
26443 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
26444 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
26445 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
26446 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
26447 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
26448 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
26449 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
26450 s,@cross_compiling@,$cross_compiling,;t t
26451 s,@TIC_PATH@,$TIC_PATH,;t t
26452 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
26453 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
26454 s,@PANEL_NAME@,$PANEL_NAME,;t t
26455 s,@MENU_NAME@,$MENU_NAME,;t t
26456 s,@FORM_NAME@,$FORM_NAME,;t t
26457 s,@CXX_NAME@,$CXX_NAME,;t t
26458 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
26459 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
26460 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
26461 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
26462 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
26463 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
26464 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
26465 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
26466 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
26467 CEOF
26468
26469 EOF
26470
26471   cat >>$CONFIG_STATUS <<\EOF
26472   # Split the substitutions into bite-sized pieces for seds with
26473   # small command number limits, like on Digital OSF/1 and HP-UX.
26474   ac_max_sed_lines=48
26475   ac_sed_frag=1 # Number of current file.
26476   ac_beg=1 # First line for current file.
26477   ac_end=$ac_max_sed_lines # Line after last line for current file.
26478   ac_more_lines=:
26479   ac_sed_cmds=
26480   while $ac_more_lines; do
26481     if test $ac_beg -gt 1; then
26482       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26483     else
26484       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26485     fi
26486     if test ! -s $tmp/subs.frag; then
26487       ac_more_lines=false
26488     else
26489       # The purpose of the label and of the branching condition is to
26490       # speed up the sed processing (if there are no `@' at all, there
26491       # is no need to browse any of the substitutions).
26492       # These are the two extra sed commands mentioned above.
26493       (echo ':t
26494   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
26495       # It is possible to make a multiline substitution using escaped newlines.
26496       # Ensure that we do not split the substitution between script fragments.
26497       ac_BEG=$ac_end
26498       ac_END=`expr $ac_end + $ac_max_sed_lines`
26499       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
26500       if test -s $tmp/subs.next; then
26501         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
26502         if test ! -s $tmp/subs.edit; then
26503           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
26504           if test ! -s $tmp/subs.edit; then
26505             if test $ac_beg -gt 1; then
26506               ac_end=`expr $ac_end - 1`
26507               continue
26508             fi
26509           fi
26510         fi
26511       fi
26512
26513       if test -z "$ac_sed_cmds"; then
26514         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
26515       else
26516         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
26517       fi
26518       ac_sed_frag=`expr $ac_sed_frag + 1`
26519       ac_beg=$ac_end
26520       ac_end=`expr $ac_end + $ac_max_sed_lines`
26521     fi
26522   done
26523   if test -z "$ac_sed_cmds"; then
26524     ac_sed_cmds=cat
26525   fi
26526 fi # test -n "$CONFIG_FILES"
26527
26528 EOF
26529 cat >>$CONFIG_STATUS <<\EOF
26530 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26531   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26532   case $ac_file in
26533   - | *:- | *:-:* ) # input from stdin
26534         cat >$tmp/stdin
26535         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26536         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26537   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26538         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26539   * )   ac_file_in=$ac_file.in ;;
26540   esac
26541
26542   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26543   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26544          X"$ac_file" : 'X\(//\)[^/]' \| \
26545          X"$ac_file" : 'X\(//\)$' \| \
26546          X"$ac_file" : 'X\(/\)' \| \
26547          .     : '\(.\)' 2>/dev/null ||
26548 echo X"$ac_file" |
26549     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26550           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26551           /^X\(\/\/\)$/{ s//\1/; q; }
26552           /^X\(\/\).*/{ s//\1/; q; }
26553           s/.*/./; q'`
26554   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26555     { case "$ac_dir" in
26556   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26557   *)                      as_incr_dir=.;;
26558 esac
26559 as_dummy="$ac_dir"
26560 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26561   case $as_mkdir_dir in
26562     # Skip DOS drivespec
26563     ?:) as_incr_dir=$as_mkdir_dir ;;
26564     *)
26565       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26566       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26567     ;;
26568   esac
26569 done; }
26570
26571     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
26572     # A "../" for each directory in $ac_dir_suffix.
26573     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
26574   else
26575     ac_dir_suffix= ac_dots=
26576   fi
26577
26578   case $srcdir in
26579   .)  ac_srcdir=.
26580       if test -z "$ac_dots"; then
26581          ac_top_srcdir=.
26582       else
26583          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
26584       fi ;;
26585   [\\/]* | ?:[\\/]* )
26586       ac_srcdir=$srcdir$ac_dir_suffix;
26587       ac_top_srcdir=$srcdir ;;
26588   *) # Relative path.
26589     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
26590     ac_top_srcdir=$ac_dots$srcdir ;;
26591   esac
26592
26593   case $INSTALL in
26594   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26595   *) ac_INSTALL=$ac_dots$INSTALL ;;
26596   esac
26597
26598   if test x"$ac_file" != x-; then
26599     { echo "$as_me:26599: creating $ac_file" >&5
26600 echo "$as_me: creating $ac_file" >&6;}
26601     rm -f "$ac_file"
26602   fi
26603   # Let's still pretend it is `configure' which instantiates (i.e., don't
26604   # use $as_me), people would be surprised to read:
26605   #    /* config.h.  Generated automatically by config.status.  */
26606   configure_input="Generated automatically from `echo $ac_file_in |
26607                                                  sed 's,.*/,,'` by configure."
26608
26609   # First look for the input files in the build tree, otherwise in the
26610   # src tree.
26611   ac_file_inputs=`IFS=:
26612     for f in $ac_file_in; do
26613       case $f in
26614       -) echo $tmp/stdin ;;
26615       [\\/$]*)
26616          # Absolute (can't be DOS-style, as IFS=:)
26617          test -f "$f" || { { echo "$as_me:26617: error: cannot find input file: $f" >&5
26618 echo "$as_me: error: cannot find input file: $f" >&2;}
26619    { (exit 1); exit 1; }; }
26620          echo $f;;
26621       *) # Relative
26622          if test -f "$f"; then
26623            # Build tree
26624            echo $f
26625          elif test -f "$srcdir/$f"; then
26626            # Source tree
26627            echo $srcdir/$f
26628          else
26629            # /dev/null tree
26630            { { echo "$as_me:26630: error: cannot find input file: $f" >&5
26631 echo "$as_me: error: cannot find input file: $f" >&2;}
26632    { (exit 1); exit 1; }; }
26633          fi;;
26634       esac
26635     done` || { (exit 1); exit 1; }
26636 EOF
26637 cat >>$CONFIG_STATUS <<\EOF
26638   ac_warn_datarootdir=no
26639   if test x"$ac_file" != x-; then
26640     for ac_item in $ac_file_inputs
26641     do
26642       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
26643       if test -n "$ac_seen"; then
26644         ac_used=`grep '@datarootdir@' $ac_item`
26645         if test -z "$ac_used"; then
26646           { echo "$as_me:26646: WARNING: datarootdir was used implicitly but not set:
26647 $ac_seen" >&5
26648 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
26649 $ac_seen" >&2;}
26650           ac_warn_datarootdir=yes
26651         fi
26652       fi
26653       ac_seen=`grep '${datarootdir}' $ac_item`
26654       if test -n "$ac_seen"; then
26655         { echo "$as_me:26655: WARNING: datarootdir was used explicitly but not set:
26656 $ac_seen" >&5
26657 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
26658 $ac_seen" >&2;}
26659         ac_warn_datarootdir=yes
26660       fi
26661     done
26662   fi
26663
26664 if test "x$ac_warn_datarootdir" = xyes; then
26665   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
26666 fi
26667
26668 EOF
26669 cat >>$CONFIG_STATUS <<EOF
26670   sed "$ac_vpsub
26671 $extrasub
26672 EOF
26673 cat >>$CONFIG_STATUS <<\EOF
26674 :t
26675 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26676 s,@configure_input@,$configure_input,;t t
26677 s,@srcdir@,$ac_srcdir,;t t
26678 s,@top_srcdir@,$ac_top_srcdir,;t t
26679 s,@INSTALL@,$ac_INSTALL,;t t
26680 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
26681   rm -f $tmp/stdin
26682   if test x"$ac_file" != x-; then
26683     cp $tmp/out $ac_file
26684
26685     for ac_name in prefix exec_prefix datarootdir
26686     do
26687         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
26688         if test -n "$ac_seen"; then
26689             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
26690             if test -z "$ac_init"; then
26691               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
26692               { echo "$as_me:26692: WARNING: Variable $ac_name is used but was not set:
26693 $ac_seen" >&5
26694 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
26695 $ac_seen" >&2;}
26696             fi
26697         fi
26698     done
26699     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
26700     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
26701     if test -s $tmp/out; then
26702       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
26703       { echo "$as_me:26703: WARNING: Some variables may not be substituted:
26704 $ac_seen" >&5
26705 echo "$as_me: WARNING: Some variables may not be substituted:
26706 $ac_seen" >&2;}
26707     fi
26708   else
26709     cat $tmp/out
26710   fi
26711   rm -f $tmp/out
26712
26713 done
26714 EOF
26715 cat >>$CONFIG_STATUS <<\EOF
26716
26717 #
26718 # CONFIG_HEADER section.
26719 #
26720
26721 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
26722 # NAME is the cpp macro being defined and VALUE is the value it is being given.
26723 #
26724 # ac_d sets the value in "#define NAME VALUE" lines.
26725 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
26726 ac_dB='[        ].*$,\1#\2'
26727 ac_dC=' '
26728 ac_dD=',;t'
26729 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
26730 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
26731 ac_iB='\([      ]\),\1#\2define\3'
26732 ac_iC=' '
26733 ac_iD='\4,;t'
26734 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
26735 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
26736 ac_uB='$,\1#\2define\3'
26737 ac_uC=' '
26738 ac_uD=',;t'
26739
26740 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
26741   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26742   case $ac_file in
26743   - | *:- | *:-:* ) # input from stdin
26744         cat >$tmp/stdin
26745         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26746         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26747   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26748         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26749   * )   ac_file_in=$ac_file.in ;;
26750   esac
26751
26752   test x"$ac_file" != x- && { echo "$as_me:26752: creating $ac_file" >&5
26753 echo "$as_me: creating $ac_file" >&6;}
26754
26755   # First look for the input files in the build tree, otherwise in the
26756   # src tree.
26757   ac_file_inputs=`IFS=:
26758     for f in $ac_file_in; do
26759       case $f in
26760       -) echo $tmp/stdin ;;
26761       [\\/$]*)
26762          # Absolute (can't be DOS-style, as IFS=:)
26763          test -f "$f" || { { echo "$as_me:26763: error: cannot find input file: $f" >&5
26764 echo "$as_me: error: cannot find input file: $f" >&2;}
26765    { (exit 1); exit 1; }; }
26766          echo $f;;
26767       *) # Relative
26768          if test -f "$f"; then
26769            # Build tree
26770            echo $f
26771          elif test -f "$srcdir/$f"; then
26772            # Source tree
26773            echo $srcdir/$f
26774          else
26775            # /dev/null tree
26776            { { echo "$as_me:26776: error: cannot find input file: $f" >&5
26777 echo "$as_me: error: cannot find input file: $f" >&2;}
26778    { (exit 1); exit 1; }; }
26779          fi;;
26780       esac
26781     done` || { (exit 1); exit 1; }
26782   # Remove the trailing spaces.
26783   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
26784
26785 EOF
26786
26787 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
26788 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
26789 # be either 'cat' or 'sort'.
26790 cat confdefs.h | uniq >conftest.vals
26791
26792 # Break up conftest.vals because some shells have a limit on
26793 # the size of here documents, and old seds have small limits too.
26794
26795 rm -f conftest.tail
26796 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
26797 while grep . conftest.vals >/dev/null
26798 do
26799   # Write chunks of a limited-size here document to conftest.frag.
26800   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
26801   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
26802   echo 'CEOF' >> $CONFIG_STATUS
26803   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
26804   rm -f conftest.vals
26805   mv conftest.tail conftest.vals
26806 done
26807 rm -f conftest.vals
26808
26809 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
26810 # marker @DEFS@.
26811 echo '  cat >> conftest.edit <<CEOF
26812 /@DEFS@/r conftest.frag
26813 /@DEFS@/d
26814 CEOF
26815 sed -f conftest.edit $tmp/in > $tmp/out
26816 rm -f $tmp/in
26817 mv $tmp/out $tmp/in
26818 rm -f conftest.edit conftest.frag
26819 ' >> $CONFIG_STATUS
26820
26821 cat >>$CONFIG_STATUS <<\EOF
26822   # Let's still pretend it is `configure' which instantiates (i.e., don't
26823   # use $as_me), people would be surprised to read:
26824   #    /* config.h.  Generated automatically by config.status.  */
26825   if test x"$ac_file" = x-; then
26826     echo "/* Generated automatically by configure.  */" >$tmp/config.h
26827   else
26828     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
26829   fi
26830   cat $tmp/in >>$tmp/config.h
26831   rm -f $tmp/in
26832   if test x"$ac_file" != x-; then
26833     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
26834       { echo "$as_me:26834: $ac_file is unchanged" >&5
26835 echo "$as_me: $ac_file is unchanged" >&6;}
26836     else
26837       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26838          X"$ac_file" : 'X\(//\)[^/]' \| \
26839          X"$ac_file" : 'X\(//\)$' \| \
26840          X"$ac_file" : 'X\(/\)' \| \
26841          .     : '\(.\)' 2>/dev/null ||
26842 echo X"$ac_file" |
26843     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26844           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26845           /^X\(\/\/\)$/{ s//\1/; q; }
26846           /^X\(\/\).*/{ s//\1/; q; }
26847           s/.*/./; q'`
26848       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26849         { case "$ac_dir" in
26850   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26851   *)                      as_incr_dir=.;;
26852 esac
26853 as_dummy="$ac_dir"
26854 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26855   case $as_mkdir_dir in
26856     # Skip DOS drivespec
26857     ?:) as_incr_dir=$as_mkdir_dir ;;
26858     *)
26859       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26860       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26861     ;;
26862   esac
26863 done; }
26864
26865       fi
26866       rm -f $ac_file
26867       mv $tmp/config.h $ac_file
26868     fi
26869   else
26870     cat $tmp/config.h
26871     rm -f $tmp/config.h
26872   fi
26873 done
26874 EOF
26875 cat >>$CONFIG_STATUS <<\EOF
26876 #
26877 # CONFIG_COMMANDS section.
26878 #
26879 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
26880   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
26881   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
26882
26883   case $ac_dest in
26884     default )
26885 if test "x$cf_with_tests" != xno ; then
26886
26887 for cf_dir in test
26888 do
26889         if test ! -d $srcdir/$cf_dir; then
26890                 continue
26891         elif test -f $srcdir/$cf_dir/programs; then
26892                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
26893         fi
26894 done
26895
26896 fi
26897
26898 cf_prefix=$LIB_PREFIX
26899
26900 case $cf_cv_shlib_version in
26901 (cygdll|msysdll|mingw)
26902         TINFO_NAME=$TINFO_ARG_SUFFIX
26903         TINFO_SUFFIX=.dll
26904         ;;
26905 esac
26906
26907 if test -n "$TINFO_SUFFIX" ; then
26908         case $TINFO_SUFFIX in
26909         (tw*)
26910                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
26911                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
26912                 ;;
26913         (t*)
26914                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
26915                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
26916                 ;;
26917         (w*)
26918                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
26919                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
26920                 ;;
26921         esac
26922 fi
26923
26924 for cf_dir in $SRC_SUBDIRS
26925 do
26926         if test ! -d $srcdir/$cf_dir ; then
26927                 continue
26928         elif test -f $srcdir/$cf_dir/modules; then
26929
26930                 SHARED_LIB=
26931                 Libs_To_Make=
26932                 cf_awk_program=
26933                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
26934                 then
26935                         cf_awk_program="$cf_awk_program\
26936 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
26937 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
26938 "
26939                 fi
26940
26941                 if test "x$WILDCARD_SYMS" = xno
26942                 then
26943                         cf_awk_program="$cf_awk_program\
26944 /[      ]_\\*;/ { skip=1; next; }\
26945 "
26946                 fi
26947
26948                 if test "x$cf_awk_program" != "x"
26949                 then
26950                         cat >>$cf_dir/Makefile <<CF_EOF
26951
26952 # Generated by CF_LIB_RULES
26953 resulting.map: $UNALTERED_SYMS
26954         $AWK 'BEGIN { skip = 1; last=""; } \
26955 $cf_awk_program \
26956 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
26957  skip = 0; last = \$\$0; } \
26958 END { print last; }' < $UNALTERED_SYMS >\$@
26959
26960 distclean::
26961         rm -f resulting.map
26962 CF_EOF
26963                 fi
26964
26965                 for cf_item in $cf_LIST_MODELS
26966                 do
26967
26968         case X$cf_item in
26969         (Xlibtool)
26970                 cf_suffix='.la'
26971                 cf_depsuf=$cf_suffix
26972                 ;;
26973         (Xdebug)
26974                 cf_suffix='_g.a'
26975                 cf_depsuf=$cf_suffix
26976                 ;;
26977         (Xprofile)
26978                 cf_suffix='_p.a'
26979                 cf_depsuf=$cf_suffix
26980                 ;;
26981         (Xshared)
26982                 case $cf_cv_system_name in
26983                 (aix[5-7]*)
26984                         cf_suffix='.so'
26985                         cf_depsuf=$cf_suffix
26986                         ;;
26987                 (cygwin*|msys*|mingw*)
26988                         cf_suffix='.dll'
26989                         cf_depsuf='.dll.a'
26990                         ;;
26991                 (darwin*)
26992                         cf_suffix='.dylib'
26993                         cf_depsuf=$cf_suffix
26994                         ;;
26995                 (hpux*)
26996                         case $target in
26997                         (ia64*)
26998                                 cf_suffix='.so'
26999                                 cf_depsuf=$cf_suffix
27000                                 ;;
27001                         (*)
27002                                 cf_suffix='.sl'
27003                                 cf_depsuf=$cf_suffix
27004                                 ;;
27005                         esac
27006                         ;;
27007                 (*)
27008                         cf_suffix='.so'
27009                         cf_depsuf=$cf_suffix
27010                         ;;
27011                 esac
27012                 ;;
27013         (*)
27014                 cf_suffix='.a'
27015                 cf_depsuf=$cf_suffix
27016                 ;;
27017         esac
27018         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27019         then
27020                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27021                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27022         fi
27023
27024                         cf_libname=$cf_dir
27025                         test "$cf_dir" = c++ && cf_libname=ncurses++
27026                         if test $cf_item = shared ; then
27027                                 if test -n "${LIB_SUFFIX}"
27028                                 then
27029                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27030                                 else
27031                                         cf_shared_suffix="$cf_suffix"
27032                                 fi
27033                                 if test "$cf_cv_do_symlinks" = yes ; then
27034                                         cf_version_name=
27035
27036                                         case "$cf_cv_shlib_version" in
27037                                         (rel)
27038                                                 cf_version_name=REL_VERSION
27039                                                 ;;
27040                                         (abi)
27041                                                 cf_version_name=ABI_VERSION
27042                                                 ;;
27043                                         esac
27044
27045                                         if test -n "$cf_version_name"
27046                                         then
27047                                                 case "$cf_cv_system_name" in
27048                                                 (darwin*)
27049                                                         # "w", etc?
27050                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
27051                                                         ;;
27052                                                 (*)
27053                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
27054                                                         ;;
27055                                                 esac
27056                                         fi
27057                                         if test -n "${USE_LIB_SUFFIX}"
27058                                         then
27059                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27060                                         else
27061                                                 cf_shared_suffix="$cf_suffix"
27062                                         fi
27063                                 fi
27064                                 # cygwin needs import library, and has unique naming convention
27065                                 # use autodetected ${cf_prefix} for import lib and static lib, but
27066                                 # use 'cyg' prefix for shared lib.
27067                                 case $cf_cv_shlib_version in
27068                                 (cygdll)
27069                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27070                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
27071                                         ;;
27072                                 (msysdll)
27073                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27074                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
27075                                         ;;
27076                                 (mingw)
27077                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27078                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
27079                                         ;;
27080                                 (*)
27081                                         cf_add_lib=
27082                                         ;;
27083                                 esac
27084                                 if test -n "$cf_add_lib"
27085                                 then
27086                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27087                                         continue
27088                                 fi
27089                         fi
27090                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
27091                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27092                 done
27093
27094                 if test $cf_dir = ncurses ; then
27095                         cf_subsets="$LIB_SUBSETS"
27096                         cf_r_parts="$cf_subsets"
27097                         cf_liblist="$Libs_To_Make"
27098
27099                         while test -n "$cf_r_parts"
27100                         do
27101                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
27102                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
27103                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
27104                                         cf_add_lib=
27105                                         case $cf_l_parts in
27106                                         (*termlib*)
27107                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
27108                                                 ;;
27109                                         (*ticlib*)
27110                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
27111                                                 ;;
27112                                         (*)
27113                                                 break
27114                                                 ;;
27115                                         esac
27116                                         if test -n "$cf_add_lib"; then
27117                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
27118                                         fi
27119                                 else
27120                                         break
27121                                 fi
27122                         done
27123                 else
27124                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
27125                 fi
27126
27127                 if test $cf_dir = c++; then
27128                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
27129                                 cf_list=
27130                                 for cf_item in $Libs_To_Make
27131                                 do
27132                                         case $cf_item in
27133                                         (*.a)
27134                                                 ;;
27135                                         (*)
27136                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
27137                                                 ;;
27138                                         esac
27139                                         for cf_test in $cf_list
27140                                         do
27141                                                 if test "$cf_test" = "$cf_item"
27142                                                 then
27143                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
27144                                                         cf_item=
27145                                                         break
27146                                                 fi
27147                                         done
27148                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
27149                                 done
27150                                 Libs_To_Make="$cf_list"
27151                         fi
27152                 fi
27153
27154                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
27155                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
27156                         $cf_dir/Makefile >$cf_dir/Makefile.out
27157                 mv $cf_dir/Makefile.out $cf_dir/Makefile
27158
27159                 $AWK -f $srcdir/mk-0th.awk \
27160                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
27161                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27162
27163                 for cf_subset in $cf_subsets
27164                 do
27165                         cf_subdirs=
27166                         for cf_item in $cf_LIST_MODELS
27167                         do
27168
27169                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
27170
27171 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27172
27173                         CXX_MODEL=$cf_ITEM
27174                         if test "$CXX_MODEL" = SHARED; then
27175                                 case $cf_cv_shlib_version in
27176                                 (cygdll|msysdll|mingw)
27177                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
27178
27179 echo "${as_me:-configure}:27179: testing overriding CXX_MODEL to SHARED ..." 1>&5
27180
27181                                         with_shared_cxx=yes
27182                                         ;;
27183                                 (*)
27184                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
27185                                         ;;
27186                                 esac
27187                         fi
27188
27189         case X$cf_item in
27190         (Xlibtool)
27191                 cf_suffix='.la'
27192                 cf_depsuf=$cf_suffix
27193                 ;;
27194         (Xdebug)
27195                 cf_suffix='_g.a'
27196                 cf_depsuf=$cf_suffix
27197                 ;;
27198         (Xprofile)
27199                 cf_suffix='_p.a'
27200                 cf_depsuf=$cf_suffix
27201                 ;;
27202         (Xshared)
27203                 case $cf_cv_system_name in
27204                 (aix[5-7]*)
27205                         cf_suffix='.so'
27206                         cf_depsuf=$cf_suffix
27207                         ;;
27208                 (cygwin*|msys*|mingw*)
27209                         cf_suffix='.dll'
27210                         cf_depsuf='.dll.a'
27211                         ;;
27212                 (darwin*)
27213                         cf_suffix='.dylib'
27214                         cf_depsuf=$cf_suffix
27215                         ;;
27216                 (hpux*)
27217                         case $target in
27218                         (ia64*)
27219                                 cf_suffix='.so'
27220                                 cf_depsuf=$cf_suffix
27221                                 ;;
27222                         (*)
27223                                 cf_suffix='.sl'
27224                                 cf_depsuf=$cf_suffix
27225                                 ;;
27226                         esac
27227                         ;;
27228                 (*)
27229                         cf_suffix='.so'
27230                         cf_depsuf=$cf_suffix
27231                         ;;
27232                 esac
27233                 ;;
27234         (*)
27235                 cf_suffix='.a'
27236                 cf_depsuf=$cf_suffix
27237                 ;;
27238         esac
27239         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27240         then
27241                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27242                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27243         fi
27244
27245         case $cf_item in
27246         (libtool) cf_subdir='obj_lo'  ;;
27247         (normal)  cf_subdir='objects' ;;
27248         (debug)   cf_subdir='obj_g' ;;
27249         (profile) cf_subdir='obj_p' ;;
27250         (shared)
27251                 case $cf_cv_system_name in
27252                 (cygwin|msys)
27253                         cf_subdir='objects' ;;
27254                 (*)
27255                         cf_subdir='obj_s' ;;
27256                 esac
27257         esac
27258
27259                         # Test for case where we build libtinfo with a different name.
27260                         cf_libname=$cf_dir
27261                         if test $cf_dir = ncurses ; then
27262                                 case $cf_subset in
27263                                 (*base*)
27264                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
27265                                         ;;
27266                                 (*termlib*)
27267                                         cf_libname=$TINFO_LIB_SUFFIX
27268                                         ;;
27269                                 (ticlib*)
27270                                         cf_libname=$TICS_LIB_SUFFIX
27271                                         ;;
27272                                 esac
27273                         elif test $cf_dir = c++ ; then
27274                                 cf_libname=ncurses++$USE_LIB_SUFFIX
27275                         else
27276                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
27277                         fi
27278                         if test -n "${USE_ARG_SUFFIX}" ; then
27279                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
27280                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
27281                         fi
27282
27283                         # These dependencies really are for development, not
27284                         # builds, but they are useful in porting, too.
27285                         cf_depend="../include/ncurses_cfg.h"
27286                         if test "$srcdir" = "."; then
27287                                 cf_reldir="."
27288                         else
27289                                 cf_reldir="\${srcdir}"
27290                         fi
27291
27292                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
27293                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
27294                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
27295                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
27296                         fi
27297
27298                         cf_dir_suffix=
27299                         old_cf_suffix="$cf_suffix"
27300                         if test "$cf_cv_shlib_version_infix" = yes ; then
27301                         if test -n "$USE_LIB_SUFFIX" ; then
27302                                 case $USE_LIB_SUFFIX in
27303                                 (tw*)
27304                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
27305                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
27306                                         cf_dir_suffix=tw$EXTRA_SUFFIX
27307                                         ;;
27308                                 (t*)
27309                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
27310                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
27311                                         cf_dir_suffix=t$EXTRA_SUFFIX
27312                                         ;;
27313                                 (w*)
27314                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
27315                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
27316                                         cf_dir_suffix=w$EXTRA_SUFFIX
27317                                         ;;
27318                                 (*)
27319                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
27320                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
27321                                         cf_dir_suffix=$EXTRA_SUFFIX
27322                                         ;;
27323                                 esac
27324                         fi
27325                         fi
27326
27327                         $AWK -f $srcdir/mk-1st.awk \
27328                                 name=${cf_libname}${cf_dir_suffix} \
27329                                 traces=$LIB_TRACING \
27330                                 MODEL=$cf_ITEM \
27331                                 CXX_MODEL=$CXX_MODEL \
27332                                 model=$cf_subdir \
27333                                 prefix=$cf_prefix \
27334                                 suffix=$cf_suffix \
27335                                 subset=$cf_subset \
27336                                 driver=$cf_cv_term_driver \
27337                                 SymLink="$LN_S" \
27338                                 TermlibRoot=$TINFO_NAME \
27339                                 TermlibSuffix=$TINFO_SUFFIX \
27340                                 ShlibVer=$cf_cv_shlib_version \
27341                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
27342                                 ReLink=${cf_cv_do_relink:-no} \
27343                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
27344                                 DoLinks=$cf_cv_do_symlinks \
27345                                 rmSoLocs=$cf_cv_rm_so_locs \
27346                                 ldconfig="$LDCONFIG" \
27347                                 overwrite=$WITH_OVERWRITE \
27348                                 depend="$cf_depend" \
27349                                 host="$host" \
27350                                 libtool_version="$LIBTOOL_VERSION" \
27351                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27352
27353                         cf_suffix="$old_cf_suffix"
27354
27355                         for cf_subdir2 in $cf_subdirs lib
27356                         do
27357                                 test $cf_subdir = $cf_subdir2 && break
27358                         done
27359                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
27360                         $AWK -f $srcdir/mk-2nd.awk \
27361                                 name=$cf_dir \
27362                                 traces=$LIB_TRACING \
27363                                 MODEL=$cf_ITEM \
27364                                 model=$cf_subdir \
27365                                 subset=$cf_subset \
27366                                 srcdir=$srcdir \
27367                                 echo=$WITH_ECHO \
27368                                 crenames=$cf_cv_prog_CC_c_o \
27369                                 cxxrenames=$cf_cv_prog_CXX_c_o \
27370                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27371                         cf_subdirs="$cf_subdirs $cf_subdir"
27372                         done
27373                 done
27374         fi
27375
27376         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
27377 done
27378
27379 for cf_dir in $SRC_SUBDIRS
27380 do
27381         if test ! -d $srcdir/$cf_dir ; then
27382                 continue
27383         fi
27384
27385         if test -f $cf_dir/Makefile ; then
27386                 case "$cf_dir" in
27387                 (Ada95)
27388                         echo 'libs \' >> Makefile
27389                         echo 'install.libs \' >> Makefile
27390                         echo 'uninstall.libs ::' >> Makefile
27391                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
27392                         ;;
27393                 esac
27394         fi
27395
27396         if test -f $srcdir/$cf_dir/modules; then
27397                 echo >> Makefile
27398                 if test -f $srcdir/$cf_dir/headers; then
27399 cat >> Makefile <<CF_EOF
27400 install.includes \\
27401 uninstall.includes \\
27402 CF_EOF
27403                 fi
27404 if test "$cf_dir" != "c++" ; then
27405 echo 'lint \' >> Makefile
27406 fi
27407 cat >> Makefile <<CF_EOF
27408 libs \\
27409 lintlib \\
27410 install.libs \\
27411 uninstall.libs \\
27412 install.$cf_dir \\
27413 uninstall.$cf_dir ::
27414         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27415 CF_EOF
27416         elif test -f $srcdir/$cf_dir/headers; then
27417 cat >> Makefile <<CF_EOF
27418
27419 libs \\
27420 install.libs \\
27421 uninstall.libs \\
27422 install.includes \\
27423 uninstall.includes ::
27424         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27425 CF_EOF
27426 fi
27427 done
27428
27429 if test "x$cf_with_db_install" = xyes; then
27430 cat >> Makefile <<CF_EOF
27431
27432 install.libs uninstall.libs \\
27433 install.data uninstall.data ::
27434 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27435 CF_EOF
27436 else
27437 cat >> Makefile <<CF_EOF
27438
27439 install.libs uninstall.libs ::
27440         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27441 CF_EOF
27442 fi
27443
27444 if test "x$cf_with_manpages" = xyes; then
27445 cat >> Makefile <<CF_EOF
27446
27447 install.man \\
27448 uninstall.man ::
27449         cd man && \${MAKE} \${TOP_MFLAGS} \$@
27450 CF_EOF
27451 fi
27452
27453 cat >> Makefile <<CF_EOF
27454
27455 distclean ::
27456         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
27457         rm -f headers.sh headers.sed mk_shared_lib.sh
27458         rm -f edit_man.* man_alias.*
27459         rm -rf \${DIRS_TO_MAKE}
27460 CF_EOF
27461
27462 # Special case: tack's manpage lives in its own directory.
27463 if test "x$cf_with_manpages" = xyes; then
27464 if test "x$cf_with_tack" = "xyes"; then
27465 cat >> Makefile <<CF_EOF
27466
27467 install.man \\
27468 uninstall.man ::
27469         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
27470 CF_EOF
27471 fi
27472 fi
27473
27474 rm -f headers.sed headers.sh
27475
27476 echo creating headers.sh
27477 cat >headers.sh <<CF_EOF
27478 #! $SHELL
27479 # This shell script is generated by the 'configure' script.  It is invoked in a
27480 # subdirectory of the build tree.  It generates a sed-script in the parent
27481 # directory that is used to adjust includes for header files that reside in a
27482 # subdirectory of /usr/include, etc.
27483 PRG=""
27484 while test \$# != 3
27485 do
27486 PRG="\$PRG \$1"; shift
27487 done
27488 DST=\$1
27489 REF=\$2
27490 SRC=\$3
27491 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
27492 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
27493 echo installing \$SRC in \$DST
27494 CF_EOF
27495
27496 if test $WITH_CURSES_H = yes; then
27497         cat >>headers.sh <<CF_EOF
27498 case \$DST in
27499 (/*/include/*)
27500         END=\`basename \$DST\`
27501         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27502         do
27503                 NAME=\`basename \$i\`
27504                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27505         done
27506         ;;
27507 (*)
27508         echo "" >> \$TMPSED
27509         ;;
27510 esac
27511 CF_EOF
27512
27513 else
27514         cat >>headers.sh <<CF_EOF
27515 case \$DST in
27516 (/*/include/*)
27517         END=\`basename \$DST\`
27518         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27519         do
27520                 NAME=\`basename \$i\`
27521                 if test "\$NAME" = "curses.h"
27522                 then
27523                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27524                         NAME=ncurses.h
27525                 fi
27526                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27527         done
27528         ;;
27529 (*)
27530         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27531         ;;
27532 esac
27533 CF_EOF
27534 fi
27535 cat >>headers.sh <<CF_EOF
27536 rm -f \$TMPSRC
27537 sed -f \$TMPSED \$SRC > \$TMPSRC
27538 NAME=\`basename \$SRC\`
27539 CF_EOF
27540 if test $WITH_CURSES_H != yes; then
27541         cat >>headers.sh <<CF_EOF
27542 test "\$NAME" = "curses.h" && NAME=ncurses.h
27543 CF_EOF
27544 fi
27545 cat >>headers.sh <<CF_EOF
27546 # Just in case someone gzip'd manpages, remove the conflicting copy.
27547 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
27548
27549 eval \$PRG \$TMPSRC \$DST/\$NAME
27550 rm -f \$TMPSRC \$TMPSED
27551 CF_EOF
27552
27553 chmod 0755 headers.sh
27554
27555 for cf_dir in $SRC_SUBDIRS
27556 do
27557         if test ! -d $srcdir/$cf_dir ; then
27558                 continue
27559         fi
27560
27561         if test -f $srcdir/$cf_dir/headers; then
27562                 $AWK -f $srcdir/mk-hdr.awk \
27563                         subset="$LIB_SUBSETS" \
27564                         compat="$WITH_CURSES_H" \
27565                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
27566         fi
27567
27568         if test -f $srcdir/$cf_dir/modules; then
27569                 if test "$cf_dir" != "c++" ; then
27570                         cat >>$cf_dir/Makefile <<"CF_EOF"
27571 depend : ${AUTO_SRC}
27572         makedepend -- ${CPPFLAGS} -- ${C_SRC}
27573
27574 # DO NOT DELETE THIS LINE -- make depend depends on it.
27575 CF_EOF
27576                 fi
27577         fi
27578 done
27579
27580 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
27581 if test -z "$USE_OLD_MAKERULES" ; then
27582         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
27583 fi
27584 fi
27585  ;;
27586   esac
27587 done
27588 EOF
27589
27590 cat >>$CONFIG_STATUS <<\EOF
27591
27592 { (exit 0); exit 0; }
27593 EOF
27594 chmod +x $CONFIG_STATUS
27595 ac_clean_files=$ac_clean_files_save
27596
27597 # configure is writing to config.log, and then calls config.status.
27598 # config.status does its own redirection, appending to config.log.
27599 # Unfortunately, on DOS this fails, as config.log is still kept open
27600 # by configure, so config.status won't be able to write to it; its
27601 # output is simply discarded.  So we exec the FD to /dev/null,
27602 # effectively closing config.log, so it can be properly (re)opened and
27603 # appended to by config.status.  When coming back to configure, we
27604 # need to make the FD available again.
27605 if test "$no_create" != yes; then
27606   ac_cs_success=:
27607   exec 5>/dev/null
27608   $SHELL $CONFIG_STATUS || ac_cs_success=false
27609   exec 5>>config.log
27610   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27611   # would make configure fail if this is the last instruction.
27612   $ac_cs_success || { (exit 1); exit 1; }
27613 fi
27614 ${MAKE:-make} preinstall