]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
dde5a1b0f52997fa5614c84be445a7112b3df1e6
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.705 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200111.
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 Ada compiler, 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   --with-tic-path=XXX     specify path of tic for fallbacks
771   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
772   --without-xterm-new     specify if xterm terminfo should be old version
773   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
774   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
775   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
776   --disable-big-core      assume machine has little memory
777   --disable-big-strings   assume compiler has only standard-size strings
778   --enable-termcap        compile in termcap fallback support
779   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
780   --enable-getcap         fast termcap load, no xrefs to terminfo
781   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
782   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
783   --disable-root-environ  restrict environment when running as root
784   --enable-symlinks       make tic use symbolic links not hard links
785   --enable-broken_linker  compile with broken-linker support code
786   --enable-bsdpad         recognize BSD-style prefix padding
787   --enable-widec          compile with wide-char/UTF-8 code
788   --disable-lp64          allow chtype to be long (ignore _LP64)
789   --disable-largefile     omit support for large files
790   --disable-tparm-varargs compile tparm() without varargs interface
791   --disable-tic-depends   link tic library without explicit dependency on ncurses library
792   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
793   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
794   --with-bool=TYPE        override fallback type of bool variable
795   --with-caps=alt         compile with alternate Caps file
796   --with-chtype=TYPE      override type of chtype
797   --with-ospeed=TYPE      override type of ospeed variable
798   --with-mmask-t=TYPE     override type of mmask_t
799   --with-ccharw-max=XXX   override size CCHARW_MAX
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --with-tparm-arg=TYPE   override parameter type of tparm
802   --with-rcs-ids          compile-in RCS identifiers
803 Options to Specify How Manpages are Installed:
804   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
805                           optionally formatted/catonly, e.g., gzip,formatted
806   --with-manpage-renames  specify manpage-renaming
807   --with-manpage-aliases  specify manpage-aliases using .so
808   --with-manpage-symlinks specify manpage-aliases using symlinks
809   --with-manpage-tbl      specify manpage processing with tbl
810 Extensions:
811   --disable-ext-funcs     disable function-extensions
812   --enable-sp-funcs       enable SCREEN-extensions
813   --enable-term-driver    enable terminal-driver
814   --enable-const          compile with extra/non-standard const
815   --enable-ext-colors     compile for 256-color support
816   --enable-ext-mouse      compile for extended mouse-encoding
817   --enable-ext-putwin     compile with extended putwin/screendump
818   --enable-no-padding     compile with $NCURSES_NO_PADDING code
819   --enable-sigwinch       compile with SIGWINCH handler
820   --enable-tcap-names     compile with user-definable terminal capabilities
821 Reentrant Code:
822   --with-pthread          use POSIX thread library
823   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
824   --enable-weak-symbols   enable weak-symbols for pthreads
825   --enable-reentrant      compile with reentrant code
826   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
827   --enable-opaque-form    make form-library structures "opaque"
828   --enable-opaque-menu    make menu-library structures "opaque"
829   --enable-opaque-panel   make panel-library structures "opaque"
830   --with-wrap-prefix=XXX  override prefix used for public variables
831 Development Code:
832   --without-develop       disable development options
833   --enable-hard-tabs      compile with hard-tabs code
834   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
835 Experimental Code:
836   --disable-assumed-color do not assume anything about default-colors
837   --disable-hashmap       compile without hashmap scrolling-optimization
838   --enable-colorfgbg      compile-in experimental $COLORFGBG code
839   --enable-fvisibility    compile with -fvisibility=hidden
840   --enable-interop        compile-in interop bindings
841   --enable-safe-sprintf   compile with experimental safe-sprintf code
842   --disable-scroll-hints  compile without scroll-hints code
843   --enable-wgetch-events  compile with wgetch-events code
844 Testing/development Options:
845   --disable-echo          do not display "compiling" commands
846   --disable-stripping     do not strip (debug info) installed executables
847   --enable-warnings       build: turn on GCC compiler warnings
848   --enable-string-hacks   work around bogus compiler/loader warnings
849   --enable-assertions     test: turn on generation of assertion code
850   --with-dmalloc          test: use Gray Watson's dmalloc library
851   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
852   --with-valgrind         test: use valgrind
853   --disable-leaks         test: free permanent memory, analyze leaks
854   --enable-expanded       test: generate functions for certain macros
855   --disable-macros        test: use functions rather than macros
856   --with-trace            test: add trace() function to all models of ncurses
857   --disable-gnat-projects test: disable GNAT projects even if usable
858 Ada Binding Options:
859   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
860   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
861   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
862   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
863   --with-ada-libname=XXX  override default Ada library-name
864   --with-form-libname=XXX override form basename of library
865   --with-menu-libname=XXX override menu basename of library
866   --with-panel-libname=XXX override panel basename of library
867   --with-cxx-libname=XXX override ncurses++ basename of library
868
869 Some influential environment variables:
870   CC          C compiler command
871   CFLAGS      C compiler flags
872   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
873               nonstandard directory <lib dir>
874   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
875               headers in a nonstandard directory <include dir>
876   CPP         C preprocessor
877   CXX         C++ compiler command
878   CXXFLAGS    C++ compiler flags
879   CXXCPP      C++ preprocessor
880
881 Use these variables to override the choices made by `configure' or to help
882 it to find libraries and programs with nonstandard names/locations.
883
884 EOF
885 fi
886
887 if test "$ac_init_help" = "recursive"; then
888   # If there are subdirs, report their specific --help.
889   ac_popdir=`pwd`
890   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
891     cd $ac_subdir
892     # A "../" for each directory in /$ac_subdir.
893     ac_dots=`echo $ac_subdir |
894              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
895
896     case $srcdir in
897     .) # No --srcdir option.  We are building in place.
898       ac_sub_srcdir=$srcdir ;;
899     [\\/]* | ?:[\\/]* ) # Absolute path.
900       ac_sub_srcdir=$srcdir/$ac_subdir ;;
901     *) # Relative path.
902       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
903     esac
904
905     # Check for guested configure; otherwise get Cygnus style configure.
906     if test -f $ac_sub_srcdir/configure.gnu; then
907       echo
908       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
909     elif test -f $ac_sub_srcdir/configure; then
910       echo
911       $SHELL $ac_sub_srcdir/configure  --help=recursive
912     elif test -f $ac_sub_srcdir/configure.ac ||
913            test -f $ac_sub_srcdir/configure.in; then
914       echo
915       $ac_configure --help
916     else
917       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
918     fi
919     cd $ac_popdir
920   done
921 fi
922
923 test -n "$ac_init_help" && exit 0
924 if $ac_init_version; then
925   cat <<\EOF
926
927 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
928 Free Software Foundation, Inc.
929 This configure script is free software; the Free Software Foundation
930 gives unlimited permission to copy, distribute and modify it.
931 EOF
932   exit 0
933 fi
934 exec 5>config.log
935 cat >&5 <<EOF
936 This file contains any messages produced by compilers while
937 running configure, to aid debugging if configure makes a mistake.
938
939 It was created by $as_me, which was
940 generated by GNU Autoconf 2.52.20200111.  Invocation command line was
941
942   $ $0 $@
943
944 EOF
945 {
946 cat <<_ASUNAME
947 ## ---------- ##
948 ## Platform.  ##
949 ## ---------- ##
950
951 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
952 uname -m = `(uname -m) 2>/dev/null || echo unknown`
953 uname -r = `(uname -r) 2>/dev/null || echo unknown`
954 uname -s = `(uname -s) 2>/dev/null || echo unknown`
955 uname -v = `(uname -v) 2>/dev/null || echo unknown`
956
957 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
958 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
959
960 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
961 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
962 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
963 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
964 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
965 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
966 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
967
968 PATH = $PATH
969
970 _ASUNAME
971 } >&5
972
973 cat >&5 <<EOF
974 ## ------------ ##
975 ## Core tests.  ##
976 ## ------------ ##
977
978 EOF
979
980 # Keep a trace of the command line.
981 # Strip out --no-create and --no-recursion so they do not pile up.
982 # Also quote any args containing shell meta-characters.
983 ac_configure_args=
984 ac_sep=
985 for ac_arg
986 do
987   case $ac_arg in
988   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
989   | --no-cr | --no-c) ;;
990   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
991   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
992   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
993     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
994     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
995     ac_sep=" " ;;
996   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
997      ac_sep=" " ;;
998   esac
999   # Get rid of the leading space.
1000 done
1001
1002 # When interrupted or exit'd, cleanup temporary files, and complete
1003 # config.log.  We remove comments because anyway the quotes in there
1004 # would cause problems or look ugly.
1005 trap 'exit_status=$?
1006   # Save into config.log some information that might help in debugging.
1007   echo >&5
1008   echo "## ----------------- ##" >&5
1009   echo "## Cache variables.  ##" >&5
1010   echo "## ----------------- ##" >&5
1011   echo >&5
1012   # The following way of writing the cache mishandles newlines in values,
1013 {
1014   (set) 2>&1 |
1015     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1016     *ac_space=\ *)
1017       sed -n \
1018         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1019           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1020       ;;
1021     *)
1022       sed -n \
1023         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1024       ;;
1025     esac;
1026 } >&5
1027   sed "/^$/d" confdefs.h >conftest.log
1028   if test -s conftest.log; then
1029     echo >&5
1030     echo "## ------------ ##" >&5
1031     echo "## confdefs.h.  ##" >&5
1032     echo "## ------------ ##" >&5
1033     echo >&5
1034     cat conftest.log >&5
1035   fi
1036   (echo; echo) >&5
1037   test "$ac_signal" != 0 &&
1038     echo "$as_me: caught signal $ac_signal" >&5
1039   echo "$as_me: exit $exit_status" >&5
1040   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1041     exit $exit_status
1042      ' 0
1043 for ac_signal in 1 2 13 15; do
1044   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1045 done
1046 ac_signal=0
1047
1048 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1049 rm -rf conftest* confdefs.h
1050 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1051 echo >confdefs.h
1052
1053 # Let the site file select an alternate cache file if it wants to.
1054 # Prefer explicitly selected file to automatically selected ones.
1055 if test -z "$CONFIG_SITE"; then
1056   if test "x$prefix" != xNONE; then
1057     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1058   else
1059     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1060   fi
1061 fi
1062 for ac_site_file in $CONFIG_SITE; do
1063   if test -r "$ac_site_file"; then
1064     { echo "$as_me:1064: loading site script $ac_site_file" >&5
1065 echo "$as_me: loading site script $ac_site_file" >&6;}
1066     cat "$ac_site_file" >&5
1067     . "$ac_site_file"
1068   fi
1069 done
1070
1071 if test -r "$cache_file"; then
1072   # Some versions of bash will fail to source /dev/null (special
1073   # files actually), so we avoid doing that.
1074   if test -f "$cache_file"; then
1075     { echo "$as_me:1075: loading cache $cache_file" >&5
1076 echo "$as_me: loading cache $cache_file" >&6;}
1077     case $cache_file in
1078       [\\/]* | ?:[\\/]* ) . $cache_file;;
1079       *)                      . ./$cache_file;;
1080     esac
1081   fi
1082 else
1083   { echo "$as_me:1083: creating cache $cache_file" >&5
1084 echo "$as_me: creating cache $cache_file" >&6;}
1085   >$cache_file
1086 fi
1087
1088 # Check that the precious variables saved in the cache have kept the same
1089 # value.
1090 ac_cache_corrupted=false
1091 for ac_var in `(set) 2>&1 |
1092                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1093   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1094   eval ac_new_set=\$ac_env_${ac_var}_set
1095   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1096   eval ac_new_val="\$ac_env_${ac_var}_value"
1097   case $ac_old_set,$ac_new_set in
1098     set,)
1099       { echo "$as_me:1099: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1100 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1101       ac_cache_corrupted=: ;;
1102     ,set)
1103       { echo "$as_me:1103: error: \`$ac_var' was not set in the previous run" >&5
1104 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1105       ac_cache_corrupted=: ;;
1106     ,);;
1107     *)
1108       if test "x$ac_old_val" != "x$ac_new_val"; then
1109         { echo "$as_me:1109: error: \`$ac_var' has changed since the previous run:" >&5
1110 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1111         { echo "$as_me:1111:   former value:  $ac_old_val" >&5
1112 echo "$as_me:   former value:  $ac_old_val" >&2;}
1113         { echo "$as_me:1113:   current value: $ac_new_val" >&5
1114 echo "$as_me:   current value: $ac_new_val" >&2;}
1115         ac_cache_corrupted=:
1116       fi;;
1117   esac
1118   # Pass precious variables to config.status.  It doesn't matter if
1119   # we pass some twice (in addition to the command line arguments).
1120   if test "$ac_new_set" = set; then
1121     case $ac_new_val in
1122     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1123       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1124       ac_configure_args="$ac_configure_args '$ac_arg'"
1125       ;;
1126     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1127        ;;
1128     esac
1129   fi
1130 done
1131 if $ac_cache_corrupted; then
1132   { echo "$as_me:1132: error: changes in the environment can compromise the build" >&5
1133 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1134   { { echo "$as_me:1134: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1135 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1136    { (exit 1); exit 1; }; }
1137 fi
1138
1139 ac_ext=c
1140 ac_cpp='$CPP $CPPFLAGS'
1141 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1142 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1143 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1144 ac_main_return=return
1145
1146 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1147   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1148                    ECHO_T='     ' ;;
1149   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1150   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1151 esac
1152 echo "#! $SHELL" >conftest.sh
1153 echo  "exit 0"   >>conftest.sh
1154 chmod +x conftest.sh
1155 if { (echo "$as_me:1155: PATH=\".;.\"; conftest.sh") >&5
1156   (PATH=".;."; conftest.sh) 2>&5
1157   ac_status=$?
1158   echo "$as_me:1158: \$? = $ac_status" >&5
1159   (exit $ac_status); }; then
1160   ac_path_separator=';'
1161 else
1162   ac_path_separator=:
1163 fi
1164 PATH_SEPARATOR="$ac_path_separator"
1165 rm -f conftest.sh
1166
1167 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1168
1169 top_builddir=`pwd`
1170
1171 echo "$as_me:1171: checking for egrep" >&5
1172 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1173 if test "${ac_cv_prog_egrep+set}" = set; then
1174   echo $ECHO_N "(cached) $ECHO_C" >&6
1175 else
1176   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1177                 then ac_cv_prog_egrep='grep -E'
1178                 else ac_cv_prog_egrep='egrep'
1179         fi
1180 fi
1181 echo "$as_me:1181: result: $ac_cv_prog_egrep" >&5
1182 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1183         EGREP=$ac_cv_prog_egrep
1184
1185         test -z "$EGREP" && { { echo "$as_me:1185: error: No egrep program found" >&5
1186 echo "$as_me: error: No egrep program found" >&2;}
1187    { (exit 1); exit 1; }; }
1188
1189 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1190 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1191 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1192 cf_cv_abi_version=${NCURSES_MAJOR}
1193 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1194 cf_cv_timestamp=`date`
1195 echo "$as_me:1195: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1196 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1197
1198 if test -f $srcdir/VERSION ; then
1199         echo "$as_me:1199: checking for package version" >&5
1200 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1201
1202         # if there are not enough fields, cut returns the last one...
1203         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1204         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1205         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1206
1207         # this is how CF_BUNDLED_INTL uses $VERSION:
1208         VERSION="$cf_field1"
1209
1210         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1211         test -z "$VERSION_MAJOR" && { { echo "$as_me:1211: error: missing major-version" >&5
1212 echo "$as_me: error: missing major-version" >&2;}
1213    { (exit 1); exit 1; }; }
1214
1215         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1216         test -z "$VERSION_MINOR" && { { echo "$as_me:1216: error: missing minor-version" >&5
1217 echo "$as_me: error: missing minor-version" >&2;}
1218    { (exit 1); exit 1; }; }
1219
1220         echo "$as_me:1220: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1221 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1222
1223         echo "$as_me:1223: checking for package patch date" >&5
1224 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1225         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1226         case .$VERSION_PATCH in
1227         (.)
1228                 { { echo "$as_me:1228: error: missing patch-date $VERSION_PATCH" >&5
1229 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1230    { (exit 1); exit 1; }; }
1231                 ;;
1232         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1233                 ;;
1234         (*)
1235                 { { echo "$as_me:1235: error: illegal patch-date $VERSION_PATCH" >&5
1236 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1237    { (exit 1); exit 1; }; }
1238                 ;;
1239         esac
1240         echo "$as_me:1240: result: $VERSION_PATCH" >&5
1241 echo "${ECHO_T}$VERSION_PATCH" >&6
1242 else
1243         { { echo "$as_me:1243: error: did not find $srcdir/VERSION" >&5
1244 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1245    { (exit 1); exit 1; }; }
1246 fi
1247
1248 # show the actual data that we have for versions:
1249 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1250
1251 echo "${as_me:-configure}:1251: testing ABI VERSION $VERSION ..." 1>&5
1252
1253 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1254
1255 echo "${as_me:-configure}:1255: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1256
1257 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1258
1259 echo "${as_me:-configure}:1259: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1260
1261 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1262
1263 echo "${as_me:-configure}:1263: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1264
1265         cf_PACKAGE=NCURSES
1266         PACKAGE=ncurses
1267
1268 cat >>confdefs.h <<EOF
1269 #define PACKAGE "$PACKAGE"
1270 EOF
1271
1272 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1273
1274         cat >>confdefs.h <<EOF
1275 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1276 EOF
1277
1278         cat >>confdefs.h <<EOF
1279 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1280 EOF
1281
1282 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1283
1284 # Check whether --with-rel-version or --without-rel-version was given.
1285 if test "${with_rel_version+set}" = set; then
1286   withval="$with_rel_version"
1287   { echo "$as_me:1287: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1288 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1289  cf_cv_rel_version=$withval
1290 fi;
1291
1292  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1293  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1294
1295 if test -n "$NCURSES_MAJOR" ; then
1296   case $NCURSES_MAJOR in
1297   ([0-9]*)
1298         ;;
1299   (*)
1300         { { echo "$as_me:1300: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1301 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1302    { (exit 1); exit 1; }; }
1303         ;;
1304   esac
1305 else
1306   { { echo "$as_me:1306: error: Release major-version value is empty" >&5
1307 echo "$as_me: error: Release major-version value is empty" >&2;}
1308    { (exit 1); exit 1; }; }
1309 fi
1310
1311 if test -n "$NCURSES_MINOR" ; then
1312   case $NCURSES_MINOR in
1313   ([0-9]*)
1314         ;;
1315   (*)
1316         { { echo "$as_me:1316: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1317 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1318    { (exit 1); exit 1; }; }
1319         ;;
1320   esac
1321 else
1322   { { echo "$as_me:1322: error: Release minor-version value is empty" >&5
1323 echo "$as_me: error: Release minor-version value is empty" >&2;}
1324    { (exit 1); exit 1; }; }
1325 fi
1326
1327 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1328
1329 # Check whether --with-abi-version or --without-abi-version was given.
1330 if test "${with_abi_version+set}" = set; then
1331   withval="$with_abi_version"
1332
1333         if test "x$cf_cv_abi_version" != "x$withval"
1334         then
1335                 { echo "$as_me:1335: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1336 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1337                 case $cf_cv_rel_version in
1338                 (5.*)
1339                         cf_cv_rel_version=$withval.0
1340                         ;;
1341                 (6.*)
1342                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1343                         ;;
1344                 esac
1345         fi
1346         cf_cv_abi_version=$withval
1347 fi;
1348
1349 if test -n "$cf_cv_abi_version" ; then
1350   case $cf_cv_abi_version in
1351   ([0-9]*)
1352         ;;
1353   (*)
1354         { { echo "$as_me:1354: error: ABI version is not a number: $cf_cv_abi_version" >&5
1355 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1356    { (exit 1); exit 1; }; }
1357         ;;
1358   esac
1359 else
1360   { { echo "$as_me:1360: error: ABI version value is empty" >&5
1361 echo "$as_me: error: ABI version value is empty" >&2;}
1362    { (exit 1); exit 1; }; }
1363 fi
1364
1365 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1366 then
1367         case $cf_cv_rel_version in
1368         (5.*)
1369                 cf_cv_rel_version=$with_abi_version.0
1370                 ;;
1371         esac
1372 fi
1373
1374 ac_aux_dir=
1375 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1376   if test -f $ac_dir/install-sh; then
1377     ac_aux_dir=$ac_dir
1378     ac_install_sh="$ac_aux_dir/install-sh -c"
1379     break
1380   elif test -f $ac_dir/install.sh; then
1381     ac_aux_dir=$ac_dir
1382     ac_install_sh="$ac_aux_dir/install.sh -c"
1383     break
1384   elif test -f $ac_dir/shtool; then
1385     ac_aux_dir=$ac_dir
1386     ac_install_sh="$ac_aux_dir/shtool install -c"
1387     break
1388   fi
1389 done
1390 if test -z "$ac_aux_dir"; then
1391   { { echo "$as_me:1391: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1392 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1393    { (exit 1); exit 1; }; }
1394 fi
1395 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1396 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1397 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1398
1399 # Make sure we can run config.sub.
1400 $ac_config_sub sun4 >/dev/null 2>&1 ||
1401   { { echo "$as_me:1401: error: cannot run $ac_config_sub" >&5
1402 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1403    { (exit 1); exit 1; }; }
1404
1405 echo "$as_me:1405: checking build system type" >&5
1406 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1407 if test "${ac_cv_build+set}" = set; then
1408   echo $ECHO_N "(cached) $ECHO_C" >&6
1409 else
1410   ac_cv_build_alias=$build_alias
1411 test -z "$ac_cv_build_alias" &&
1412   ac_cv_build_alias=`$ac_config_guess`
1413 test -z "$ac_cv_build_alias" &&
1414   { { echo "$as_me:1414: error: cannot guess build type; you must specify one" >&5
1415 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1416    { (exit 1); exit 1; }; }
1417 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1418   { { echo "$as_me:1418: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1419 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1420    { (exit 1); exit 1; }; }
1421
1422 fi
1423 echo "$as_me:1423: result: $ac_cv_build" >&5
1424 echo "${ECHO_T}$ac_cv_build" >&6
1425 build=$ac_cv_build
1426 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1427 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1428 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1429
1430 echo "$as_me:1430: checking host system type" >&5
1431 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1432 if test "${ac_cv_host+set}" = set; then
1433   echo $ECHO_N "(cached) $ECHO_C" >&6
1434 else
1435   ac_cv_host_alias=$host_alias
1436 test -z "$ac_cv_host_alias" &&
1437   ac_cv_host_alias=$ac_cv_build_alias
1438 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1439   { { echo "$as_me:1439: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1440 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1441    { (exit 1); exit 1; }; }
1442
1443 fi
1444 echo "$as_me:1444: result: $ac_cv_host" >&5
1445 echo "${ECHO_T}$ac_cv_host" >&6
1446 host=$ac_cv_host
1447 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1448 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1449 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1450
1451 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1452         echo "$as_me:1452: checking target system type" >&5
1453 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1454 if test "${ac_cv_target+set}" = set; then
1455   echo $ECHO_N "(cached) $ECHO_C" >&6
1456 else
1457   ac_cv_target_alias=$target_alias
1458 test "x$ac_cv_target_alias" = "x" &&
1459   ac_cv_target_alias=$ac_cv_host_alias
1460 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1461   { { echo "$as_me:1461: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1462 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1463    { (exit 1); exit 1; }; }
1464
1465 fi
1466 echo "$as_me:1466: result: $ac_cv_target" >&5
1467 echo "${ECHO_T}$ac_cv_target" >&6
1468 target=$ac_cv_target
1469 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1470 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1471 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1472
1473 # The aliases save the names the user supplied, while $host etc.
1474 # will get canonicalized.
1475 test -n "$target_alias" &&
1476   test "$program_prefix$program_suffix$program_transform_name" = \
1477     NONENONEs,x,x, &&
1478   program_prefix=${target_alias}-
1479         system_name="$host_os"
1480 else
1481         system_name="`(uname -s -r) 2>/dev/null`"
1482         if test -z "$system_name" ; then
1483                 system_name="`(hostname) 2>/dev/null`"
1484         fi
1485 fi
1486 test -n "$system_name" &&
1487 cat >>confdefs.h <<EOF
1488 #define SYSTEM_NAME "$system_name"
1489 EOF
1490
1491 if test "${cf_cv_system_name+set}" = set; then
1492   echo $ECHO_N "(cached) $ECHO_C" >&6
1493 else
1494   cf_cv_system_name="$system_name"
1495 fi
1496
1497 test -z "$system_name" && system_name="$cf_cv_system_name"
1498 test -n "$cf_cv_system_name" && echo "$as_me:1498: result: Configuring for $cf_cv_system_name" >&5
1499 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1500
1501 if test ".$system_name" != ".$cf_cv_system_name" ; then
1502         echo "$as_me:1502: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1503 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1504         { { echo "$as_me:1504: error: \"Please remove config.cache and try again.\"" >&5
1505 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1506    { (exit 1); exit 1; }; }
1507 fi
1508
1509 # Check whether --with-system-type or --without-system-type was given.
1510 if test "${with_system_type+set}" = set; then
1511   withval="$with_system_type"
1512   { echo "$as_me:1512: WARNING: overriding system type to $withval" >&5
1513 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1514         cf_cv_system_name=$withval
1515         host_os=$withval
1516
1517 fi;
1518
1519 ###     Save the given $CFLAGS to allow user-override.
1520 cf_user_CFLAGS="$CFLAGS"
1521
1522 ###     Default install-location
1523
1524 echo "$as_me:1524: checking for prefix" >&5
1525 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1526 if test "x$prefix" = "xNONE" ; then
1527         case "$cf_cv_system_name" in
1528                 # non-vendor systems don't have a conflict
1529         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1530                 prefix=/usr
1531                 ;;
1532         (*)     prefix=$ac_default_prefix
1533                 ;;
1534         esac
1535 fi
1536 echo "$as_me:1536: result: $prefix" >&5
1537 echo "${ECHO_T}$prefix" >&6
1538
1539 if test "x$prefix" = "xNONE" ; then
1540 echo "$as_me:1540: checking for default include-directory" >&5
1541 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1542 test -n "$verbose" && echo 1>&6
1543 for cf_symbol in \
1544         $includedir \
1545         $includedir/ncurses \
1546         $prefix/include \
1547         $prefix/include/ncurses \
1548         /usr/local/include \
1549         /usr/local/include/ncurses \
1550         /usr/include \
1551         /usr/include/ncurses
1552 do
1553         cf_dir=`eval echo $cf_symbol`
1554         if test -f $cf_dir/curses.h ; then
1555         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1556                 includedir="$cf_symbol"
1557                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1558                 break
1559         fi
1560         fi
1561         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1562 done
1563 echo "$as_me:1563: result: $includedir" >&5
1564 echo "${ECHO_T}$includedir" >&6
1565 fi
1566
1567 ### Defaults for ncurses ABI
1568
1569 case x$cf_cv_abi_version in
1570 (x[6789])
1571         cf_dft_ext_colors=yes
1572         cf_dft_ext_const=yes
1573         cf_dft_ext_mouse=yes
1574         cf_dft_ext_putwin=yes
1575         cf_dft_ext_spfuncs=yes
1576         cf_dft_filter_syms=yes
1577         cf_dft_chtype=uint32_t
1578         cf_dft_mmask_t=uint32_t
1579         cf_dft_interop=yes
1580         cf_dft_tparm_arg=intptr_t
1581         cf_dft_with_lp64=yes
1582         ;;
1583 (*)
1584         cf_dft_ext_colors=no
1585         cf_dft_ext_const=no
1586         cf_dft_ext_mouse=no
1587         cf_dft_ext_putwin=no
1588         cf_dft_ext_spfuncs=no
1589         cf_dft_filter_syms=no
1590         cf_dft_chtype=auto
1591         cf_dft_mmask_t=auto
1592         cf_dft_interop=no
1593         cf_dft_tparm_arg=long
1594         cf_dft_with_lp64=no
1595         ;;
1596 esac
1597
1598 ###     Checks for programs.
1599
1600 # Check whether --with-ada or --without-ada was given.
1601 if test "${with_ada+set}" = set; then
1602   withval="$with_ada"
1603   cf_with_ada=$withval
1604 else
1605   cf_with_ada=yes
1606 fi;
1607
1608 if test "x$cf_with_ada" = xyes
1609 then
1610         cf_prog_cc="gnatgcc gcc cc"
1611 else
1612         cf_prog_cc="gcc cc"
1613 fi
1614
1615 ac_ext=c
1616 ac_cpp='$CPP $CPPFLAGS'
1617 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1618 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1619 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1620 ac_main_return=return
1621 if test -n "$ac_tool_prefix"; then
1622   for ac_prog in $cf_prog_cc
1623   do
1624     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1625 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1626 echo "$as_me:1626: checking for $ac_word" >&5
1627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1628 if test "${ac_cv_prog_CC+set}" = set; then
1629   echo $ECHO_N "(cached) $ECHO_C" >&6
1630 else
1631   if test -n "$CC"; then
1632   ac_cv_prog_CC="$CC" # Let the user override the test.
1633 else
1634   ac_save_IFS=$IFS; IFS=$ac_path_separator
1635 ac_dummy="$PATH"
1636 for ac_dir in $ac_dummy; do
1637   IFS=$ac_save_IFS
1638   test -z "$ac_dir" && ac_dir=.
1639   $as_executable_p "$ac_dir/$ac_word" || continue
1640 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1641 echo "$as_me:1641: found $ac_dir/$ac_word" >&5
1642 break
1643 done
1644
1645 fi
1646 fi
1647 CC=$ac_cv_prog_CC
1648 if test -n "$CC"; then
1649   echo "$as_me:1649: result: $CC" >&5
1650 echo "${ECHO_T}$CC" >&6
1651 else
1652   echo "$as_me:1652: result: no" >&5
1653 echo "${ECHO_T}no" >&6
1654 fi
1655
1656     test -n "$CC" && break
1657   done
1658 fi
1659 if test -z "$CC"; then
1660   ac_ct_CC=$CC
1661   for ac_prog in $cf_prog_cc
1662 do
1663   # Extract the first word of "$ac_prog", so it can be a program name with args.
1664 set dummy $ac_prog; ac_word=$2
1665 echo "$as_me:1665: checking for $ac_word" >&5
1666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1667 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1668   echo $ECHO_N "(cached) $ECHO_C" >&6
1669 else
1670   if test -n "$ac_ct_CC"; then
1671   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1672 else
1673   ac_save_IFS=$IFS; IFS=$ac_path_separator
1674 ac_dummy="$PATH"
1675 for ac_dir in $ac_dummy; do
1676   IFS=$ac_save_IFS
1677   test -z "$ac_dir" && ac_dir=.
1678   $as_executable_p "$ac_dir/$ac_word" || continue
1679 ac_cv_prog_ac_ct_CC="$ac_prog"
1680 echo "$as_me:1680: found $ac_dir/$ac_word" >&5
1681 break
1682 done
1683
1684 fi
1685 fi
1686 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1687 if test -n "$ac_ct_CC"; then
1688   echo "$as_me:1688: result: $ac_ct_CC" >&5
1689 echo "${ECHO_T}$ac_ct_CC" >&6
1690 else
1691   echo "$as_me:1691: result: no" >&5
1692 echo "${ECHO_T}no" >&6
1693 fi
1694
1695   test -n "$ac_ct_CC" && break
1696 done
1697
1698   CC=$ac_ct_CC
1699 fi
1700
1701 test -z "$CC" && { { echo "$as_me:1701: error: no acceptable cc found in \$PATH" >&5
1702 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1703    { (exit 1); exit 1; }; }
1704
1705 # Provide some information about the compiler.
1706 echo "$as_me:1706:" \
1707      "checking for C compiler version" >&5
1708 ac_compiler=`set X $ac_compile; echo $2`
1709 { (eval echo "$as_me:1709: \"$ac_compiler --version </dev/null >&5\"") >&5
1710   (eval $ac_compiler --version </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -v </dev/null >&5\"") >&5
1715   (eval $ac_compiler -v </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719 { (eval echo "$as_me:1719: \"$ac_compiler -V </dev/null >&5\"") >&5
1720   (eval $ac_compiler -V </dev/null >&5) 2>&5
1721   ac_status=$?
1722   echo "$as_me:1722: \$? = $ac_status" >&5
1723   (exit $ac_status); }
1724
1725 cat >conftest.$ac_ext <<_ACEOF
1726 #line 1726 "configure"
1727 #include "confdefs.h"
1728
1729 int
1730 main (void)
1731 {
1732
1733   ;
1734   return 0;
1735 }
1736 _ACEOF
1737 ac_clean_files_save=$ac_clean_files
1738 ac_clean_files="$ac_clean_files a.out a.exe"
1739 # Try to create an executable without -o first, disregard a.out.
1740 # It will help us diagnose broken compilers, and finding out an intuition
1741 # of exeext.
1742 echo "$as_me:1742: checking for C compiler default output" >&5
1743 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1744 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1745 if { (eval echo "$as_me:1745: \"$ac_link_default\"") >&5
1746   (eval $ac_link_default) 2>&5
1747   ac_status=$?
1748   echo "$as_me:1748: \$? = $ac_status" >&5
1749   (exit $ac_status); }; then
1750   # Find the output, starting from the most likely.  This scheme is
1751 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1752 # resort.
1753 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1754                 ls a.out conftest 2>/dev/null;
1755                 ls a.* conftest.* 2>/dev/null`; do
1756   case $ac_file in
1757     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1758     a.out ) # We found the default executable, but exeext='' is most
1759             # certainly right.
1760             break;;
1761     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1762           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1763           export ac_cv_exeext
1764           break;;
1765     * ) break;;
1766   esac
1767 done
1768 else
1769   echo "$as_me: failed program was:" >&5
1770 cat conftest.$ac_ext >&5
1771 { { echo "$as_me:1771: error: C compiler cannot create executables" >&5
1772 echo "$as_me: error: C compiler cannot create executables" >&2;}
1773    { (exit 77); exit 77; }; }
1774 fi
1775
1776 ac_exeext=$ac_cv_exeext
1777 echo "$as_me:1777: result: $ac_file" >&5
1778 echo "${ECHO_T}$ac_file" >&6
1779
1780 # Check the compiler produces executables we can run.  If not, either
1781 # the compiler is broken, or we cross compile.
1782 echo "$as_me:1782: checking whether the C compiler works" >&5
1783 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1784 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1785 # If not cross compiling, check that we can run a simple program.
1786 if test "$cross_compiling" != yes; then
1787   if { ac_try='./$ac_file'
1788   { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1789   (eval $ac_try) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); }; }; then
1793     cross_compiling=no
1794   else
1795     if test "$cross_compiling" = maybe; then
1796         cross_compiling=yes
1797     else
1798         { { echo "$as_me:1798: error: cannot run C compiled programs.
1799 If you meant to cross compile, use \`--host'." >&5
1800 echo "$as_me: error: cannot run C compiled programs.
1801 If you meant to cross compile, use \`--host'." >&2;}
1802    { (exit 1); exit 1; }; }
1803     fi
1804   fi
1805 fi
1806 echo "$as_me:1806: result: yes" >&5
1807 echo "${ECHO_T}yes" >&6
1808
1809 rm -f a.out a.exe conftest$ac_cv_exeext
1810 ac_clean_files=$ac_clean_files_save
1811 # Check the compiler produces executables we can run.  If not, either
1812 # the compiler is broken, or we cross compile.
1813 echo "$as_me:1813: checking whether we are cross compiling" >&5
1814 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1815 echo "$as_me:1815: result: $cross_compiling" >&5
1816 echo "${ECHO_T}$cross_compiling" >&6
1817
1818 echo "$as_me:1818: checking for executable suffix" >&5
1819 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1820 if { (eval echo "$as_me:1820: \"$ac_link\"") >&5
1821   (eval $ac_link) 2>&5
1822   ac_status=$?
1823   echo "$as_me:1823: \$? = $ac_status" >&5
1824   (exit $ac_status); }; then
1825   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1826 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1827 # work properly (i.e., refer to `conftest.exe'), while it won't with
1828 # `rm'.
1829 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1830   case $ac_file in
1831     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1832     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1833           export ac_cv_exeext
1834           break;;
1835     * ) break;;
1836   esac
1837 done
1838 else
1839   { { echo "$as_me:1839: error: cannot compute EXEEXT: cannot compile and link" >&5
1840 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1841    { (exit 1); exit 1; }; }
1842 fi
1843
1844 rm -f conftest$ac_cv_exeext
1845 echo "$as_me:1845: result: $ac_cv_exeext" >&5
1846 echo "${ECHO_T}$ac_cv_exeext" >&6
1847
1848 rm -f conftest.$ac_ext
1849 EXEEXT=$ac_cv_exeext
1850 ac_exeext=$EXEEXT
1851 echo "$as_me:1851: checking for object suffix" >&5
1852 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1853 if test "${ac_cv_objext+set}" = set; then
1854   echo $ECHO_N "(cached) $ECHO_C" >&6
1855 else
1856   cat >conftest.$ac_ext <<_ACEOF
1857 #line 1857 "configure"
1858 #include "confdefs.h"
1859
1860 int
1861 main (void)
1862 {
1863
1864   ;
1865   return 0;
1866 }
1867 _ACEOF
1868 rm -f conftest.o conftest.obj
1869 if { (eval echo "$as_me:1869: \"$ac_compile\"") >&5
1870   (eval $ac_compile) 2>&5
1871   ac_status=$?
1872   echo "$as_me:1872: \$? = $ac_status" >&5
1873   (exit $ac_status); }; then
1874   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1875   case $ac_file in
1876     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1877     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1878        break;;
1879   esac
1880 done
1881 else
1882   echo "$as_me: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1884 { { echo "$as_me:1884: error: cannot compute OBJEXT: cannot compile" >&5
1885 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1886    { (exit 1); exit 1; }; }
1887 fi
1888
1889 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1890 fi
1891 echo "$as_me:1891: result: $ac_cv_objext" >&5
1892 echo "${ECHO_T}$ac_cv_objext" >&6
1893 OBJEXT=$ac_cv_objext
1894 ac_objext=$OBJEXT
1895 echo "$as_me:1895: checking whether we are using the GNU C compiler" >&5
1896 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1897 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1898   echo $ECHO_N "(cached) $ECHO_C" >&6
1899 else
1900   cat >conftest.$ac_ext <<_ACEOF
1901 #line 1901 "configure"
1902 #include "confdefs.h"
1903
1904 int
1905 main (void)
1906 {
1907 #ifndef __GNUC__
1908        choke me
1909 #endif
1910
1911   ;
1912   return 0;
1913 }
1914 _ACEOF
1915 rm -f conftest.$ac_objext
1916 if { (eval echo "$as_me:1916: \"$ac_compile\"") >&5
1917   (eval $ac_compile) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit $ac_status); } &&
1921          { ac_try='test -s conftest.$ac_objext'
1922   { (eval echo "$as_me:1922: \"$ac_try\"") >&5
1923   (eval $ac_try) 2>&5
1924   ac_status=$?
1925   echo "$as_me:1925: \$? = $ac_status" >&5
1926   (exit $ac_status); }; }; then
1927   ac_compiler_gnu=yes
1928 else
1929   echo "$as_me: failed program was:" >&5
1930 cat conftest.$ac_ext >&5
1931 ac_compiler_gnu=no
1932 fi
1933 rm -f conftest.$ac_objext conftest.$ac_ext
1934 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1935
1936 fi
1937 echo "$as_me:1937: result: $ac_cv_c_compiler_gnu" >&5
1938 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1939 GCC=`test $ac_compiler_gnu = yes && echo yes`
1940 ac_test_CFLAGS=${CFLAGS+set}
1941 ac_save_CFLAGS=$CFLAGS
1942 CFLAGS="-g"
1943 echo "$as_me:1943: checking whether $CC accepts -g" >&5
1944 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1945 if test "${ac_cv_prog_cc_g+set}" = set; then
1946   echo $ECHO_N "(cached) $ECHO_C" >&6
1947 else
1948   cat >conftest.$ac_ext <<_ACEOF
1949 #line 1949 "configure"
1950 #include "confdefs.h"
1951
1952 int
1953 main (void)
1954 {
1955
1956   ;
1957   return 0;
1958 }
1959 _ACEOF
1960 rm -f conftest.$ac_objext
1961 if { (eval echo "$as_me:1961: \"$ac_compile\"") >&5
1962   (eval $ac_compile) 2>&5
1963   ac_status=$?
1964   echo "$as_me:1964: \$? = $ac_status" >&5
1965   (exit $ac_status); } &&
1966          { ac_try='test -s conftest.$ac_objext'
1967   { (eval echo "$as_me:1967: \"$ac_try\"") >&5
1968   (eval $ac_try) 2>&5
1969   ac_status=$?
1970   echo "$as_me:1970: \$? = $ac_status" >&5
1971   (exit $ac_status); }; }; then
1972   ac_cv_prog_cc_g=yes
1973 else
1974   echo "$as_me: failed program was:" >&5
1975 cat conftest.$ac_ext >&5
1976 ac_cv_prog_cc_g=no
1977 fi
1978 rm -f conftest.$ac_objext conftest.$ac_ext
1979 fi
1980 echo "$as_me:1980: result: $ac_cv_prog_cc_g" >&5
1981 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1982 if test "$ac_test_CFLAGS" = set; then
1983   CFLAGS=$ac_save_CFLAGS
1984 elif test $ac_cv_prog_cc_g = yes; then
1985   if test "$GCC" = yes; then
1986     CFLAGS="-g -O2"
1987   else
1988     CFLAGS="-g"
1989   fi
1990 else
1991   if test "$GCC" = yes; then
1992     CFLAGS="-O2"
1993   else
1994     CFLAGS=
1995   fi
1996 fi
1997 # Some people use a C++ compiler to compile C.  Since we use `exit',
1998 # in C++ we need to declare it.  In case someone uses the same compiler
1999 # for both compiling C and C++ we need to have the C++ compiler decide
2000 # the declaration of exit, since it's the most demanding environment.
2001 cat >conftest.$ac_ext <<_ACEOF
2002 #ifndef __cplusplus
2003   choke me
2004 #endif
2005 _ACEOF
2006 rm -f conftest.$ac_objext
2007 if { (eval echo "$as_me:2007: \"$ac_compile\"") >&5
2008   (eval $ac_compile) 2>&5
2009   ac_status=$?
2010   echo "$as_me:2010: \$? = $ac_status" >&5
2011   (exit $ac_status); } &&
2012          { ac_try='test -s conftest.$ac_objext'
2013   { (eval echo "$as_me:2013: \"$ac_try\"") >&5
2014   (eval $ac_try) 2>&5
2015   ac_status=$?
2016   echo "$as_me:2016: \$? = $ac_status" >&5
2017   (exit $ac_status); }; }; then
2018   for ac_declaration in \
2019    ''\
2020    '#include <stdlib.h>' \
2021    'extern "C" void std::exit (int) throw (); using std::exit;' \
2022    'extern "C" void std::exit (int); using std::exit;' \
2023    'extern "C" void exit (int) throw ();' \
2024    'extern "C" void exit (int);' \
2025    'void exit (int);'
2026 do
2027   cat >conftest.$ac_ext <<_ACEOF
2028 #line 2028 "configure"
2029 #include "confdefs.h"
2030 #include <stdlib.h>
2031 $ac_declaration
2032 int
2033 main (void)
2034 {
2035 exit (42);
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 rm -f conftest.$ac_objext
2041 if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
2042   (eval $ac_compile) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); } &&
2046          { ac_try='test -s conftest.$ac_objext'
2047   { (eval echo "$as_me:2047: \"$ac_try\"") >&5
2048   (eval $ac_try) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); }; }; then
2052   :
2053 else
2054   echo "$as_me: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 continue
2057 fi
2058 rm -f conftest.$ac_objext conftest.$ac_ext
2059   cat >conftest.$ac_ext <<_ACEOF
2060 #line 2060 "configure"
2061 #include "confdefs.h"
2062 $ac_declaration
2063 int
2064 main (void)
2065 {
2066 exit (42);
2067   ;
2068   return 0;
2069 }
2070 _ACEOF
2071 rm -f conftest.$ac_objext
2072 if { (eval echo "$as_me:2072: \"$ac_compile\"") >&5
2073   (eval $ac_compile) 2>&5
2074   ac_status=$?
2075   echo "$as_me:2075: \$? = $ac_status" >&5
2076   (exit $ac_status); } &&
2077          { ac_try='test -s conftest.$ac_objext'
2078   { (eval echo "$as_me:2078: \"$ac_try\"") >&5
2079   (eval $ac_try) 2>&5
2080   ac_status=$?
2081   echo "$as_me:2081: \$? = $ac_status" >&5
2082   (exit $ac_status); }; }; then
2083   break
2084 else
2085   echo "$as_me: failed program was:" >&5
2086 cat conftest.$ac_ext >&5
2087 fi
2088 rm -f conftest.$ac_objext conftest.$ac_ext
2089 done
2090 rm -rf conftest*
2091 if test -n "$ac_declaration"; then
2092   echo '#ifdef __cplusplus' >>confdefs.h
2093   echo $ac_declaration      >>confdefs.h
2094   echo '#endif'             >>confdefs.h
2095 fi
2096
2097 else
2098   echo "$as_me: failed program was:" >&5
2099 cat conftest.$ac_ext >&5
2100 fi
2101 rm -f conftest.$ac_objext conftest.$ac_ext
2102 ac_ext=c
2103 ac_cpp='$CPP $CPPFLAGS'
2104 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2105 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2106 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2107 ac_main_return=return
2108
2109 GCC_VERSION=none
2110 if test "$GCC" = yes ; then
2111         echo "$as_me:2111: checking version of $CC" >&5
2112 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2113         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.].*//'`"
2114         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2115         echo "$as_me:2115: result: $GCC_VERSION" >&5
2116 echo "${ECHO_T}$GCC_VERSION" >&6
2117 fi
2118
2119 INTEL_COMPILER=no
2120
2121 if test "$GCC" = yes ; then
2122         case $host_os in
2123         (linux*|gnu*)
2124                 echo "$as_me:2124: checking if this is really Intel C compiler" >&5
2125 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2126                 cf_save_CFLAGS="$CFLAGS"
2127                 CFLAGS="$CFLAGS -no-gcc"
2128                 cat >conftest.$ac_ext <<_ACEOF
2129 #line 2129 "configure"
2130 #include "confdefs.h"
2131
2132 int
2133 main (void)
2134 {
2135
2136 #ifdef __INTEL_COMPILER
2137 #else
2138 make an error
2139 #endif
2140
2141   ;
2142   return 0;
2143 }
2144 _ACEOF
2145 rm -f conftest.$ac_objext
2146 if { (eval echo "$as_me:2146: \"$ac_compile\"") >&5
2147   (eval $ac_compile) 2>&5
2148   ac_status=$?
2149   echo "$as_me:2149: \$? = $ac_status" >&5
2150   (exit $ac_status); } &&
2151          { ac_try='test -s conftest.$ac_objext'
2152   { (eval echo "$as_me:2152: \"$ac_try\"") >&5
2153   (eval $ac_try) 2>&5
2154   ac_status=$?
2155   echo "$as_me:2155: \$? = $ac_status" >&5
2156   (exit $ac_status); }; }; then
2157   INTEL_COMPILER=yes
2158 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2159
2160 else
2161   echo "$as_me: failed program was:" >&5
2162 cat conftest.$ac_ext >&5
2163 fi
2164 rm -f conftest.$ac_objext conftest.$ac_ext
2165                 CFLAGS="$cf_save_CFLAGS"
2166                 echo "$as_me:2166: result: $INTEL_COMPILER" >&5
2167 echo "${ECHO_T}$INTEL_COMPILER" >&6
2168                 ;;
2169         esac
2170 fi
2171
2172 CLANG_COMPILER=no
2173
2174 if test "$GCC" = yes ; then
2175         echo "$as_me:2175: checking if this is really Clang C compiler" >&5
2176 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2177         cf_save_CFLAGS="$CFLAGS"
2178         CFLAGS="$CFLAGS -Qunused-arguments"
2179         cat >conftest.$ac_ext <<_ACEOF
2180 #line 2180 "configure"
2181 #include "confdefs.h"
2182
2183 int
2184 main (void)
2185 {
2186
2187 #ifdef __clang__
2188 #else
2189 make an error
2190 #endif
2191
2192   ;
2193   return 0;
2194 }
2195 _ACEOF
2196 rm -f conftest.$ac_objext
2197 if { (eval echo "$as_me:2197: \"$ac_compile\"") >&5
2198   (eval $ac_compile) 2>&5
2199   ac_status=$?
2200   echo "$as_me:2200: \$? = $ac_status" >&5
2201   (exit $ac_status); } &&
2202          { ac_try='test -s conftest.$ac_objext'
2203   { (eval echo "$as_me:2203: \"$ac_try\"") >&5
2204   (eval $ac_try) 2>&5
2205   ac_status=$?
2206   echo "$as_me:2206: \$? = $ac_status" >&5
2207   (exit $ac_status); }; }; then
2208   CLANG_COMPILER=yes
2209 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2210
2211 else
2212   echo "$as_me: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 fi
2215 rm -f conftest.$ac_objext conftest.$ac_ext
2216         CFLAGS="$cf_save_CFLAGS"
2217         echo "$as_me:2217: result: $CLANG_COMPILER" >&5
2218 echo "${ECHO_T}$CLANG_COMPILER" >&6
2219 fi
2220
2221 echo "$as_me:2221: checking for $CC option to accept ANSI C" >&5
2222 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2223 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2224   echo $ECHO_N "(cached) $ECHO_C" >&6
2225 else
2226   ac_cv_prog_cc_stdc=no
2227 ac_save_CC=$CC
2228 cat >conftest.$ac_ext <<_ACEOF
2229 #line 2229 "configure"
2230 #include "confdefs.h"
2231 #include <stdarg.h>
2232 #include <stdio.h>
2233 #include <sys/types.h>
2234 #include <sys/stat.h>
2235 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2236 struct buf { int x; };
2237 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2238 static char *e (p, i)
2239      char **p;
2240      int i;
2241 {
2242   return p[i];
2243 }
2244 static char *f (char * (*g) (char **, int), char **p, ...)
2245 {
2246   char *s;
2247   va_list v;
2248   va_start (v,p);
2249   s = g (p, va_arg (v,int));
2250   va_end (v);
2251   return s;
2252 }
2253 int test (int i, double x);
2254 struct s1 {int (*f) (int a);};
2255 struct s2 {int (*f) (double a);};
2256 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2257 int argc;
2258 char **argv;
2259 int
2260 main (void)
2261 {
2262 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2263   ;
2264   return 0;
2265 }
2266 _ACEOF
2267 # Don't try gcc -ansi; that turns off useful extensions and
2268 # breaks some systems' header files.
2269 # AIX                   -qlanglvl=ansi
2270 # Ultrix and OSF/1      -std1
2271 # HP-UX 10.20 and later -Ae
2272 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2273 # SVR4                  -Xc -D__EXTENSIONS__
2274 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2275 do
2276   CC="$ac_save_CC $ac_arg"
2277   rm -f conftest.$ac_objext
2278 if { (eval echo "$as_me:2278: \"$ac_compile\"") >&5
2279   (eval $ac_compile) 2>&5
2280   ac_status=$?
2281   echo "$as_me:2281: \$? = $ac_status" >&5
2282   (exit $ac_status); } &&
2283          { ac_try='test -s conftest.$ac_objext'
2284   { (eval echo "$as_me:2284: \"$ac_try\"") >&5
2285   (eval $ac_try) 2>&5
2286   ac_status=$?
2287   echo "$as_me:2287: \$? = $ac_status" >&5
2288   (exit $ac_status); }; }; then
2289   ac_cv_prog_cc_stdc=$ac_arg
2290 break
2291 else
2292   echo "$as_me: failed program was:" >&5
2293 cat conftest.$ac_ext >&5
2294 fi
2295 rm -f conftest.$ac_objext
2296 done
2297 rm -f conftest.$ac_ext conftest.$ac_objext
2298 CC=$ac_save_CC
2299
2300 fi
2301
2302 case "x$ac_cv_prog_cc_stdc" in
2303   x|xno)
2304     echo "$as_me:2304: result: none needed" >&5
2305 echo "${ECHO_T}none needed" >&6 ;;
2306   *)
2307     echo "$as_me:2307: result: $ac_cv_prog_cc_stdc" >&5
2308 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2309     CC="$CC $ac_cv_prog_cc_stdc" ;;
2310 esac
2311
2312 # This should have been defined by AC_PROG_CC
2313 : ${CC:=cc}
2314
2315 echo "$as_me:2315: checking \$CFLAGS variable" >&5
2316 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2317 case "x$CFLAGS" in
2318 (*-[IUD]*)
2319         echo "$as_me:2319: result: broken" >&5
2320 echo "${ECHO_T}broken" >&6
2321         { echo "$as_me:2321: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2322 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2323         cf_flags="$CFLAGS"
2324         CFLAGS=
2325         for cf_arg in $cf_flags
2326         do
2327
2328 cf_fix_cppflags=no
2329 cf_new_cflags=
2330 cf_new_cppflags=
2331 cf_new_extra_cppflags=
2332
2333 for cf_add_cflags in $cf_arg
2334 do
2335 case $cf_fix_cppflags in
2336 (no)
2337         case $cf_add_cflags in
2338         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2339                 case $cf_add_cflags in
2340                 (-D*)
2341                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2342
2343                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2344                                 && test -z "${cf_tst_cflags}" \
2345                                 && cf_fix_cppflags=yes
2346
2347                         if test $cf_fix_cppflags = yes ; then
2348
2349         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2350         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2351
2352                                 continue
2353                         elif test "${cf_tst_cflags}" = "\"'" ; then
2354
2355         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2356         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2357
2358                                 continue
2359                         fi
2360                         ;;
2361                 esac
2362                 case "$CPPFLAGS" in
2363                 (*$cf_add_cflags)
2364                         ;;
2365                 (*)
2366                         case $cf_add_cflags in
2367                         (-D*)
2368                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2369
2370 CPPFLAGS=`echo "$CPPFLAGS" | \
2371         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2372                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2373
2374                                 ;;
2375                         esac
2376
2377         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2378         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2379
2380                         ;;
2381                 esac
2382                 ;;
2383         (*)
2384
2385         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2386         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2387
2388                 ;;
2389         esac
2390         ;;
2391 (yes)
2392
2393         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2394         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2395
2396         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2397
2398         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2399                 && test -z "${cf_tst_cflags}" \
2400                 && cf_fix_cppflags=no
2401         ;;
2402 esac
2403 done
2404
2405 if test -n "$cf_new_cflags" ; then
2406
2407         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2408         CFLAGS="${CFLAGS}$cf_new_cflags"
2409
2410 fi
2411
2412 if test -n "$cf_new_cppflags" ; then
2413
2414         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2415         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2416
2417 fi
2418
2419 if test -n "$cf_new_extra_cppflags" ; then
2420
2421         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2422         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2423
2424 fi
2425
2426         done
2427         ;;
2428 (*)
2429         echo "$as_me:2429: result: ok" >&5
2430 echo "${ECHO_T}ok" >&6
2431         ;;
2432 esac
2433
2434 echo "$as_me:2434: checking \$CC variable" >&5
2435 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2436 case "$CC" in
2437 (*[\ \  ]-*)
2438         echo "$as_me:2438: result: broken" >&5
2439 echo "${ECHO_T}broken" >&6
2440         { echo "$as_me:2440: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2441 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2442         # humor him...
2443         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2444         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2445         CC="$cf_prog"
2446         for cf_arg in $cf_flags
2447         do
2448                 case "x$cf_arg" in
2449                 (x-[IUDfgOW]*)
2450
2451 cf_fix_cppflags=no
2452 cf_new_cflags=
2453 cf_new_cppflags=
2454 cf_new_extra_cppflags=
2455
2456 for cf_add_cflags in $cf_arg
2457 do
2458 case $cf_fix_cppflags in
2459 (no)
2460         case $cf_add_cflags in
2461         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2462                 case $cf_add_cflags in
2463                 (-D*)
2464                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2465
2466                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2467                                 && test -z "${cf_tst_cflags}" \
2468                                 && cf_fix_cppflags=yes
2469
2470                         if test $cf_fix_cppflags = yes ; then
2471
2472         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2473         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2474
2475                                 continue
2476                         elif test "${cf_tst_cflags}" = "\"'" ; then
2477
2478         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2479         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2480
2481                                 continue
2482                         fi
2483                         ;;
2484                 esac
2485                 case "$CPPFLAGS" in
2486                 (*$cf_add_cflags)
2487                         ;;
2488                 (*)
2489                         case $cf_add_cflags in
2490                         (-D*)
2491                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2492
2493 CPPFLAGS=`echo "$CPPFLAGS" | \
2494         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2495                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2496
2497                                 ;;
2498                         esac
2499
2500         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2501         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2502
2503                         ;;
2504                 esac
2505                 ;;
2506         (*)
2507
2508         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2509         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2510
2511                 ;;
2512         esac
2513         ;;
2514 (yes)
2515
2516         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2517         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2518
2519         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2520
2521         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2522                 && test -z "${cf_tst_cflags}" \
2523                 && cf_fix_cppflags=no
2524         ;;
2525 esac
2526 done
2527
2528 if test -n "$cf_new_cflags" ; then
2529
2530         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2531         CFLAGS="${CFLAGS}$cf_new_cflags"
2532
2533 fi
2534
2535 if test -n "$cf_new_cppflags" ; then
2536
2537         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2538         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2539
2540 fi
2541
2542 if test -n "$cf_new_extra_cppflags" ; then
2543
2544         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2545         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2546
2547 fi
2548
2549                         ;;
2550                 (*)
2551                         CC="$CC $cf_arg"
2552                         ;;
2553                 esac
2554         done
2555         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2556
2557 echo "${as_me:-configure}:2557: testing resulting CC: '$CC' ..." 1>&5
2558
2559         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2560
2561 echo "${as_me:-configure}:2561: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2562
2563         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2564
2565 echo "${as_me:-configure}:2565: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2566
2567         ;;
2568 (*)
2569         echo "$as_me:2569: result: ok" >&5
2570 echo "${ECHO_T}ok" >&6
2571         ;;
2572 esac
2573
2574 ac_ext=c
2575 ac_cpp='$CPP $CPPFLAGS'
2576 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2577 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2578 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2579 ac_main_return=return
2580 echo "$as_me:2580: checking how to run the C preprocessor" >&5
2581 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2582 # On Suns, sometimes $CPP names a directory.
2583 if test -n "$CPP" && test -d "$CPP"; then
2584   CPP=
2585 fi
2586 if test -z "$CPP"; then
2587   if test "${ac_cv_prog_CPP+set}" = set; then
2588   echo $ECHO_N "(cached) $ECHO_C" >&6
2589 else
2590       # Double quotes because CPP needs to be expanded
2591     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2592     do
2593       ac_preproc_ok=false
2594 for ac_c_preproc_warn_flag in '' yes
2595 do
2596   # Use a header file that comes with gcc, so configuring glibc
2597   # with a fresh cross-compiler works.
2598   # On the NeXT, cc -E runs the code through the compiler's parser,
2599   # not just through cpp. "Syntax error" is here to catch this case.
2600   cat >conftest.$ac_ext <<_ACEOF
2601 #line 2601 "configure"
2602 #include "confdefs.h"
2603 #include <assert.h>
2604                      Syntax error
2605 _ACEOF
2606 if { (eval echo "$as_me:2606: \"$ac_cpp conftest.$ac_ext\"") >&5
2607   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2608   ac_status=$?
2609   egrep -v '^ *\+' conftest.er1 >conftest.err
2610   rm -f conftest.er1
2611   cat conftest.err >&5
2612   echo "$as_me:2612: \$? = $ac_status" >&5
2613   (exit $ac_status); } >/dev/null; then
2614   if test -s conftest.err; then
2615     ac_cpp_err=$ac_c_preproc_warn_flag
2616   else
2617     ac_cpp_err=
2618   fi
2619 else
2620   ac_cpp_err=yes
2621 fi
2622 if test -z "$ac_cpp_err"; then
2623   :
2624 else
2625   echo "$as_me: failed program was:" >&5
2626   cat conftest.$ac_ext >&5
2627   # Broken: fails on valid input.
2628 continue
2629 fi
2630 rm -f conftest.err conftest.$ac_ext
2631
2632   # OK, works on sane cases.  Now check whether non-existent headers
2633   # can be detected and how.
2634   cat >conftest.$ac_ext <<_ACEOF
2635 #line 2635 "configure"
2636 #include "confdefs.h"
2637 #include <ac_nonexistent.h>
2638 _ACEOF
2639 if { (eval echo "$as_me:2639: \"$ac_cpp conftest.$ac_ext\"") >&5
2640   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2641   ac_status=$?
2642   egrep -v '^ *\+' conftest.er1 >conftest.err
2643   rm -f conftest.er1
2644   cat conftest.err >&5
2645   echo "$as_me:2645: \$? = $ac_status" >&5
2646   (exit $ac_status); } >/dev/null; then
2647   if test -s conftest.err; then
2648     ac_cpp_err=$ac_c_preproc_warn_flag
2649   else
2650     ac_cpp_err=
2651   fi
2652 else
2653   ac_cpp_err=yes
2654 fi
2655 if test -z "$ac_cpp_err"; then
2656   # Broken: success on invalid input.
2657 continue
2658 else
2659   echo "$as_me: failed program was:" >&5
2660   cat conftest.$ac_ext >&5
2661   # Passes both tests.
2662 ac_preproc_ok=:
2663 break
2664 fi
2665 rm -f conftest.err conftest.$ac_ext
2666
2667 done
2668 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2669 rm -f conftest.err conftest.$ac_ext
2670 if $ac_preproc_ok; then
2671   break
2672 fi
2673
2674     done
2675     ac_cv_prog_CPP=$CPP
2676
2677 fi
2678   CPP=$ac_cv_prog_CPP
2679 else
2680   ac_cv_prog_CPP=$CPP
2681 fi
2682 echo "$as_me:2682: result: $CPP" >&5
2683 echo "${ECHO_T}$CPP" >&6
2684 ac_preproc_ok=false
2685 for ac_c_preproc_warn_flag in '' yes
2686 do
2687   # Use a header file that comes with gcc, so configuring glibc
2688   # with a fresh cross-compiler works.
2689   # On the NeXT, cc -E runs the code through the compiler's parser,
2690   # not just through cpp. "Syntax error" is here to catch this case.
2691   cat >conftest.$ac_ext <<_ACEOF
2692 #line 2692 "configure"
2693 #include "confdefs.h"
2694 #include <assert.h>
2695                      Syntax error
2696 _ACEOF
2697 if { (eval echo "$as_me:2697: \"$ac_cpp conftest.$ac_ext\"") >&5
2698   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2699   ac_status=$?
2700   egrep -v '^ *\+' conftest.er1 >conftest.err
2701   rm -f conftest.er1
2702   cat conftest.err >&5
2703   echo "$as_me:2703: \$? = $ac_status" >&5
2704   (exit $ac_status); } >/dev/null; then
2705   if test -s conftest.err; then
2706     ac_cpp_err=$ac_c_preproc_warn_flag
2707   else
2708     ac_cpp_err=
2709   fi
2710 else
2711   ac_cpp_err=yes
2712 fi
2713 if test -z "$ac_cpp_err"; then
2714   :
2715 else
2716   echo "$as_me: failed program was:" >&5
2717   cat conftest.$ac_ext >&5
2718   # Broken: fails on valid input.
2719 continue
2720 fi
2721 rm -f conftest.err conftest.$ac_ext
2722
2723   # OK, works on sane cases.  Now check whether non-existent headers
2724   # can be detected and how.
2725   cat >conftest.$ac_ext <<_ACEOF
2726 #line 2726 "configure"
2727 #include "confdefs.h"
2728 #include <ac_nonexistent.h>
2729 _ACEOF
2730 if { (eval echo "$as_me:2730: \"$ac_cpp conftest.$ac_ext\"") >&5
2731   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2732   ac_status=$?
2733   egrep -v '^ *\+' conftest.er1 >conftest.err
2734   rm -f conftest.er1
2735   cat conftest.err >&5
2736   echo "$as_me:2736: \$? = $ac_status" >&5
2737   (exit $ac_status); } >/dev/null; then
2738   if test -s conftest.err; then
2739     ac_cpp_err=$ac_c_preproc_warn_flag
2740   else
2741     ac_cpp_err=
2742   fi
2743 else
2744   ac_cpp_err=yes
2745 fi
2746 if test -z "$ac_cpp_err"; then
2747   # Broken: success on invalid input.
2748 continue
2749 else
2750   echo "$as_me: failed program was:" >&5
2751   cat conftest.$ac_ext >&5
2752   # Passes both tests.
2753 ac_preproc_ok=:
2754 break
2755 fi
2756 rm -f conftest.err conftest.$ac_ext
2757
2758 done
2759 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2760 rm -f conftest.err conftest.$ac_ext
2761 if $ac_preproc_ok; then
2762   :
2763 else
2764   { { echo "$as_me:2764: error: C preprocessor \"$CPP\" fails sanity check" >&5
2765 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2766    { (exit 1); exit 1; }; }
2767 fi
2768
2769 ac_ext=c
2770 ac_cpp='$CPP $CPPFLAGS'
2771 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2772 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2773 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2774 ac_main_return=return
2775
2776 if test $ac_cv_c_compiler_gnu = yes; then
2777     echo "$as_me:2777: checking whether $CC needs -traditional" >&5
2778 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2779 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2780   echo $ECHO_N "(cached) $ECHO_C" >&6
2781 else
2782     ac_pattern="Autoconf.*'x'"
2783   cat >conftest.$ac_ext <<_ACEOF
2784 #line 2784 "configure"
2785 #include "confdefs.h"
2786 #include <sgtty.h>
2787 int Autoconf = TIOCGETP;
2788 _ACEOF
2789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2790   egrep "$ac_pattern" >/dev/null 2>&1; then
2791   ac_cv_prog_gcc_traditional=yes
2792 else
2793   ac_cv_prog_gcc_traditional=no
2794 fi
2795 rm -rf conftest*
2796
2797   if test $ac_cv_prog_gcc_traditional = no; then
2798     cat >conftest.$ac_ext <<_ACEOF
2799 #line 2799 "configure"
2800 #include "confdefs.h"
2801 #include <termio.h>
2802 int Autoconf = TCGETA;
2803 _ACEOF
2804 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2805   egrep "$ac_pattern" >/dev/null 2>&1; then
2806   ac_cv_prog_gcc_traditional=yes
2807 fi
2808 rm -rf conftest*
2809
2810   fi
2811 fi
2812 echo "$as_me:2812: result: $ac_cv_prog_gcc_traditional" >&5
2813 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2814   if test $ac_cv_prog_gcc_traditional = yes; then
2815     CC="$CC -traditional"
2816   fi
2817 fi
2818
2819 echo "$as_me:2819: checking whether $CC understands -c and -o together" >&5
2820 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2821 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2822   echo $ECHO_N "(cached) $ECHO_C" >&6
2823 else
2824
2825 cat > conftest.$ac_ext <<CF_EOF
2826 int main(void)
2827 {
2828         ${cf_cv_main_return:-return}(0);
2829 }
2830 CF_EOF
2831 # We do the test twice because some compilers refuse to overwrite an
2832 # existing .o file with -o, though they will create one.
2833 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2834 if { (eval echo "$as_me:2834: \"$ac_try\"") >&5
2835   (eval $ac_try) 2>&5
2836   ac_status=$?
2837   echo "$as_me:2837: \$? = $ac_status" >&5
2838   (exit $ac_status); } &&
2839   test -f conftest2.$ac_objext && { (eval echo "$as_me:2839: \"$ac_try\"") >&5
2840   (eval $ac_try) 2>&5
2841   ac_status=$?
2842   echo "$as_me:2842: \$? = $ac_status" >&5
2843   (exit $ac_status); };
2844 then
2845   eval cf_cv_prog_CC_c_o=yes
2846 else
2847   eval cf_cv_prog_CC_c_o=no
2848 fi
2849 rm -rf conftest*
2850
2851 fi
2852 if test $cf_cv_prog_CC_c_o = yes; then
2853   echo "$as_me:2853: result: yes" >&5
2854 echo "${ECHO_T}yes" >&6
2855 else
2856   echo "$as_me:2856: result: no" >&5
2857 echo "${ECHO_T}no" >&6
2858 fi
2859
2860 if test "$cross_compiling" = yes ; then
2861         LDCONFIG=:
2862 else
2863         case "$cf_cv_system_name" in
2864         (dragonfly*|mirbsd*|freebsd*)
2865                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2866                 ;;
2867         (*) LDPATH=$PATH:/sbin:/usr/sbin
2868                 # Extract the first word of "ldconfig", so it can be a program name with args.
2869 set dummy ldconfig; ac_word=$2
2870 echo "$as_me:2870: checking for $ac_word" >&5
2871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2872 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2873   echo $ECHO_N "(cached) $ECHO_C" >&6
2874 else
2875   case $LDCONFIG in
2876   [\\/]* | ?:[\\/]*)
2877   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2878   ;;
2879   *)
2880   ac_save_IFS=$IFS; IFS=$ac_path_separator
2881 ac_dummy="$LDPATH"
2882 for ac_dir in $ac_dummy; do
2883   IFS=$ac_save_IFS
2884   test -z "$ac_dir" && ac_dir=.
2885   if $as_executable_p "$ac_dir/$ac_word"; then
2886    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2887    echo "$as_me:2887: found $ac_dir/$ac_word" >&5
2888    break
2889 fi
2890 done
2891
2892   ;;
2893 esac
2894 fi
2895 LDCONFIG=$ac_cv_path_LDCONFIG
2896
2897 if test -n "$LDCONFIG"; then
2898   echo "$as_me:2898: result: $LDCONFIG" >&5
2899 echo "${ECHO_T}$LDCONFIG" >&6
2900 else
2901   echo "$as_me:2901: result: no" >&5
2902 echo "${ECHO_T}no" >&6
2903 fi
2904
2905                 ;;
2906         esac
2907 fi
2908
2909 echo "$as_me:2909: checking if you want to ensure bool is consistent with C++" >&5
2910 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2911
2912 # Check whether --with-cxx or --without-cxx was given.
2913 if test "${with_cxx+set}" = set; then
2914   withval="$with_cxx"
2915   cf_with_cxx=$withval
2916 else
2917   cf_with_cxx=yes
2918 fi;
2919 echo "$as_me:2919: result: $cf_with_cxx" >&5
2920 echo "${ECHO_T}$cf_with_cxx" >&6
2921 if test "X$cf_with_cxx" = Xno ; then
2922         CXX=""
2923         GXX=""
2924 else
2925         # with autoconf 2.13, we can change the error to a warning:
2926                 ac_ext=cc
2927 ac_cpp='$CXXCPP $CPPFLAGS'
2928 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2929 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2930 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2931 ac_main_return=return
2932 if test -n "$ac_tool_prefix"; then
2933   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2934   do
2935     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2936 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2937 echo "$as_me:2937: checking for $ac_word" >&5
2938 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2939 if test "${ac_cv_prog_CXX+set}" = set; then
2940   echo $ECHO_N "(cached) $ECHO_C" >&6
2941 else
2942   if test -n "$CXX"; then
2943   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2944 else
2945   ac_save_IFS=$IFS; IFS=$ac_path_separator
2946 ac_dummy="$PATH"
2947 for ac_dir in $ac_dummy; do
2948   IFS=$ac_save_IFS
2949   test -z "$ac_dir" && ac_dir=.
2950   $as_executable_p "$ac_dir/$ac_word" || continue
2951 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2952 echo "$as_me:2952: found $ac_dir/$ac_word" >&5
2953 break
2954 done
2955
2956 fi
2957 fi
2958 CXX=$ac_cv_prog_CXX
2959 if test -n "$CXX"; then
2960   echo "$as_me:2960: result: $CXX" >&5
2961 echo "${ECHO_T}$CXX" >&6
2962 else
2963   echo "$as_me:2963: result: no" >&5
2964 echo "${ECHO_T}no" >&6
2965 fi
2966
2967     test -n "$CXX" && break
2968   done
2969 fi
2970 if test -z "$CXX"; then
2971   ac_ct_CXX=$CXX
2972   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2973 do
2974   # Extract the first word of "$ac_prog", so it can be a program name with args.
2975 set dummy $ac_prog; ac_word=$2
2976 echo "$as_me:2976: checking for $ac_word" >&5
2977 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2978 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2979   echo $ECHO_N "(cached) $ECHO_C" >&6
2980 else
2981   if test -n "$ac_ct_CXX"; then
2982   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2983 else
2984   ac_save_IFS=$IFS; IFS=$ac_path_separator
2985 ac_dummy="$PATH"
2986 for ac_dir in $ac_dummy; do
2987   IFS=$ac_save_IFS
2988   test -z "$ac_dir" && ac_dir=.
2989   $as_executable_p "$ac_dir/$ac_word" || continue
2990 ac_cv_prog_ac_ct_CXX="$ac_prog"
2991 echo "$as_me:2991: found $ac_dir/$ac_word" >&5
2992 break
2993 done
2994
2995 fi
2996 fi
2997 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2998 if test -n "$ac_ct_CXX"; then
2999   echo "$as_me:2999: result: $ac_ct_CXX" >&5
3000 echo "${ECHO_T}$ac_ct_CXX" >&6
3001 else
3002   echo "$as_me:3002: result: no" >&5
3003 echo "${ECHO_T}no" >&6
3004 fi
3005
3006   test -n "$ac_ct_CXX" && break
3007 done
3008 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3009
3010   CXX=$ac_ct_CXX
3011 fi
3012
3013 # Provide some information about the compiler.
3014 echo "$as_me:3014:" \
3015      "checking for C++ compiler version" >&5
3016 ac_compiler=`set X $ac_compile; echo $2`
3017 { (eval echo "$as_me:3017: \"$ac_compiler --version </dev/null >&5\"") >&5
3018   (eval $ac_compiler --version </dev/null >&5) 2>&5
3019   ac_status=$?
3020   echo "$as_me:3020: \$? = $ac_status" >&5
3021   (exit $ac_status); }
3022 { (eval echo "$as_me:3022: \"$ac_compiler -v </dev/null >&5\"") >&5
3023   (eval $ac_compiler -v </dev/null >&5) 2>&5
3024   ac_status=$?
3025   echo "$as_me:3025: \$? = $ac_status" >&5
3026   (exit $ac_status); }
3027 { (eval echo "$as_me:3027: \"$ac_compiler -V </dev/null >&5\"") >&5
3028   (eval $ac_compiler -V </dev/null >&5) 2>&5
3029   ac_status=$?
3030   echo "$as_me:3030: \$? = $ac_status" >&5
3031   (exit $ac_status); }
3032
3033 echo "$as_me:3033: checking whether we are using the GNU C++ compiler" >&5
3034 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3035 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3036   echo $ECHO_N "(cached) $ECHO_C" >&6
3037 else
3038   cat >conftest.$ac_ext <<_ACEOF
3039 #line 3039 "configure"
3040 #include "confdefs.h"
3041
3042 int
3043 main (void)
3044 {
3045 #ifndef __GNUC__
3046        choke me
3047 #endif
3048
3049   ;
3050   return 0;
3051 }
3052 _ACEOF
3053 rm -f conftest.$ac_objext
3054 if { (eval echo "$as_me:3054: \"$ac_compile\"") >&5
3055   (eval $ac_compile) 2>&5
3056   ac_status=$?
3057   echo "$as_me:3057: \$? = $ac_status" >&5
3058   (exit $ac_status); } &&
3059          { ac_try='test -s conftest.$ac_objext'
3060   { (eval echo "$as_me:3060: \"$ac_try\"") >&5
3061   (eval $ac_try) 2>&5
3062   ac_status=$?
3063   echo "$as_me:3063: \$? = $ac_status" >&5
3064   (exit $ac_status); }; }; then
3065   ac_compiler_gnu=yes
3066 else
3067   echo "$as_me: failed program was:" >&5
3068 cat conftest.$ac_ext >&5
3069 ac_compiler_gnu=no
3070 fi
3071 rm -f conftest.$ac_objext conftest.$ac_ext
3072 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3073
3074 fi
3075 echo "$as_me:3075: result: $ac_cv_cxx_compiler_gnu" >&5
3076 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3077 GXX=`test $ac_compiler_gnu = yes && echo yes`
3078 ac_test_CXXFLAGS=${CXXFLAGS+set}
3079 ac_save_CXXFLAGS=$CXXFLAGS
3080 CXXFLAGS="-g"
3081 echo "$as_me:3081: checking whether $CXX accepts -g" >&5
3082 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3083 if test "${ac_cv_prog_cxx_g+set}" = set; then
3084   echo $ECHO_N "(cached) $ECHO_C" >&6
3085 else
3086   cat >conftest.$ac_ext <<_ACEOF
3087 #line 3087 "configure"
3088 #include "confdefs.h"
3089
3090 int
3091 main (void)
3092 {
3093
3094   ;
3095   return 0;
3096 }
3097 _ACEOF
3098 rm -f conftest.$ac_objext
3099 if { (eval echo "$as_me:3099: \"$ac_compile\"") >&5
3100   (eval $ac_compile) 2>&5
3101   ac_status=$?
3102   echo "$as_me:3102: \$? = $ac_status" >&5
3103   (exit $ac_status); } &&
3104          { ac_try='test -s conftest.$ac_objext'
3105   { (eval echo "$as_me:3105: \"$ac_try\"") >&5
3106   (eval $ac_try) 2>&5
3107   ac_status=$?
3108   echo "$as_me:3108: \$? = $ac_status" >&5
3109   (exit $ac_status); }; }; then
3110   ac_cv_prog_cxx_g=yes
3111 else
3112   echo "$as_me: failed program was:" >&5
3113 cat conftest.$ac_ext >&5
3114 ac_cv_prog_cxx_g=no
3115 fi
3116 rm -f conftest.$ac_objext conftest.$ac_ext
3117 fi
3118 echo "$as_me:3118: result: $ac_cv_prog_cxx_g" >&5
3119 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3120 if test "$ac_test_CXXFLAGS" = set; then
3121   CXXFLAGS=$ac_save_CXXFLAGS
3122 elif test $ac_cv_prog_cxx_g = yes; then
3123   if test "$GXX" = yes; then
3124     CXXFLAGS="-g -O2"
3125   else
3126     CXXFLAGS="-g"
3127   fi
3128 else
3129   if test "$GXX" = yes; then
3130     CXXFLAGS="-O2"
3131   else
3132     CXXFLAGS=
3133   fi
3134 fi
3135 for ac_declaration in \
3136    ''\
3137    '#include <stdlib.h>' \
3138    'extern "C" void std::exit (int) throw (); using std::exit;' \
3139    'extern "C" void std::exit (int); using std::exit;' \
3140    'extern "C" void exit (int) throw ();' \
3141    'extern "C" void exit (int);' \
3142    'void exit (int);'
3143 do
3144   cat >conftest.$ac_ext <<_ACEOF
3145 #line 3145 "configure"
3146 #include "confdefs.h"
3147 #include <stdlib.h>
3148 $ac_declaration
3149 int
3150 main (void)
3151 {
3152 exit (42);
3153   ;
3154   return 0;
3155 }
3156 _ACEOF
3157 rm -f conftest.$ac_objext
3158 if { (eval echo "$as_me:3158: \"$ac_compile\"") >&5
3159   (eval $ac_compile) 2>&5
3160   ac_status=$?
3161   echo "$as_me:3161: \$? = $ac_status" >&5
3162   (exit $ac_status); } &&
3163          { ac_try='test -s conftest.$ac_objext'
3164   { (eval echo "$as_me:3164: \"$ac_try\"") >&5
3165   (eval $ac_try) 2>&5
3166   ac_status=$?
3167   echo "$as_me:3167: \$? = $ac_status" >&5
3168   (exit $ac_status); }; }; then
3169   :
3170 else
3171   echo "$as_me: failed program was:" >&5
3172 cat conftest.$ac_ext >&5
3173 continue
3174 fi
3175 rm -f conftest.$ac_objext conftest.$ac_ext
3176   cat >conftest.$ac_ext <<_ACEOF
3177 #line 3177 "configure"
3178 #include "confdefs.h"
3179 $ac_declaration
3180 int
3181 main (void)
3182 {
3183 exit (42);
3184   ;
3185   return 0;
3186 }
3187 _ACEOF
3188 rm -f conftest.$ac_objext
3189 if { (eval echo "$as_me:3189: \"$ac_compile\"") >&5
3190   (eval $ac_compile) 2>&5
3191   ac_status=$?
3192   echo "$as_me:3192: \$? = $ac_status" >&5
3193   (exit $ac_status); } &&
3194          { ac_try='test -s conftest.$ac_objext'
3195   { (eval echo "$as_me:3195: \"$ac_try\"") >&5
3196   (eval $ac_try) 2>&5
3197   ac_status=$?
3198   echo "$as_me:3198: \$? = $ac_status" >&5
3199   (exit $ac_status); }; }; then
3200   break
3201 else
3202   echo "$as_me: failed program was:" >&5
3203 cat conftest.$ac_ext >&5
3204 fi
3205 rm -f conftest.$ac_objext conftest.$ac_ext
3206 done
3207 rm -rf conftest*
3208 if test -n "$ac_declaration"; then
3209   echo '#ifdef __cplusplus' >>confdefs.h
3210   echo $ac_declaration      >>confdefs.h
3211   echo '#endif'             >>confdefs.h
3212 fi
3213
3214 ac_ext=c
3215 ac_cpp='$CPP $CPPFLAGS'
3216 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3217 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3218 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3219 ac_main_return=return
3220
3221         ac_ext=cc
3222 ac_cpp='$CXXCPP $CPPFLAGS'
3223 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3224 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3225 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3226 ac_main_return=return
3227
3228         if test "x$cf_with_cxx" != xno
3229         then
3230                 # Several of the C++ configurations do not work, particularly when
3231                 # cross-compiling (20140913 -TD)
3232                 echo "$as_me:3232: checking if $CXX works" >&5
3233 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3234
3235                 save_CPPFLAGS="$CPPFLAGS"
3236                 eval cf_includedir=${includedir}
3237                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3238
3239 cat >conftest.$ac_ext <<_ACEOF
3240 #line 3240 "configure"
3241 #include "confdefs.h"
3242
3243 #include <stdlib.h>
3244 #include <stdio.h>
3245
3246 int
3247 main (void)
3248 {
3249
3250                 printf("Hello world!\n")
3251
3252   ;
3253   return 0;
3254 }
3255 _ACEOF
3256 rm -f conftest.$ac_objext
3257 if { (eval echo "$as_me:3257: \"$ac_compile\"") >&5
3258   (eval $ac_compile) 2>&5
3259   ac_status=$?
3260   echo "$as_me:3260: \$? = $ac_status" >&5
3261   (exit $ac_status); } &&
3262          { ac_try='test -s conftest.$ac_objext'
3263   { (eval echo "$as_me:3263: \"$ac_try\"") >&5
3264   (eval $ac_try) 2>&5
3265   ac_status=$?
3266   echo "$as_me:3266: \$? = $ac_status" >&5
3267   (exit $ac_status); }; }; then
3268   cf_cxx_works=yes
3269 else
3270   echo "$as_me: failed program was:" >&5
3271 cat conftest.$ac_ext >&5
3272 cf_cxx_works=no
3273 fi
3274 rm -f conftest.$ac_objext conftest.$ac_ext
3275                 CPPFLAGS="$save_CPPFLAGS"
3276
3277                 echo "$as_me:3277: result: $cf_cxx_works" >&5
3278 echo "${ECHO_T}$cf_cxx_works" >&6
3279                 if test "x$cf_cxx_works" = xno
3280                 then
3281                         { echo "$as_me:3281: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3282 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3283                         cf_with_cxx=no; CXX=""; GXX="";
3284                 fi
3285         fi
3286         ac_ext=c
3287 ac_cpp='$CPP $CPPFLAGS'
3288 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3289 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3290 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3291 ac_main_return=return
3292
3293         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3294         if test "$CXX" = "g++" ; then
3295                 # Extract the first word of "g++", so it can be a program name with args.
3296 set dummy g++; ac_word=$2
3297 echo "$as_me:3297: checking for $ac_word" >&5
3298 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3299 if test "${ac_cv_path_CXX+set}" = set; then
3300   echo $ECHO_N "(cached) $ECHO_C" >&6
3301 else
3302   case $CXX in
3303   [\\/]* | ?:[\\/]*)
3304   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3305   ;;
3306   *)
3307   ac_save_IFS=$IFS; IFS=$ac_path_separator
3308 ac_dummy="$PATH"
3309 for ac_dir in $ac_dummy; do
3310   IFS=$ac_save_IFS
3311   test -z "$ac_dir" && ac_dir=.
3312   if $as_executable_p "$ac_dir/$ac_word"; then
3313    ac_cv_path_CXX="$ac_dir/$ac_word"
3314    echo "$as_me:3314: found $ac_dir/$ac_word" >&5
3315    break
3316 fi
3317 done
3318
3319   ;;
3320 esac
3321 fi
3322 CXX=$ac_cv_path_CXX
3323
3324 if test -n "$CXX"; then
3325   echo "$as_me:3325: result: $CXX" >&5
3326 echo "${ECHO_T}$CXX" >&6
3327 else
3328   echo "$as_me:3328: result: no" >&5
3329 echo "${ECHO_T}no" >&6
3330 fi
3331
3332         fi
3333         case "x$CXX" in
3334         (x|xg++)
3335                 { echo "$as_me:3335: WARNING: You don't have any C++ compiler, too bad" >&5
3336 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3337                 cf_with_cxx=no; CXX=""; GXX="";
3338                 ;;
3339         esac
3340 fi
3341
3342 GXX_VERSION=none
3343 if test "$GXX" = yes; then
3344         echo "$as_me:3344: checking version of ${CXX:-g++}" >&5
3345 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3346         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3347         if test -z "$GXX_VERSION"
3348         then
3349                 GXX_VERSION=unknown
3350                 GXX=no
3351         fi
3352         echo "$as_me:3352: result: $GXX_VERSION" >&5
3353 echo "${ECHO_T}$GXX_VERSION" >&6
3354 fi
3355
3356 case $GXX_VERSION in
3357 (1*|2.[0-6]*)
3358         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3359         # cf_cxx_library=no
3360         { echo "$as_me:3360: WARNING: templates do not work" >&5
3361 echo "$as_me: WARNING: templates do not work" >&2;}
3362         ;;
3363 esac
3364
3365 echo "$as_me:3365: checking if you want to build C++ binding and demo" >&5
3366 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3367
3368 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3369 if test "${with_cxx_binding+set}" = set; then
3370   withval="$with_cxx_binding"
3371   cf_with_cxx_binding=$withval
3372 else
3373   cf_with_cxx_binding=$cf_with_cxx
3374 fi;
3375 echo "$as_me:3375: result: $cf_with_cxx_binding" >&5
3376 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3377
3378 echo "$as_me:3378: checking if you want to build with Ada" >&5
3379 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3380 echo "$as_me:3380: result: $cf_with_ada" >&5
3381 echo "${ECHO_T}$cf_with_ada" >&6
3382
3383 echo "$as_me:3383: checking if you want to install terminal database" >&5
3384 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3385
3386 # Check whether --enable-db-install or --disable-db-install was given.
3387 if test "${enable_db_install+set}" = set; then
3388   enableval="$enable_db_install"
3389   cf_with_db_install=$enableval
3390 else
3391   cf_with_db_install=yes
3392 fi;
3393 echo "$as_me:3393: result: $cf_with_db_install" >&5
3394 echo "${ECHO_T}$cf_with_db_install" >&6
3395
3396 echo "$as_me:3396: checking if you want to install manpages" >&5
3397 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3398
3399 # Check whether --with-manpages or --without-manpages was given.
3400 if test "${with_manpages+set}" = set; then
3401   withval="$with_manpages"
3402   cf_with_manpages=$withval
3403 else
3404   cf_with_manpages=yes
3405 fi;
3406 echo "$as_me:3406: result: $cf_with_manpages" >&5
3407 echo "${ECHO_T}$cf_with_manpages" >&6
3408
3409 echo "$as_me:3409: checking if you want to build programs such as tic" >&5
3410 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3411
3412 # Check whether --with-progs or --without-progs was given.
3413 if test "${with_progs+set}" = set; then
3414   withval="$with_progs"
3415   cf_with_progs=$withval
3416 else
3417   cf_with_progs=yes
3418 fi;
3419 echo "$as_me:3419: result: $cf_with_progs" >&5
3420 echo "${ECHO_T}$cf_with_progs" >&6
3421
3422 if test -f $srcdir/tack/tack.h; then
3423         if test "x$cross_compiling" = xyes ; then
3424                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3425
3426 echo "${as_me:-configure}:3426: testing ignoring tack because we are cross-compiling ..." 1>&5
3427
3428                 cf_with_tack=no
3429         else
3430                 echo "$as_me:3430: checking if you want to build the tack program" >&5
3431 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3432
3433 # Check whether --with-tack or --without-tack was given.
3434 if test "${with_tack+set}" = set; then
3435   withval="$with_tack"
3436   cf_with_tack=$withval
3437 else
3438   cf_with_tack=$cf_with_progs
3439 fi;
3440                 echo "$as_me:3440: result: $cf_with_tack" >&5
3441 echo "${ECHO_T}$cf_with_tack" >&6
3442         fi
3443 else
3444         cf_with_tack=no
3445 fi
3446
3447 echo "$as_me:3447: checking if you want to build test-programs" >&5
3448 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3449
3450 # Check whether --with-tests or --without-tests was given.
3451 if test "${with_tests+set}" = set; then
3452   withval="$with_tests"
3453   cf_with_tests=$withval
3454 else
3455   cf_with_tests=yes
3456 fi;
3457 echo "$as_me:3457: result: $cf_with_tests" >&5
3458 echo "${ECHO_T}$cf_with_tests" >&6
3459
3460 echo "$as_me:3460: checking if you wish to install curses.h" >&5
3461 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3462
3463 # Check whether --with-curses-h or --without-curses-h was given.
3464 if test "${with_curses_h+set}" = set; then
3465   withval="$with_curses_h"
3466   with_curses_h=$withval
3467 else
3468   with_curses_h=yes
3469 fi;
3470 echo "$as_me:3470: result: $with_curses_h" >&5
3471 echo "${ECHO_T}$with_curses_h" >&6
3472
3473 modules_to_build="ncurses"
3474 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3475 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3476 modules_to_build="$modules_to_build panel menu form"
3477
3478 test "$program_prefix" != NONE &&
3479   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3480 # Use a double $ so make ignores it.
3481 test "$program_suffix" != NONE &&
3482   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3483 # Double any \ or $.  echo might interpret backslashes.
3484 # By default was `s,x,x', remove it if useless.
3485 cat <<\_ACEOF >conftest.sed
3486 s/[\\$]/&&/g;s/;s,x,x,$//
3487 _ACEOF
3488 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3489 rm conftest.sed
3490
3491 for ac_prog in mawk gawk nawk awk
3492 do
3493   # Extract the first word of "$ac_prog", so it can be a program name with args.
3494 set dummy $ac_prog; ac_word=$2
3495 echo "$as_me:3495: checking for $ac_word" >&5
3496 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3497 if test "${ac_cv_prog_AWK+set}" = set; then
3498   echo $ECHO_N "(cached) $ECHO_C" >&6
3499 else
3500   if test -n "$AWK"; then
3501   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3502 else
3503   ac_save_IFS=$IFS; IFS=$ac_path_separator
3504 ac_dummy="$PATH"
3505 for ac_dir in $ac_dummy; do
3506   IFS=$ac_save_IFS
3507   test -z "$ac_dir" && ac_dir=.
3508   $as_executable_p "$ac_dir/$ac_word" || continue
3509 ac_cv_prog_AWK="$ac_prog"
3510 echo "$as_me:3510: found $ac_dir/$ac_word" >&5
3511 break
3512 done
3513
3514 fi
3515 fi
3516 AWK=$ac_cv_prog_AWK
3517 if test -n "$AWK"; then
3518   echo "$as_me:3518: result: $AWK" >&5
3519 echo "${ECHO_T}$AWK" >&6
3520 else
3521   echo "$as_me:3521: result: no" >&5
3522 echo "${ECHO_T}no" >&6
3523 fi
3524
3525   test -n "$AWK" && break
3526 done
3527
3528 test -z "$AWK" && { { echo "$as_me:3528: error: No awk program found" >&5
3529 echo "$as_me: error: No awk program found" >&2;}
3530    { (exit 1); exit 1; }; }
3531
3532 echo "$as_me:3532: checking for egrep" >&5
3533 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3534 if test "${ac_cv_prog_egrep+set}" = set; then
3535   echo $ECHO_N "(cached) $ECHO_C" >&6
3536 else
3537   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3538                 then ac_cv_prog_egrep='grep -E'
3539                 else ac_cv_prog_egrep='egrep'
3540         fi
3541 fi
3542 echo "$as_me:3542: result: $ac_cv_prog_egrep" >&5
3543 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3544         EGREP=$ac_cv_prog_egrep
3545
3546         test -z "$EGREP" && { { echo "$as_me:3546: error: No egrep program found" >&5
3547 echo "$as_me: error: No egrep program found" >&2;}
3548    { (exit 1); exit 1; }; }
3549
3550 # Find a good install program.  We prefer a C program (faster),
3551 # so one script is as good as another.  But avoid the broken or
3552 # incompatible versions:
3553 # SysV /etc/install, /usr/sbin/install
3554 # SunOS /usr/etc/install
3555 # IRIX /sbin/install
3556 # AIX /bin/install
3557 # AmigaOS /C/install, which installs bootblocks on floppy discs
3558 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3559 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3560 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3561 # ./install, which can be erroneously created by make from ./install.sh.
3562 echo "$as_me:3562: checking for a BSD compatible install" >&5
3563 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3564 if test -z "$INSTALL"; then
3565 if test "${ac_cv_path_install+set}" = set; then
3566   echo $ECHO_N "(cached) $ECHO_C" >&6
3567 else
3568     ac_save_IFS=$IFS; IFS=$ac_path_separator
3569   for ac_dir in $PATH; do
3570     IFS=$ac_save_IFS
3571     # Account for people who put trailing slashes in PATH elements.
3572     case $ac_dir/ in
3573     / | ./ | .// | /cC/* \
3574     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3575     | /usr/ucb/* ) ;;
3576     *)
3577       # OSF1 and SCO ODT 3.0 have their own names for install.
3578       # Don't use installbsd from OSF since it installs stuff as root
3579       # by default.
3580       for ac_prog in ginstall scoinst install; do
3581         if $as_executable_p "$ac_dir/$ac_prog"; then
3582           if test $ac_prog = install &&
3583             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3584             # AIX install.  It has an incompatible calling convention.
3585             :
3586           elif test $ac_prog = install &&
3587             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3588             # program-specific install script used by HP pwplus--don't use.
3589             :
3590           else
3591             ac_cv_path_install="$ac_dir/$ac_prog -c"
3592             break 2
3593           fi
3594         fi
3595       done
3596       ;;
3597     esac
3598   done
3599
3600 fi
3601   if test "${ac_cv_path_install+set}" = set; then
3602     INSTALL=$ac_cv_path_install
3603   else
3604     # As a last resort, use the slow shell script.  We don't cache a
3605     # path for INSTALL within a source directory, because that will
3606     # break other packages using the cache if that directory is
3607     # removed, or if the path is relative.
3608     INSTALL=$ac_install_sh
3609   fi
3610 fi
3611 echo "$as_me:3611: result: $INSTALL" >&5
3612 echo "${ECHO_T}$INSTALL" >&6
3613
3614 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3615 # It thinks the first close brace ends the variable substitution.
3616 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3617
3618 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3619
3620 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3621
3622 case $INSTALL in
3623 (/*)
3624         ;;
3625 (*)
3626         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3627         test -z "$cf_dir" && cf_dir=.
3628         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3629         ;;
3630 esac
3631
3632 for ac_prog in lint cppcheck splint
3633 do
3634   # Extract the first word of "$ac_prog", so it can be a program name with args.
3635 set dummy $ac_prog; ac_word=$2
3636 echo "$as_me:3636: checking for $ac_word" >&5
3637 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3638 if test "${ac_cv_prog_LINT+set}" = set; then
3639   echo $ECHO_N "(cached) $ECHO_C" >&6
3640 else
3641   if test -n "$LINT"; then
3642   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3643 else
3644   ac_save_IFS=$IFS; IFS=$ac_path_separator
3645 ac_dummy="$PATH"
3646 for ac_dir in $ac_dummy; do
3647   IFS=$ac_save_IFS
3648   test -z "$ac_dir" && ac_dir=.
3649   $as_executable_p "$ac_dir/$ac_word" || continue
3650 ac_cv_prog_LINT="$ac_prog"
3651 echo "$as_me:3651: found $ac_dir/$ac_word" >&5
3652 break
3653 done
3654
3655 fi
3656 fi
3657 LINT=$ac_cv_prog_LINT
3658 if test -n "$LINT"; then
3659   echo "$as_me:3659: result: $LINT" >&5
3660 echo "${ECHO_T}$LINT" >&6
3661 else
3662   echo "$as_me:3662: result: no" >&5
3663 echo "${ECHO_T}no" >&6
3664 fi
3665
3666   test -n "$LINT" && break
3667 done
3668
3669 case "x$LINT" in
3670 (xcppcheck|x*/cppcheck)
3671         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3672         ;;
3673 esac
3674
3675 echo "$as_me:3675: checking whether ln -s works" >&5
3676 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3677 LN_S=$as_ln_s
3678 if test "$LN_S" = "ln -s"; then
3679   echo "$as_me:3679: result: yes" >&5
3680 echo "${ECHO_T}yes" >&6
3681 else
3682   echo "$as_me:3682: result: no, using $LN_S" >&5
3683 echo "${ECHO_T}no, using $LN_S" >&6
3684 fi
3685
3686 echo "$as_me:3686: checking if $LN_S -f options work" >&5
3687 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3688
3689 rm -f conf$$.src conf$$dst
3690 echo >conf$$.dst
3691 echo first >conf$$.src
3692 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3693         cf_prog_ln_sf=yes
3694 else
3695         cf_prog_ln_sf=no
3696 fi
3697 rm -f conf$$.dst conf$$src
3698 echo "$as_me:3698: result: $cf_prog_ln_sf" >&5
3699 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3700
3701 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3702
3703 echo "$as_me:3703: checking for long file names" >&5
3704 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3705 if test "${ac_cv_sys_long_file_names+set}" = set; then
3706   echo $ECHO_N "(cached) $ECHO_C" >&6
3707 else
3708   ac_cv_sys_long_file_names=yes
3709 # Test for long file names in all the places we know might matter:
3710 #      .                the current directory, where building will happen
3711 #      $prefix/lib      where we will be installing things
3712 #      $exec_prefix/lib likewise
3713 # eval it to expand exec_prefix.
3714 #      $TMPDIR          if set, where it might want to write temporary files
3715 # if $TMPDIR is not set:
3716 #      /tmp             where it might want to write temporary files
3717 #      /var/tmp         likewise
3718 #      /usr/tmp         likewise
3719 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3720   ac_tmpdirs=$TMPDIR
3721 else
3722   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3723 fi
3724 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3725   test -d $ac_dir || continue
3726   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3727   ac_xdir=$ac_dir/cf$$
3728   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3729   ac_tf1=$ac_xdir/conftest9012345
3730   ac_tf2=$ac_xdir/conftest9012346
3731   (echo 1 >$ac_tf1) 2>/dev/null
3732   (echo 2 >$ac_tf2) 2>/dev/null
3733   ac_val=`cat $ac_tf1 2>/dev/null`
3734   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3735     ac_cv_sys_long_file_names=no
3736     rm -rf $ac_xdir 2>/dev/null
3737     break
3738   fi
3739   rm -rf $ac_xdir 2>/dev/null
3740 done
3741 fi
3742 echo "$as_me:3742: result: $ac_cv_sys_long_file_names" >&5
3743 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3744 if test $ac_cv_sys_long_file_names = yes; then
3745
3746 cat >>confdefs.h <<\EOF
3747 #define HAVE_LONG_FILE_NAMES 1
3748 EOF
3749
3750 fi
3751
3752 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3753 # of package conflict.
3754 cf_config_suffix=
3755
3756 # Check whether --with-config-suffix or --without-config-suffix was given.
3757 if test "${with_config_suffix+set}" = set; then
3758   withval="$with_config_suffix"
3759   case "x$withval" in
3760         (xyes|xno)
3761                 { echo "$as_me:3761: WARNING: expected a value for config-suffix option" >&5
3762 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3763                 ;;
3764         (*)     cf_config_suffix="$withval"
3765                 ;;
3766         esac
3767 fi;
3768
3769 # If we find pkg-config, check if we should install the ".pc" files.
3770
3771 echo "$as_me:3771: checking if you want to use pkg-config" >&5
3772 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3773
3774 # Check whether --with-pkg-config or --without-pkg-config was given.
3775 if test "${with_pkg_config+set}" = set; then
3776   withval="$with_pkg_config"
3777   cf_pkg_config=$withval
3778 else
3779   cf_pkg_config=yes
3780 fi;
3781 echo "$as_me:3781: result: $cf_pkg_config" >&5
3782 echo "${ECHO_T}$cf_pkg_config" >&6
3783
3784 case $cf_pkg_config in
3785 (no)
3786         PKG_CONFIG=none
3787         ;;
3788 (yes)
3789
3790 if test -n "$ac_tool_prefix"; then
3791   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3792 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3793 echo "$as_me:3793: checking for $ac_word" >&5
3794 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3795 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3796   echo $ECHO_N "(cached) $ECHO_C" >&6
3797 else
3798   case $PKG_CONFIG in
3799   [\\/]* | ?:[\\/]*)
3800   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3801   ;;
3802   *)
3803   ac_save_IFS=$IFS; IFS=$ac_path_separator
3804 ac_dummy="$PATH"
3805 for ac_dir in $ac_dummy; do
3806   IFS=$ac_save_IFS
3807   test -z "$ac_dir" && ac_dir=.
3808   if $as_executable_p "$ac_dir/$ac_word"; then
3809    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3810    echo "$as_me:3810: found $ac_dir/$ac_word" >&5
3811    break
3812 fi
3813 done
3814
3815   ;;
3816 esac
3817 fi
3818 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3819
3820 if test -n "$PKG_CONFIG"; then
3821   echo "$as_me:3821: result: $PKG_CONFIG" >&5
3822 echo "${ECHO_T}$PKG_CONFIG" >&6
3823 else
3824   echo "$as_me:3824: result: no" >&5
3825 echo "${ECHO_T}no" >&6
3826 fi
3827
3828 fi
3829 if test -z "$ac_cv_path_PKG_CONFIG"; then
3830   ac_pt_PKG_CONFIG=$PKG_CONFIG
3831   # Extract the first word of "pkg-config", so it can be a program name with args.
3832 set dummy pkg-config; ac_word=$2
3833 echo "$as_me:3833: checking for $ac_word" >&5
3834 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3835 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3836   echo $ECHO_N "(cached) $ECHO_C" >&6
3837 else
3838   case $ac_pt_PKG_CONFIG in
3839   [\\/]* | ?:[\\/]*)
3840   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3841   ;;
3842   *)
3843   ac_save_IFS=$IFS; IFS=$ac_path_separator
3844 ac_dummy="$PATH"
3845 for ac_dir in $ac_dummy; do
3846   IFS=$ac_save_IFS
3847   test -z "$ac_dir" && ac_dir=.
3848   if $as_executable_p "$ac_dir/$ac_word"; then
3849    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3850    echo "$as_me:3850: found $ac_dir/$ac_word" >&5
3851    break
3852 fi
3853 done
3854
3855   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3856   ;;
3857 esac
3858 fi
3859 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3860
3861 if test -n "$ac_pt_PKG_CONFIG"; then
3862   echo "$as_me:3862: result: $ac_pt_PKG_CONFIG" >&5
3863 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3864 else
3865   echo "$as_me:3865: result: no" >&5
3866 echo "${ECHO_T}no" >&6
3867 fi
3868
3869   PKG_CONFIG=$ac_pt_PKG_CONFIG
3870 else
3871   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3872 fi
3873
3874         ;;
3875 (*)
3876         PKG_CONFIG=$withval
3877         ;;
3878 esac
3879
3880 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3881 if test "$PKG_CONFIG" != none ; then
3882
3883 if test "x$prefix" != xNONE; then
3884         cf_path_syntax="$prefix"
3885 else
3886         cf_path_syntax="$ac_default_prefix"
3887 fi
3888
3889 case ".$PKG_CONFIG" in
3890 (.\$\(*\)*|.\'*\'*)
3891         ;;
3892 (..|./*|.\\*)
3893         ;;
3894 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3895         ;;
3896 (.\${*prefix}*|.\${*dir}*)
3897         eval PKG_CONFIG="$PKG_CONFIG"
3898         case ".$PKG_CONFIG" in
3899         (.NONE/*)
3900                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3901                 ;;
3902         esac
3903         ;;
3904 (.no|.NONE/*)
3905         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3906         ;;
3907 (*)
3908         { { echo "$as_me:3908: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3909 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3910    { (exit 1); exit 1; }; }
3911         ;;
3912 esac
3913
3914 elif test "x$cf_pkg_config" != xno ; then
3915         { echo "$as_me:3915: WARNING: pkg-config is not installed" >&5
3916 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3917 fi
3918
3919 case $PKG_CONFIG in
3920 (no|none|yes)
3921         echo "$as_me:3921: checking for pkg-config library directory" >&5
3922 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3923         ;;
3924 (*)
3925         echo "$as_me:3925: checking for $PKG_CONFIG library directory" >&5
3926 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3927         ;;
3928 esac
3929
3930 PKG_CONFIG_LIBDIR=no
3931
3932 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3933 if test "${with_pkg_config_libdir+set}" = set; then
3934   withval="$with_pkg_config_libdir"
3935   PKG_CONFIG_LIBDIR=$withval
3936 else
3937   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3938 fi;
3939
3940 case x$PKG_CONFIG_LIBDIR in
3941 (x/*)
3942         ;;
3943 (xyes)
3944         # Look for the library directory using the same prefix as the executable
3945         if test "x$PKG_CONFIG" = xnone
3946         then
3947                 cf_path=$prefix
3948         else
3949                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3950         fi
3951
3952         # If you don't like using the default architecture, you have to specify the
3953         # intended library directory and corresponding compiler/linker options.
3954         #
3955         # This case allows for Debian's 2014-flavor of multiarch, along with the
3956         # most common variations before that point.  Some other variants spell the
3957         # directory differently, e.g., "pkg-config", and put it in unusual places.
3958         # pkg-config has always been poorly standardized, which is ironic...
3959         case x`(arch) 2>/dev/null` in
3960         (*64)
3961                 cf_search_path="\
3962                         $cf_path/lib/*64-linux-gnu \
3963                         $cf_path/share \
3964                         $cf_path/lib64 \
3965                         $cf_path/lib32 \
3966                         $cf_path/lib"
3967                 ;;
3968         (*)
3969                 cf_search_path="\
3970                         $cf_path/lib/*-linux-gnu \
3971                         $cf_path/share \
3972                         $cf_path/lib32 \
3973                         $cf_path/lib \
3974                         $cf_path/libdata"
3975                 ;;
3976         esac
3977
3978         test -n "$verbose" && echo "    list..." 1>&6
3979
3980 echo "${as_me:-configure}:3980: testing list... ..." 1>&5
3981
3982         for cf_config in $cf_search_path
3983         do
3984                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3985
3986 echo "${as_me:-configure}:3986: testing checking $cf_config/pkgconfig ..." 1>&5
3987
3988                 if test -d $cf_config/pkgconfig
3989                 then
3990                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3991                         echo "$as_me:3991: checking done" >&5
3992 echo $ECHO_N "checking done... $ECHO_C" >&6
3993                         break
3994                 fi
3995         done
3996         ;;
3997 (*)
3998         ;;
3999 esac
4000
4001 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4002         echo "$as_me:4002: result: $PKG_CONFIG_LIBDIR" >&5
4003 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4004 fi
4005
4006 if test "x$PKG_CONFIG" != xnone
4007 then
4008         echo "$as_me:4008: checking if we should install .pc files for $PKG_CONFIG" >&5
4009 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4010 else
4011         echo "$as_me:4011: checking if we should install .pc files" >&5
4012 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4013 fi
4014
4015 # Check whether --enable-pc-files or --disable-pc-files was given.
4016 if test "${enable_pc_files+set}" = set; then
4017   enableval="$enable_pc_files"
4018   enable_pc_files=$enableval
4019 else
4020   enable_pc_files=no
4021 fi;
4022 echo "$as_me:4022: result: $enable_pc_files" >&5
4023 echo "${ECHO_T}$enable_pc_files" >&6
4024
4025 if test "x$enable_pc_files" != xno
4026 then
4027         MAKE_PC_FILES=
4028         case "x$PKG_CONFIG_LIBDIR" in
4029         (xno|xyes)
4030                 { echo "$as_me:4030: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4031 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4032                 ;;
4033         (*)
4034
4035 if test "x$prefix" != xNONE; then
4036         cf_path_syntax="$prefix"
4037 else
4038         cf_path_syntax="$ac_default_prefix"
4039 fi
4040
4041 case ".$PKG_CONFIG_LIBDIR" in
4042 (.\$\(*\)*|.\'*\'*)
4043         ;;
4044 (..|./*|.\\*)
4045         ;;
4046 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4047         ;;
4048 (.\${*prefix}*|.\${*dir}*)
4049         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4050         case ".$PKG_CONFIG_LIBDIR" in
4051         (.NONE/*)
4052                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4053                 ;;
4054         esac
4055         ;;
4056 (.no|.NONE/*)
4057         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4058         ;;
4059 (*)
4060         { { echo "$as_me:4060: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4061 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4062    { (exit 1); exit 1; }; }
4063         ;;
4064 esac
4065
4066                 ;;
4067         esac
4068 else
4069         MAKE_PC_FILES="#"
4070 fi
4071
4072 if test -z "$MAKE_PC_FILES"
4073 then
4074         echo "$as_me:4074: checking for suffix to add to pc-files" >&5
4075 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4076
4077 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4078 if test "${with_pc_suffix+set}" = set; then
4079   withval="$with_pc_suffix"
4080   case "x$withval" in
4081         (xyes|xno)
4082                 PC_MODULE_SUFFIX=
4083                 ;;
4084         (*)     PC_MODULE_SUFFIX="$withval"
4085                 ;;
4086         esac
4087 fi;
4088         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4089         echo "$as_me:4089: result: $PC_MODULE_SUFFIX" >&5
4090 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4091         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4092
4093 fi
4094
4095 echo "$as_me:4095: checking if we should assume mixed-case filenames" >&5
4096 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4097
4098 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4099 if test "${enable_mixed_case+set}" = set; then
4100   enableval="$enable_mixed_case"
4101   enable_mixedcase=$enableval
4102 else
4103   enable_mixedcase=auto
4104 fi;
4105 echo "$as_me:4105: result: $enable_mixedcase" >&5
4106 echo "${ECHO_T}$enable_mixedcase" >&6
4107 if test "$enable_mixedcase" = "auto" ; then
4108
4109 echo "$as_me:4109: checking if filesystem supports mixed-case filenames" >&5
4110 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4111 if test "${cf_cv_mixedcase+set}" = set; then
4112   echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114
4115 if test "$cross_compiling" = yes ; then
4116         case $target_alias in
4117         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4118                 cf_cv_mixedcase=no
4119                 ;;
4120         (*)
4121                 cf_cv_mixedcase=yes
4122                 ;;
4123         esac
4124 else
4125         rm -f conftest CONFTEST
4126         echo test >conftest
4127         if test -f CONFTEST ; then
4128                 cf_cv_mixedcase=no
4129         else
4130                 cf_cv_mixedcase=yes
4131         fi
4132         rm -f conftest CONFTEST
4133 fi
4134
4135 fi
4136 echo "$as_me:4136: result: $cf_cv_mixedcase" >&5
4137 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4138 test "$cf_cv_mixedcase" = yes &&
4139 cat >>confdefs.h <<\EOF
4140 #define MIXEDCASE_FILENAMES 1
4141 EOF
4142
4143 else
4144         cf_cv_mixedcase=$enable_mixedcase
4145         if test "x$enable_mixedcase" = "xyes" ; then
4146
4147 cat >>confdefs.h <<\EOF
4148 #define MIXEDCASE_FILENAMES 1
4149 EOF
4150
4151         fi
4152 fi
4153
4154 # do this after mixed-case option (tags/TAGS is not as important as tic).
4155 echo "$as_me:4155: checking whether ${MAKE-make} sets \${MAKE}" >&5
4156 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4157 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4158 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4159   echo $ECHO_N "(cached) $ECHO_C" >&6
4160 else
4161   cat >conftest.make <<\EOF
4162 all:
4163         @echo 'ac_maketemp="${MAKE}"'
4164 EOF
4165 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4166 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4167 if test -n "$ac_maketemp"; then
4168   eval ac_cv_prog_make_${ac_make}_set=yes
4169 else
4170   eval ac_cv_prog_make_${ac_make}_set=no
4171 fi
4172 rm -f conftest.make
4173 fi
4174 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4175   echo "$as_me:4175: result: yes" >&5
4176 echo "${ECHO_T}yes" >&6
4177   SET_MAKE=
4178 else
4179   echo "$as_me:4179: result: no" >&5
4180 echo "${ECHO_T}no" >&6
4181   SET_MAKE="MAKE=${MAKE-make}"
4182 fi
4183
4184 for ac_prog in exctags ctags
4185 do
4186   # Extract the first word of "$ac_prog", so it can be a program name with args.
4187 set dummy $ac_prog; ac_word=$2
4188 echo "$as_me:4188: checking for $ac_word" >&5
4189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4190 if test "${ac_cv_prog_CTAGS+set}" = set; then
4191   echo $ECHO_N "(cached) $ECHO_C" >&6
4192 else
4193   if test -n "$CTAGS"; then
4194   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4195 else
4196   ac_save_IFS=$IFS; IFS=$ac_path_separator
4197 ac_dummy="$PATH"
4198 for ac_dir in $ac_dummy; do
4199   IFS=$ac_save_IFS
4200   test -z "$ac_dir" && ac_dir=.
4201   $as_executable_p "$ac_dir/$ac_word" || continue
4202 ac_cv_prog_CTAGS="$ac_prog"
4203 echo "$as_me:4203: found $ac_dir/$ac_word" >&5
4204 break
4205 done
4206
4207 fi
4208 fi
4209 CTAGS=$ac_cv_prog_CTAGS
4210 if test -n "$CTAGS"; then
4211   echo "$as_me:4211: result: $CTAGS" >&5
4212 echo "${ECHO_T}$CTAGS" >&6
4213 else
4214   echo "$as_me:4214: result: no" >&5
4215 echo "${ECHO_T}no" >&6
4216 fi
4217
4218   test -n "$CTAGS" && break
4219 done
4220
4221 for ac_prog in exetags etags
4222 do
4223   # Extract the first word of "$ac_prog", so it can be a program name with args.
4224 set dummy $ac_prog; ac_word=$2
4225 echo "$as_me:4225: checking for $ac_word" >&5
4226 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4227 if test "${ac_cv_prog_ETAGS+set}" = set; then
4228   echo $ECHO_N "(cached) $ECHO_C" >&6
4229 else
4230   if test -n "$ETAGS"; then
4231   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4232 else
4233   ac_save_IFS=$IFS; IFS=$ac_path_separator
4234 ac_dummy="$PATH"
4235 for ac_dir in $ac_dummy; do
4236   IFS=$ac_save_IFS
4237   test -z "$ac_dir" && ac_dir=.
4238   $as_executable_p "$ac_dir/$ac_word" || continue
4239 ac_cv_prog_ETAGS="$ac_prog"
4240 echo "$as_me:4240: found $ac_dir/$ac_word" >&5
4241 break
4242 done
4243
4244 fi
4245 fi
4246 ETAGS=$ac_cv_prog_ETAGS
4247 if test -n "$ETAGS"; then
4248   echo "$as_me:4248: result: $ETAGS" >&5
4249 echo "${ECHO_T}$ETAGS" >&6
4250 else
4251   echo "$as_me:4251: result: no" >&5
4252 echo "${ECHO_T}no" >&6
4253 fi
4254
4255   test -n "$ETAGS" && break
4256 done
4257
4258 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4259 set dummy ${CTAGS:-ctags}; ac_word=$2
4260 echo "$as_me:4260: checking for $ac_word" >&5
4261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4262 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4263   echo $ECHO_N "(cached) $ECHO_C" >&6
4264 else
4265   if test -n "$MAKE_LOWER_TAGS"; then
4266   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4267 else
4268   ac_save_IFS=$IFS; IFS=$ac_path_separator
4269 ac_dummy="$PATH"
4270 for ac_dir in $ac_dummy; do
4271   IFS=$ac_save_IFS
4272   test -z "$ac_dir" && ac_dir=.
4273   $as_executable_p "$ac_dir/$ac_word" || continue
4274 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4275 echo "$as_me:4275: found $ac_dir/$ac_word" >&5
4276 break
4277 done
4278
4279   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4280 fi
4281 fi
4282 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4283 if test -n "$MAKE_LOWER_TAGS"; then
4284   echo "$as_me:4284: result: $MAKE_LOWER_TAGS" >&5
4285 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4286 else
4287   echo "$as_me:4287: result: no" >&5
4288 echo "${ECHO_T}no" >&6
4289 fi
4290
4291 if test "$cf_cv_mixedcase" = yes ; then
4292         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4293 set dummy ${ETAGS:-etags}; ac_word=$2
4294 echo "$as_me:4294: checking for $ac_word" >&5
4295 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4296 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4297   echo $ECHO_N "(cached) $ECHO_C" >&6
4298 else
4299   if test -n "$MAKE_UPPER_TAGS"; then
4300   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4301 else
4302   ac_save_IFS=$IFS; IFS=$ac_path_separator
4303 ac_dummy="$PATH"
4304 for ac_dir in $ac_dummy; do
4305   IFS=$ac_save_IFS
4306   test -z "$ac_dir" && ac_dir=.
4307   $as_executable_p "$ac_dir/$ac_word" || continue
4308 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4309 echo "$as_me:4309: found $ac_dir/$ac_word" >&5
4310 break
4311 done
4312
4313   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4314 fi
4315 fi
4316 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4317 if test -n "$MAKE_UPPER_TAGS"; then
4318   echo "$as_me:4318: result: $MAKE_UPPER_TAGS" >&5
4319 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4320 else
4321   echo "$as_me:4321: result: no" >&5
4322 echo "${ECHO_T}no" >&6
4323 fi
4324
4325 else
4326         MAKE_UPPER_TAGS=no
4327 fi
4328
4329 if test "$MAKE_UPPER_TAGS" = yes ; then
4330         MAKE_UPPER_TAGS=
4331 else
4332         MAKE_UPPER_TAGS="#"
4333 fi
4334
4335 if test "$MAKE_LOWER_TAGS" = yes ; then
4336         MAKE_LOWER_TAGS=
4337 else
4338         MAKE_LOWER_TAGS="#"
4339 fi
4340
4341 echo "$as_me:4341: checking for makeflags variable" >&5
4342 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4343 if test "${cf_cv_makeflags+set}" = set; then
4344   echo $ECHO_N "(cached) $ECHO_C" >&6
4345 else
4346
4347         cf_cv_makeflags=''
4348         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4349         do
4350                 cat >cf_makeflags.tmp <<CF_EOF
4351 SHELL = $SHELL
4352 all :
4353         @ echo '.$cf_option'
4354 CF_EOF
4355                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4356                 case "$cf_result" in
4357                 (.*k|.*kw)
4358                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4359                         case "$cf_result" in
4360                         (.*CC=*)        cf_cv_makeflags=
4361                                 ;;
4362                         (*)     cf_cv_makeflags=$cf_option
4363                                 ;;
4364                         esac
4365                         break
4366                         ;;
4367                 (.-)
4368                         ;;
4369                 (*)
4370
4371 echo "${as_me:-configure}:4371: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4372
4373                         ;;
4374                 esac
4375         done
4376         rm -f cf_makeflags.tmp
4377
4378 fi
4379 echo "$as_me:4379: result: $cf_cv_makeflags" >&5
4380 echo "${ECHO_T}$cf_cv_makeflags" >&6
4381
4382 if test -n "$ac_tool_prefix"; then
4383   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4384 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4385 echo "$as_me:4385: checking for $ac_word" >&5
4386 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4387 if test "${ac_cv_prog_RANLIB+set}" = set; then
4388   echo $ECHO_N "(cached) $ECHO_C" >&6
4389 else
4390   if test -n "$RANLIB"; then
4391   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4392 else
4393   ac_save_IFS=$IFS; IFS=$ac_path_separator
4394 ac_dummy="$PATH"
4395 for ac_dir in $ac_dummy; do
4396   IFS=$ac_save_IFS
4397   test -z "$ac_dir" && ac_dir=.
4398   $as_executable_p "$ac_dir/$ac_word" || continue
4399 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4400 echo "$as_me:4400: found $ac_dir/$ac_word" >&5
4401 break
4402 done
4403
4404 fi
4405 fi
4406 RANLIB=$ac_cv_prog_RANLIB
4407 if test -n "$RANLIB"; then
4408   echo "$as_me:4408: result: $RANLIB" >&5
4409 echo "${ECHO_T}$RANLIB" >&6
4410 else
4411   echo "$as_me:4411: result: no" >&5
4412 echo "${ECHO_T}no" >&6
4413 fi
4414
4415 fi
4416 if test -z "$ac_cv_prog_RANLIB"; then
4417   ac_ct_RANLIB=$RANLIB
4418   # Extract the first word of "ranlib", so it can be a program name with args.
4419 set dummy ranlib; ac_word=$2
4420 echo "$as_me:4420: checking for $ac_word" >&5
4421 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4422 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4423   echo $ECHO_N "(cached) $ECHO_C" >&6
4424 else
4425   if test -n "$ac_ct_RANLIB"; then
4426   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4427 else
4428   ac_save_IFS=$IFS; IFS=$ac_path_separator
4429 ac_dummy="$PATH"
4430 for ac_dir in $ac_dummy; do
4431   IFS=$ac_save_IFS
4432   test -z "$ac_dir" && ac_dir=.
4433   $as_executable_p "$ac_dir/$ac_word" || continue
4434 ac_cv_prog_ac_ct_RANLIB="ranlib"
4435 echo "$as_me:4435: found $ac_dir/$ac_word" >&5
4436 break
4437 done
4438
4439   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4440 fi
4441 fi
4442 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4443 if test -n "$ac_ct_RANLIB"; then
4444   echo "$as_me:4444: result: $ac_ct_RANLIB" >&5
4445 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4446 else
4447   echo "$as_me:4447: result: no" >&5
4448 echo "${ECHO_T}no" >&6
4449 fi
4450
4451   RANLIB=$ac_ct_RANLIB
4452 else
4453   RANLIB="$ac_cv_prog_RANLIB"
4454 fi
4455
4456 if test -n "$ac_tool_prefix"; then
4457   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4458 set dummy ${ac_tool_prefix}ld; ac_word=$2
4459 echo "$as_me:4459: checking for $ac_word" >&5
4460 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4461 if test "${ac_cv_prog_LD+set}" = set; then
4462   echo $ECHO_N "(cached) $ECHO_C" >&6
4463 else
4464   if test -n "$LD"; then
4465   ac_cv_prog_LD="$LD" # Let the user override the test.
4466 else
4467   ac_save_IFS=$IFS; IFS=$ac_path_separator
4468 ac_dummy="$PATH"
4469 for ac_dir in $ac_dummy; do
4470   IFS=$ac_save_IFS
4471   test -z "$ac_dir" && ac_dir=.
4472   $as_executable_p "$ac_dir/$ac_word" || continue
4473 ac_cv_prog_LD="${ac_tool_prefix}ld"
4474 echo "$as_me:4474: found $ac_dir/$ac_word" >&5
4475 break
4476 done
4477
4478 fi
4479 fi
4480 LD=$ac_cv_prog_LD
4481 if test -n "$LD"; then
4482   echo "$as_me:4482: result: $LD" >&5
4483 echo "${ECHO_T}$LD" >&6
4484 else
4485   echo "$as_me:4485: result: no" >&5
4486 echo "${ECHO_T}no" >&6
4487 fi
4488
4489 fi
4490 if test -z "$ac_cv_prog_LD"; then
4491   ac_ct_LD=$LD
4492   # Extract the first word of "ld", so it can be a program name with args.
4493 set dummy ld; ac_word=$2
4494 echo "$as_me:4494: checking for $ac_word" >&5
4495 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4496 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4497   echo $ECHO_N "(cached) $ECHO_C" >&6
4498 else
4499   if test -n "$ac_ct_LD"; then
4500   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4501 else
4502   ac_save_IFS=$IFS; IFS=$ac_path_separator
4503 ac_dummy="$PATH"
4504 for ac_dir in $ac_dummy; do
4505   IFS=$ac_save_IFS
4506   test -z "$ac_dir" && ac_dir=.
4507   $as_executable_p "$ac_dir/$ac_word" || continue
4508 ac_cv_prog_ac_ct_LD="ld"
4509 echo "$as_me:4509: found $ac_dir/$ac_word" >&5
4510 break
4511 done
4512
4513   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4514 fi
4515 fi
4516 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4517 if test -n "$ac_ct_LD"; then
4518   echo "$as_me:4518: result: $ac_ct_LD" >&5
4519 echo "${ECHO_T}$ac_ct_LD" >&6
4520 else
4521   echo "$as_me:4521: result: no" >&5
4522 echo "${ECHO_T}no" >&6
4523 fi
4524
4525   LD=$ac_ct_LD
4526 else
4527   LD="$ac_cv_prog_LD"
4528 fi
4529
4530 if test -n "$ac_tool_prefix"; then
4531   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4532 set dummy ${ac_tool_prefix}ar; ac_word=$2
4533 echo "$as_me:4533: checking for $ac_word" >&5
4534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4535 if test "${ac_cv_prog_AR+set}" = set; then
4536   echo $ECHO_N "(cached) $ECHO_C" >&6
4537 else
4538   if test -n "$AR"; then
4539   ac_cv_prog_AR="$AR" # Let the user override the test.
4540 else
4541   ac_save_IFS=$IFS; IFS=$ac_path_separator
4542 ac_dummy="$PATH"
4543 for ac_dir in $ac_dummy; do
4544   IFS=$ac_save_IFS
4545   test -z "$ac_dir" && ac_dir=.
4546   $as_executable_p "$ac_dir/$ac_word" || continue
4547 ac_cv_prog_AR="${ac_tool_prefix}ar"
4548 echo "$as_me:4548: found $ac_dir/$ac_word" >&5
4549 break
4550 done
4551
4552 fi
4553 fi
4554 AR=$ac_cv_prog_AR
4555 if test -n "$AR"; then
4556   echo "$as_me:4556: result: $AR" >&5
4557 echo "${ECHO_T}$AR" >&6
4558 else
4559   echo "$as_me:4559: result: no" >&5
4560 echo "${ECHO_T}no" >&6
4561 fi
4562
4563 fi
4564 if test -z "$ac_cv_prog_AR"; then
4565   ac_ct_AR=$AR
4566   # Extract the first word of "ar", so it can be a program name with args.
4567 set dummy ar; ac_word=$2
4568 echo "$as_me:4568: checking for $ac_word" >&5
4569 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4570 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4571   echo $ECHO_N "(cached) $ECHO_C" >&6
4572 else
4573   if test -n "$ac_ct_AR"; then
4574   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4575 else
4576   ac_save_IFS=$IFS; IFS=$ac_path_separator
4577 ac_dummy="$PATH"
4578 for ac_dir in $ac_dummy; do
4579   IFS=$ac_save_IFS
4580   test -z "$ac_dir" && ac_dir=.
4581   $as_executable_p "$ac_dir/$ac_word" || continue
4582 ac_cv_prog_ac_ct_AR="ar"
4583 echo "$as_me:4583: found $ac_dir/$ac_word" >&5
4584 break
4585 done
4586
4587   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4588 fi
4589 fi
4590 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4591 if test -n "$ac_ct_AR"; then
4592   echo "$as_me:4592: result: $ac_ct_AR" >&5
4593 echo "${ECHO_T}$ac_ct_AR" >&6
4594 else
4595   echo "$as_me:4595: result: no" >&5
4596 echo "${ECHO_T}no" >&6
4597 fi
4598
4599   AR=$ac_ct_AR
4600 else
4601   AR="$ac_cv_prog_AR"
4602 fi
4603
4604 if test -n "$ac_tool_prefix"; then
4605   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4606 set dummy ${ac_tool_prefix}nm; ac_word=$2
4607 echo "$as_me:4607: checking for $ac_word" >&5
4608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4609 if test "${ac_cv_prog_NM+set}" = set; then
4610   echo $ECHO_N "(cached) $ECHO_C" >&6
4611 else
4612   if test -n "$NM"; then
4613   ac_cv_prog_NM="$NM" # Let the user override the test.
4614 else
4615   ac_save_IFS=$IFS; IFS=$ac_path_separator
4616 ac_dummy="$PATH"
4617 for ac_dir in $ac_dummy; do
4618   IFS=$ac_save_IFS
4619   test -z "$ac_dir" && ac_dir=.
4620   $as_executable_p "$ac_dir/$ac_word" || continue
4621 ac_cv_prog_NM="${ac_tool_prefix}nm"
4622 echo "$as_me:4622: found $ac_dir/$ac_word" >&5
4623 break
4624 done
4625
4626 fi
4627 fi
4628 NM=$ac_cv_prog_NM
4629 if test -n "$NM"; then
4630   echo "$as_me:4630: result: $NM" >&5
4631 echo "${ECHO_T}$NM" >&6
4632 else
4633   echo "$as_me:4633: result: no" >&5
4634 echo "${ECHO_T}no" >&6
4635 fi
4636
4637 fi
4638 if test -z "$ac_cv_prog_NM"; then
4639   ac_ct_NM=$NM
4640   # Extract the first word of "nm", so it can be a program name with args.
4641 set dummy nm; ac_word=$2
4642 echo "$as_me:4642: checking for $ac_word" >&5
4643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4644 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4645   echo $ECHO_N "(cached) $ECHO_C" >&6
4646 else
4647   if test -n "$ac_ct_NM"; then
4648   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4649 else
4650   ac_save_IFS=$IFS; IFS=$ac_path_separator
4651 ac_dummy="$PATH"
4652 for ac_dir in $ac_dummy; do
4653   IFS=$ac_save_IFS
4654   test -z "$ac_dir" && ac_dir=.
4655   $as_executable_p "$ac_dir/$ac_word" || continue
4656 ac_cv_prog_ac_ct_NM="nm"
4657 echo "$as_me:4657: found $ac_dir/$ac_word" >&5
4658 break
4659 done
4660
4661   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4662 fi
4663 fi
4664 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4665 if test -n "$ac_ct_NM"; then
4666   echo "$as_me:4666: result: $ac_ct_NM" >&5
4667 echo "${ECHO_T}$ac_ct_NM" >&6
4668 else
4669   echo "$as_me:4669: result: no" >&5
4670 echo "${ECHO_T}no" >&6
4671 fi
4672
4673   NM=$ac_ct_NM
4674 else
4675   NM="$ac_cv_prog_NM"
4676 fi
4677
4678 if test -n "$ac_tool_prefix"; then
4679   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4680 set dummy ${ac_tool_prefix}ar; ac_word=$2
4681 echo "$as_me:4681: checking for $ac_word" >&5
4682 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4683 if test "${ac_cv_prog_AR+set}" = set; then
4684   echo $ECHO_N "(cached) $ECHO_C" >&6
4685 else
4686   if test -n "$AR"; then
4687   ac_cv_prog_AR="$AR" # Let the user override the test.
4688 else
4689   ac_save_IFS=$IFS; IFS=$ac_path_separator
4690 ac_dummy="$PATH"
4691 for ac_dir in $ac_dummy; do
4692   IFS=$ac_save_IFS
4693   test -z "$ac_dir" && ac_dir=.
4694   $as_executable_p "$ac_dir/$ac_word" || continue
4695 ac_cv_prog_AR="${ac_tool_prefix}ar"
4696 echo "$as_me:4696: found $ac_dir/$ac_word" >&5
4697 break
4698 done
4699
4700 fi
4701 fi
4702 AR=$ac_cv_prog_AR
4703 if test -n "$AR"; then
4704   echo "$as_me:4704: result: $AR" >&5
4705 echo "${ECHO_T}$AR" >&6
4706 else
4707   echo "$as_me:4707: result: no" >&5
4708 echo "${ECHO_T}no" >&6
4709 fi
4710
4711 fi
4712 if test -z "$ac_cv_prog_AR"; then
4713   ac_ct_AR=$AR
4714   # Extract the first word of "ar", so it can be a program name with args.
4715 set dummy ar; ac_word=$2
4716 echo "$as_me:4716: checking for $ac_word" >&5
4717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4718 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4719   echo $ECHO_N "(cached) $ECHO_C" >&6
4720 else
4721   if test -n "$ac_ct_AR"; then
4722   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4723 else
4724   ac_save_IFS=$IFS; IFS=$ac_path_separator
4725 ac_dummy="$PATH"
4726 for ac_dir in $ac_dummy; do
4727   IFS=$ac_save_IFS
4728   test -z "$ac_dir" && ac_dir=.
4729   $as_executable_p "$ac_dir/$ac_word" || continue
4730 ac_cv_prog_ac_ct_AR="ar"
4731 echo "$as_me:4731: found $ac_dir/$ac_word" >&5
4732 break
4733 done
4734
4735   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4736 fi
4737 fi
4738 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4739 if test -n "$ac_ct_AR"; then
4740   echo "$as_me:4740: result: $ac_ct_AR" >&5
4741 echo "${ECHO_T}$ac_ct_AR" >&6
4742 else
4743   echo "$as_me:4743: result: no" >&5
4744 echo "${ECHO_T}no" >&6
4745 fi
4746
4747   AR=$ac_ct_AR
4748 else
4749   AR="$ac_cv_prog_AR"
4750 fi
4751
4752 echo "$as_me:4752: checking for options to update archives" >&5
4753 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4754 if test "${cf_cv_ar_flags+set}" = set; then
4755   echo $ECHO_N "(cached) $ECHO_C" >&6
4756 else
4757
4758         case $cf_cv_system_name in
4759         (*-msvc*)
4760                 cf_cv_ar_flags=''
4761                 cat >mk_static_lib.sh <<-EOF
4762                 #!$SHELL
4763                 MSVC_BIN="$AR"
4764                 out="\$1"
4765                 shift
4766                 exec \$MSVC_BIN -out:"\$out" \$@
4767                 EOF
4768                 chmod +x mk_static_lib.sh
4769                 AR=`pwd`/mk_static_lib.sh
4770                 ;;
4771         (*)
4772                 cf_cv_ar_flags=unknown
4773                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4774                 do
4775
4776                         # check if $ARFLAGS already contains this choice
4777                         if test "x$ARFLAGS" != "x" ; then
4778                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4779                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4780                                         cf_cv_ar_flags=
4781                                         break
4782                                 fi
4783                         fi
4784
4785                         rm -f conftest.$ac_cv_objext
4786                         rm -f conftest.a
4787
4788                         cat >conftest.$ac_ext <<EOF
4789 #line 4789 "configure"
4790 int     testdata[3] = { 123, 456, 789 };
4791 EOF
4792                         if { (eval echo "$as_me:4792: \"$ac_compile\"") >&5
4793   (eval $ac_compile) 2>&5
4794   ac_status=$?
4795   echo "$as_me:4795: \$? = $ac_status" >&5
4796   (exit $ac_status); } ; then
4797                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4798                                 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4799                                 if test -f conftest.a ; then
4800                                         cf_cv_ar_flags=$cf_ar_flags
4801                                         break
4802                                 fi
4803                         else
4804                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4805
4806 echo "${as_me:-configure}:4806: testing cannot compile test-program ..." 1>&5
4807
4808                                 break
4809                         fi
4810                 done
4811                 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4812                 ;;
4813         esac
4814
4815 fi
4816 echo "$as_me:4816: result: $cf_cv_ar_flags" >&5
4817 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4818
4819 if test -n "$ARFLAGS" ; then
4820         if test -n "$cf_cv_ar_flags" ; then
4821                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4822         fi
4823 else
4824         ARFLAGS=$cf_cv_ar_flags
4825 fi
4826
4827 echo "$as_me:4827: checking if you have specified an install-prefix" >&5
4828 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4829
4830 # Check whether --with-install-prefix or --without-install-prefix was given.
4831 if test "${with_install_prefix+set}" = set; then
4832   withval="$with_install_prefix"
4833   case "x$withval" in
4834         (xyes|xno)
4835                 ;;
4836         (*)     DESTDIR="$withval"
4837                 ;;
4838         esac
4839 fi;
4840 echo "$as_me:4840: result: $DESTDIR" >&5
4841 echo "${ECHO_T}$DESTDIR" >&6
4842
4843 ###############################################################################
4844
4845 # If we're cross-compiling, allow the user to override the tools and their
4846 # options.  The configure script is oriented toward identifying the host
4847 # compiler, etc., but we need a build compiler to generate parts of the source.
4848
4849 if test "$cross_compiling" = yes ; then
4850
4851         # defaults that we might want to override
4852         : ${BUILD_CFLAGS:=''}
4853         : ${BUILD_CPPFLAGS:=''}
4854         : ${BUILD_LDFLAGS:=''}
4855         : ${BUILD_LIBS:=''}
4856         : ${BUILD_EXEEXT:='$x'}
4857         : ${BUILD_OBJEXT:='o'}
4858
4859 # Check whether --with-build-cc or --without-build-cc was given.
4860 if test "${with_build_cc+set}" = set; then
4861   withval="$with_build_cc"
4862   BUILD_CC="$withval"
4863 else
4864   for ac_prog in gcc clang c99 c89 cc cl
4865 do
4866   # Extract the first word of "$ac_prog", so it can be a program name with args.
4867 set dummy $ac_prog; ac_word=$2
4868 echo "$as_me:4868: checking for $ac_word" >&5
4869 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4870 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4871   echo $ECHO_N "(cached) $ECHO_C" >&6
4872 else
4873   if test -n "$BUILD_CC"; then
4874   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4875 else
4876   ac_save_IFS=$IFS; IFS=$ac_path_separator
4877 ac_dummy="$PATH"
4878 for ac_dir in $ac_dummy; do
4879   IFS=$ac_save_IFS
4880   test -z "$ac_dir" && ac_dir=.
4881   $as_executable_p "$ac_dir/$ac_word" || continue
4882 ac_cv_prog_BUILD_CC="$ac_prog"
4883 echo "$as_me:4883: found $ac_dir/$ac_word" >&5
4884 break
4885 done
4886
4887 fi
4888 fi
4889 BUILD_CC=$ac_cv_prog_BUILD_CC
4890 if test -n "$BUILD_CC"; then
4891   echo "$as_me:4891: result: $BUILD_CC" >&5
4892 echo "${ECHO_T}$BUILD_CC" >&6
4893 else
4894   echo "$as_me:4894: result: no" >&5
4895 echo "${ECHO_T}no" >&6
4896 fi
4897
4898   test -n "$BUILD_CC" && break
4899 done
4900 test -n "$BUILD_CC" || BUILD_CC="none"
4901
4902 fi;
4903         echo "$as_me:4903: checking for native build C compiler" >&5
4904 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4905         echo "$as_me:4905: result: $BUILD_CC" >&5
4906 echo "${ECHO_T}$BUILD_CC" >&6
4907
4908         echo "$as_me:4908: checking for native build C preprocessor" >&5
4909 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4910
4911 # Check whether --with-build-cpp or --without-build-cpp was given.
4912 if test "${with_build_cpp+set}" = set; then
4913   withval="$with_build_cpp"
4914   BUILD_CPP="$withval"
4915 else
4916   BUILD_CPP='${BUILD_CC} -E'
4917 fi;
4918         echo "$as_me:4918: result: $BUILD_CPP" >&5
4919 echo "${ECHO_T}$BUILD_CPP" >&6
4920
4921         echo "$as_me:4921: checking for native build C flags" >&5
4922 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4923
4924 # Check whether --with-build-cflags or --without-build-cflags was given.
4925 if test "${with_build_cflags+set}" = set; then
4926   withval="$with_build_cflags"
4927   BUILD_CFLAGS="$withval"
4928 fi;
4929         echo "$as_me:4929: result: $BUILD_CFLAGS" >&5
4930 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4931
4932         echo "$as_me:4932: checking for native build C preprocessor-flags" >&5
4933 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4934
4935 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4936 if test "${with_build_cppflags+set}" = set; then
4937   withval="$with_build_cppflags"
4938   BUILD_CPPFLAGS="$withval"
4939 fi;
4940         echo "$as_me:4940: result: $BUILD_CPPFLAGS" >&5
4941 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4942
4943         echo "$as_me:4943: checking for native build linker-flags" >&5
4944 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4945
4946 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4947 if test "${with_build_ldflags+set}" = set; then
4948   withval="$with_build_ldflags"
4949   BUILD_LDFLAGS="$withval"
4950 fi;
4951         echo "$as_me:4951: result: $BUILD_LDFLAGS" >&5
4952 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4953
4954         echo "$as_me:4954: checking for native build linker-libraries" >&5
4955 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4956
4957 # Check whether --with-build-libs or --without-build-libs was given.
4958 if test "${with_build_libs+set}" = set; then
4959   withval="$with_build_libs"
4960   BUILD_LIBS="$withval"
4961 fi;
4962         echo "$as_me:4962: result: $BUILD_LIBS" >&5
4963 echo "${ECHO_T}$BUILD_LIBS" >&6
4964
4965         # this assumes we're on Unix.
4966         BUILD_EXEEXT=
4967         BUILD_OBJEXT=o
4968
4969         : ${BUILD_CC:='${CC}'}
4970
4971         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4972                 { { echo "$as_me:4972: error: Cross-build requires two compilers.
4973 Use --with-build-cc to specify the native compiler." >&5
4974 echo "$as_me: error: Cross-build requires two compilers.
4975 Use --with-build-cc to specify the native compiler." >&2;}
4976    { (exit 1); exit 1; }; }
4977         fi
4978
4979 else
4980         : ${BUILD_CC:='${CC}'}
4981         : ${BUILD_CPP:='${CPP}'}
4982         : ${BUILD_CFLAGS:='${CFLAGS}'}
4983         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4984         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4985         : ${BUILD_LIBS:='${LIBS}'}
4986         : ${BUILD_EXEEXT:='$x'}
4987         : ${BUILD_OBJEXT:='o'}
4988 fi
4989
4990 ###############################################################################
4991
4992 ### Options to allow the user to specify the set of libraries which are used.
4993 ### Use "--without-normal --with-shared" to allow the default model to be
4994 ### shared, for example.
4995 cf_list_models=""
4996
4997 echo "$as_me:4997: checking if libtool -version-number should be used" >&5
4998 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4999
5000 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5001 if test "${enable_libtool_version+set}" = set; then
5002   enableval="$enable_libtool_version"
5003   test "$enableval" != no && enableval=yes
5004         if test "$enableval" != "yes" ; then
5005     cf_libtool_version=no
5006         else
5007                 cf_libtool_version=yes
5008         fi
5009 else
5010   enableval=yes
5011         cf_libtool_version=yes
5012
5013 fi;
5014 echo "$as_me:5014: result: $cf_libtool_version" >&5
5015 echo "${ECHO_T}$cf_libtool_version" >&6
5016
5017 if test "$cf_libtool_version" = yes ; then
5018         LIBTOOL_VERSION="-version-number"
5019 else
5020         LIBTOOL_VERSION="-version-info"
5021         case "x$VERSION" in
5022         (x)
5023                 { echo "$as_me:5023: WARNING: VERSION was not set" >&5
5024 echo "$as_me: WARNING: VERSION was not set" >&2;}
5025                 ;;
5026         (x*.*.*)
5027                 ABI_VERSION="$VERSION"
5028                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5029
5030 echo "${as_me:-configure}:5030: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5031
5032                 ;;
5033         (x*:*:*)
5034                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5035                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5036
5037 echo "${as_me:-configure}:5037: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5038
5039                 ;;
5040         (*)
5041                 { echo "$as_me:5041: WARNING: unexpected VERSION value: $VERSION" >&5
5042 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5043                 ;;
5044         esac
5045 fi
5046
5047 LIBTOOL=
5048
5049 # common library maintenance symbols that are convenient for libtool scripts:
5050 LIB_CREATE='${AR} -cr'
5051 LIB_OBJECT='${OBJECTS}'
5052 LIB_SUFFIX=.a
5053 LIB_PREP="$RANLIB"
5054
5055 # symbols used to prop libtool up to enable it to determine what it should be
5056 # doing:
5057 LIB_CLEAN=
5058 LIB_COMPILE=
5059 LIB_LINK='${CC}'
5060 LIB_INSTALL=
5061 LIB_UNINSTALL=
5062
5063 echo "$as_me:5063: checking if you want to build libraries with libtool" >&5
5064 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5065
5066 # Check whether --with-libtool or --without-libtool was given.
5067 if test "${with_libtool+set}" = set; then
5068   withval="$with_libtool"
5069   with_libtool=$withval
5070 else
5071   with_libtool=no
5072 fi;
5073 echo "$as_me:5073: result: $with_libtool" >&5
5074 echo "${ECHO_T}$with_libtool" >&6
5075 if test "$with_libtool" != "no"; then
5076
5077         if test "$with_libtool" != "yes" ; then
5078
5079 if test "x$prefix" != xNONE; then
5080         cf_path_syntax="$prefix"
5081 else
5082         cf_path_syntax="$ac_default_prefix"
5083 fi
5084
5085 case ".$with_libtool" in
5086 (.\$\(*\)*|.\'*\'*)
5087         ;;
5088 (..|./*|.\\*)
5089         ;;
5090 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5091         ;;
5092 (.\${*prefix}*|.\${*dir}*)
5093         eval with_libtool="$with_libtool"
5094         case ".$with_libtool" in
5095         (.NONE/*)
5096                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5097                 ;;
5098         esac
5099         ;;
5100 (.no|.NONE/*)
5101         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5102         ;;
5103 (*)
5104         { { echo "$as_me:5104: error: expected a pathname, not \"$with_libtool\"" >&5
5105 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5106    { (exit 1); exit 1; }; }
5107         ;;
5108 esac
5109
5110                 LIBTOOL=$with_libtool
5111         else
5112                 if test -n "$ac_tool_prefix"; then
5113   for ac_prog in libtool glibtool
5114   do
5115     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5116 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5117 echo "$as_me:5117: checking for $ac_word" >&5
5118 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5119 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5120   echo $ECHO_N "(cached) $ECHO_C" >&6
5121 else
5122   if test -n "$LIBTOOL"; then
5123   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5124 else
5125   ac_save_IFS=$IFS; IFS=$ac_path_separator
5126 ac_dummy="$PATH"
5127 for ac_dir in $ac_dummy; do
5128   IFS=$ac_save_IFS
5129   test -z "$ac_dir" && ac_dir=.
5130   $as_executable_p "$ac_dir/$ac_word" || continue
5131 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5132 echo "$as_me:5132: found $ac_dir/$ac_word" >&5
5133 break
5134 done
5135
5136 fi
5137 fi
5138 LIBTOOL=$ac_cv_prog_LIBTOOL
5139 if test -n "$LIBTOOL"; then
5140   echo "$as_me:5140: result: $LIBTOOL" >&5
5141 echo "${ECHO_T}$LIBTOOL" >&6
5142 else
5143   echo "$as_me:5143: result: no" >&5
5144 echo "${ECHO_T}no" >&6
5145 fi
5146
5147     test -n "$LIBTOOL" && break
5148   done
5149 fi
5150 if test -z "$LIBTOOL"; then
5151   ac_ct_LIBTOOL=$LIBTOOL
5152   for ac_prog in libtool glibtool
5153 do
5154   # Extract the first word of "$ac_prog", so it can be a program name with args.
5155 set dummy $ac_prog; ac_word=$2
5156 echo "$as_me:5156: checking for $ac_word" >&5
5157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5158 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5159   echo $ECHO_N "(cached) $ECHO_C" >&6
5160 else
5161   if test -n "$ac_ct_LIBTOOL"; then
5162   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5163 else
5164   ac_save_IFS=$IFS; IFS=$ac_path_separator
5165 ac_dummy="$PATH"
5166 for ac_dir in $ac_dummy; do
5167   IFS=$ac_save_IFS
5168   test -z "$ac_dir" && ac_dir=.
5169   $as_executable_p "$ac_dir/$ac_word" || continue
5170 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5171 echo "$as_me:5171: found $ac_dir/$ac_word" >&5
5172 break
5173 done
5174
5175 fi
5176 fi
5177 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5178 if test -n "$ac_ct_LIBTOOL"; then
5179   echo "$as_me:5179: result: $ac_ct_LIBTOOL" >&5
5180 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5181 else
5182   echo "$as_me:5182: result: no" >&5
5183 echo "${ECHO_T}no" >&6
5184 fi
5185
5186   test -n "$ac_ct_LIBTOOL" && break
5187 done
5188 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5189
5190   LIBTOOL=$ac_ct_LIBTOOL
5191 fi
5192
5193 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5194 then
5195         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.].*//'`
5196 else
5197         cf_cv_libtool_version=
5198 fi
5199 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5200
5201                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5202                 then
5203
5204 unset ac_cv_prog_ac_ct_LIBTOOL
5205 unset ac_ct_LIBTOOL
5206 unset LIBTOOL
5207
5208                         if test -n "$ac_tool_prefix"; then
5209   for ac_prog in glibtool
5210   do
5211     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5212 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5213 echo "$as_me:5213: checking for $ac_word" >&5
5214 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5215 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5216   echo $ECHO_N "(cached) $ECHO_C" >&6
5217 else
5218   if test -n "$LIBTOOL"; then
5219   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5220 else
5221   ac_save_IFS=$IFS; IFS=$ac_path_separator
5222 ac_dummy="$PATH"
5223 for ac_dir in $ac_dummy; do
5224   IFS=$ac_save_IFS
5225   test -z "$ac_dir" && ac_dir=.
5226   $as_executable_p "$ac_dir/$ac_word" || continue
5227 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5228 echo "$as_me:5228: found $ac_dir/$ac_word" >&5
5229 break
5230 done
5231
5232 fi
5233 fi
5234 LIBTOOL=$ac_cv_prog_LIBTOOL
5235 if test -n "$LIBTOOL"; then
5236   echo "$as_me:5236: result: $LIBTOOL" >&5
5237 echo "${ECHO_T}$LIBTOOL" >&6
5238 else
5239   echo "$as_me:5239: result: no" >&5
5240 echo "${ECHO_T}no" >&6
5241 fi
5242
5243     test -n "$LIBTOOL" && break
5244   done
5245 fi
5246 if test -z "$LIBTOOL"; then
5247   ac_ct_LIBTOOL=$LIBTOOL
5248   for ac_prog in glibtool
5249 do
5250   # Extract the first word of "$ac_prog", so it can be a program name with args.
5251 set dummy $ac_prog; ac_word=$2
5252 echo "$as_me:5252: checking for $ac_word" >&5
5253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5254 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5255   echo $ECHO_N "(cached) $ECHO_C" >&6
5256 else
5257   if test -n "$ac_ct_LIBTOOL"; then
5258   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5259 else
5260   ac_save_IFS=$IFS; IFS=$ac_path_separator
5261 ac_dummy="$PATH"
5262 for ac_dir in $ac_dummy; do
5263   IFS=$ac_save_IFS
5264   test -z "$ac_dir" && ac_dir=.
5265   $as_executable_p "$ac_dir/$ac_word" || continue
5266 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5267 echo "$as_me:5267: found $ac_dir/$ac_word" >&5
5268 break
5269 done
5270
5271 fi
5272 fi
5273 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5274 if test -n "$ac_ct_LIBTOOL"; then
5275   echo "$as_me:5275: result: $ac_ct_LIBTOOL" >&5
5276 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5277 else
5278   echo "$as_me:5278: result: no" >&5
5279 echo "${ECHO_T}no" >&6
5280 fi
5281
5282   test -n "$ac_ct_LIBTOOL" && break
5283 done
5284 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5285
5286   LIBTOOL=$ac_ct_LIBTOOL
5287 fi
5288
5289 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5290 then
5291         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.].*//'`
5292 else
5293         cf_cv_libtool_version=
5294 fi
5295 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5296
5297                 fi
5298         fi
5299         if test -z "$LIBTOOL" ; then
5300                 { { echo "$as_me:5300: error: Cannot find libtool" >&5
5301 echo "$as_me: error: Cannot find libtool" >&2;}
5302    { (exit 1); exit 1; }; }
5303         fi
5304         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5305         LIB_OBJECT='${OBJECTS:.o=.lo}'
5306         LIB_SUFFIX=.la
5307         LIB_CLEAN='${LIBTOOL} --mode=clean'
5308         LIB_COMPILE='${LIBTOOL} --mode=compile'
5309         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5310         LIB_INSTALL='${LIBTOOL} --mode=install'
5311         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5312         LIB_PREP=:
5313
5314 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5315 then
5316         echo "$as_me:5316: checking version of $LIBTOOL" >&5
5317 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5318
5319 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5320 then
5321         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.].*//'`
5322 else
5323         cf_cv_libtool_version=
5324 fi
5325 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5326
5327         echo "$as_me:5327: result: $cf_cv_libtool_version" >&5
5328 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5329         if test -z "$cf_cv_libtool_version" ; then
5330                 { { echo "$as_me:5330: error: This is not GNU libtool" >&5
5331 echo "$as_me: error: This is not GNU libtool" >&2;}
5332    { (exit 1); exit 1; }; }
5333         fi
5334 else
5335         { { echo "$as_me:5335: error: GNU libtool has not been found" >&5
5336 echo "$as_me: error: GNU libtool has not been found" >&2;}
5337    { (exit 1); exit 1; }; }
5338 fi
5339
5340         # special hack to add -no-undefined (which libtool should do for itself)
5341         LT_UNDEF=
5342         case "$cf_cv_system_name" in
5343         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5344                 LT_UNDEF=-no-undefined
5345                 ;;
5346         esac
5347
5348         # special hack to add --tag option for C++ compiler
5349         case $cf_cv_libtool_version in
5350         (1.[5-9]*|[2-9].[0-9.a-z]*)
5351                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5352                 LIBTOOL="$LIBTOOL --tag=CC"
5353                 ;;
5354         (*)
5355                 LIBTOOL_CXX="$LIBTOOL"
5356                 ;;
5357         esac
5358 else
5359         LIBTOOL=""
5360         LIBTOOL_CXX=""
5361 fi
5362
5363 test -z "$LIBTOOL" && ECHO_LT=
5364
5365 if test "$with_libtool" != "no" ; then
5366
5367 cf_list_models="$cf_list_models libtool"
5368
5369 else
5370
5371 echo "$as_me:5371: checking if you want to build shared libraries" >&5
5372 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5373
5374 # Check whether --with-shared or --without-shared was given.
5375 if test "${with_shared+set}" = set; then
5376   withval="$with_shared"
5377   with_shared=$withval
5378 else
5379   with_shared=no
5380 fi;
5381 echo "$as_me:5381: result: $with_shared" >&5
5382 echo "${ECHO_T}$with_shared" >&6
5383 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5384
5385 echo "$as_me:5385: checking if you want to build static libraries" >&5
5386 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5387
5388 # Check whether --with-normal or --without-normal was given.
5389 if test "${with_normal+set}" = set; then
5390   withval="$with_normal"
5391   with_normal=$withval
5392 else
5393   with_normal=yes
5394 fi;
5395 echo "$as_me:5395: result: $with_normal" >&5
5396 echo "${ECHO_T}$with_normal" >&6
5397 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5398
5399 echo "$as_me:5399: checking if you want to build debug libraries" >&5
5400 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5401
5402 # Check whether --with-debug or --without-debug was given.
5403 if test "${with_debug+set}" = set; then
5404   withval="$with_debug"
5405   with_debug=$withval
5406 else
5407   with_debug=yes
5408 fi;
5409 echo "$as_me:5409: result: $with_debug" >&5
5410 echo "${ECHO_T}$with_debug" >&6
5411 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5412
5413 echo "$as_me:5413: checking if you want to build profiling libraries" >&5
5414 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5415
5416 # Check whether --with-profile or --without-profile was given.
5417 if test "${with_profile+set}" = set; then
5418   withval="$with_profile"
5419   with_profile=$withval
5420 else
5421   with_profile=no
5422 fi;
5423 echo "$as_me:5423: result: $with_profile" >&5
5424 echo "${ECHO_T}$with_profile" >&6
5425 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5426
5427 fi
5428
5429 if test "X$cf_with_cxx_binding" != Xno; then
5430 if test "x$with_shared" = "xyes"; then
5431 echo "$as_me:5431: checking if you want to build C++ shared libraries" >&5
5432 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5433
5434 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5435 if test "${with_cxx_shared+set}" = set; then
5436   withval="$with_cxx_shared"
5437   with_shared_cxx=$withval
5438 else
5439   with_shared_cxx=no
5440 fi;
5441 echo "$as_me:5441: result: $with_shared_cxx" >&5
5442 echo "${ECHO_T}$with_shared_cxx" >&6
5443 fi
5444 fi
5445
5446 ###############################################################################
5447
5448 echo "$as_me:5448: checking for specified models" >&5
5449 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5450 test -z "$cf_list_models" && cf_list_models=normal
5451 test "$with_libtool" != "no" && cf_list_models=libtool
5452 echo "$as_me:5452: result: $cf_list_models" >&5
5453 echo "${ECHO_T}$cf_list_models" >&6
5454
5455 ### Use the first model as the default, and save its suffix for use in building
5456 ### up test-applications.
5457 echo "$as_me:5457: checking for default model" >&5
5458 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5459 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5460 echo "$as_me:5460: result: $DFT_LWR_MODEL" >&5
5461 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5462
5463 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5464
5465 TICS_NAME=tic
5466
5467 TINFO_NAME=tinfo
5468
5469 LIB_NAME=ncurses
5470
5471 LIB_DIR=../lib
5472 LIB_2ND=../../lib
5473
5474 echo "$as_me:5474: checking if you want to have a library-prefix" >&5
5475 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5476
5477 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5478 if test "${with_lib_prefix+set}" = set; then
5479   withval="$with_lib_prefix"
5480   with_lib_prefix=$withval
5481 else
5482   with_lib_prefix=auto
5483 fi;
5484 echo "$as_me:5484: result: $with_lib_prefix" >&5
5485 echo "${ECHO_T}$with_lib_prefix" >&6
5486
5487 if test $with_lib_prefix = auto
5488 then
5489
5490         case $cf_cv_system_name in
5491         (OS/2*|os2*)
5492                 if test "$DFT_LWR_MODEL" = libtool; then
5493                         LIB_PREFIX='lib'
5494                 else
5495                         LIB_PREFIX=''
5496                 fi
5497                 ;;
5498         (*-msvc*)
5499                 LIB_PREFIX=''
5500                 ;;
5501         (*)     LIB_PREFIX='lib'
5502                 ;;
5503         esac
5504 cf_prefix=$LIB_PREFIX
5505
5506 elif test $with_lib_prefix = no
5507 then
5508         LIB_PREFIX=
5509 else
5510         LIB_PREFIX=$with_lib_prefix
5511 fi
5512
5513 LIB_SUFFIX=
5514
5515         echo "$as_me:5515: checking for PATH separator" >&5
5516 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5517         case $cf_cv_system_name in
5518         (os2*)  PATH_SEPARATOR=';'  ;;
5519         (*)     ${PATH_SEPARATOR:=':'}  ;;
5520         esac
5521
5522         echo "$as_me:5522: result: $PATH_SEPARATOR" >&5
5523 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5524
5525 ###############################################################################
5526
5527 echo "$as_me:5527: checking if you want to build a separate terminfo library" >&5
5528 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5529
5530 # Check whether --with-termlib or --without-termlib was given.
5531 if test "${with_termlib+set}" = set; then
5532   withval="$with_termlib"
5533   with_termlib=$withval
5534 else
5535   with_termlib=no
5536 fi;
5537 echo "$as_me:5537: result: $with_termlib" >&5
5538 echo "${ECHO_T}$with_termlib" >&6
5539
5540 echo "$as_me:5540: checking if you want to build a separate tic library" >&5
5541 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5542
5543 # Check whether --with-ticlib or --without-ticlib was given.
5544 if test "${with_ticlib+set}" = set; then
5545   withval="$with_ticlib"
5546   with_ticlib=$withval
5547 else
5548   with_ticlib=no
5549 fi;
5550 echo "$as_me:5550: result: $with_ticlib" >&5
5551 echo "${ECHO_T}$with_ticlib" >&6
5552
5553 if test X"$CC_G_OPT" = X"" ; then
5554         CC_G_OPT='-g'
5555         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5556 fi
5557
5558 if test X"$CXX_G_OPT" = X"" ; then
5559         CXX_G_OPT='-g'
5560         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5561 fi
5562
5563 echo "$as_me:5563: checking for default loader flags" >&5
5564 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5565 case $DFT_LWR_MODEL in
5566 (libtool) LD_MODEL=''   ;;
5567 (normal)  LD_MODEL=''   ;;
5568 (debug)   LD_MODEL=$CC_G_OPT ;;
5569 (profile) LD_MODEL='-pg';;
5570 (shared)  LD_MODEL=''   ;;
5571 esac
5572 echo "$as_me:5572: result: $LD_MODEL" >&5
5573 echo "${ECHO_T}$LD_MODEL" >&6
5574
5575 case $DFT_LWR_MODEL in
5576 (shared)
5577
5578 echo "$as_me:5578: checking if rpath option should be used" >&5
5579 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5580
5581 # Check whether --enable-rpath or --disable-rpath was given.
5582 if test "${enable_rpath+set}" = set; then
5583   enableval="$enable_rpath"
5584   cf_cv_enable_rpath=$enableval
5585 else
5586   cf_cv_enable_rpath=no
5587 fi;
5588 echo "$as_me:5588: result: $cf_cv_enable_rpath" >&5
5589 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5590
5591 echo "$as_me:5591: checking if shared libraries should be relinked during install" >&5
5592 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5593
5594 # Check whether --enable-relink or --disable-relink was given.
5595 if test "${enable_relink+set}" = set; then
5596   enableval="$enable_relink"
5597   cf_cv_do_relink=$enableval
5598 else
5599   cf_cv_do_relink=yes
5600 fi;
5601 echo "$as_me:5601: result: $cf_cv_do_relink" >&5
5602 echo "${ECHO_T}$cf_cv_do_relink" >&6
5603         ;;
5604 esac
5605
5606 # we will build libraries one-level down.
5607 rel_builddir=..
5608
5609 LD_RPATH_OPT=
5610 if test "x$cf_cv_enable_rpath" != xno
5611 then
5612         echo "$as_me:5612: checking for an rpath option" >&5
5613 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5614         case $cf_cv_system_name in
5615         (irix*)
5616                 if test "$GCC" = yes; then
5617                         LD_RPATH_OPT="-Wl,-rpath,"
5618                 else
5619                         LD_RPATH_OPT="-rpath "
5620                 fi
5621                 ;;
5622         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5623                 LD_RPATH_OPT="-Wl,-rpath,"
5624                 ;;
5625         (openbsd[2-9].*|mirbsd*)
5626                 LD_RPATH_OPT="-Wl,-rpath,"
5627                 ;;
5628         (dragonfly*)
5629                 LD_RPATH_OPT="-rpath "
5630                 ;;
5631         (netbsd*)
5632                 LD_RPATH_OPT="-Wl,-rpath,"
5633                 ;;
5634         (osf*|mls+*)
5635                 LD_RPATH_OPT="-rpath "
5636                 ;;
5637         (solaris2*)
5638                 LD_RPATH_OPT="-R"
5639                 ;;
5640         (*)
5641                 ;;
5642         esac
5643         echo "$as_me:5643: result: $LD_RPATH_OPT" >&5
5644 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5645
5646         case "x$LD_RPATH_OPT" in
5647         (x-R*)
5648                 echo "$as_me:5648: checking if we need a space after rpath option" >&5
5649 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5650                 cf_save_LIBS="$LIBS"
5651
5652 cf_add_libs="$LIBS"
5653 # reverse order
5654 cf_add_0lib=
5655 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5656 # filter duplicates
5657 for cf_add_1lib in $cf_add_0lib; do
5658         for cf_add_2lib in $cf_add_libs; do
5659                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5660                         cf_add_1lib=
5661                         break
5662                 fi
5663         done
5664         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5665 done
5666 LIBS="$cf_add_libs"
5667
5668                 cat >conftest.$ac_ext <<_ACEOF
5669 #line 5669 "configure"
5670 #include "confdefs.h"
5671
5672 int
5673 main (void)
5674 {
5675
5676   ;
5677   return 0;
5678 }
5679 _ACEOF
5680 rm -f conftest.$ac_objext conftest$ac_exeext
5681 if { (eval echo "$as_me:5681: \"$ac_link\"") >&5
5682   (eval $ac_link) 2>&5
5683   ac_status=$?
5684   echo "$as_me:5684: \$? = $ac_status" >&5
5685   (exit $ac_status); } &&
5686          { ac_try='test -s conftest$ac_exeext'
5687   { (eval echo "$as_me:5687: \"$ac_try\"") >&5
5688   (eval $ac_try) 2>&5
5689   ac_status=$?
5690   echo "$as_me:5690: \$? = $ac_status" >&5
5691   (exit $ac_status); }; }; then
5692   cf_rpath_space=no
5693 else
5694   echo "$as_me: failed program was:" >&5
5695 cat conftest.$ac_ext >&5
5696 cf_rpath_space=yes
5697 fi
5698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5699                 LIBS="$cf_save_LIBS"
5700                 echo "$as_me:5700: result: $cf_rpath_space" >&5
5701 echo "${ECHO_T}$cf_rpath_space" >&6
5702                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5703                 ;;
5704         esac
5705 fi
5706
5707         RM_SHARED_OPTS=
5708         LOCAL_LDFLAGS=
5709         LOCAL_LDFLAGS2=
5710         LD_SHARED_OPTS=
5711         INSTALL_LIB="-m 644"
5712         : ${rel_builddir:=.}
5713
5714         shlibdir=$libdir
5715
5716         MAKE_DLLS="#"
5717
5718         cf_cv_do_symlinks=no
5719         cf_ld_rpath_opt=
5720         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5721
5722         echo "$as_me:5722: checking if release/abi version should be used for shared libs" >&5
5723 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5724
5725 # Check whether --with-shlib-version or --without-shlib-version was given.
5726 if test "${with_shlib_version+set}" = set; then
5727   withval="$with_shlib_version"
5728   test -z "$withval" && withval=auto
5729         case $withval in
5730         (yes)
5731                 cf_cv_shlib_version=auto
5732                 ;;
5733         (rel|abi|auto)
5734                 cf_cv_shlib_version=$withval
5735                 ;;
5736         (*)
5737                 echo "$as_me:5737: result: $withval" >&5
5738 echo "${ECHO_T}$withval" >&6
5739                 { { echo "$as_me:5739: error: option value must be one of: rel, abi, or auto" >&5
5740 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5741    { (exit 1); exit 1; }; }
5742                 ;;
5743         esac
5744
5745 else
5746   cf_cv_shlib_version=auto
5747 fi;
5748         echo "$as_me:5748: result: $cf_cv_shlib_version" >&5
5749 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5750
5751         cf_cv_rm_so_locs=no
5752         cf_try_cflags=
5753
5754         # Some less-capable ports of gcc support only -fpic
5755         CC_SHARED_OPTS=
5756
5757         cf_try_fPIC=no
5758         if test "$GCC" = yes
5759         then
5760                 cf_try_fPIC=yes
5761         else
5762                 case $cf_cv_system_name in
5763                 (*linux*)       # e.g., PGI compiler
5764                         cf_try_fPIC=yes
5765                         ;;
5766                 esac
5767         fi
5768
5769         if test "$cf_try_fPIC" = yes
5770         then
5771                 echo "$as_me:5771: checking which $CC option to use" >&5
5772 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5773                 cf_save_CFLAGS="$CFLAGS"
5774                 for CC_SHARED_OPTS in -fPIC -fpic ''
5775                 do
5776                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5777                         cat >conftest.$ac_ext <<_ACEOF
5778 #line 5778 "configure"
5779 #include "confdefs.h"
5780 #include <stdio.h>
5781 int
5782 main (void)
5783 {
5784 int x = 1
5785   ;
5786   return 0;
5787 }
5788 _ACEOF
5789 rm -f conftest.$ac_objext
5790 if { (eval echo "$as_me:5790: \"$ac_compile\"") >&5
5791   (eval $ac_compile) 2>&5
5792   ac_status=$?
5793   echo "$as_me:5793: \$? = $ac_status" >&5
5794   (exit $ac_status); } &&
5795          { ac_try='test -s conftest.$ac_objext'
5796   { (eval echo "$as_me:5796: \"$ac_try\"") >&5
5797   (eval $ac_try) 2>&5
5798   ac_status=$?
5799   echo "$as_me:5799: \$? = $ac_status" >&5
5800   (exit $ac_status); }; }; then
5801   break
5802 else
5803   echo "$as_me: failed program was:" >&5
5804 cat conftest.$ac_ext >&5
5805 fi
5806 rm -f conftest.$ac_objext conftest.$ac_ext
5807                 done
5808                 echo "$as_me:5808: result: $CC_SHARED_OPTS" >&5
5809 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5810                 CFLAGS="$cf_save_CFLAGS"
5811         fi
5812
5813         cf_cv_shlib_version_infix=no
5814
5815         case $cf_cv_system_name in
5816         (aix4.3-9*|aix[5-7]*)
5817                 if test "$GCC" = yes; then
5818                         CC_SHARED_OPTS='-Wl,-brtl'
5819                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5820                 else
5821                         CC_SHARED_OPTS='-brtl'
5822                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5823                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5824                 fi
5825                 ;;
5826         (beos*)
5827                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5828                 ;;
5829         (cygwin*)
5830                 CC_SHARED_OPTS=
5831                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5832                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5833                 cf_cv_shlib_version=cygdll
5834                 cf_cv_shlib_version_infix=cygdll
5835                 shlibdir=$bindir
5836                 MAKE_DLLS=
5837                 cat >mk_shared_lib.sh <<-CF_EOF
5838                 #!$SHELL
5839                 SHARED_LIB=\$1
5840                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5841                 shift
5842                 cat <<-EOF
5843                 Linking shared library
5844                 ** SHARED_LIB \$SHARED_LIB
5845                 ** IMPORT_LIB \$IMPORT_LIB
5846 EOF
5847                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5848 CF_EOF
5849                 chmod +x mk_shared_lib.sh
5850                 ;;
5851         (msys*)
5852                 CC_SHARED_OPTS=
5853                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5854                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5855                 cf_cv_shlib_version=msysdll
5856                 cf_cv_shlib_version_infix=msysdll
5857                 shlibdir=$bindir
5858                 MAKE_DLLS=
5859                 cat >mk_shared_lib.sh <<-CF_EOF
5860                 #!$SHELL
5861                 SHARED_LIB=\$1
5862                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5863                 shift
5864                 cat <<-EOF
5865                 Linking shared library
5866                 ** SHARED_LIB \$SHARED_LIB
5867                 ** IMPORT_LIB \$IMPORT_LIB
5868 EOF
5869                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5870 CF_EOF
5871                 chmod +x mk_shared_lib.sh
5872                 ;;
5873         (darwin*)
5874                 cf_try_cflags="no-cpp-precomp"
5875                 CC_SHARED_OPTS="-dynamic"
5876                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5877                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5878                 cf_cv_shlib_version_infix=yes
5879                 echo "$as_me:5879: checking if ld -search_paths_first works" >&5
5880 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5881 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5882   echo $ECHO_N "(cached) $ECHO_C" >&6
5883 else
5884
5885                         cf_save_LDFLAGS=$LDFLAGS
5886                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5887                         cat >conftest.$ac_ext <<_ACEOF
5888 #line 5888 "configure"
5889 #include "confdefs.h"
5890
5891 int
5892 main (void)
5893 {
5894 int i;
5895   ;
5896   return 0;
5897 }
5898 _ACEOF
5899 rm -f conftest.$ac_objext conftest$ac_exeext
5900 if { (eval echo "$as_me:5900: \"$ac_link\"") >&5
5901   (eval $ac_link) 2>&5
5902   ac_status=$?
5903   echo "$as_me:5903: \$? = $ac_status" >&5
5904   (exit $ac_status); } &&
5905          { ac_try='test -s conftest$ac_exeext'
5906   { (eval echo "$as_me:5906: \"$ac_try\"") >&5
5907   (eval $ac_try) 2>&5
5908   ac_status=$?
5909   echo "$as_me:5909: \$? = $ac_status" >&5
5910   (exit $ac_status); }; }; then
5911   cf_cv_ldflags_search_paths_first=yes
5912 else
5913   echo "$as_me: failed program was:" >&5
5914 cat conftest.$ac_ext >&5
5915 cf_cv_ldflags_search_paths_first=no
5916 fi
5917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5918                                 LDFLAGS=$cf_save_LDFLAGS
5919 fi
5920 echo "$as_me:5920: result: $cf_cv_ldflags_search_paths_first" >&5
5921 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5922                 if test $cf_cv_ldflags_search_paths_first = yes; then
5923                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5924                 fi
5925                 ;;
5926         (hpux[7-8]*)
5927                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5928                 if test "$GCC" != yes; then
5929                         CC_SHARED_OPTS='+Z'
5930                 fi
5931                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5932                 INSTALL_LIB="-m 555"
5933                 ;;
5934         (hpux*)
5935                 # (tested with gcc 2.7.2 -- I don't have c89)
5936                 if test "$GCC" = yes; then
5937                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5938                 else
5939                         CC_SHARED_OPTS='+Z'
5940                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5941                 fi
5942                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5943                 # HP-UX shared libraries must be executable, and should be
5944                 # readonly to exploit a quirk in the memory manager.
5945                 INSTALL_LIB="-m 555"
5946                 ;;
5947         (interix*)
5948                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5949                 if test "$cf_cv_shlib_version" = rel; then
5950                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5951                 else
5952                         cf_shared_soname='`basename $@`'
5953                 fi
5954                 CC_SHARED_OPTS=
5955                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5956                 ;;
5957         (irix*)
5958                 if test "$cf_cv_enable_rpath" = yes ; then
5959                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5960                 fi
5961                 # tested with IRIX 5.2 and 'cc'.
5962                 if test "$GCC" != yes; then
5963                         CC_SHARED_OPTS='-KPIC'
5964                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5965                 else
5966                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5967                 fi
5968                 cf_cv_rm_so_locs=yes
5969                 ;;
5970         (linux*|gnu*|k*bsd*-gnu)
5971                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5972                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5973                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5974                 fi
5975                 if test "$cf_cv_enable_rpath" = yes ; then
5976                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5977                 fi
5978
5979         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5980         if test "$cf_cv_shlib_version" = rel; then
5981                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5982         else
5983                 cf_cv_shared_soname='`basename $@`'
5984         fi
5985
5986                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5987                 ;;
5988         (mingw*msvc*)
5989                 cf_cv_shlib_version=msvcdll
5990                 cf_cv_shlib_version_infix=msvcdll
5991                 shlibdir=$bindir
5992                 MAKE_DLLS=
5993                 if test "$DFT_LWR_MODEL" = "shared" ; then
5994                         LOCAL_LDFLAGS="-link -dll"
5995                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5996                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
5997                 fi
5998                 CC_SHARED_OPTS=
5999                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6000                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6001                 cat >mk_shared_lib.sh <<-CF_EOF
6002                 #!$SHELL
6003                 SHARED_LIB=\$1
6004                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6005                 shift
6006                 my_ld=\$1
6007                 shift
6008                 cat <<-EOF
6009                 Linking shared library
6010                 ** SHARED LIB \$SHARED_LIB
6011                 ** IMPORT_LIB \$IMPORT_LIB
6012 EOF
6013                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6014                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6015                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6016 CF_EOF
6017                 chmod +x mk_shared_lib.sh
6018                 ;;
6019         (mingw*)
6020                 cf_cv_shlib_version=mingw
6021                 cf_cv_shlib_version_infix=mingw
6022                 shlibdir=$bindir
6023                 MAKE_DLLS=
6024                 if test "$DFT_LWR_MODEL" = "shared" ; then
6025                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6026                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6027                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6028                 fi
6029                 CC_SHARED_OPTS=
6030                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6031                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6032                 cat >mk_shared_lib.sh <<-CF_EOF
6033                 #!$SHELL
6034                 SHARED_LIB=\$1
6035                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6036                 shift
6037                 cat <<-EOF
6038                 Linking shared library
6039                 ** SHARED_LIB \$SHARED_LIB
6040                 ** IMPORT_LIB \$IMPORT_LIB
6041 EOF
6042                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6043 CF_EOF
6044                 chmod +x mk_shared_lib.sh
6045                 ;;
6046         (openbsd[2-9].*|mirbsd*)
6047                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6048                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6049                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6050                 fi
6051                 if test "$cf_cv_enable_rpath" = yes ; then
6052                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6053                 fi
6054                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6055
6056         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6057         if test "$cf_cv_shlib_version" = rel; then
6058                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6059         else
6060                 cf_cv_shared_soname='`basename $@`'
6061         fi
6062
6063                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6064                 ;;
6065         (nto-qnx*|openbsd*|freebsd[12].*)
6066                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6067                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6068                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6069                 ;;
6070         (dragonfly*|freebsd*)
6071                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6072                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6073                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6074                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6075                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6076                 fi
6077
6078         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6079         if test "$cf_cv_shlib_version" = rel; then
6080                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6081         else
6082                 cf_cv_shared_soname='`basename $@`'
6083         fi
6084
6085                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6086                 ;;
6087         (netbsd*)
6088                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6089                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6090                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6091                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6092                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6093                         if test "$cf_cv_shlib_version" = auto; then
6094                         if test -f /usr/libexec/ld.elf_so; then
6095                                 cf_cv_shlib_version=abi
6096                         else
6097                                 cf_cv_shlib_version=rel
6098                         fi
6099                         fi
6100
6101         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6102         if test "$cf_cv_shlib_version" = rel; then
6103                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6104         else
6105                 cf_cv_shared_soname='`basename $@`'
6106         fi
6107
6108                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6109                 else
6110                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6111                 fi
6112                 ;;
6113         (osf*|mls+*)
6114                 # tested with OSF/1 V3.2 and 'cc'
6115                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6116                 # link with shared libs).
6117                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6118                 case $host_os in
6119                 (osf4*)
6120                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6121                         ;;
6122                 esac
6123                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6124                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6125                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6126                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6127                 fi
6128                 cf_cv_rm_so_locs=yes
6129                 ;;
6130         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6131                 # tested with osr5.0.5
6132                 if test "$GCC" != yes; then
6133                         CC_SHARED_OPTS='-belf -KPIC'
6134                 fi
6135                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6136                 if test "$cf_cv_enable_rpath" = yes ; then
6137                         # only way is to set LD_RUN_PATH but no switch for it
6138                         RUN_PATH=$libdir
6139                 fi
6140                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6141                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6142                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6143                 ;;
6144         (sunos4*)
6145                 # tested with SunOS 4.1.1 and gcc 2.7.0
6146                 if test "$GCC" != yes; then
6147                         CC_SHARED_OPTS='-KPIC'
6148                 fi
6149                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6150                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6151                 ;;
6152         (solaris2*)
6153                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6154                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6155                 if test "$DFT_LWR_MODEL" = "shared" ; then
6156                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6157                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6158                 fi
6159                 if test "$cf_cv_enable_rpath" = yes ; then
6160                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6161                 fi
6162
6163         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6164         if test "$cf_cv_shlib_version" = rel; then
6165                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6166         else
6167                 cf_cv_shared_soname='`basename $@`'
6168         fi
6169
6170                 if test "$GCC" != yes; then
6171                         cf_save_CFLAGS="$CFLAGS"
6172                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6173                         do
6174                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6175                                 cat >conftest.$ac_ext <<_ACEOF
6176 #line 6176 "configure"
6177 #include "confdefs.h"
6178 #include <stdio.h>
6179 int
6180 main (void)
6181 {
6182 printf("Hello\n");
6183   ;
6184   return 0;
6185 }
6186 _ACEOF
6187 rm -f conftest.$ac_objext
6188 if { (eval echo "$as_me:6188: \"$ac_compile\"") >&5
6189   (eval $ac_compile) 2>&5
6190   ac_status=$?
6191   echo "$as_me:6191: \$? = $ac_status" >&5
6192   (exit $ac_status); } &&
6193          { ac_try='test -s conftest.$ac_objext'
6194   { (eval echo "$as_me:6194: \"$ac_try\"") >&5
6195   (eval $ac_try) 2>&5
6196   ac_status=$?
6197   echo "$as_me:6197: \$? = $ac_status" >&5
6198   (exit $ac_status); }; }; then
6199   break
6200 else
6201   echo "$as_me: failed program was:" >&5
6202 cat conftest.$ac_ext >&5
6203 fi
6204 rm -f conftest.$ac_objext conftest.$ac_ext
6205                         done
6206                         CFLAGS="$cf_save_CFLAGS"
6207                         CC_SHARED_OPTS=$cf_shared_opts
6208                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6209                 else
6210                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6211                 fi
6212                 ;;
6213         (sysv5uw7*|unix_sv*)
6214                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6215                 if test "$GCC" != yes; then
6216                         CC_SHARED_OPTS='-KPIC'
6217                 fi
6218                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6219                 ;;
6220         (*)
6221                 CC_SHARED_OPTS='unknown'
6222                 MK_SHARED_LIB='echo unknown'
6223                 ;;
6224         esac
6225
6226         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6227         case "$cf_cv_shlib_version" in
6228         (rel|abi)
6229                 case "$MK_SHARED_LIB" in
6230                 (*'-o $@')
6231                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6232                         ;;
6233                 (*)
6234                         { echo "$as_me:6234: WARNING: ignored --with-shlib-version" >&5
6235 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6236                         ;;
6237                 esac
6238                 ;;
6239         esac
6240
6241         if test -n "$cf_try_cflags"
6242         then
6243 cat > conftest.$ac_ext <<EOF
6244 #line 6244 "${as_me:-configure}"
6245 #include <stdio.h>
6246 int main(int argc, char *argv[])
6247 {
6248         printf("hello\n");
6249         return (argv[argc-1] == 0) ;
6250 }
6251 EOF
6252                 cf_save_CFLAGS="$CFLAGS"
6253                 for cf_opt in $cf_try_cflags
6254                 do
6255                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6256                         echo "$as_me:6256: checking if CFLAGS option -$cf_opt works" >&5
6257 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6258                         if { (eval echo "$as_me:6258: \"$ac_compile\"") >&5
6259   (eval $ac_compile) 2>&5
6260   ac_status=$?
6261   echo "$as_me:6261: \$? = $ac_status" >&5
6262   (exit $ac_status); }; then
6263                                 echo "$as_me:6263: result: yes" >&5
6264 echo "${ECHO_T}yes" >&6
6265                                 cf_save_CFLAGS="$CFLAGS"
6266                         else
6267                                 echo "$as_me:6267: result: no" >&5
6268 echo "${ECHO_T}no" >&6
6269                         fi
6270                 done
6271                 CFLAGS="$cf_save_CFLAGS"
6272         fi
6273
6274         # RPATH_LIST is a colon-separated list of directories
6275         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6276         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6277
6278         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6279
6280         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6281
6282 echo "${as_me:-configure}:6282: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6283
6284         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6285
6286 echo "${as_me:-configure}:6286: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6287
6288 for model in $cf_list_models; do
6289         case $model in
6290         (libtool)
6291
6292 echo "$as_me:6292: checking for additional libtool options" >&5
6293 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6294
6295 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6296 if test "${with_libtool_opts+set}" = set; then
6297   withval="$with_libtool_opts"
6298   with_libtool_opts=$withval
6299 else
6300   with_libtool_opts=no
6301 fi;
6302 echo "$as_me:6302: result: $with_libtool_opts" >&5
6303 echo "${ECHO_T}$with_libtool_opts" >&6
6304
6305 case .$with_libtool_opts in
6306 (.yes|.no|.)
6307         ;;
6308 (*)
6309         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6310         ;;
6311 esac
6312
6313 echo "$as_me:6313: checking if exported-symbols file should be used" >&5
6314 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6315
6316 # Check whether --with-export-syms or --without-export-syms was given.
6317 if test "${with_export_syms+set}" = set; then
6318   withval="$with_export_syms"
6319   with_export_syms=$withval
6320 else
6321   with_export_syms=no
6322 fi;
6323 if test "x$with_export_syms" = xyes
6324 then
6325         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6326
6327 fi
6328 echo "$as_me:6328: result: $with_export_syms" >&5
6329 echo "${ECHO_T}$with_export_syms" >&6
6330 if test "x$with_export_syms" != xno
6331 then
6332         EXPORT_SYMS="-export-symbols $with_export_syms"
6333
6334 fi
6335
6336                 ;;
6337         (shared)
6338                 if test "$CC_SHARED_OPTS" = "unknown"; then
6339                         { { echo "$as_me:6339: error: Shared libraries are not supported in this version" >&5
6340 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6341    { (exit 1); exit 1; }; }
6342                 fi
6343                 # workaround for inept transition to PIE vs PIC...
6344                 echo "$as_me:6344: checking if current CFLAGS link properly" >&5
6345 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6346                 cat >conftest.$ac_ext <<_ACEOF
6347 #line 6347 "configure"
6348 #include "confdefs.h"
6349 #include <stdio.h>
6350 int
6351 main (void)
6352 {
6353 printf("Hello work\n");
6354   ;
6355   return 0;
6356 }
6357 _ACEOF
6358 rm -f conftest.$ac_objext conftest$ac_exeext
6359 if { (eval echo "$as_me:6359: \"$ac_link\"") >&5
6360   (eval $ac_link) 2>&5
6361   ac_status=$?
6362   echo "$as_me:6362: \$? = $ac_status" >&5
6363   (exit $ac_status); } &&
6364          { ac_try='test -s conftest$ac_exeext'
6365   { (eval echo "$as_me:6365: \"$ac_try\"") >&5
6366   (eval $ac_try) 2>&5
6367   ac_status=$?
6368   echo "$as_me:6368: \$? = $ac_status" >&5
6369   (exit $ac_status); }; }; then
6370   cf_cflags_work=yes
6371 else
6372   echo "$as_me: failed program was:" >&5
6373 cat conftest.$ac_ext >&5
6374 cf_cflags_work=no
6375 fi
6376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6377                 echo "$as_me:6377: result: $cf_cflags_work" >&5
6378 echo "${ECHO_T}$cf_cflags_work" >&6
6379                 if test "$cf_cflags_work" = no
6380                 then
6381                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6382
6383 echo "${as_me:-configure}:6383: testing try to work around by appending shared-options ..." 1>&5
6384
6385                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6386                 fi
6387
6388 echo "$as_me:6388: checking if versioned-symbols file should be used" >&5
6389 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6390
6391 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6392 if test "${with_versioned_syms+set}" = set; then
6393   withval="$with_versioned_syms"
6394   with_versioned_syms=$withval
6395 else
6396   with_versioned_syms=no
6397 fi;
6398 case "x$with_versioned_syms" in
6399 (xyes)
6400         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6401
6402         ;;
6403 (xno)
6404         ;;
6405 (x/*)
6406         test -f "$with_versioned_syms" || { { echo "$as_me:6406: error: expected a filename: $with_versioned_syms" >&5
6407 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6408    { (exit 1); exit 1; }; }
6409         ;;
6410 (*)
6411         test -f "$with_versioned_syms" || { { echo "$as_me:6411: error: expected a filename: $with_versioned_syms" >&5
6412 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6413    { (exit 1); exit 1; }; }
6414         with_versioned_syms=`pwd`/"$with_versioned_syms"
6415         ;;
6416 esac
6417 echo "$as_me:6417: result: $with_versioned_syms" >&5
6418 echo "${ECHO_T}$with_versioned_syms" >&6
6419
6420 RESULTING_SYMS=
6421 VERSIONED_SYMS=
6422 WILDCARD_SYMS=
6423
6424 if test "x$with_versioned_syms" != xno
6425 then
6426         RESULTING_SYMS=$with_versioned_syms
6427         case "x$MK_SHARED_LIB" in
6428         (*-Wl,*)
6429                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6430                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6431                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6432
6433 echo "${as_me:-configure}:6433: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6434
6435                 ;;
6436         (*-dy\ *)
6437                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6438                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6439                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6440
6441 echo "${as_me:-configure}:6441: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6442
6443                 ;;
6444         (*)
6445                 { echo "$as_me:6445: WARNING: this system does not support versioned-symbols" >&5
6446 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6447                 ;;
6448         esac
6449
6450         # Linux ld can selectively override scope, e.g., of symbols beginning with
6451         # "_" by first declaring some as global, and then using a wildcard to
6452         # declare the others as local.  Some other loaders cannot do this.  Check
6453         # by constructing a (very) simple shared library and inspecting its
6454         # symbols.
6455         if test "x$VERSIONED_SYMS" != "x"
6456         then
6457                 echo "$as_me:6457: checking if wildcards can be used to selectively omit symbols" >&5
6458 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6459                 WILDCARD_SYMS=no
6460
6461                 # make sources
6462                 rm -f conftest.*
6463
6464                 cat >conftest.ver <<EOF
6465 module_1.0 {
6466 global:
6467         globalf1;
6468 local:
6469         localf1;
6470 };
6471 module_2.0 {
6472 global:
6473         globalf2;
6474 local:
6475         localf2;
6476         _*;
6477 } module_1.0;
6478 submodule_1.0 {
6479 global:
6480         subglobalf1;
6481         _ismissing;
6482 local:
6483         sublocalf1;
6484 };
6485 submodule_2.0 {
6486 global:
6487         subglobalf2;
6488 local:
6489         sublocalf2;
6490         _*;
6491 } submodule_1.0;
6492 EOF
6493                 cat >conftest.$ac_ext <<EOF
6494 #line 6494 "configure"
6495 int     _ismissing(void) { return 1; }
6496 int     _localf1(void) { return 1; }
6497 int     _localf2(void) { return 2; }
6498 int     globalf1(void) { return 1; }
6499 int     globalf2(void) { return 2; }
6500 int     _sublocalf1(void) { return 1; }
6501 int     _sublocalf2(void) { return 2; }
6502 int     subglobalf1(void) { return 1; }
6503 int     subglobalf2(void) { return 2; }
6504 EOF
6505                 cat >conftest.mk <<EOF
6506 CC=${CC}
6507 CFLAGS=${CFLAGS}
6508 CPPFLAGS=${CPPFLAGS}
6509 LDFLAGS=${LDFLAGS}
6510 LIBS=${LIBS}
6511 VERSIONED_SYMS=${VERSIONED_SYMS}
6512 RESULTING_SYMS=conftest.ver
6513 MK_SHARED_LIB=${MK_SHARED_LIB}
6514 conftest.so: conftest.$ac_cv_objext
6515                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6516 EOF
6517
6518                 # compile source, make library
6519                 if make -f conftest.mk 2>&5 >/dev/null
6520                 then
6521                         # test for missing symbol in either Data or Text section
6522                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6523                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6524                 fi
6525                 echo "$as_me:6525: result: $WILDCARD_SYMS" >&5
6526 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6527                 rm -f conftest.*
6528         fi
6529 fi
6530
6531                 ;;
6532         esac
6533 done
6534
6535 ### Checks for special libraries, must be done up-front.
6536 SHLIB_LIST=""
6537
6538 echo "$as_me:6538: checking if you want to link with the GPM mouse library" >&5
6539 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6540
6541 # Check whether --with-gpm or --without-gpm was given.
6542 if test "${with_gpm+set}" = set; then
6543   withval="$with_gpm"
6544   with_gpm=$withval
6545 else
6546   with_gpm=maybe
6547 fi;
6548 echo "$as_me:6548: result: $with_gpm" >&5
6549 echo "${ECHO_T}$with_gpm" >&6
6550
6551 if test "$with_gpm" != no ; then
6552         echo "$as_me:6552: checking for gpm.h" >&5
6553 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6554 if test "${ac_cv_header_gpm_h+set}" = set; then
6555   echo $ECHO_N "(cached) $ECHO_C" >&6
6556 else
6557   cat >conftest.$ac_ext <<_ACEOF
6558 #line 6558 "configure"
6559 #include "confdefs.h"
6560 #include <gpm.h>
6561 _ACEOF
6562 if { (eval echo "$as_me:6562: \"$ac_cpp conftest.$ac_ext\"") >&5
6563   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6564   ac_status=$?
6565   egrep -v '^ *\+' conftest.er1 >conftest.err
6566   rm -f conftest.er1
6567   cat conftest.err >&5
6568   echo "$as_me:6568: \$? = $ac_status" >&5
6569   (exit $ac_status); } >/dev/null; then
6570   if test -s conftest.err; then
6571     ac_cpp_err=$ac_c_preproc_warn_flag
6572   else
6573     ac_cpp_err=
6574   fi
6575 else
6576   ac_cpp_err=yes
6577 fi
6578 if test -z "$ac_cpp_err"; then
6579   ac_cv_header_gpm_h=yes
6580 else
6581   echo "$as_me: failed program was:" >&5
6582   cat conftest.$ac_ext >&5
6583   ac_cv_header_gpm_h=no
6584 fi
6585 rm -f conftest.err conftest.$ac_ext
6586 fi
6587 echo "$as_me:6587: result: $ac_cv_header_gpm_h" >&5
6588 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6589 if test $ac_cv_header_gpm_h = yes; then
6590
6591 cat >>confdefs.h <<\EOF
6592 #define HAVE_GPM_H 1
6593 EOF
6594
6595                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6596                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6597
6598 echo "${as_me:-configure}:6598: testing assuming we really have GPM library ..." 1>&5
6599
6600 cat >>confdefs.h <<\EOF
6601 #define HAVE_LIBGPM 1
6602 EOF
6603
6604                         with_gpm=yes
6605                 else
6606                         echo "$as_me:6606: checking for Gpm_Open in -lgpm" >&5
6607 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6608 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6609   echo $ECHO_N "(cached) $ECHO_C" >&6
6610 else
6611   ac_check_lib_save_LIBS=$LIBS
6612 LIBS="-lgpm  $LIBS"
6613 cat >conftest.$ac_ext <<_ACEOF
6614 #line 6614 "configure"
6615 #include "confdefs.h"
6616
6617 /* Override any gcc2 internal prototype to avoid an error.  */
6618 #ifdef __cplusplus
6619 extern "C"
6620 #endif
6621 /* We use char because int might match the return type of a gcc2
6622    builtin and then its argument prototype would still apply.  */
6623 char Gpm_Open ();
6624 int
6625 main (void)
6626 {
6627 Gpm_Open ();
6628   ;
6629   return 0;
6630 }
6631 _ACEOF
6632 rm -f conftest.$ac_objext conftest$ac_exeext
6633 if { (eval echo "$as_me:6633: \"$ac_link\"") >&5
6634   (eval $ac_link) 2>&5
6635   ac_status=$?
6636   echo "$as_me:6636: \$? = $ac_status" >&5
6637   (exit $ac_status); } &&
6638          { ac_try='test -s conftest$ac_exeext'
6639   { (eval echo "$as_me:6639: \"$ac_try\"") >&5
6640   (eval $ac_try) 2>&5
6641   ac_status=$?
6642   echo "$as_me:6642: \$? = $ac_status" >&5
6643   (exit $ac_status); }; }; then
6644   ac_cv_lib_gpm_Gpm_Open=yes
6645 else
6646   echo "$as_me: failed program was:" >&5
6647 cat conftest.$ac_ext >&5
6648 ac_cv_lib_gpm_Gpm_Open=no
6649 fi
6650 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6651 LIBS=$ac_check_lib_save_LIBS
6652 fi
6653 echo "$as_me:6653: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6654 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6655 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6656   with_gpm=yes
6657 else
6658
6659                                 if test "$with_gpm" = maybe; then
6660                                         { echo "$as_me:6660: WARNING: Cannot link with GPM library" >&5
6661 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6662                                         with_gpm=no
6663                                 else
6664                                         { { echo "$as_me:6664: error: Cannot link with GPM library" >&5
6665 echo "$as_me: error: Cannot link with GPM library" >&2;}
6666    { (exit 1); exit 1; }; }
6667                                 fi
6668
6669 fi
6670
6671                 fi
6672
6673 else
6674
6675                 test "$with_gpm" != maybe && { echo "$as_me:6675: WARNING: Cannot find GPM header" >&5
6676 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6677                 with_gpm=no
6678
6679 fi
6680
6681 fi
6682
6683 if test "$with_gpm" != no ; then
6684         echo "$as_me:6684: checking if you want to load GPM dynamically" >&5
6685 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6686
6687 # Check whether --with-dlsym or --without-dlsym was given.
6688 if test "${with_dlsym+set}" = set; then
6689   withval="$with_dlsym"
6690   with_dlsym=$withval
6691 else
6692   with_dlsym=yes
6693 fi;
6694         echo "$as_me:6694: result: $with_dlsym" >&5
6695 echo "${ECHO_T}$with_dlsym" >&6
6696         if test "x$with_dlsym" = xyes ; then
6697
6698 cf_have_dlsym=no
6699 echo "$as_me:6699: checking for dlsym" >&5
6700 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6701 if test "${ac_cv_func_dlsym+set}" = set; then
6702   echo $ECHO_N "(cached) $ECHO_C" >&6
6703 else
6704   cat >conftest.$ac_ext <<_ACEOF
6705 #line 6705 "configure"
6706 #include "confdefs.h"
6707 #define dlsym autoconf_temporary
6708 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6709 #undef dlsym
6710
6711 #ifdef __cplusplus
6712 extern "C"
6713 #endif
6714
6715 /* We use char because int might match the return type of a gcc2
6716    builtin and then its argument prototype would still apply.  */
6717 char dlsym (void);
6718
6719 int
6720 main (void)
6721 {
6722
6723 /* The GNU C library defines stubs for functions which it implements
6724     to always fail with ENOSYS.  Some functions are actually named
6725     something starting with __ and the normal name is an alias.  */
6726 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6727 #error found stub for dlsym
6728 #endif
6729
6730         return dlsym ();
6731   ;
6732   return 0;
6733 }
6734 _ACEOF
6735 rm -f conftest.$ac_objext conftest$ac_exeext
6736 if { (eval echo "$as_me:6736: \"$ac_link\"") >&5
6737   (eval $ac_link) 2>&5
6738   ac_status=$?
6739   echo "$as_me:6739: \$? = $ac_status" >&5
6740   (exit $ac_status); } &&
6741          { ac_try='test -s conftest$ac_exeext'
6742   { (eval echo "$as_me:6742: \"$ac_try\"") >&5
6743   (eval $ac_try) 2>&5
6744   ac_status=$?
6745   echo "$as_me:6745: \$? = $ac_status" >&5
6746   (exit $ac_status); }; }; then
6747   ac_cv_func_dlsym=yes
6748 else
6749   echo "$as_me: failed program was:" >&5
6750 cat conftest.$ac_ext >&5
6751 ac_cv_func_dlsym=no
6752 fi
6753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6754 fi
6755 echo "$as_me:6755: result: $ac_cv_func_dlsym" >&5
6756 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6757 if test $ac_cv_func_dlsym = yes; then
6758   cf_have_dlsym=yes
6759 else
6760
6761 cf_have_libdl=no
6762 echo "$as_me:6762: checking for dlsym in -ldl" >&5
6763 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6764 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6765   echo $ECHO_N "(cached) $ECHO_C" >&6
6766 else
6767   ac_check_lib_save_LIBS=$LIBS
6768 LIBS="-ldl  $LIBS"
6769 cat >conftest.$ac_ext <<_ACEOF
6770 #line 6770 "configure"
6771 #include "confdefs.h"
6772
6773 /* Override any gcc2 internal prototype to avoid an error.  */
6774 #ifdef __cplusplus
6775 extern "C"
6776 #endif
6777 /* We use char because int might match the return type of a gcc2
6778    builtin and then its argument prototype would still apply.  */
6779 char dlsym ();
6780 int
6781 main (void)
6782 {
6783 dlsym ();
6784   ;
6785   return 0;
6786 }
6787 _ACEOF
6788 rm -f conftest.$ac_objext conftest$ac_exeext
6789 if { (eval echo "$as_me:6789: \"$ac_link\"") >&5
6790   (eval $ac_link) 2>&5
6791   ac_status=$?
6792   echo "$as_me:6792: \$? = $ac_status" >&5
6793   (exit $ac_status); } &&
6794          { ac_try='test -s conftest$ac_exeext'
6795   { (eval echo "$as_me:6795: \"$ac_try\"") >&5
6796   (eval $ac_try) 2>&5
6797   ac_status=$?
6798   echo "$as_me:6798: \$? = $ac_status" >&5
6799   (exit $ac_status); }; }; then
6800   ac_cv_lib_dl_dlsym=yes
6801 else
6802   echo "$as_me: failed program was:" >&5
6803 cat conftest.$ac_ext >&5
6804 ac_cv_lib_dl_dlsym=no
6805 fi
6806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6807 LIBS=$ac_check_lib_save_LIBS
6808 fi
6809 echo "$as_me:6809: result: $ac_cv_lib_dl_dlsym" >&5
6810 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6811 if test $ac_cv_lib_dl_dlsym = yes; then
6812
6813         cf_have_dlsym=yes
6814         cf_have_libdl=yes
6815 fi
6816
6817 fi
6818
6819 if test "$cf_have_dlsym" = yes ; then
6820         test "$cf_have_libdl" = yes && {
6821 cf_add_libs="$LIBS"
6822 # reverse order
6823 cf_add_0lib=
6824 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6825 # filter duplicates
6826 for cf_add_1lib in $cf_add_0lib; do
6827         for cf_add_2lib in $cf_add_libs; do
6828                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6829                         cf_add_1lib=
6830                         break
6831                 fi
6832         done
6833         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6834 done
6835 LIBS="$cf_add_libs"
6836  }
6837
6838         echo "$as_me:6838: checking whether able to link to dl*() functions" >&5
6839 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6840         cat >conftest.$ac_ext <<_ACEOF
6841 #line 6841 "configure"
6842 #include "confdefs.h"
6843 #include <dlfcn.h>
6844 int
6845 main (void)
6846 {
6847
6848                 void *obj;
6849                 if ((obj = dlopen("filename", 0)) != 0) {
6850                         if (dlsym(obj, "symbolname") == 0) {
6851                         dlclose(obj);
6852                         }
6853                 }
6854   ;
6855   return 0;
6856 }
6857 _ACEOF
6858 rm -f conftest.$ac_objext conftest$ac_exeext
6859 if { (eval echo "$as_me:6859: \"$ac_link\"") >&5
6860   (eval $ac_link) 2>&5
6861   ac_status=$?
6862   echo "$as_me:6862: \$? = $ac_status" >&5
6863   (exit $ac_status); } &&
6864          { ac_try='test -s conftest$ac_exeext'
6865   { (eval echo "$as_me:6865: \"$ac_try\"") >&5
6866   (eval $ac_try) 2>&5
6867   ac_status=$?
6868   echo "$as_me:6868: \$? = $ac_status" >&5
6869   (exit $ac_status); }; }; then
6870
6871 cat >>confdefs.h <<\EOF
6872 #define HAVE_LIBDL 1
6873 EOF
6874
6875 else
6876   echo "$as_me: failed program was:" >&5
6877 cat conftest.$ac_ext >&5
6878
6879                 { { echo "$as_me:6879: error: Cannot link test program for libdl" >&5
6880 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6881    { (exit 1); exit 1; }; }
6882 fi
6883 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6884         echo "$as_me:6884: result: ok" >&5
6885 echo "${ECHO_T}ok" >&6
6886 else
6887         { { echo "$as_me:6887: error: Cannot find dlsym function" >&5
6888 echo "$as_me: error: Cannot find dlsym function" >&2;}
6889    { (exit 1); exit 1; }; }
6890 fi
6891
6892                 if test "x$with_gpm" != xyes ; then
6893                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6894
6895 echo "${as_me:-configure}:6895: testing assuming soname for gpm is $with_gpm ..." 1>&5
6896
6897                         cf_cv_gpm_soname="$with_gpm"
6898                 else
6899
6900 echo "$as_me:6900: checking for soname of gpm library" >&5
6901 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6902 if test "${cf_cv_gpm_soname+set}" = set; then
6903   echo $ECHO_N "(cached) $ECHO_C" >&6
6904 else
6905
6906 cf_cv_gpm_soname=unknown
6907 if test "$cross_compiling" != yes ; then
6908 cat >conftest.$ac_ext <<CF_EOF
6909 #include <gpm.h>
6910 int main(void)
6911 {
6912 if (Gpm_Open(0,0)) Gpm_Close();
6913         ${cf_cv_main_return:-return}(0);
6914 }
6915 CF_EOF
6916 cf_save_LIBS="$LIBS"
6917
6918 cf_add_libs="$LIBS"
6919 # reverse order
6920 cf_add_0lib=
6921 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6922 # filter duplicates
6923 for cf_add_1lib in $cf_add_0lib; do
6924         for cf_add_2lib in $cf_add_libs; do
6925                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6926                         cf_add_1lib=
6927                         break
6928                 fi
6929         done
6930         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6931 done
6932 LIBS="$cf_add_libs"
6933
6934         if { (eval echo "$as_me:6934: \"$ac_compile\"") >&5
6935   (eval $ac_compile) 2>&5
6936   ac_status=$?
6937   echo "$as_me:6937: \$? = $ac_status" >&5
6938   (exit $ac_status); } ; then
6939                 if { (eval echo "$as_me:6939: \"$ac_link\"") >&5
6940   (eval $ac_link) 2>&5
6941   ac_status=$?
6942   echo "$as_me:6942: \$? = $ac_status" >&5
6943   (exit $ac_status); } ; then
6944                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6945                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6946                 fi
6947         fi
6948 rm -rf conftest*
6949 LIBS="$cf_save_LIBS"
6950 fi
6951
6952 fi
6953 echo "$as_me:6953: result: $cf_cv_gpm_soname" >&5
6954 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6955
6956                 fi
6957                 test "$cf_cv_gpm_soname" != "unknown" &&
6958 cat >>confdefs.h <<EOF
6959 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6960 EOF
6961
6962                 SHLIB_LIST="-ldl $SHLIB_LIST"
6963
6964 cf_add_libs="$PRIVATE_LIBS"
6965 # reverse order
6966 cf_add_0lib=
6967 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6968 # filter duplicates
6969 for cf_add_1lib in $cf_add_0lib; do
6970         for cf_add_2lib in $cf_add_libs; do
6971                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6972                         cf_add_1lib=
6973                         break
6974                 fi
6975         done
6976         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6977 done
6978 PRIVATE_LIBS="$cf_add_libs"
6979
6980         else
6981                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6982
6983 cf_add_libs="$TEST_LIBS"
6984 # reverse order
6985 cf_add_0lib=
6986 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6987 # filter duplicates
6988 for cf_add_1lib in $cf_add_0lib; do
6989         for cf_add_2lib in $cf_add_libs; do
6990                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6991                         cf_add_1lib=
6992                         break
6993                 fi
6994         done
6995         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6996 done
6997 TEST_LIBS="$cf_add_libs"
6998
6999 cf_add_libs="$PRIVATE_LIBS"
7000 # reverse order
7001 cf_add_0lib=
7002 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7003 # filter duplicates
7004 for cf_add_1lib in $cf_add_0lib; do
7005         for cf_add_2lib in $cf_add_libs; do
7006                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7007                         cf_add_1lib=
7008                         break
7009                 fi
7010         done
7011         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7012 done
7013 PRIVATE_LIBS="$cf_add_libs"
7014
7015         fi
7016
7017 cat >>confdefs.h <<\EOF
7018 #define HAVE_LIBGPM 1
7019 EOF
7020
7021 echo "$as_me:7021: checking for Gpm_Wgetch in -lgpm" >&5
7022 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7023 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7024   echo $ECHO_N "(cached) $ECHO_C" >&6
7025 else
7026   ac_check_lib_save_LIBS=$LIBS
7027 LIBS="-lgpm  $LIBS"
7028 cat >conftest.$ac_ext <<_ACEOF
7029 #line 7029 "configure"
7030 #include "confdefs.h"
7031
7032 /* Override any gcc2 internal prototype to avoid an error.  */
7033 #ifdef __cplusplus
7034 extern "C"
7035 #endif
7036 /* We use char because int might match the return type of a gcc2
7037    builtin and then its argument prototype would still apply.  */
7038 char Gpm_Wgetch ();
7039 int
7040 main (void)
7041 {
7042 Gpm_Wgetch ();
7043   ;
7044   return 0;
7045 }
7046 _ACEOF
7047 rm -f conftest.$ac_objext conftest$ac_exeext
7048 if { (eval echo "$as_me:7048: \"$ac_link\"") >&5
7049   (eval $ac_link) 2>&5
7050   ac_status=$?
7051   echo "$as_me:7051: \$? = $ac_status" >&5
7052   (exit $ac_status); } &&
7053          { ac_try='test -s conftest$ac_exeext'
7054   { (eval echo "$as_me:7054: \"$ac_try\"") >&5
7055   (eval $ac_try) 2>&5
7056   ac_status=$?
7057   echo "$as_me:7057: \$? = $ac_status" >&5
7058   (exit $ac_status); }; }; then
7059   ac_cv_lib_gpm_Gpm_Wgetch=yes
7060 else
7061   echo "$as_me: failed program was:" >&5
7062 cat conftest.$ac_ext >&5
7063 ac_cv_lib_gpm_Gpm_Wgetch=no
7064 fi
7065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7066 LIBS=$ac_check_lib_save_LIBS
7067 fi
7068 echo "$as_me:7068: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7069 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7070 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7071
7072 echo "$as_me:7072: checking if GPM is weakly bound to curses library" >&5
7073 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7074 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7075   echo $ECHO_N "(cached) $ECHO_C" >&6
7076 else
7077
7078 cf_cv_check_gpm_wgetch=unknown
7079 if test "$cross_compiling" != yes ; then
7080
7081 cat >conftest.$ac_ext <<CF_EOF
7082 #include <gpm.h>
7083 int main(void)
7084 {
7085         Gpm_Wgetch();
7086         ${cf_cv_main_return:-return}(0);
7087 }
7088 CF_EOF
7089
7090         cf_save_LIBS="$LIBS"
7091         # This only works if we can look at the symbol table.  If a shared
7092         # library is stripped for install, we cannot use that.  So we're forced
7093         # to rely on the static library, noting that some packagers may not
7094         # include it.
7095         LIBS="-static -lgpm -dynamic $LIBS"
7096         if { (eval echo "$as_me:7096: \"$ac_compile\"") >&5
7097   (eval $ac_compile) 2>&5
7098   ac_status=$?
7099   echo "$as_me:7099: \$? = $ac_status" >&5
7100   (exit $ac_status); } ; then
7101                 if { (eval echo "$as_me:7101: \"$ac_link\"") >&5
7102   (eval $ac_link) 2>&5
7103   ac_status=$?
7104   echo "$as_me:7104: \$? = $ac_status" >&5
7105   (exit $ac_status); } ; then
7106                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7107                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7108                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7109                 fi
7110         fi
7111         rm -rf conftest*
7112         LIBS="$cf_save_LIBS"
7113 fi
7114
7115 fi
7116 echo "$as_me:7116: result: $cf_cv_check_gpm_wgetch" >&5
7117 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7118
7119 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7120         { echo "$as_me:7120: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7121 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7122 fi
7123
7124 fi
7125
7126 fi
7127
7128 echo "$as_me:7128: checking if you want to use PCRE2 for regular-expressions" >&5
7129 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7130
7131 # Check whether --with-pcre2 or --without-pcre2 was given.
7132 if test "${with_pcre2+set}" = set; then
7133   withval="$with_pcre2"
7134
7135 fi;
7136 test -z "$with_pcre2" && with_pcre2=no
7137 echo "$as_me:7137: result: $with_pcre2" >&5
7138 echo "${ECHO_T}$with_pcre2" >&6
7139
7140 if test "x$with_pcre2" != xno ; then
7141
7142 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7143         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7144
7145 echo "${as_me:-configure}:7145: testing found package libpcre2 ..." 1>&5
7146
7147         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7148         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7149         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7150
7151 echo "${as_me:-configure}:7151: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7152
7153         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7154
7155 echo "${as_me:-configure}:7155: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7156
7157 cf_fix_cppflags=no
7158 cf_new_cflags=
7159 cf_new_cppflags=
7160 cf_new_extra_cppflags=
7161
7162 for cf_add_cflags in $cf_pkgconfig_incs
7163 do
7164 case $cf_fix_cppflags in
7165 (no)
7166         case $cf_add_cflags in
7167         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7168                 case $cf_add_cflags in
7169                 (-D*)
7170                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7171
7172                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7173                                 && test -z "${cf_tst_cflags}" \
7174                                 && cf_fix_cppflags=yes
7175
7176                         if test $cf_fix_cppflags = yes ; then
7177
7178         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7179         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7180
7181                                 continue
7182                         elif test "${cf_tst_cflags}" = "\"'" ; then
7183
7184         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7185         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7186
7187                                 continue
7188                         fi
7189                         ;;
7190                 esac
7191                 case "$CPPFLAGS" in
7192                 (*$cf_add_cflags)
7193                         ;;
7194                 (*)
7195                         case $cf_add_cflags in
7196                         (-D*)
7197                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7198
7199 CPPFLAGS=`echo "$CPPFLAGS" | \
7200         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7201                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7202
7203                                 ;;
7204                         esac
7205
7206         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7207         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7208
7209                         ;;
7210                 esac
7211                 ;;
7212         (*)
7213
7214         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7215         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7216
7217                 ;;
7218         esac
7219         ;;
7220 (yes)
7221
7222         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7223         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7224
7225         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7226
7227         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7228                 && test -z "${cf_tst_cflags}" \
7229                 && cf_fix_cppflags=no
7230         ;;
7231 esac
7232 done
7233
7234 if test -n "$cf_new_cflags" ; then
7235
7236         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7237         CFLAGS="${CFLAGS}$cf_new_cflags"
7238
7239 fi
7240
7241 if test -n "$cf_new_cppflags" ; then
7242
7243         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7244         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7245
7246 fi
7247
7248 if test -n "$cf_new_extra_cppflags" ; then
7249
7250         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7251         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7252
7253 fi
7254
7255 cf_add_libs="$LIBS"
7256 # reverse order
7257 cf_add_0lib=
7258 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7259 # filter duplicates
7260 for cf_add_1lib in $cf_add_0lib; do
7261         for cf_add_2lib in $cf_add_libs; do
7262                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7263                         cf_add_1lib=
7264                         break
7265                 fi
7266         done
7267         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7268 done
7269 LIBS="$cf_add_libs"
7270
7271         :
7272 else
7273         cf_pkgconfig_incs=
7274         cf_pkgconfig_libs=
7275
7276 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7277         test -n "$verbose" && echo "    found package libpcre" 1>&6
7278
7279 echo "${as_me:-configure}:7279: testing found package libpcre ..." 1>&5
7280
7281         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7282         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7283         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7284
7285 echo "${as_me:-configure}:7285: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7286
7287         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7288
7289 echo "${as_me:-configure}:7289: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7290
7291 cf_fix_cppflags=no
7292 cf_new_cflags=
7293 cf_new_cppflags=
7294 cf_new_extra_cppflags=
7295
7296 for cf_add_cflags in $cf_pkgconfig_incs
7297 do
7298 case $cf_fix_cppflags in
7299 (no)
7300         case $cf_add_cflags in
7301         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7302                 case $cf_add_cflags in
7303                 (-D*)
7304                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7305
7306                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7307                                 && test -z "${cf_tst_cflags}" \
7308                                 && cf_fix_cppflags=yes
7309
7310                         if test $cf_fix_cppflags = yes ; then
7311
7312         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7313         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7314
7315                                 continue
7316                         elif test "${cf_tst_cflags}" = "\"'" ; then
7317
7318         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7319         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7320
7321                                 continue
7322                         fi
7323                         ;;
7324                 esac
7325                 case "$CPPFLAGS" in
7326                 (*$cf_add_cflags)
7327                         ;;
7328                 (*)
7329                         case $cf_add_cflags in
7330                         (-D*)
7331                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7332
7333 CPPFLAGS=`echo "$CPPFLAGS" | \
7334         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7335                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7336
7337                                 ;;
7338                         esac
7339
7340         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7341         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7342
7343                         ;;
7344                 esac
7345                 ;;
7346         (*)
7347
7348         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7349         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7350
7351                 ;;
7352         esac
7353         ;;
7354 (yes)
7355
7356         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7357         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7358
7359         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7360
7361         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7362                 && test -z "${cf_tst_cflags}" \
7363                 && cf_fix_cppflags=no
7364         ;;
7365 esac
7366 done
7367
7368 if test -n "$cf_new_cflags" ; then
7369
7370         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7371         CFLAGS="${CFLAGS}$cf_new_cflags"
7372
7373 fi
7374
7375 if test -n "$cf_new_cppflags" ; then
7376
7377         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7378         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7379
7380 fi
7381
7382 if test -n "$cf_new_extra_cppflags" ; then
7383
7384         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7385         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7386
7387 fi
7388
7389 cf_add_libs="$LIBS"
7390 # reverse order
7391 cf_add_0lib=
7392 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7393 # filter duplicates
7394 for cf_add_1lib in $cf_add_0lib; do
7395         for cf_add_2lib in $cf_add_libs; do
7396                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7397                         cf_add_1lib=
7398                         break
7399                 fi
7400         done
7401         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7402 done
7403 LIBS="$cf_add_libs"
7404
7405         :
7406 else
7407         cf_pkgconfig_incs=
7408         cf_pkgconfig_libs=
7409
7410                         { { echo "$as_me:7410: error: Cannot find PCRE2 library" >&5
7411 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7412    { (exit 1); exit 1; }; }
7413 fi
7414
7415 fi
7416
7417 cat >>confdefs.h <<\EOF
7418 #define HAVE_LIB_PCRE2 1
7419 EOF
7420
7421         # if pkgconfig gave no results, look for the libraries directly
7422         case $LIBS in
7423         (*pcre2-posix*|*pcreposix*)
7424                 ;;
7425         (*)
7426                 echo "$as_me:7426: checking for regcomp in -lpcre2-posix" >&5
7427 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7428 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7429   echo $ECHO_N "(cached) $ECHO_C" >&6
7430 else
7431   ac_check_lib_save_LIBS=$LIBS
7432 LIBS="-lpcre2-posix  $LIBS"
7433 cat >conftest.$ac_ext <<_ACEOF
7434 #line 7434 "configure"
7435 #include "confdefs.h"
7436
7437 /* Override any gcc2 internal prototype to avoid an error.  */
7438 #ifdef __cplusplus
7439 extern "C"
7440 #endif
7441 /* We use char because int might match the return type of a gcc2
7442    builtin and then its argument prototype would still apply.  */
7443 char regcomp ();
7444 int
7445 main (void)
7446 {
7447 regcomp ();
7448   ;
7449   return 0;
7450 }
7451 _ACEOF
7452 rm -f conftest.$ac_objext conftest$ac_exeext
7453 if { (eval echo "$as_me:7453: \"$ac_link\"") >&5
7454   (eval $ac_link) 2>&5
7455   ac_status=$?
7456   echo "$as_me:7456: \$? = $ac_status" >&5
7457   (exit $ac_status); } &&
7458          { ac_try='test -s conftest$ac_exeext'
7459   { (eval echo "$as_me:7459: \"$ac_try\"") >&5
7460   (eval $ac_try) 2>&5
7461   ac_status=$?
7462   echo "$as_me:7462: \$? = $ac_status" >&5
7463   (exit $ac_status); }; }; then
7464   ac_cv_lib_pcre2_posix_regcomp=yes
7465 else
7466   echo "$as_me: failed program was:" >&5
7467 cat conftest.$ac_ext >&5
7468 ac_cv_lib_pcre2_posix_regcomp=no
7469 fi
7470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7471 LIBS=$ac_check_lib_save_LIBS
7472 fi
7473 echo "$as_me:7473: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7474 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7475 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7476
7477 cf_add_libs="$LIBS"
7478 # reverse order
7479 cf_add_0lib=
7480 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7481 # filter duplicates
7482 for cf_add_1lib in $cf_add_0lib; do
7483         for cf_add_2lib in $cf_add_libs; do
7484                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7485                         cf_add_1lib=
7486                         break
7487                 fi
7488         done
7489         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7490 done
7491 LIBS="$cf_add_libs"
7492
7493 else
7494   echo "$as_me:7494: checking for regcomp in -lpcreposix" >&5
7495 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7496 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7497   echo $ECHO_N "(cached) $ECHO_C" >&6
7498 else
7499   ac_check_lib_save_LIBS=$LIBS
7500 LIBS="-lpcreposix  $LIBS"
7501 cat >conftest.$ac_ext <<_ACEOF
7502 #line 7502 "configure"
7503 #include "confdefs.h"
7504
7505 /* Override any gcc2 internal prototype to avoid an error.  */
7506 #ifdef __cplusplus
7507 extern "C"
7508 #endif
7509 /* We use char because int might match the return type of a gcc2
7510    builtin and then its argument prototype would still apply.  */
7511 char regcomp ();
7512 int
7513 main (void)
7514 {
7515 regcomp ();
7516   ;
7517   return 0;
7518 }
7519 _ACEOF
7520 rm -f conftest.$ac_objext conftest$ac_exeext
7521 if { (eval echo "$as_me:7521: \"$ac_link\"") >&5
7522   (eval $ac_link) 2>&5
7523   ac_status=$?
7524   echo "$as_me:7524: \$? = $ac_status" >&5
7525   (exit $ac_status); } &&
7526          { ac_try='test -s conftest$ac_exeext'
7527   { (eval echo "$as_me:7527: \"$ac_try\"") >&5
7528   (eval $ac_try) 2>&5
7529   ac_status=$?
7530   echo "$as_me:7530: \$? = $ac_status" >&5
7531   (exit $ac_status); }; }; then
7532   ac_cv_lib_pcreposix_regcomp=yes
7533 else
7534   echo "$as_me: failed program was:" >&5
7535 cat conftest.$ac_ext >&5
7536 ac_cv_lib_pcreposix_regcomp=no
7537 fi
7538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7539 LIBS=$ac_check_lib_save_LIBS
7540 fi
7541 echo "$as_me:7541: result: $ac_cv_lib_pcreposix_regcomp" >&5
7542 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7543 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7544
7545 cf_add_libs="$LIBS"
7546 # reverse order
7547 cf_add_0lib=
7548 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7549 # filter duplicates
7550 for cf_add_1lib in $cf_add_0lib; do
7551         for cf_add_2lib in $cf_add_libs; do
7552                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7553                         cf_add_1lib=
7554                         break
7555                 fi
7556         done
7557         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7558 done
7559 LIBS="$cf_add_libs"
7560
7561 else
7562   { { echo "$as_me:7562: error: Cannot find PCRE2 POSIX library" >&5
7563 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7564    { (exit 1); exit 1; }; }
7565 fi
7566
7567 fi
7568
7569                 ;;
7570         esac
7571
7572         # either way, check for the library header files
7573
7574 for ac_header in pcre2posix.h pcreposix.h
7575 do
7576 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7577 echo "$as_me:7577: checking for $ac_header" >&5
7578 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7579 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7580   echo $ECHO_N "(cached) $ECHO_C" >&6
7581 else
7582   cat >conftest.$ac_ext <<_ACEOF
7583 #line 7583 "configure"
7584 #include "confdefs.h"
7585 #include <$ac_header>
7586 _ACEOF
7587 if { (eval echo "$as_me:7587: \"$ac_cpp conftest.$ac_ext\"") >&5
7588   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7589   ac_status=$?
7590   egrep -v '^ *\+' conftest.er1 >conftest.err
7591   rm -f conftest.er1
7592   cat conftest.err >&5
7593   echo "$as_me:7593: \$? = $ac_status" >&5
7594   (exit $ac_status); } >/dev/null; then
7595   if test -s conftest.err; then
7596     ac_cpp_err=$ac_c_preproc_warn_flag
7597   else
7598     ac_cpp_err=
7599   fi
7600 else
7601   ac_cpp_err=yes
7602 fi
7603 if test -z "$ac_cpp_err"; then
7604   eval "$as_ac_Header=yes"
7605 else
7606   echo "$as_me: failed program was:" >&5
7607   cat conftest.$ac_ext >&5
7608   eval "$as_ac_Header=no"
7609 fi
7610 rm -f conftest.err conftest.$ac_ext
7611 fi
7612 echo "$as_me:7612: result: `eval echo '${'$as_ac_Header'}'`" >&5
7613 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7614 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7615   cat >>confdefs.h <<EOF
7616 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7617 EOF
7618
7619 fi
7620 done
7621
7622 fi
7623
7624 # not everyone has "test -c"
7625 if test -c /dev/sysmouse 2>/dev/null ; then
7626 echo "$as_me:7626: checking if you want to use sysmouse" >&5
7627 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7628
7629 # Check whether --with-sysmouse or --without-sysmouse was given.
7630 if test "${with_sysmouse+set}" = set; then
7631   withval="$with_sysmouse"
7632   cf_with_sysmouse=$withval
7633 else
7634   cf_with_sysmouse=maybe
7635 fi;
7636         if test "$cf_with_sysmouse" != no ; then
7637         cat >conftest.$ac_ext <<_ACEOF
7638 #line 7638 "configure"
7639 #include "confdefs.h"
7640
7641 #include <osreldate.h>
7642 #if (__FreeBSD_version >= 400017)
7643 #include <sys/consio.h>
7644 #include <sys/fbio.h>
7645 #else
7646 #include <machine/console.h>
7647 #endif
7648
7649 int
7650 main (void)
7651 {
7652
7653         struct mouse_info the_mouse;
7654         ioctl(0, CONS_MOUSECTL, &the_mouse);
7655
7656   ;
7657   return 0;
7658 }
7659 _ACEOF
7660 rm -f conftest.$ac_objext
7661 if { (eval echo "$as_me:7661: \"$ac_compile\"") >&5
7662   (eval $ac_compile) 2>&5
7663   ac_status=$?
7664   echo "$as_me:7664: \$? = $ac_status" >&5
7665   (exit $ac_status); } &&
7666          { ac_try='test -s conftest.$ac_objext'
7667   { (eval echo "$as_me:7667: \"$ac_try\"") >&5
7668   (eval $ac_try) 2>&5
7669   ac_status=$?
7670   echo "$as_me:7670: \$? = $ac_status" >&5
7671   (exit $ac_status); }; }; then
7672   cf_with_sysmouse=yes
7673 else
7674   echo "$as_me: failed program was:" >&5
7675 cat conftest.$ac_ext >&5
7676 cf_with_sysmouse=no
7677 fi
7678 rm -f conftest.$ac_objext conftest.$ac_ext
7679         fi
7680 echo "$as_me:7680: result: $cf_with_sysmouse" >&5
7681 echo "${ECHO_T}$cf_with_sysmouse" >&6
7682 test "$cf_with_sysmouse" = yes &&
7683 cat >>confdefs.h <<\EOF
7684 #define USE_SYSMOUSE 1
7685 EOF
7686
7687 fi
7688
7689 # pretend that ncurses==ncursesw==ncursest
7690 echo "$as_me:7690: checking if you want to disable library suffixes" >&5
7691 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7692
7693 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7694 if test "${enable_lib_suffixes+set}" = set; then
7695   enableval="$enable_lib_suffixes"
7696   test "$enableval" != no && enableval=yes
7697         if test "$enableval" != "yes" ; then
7698     disable_lib_suffixes=yes
7699         else
7700                 disable_lib_suffixes=no
7701         fi
7702 else
7703   enableval=yes
7704         disable_lib_suffixes=no
7705
7706 fi;
7707 echo "$as_me:7707: result: $disable_lib_suffixes" >&5
7708 echo "${ECHO_T}$disable_lib_suffixes" >&6
7709
7710 ### If we're building with rpath, try to link non-standard libs that way too.
7711 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7712
7713 echo "$as_me:7713: checking if rpath-hack should be disabled" >&5
7714 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7715
7716 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7717 if test "${enable_rpath_hack+set}" = set; then
7718   enableval="$enable_rpath_hack"
7719   test "$enableval" != no && enableval=yes
7720         if test "$enableval" != "yes" ; then
7721     cf_disable_rpath_hack=yes
7722         else
7723                 cf_disable_rpath_hack=no
7724         fi
7725 else
7726   enableval=yes
7727         cf_disable_rpath_hack=no
7728
7729 fi;
7730 echo "$as_me:7730: result: $cf_disable_rpath_hack" >&5
7731 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7732 if test "$cf_disable_rpath_hack" = no ; then
7733
7734 echo "$as_me:7734: checking for updated LDFLAGS" >&5
7735 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7736 if test -n "$LD_RPATH_OPT" ; then
7737         echo "$as_me:7737: result: maybe" >&5
7738 echo "${ECHO_T}maybe" >&6
7739
7740         for ac_prog in ldd
7741 do
7742   # Extract the first word of "$ac_prog", so it can be a program name with args.
7743 set dummy $ac_prog; ac_word=$2
7744 echo "$as_me:7744: checking for $ac_word" >&5
7745 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7746 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7747   echo $ECHO_N "(cached) $ECHO_C" >&6
7748 else
7749   if test -n "$cf_ldd_prog"; then
7750   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7751 else
7752   ac_save_IFS=$IFS; IFS=$ac_path_separator
7753 ac_dummy="$PATH"
7754 for ac_dir in $ac_dummy; do
7755   IFS=$ac_save_IFS
7756   test -z "$ac_dir" && ac_dir=.
7757   $as_executable_p "$ac_dir/$ac_word" || continue
7758 ac_cv_prog_cf_ldd_prog="$ac_prog"
7759 echo "$as_me:7759: found $ac_dir/$ac_word" >&5
7760 break
7761 done
7762
7763 fi
7764 fi
7765 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7766 if test -n "$cf_ldd_prog"; then
7767   echo "$as_me:7767: result: $cf_ldd_prog" >&5
7768 echo "${ECHO_T}$cf_ldd_prog" >&6
7769 else
7770   echo "$as_me:7770: result: no" >&5
7771 echo "${ECHO_T}no" >&6
7772 fi
7773
7774   test -n "$cf_ldd_prog" && break
7775 done
7776 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7777
7778         cf_rpath_list="/usr/lib /lib"
7779         if test "$cf_ldd_prog" != no
7780         then
7781                 cf_rpath_oops=
7782
7783 cat >conftest.$ac_ext <<_ACEOF
7784 #line 7784 "configure"
7785 #include "confdefs.h"
7786 #include <stdio.h>
7787 int
7788 main (void)
7789 {
7790 printf("Hello");
7791   ;
7792   return 0;
7793 }
7794 _ACEOF
7795 rm -f conftest.$ac_objext conftest$ac_exeext
7796 if { (eval echo "$as_me:7796: \"$ac_link\"") >&5
7797   (eval $ac_link) 2>&5
7798   ac_status=$?
7799   echo "$as_me:7799: \$? = $ac_status" >&5
7800   (exit $ac_status); } &&
7801          { ac_try='test -s conftest$ac_exeext'
7802   { (eval echo "$as_me:7802: \"$ac_try\"") >&5
7803   (eval $ac_try) 2>&5
7804   ac_status=$?
7805   echo "$as_me:7805: \$? = $ac_status" >&5
7806   (exit $ac_status); }; }; then
7807   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7808                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7809 else
7810   echo "$as_me: failed program was:" >&5
7811 cat conftest.$ac_ext >&5
7812 fi
7813 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7814
7815                 # If we passed the link-test, but get a "not found" on a given library,
7816                 # this could be due to inept reconfiguration of gcc to make it only
7817                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7818                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7819                 # /usr/local libraries.
7820                 if test -n "$cf_rpath_oops"
7821                 then
7822                         for cf_rpath_src in $cf_rpath_oops
7823                         do
7824                                 for cf_rpath_dir in \
7825                                         /usr/local \
7826                                         /usr/pkg \
7827                                         /opt/sfw
7828                                 do
7829                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7830                                         then
7831                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7832
7833 echo "${as_me:-configure}:7833: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7834
7835                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7836                                                 break
7837                                         fi
7838                                 done
7839                         done
7840                 fi
7841         fi
7842
7843         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7844
7845 echo "${as_me:-configure}:7845: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7846
7847 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7848
7849 echo "${as_me:-configure}:7849: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7850
7851 cf_rpath_dst=
7852 for cf_rpath_src in $LDFLAGS
7853 do
7854         case $cf_rpath_src in
7855         (-L*)
7856
7857                 # check if this refers to a directory which we will ignore
7858                 cf_rpath_skip=no
7859                 if test -n "$cf_rpath_list"
7860                 then
7861                         for cf_rpath_item in $cf_rpath_list
7862                         do
7863                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7864                                 then
7865                                         cf_rpath_skip=yes
7866                                         break
7867                                 fi
7868                         done
7869                 fi
7870
7871                 if test "$cf_rpath_skip" = no
7872                 then
7873                         # transform the option
7874                         if test "$LD_RPATH_OPT" = "-R " ; then
7875                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7876                         else
7877                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7878                         fi
7879
7880                         # if we have not already added this, add it now
7881                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7882                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7883                         then
7884                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7885
7886 echo "${as_me:-configure}:7886: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7887
7888                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7889                         fi
7890                 fi
7891                 ;;
7892         esac
7893         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7894 done
7895 LDFLAGS=$cf_rpath_dst
7896
7897 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7898
7899 echo "${as_me:-configure}:7899: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7900
7901 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7902
7903 echo "${as_me:-configure}:7903: testing ...checking LIBS $LIBS ..." 1>&5
7904
7905 cf_rpath_dst=
7906 for cf_rpath_src in $LIBS
7907 do
7908         case $cf_rpath_src in
7909         (-L*)
7910
7911                 # check if this refers to a directory which we will ignore
7912                 cf_rpath_skip=no
7913                 if test -n "$cf_rpath_list"
7914                 then
7915                         for cf_rpath_item in $cf_rpath_list
7916                         do
7917                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7918                                 then
7919                                         cf_rpath_skip=yes
7920                                         break
7921                                 fi
7922                         done
7923                 fi
7924
7925                 if test "$cf_rpath_skip" = no
7926                 then
7927                         # transform the option
7928                         if test "$LD_RPATH_OPT" = "-R " ; then
7929                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7930                         else
7931                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7932                         fi
7933
7934                         # if we have not already added this, add it now
7935                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7936                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7937                         then
7938                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7939
7940 echo "${as_me:-configure}:7940: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7941
7942                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7943                         fi
7944                 fi
7945                 ;;
7946         esac
7947         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7948 done
7949 LIBS=$cf_rpath_dst
7950
7951 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7952
7953 echo "${as_me:-configure}:7953: testing ...checked LIBS $LIBS ..." 1>&5
7954
7955         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7956
7957 echo "${as_me:-configure}:7957: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7958
7959 else
7960         echo "$as_me:7960: result: no" >&5
7961 echo "${ECHO_T}no" >&6
7962 fi
7963
7964 fi
7965
7966 fi
7967
7968 ###############################################################################
7969
7970 ###     use option --with-extra-suffix to append suffix to headers and libraries
7971 echo "$as_me:7971: checking if you wish to append extra suffix to header/library paths" >&5
7972 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7973 EXTRA_SUFFIX=
7974
7975 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7976 if test "${with_extra_suffix+set}" = set; then
7977   withval="$with_extra_suffix"
7978   case x$withval in
7979         (no)
7980                 ;;
7981         (xyes|x)
7982                 EXTRA_SUFFIX=$cf_cv_abi_version
7983                 ;;
7984         (*)
7985                 EXTRA_SUFFIX=$withval
7986                 ;;
7987         esac
7988
7989 fi;
7990 echo "$as_me:7990: result: $EXTRA_SUFFIX" >&5
7991 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7992
7993 ###     use option --disable-overwrite to leave out the link to -lcurses
7994 echo "$as_me:7994: checking if you wish to install ncurses overwriting curses" >&5
7995 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7996
7997 # Check whether --enable-overwrite or --disable-overwrite was given.
7998 if test "${enable_overwrite+set}" = set; then
7999   enableval="$enable_overwrite"
8000   with_overwrite=$enableval
8001 else
8002   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8003 fi;
8004 echo "$as_me:8004: result: $with_overwrite" >&5
8005 echo "${ECHO_T}$with_overwrite" >&6
8006
8007 echo "$as_me:8007: checking if external terminfo-database is used" >&5
8008 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8009
8010 # Check whether --enable-database or --disable-database was given.
8011 if test "${enable_database+set}" = set; then
8012   enableval="$enable_database"
8013   use_database=$enableval
8014 else
8015   use_database=yes
8016 fi;
8017 echo "$as_me:8017: result: $use_database" >&5
8018 echo "${ECHO_T}$use_database" >&6
8019
8020 case $host_os in
8021 (os2*)
8022         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8023         ;;
8024 (*)
8025         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8026         ;;
8027 esac
8028
8029 NCURSES_USE_DATABASE=0
8030 if test "$use_database" != no ; then
8031         NCURSES_USE_DATABASE=1
8032
8033         echo "$as_me:8033: checking which terminfo source-file will be installed" >&5
8034 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8035
8036 # Check whether --with-database or --without-database was given.
8037 if test "${with_database+set}" = set; then
8038   withval="$with_database"
8039   TERMINFO_SRC=$withval
8040 fi;
8041         echo "$as_me:8041: result: $TERMINFO_SRC" >&5
8042 echo "${ECHO_T}$TERMINFO_SRC" >&6
8043
8044         echo "$as_me:8044: checking whether to use hashed database instead of directory/tree" >&5
8045 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8046
8047 # Check whether --with-hashed-db or --without-hashed-db was given.
8048 if test "${with_hashed_db+set}" = set; then
8049   withval="$with_hashed_db"
8050
8051 else
8052   with_hashed_db=no
8053 fi;
8054         echo "$as_me:8054: result: $with_hashed_db" >&5
8055 echo "${ECHO_T}$with_hashed_db" >&6
8056 else
8057         with_hashed_db=no
8058 fi
8059
8060 echo "$as_me:8060: checking for list of fallback descriptions" >&5
8061 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8062
8063 # Check whether --with-fallbacks or --without-fallbacks was given.
8064 if test "${with_fallbacks+set}" = set; then
8065   withval="$with_fallbacks"
8066   with_fallback=$withval
8067 else
8068   with_fallback=
8069 fi;
8070 echo "$as_me:8070: result: $with_fallback" >&5
8071 echo "${ECHO_T}$with_fallback" >&6
8072
8073 case ".$with_fallback" in
8074 (.|.no)
8075         FALLBACK_LIST=
8076         ;;
8077 (.yes)
8078         { echo "$as_me:8078: WARNING: expected a list of terminal descriptions" >&5
8079 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8080         ;;
8081 (*)
8082         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8083         ;;
8084 esac
8085
8086 USE_FALLBACKS=
8087 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8088
8089 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8090 # tree for generating the terminal descriptions that will be compiled into the
8091 # library.  If your toolchain is old, it may not handle current terminal
8092 # databases.  Use configure-options to point to the tools which will be used,
8093 # rather than the first ones found on the $PATH.
8094 if test -n "$FALLBACK_LIST"
8095 then
8096
8097 # Check whether --with-tic-path or --without-tic-path was given.
8098 if test "${with_tic_path+set}" = set; then
8099   withval="$with_tic_path"
8100   echo "$as_me:8100: checking for tic program for fallbacks" >&5
8101 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8102                 TIC=$withval
8103                 echo "$as_me:8103: result: $TIC" >&5
8104 echo "${ECHO_T}$TIC" >&6
8105
8106 if test "x$prefix" != xNONE; then
8107         cf_path_syntax="$prefix"
8108 else
8109         cf_path_syntax="$ac_default_prefix"
8110 fi
8111
8112 case ".$TIC" in
8113 (.\$\(*\)*|.\'*\'*)
8114         ;;
8115 (..|./*|.\\*)
8116         ;;
8117 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8118         ;;
8119 (.\${*prefix}*|.\${*dir}*)
8120         eval TIC="$TIC"
8121         case ".$TIC" in
8122         (.NONE/*)
8123                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8124                 ;;
8125         esac
8126         ;;
8127 (.no|.NONE/*)
8128         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8129         ;;
8130 (*)
8131         { { echo "$as_me:8131: error: expected a pathname, not \"$TIC\"" >&5
8132 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8133    { (exit 1); exit 1; }; }
8134         ;;
8135 esac
8136
8137 else
8138
8139 test -z "$TIC" && TIC=tic
8140 for ac_prog in $TIC tic
8141 do
8142   # Extract the first word of "$ac_prog", so it can be a program name with args.
8143 set dummy $ac_prog; ac_word=$2
8144 echo "$as_me:8144: checking for $ac_word" >&5
8145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8146 if test "${ac_cv_path_TIC+set}" = set; then
8147   echo $ECHO_N "(cached) $ECHO_C" >&6
8148 else
8149   case $TIC in
8150   [\\/]* | ?:[\\/]*)
8151   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8152   ;;
8153   *)
8154   ac_save_IFS=$IFS; IFS=$ac_path_separator
8155 ac_dummy="$PATH:/usr/local/ncurses/bin"
8156 for ac_dir in $ac_dummy; do
8157   IFS=$ac_save_IFS
8158   test -z "$ac_dir" && ac_dir=.
8159   if $as_executable_p "$ac_dir/$ac_word"; then
8160    ac_cv_path_TIC="$ac_dir/$ac_word"
8161    echo "$as_me:8161: found $ac_dir/$ac_word" >&5
8162    break
8163 fi
8164 done
8165
8166   ;;
8167 esac
8168 fi
8169 TIC=$ac_cv_path_TIC
8170
8171 if test -n "$TIC"; then
8172   echo "$as_me:8172: result: $TIC" >&5
8173 echo "${ECHO_T}$TIC" >&6
8174 else
8175   echo "$as_me:8175: result: no" >&5
8176 echo "${ECHO_T}no" >&6
8177 fi
8178
8179   test -n "$TIC" && break
8180 done
8181 test -n "$TIC" || TIC="$TIC"
8182
8183 cf_path_prog=""
8184 cf_path_args=""
8185 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8186 for cf_temp in $ac_cv_path_TIC
8187 do
8188         if test -z "$cf_path_prog" ; then
8189                 if test "$with_full_paths" = yes ; then
8190
8191 if test "x$prefix" != xNONE; then
8192         cf_path_syntax="$prefix"
8193 else
8194         cf_path_syntax="$ac_default_prefix"
8195 fi
8196
8197 case ".$cf_temp" in
8198 (.\$\(*\)*|.\'*\'*)
8199         ;;
8200 (..|./*|.\\*)
8201         ;;
8202 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8203         ;;
8204 (.\${*prefix}*|.\${*dir}*)
8205         eval cf_temp="$cf_temp"
8206         case ".$cf_temp" in
8207         (.NONE/*)
8208                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8209                 ;;
8210         esac
8211         ;;
8212 (.no|.NONE/*)
8213         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8214         ;;
8215 (*)
8216         break
8217         ;;
8218 esac
8219
8220                         cf_path_prog="$cf_temp"
8221                 else
8222                         cf_path_prog="`basename $cf_temp`"
8223                 fi
8224         elif test -z "$cf_path_args" ; then
8225                 cf_path_args="$cf_temp"
8226         else
8227                 cf_path_args="$cf_path_args $cf_temp"
8228         fi
8229 done
8230 IFS="$cf_save_ifs"
8231
8232 if test -n "$cf_path_prog" ; then
8233
8234 echo "${as_me:-configure}:8234: testing defining path for ${cf_path_prog} ..." 1>&5
8235
8236 cat >>confdefs.h <<EOF
8237 #define TIC_PATH "$cf_path_prog"
8238 EOF
8239
8240         test -n "$cf_path_args" &&
8241 cat >>confdefs.h <<EOF
8242 #define TIC_ARGS "$cf_path_args"
8243 EOF
8244
8245 fi
8246
8247                 if test -z "$TIC"
8248                 then
8249                         { echo "$as_me:8249: WARNING: no tic program found for fallbacks" >&5
8250 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8251                 fi
8252
8253 fi;
8254
8255 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8256 if test "${with_infocmp_path+set}" = set; then
8257   withval="$with_infocmp_path"
8258   echo "$as_me:8258: checking for infocmp program for fallbacks" >&5
8259 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8260                 INFOCMP=$withval
8261                 echo "$as_me:8261: result: $INFOCMP" >&5
8262 echo "${ECHO_T}$INFOCMP" >&6
8263
8264 if test "x$prefix" != xNONE; then
8265         cf_path_syntax="$prefix"
8266 else
8267         cf_path_syntax="$ac_default_prefix"
8268 fi
8269
8270 case ".$INFOCMP" in
8271 (.\$\(*\)*|.\'*\'*)
8272         ;;
8273 (..|./*|.\\*)
8274         ;;
8275 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8276         ;;
8277 (.\${*prefix}*|.\${*dir}*)
8278         eval INFOCMP="$INFOCMP"
8279         case ".$INFOCMP" in
8280         (.NONE/*)
8281                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8282                 ;;
8283         esac
8284         ;;
8285 (.no|.NONE/*)
8286         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8287         ;;
8288 (*)
8289         { { echo "$as_me:8289: error: expected a pathname, not \"$INFOCMP\"" >&5
8290 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8291    { (exit 1); exit 1; }; }
8292         ;;
8293 esac
8294
8295 else
8296
8297 test -z "$INFOCMP" && INFOCMP=infocmp
8298 for ac_prog in $INFOCMP infocmp
8299 do
8300   # Extract the first word of "$ac_prog", so it can be a program name with args.
8301 set dummy $ac_prog; ac_word=$2
8302 echo "$as_me:8302: checking for $ac_word" >&5
8303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8304 if test "${ac_cv_path_INFOCMP+set}" = set; then
8305   echo $ECHO_N "(cached) $ECHO_C" >&6
8306 else
8307   case $INFOCMP in
8308   [\\/]* | ?:[\\/]*)
8309   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8310   ;;
8311   *)
8312   ac_save_IFS=$IFS; IFS=$ac_path_separator
8313 ac_dummy="$PATH:/usr/local/ncurses/bin"
8314 for ac_dir in $ac_dummy; do
8315   IFS=$ac_save_IFS
8316   test -z "$ac_dir" && ac_dir=.
8317   if $as_executable_p "$ac_dir/$ac_word"; then
8318    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8319    echo "$as_me:8319: found $ac_dir/$ac_word" >&5
8320    break
8321 fi
8322 done
8323
8324   ;;
8325 esac
8326 fi
8327 INFOCMP=$ac_cv_path_INFOCMP
8328
8329 if test -n "$INFOCMP"; then
8330   echo "$as_me:8330: result: $INFOCMP" >&5
8331 echo "${ECHO_T}$INFOCMP" >&6
8332 else
8333   echo "$as_me:8333: result: no" >&5
8334 echo "${ECHO_T}no" >&6
8335 fi
8336
8337   test -n "$INFOCMP" && break
8338 done
8339 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8340
8341 cf_path_prog=""
8342 cf_path_args=""
8343 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8344 for cf_temp in $ac_cv_path_INFOCMP
8345 do
8346         if test -z "$cf_path_prog" ; then
8347                 if test "$with_full_paths" = yes ; then
8348
8349 if test "x$prefix" != xNONE; then
8350         cf_path_syntax="$prefix"
8351 else
8352         cf_path_syntax="$ac_default_prefix"
8353 fi
8354
8355 case ".$cf_temp" in
8356 (.\$\(*\)*|.\'*\'*)
8357         ;;
8358 (..|./*|.\\*)
8359         ;;
8360 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8361         ;;
8362 (.\${*prefix}*|.\${*dir}*)
8363         eval cf_temp="$cf_temp"
8364         case ".$cf_temp" in
8365         (.NONE/*)
8366                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8367                 ;;
8368         esac
8369         ;;
8370 (.no|.NONE/*)
8371         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8372         ;;
8373 (*)
8374         break
8375         ;;
8376 esac
8377
8378                         cf_path_prog="$cf_temp"
8379                 else
8380                         cf_path_prog="`basename $cf_temp`"
8381                 fi
8382         elif test -z "$cf_path_args" ; then
8383                 cf_path_args="$cf_temp"
8384         else
8385                 cf_path_args="$cf_path_args $cf_temp"
8386         fi
8387 done
8388 IFS="$cf_save_ifs"
8389
8390 if test -n "$cf_path_prog" ; then
8391
8392 echo "${as_me:-configure}:8392: testing defining path for ${cf_path_prog} ..." 1>&5
8393
8394 cat >>confdefs.h <<EOF
8395 #define INFOCMP_PATH "$cf_path_prog"
8396 EOF
8397
8398         test -n "$cf_path_args" &&
8399 cat >>confdefs.h <<EOF
8400 #define INFOCMP_ARGS "$cf_path_args"
8401 EOF
8402
8403 fi
8404
8405                 if test -z "$INFOCMP"
8406                 then
8407                         { echo "$as_me:8407: WARNING: no infocmp program found for fallbacks" >&5
8408 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8409                 fi
8410
8411 fi;
8412
8413 else
8414         : ${TIC:=tic}
8415         : ${INFOCMP:=infocmp}
8416 fi
8417
8418 echo "$as_me:8418: checking if you want modern xterm or antique" >&5
8419 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8420
8421 # Check whether --with-xterm-new or --without-xterm-new was given.
8422 if test "${with_xterm_new+set}" = set; then
8423   withval="$with_xterm_new"
8424   with_xterm_new=$withval
8425 else
8426   with_xterm_new=yes
8427 fi;
8428 case $with_xterm_new in
8429 (no) with_xterm_new=xterm-old;;
8430 (*)      with_xterm_new=xterm-new;;
8431 esac
8432 echo "$as_me:8432: result: $with_xterm_new" >&5
8433 echo "${ECHO_T}$with_xterm_new" >&6
8434 WHICH_XTERM=$with_xterm_new
8435
8436 echo "$as_me:8436: checking if xterm backspace sends BS or DEL" >&5
8437 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8438
8439 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8440 if test "${with_xterm_kbs+set}" = set; then
8441   withval="$with_xterm_kbs"
8442   with_xterm_kbs=$withval
8443 else
8444   with_xterm_kbs=BS
8445 fi;
8446 case x$with_xterm_kbs in
8447 (xyes|xno|xBS|xbs|x8)
8448         with_xterm_kbs=BS
8449         ;;
8450 (xDEL|xdel|x127)
8451         with_xterm_kbs=DEL
8452         ;;
8453 (*)
8454         with_xterm_kbs=$withval
8455         ;;
8456 esac
8457 echo "$as_me:8457: result: $with_xterm_kbs" >&5
8458 echo "${ECHO_T}$with_xterm_kbs" >&6
8459 XTERM_KBS=$with_xterm_kbs
8460
8461 MAKE_TERMINFO=
8462 if test "$use_database" = no ; then
8463         TERMINFO="${datadir}/terminfo"
8464         MAKE_TERMINFO="#"
8465 else
8466
8467 echo "$as_me:8467: checking for list of terminfo directories" >&5
8468 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8469
8470 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8471 if test "${with_terminfo_dirs+set}" = set; then
8472   withval="$with_terminfo_dirs"
8473
8474 else
8475   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8476 fi;
8477 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8478 cf_dst_path=
8479 for cf_src_path in $withval
8480 do
8481
8482 if test "x$prefix" != xNONE; then
8483         cf_path_syntax="$prefix"
8484 else
8485         cf_path_syntax="$ac_default_prefix"
8486 fi
8487
8488 case ".$cf_src_path" in
8489 (.\$\(*\)*|.\'*\'*)
8490         ;;
8491 (..|./*|.\\*)
8492         ;;
8493 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8494         ;;
8495 (.\${*prefix}*|.\${*dir}*)
8496         eval cf_src_path="$cf_src_path"
8497         case ".$cf_src_path" in
8498         (.NONE/*)
8499                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8500                 ;;
8501         esac
8502         ;;
8503 (.no|.NONE/*)
8504         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8505         ;;
8506 (*)
8507         { { echo "$as_me:8507: error: expected a pathname, not \"$cf_src_path\"" >&5
8508 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8509    { (exit 1); exit 1; }; }
8510         ;;
8511 esac
8512
8513   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8514   cf_dst_path="${cf_dst_path}${cf_src_path}"
8515 done
8516 IFS="$ac_save_ifs"
8517
8518 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8519 # so we have to check/work around.  We do prefer the result of "eval"...
8520 eval cf_dst_eval="$cf_dst_path"
8521 case "x$cf_dst_eval" in
8522 (xNONE*)
8523         TERMINFO_DIRS=$cf_dst_path
8524         ;;
8525 (*)
8526         TERMINFO_DIRS="$cf_dst_eval"
8527         ;;
8528 esac
8529
8530 echo "$as_me:8530: result: $TERMINFO_DIRS" >&5
8531 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8532 test -n "$TERMINFO_DIRS" &&
8533 cat >>confdefs.h <<EOF
8534 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8535 EOF
8536
8537 case "x$TERMINFO" in
8538 x???:*)
8539         { echo "$as_me:8539: WARNING: ignoring non-directory/file TERMINFO value" >&5
8540 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8541         unset TERMINFO
8542         ;;
8543 esac
8544
8545 echo "$as_me:8545: checking for default terminfo directory" >&5
8546 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8547
8548 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8549 if test "${with_default_terminfo_dir+set}" = set; then
8550   withval="$with_default_terminfo_dir"
8551
8552 else
8553   withval="${TERMINFO:-${datadir}/terminfo}"
8554 fi; if test -n "${datadir}/terminfo" ; then
8555
8556 if test "x$prefix" != xNONE; then
8557         cf_path_syntax="$prefix"
8558 else
8559         cf_path_syntax="$ac_default_prefix"
8560 fi
8561
8562 case ".$withval" in
8563 (.\$\(*\)*|.\'*\'*)
8564         ;;
8565 (..|./*|.\\*)
8566         ;;
8567 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8568         ;;
8569 (.\${*prefix}*|.\${*dir}*)
8570         eval withval="$withval"
8571         case ".$withval" in
8572         (.NONE/*)
8573                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8574                 ;;
8575         esac
8576         ;;
8577 (.no|.NONE/*)
8578         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8579         ;;
8580 (*)
8581         { { echo "$as_me:8581: error: expected a pathname, not \"$withval\"" >&5
8582 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8583    { (exit 1); exit 1; }; }
8584         ;;
8585 esac
8586
8587 fi
8588 eval TERMINFO="$withval"
8589
8590 echo "$as_me:8590: result: $TERMINFO" >&5
8591 echo "${ECHO_T}$TERMINFO" >&6
8592
8593 cat >>confdefs.h <<EOF
8594 #define TERMINFO "$TERMINFO"
8595 EOF
8596
8597 fi
8598
8599 ###     use option --disable-big-core to make tic run on small machines
8600 ###     We need 4Mb, check if we can allocate 50% more than that.
8601 echo "$as_me:8601: checking if big-core option selected" >&5
8602 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8603
8604 # Check whether --enable-big-core or --disable-big-core was given.
8605 if test "${enable_big_core+set}" = set; then
8606   enableval="$enable_big_core"
8607   with_big_core=$enableval
8608 else
8609   if test "$cross_compiling" = yes; then
8610   with_big_core=no
8611 else
8612   cat >conftest.$ac_ext <<_ACEOF
8613 #line 8613 "configure"
8614 #include "confdefs.h"
8615
8616 #include <stdlib.h>
8617 #include <string.h>
8618 int main() {
8619         unsigned long n = 6000000L;
8620         char *s = malloc(n);
8621         if (s != 0)
8622                 s[0] = s[n-1] = 0;
8623         ${cf_cv_main_return:-return}(s == 0);
8624 }
8625 _ACEOF
8626 rm -f conftest$ac_exeext
8627 if { (eval echo "$as_me:8627: \"$ac_link\"") >&5
8628   (eval $ac_link) 2>&5
8629   ac_status=$?
8630   echo "$as_me:8630: \$? = $ac_status" >&5
8631   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8632   { (eval echo "$as_me:8632: \"$ac_try\"") >&5
8633   (eval $ac_try) 2>&5
8634   ac_status=$?
8635   echo "$as_me:8635: \$? = $ac_status" >&5
8636   (exit $ac_status); }; }; then
8637   with_big_core=yes
8638 else
8639   echo "$as_me: program exited with status $ac_status" >&5
8640 echo "$as_me: failed program was:" >&5
8641 cat conftest.$ac_ext >&5
8642 with_big_core=no
8643 fi
8644 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8645 fi
8646 fi;
8647 echo "$as_me:8647: result: $with_big_core" >&5
8648 echo "${ECHO_T}$with_big_core" >&6
8649 test "x$with_big_core" = "xyes" &&
8650 cat >>confdefs.h <<\EOF
8651 #define HAVE_BIG_CORE 1
8652 EOF
8653
8654 ### ISO C only guarantees 512-char strings, we have tables which load faster
8655 ### when constructed using "big" strings.  More than the C compiler, the awk
8656 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8657 echo "$as_me:8657: checking if big-strings option selected" >&5
8658 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8659
8660 # Check whether --enable-big-strings or --disable-big-strings was given.
8661 if test "${enable_big_strings+set}" = set; then
8662   enableval="$enable_big_strings"
8663   with_big_strings=$enableval
8664 else
8665
8666         case x$AWK in
8667         (x)
8668                 eval with_big_strings=no
8669                 ;;
8670         (*)
8671                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8672                         | $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
8673                         eval with_big_strings=yes
8674                 else
8675                         eval with_big_strings=no
8676                 fi
8677                 ;;
8678         esac
8679
8680 fi;
8681 echo "$as_me:8681: result: $with_big_strings" >&5
8682 echo "${ECHO_T}$with_big_strings" >&6
8683
8684 USE_BIG_STRINGS=0
8685 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8686
8687 ###     use option --enable-termcap to compile in the termcap fallback support
8688 echo "$as_me:8688: checking if you want termcap-fallback support" >&5
8689 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8690
8691 # Check whether --enable-termcap or --disable-termcap was given.
8692 if test "${enable_termcap+set}" = set; then
8693   enableval="$enable_termcap"
8694   with_termcap=$enableval
8695 else
8696   with_termcap=no
8697 fi;
8698 echo "$as_me:8698: result: $with_termcap" >&5
8699 echo "${ECHO_T}$with_termcap" >&6
8700
8701 NCURSES_USE_TERMCAP=0
8702 if test "x$with_termcap" != "xyes" ; then
8703         if test "$use_database" = no ; then
8704                 if test -z "$with_fallback" ; then
8705                         { { echo "$as_me:8705: error: You have disabled the database w/o specifying fallbacks" >&5
8706 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8707    { (exit 1); exit 1; }; }
8708                 fi
8709         fi
8710
8711 cat >>confdefs.h <<\EOF
8712 #define PURE_TERMINFO 1
8713 EOF
8714
8715 else
8716
8717         if test "$with_ticlib" != no ; then
8718                 { { echo "$as_me:8718: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8719 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8720    { (exit 1); exit 1; }; }
8721         fi
8722
8723         NCURSES_USE_TERMCAP=1
8724         echo "$as_me:8724: checking for list of termcap files" >&5
8725 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8726
8727 # Check whether --with-termpath or --without-termpath was given.
8728 if test "${with_termpath+set}" = set; then
8729   withval="$with_termpath"
8730
8731 else
8732   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8733 fi;
8734 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8735 cf_dst_path=
8736 for cf_src_path in $withval
8737 do
8738
8739 if test "x$prefix" != xNONE; then
8740         cf_path_syntax="$prefix"
8741 else
8742         cf_path_syntax="$ac_default_prefix"
8743 fi
8744
8745 case ".$cf_src_path" in
8746 (.\$\(*\)*|.\'*\'*)
8747         ;;
8748 (..|./*|.\\*)
8749         ;;
8750 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8751         ;;
8752 (.\${*prefix}*|.\${*dir}*)
8753         eval cf_src_path="$cf_src_path"
8754         case ".$cf_src_path" in
8755         (.NONE/*)
8756                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8757                 ;;
8758         esac
8759         ;;
8760 (.no|.NONE/*)
8761         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8762         ;;
8763 (*)
8764         { { echo "$as_me:8764: error: expected a pathname, not \"$cf_src_path\"" >&5
8765 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8766    { (exit 1); exit 1; }; }
8767         ;;
8768 esac
8769
8770   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8771   cf_dst_path="${cf_dst_path}${cf_src_path}"
8772 done
8773 IFS="$ac_save_ifs"
8774
8775 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8776 # so we have to check/work around.  We do prefer the result of "eval"...
8777 eval cf_dst_eval="$cf_dst_path"
8778 case "x$cf_dst_eval" in
8779 (xNONE*)
8780         TERMPATH=$cf_dst_path
8781         ;;
8782 (*)
8783         TERMPATH="$cf_dst_eval"
8784         ;;
8785 esac
8786
8787         echo "$as_me:8787: result: $TERMPATH" >&5
8788 echo "${ECHO_T}$TERMPATH" >&6
8789         test -n "$TERMPATH" &&
8790 cat >>confdefs.h <<EOF
8791 #define TERMPATH "$TERMPATH"
8792 EOF
8793
8794         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8795         echo "$as_me:8795: checking if fast termcap-loader is needed" >&5
8796 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8797
8798 # Check whether --enable-getcap or --disable-getcap was given.
8799 if test "${enable_getcap+set}" = set; then
8800   enableval="$enable_getcap"
8801   with_getcap=$enableval
8802 else
8803   with_getcap=no
8804 fi;
8805         echo "$as_me:8805: result: $with_getcap" >&5
8806 echo "${ECHO_T}$with_getcap" >&6
8807         test "x$with_getcap" = "xyes" &&
8808 cat >>confdefs.h <<\EOF
8809 #define USE_GETCAP 1
8810 EOF
8811
8812         echo "$as_me:8812: checking if translated termcaps will be cached in ~/.terminfo" >&5
8813 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8814
8815 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8816 if test "${enable_getcap_cache+set}" = set; then
8817   enableval="$enable_getcap_cache"
8818   with_getcap_cache=$enableval
8819 else
8820   with_getcap_cache=no
8821 fi;
8822         echo "$as_me:8822: result: $with_getcap_cache" >&5
8823 echo "${ECHO_T}$with_getcap_cache" >&6
8824         test "x$with_getcap_cache" = "xyes" &&
8825 cat >>confdefs.h <<\EOF
8826 #define USE_GETCAP_CACHE 1
8827 EOF
8828
8829 fi
8830
8831 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8832 echo "$as_me:8832: checking if ~/.terminfo is wanted" >&5
8833 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8834
8835 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8836 if test "${enable_home_terminfo+set}" = set; then
8837   enableval="$enable_home_terminfo"
8838   with_home_terminfo=$enableval
8839 else
8840   with_home_terminfo=yes
8841 fi;
8842 echo "$as_me:8842: result: $with_home_terminfo" >&5
8843 echo "${ECHO_T}$with_home_terminfo" >&6
8844 test "x$with_home_terminfo" = "xyes" &&
8845 cat >>confdefs.h <<\EOF
8846 #define USE_HOME_TERMINFO 1
8847 EOF
8848
8849 echo "$as_me:8849: checking if you want to use restricted environment when running as root" >&5
8850 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8851
8852 # Check whether --enable-root-environ or --disable-root-environ was given.
8853 if test "${enable_root_environ+set}" = set; then
8854   enableval="$enable_root_environ"
8855   with_root_environ=$enableval
8856 else
8857   with_root_environ=yes
8858 fi;
8859 echo "$as_me:8859: result: $with_root_environ" >&5
8860 echo "${ECHO_T}$with_root_environ" >&6
8861 test "x$with_root_environ" = xyes &&
8862 cat >>confdefs.h <<\EOF
8863 #define USE_ROOT_ENVIRON 1
8864 EOF
8865
8866 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8867 ###   to reduce storage requirements for the terminfo database.
8868
8869 for ac_header in \
8870 unistd.h \
8871
8872 do
8873 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8874 echo "$as_me:8874: checking for $ac_header" >&5
8875 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8876 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8877   echo $ECHO_N "(cached) $ECHO_C" >&6
8878 else
8879   cat >conftest.$ac_ext <<_ACEOF
8880 #line 8880 "configure"
8881 #include "confdefs.h"
8882 #include <$ac_header>
8883 _ACEOF
8884 if { (eval echo "$as_me:8884: \"$ac_cpp conftest.$ac_ext\"") >&5
8885   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8886   ac_status=$?
8887   egrep -v '^ *\+' conftest.er1 >conftest.err
8888   rm -f conftest.er1
8889   cat conftest.err >&5
8890   echo "$as_me:8890: \$? = $ac_status" >&5
8891   (exit $ac_status); } >/dev/null; then
8892   if test -s conftest.err; then
8893     ac_cpp_err=$ac_c_preproc_warn_flag
8894   else
8895     ac_cpp_err=
8896   fi
8897 else
8898   ac_cpp_err=yes
8899 fi
8900 if test -z "$ac_cpp_err"; then
8901   eval "$as_ac_Header=yes"
8902 else
8903   echo "$as_me: failed program was:" >&5
8904   cat conftest.$ac_ext >&5
8905   eval "$as_ac_Header=no"
8906 fi
8907 rm -f conftest.err conftest.$ac_ext
8908 fi
8909 echo "$as_me:8909: result: `eval echo '${'$as_ac_Header'}'`" >&5
8910 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8911 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8912   cat >>confdefs.h <<EOF
8913 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8914 EOF
8915
8916 fi
8917 done
8918
8919 for ac_func in \
8920         remove \
8921         unlink
8922 do
8923 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8924 echo "$as_me:8924: checking for $ac_func" >&5
8925 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8926 if eval "test \"\${$as_ac_var+set}\" = set"; then
8927   echo $ECHO_N "(cached) $ECHO_C" >&6
8928 else
8929   cat >conftest.$ac_ext <<_ACEOF
8930 #line 8930 "configure"
8931 #include "confdefs.h"
8932 #define $ac_func autoconf_temporary
8933 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8934 #undef $ac_func
8935
8936 #ifdef __cplusplus
8937 extern "C"
8938 #endif
8939
8940 /* We use char because int might match the return type of a gcc2
8941    builtin and then its argument prototype would still apply.  */
8942 char $ac_func (void);
8943
8944 int
8945 main (void)
8946 {
8947
8948 /* The GNU C library defines stubs for functions which it implements
8949     to always fail with ENOSYS.  Some functions are actually named
8950     something starting with __ and the normal name is an alias.  */
8951 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8952 #error found stub for $ac_func
8953 #endif
8954
8955         return $ac_func ();
8956   ;
8957   return 0;
8958 }
8959 _ACEOF
8960 rm -f conftest.$ac_objext conftest$ac_exeext
8961 if { (eval echo "$as_me:8961: \"$ac_link\"") >&5
8962   (eval $ac_link) 2>&5
8963   ac_status=$?
8964   echo "$as_me:8964: \$? = $ac_status" >&5
8965   (exit $ac_status); } &&
8966          { ac_try='test -s conftest$ac_exeext'
8967   { (eval echo "$as_me:8967: \"$ac_try\"") >&5
8968   (eval $ac_try) 2>&5
8969   ac_status=$?
8970   echo "$as_me:8970: \$? = $ac_status" >&5
8971   (exit $ac_status); }; }; then
8972   eval "$as_ac_var=yes"
8973 else
8974   echo "$as_me: failed program was:" >&5
8975 cat conftest.$ac_ext >&5
8976 eval "$as_ac_var=no"
8977 fi
8978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8979 fi
8980 echo "$as_me:8980: result: `eval echo '${'$as_ac_var'}'`" >&5
8981 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8982 if test `eval echo '${'$as_ac_var'}'` = yes; then
8983   cat >>confdefs.h <<EOF
8984 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8985 EOF
8986
8987 fi
8988 done
8989
8990 if test "$cross_compiling" = yes ; then
8991
8992 for ac_func in \
8993                 link \
8994                 symlink
8995 do
8996 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8997 echo "$as_me:8997: checking for $ac_func" >&5
8998 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8999 if eval "test \"\${$as_ac_var+set}\" = set"; then
9000   echo $ECHO_N "(cached) $ECHO_C" >&6
9001 else
9002   cat >conftest.$ac_ext <<_ACEOF
9003 #line 9003 "configure"
9004 #include "confdefs.h"
9005 #define $ac_func autoconf_temporary
9006 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9007 #undef $ac_func
9008
9009 #ifdef __cplusplus
9010 extern "C"
9011 #endif
9012
9013 /* We use char because int might match the return type of a gcc2
9014    builtin and then its argument prototype would still apply.  */
9015 char $ac_func (void);
9016
9017 int
9018 main (void)
9019 {
9020
9021 /* The GNU C library defines stubs for functions which it implements
9022     to always fail with ENOSYS.  Some functions are actually named
9023     something starting with __ and the normal name is an alias.  */
9024 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9025 #error found stub for $ac_func
9026 #endif
9027
9028         return $ac_func ();
9029   ;
9030   return 0;
9031 }
9032 _ACEOF
9033 rm -f conftest.$ac_objext conftest$ac_exeext
9034 if { (eval echo "$as_me:9034: \"$ac_link\"") >&5
9035   (eval $ac_link) 2>&5
9036   ac_status=$?
9037   echo "$as_me:9037: \$? = $ac_status" >&5
9038   (exit $ac_status); } &&
9039          { ac_try='test -s conftest$ac_exeext'
9040   { (eval echo "$as_me:9040: \"$ac_try\"") >&5
9041   (eval $ac_try) 2>&5
9042   ac_status=$?
9043   echo "$as_me:9043: \$? = $ac_status" >&5
9044   (exit $ac_status); }; }; then
9045   eval "$as_ac_var=yes"
9046 else
9047   echo "$as_me: failed program was:" >&5
9048 cat conftest.$ac_ext >&5
9049 eval "$as_ac_var=no"
9050 fi
9051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9052 fi
9053 echo "$as_me:9053: result: `eval echo '${'$as_ac_var'}'`" >&5
9054 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9055 if test `eval echo '${'$as_ac_var'}'` = yes; then
9056   cat >>confdefs.h <<EOF
9057 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9058 EOF
9059
9060 fi
9061 done
9062
9063 else
9064         echo "$as_me:9064: checking if link/symlink functions work" >&5
9065 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9066 if test "${cf_cv_link_funcs+set}" = set; then
9067   echo $ECHO_N "(cached) $ECHO_C" >&6
9068 else
9069
9070                 cf_cv_link_funcs=
9071                 for cf_func in link symlink ; do
9072                         if test "$cross_compiling" = yes; then
9073
9074                         eval 'ac_cv_func_'$cf_func'=error'
9075 else
9076   cat >conftest.$ac_ext <<_ACEOF
9077 #line 9077 "configure"
9078 #include "confdefs.h"
9079
9080 #include <sys/types.h>
9081 #include <sys/stat.h>
9082 #ifdef HAVE_UNISTD_H
9083 #include <unistd.h>
9084 #endif
9085 int main(void)
9086 {
9087         int fail = 0;
9088         char *src = "config.log";
9089         char *dst = "conftest.chk";
9090         struct stat src_sb;
9091         struct stat dst_sb;
9092
9093         stat(src, &src_sb);
9094         fail = ($cf_func("config.log", "conftest.chk") < 0)
9095             || (stat(dst, &dst_sb) < 0)
9096             || (dst_sb.st_mtime != src_sb.st_mtime);
9097 #ifdef HAVE_UNLINK
9098         unlink(dst);
9099 #else
9100         remove(dst);
9101 #endif
9102         ${cf_cv_main_return:-return} (fail);
9103 }
9104
9105 _ACEOF
9106 rm -f conftest$ac_exeext
9107 if { (eval echo "$as_me:9107: \"$ac_link\"") >&5
9108   (eval $ac_link) 2>&5
9109   ac_status=$?
9110   echo "$as_me:9110: \$? = $ac_status" >&5
9111   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9112   { (eval echo "$as_me:9112: \"$ac_try\"") >&5
9113   (eval $ac_try) 2>&5
9114   ac_status=$?
9115   echo "$as_me:9115: \$? = $ac_status" >&5
9116   (exit $ac_status); }; }; then
9117
9118                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9119                         eval 'ac_cv_func_'$cf_func'=yes'
9120 else
9121   echo "$as_me: program exited with status $ac_status" >&5
9122 echo "$as_me: failed program was:" >&5
9123 cat conftest.$ac_ext >&5
9124
9125                         eval 'ac_cv_func_'$cf_func'=no'
9126 fi
9127 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9128 fi
9129                 done
9130                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9131
9132 fi
9133 echo "$as_me:9133: result: $cf_cv_link_funcs" >&5
9134 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9135         test "$ac_cv_func_link"    = yes &&
9136 cat >>confdefs.h <<\EOF
9137 #define HAVE_LINK 1
9138 EOF
9139
9140         test "$ac_cv_func_symlink" = yes &&
9141 cat >>confdefs.h <<\EOF
9142 #define HAVE_SYMLINK 1
9143 EOF
9144
9145 fi
9146
9147 with_links=no
9148 with_symlinks=no
9149
9150 # soft links (symbolic links) are useful for some systems where hard links do
9151 # not work, or to make it simpler to copy terminfo trees around.
9152 if test "x$ac_cv_func_symlink" = xyes ; then
9153         echo "$as_me:9153: checking if tic should use symbolic links" >&5
9154 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9155
9156 # Check whether --enable-symlinks or --disable-symlinks was given.
9157 if test "${enable_symlinks+set}" = set; then
9158   enableval="$enable_symlinks"
9159   with_symlinks=$enableval
9160 else
9161   with_symlinks=no
9162 fi;
9163         echo "$as_me:9163: result: $with_symlinks" >&5
9164 echo "${ECHO_T}$with_symlinks" >&6
9165 fi
9166
9167 # If we have hard links and did not choose to use soft links instead, there is
9168 # no reason to make this choice optional - use the hard links.
9169 if test "$with_symlinks" = no ; then
9170         echo "$as_me:9170: checking if tic should use hard links" >&5
9171 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9172         if test "x$ac_cv_func_link" = xyes ; then
9173                 with_links=yes
9174         else
9175                 with_links=no
9176         fi
9177         echo "$as_me:9177: result: $with_links" >&5
9178 echo "${ECHO_T}$with_links" >&6
9179 fi
9180
9181 test "x$with_links" = xyes &&
9182 cat >>confdefs.h <<\EOF
9183 #define USE_LINKS 1
9184 EOF
9185
9186 test "x$with_symlinks" = xyes &&
9187 cat >>confdefs.h <<\EOF
9188 #define USE_SYMLINKS 1
9189 EOF
9190
9191 ###   use option --enable-broken-linker to force on use of broken-linker support
9192
9193 echo "$as_me:9193: checking if you want broken-linker support code" >&5
9194 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9195
9196 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9197 if test "${enable_broken_linker+set}" = set; then
9198   enableval="$enable_broken_linker"
9199   with_broken_linker=$enableval
9200 else
9201   with_broken_linker=no
9202 fi;
9203 echo "$as_me:9203: result: $with_broken_linker" >&5
9204 echo "${ECHO_T}$with_broken_linker" >&6
9205
9206 : ${BROKEN_LINKER:=0}
9207 if test "x$with_broken_linker" = xyes ; then
9208
9209 cat >>confdefs.h <<\EOF
9210 #define BROKEN_LINKER 1
9211 EOF
9212
9213         BROKEN_LINKER=1
9214 fi
9215
9216 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9217 echo "$as_me:9217: checking if tputs should process BSD-style prefix padding" >&5
9218 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9219
9220 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9221 if test "${enable_bsdpad+set}" = set; then
9222   enableval="$enable_bsdpad"
9223   with_bsdpad=$enableval
9224 else
9225   with_bsdpad=no
9226 fi;
9227 echo "$as_me:9227: result: $with_bsdpad" >&5
9228 echo "${ECHO_T}$with_bsdpad" >&6
9229 test "x$with_bsdpad" = xyes &&
9230 cat >>confdefs.h <<\EOF
9231 #define BSD_TPUTS 1
9232 EOF
9233
9234 ###   use option --enable-widec to turn on use of wide-character support
9235 NCURSES_CH_T=chtype
9236 NCURSES_LIBUTF8=0
9237
9238 NEED_WCHAR_H=0
9239 NCURSES_MBSTATE_T=0
9240 NCURSES_WCHAR_T=0
9241 NCURSES_WINT_T=0
9242
9243 # Check to define _XOPEN_SOURCE "automatically"
9244 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9245
9246 echo "$as_me:9246: checking if the POSIX test-macros are already defined" >&5
9247 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9248 if test "${cf_cv_posix_visible+set}" = set; then
9249   echo $ECHO_N "(cached) $ECHO_C" >&6
9250 else
9251
9252 cat >conftest.$ac_ext <<_ACEOF
9253 #line 9253 "configure"
9254 #include "confdefs.h"
9255 #include <stdio.h>
9256 int
9257 main (void)
9258 {
9259
9260 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9261         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9262         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9263         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9264 #error conflicting symbols found
9265 #endif
9266
9267   ;
9268   return 0;
9269 }
9270 _ACEOF
9271 rm -f conftest.$ac_objext
9272 if { (eval echo "$as_me:9272: \"$ac_compile\"") >&5
9273   (eval $ac_compile) 2>&5
9274   ac_status=$?
9275   echo "$as_me:9275: \$? = $ac_status" >&5
9276   (exit $ac_status); } &&
9277          { ac_try='test -s conftest.$ac_objext'
9278   { (eval echo "$as_me:9278: \"$ac_try\"") >&5
9279   (eval $ac_try) 2>&5
9280   ac_status=$?
9281   echo "$as_me:9281: \$? = $ac_status" >&5
9282   (exit $ac_status); }; }; then
9283   cf_cv_posix_visible=no
9284 else
9285   echo "$as_me: failed program was:" >&5
9286 cat conftest.$ac_ext >&5
9287 cf_cv_posix_visible=yes
9288 fi
9289 rm -f conftest.$ac_objext conftest.$ac_ext
9290
9291 fi
9292 echo "$as_me:9292: result: $cf_cv_posix_visible" >&5
9293 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9294
9295 if test "$cf_cv_posix_visible" = no; then
9296
9297 cf_XOPEN_SOURCE=600
9298 cf_POSIX_C_SOURCE=199506L
9299 cf_xopen_source=
9300
9301 case $host_os in
9302 (aix[4-7]*)
9303         cf_xopen_source="-D_ALL_SOURCE"
9304         ;;
9305 (msys)
9306         cf_XOPEN_SOURCE=600
9307         ;;
9308 (darwin[0-8].*)
9309         cf_xopen_source="-D_APPLE_C_SOURCE"
9310         ;;
9311 (darwin*)
9312         cf_xopen_source="-D_DARWIN_C_SOURCE"
9313         cf_XOPEN_SOURCE=
9314         ;;
9315 (freebsd*|dragonfly*|midnightbsd*)
9316         # 5.x headers associate
9317         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9318         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9319         cf_POSIX_C_SOURCE=200112L
9320         cf_XOPEN_SOURCE=600
9321         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9322         ;;
9323 (hpux11*)
9324         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9325         ;;
9326 (hpux*)
9327         cf_xopen_source="-D_HPUX_SOURCE"
9328         ;;
9329 (irix[56].*)
9330         cf_xopen_source="-D_SGI_SOURCE"
9331         cf_XOPEN_SOURCE=
9332         ;;
9333 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9334
9335 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9336
9337 echo "$as_me:9337: checking if this is the GNU C library" >&5
9338 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9339 if test "${cf_cv_gnu_library+set}" = set; then
9340   echo $ECHO_N "(cached) $ECHO_C" >&6
9341 else
9342
9343 cat >conftest.$ac_ext <<_ACEOF
9344 #line 9344 "configure"
9345 #include "confdefs.h"
9346 #include <sys/types.h>
9347 int
9348 main (void)
9349 {
9350
9351         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9352                 return 0;
9353         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9354                 return 0;
9355         #else
9356         #       error not GNU C library
9357         #endif
9358   ;
9359   return 0;
9360 }
9361 _ACEOF
9362 rm -f conftest.$ac_objext
9363 if { (eval echo "$as_me:9363: \"$ac_compile\"") >&5
9364   (eval $ac_compile) 2>&5
9365   ac_status=$?
9366   echo "$as_me:9366: \$? = $ac_status" >&5
9367   (exit $ac_status); } &&
9368          { ac_try='test -s conftest.$ac_objext'
9369   { (eval echo "$as_me:9369: \"$ac_try\"") >&5
9370   (eval $ac_try) 2>&5
9371   ac_status=$?
9372   echo "$as_me:9372: \$? = $ac_status" >&5
9373   (exit $ac_status); }; }; then
9374   cf_cv_gnu_library=yes
9375 else
9376   echo "$as_me: failed program was:" >&5
9377 cat conftest.$ac_ext >&5
9378 cf_cv_gnu_library=no
9379 fi
9380 rm -f conftest.$ac_objext conftest.$ac_ext
9381
9382 fi
9383 echo "$as_me:9383: result: $cf_cv_gnu_library" >&5
9384 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9385
9386 if test x$cf_cv_gnu_library = xyes; then
9387
9388         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9389         # was changed to help a little.  newlib incorporated the change about 4
9390         # years later.
9391         echo "$as_me:9391: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9392 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9393 if test "${cf_cv_gnu_library_219+set}" = set; then
9394   echo $ECHO_N "(cached) $ECHO_C" >&6
9395 else
9396
9397                 cf_save="$CPPFLAGS"
9398
9399         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9400         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9401
9402                 cat >conftest.$ac_ext <<_ACEOF
9403 #line 9403 "configure"
9404 #include "confdefs.h"
9405 #include <sys/types.h>
9406 int
9407 main (void)
9408 {
9409
9410                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9411                                 return 0;
9412                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9413                                 return 0;
9414                         #else
9415                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9416                         #endif
9417   ;
9418   return 0;
9419 }
9420 _ACEOF
9421 rm -f conftest.$ac_objext
9422 if { (eval echo "$as_me:9422: \"$ac_compile\"") >&5
9423   (eval $ac_compile) 2>&5
9424   ac_status=$?
9425   echo "$as_me:9425: \$? = $ac_status" >&5
9426   (exit $ac_status); } &&
9427          { ac_try='test -s conftest.$ac_objext'
9428   { (eval echo "$as_me:9428: \"$ac_try\"") >&5
9429   (eval $ac_try) 2>&5
9430   ac_status=$?
9431   echo "$as_me:9431: \$? = $ac_status" >&5
9432   (exit $ac_status); }; }; then
9433   cf_cv_gnu_library_219=yes
9434 else
9435   echo "$as_me: failed program was:" >&5
9436 cat conftest.$ac_ext >&5
9437 cf_cv_gnu_library_219=no
9438 fi
9439 rm -f conftest.$ac_objext conftest.$ac_ext
9440                 CPPFLAGS="$cf_save"
9441
9442 fi
9443 echo "$as_me:9443: result: $cf_cv_gnu_library_219" >&5
9444 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9445
9446         if test "x$cf_cv_gnu_library_219" = xyes; then
9447                 cf_save="$CPPFLAGS"
9448                 echo "$as_me:9448: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9449 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9450 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9451   echo $ECHO_N "(cached) $ECHO_C" >&6
9452 else
9453
9454 cf_fix_cppflags=no
9455 cf_new_cflags=
9456 cf_new_cppflags=
9457 cf_new_extra_cppflags=
9458
9459 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9460 do
9461 case $cf_fix_cppflags in
9462 (no)
9463         case $cf_add_cflags in
9464         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9465                 case $cf_add_cflags in
9466                 (-D*)
9467                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9468
9469                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9470                                 && test -z "${cf_tst_cflags}" \
9471                                 && cf_fix_cppflags=yes
9472
9473                         if test $cf_fix_cppflags = yes ; then
9474
9475         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9476         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9477
9478                                 continue
9479                         elif test "${cf_tst_cflags}" = "\"'" ; then
9480
9481         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9482         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9483
9484                                 continue
9485                         fi
9486                         ;;
9487                 esac
9488                 case "$CPPFLAGS" in
9489                 (*$cf_add_cflags)
9490                         ;;
9491                 (*)
9492                         case $cf_add_cflags in
9493                         (-D*)
9494                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9495
9496 CPPFLAGS=`echo "$CPPFLAGS" | \
9497         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9498                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9499
9500                                 ;;
9501                         esac
9502
9503         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9504         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9505
9506                         ;;
9507                 esac
9508                 ;;
9509         (*)
9510
9511         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9512         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9513
9514                 ;;
9515         esac
9516         ;;
9517 (yes)
9518
9519         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9520         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9521
9522         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9523
9524         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9525                 && test -z "${cf_tst_cflags}" \
9526                 && cf_fix_cppflags=no
9527         ;;
9528 esac
9529 done
9530
9531 if test -n "$cf_new_cflags" ; then
9532
9533         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9534         CFLAGS="${CFLAGS}$cf_new_cflags"
9535
9536 fi
9537
9538 if test -n "$cf_new_cppflags" ; then
9539
9540         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9541         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9542
9543 fi
9544
9545 if test -n "$cf_new_extra_cppflags" ; then
9546
9547         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9548         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9549
9550 fi
9551
9552                         cat >conftest.$ac_ext <<_ACEOF
9553 #line 9553 "configure"
9554 #include "confdefs.h"
9555
9556                                 #include <limits.h>
9557                                 #include <sys/types.h>
9558
9559 int
9560 main (void)
9561 {
9562
9563                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9564                                         return 0;
9565                                 #else
9566                                 #       error GNU C library is too old
9567                                 #endif
9568   ;
9569   return 0;
9570 }
9571 _ACEOF
9572 rm -f conftest.$ac_objext
9573 if { (eval echo "$as_me:9573: \"$ac_compile\"") >&5
9574   (eval $ac_compile) 2>&5
9575   ac_status=$?
9576   echo "$as_me:9576: \$? = $ac_status" >&5
9577   (exit $ac_status); } &&
9578          { ac_try='test -s conftest.$ac_objext'
9579   { (eval echo "$as_me:9579: \"$ac_try\"") >&5
9580   (eval $ac_try) 2>&5
9581   ac_status=$?
9582   echo "$as_me:9582: \$? = $ac_status" >&5
9583   (exit $ac_status); }; }; then
9584   cf_cv_gnu_dftsrc_219=yes
9585 else
9586   echo "$as_me: failed program was:" >&5
9587 cat conftest.$ac_ext >&5
9588 cf_cv_gnu_dftsrc_219=no
9589 fi
9590 rm -f conftest.$ac_objext conftest.$ac_ext
9591
9592 fi
9593 echo "$as_me:9593: result: $cf_cv_gnu_dftsrc_219" >&5
9594 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9595                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9596         else
9597                 cf_cv_gnu_dftsrc_219=maybe
9598         fi
9599
9600         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9601
9602                 echo "$as_me:9602: checking if we must define _GNU_SOURCE" >&5
9603 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9604 if test "${cf_cv_gnu_source+set}" = set; then
9605   echo $ECHO_N "(cached) $ECHO_C" >&6
9606 else
9607
9608                 cat >conftest.$ac_ext <<_ACEOF
9609 #line 9609 "configure"
9610 #include "confdefs.h"
9611 #include <sys/types.h>
9612 int
9613 main (void)
9614 {
9615
9616                         #ifndef _XOPEN_SOURCE
9617                         #error  expected _XOPEN_SOURCE to be defined
9618                         #endif
9619   ;
9620   return 0;
9621 }
9622 _ACEOF
9623 rm -f conftest.$ac_objext
9624 if { (eval echo "$as_me:9624: \"$ac_compile\"") >&5
9625   (eval $ac_compile) 2>&5
9626   ac_status=$?
9627   echo "$as_me:9627: \$? = $ac_status" >&5
9628   (exit $ac_status); } &&
9629          { ac_try='test -s conftest.$ac_objext'
9630   { (eval echo "$as_me:9630: \"$ac_try\"") >&5
9631   (eval $ac_try) 2>&5
9632   ac_status=$?
9633   echo "$as_me:9633: \$? = $ac_status" >&5
9634   (exit $ac_status); }; }; then
9635   cf_cv_gnu_source=no
9636 else
9637   echo "$as_me: failed program was:" >&5
9638 cat conftest.$ac_ext >&5
9639 cf_save="$CPPFLAGS"
9640
9641 cf_fix_cppflags=no
9642 cf_new_cflags=
9643 cf_new_cppflags=
9644 cf_new_extra_cppflags=
9645
9646 for cf_add_cflags in -D_GNU_SOURCE
9647 do
9648 case $cf_fix_cppflags in
9649 (no)
9650         case $cf_add_cflags in
9651         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9652                 case $cf_add_cflags in
9653                 (-D*)
9654                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9655
9656                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9657                                 && test -z "${cf_tst_cflags}" \
9658                                 && cf_fix_cppflags=yes
9659
9660                         if test $cf_fix_cppflags = yes ; then
9661
9662         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9663         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9664
9665                                 continue
9666                         elif test "${cf_tst_cflags}" = "\"'" ; then
9667
9668         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9669         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9670
9671                                 continue
9672                         fi
9673                         ;;
9674                 esac
9675                 case "$CPPFLAGS" in
9676                 (*$cf_add_cflags)
9677                         ;;
9678                 (*)
9679                         case $cf_add_cflags in
9680                         (-D*)
9681                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9682
9683 CPPFLAGS=`echo "$CPPFLAGS" | \
9684         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9685                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9686
9687                                 ;;
9688                         esac
9689
9690         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9691         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9692
9693                         ;;
9694                 esac
9695                 ;;
9696         (*)
9697
9698         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9699         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9700
9701                 ;;
9702         esac
9703         ;;
9704 (yes)
9705
9706         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9707         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9708
9709         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9710
9711         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9712                 && test -z "${cf_tst_cflags}" \
9713                 && cf_fix_cppflags=no
9714         ;;
9715 esac
9716 done
9717
9718 if test -n "$cf_new_cflags" ; then
9719
9720         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9721         CFLAGS="${CFLAGS}$cf_new_cflags"
9722
9723 fi
9724
9725 if test -n "$cf_new_cppflags" ; then
9726
9727         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9728         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9729
9730 fi
9731
9732 if test -n "$cf_new_extra_cppflags" ; then
9733
9734         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9735         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9736
9737 fi
9738
9739                          cat >conftest.$ac_ext <<_ACEOF
9740 #line 9740 "configure"
9741 #include "confdefs.h"
9742 #include <sys/types.h>
9743 int
9744 main (void)
9745 {
9746
9747                                 #ifdef _XOPEN_SOURCE
9748                                 #error  expected _XOPEN_SOURCE to be undefined
9749                                 #endif
9750   ;
9751   return 0;
9752 }
9753 _ACEOF
9754 rm -f conftest.$ac_objext
9755 if { (eval echo "$as_me:9755: \"$ac_compile\"") >&5
9756   (eval $ac_compile) 2>&5
9757   ac_status=$?
9758   echo "$as_me:9758: \$? = $ac_status" >&5
9759   (exit $ac_status); } &&
9760          { ac_try='test -s conftest.$ac_objext'
9761   { (eval echo "$as_me:9761: \"$ac_try\"") >&5
9762   (eval $ac_try) 2>&5
9763   ac_status=$?
9764   echo "$as_me:9764: \$? = $ac_status" >&5
9765   (exit $ac_status); }; }; then
9766   cf_cv_gnu_source=no
9767 else
9768   echo "$as_me: failed program was:" >&5
9769 cat conftest.$ac_ext >&5
9770 cf_cv_gnu_source=yes
9771 fi
9772 rm -f conftest.$ac_objext conftest.$ac_ext
9773                         CPPFLAGS="$cf_save"
9774
9775 fi
9776 rm -f conftest.$ac_objext conftest.$ac_ext
9777
9778 fi
9779 echo "$as_me:9779: result: $cf_cv_gnu_source" >&5
9780 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9781
9782                 if test "$cf_cv_gnu_source" = yes
9783                 then
9784                 echo "$as_me:9784: checking if we should also define _DEFAULT_SOURCE" >&5
9785 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9786 if test "${cf_cv_default_source+set}" = set; then
9787   echo $ECHO_N "(cached) $ECHO_C" >&6
9788 else
9789
9790         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9791         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9792
9793                         cat >conftest.$ac_ext <<_ACEOF
9794 #line 9794 "configure"
9795 #include "confdefs.h"
9796 #include <sys/types.h>
9797 int
9798 main (void)
9799 {
9800
9801                                 #ifdef _DEFAULT_SOURCE
9802                                 #error  expected _DEFAULT_SOURCE to be undefined
9803                                 #endif
9804   ;
9805   return 0;
9806 }
9807 _ACEOF
9808 rm -f conftest.$ac_objext
9809 if { (eval echo "$as_me:9809: \"$ac_compile\"") >&5
9810   (eval $ac_compile) 2>&5
9811   ac_status=$?
9812   echo "$as_me:9812: \$? = $ac_status" >&5
9813   (exit $ac_status); } &&
9814          { ac_try='test -s conftest.$ac_objext'
9815   { (eval echo "$as_me:9815: \"$ac_try\"") >&5
9816   (eval $ac_try) 2>&5
9817   ac_status=$?
9818   echo "$as_me:9818: \$? = $ac_status" >&5
9819   (exit $ac_status); }; }; then
9820   cf_cv_default_source=no
9821 else
9822   echo "$as_me: failed program was:" >&5
9823 cat conftest.$ac_ext >&5
9824 cf_cv_default_source=yes
9825 fi
9826 rm -f conftest.$ac_objext conftest.$ac_ext
9827
9828 fi
9829 echo "$as_me:9829: result: $cf_cv_default_source" >&5
9830 echo "${ECHO_T}$cf_cv_default_source" >&6
9831                         if test "$cf_cv_default_source" = yes
9832                         then
9833
9834         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9835         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9836
9837                         fi
9838                 fi
9839         fi
9840
9841 fi
9842
9843         ;;
9844 (minix*)
9845         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9846         ;;
9847 (mirbsd*)
9848         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9849         cf_XOPEN_SOURCE=
9850
9851 if test "$cf_cv_posix_visible" = no; then
9852
9853 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9854
9855 cf_save_CFLAGS="$CFLAGS"
9856 cf_save_CPPFLAGS="$CPPFLAGS"
9857
9858 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9859         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9860                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9861
9862 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9863         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9864                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9865
9866 echo "$as_me:9866: checking if we should define _POSIX_C_SOURCE" >&5
9867 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9868 if test "${cf_cv_posix_c_source+set}" = set; then
9869   echo $ECHO_N "(cached) $ECHO_C" >&6
9870 else
9871
9872 echo "${as_me:-configure}:9872: testing if the symbol is already defined go no further ..." 1>&5
9873
9874         cat >conftest.$ac_ext <<_ACEOF
9875 #line 9875 "configure"
9876 #include "confdefs.h"
9877 #include <sys/types.h>
9878 int
9879 main (void)
9880 {
9881
9882 #ifndef _POSIX_C_SOURCE
9883 make an error
9884 #endif
9885   ;
9886   return 0;
9887 }
9888 _ACEOF
9889 rm -f conftest.$ac_objext
9890 if { (eval echo "$as_me:9890: \"$ac_compile\"") >&5
9891   (eval $ac_compile) 2>&5
9892   ac_status=$?
9893   echo "$as_me:9893: \$? = $ac_status" >&5
9894   (exit $ac_status); } &&
9895          { ac_try='test -s conftest.$ac_objext'
9896   { (eval echo "$as_me:9896: \"$ac_try\"") >&5
9897   (eval $ac_try) 2>&5
9898   ac_status=$?
9899   echo "$as_me:9899: \$? = $ac_status" >&5
9900   (exit $ac_status); }; }; then
9901   cf_cv_posix_c_source=no
9902 else
9903   echo "$as_me: failed program was:" >&5
9904 cat conftest.$ac_ext >&5
9905 cf_want_posix_source=no
9906          case .$cf_POSIX_C_SOURCE in
9907          (.[12]??*)
9908                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9909                 ;;
9910          (.2)
9911                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9912                 cf_want_posix_source=yes
9913                 ;;
9914          (.*)
9915                 cf_want_posix_source=yes
9916                 ;;
9917          esac
9918          if test "$cf_want_posix_source" = yes ; then
9919                 cat >conftest.$ac_ext <<_ACEOF
9920 #line 9920 "configure"
9921 #include "confdefs.h"
9922 #include <sys/types.h>
9923 int
9924 main (void)
9925 {
9926
9927 #ifdef _POSIX_SOURCE
9928 make an error
9929 #endif
9930   ;
9931   return 0;
9932 }
9933 _ACEOF
9934 rm -f conftest.$ac_objext
9935 if { (eval echo "$as_me:9935: \"$ac_compile\"") >&5
9936   (eval $ac_compile) 2>&5
9937   ac_status=$?
9938   echo "$as_me:9938: \$? = $ac_status" >&5
9939   (exit $ac_status); } &&
9940          { ac_try='test -s conftest.$ac_objext'
9941   { (eval echo "$as_me:9941: \"$ac_try\"") >&5
9942   (eval $ac_try) 2>&5
9943   ac_status=$?
9944   echo "$as_me:9944: \$? = $ac_status" >&5
9945   (exit $ac_status); }; }; then
9946   :
9947 else
9948   echo "$as_me: failed program was:" >&5
9949 cat conftest.$ac_ext >&5
9950 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9951 fi
9952 rm -f conftest.$ac_objext conftest.$ac_ext
9953          fi
9954
9955 echo "${as_me:-configure}:9955: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9956
9957          CFLAGS="$cf_trim_CFLAGS"
9958          CPPFLAGS="$cf_trim_CPPFLAGS"
9959
9960         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9961         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9962
9963 echo "${as_me:-configure}:9963: testing if the second compile does not leave our definition intact error ..." 1>&5
9964
9965          cat >conftest.$ac_ext <<_ACEOF
9966 #line 9966 "configure"
9967 #include "confdefs.h"
9968 #include <sys/types.h>
9969 int
9970 main (void)
9971 {
9972
9973 #ifndef _POSIX_C_SOURCE
9974 make an error
9975 #endif
9976   ;
9977   return 0;
9978 }
9979 _ACEOF
9980 rm -f conftest.$ac_objext
9981 if { (eval echo "$as_me:9981: \"$ac_compile\"") >&5
9982   (eval $ac_compile) 2>&5
9983   ac_status=$?
9984   echo "$as_me:9984: \$? = $ac_status" >&5
9985   (exit $ac_status); } &&
9986          { ac_try='test -s conftest.$ac_objext'
9987   { (eval echo "$as_me:9987: \"$ac_try\"") >&5
9988   (eval $ac_try) 2>&5
9989   ac_status=$?
9990   echo "$as_me:9990: \$? = $ac_status" >&5
9991   (exit $ac_status); }; }; then
9992   :
9993 else
9994   echo "$as_me: failed program was:" >&5
9995 cat conftest.$ac_ext >&5
9996 cf_cv_posix_c_source=no
9997 fi
9998 rm -f conftest.$ac_objext conftest.$ac_ext
9999          CFLAGS="$cf_save_CFLAGS"
10000          CPPFLAGS="$cf_save_CPPFLAGS"
10001
10002 fi
10003 rm -f conftest.$ac_objext conftest.$ac_ext
10004
10005 fi
10006 echo "$as_me:10006: result: $cf_cv_posix_c_source" >&5
10007 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10008
10009 if test "$cf_cv_posix_c_source" != no ; then
10010         CFLAGS="$cf_trim_CFLAGS"
10011         CPPFLAGS="$cf_trim_CPPFLAGS"
10012
10013 cf_fix_cppflags=no
10014 cf_new_cflags=
10015 cf_new_cppflags=
10016 cf_new_extra_cppflags=
10017
10018 for cf_add_cflags in $cf_cv_posix_c_source
10019 do
10020 case $cf_fix_cppflags in
10021 (no)
10022         case $cf_add_cflags in
10023         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10024                 case $cf_add_cflags in
10025                 (-D*)
10026                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10027
10028                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10029                                 && test -z "${cf_tst_cflags}" \
10030                                 && cf_fix_cppflags=yes
10031
10032                         if test $cf_fix_cppflags = yes ; then
10033
10034         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10035         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10036
10037                                 continue
10038                         elif test "${cf_tst_cflags}" = "\"'" ; then
10039
10040         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10041         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10042
10043                                 continue
10044                         fi
10045                         ;;
10046                 esac
10047                 case "$CPPFLAGS" in
10048                 (*$cf_add_cflags)
10049                         ;;
10050                 (*)
10051                         case $cf_add_cflags in
10052                         (-D*)
10053                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10054
10055 CPPFLAGS=`echo "$CPPFLAGS" | \
10056         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10057                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10058
10059                                 ;;
10060                         esac
10061
10062         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10063         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10064
10065                         ;;
10066                 esac
10067                 ;;
10068         (*)
10069
10070         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10071         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10072
10073                 ;;
10074         esac
10075         ;;
10076 (yes)
10077
10078         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10079         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10080
10081         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10082
10083         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10084                 && test -z "${cf_tst_cflags}" \
10085                 && cf_fix_cppflags=no
10086         ;;
10087 esac
10088 done
10089
10090 if test -n "$cf_new_cflags" ; then
10091
10092         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10093         CFLAGS="${CFLAGS}$cf_new_cflags"
10094
10095 fi
10096
10097 if test -n "$cf_new_cppflags" ; then
10098
10099         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10100         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10101
10102 fi
10103
10104 if test -n "$cf_new_extra_cppflags" ; then
10105
10106         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10107         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10108
10109 fi
10110
10111 fi
10112
10113 fi # cf_cv_posix_visible
10114
10115         ;;
10116 (netbsd*)
10117         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10118         ;;
10119 (openbsd[4-9]*)
10120         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10121         cf_xopen_source="-D_BSD_SOURCE"
10122         cf_XOPEN_SOURCE=600
10123         ;;
10124 (openbsd*)
10125         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10126         ;;
10127 (osf[45]*)
10128         cf_xopen_source="-D_OSF_SOURCE"
10129         ;;
10130 (nto-qnx*)
10131         cf_xopen_source="-D_QNX_SOURCE"
10132         ;;
10133 (sco*)
10134         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10135         ;;
10136 (solaris2.*)
10137         cf_xopen_source="-D__EXTENSIONS__"
10138         cf_cv_xopen_source=broken
10139         ;;
10140 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10141         cf_XOPEN_SOURCE=
10142         cf_POSIX_C_SOURCE=
10143         ;;
10144 (*)
10145
10146 echo "$as_me:10146: checking if we should define _XOPEN_SOURCE" >&5
10147 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10148 if test "${cf_cv_xopen_source+set}" = set; then
10149   echo $ECHO_N "(cached) $ECHO_C" >&6
10150 else
10151
10152         cat >conftest.$ac_ext <<_ACEOF
10153 #line 10153 "configure"
10154 #include "confdefs.h"
10155
10156 #include <stdlib.h>
10157 #include <string.h>
10158 #include <sys/types.h>
10159
10160 int
10161 main (void)
10162 {
10163
10164 #ifndef _XOPEN_SOURCE
10165 make an error
10166 #endif
10167   ;
10168   return 0;
10169 }
10170 _ACEOF
10171 rm -f conftest.$ac_objext
10172 if { (eval echo "$as_me:10172: \"$ac_compile\"") >&5
10173   (eval $ac_compile) 2>&5
10174   ac_status=$?
10175   echo "$as_me:10175: \$? = $ac_status" >&5
10176   (exit $ac_status); } &&
10177          { ac_try='test -s conftest.$ac_objext'
10178   { (eval echo "$as_me:10178: \"$ac_try\"") >&5
10179   (eval $ac_try) 2>&5
10180   ac_status=$?
10181   echo "$as_me:10181: \$? = $ac_status" >&5
10182   (exit $ac_status); }; }; then
10183   cf_cv_xopen_source=no
10184 else
10185   echo "$as_me: failed program was:" >&5
10186 cat conftest.$ac_ext >&5
10187 cf_save="$CPPFLAGS"
10188
10189         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10190         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10191
10192          cat >conftest.$ac_ext <<_ACEOF
10193 #line 10193 "configure"
10194 #include "confdefs.h"
10195
10196 #include <stdlib.h>
10197 #include <string.h>
10198 #include <sys/types.h>
10199
10200 int
10201 main (void)
10202 {
10203
10204 #ifdef _XOPEN_SOURCE
10205 make an error
10206 #endif
10207   ;
10208   return 0;
10209 }
10210 _ACEOF
10211 rm -f conftest.$ac_objext
10212 if { (eval echo "$as_me:10212: \"$ac_compile\"") >&5
10213   (eval $ac_compile) 2>&5
10214   ac_status=$?
10215   echo "$as_me:10215: \$? = $ac_status" >&5
10216   (exit $ac_status); } &&
10217          { ac_try='test -s conftest.$ac_objext'
10218   { (eval echo "$as_me:10218: \"$ac_try\"") >&5
10219   (eval $ac_try) 2>&5
10220   ac_status=$?
10221   echo "$as_me:10221: \$? = $ac_status" >&5
10222   (exit $ac_status); }; }; then
10223   cf_cv_xopen_source=no
10224 else
10225   echo "$as_me: failed program was:" >&5
10226 cat conftest.$ac_ext >&5
10227 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10228 fi
10229 rm -f conftest.$ac_objext conftest.$ac_ext
10230         CPPFLAGS="$cf_save"
10231
10232 fi
10233 rm -f conftest.$ac_objext conftest.$ac_ext
10234
10235 fi
10236 echo "$as_me:10236: result: $cf_cv_xopen_source" >&5
10237 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10238
10239 if test "$cf_cv_xopen_source" != no ; then
10240
10241 CFLAGS=`echo "$CFLAGS" | \
10242         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10243                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10244
10245 CPPFLAGS=`echo "$CPPFLAGS" | \
10246         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10247                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10248
10249         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10250
10251 cf_fix_cppflags=no
10252 cf_new_cflags=
10253 cf_new_cppflags=
10254 cf_new_extra_cppflags=
10255
10256 for cf_add_cflags in $cf_temp_xopen_source
10257 do
10258 case $cf_fix_cppflags in
10259 (no)
10260         case $cf_add_cflags in
10261         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10262                 case $cf_add_cflags in
10263                 (-D*)
10264                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10265
10266                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10267                                 && test -z "${cf_tst_cflags}" \
10268                                 && cf_fix_cppflags=yes
10269
10270                         if test $cf_fix_cppflags = yes ; then
10271
10272         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10273         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10274
10275                                 continue
10276                         elif test "${cf_tst_cflags}" = "\"'" ; then
10277
10278         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10279         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10280
10281                                 continue
10282                         fi
10283                         ;;
10284                 esac
10285                 case "$CPPFLAGS" in
10286                 (*$cf_add_cflags)
10287                         ;;
10288                 (*)
10289                         case $cf_add_cflags in
10290                         (-D*)
10291                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10292
10293 CPPFLAGS=`echo "$CPPFLAGS" | \
10294         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10295                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10296
10297                                 ;;
10298                         esac
10299
10300         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10301         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10302
10303                         ;;
10304                 esac
10305                 ;;
10306         (*)
10307
10308         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10309         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10310
10311                 ;;
10312         esac
10313         ;;
10314 (yes)
10315
10316         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10317         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10318
10319         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10320
10321         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10322                 && test -z "${cf_tst_cflags}" \
10323                 && cf_fix_cppflags=no
10324         ;;
10325 esac
10326 done
10327
10328 if test -n "$cf_new_cflags" ; then
10329
10330         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10331         CFLAGS="${CFLAGS}$cf_new_cflags"
10332
10333 fi
10334
10335 if test -n "$cf_new_cppflags" ; then
10336
10337         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10338         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10339
10340 fi
10341
10342 if test -n "$cf_new_extra_cppflags" ; then
10343
10344         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10345         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10346
10347 fi
10348
10349 fi
10350
10351 if test "$cf_cv_posix_visible" = no; then
10352
10353 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10354
10355 cf_save_CFLAGS="$CFLAGS"
10356 cf_save_CPPFLAGS="$CPPFLAGS"
10357
10358 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10359         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10360                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10361
10362 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10363         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10364                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10365
10366 echo "$as_me:10366: checking if we should define _POSIX_C_SOURCE" >&5
10367 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10368 if test "${cf_cv_posix_c_source+set}" = set; then
10369   echo $ECHO_N "(cached) $ECHO_C" >&6
10370 else
10371
10372 echo "${as_me:-configure}:10372: testing if the symbol is already defined go no further ..." 1>&5
10373
10374         cat >conftest.$ac_ext <<_ACEOF
10375 #line 10375 "configure"
10376 #include "confdefs.h"
10377 #include <sys/types.h>
10378 int
10379 main (void)
10380 {
10381
10382 #ifndef _POSIX_C_SOURCE
10383 make an error
10384 #endif
10385   ;
10386   return 0;
10387 }
10388 _ACEOF
10389 rm -f conftest.$ac_objext
10390 if { (eval echo "$as_me:10390: \"$ac_compile\"") >&5
10391   (eval $ac_compile) 2>&5
10392   ac_status=$?
10393   echo "$as_me:10393: \$? = $ac_status" >&5
10394   (exit $ac_status); } &&
10395          { ac_try='test -s conftest.$ac_objext'
10396   { (eval echo "$as_me:10396: \"$ac_try\"") >&5
10397   (eval $ac_try) 2>&5
10398   ac_status=$?
10399   echo "$as_me:10399: \$? = $ac_status" >&5
10400   (exit $ac_status); }; }; then
10401   cf_cv_posix_c_source=no
10402 else
10403   echo "$as_me: failed program was:" >&5
10404 cat conftest.$ac_ext >&5
10405 cf_want_posix_source=no
10406          case .$cf_POSIX_C_SOURCE in
10407          (.[12]??*)
10408                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10409                 ;;
10410          (.2)
10411                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10412                 cf_want_posix_source=yes
10413                 ;;
10414          (.*)
10415                 cf_want_posix_source=yes
10416                 ;;
10417          esac
10418          if test "$cf_want_posix_source" = yes ; then
10419                 cat >conftest.$ac_ext <<_ACEOF
10420 #line 10420 "configure"
10421 #include "confdefs.h"
10422 #include <sys/types.h>
10423 int
10424 main (void)
10425 {
10426
10427 #ifdef _POSIX_SOURCE
10428 make an error
10429 #endif
10430   ;
10431   return 0;
10432 }
10433 _ACEOF
10434 rm -f conftest.$ac_objext
10435 if { (eval echo "$as_me:10435: \"$ac_compile\"") >&5
10436   (eval $ac_compile) 2>&5
10437   ac_status=$?
10438   echo "$as_me:10438: \$? = $ac_status" >&5
10439   (exit $ac_status); } &&
10440          { ac_try='test -s conftest.$ac_objext'
10441   { (eval echo "$as_me:10441: \"$ac_try\"") >&5
10442   (eval $ac_try) 2>&5
10443   ac_status=$?
10444   echo "$as_me:10444: \$? = $ac_status" >&5
10445   (exit $ac_status); }; }; then
10446   :
10447 else
10448   echo "$as_me: failed program was:" >&5
10449 cat conftest.$ac_ext >&5
10450 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10451 fi
10452 rm -f conftest.$ac_objext conftest.$ac_ext
10453          fi
10454
10455 echo "${as_me:-configure}:10455: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10456
10457          CFLAGS="$cf_trim_CFLAGS"
10458          CPPFLAGS="$cf_trim_CPPFLAGS"
10459
10460         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10461         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10462
10463 echo "${as_me:-configure}:10463: testing if the second compile does not leave our definition intact error ..." 1>&5
10464
10465          cat >conftest.$ac_ext <<_ACEOF
10466 #line 10466 "configure"
10467 #include "confdefs.h"
10468 #include <sys/types.h>
10469 int
10470 main (void)
10471 {
10472
10473 #ifndef _POSIX_C_SOURCE
10474 make an error
10475 #endif
10476   ;
10477   return 0;
10478 }
10479 _ACEOF
10480 rm -f conftest.$ac_objext
10481 if { (eval echo "$as_me:10481: \"$ac_compile\"") >&5
10482   (eval $ac_compile) 2>&5
10483   ac_status=$?
10484   echo "$as_me:10484: \$? = $ac_status" >&5
10485   (exit $ac_status); } &&
10486          { ac_try='test -s conftest.$ac_objext'
10487   { (eval echo "$as_me:10487: \"$ac_try\"") >&5
10488   (eval $ac_try) 2>&5
10489   ac_status=$?
10490   echo "$as_me:10490: \$? = $ac_status" >&5
10491   (exit $ac_status); }; }; then
10492   :
10493 else
10494   echo "$as_me: failed program was:" >&5
10495 cat conftest.$ac_ext >&5
10496 cf_cv_posix_c_source=no
10497 fi
10498 rm -f conftest.$ac_objext conftest.$ac_ext
10499          CFLAGS="$cf_save_CFLAGS"
10500          CPPFLAGS="$cf_save_CPPFLAGS"
10501
10502 fi
10503 rm -f conftest.$ac_objext conftest.$ac_ext
10504
10505 fi
10506 echo "$as_me:10506: result: $cf_cv_posix_c_source" >&5
10507 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10508
10509 if test "$cf_cv_posix_c_source" != no ; then
10510         CFLAGS="$cf_trim_CFLAGS"
10511         CPPFLAGS="$cf_trim_CPPFLAGS"
10512
10513 cf_fix_cppflags=no
10514 cf_new_cflags=
10515 cf_new_cppflags=
10516 cf_new_extra_cppflags=
10517
10518 for cf_add_cflags in $cf_cv_posix_c_source
10519 do
10520 case $cf_fix_cppflags in
10521 (no)
10522         case $cf_add_cflags in
10523         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10524                 case $cf_add_cflags in
10525                 (-D*)
10526                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10527
10528                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10529                                 && test -z "${cf_tst_cflags}" \
10530                                 && cf_fix_cppflags=yes
10531
10532                         if test $cf_fix_cppflags = yes ; then
10533
10534         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10535         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10536
10537                                 continue
10538                         elif test "${cf_tst_cflags}" = "\"'" ; then
10539
10540         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10541         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10542
10543                                 continue
10544                         fi
10545                         ;;
10546                 esac
10547                 case "$CPPFLAGS" in
10548                 (*$cf_add_cflags)
10549                         ;;
10550                 (*)
10551                         case $cf_add_cflags in
10552                         (-D*)
10553                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10554
10555 CPPFLAGS=`echo "$CPPFLAGS" | \
10556         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10557                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10558
10559                                 ;;
10560                         esac
10561
10562         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10563         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10564
10565                         ;;
10566                 esac
10567                 ;;
10568         (*)
10569
10570         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10571         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10572
10573                 ;;
10574         esac
10575         ;;
10576 (yes)
10577
10578         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10579         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10580
10581         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10582
10583         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10584                 && test -z "${cf_tst_cflags}" \
10585                 && cf_fix_cppflags=no
10586         ;;
10587 esac
10588 done
10589
10590 if test -n "$cf_new_cflags" ; then
10591
10592         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10593         CFLAGS="${CFLAGS}$cf_new_cflags"
10594
10595 fi
10596
10597 if test -n "$cf_new_cppflags" ; then
10598
10599         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10600         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10601
10602 fi
10603
10604 if test -n "$cf_new_extra_cppflags" ; then
10605
10606         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10607         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10608
10609 fi
10610
10611 fi
10612
10613 fi # cf_cv_posix_visible
10614
10615         ;;
10616 esac
10617
10618 if test -n "$cf_xopen_source" ; then
10619
10620 cf_fix_cppflags=no
10621 cf_new_cflags=
10622 cf_new_cppflags=
10623 cf_new_extra_cppflags=
10624
10625 for cf_add_cflags in $cf_xopen_source
10626 do
10627 case $cf_fix_cppflags in
10628 (no)
10629         case $cf_add_cflags in
10630         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10631                 case $cf_add_cflags in
10632                 (-D*)
10633                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10634
10635                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10636                                 && test -z "${cf_tst_cflags}" \
10637                                 && cf_fix_cppflags=yes
10638
10639                         if test $cf_fix_cppflags = yes ; then
10640
10641         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10642         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10643
10644                                 continue
10645                         elif test "${cf_tst_cflags}" = "\"'" ; then
10646
10647         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10648         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10649
10650                                 continue
10651                         fi
10652                         ;;
10653                 esac
10654                 case "$CPPFLAGS" in
10655                 (*$cf_add_cflags)
10656                         ;;
10657                 (*)
10658                         case $cf_add_cflags in
10659                         (-D*)
10660                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10661
10662 CPPFLAGS=`echo "$CPPFLAGS" | \
10663         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10664                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10665
10666                                 ;;
10667                         esac
10668
10669         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10670         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10671
10672                         ;;
10673                 esac
10674                 ;;
10675         (*)
10676
10677         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10678         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10679
10680                 ;;
10681         esac
10682         ;;
10683 (yes)
10684
10685         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10686         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10687
10688         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10689
10690         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10691                 && test -z "${cf_tst_cflags}" \
10692                 && cf_fix_cppflags=no
10693         ;;
10694 esac
10695 done
10696
10697 if test -n "$cf_new_cflags" ; then
10698         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10699
10700 echo "${as_me:-configure}:10700: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10701
10702         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10703         CFLAGS="${CFLAGS}$cf_new_cflags"
10704
10705 fi
10706
10707 if test -n "$cf_new_cppflags" ; then
10708         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10709
10710 echo "${as_me:-configure}:10710: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10711
10712         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10713         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10714
10715 fi
10716
10717 if test -n "$cf_new_extra_cppflags" ; then
10718         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10719
10720 echo "${as_me:-configure}:10720: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10721
10722         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10723         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10724
10725 fi
10726
10727 fi
10728
10729 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10730         echo "$as_me:10730: checking if _XOPEN_SOURCE really is set" >&5
10731 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10732         cat >conftest.$ac_ext <<_ACEOF
10733 #line 10733 "configure"
10734 #include "confdefs.h"
10735 #include <stdlib.h>
10736 int
10737 main (void)
10738 {
10739
10740 #ifndef _XOPEN_SOURCE
10741 make an error
10742 #endif
10743   ;
10744   return 0;
10745 }
10746 _ACEOF
10747 rm -f conftest.$ac_objext
10748 if { (eval echo "$as_me:10748: \"$ac_compile\"") >&5
10749   (eval $ac_compile) 2>&5
10750   ac_status=$?
10751   echo "$as_me:10751: \$? = $ac_status" >&5
10752   (exit $ac_status); } &&
10753          { ac_try='test -s conftest.$ac_objext'
10754   { (eval echo "$as_me:10754: \"$ac_try\"") >&5
10755   (eval $ac_try) 2>&5
10756   ac_status=$?
10757   echo "$as_me:10757: \$? = $ac_status" >&5
10758   (exit $ac_status); }; }; then
10759   cf_XOPEN_SOURCE_set=yes
10760 else
10761   echo "$as_me: failed program was:" >&5
10762 cat conftest.$ac_ext >&5
10763 cf_XOPEN_SOURCE_set=no
10764 fi
10765 rm -f conftest.$ac_objext conftest.$ac_ext
10766         echo "$as_me:10766: result: $cf_XOPEN_SOURCE_set" >&5
10767 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10768         if test $cf_XOPEN_SOURCE_set = yes
10769         then
10770                 cat >conftest.$ac_ext <<_ACEOF
10771 #line 10771 "configure"
10772 #include "confdefs.h"
10773 #include <stdlib.h>
10774 int
10775 main (void)
10776 {
10777
10778 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10779 make an error
10780 #endif
10781   ;
10782   return 0;
10783 }
10784 _ACEOF
10785 rm -f conftest.$ac_objext
10786 if { (eval echo "$as_me:10786: \"$ac_compile\"") >&5
10787   (eval $ac_compile) 2>&5
10788   ac_status=$?
10789   echo "$as_me:10789: \$? = $ac_status" >&5
10790   (exit $ac_status); } &&
10791          { ac_try='test -s conftest.$ac_objext'
10792   { (eval echo "$as_me:10792: \"$ac_try\"") >&5
10793   (eval $ac_try) 2>&5
10794   ac_status=$?
10795   echo "$as_me:10795: \$? = $ac_status" >&5
10796   (exit $ac_status); }; }; then
10797   cf_XOPEN_SOURCE_set_ok=yes
10798 else
10799   echo "$as_me: failed program was:" >&5
10800 cat conftest.$ac_ext >&5
10801 cf_XOPEN_SOURCE_set_ok=no
10802 fi
10803 rm -f conftest.$ac_objext conftest.$ac_ext
10804                 if test $cf_XOPEN_SOURCE_set_ok = no
10805                 then
10806                         { echo "$as_me:10806: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10807 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10808                 fi
10809         else
10810
10811 echo "$as_me:10811: checking if we should define _XOPEN_SOURCE" >&5
10812 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10813 if test "${cf_cv_xopen_source+set}" = set; then
10814   echo $ECHO_N "(cached) $ECHO_C" >&6
10815 else
10816
10817         cat >conftest.$ac_ext <<_ACEOF
10818 #line 10818 "configure"
10819 #include "confdefs.h"
10820
10821 #include <stdlib.h>
10822 #include <string.h>
10823 #include <sys/types.h>
10824
10825 int
10826 main (void)
10827 {
10828
10829 #ifndef _XOPEN_SOURCE
10830 make an error
10831 #endif
10832   ;
10833   return 0;
10834 }
10835 _ACEOF
10836 rm -f conftest.$ac_objext
10837 if { (eval echo "$as_me:10837: \"$ac_compile\"") >&5
10838   (eval $ac_compile) 2>&5
10839   ac_status=$?
10840   echo "$as_me:10840: \$? = $ac_status" >&5
10841   (exit $ac_status); } &&
10842          { ac_try='test -s conftest.$ac_objext'
10843   { (eval echo "$as_me:10843: \"$ac_try\"") >&5
10844   (eval $ac_try) 2>&5
10845   ac_status=$?
10846   echo "$as_me:10846: \$? = $ac_status" >&5
10847   (exit $ac_status); }; }; then
10848   cf_cv_xopen_source=no
10849 else
10850   echo "$as_me: failed program was:" >&5
10851 cat conftest.$ac_ext >&5
10852 cf_save="$CPPFLAGS"
10853
10854         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10855         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10856
10857          cat >conftest.$ac_ext <<_ACEOF
10858 #line 10858 "configure"
10859 #include "confdefs.h"
10860
10861 #include <stdlib.h>
10862 #include <string.h>
10863 #include <sys/types.h>
10864
10865 int
10866 main (void)
10867 {
10868
10869 #ifdef _XOPEN_SOURCE
10870 make an error
10871 #endif
10872   ;
10873   return 0;
10874 }
10875 _ACEOF
10876 rm -f conftest.$ac_objext
10877 if { (eval echo "$as_me:10877: \"$ac_compile\"") >&5
10878   (eval $ac_compile) 2>&5
10879   ac_status=$?
10880   echo "$as_me:10880: \$? = $ac_status" >&5
10881   (exit $ac_status); } &&
10882          { ac_try='test -s conftest.$ac_objext'
10883   { (eval echo "$as_me:10883: \"$ac_try\"") >&5
10884   (eval $ac_try) 2>&5
10885   ac_status=$?
10886   echo "$as_me:10886: \$? = $ac_status" >&5
10887   (exit $ac_status); }; }; then
10888   cf_cv_xopen_source=no
10889 else
10890   echo "$as_me: failed program was:" >&5
10891 cat conftest.$ac_ext >&5
10892 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10893 fi
10894 rm -f conftest.$ac_objext conftest.$ac_ext
10895         CPPFLAGS="$cf_save"
10896
10897 fi
10898 rm -f conftest.$ac_objext conftest.$ac_ext
10899
10900 fi
10901 echo "$as_me:10901: result: $cf_cv_xopen_source" >&5
10902 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10903
10904 if test "$cf_cv_xopen_source" != no ; then
10905
10906 CFLAGS=`echo "$CFLAGS" | \
10907         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10908                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10909
10910 CPPFLAGS=`echo "$CPPFLAGS" | \
10911         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10912                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10913
10914         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10915
10916 cf_fix_cppflags=no
10917 cf_new_cflags=
10918 cf_new_cppflags=
10919 cf_new_extra_cppflags=
10920
10921 for cf_add_cflags in $cf_temp_xopen_source
10922 do
10923 case $cf_fix_cppflags in
10924 (no)
10925         case $cf_add_cflags in
10926         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10927                 case $cf_add_cflags in
10928                 (-D*)
10929                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10930
10931                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10932                                 && test -z "${cf_tst_cflags}" \
10933                                 && cf_fix_cppflags=yes
10934
10935                         if test $cf_fix_cppflags = yes ; then
10936
10937         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10938         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10939
10940                                 continue
10941                         elif test "${cf_tst_cflags}" = "\"'" ; then
10942
10943         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10944         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10945
10946                                 continue
10947                         fi
10948                         ;;
10949                 esac
10950                 case "$CPPFLAGS" in
10951                 (*$cf_add_cflags)
10952                         ;;
10953                 (*)
10954                         case $cf_add_cflags in
10955                         (-D*)
10956                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10957
10958 CPPFLAGS=`echo "$CPPFLAGS" | \
10959         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10960                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10961
10962                                 ;;
10963                         esac
10964
10965         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10966         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10967
10968                         ;;
10969                 esac
10970                 ;;
10971         (*)
10972
10973         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10974         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10975
10976                 ;;
10977         esac
10978         ;;
10979 (yes)
10980
10981         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10982         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10983
10984         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10985
10986         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10987                 && test -z "${cf_tst_cflags}" \
10988                 && cf_fix_cppflags=no
10989         ;;
10990 esac
10991 done
10992
10993 if test -n "$cf_new_cflags" ; then
10994
10995         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10996         CFLAGS="${CFLAGS}$cf_new_cflags"
10997
10998 fi
10999
11000 if test -n "$cf_new_cppflags" ; then
11001
11002         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11003         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11004
11005 fi
11006
11007 if test -n "$cf_new_extra_cppflags" ; then
11008
11009         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11010         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11011
11012 fi
11013
11014 fi
11015
11016         fi
11017 fi
11018 fi # cf_cv_posix_visible
11019
11020 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11021
11022 # Work around breakage on OS X
11023
11024 echo "$as_me:11024: checking if SIGWINCH is defined" >&5
11025 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11026 if test "${cf_cv_define_sigwinch+set}" = set; then
11027   echo $ECHO_N "(cached) $ECHO_C" >&6
11028 else
11029
11030         cat >conftest.$ac_ext <<_ACEOF
11031 #line 11031 "configure"
11032 #include "confdefs.h"
11033
11034 #include <sys/types.h>
11035 #include <sys/signal.h>
11036
11037 int
11038 main (void)
11039 {
11040 int x = SIGWINCH; (void)x
11041   ;
11042   return 0;
11043 }
11044 _ACEOF
11045 rm -f conftest.$ac_objext
11046 if { (eval echo "$as_me:11046: \"$ac_compile\"") >&5
11047   (eval $ac_compile) 2>&5
11048   ac_status=$?
11049   echo "$as_me:11049: \$? = $ac_status" >&5
11050   (exit $ac_status); } &&
11051          { ac_try='test -s conftest.$ac_objext'
11052   { (eval echo "$as_me:11052: \"$ac_try\"") >&5
11053   (eval $ac_try) 2>&5
11054   ac_status=$?
11055   echo "$as_me:11055: \$? = $ac_status" >&5
11056   (exit $ac_status); }; }; then
11057   cf_cv_define_sigwinch=yes
11058 else
11059   echo "$as_me: failed program was:" >&5
11060 cat conftest.$ac_ext >&5
11061 cat >conftest.$ac_ext <<_ACEOF
11062 #line 11062 "configure"
11063 #include "confdefs.h"
11064
11065 #undef _XOPEN_SOURCE
11066 #undef _POSIX_SOURCE
11067 #undef _POSIX_C_SOURCE
11068 #include <sys/types.h>
11069 #include <sys/signal.h>
11070
11071 int
11072 main (void)
11073 {
11074 int x = SIGWINCH; (void)x
11075   ;
11076   return 0;
11077 }
11078 _ACEOF
11079 rm -f conftest.$ac_objext
11080 if { (eval echo "$as_me:11080: \"$ac_compile\"") >&5
11081   (eval $ac_compile) 2>&5
11082   ac_status=$?
11083   echo "$as_me:11083: \$? = $ac_status" >&5
11084   (exit $ac_status); } &&
11085          { ac_try='test -s conftest.$ac_objext'
11086   { (eval echo "$as_me:11086: \"$ac_try\"") >&5
11087   (eval $ac_try) 2>&5
11088   ac_status=$?
11089   echo "$as_me:11089: \$? = $ac_status" >&5
11090   (exit $ac_status); }; }; then
11091   cf_cv_define_sigwinch=maybe
11092 else
11093   echo "$as_me: failed program was:" >&5
11094 cat conftest.$ac_ext >&5
11095 cf_cv_define_sigwinch=no
11096 fi
11097 rm -f conftest.$ac_objext conftest.$ac_ext
11098
11099 fi
11100 rm -f conftest.$ac_objext conftest.$ac_ext
11101
11102 fi
11103 echo "$as_me:11103: result: $cf_cv_define_sigwinch" >&5
11104 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11105
11106 if test "$cf_cv_define_sigwinch" = maybe ; then
11107 echo "$as_me:11107: checking for actual SIGWINCH definition" >&5
11108 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11109 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11110   echo $ECHO_N "(cached) $ECHO_C" >&6
11111 else
11112
11113 cf_cv_fixup_sigwinch=unknown
11114 cf_sigwinch=32
11115 while test $cf_sigwinch != 1
11116 do
11117         cat >conftest.$ac_ext <<_ACEOF
11118 #line 11118 "configure"
11119 #include "confdefs.h"
11120
11121 #undef _XOPEN_SOURCE
11122 #undef _POSIX_SOURCE
11123 #undef _POSIX_C_SOURCE
11124 #include <sys/types.h>
11125 #include <sys/signal.h>
11126
11127 int
11128 main (void)
11129 {
11130
11131 #if SIGWINCH != $cf_sigwinch
11132 make an error
11133 #endif
11134 int x = SIGWINCH; (void)x
11135   ;
11136   return 0;
11137 }
11138 _ACEOF
11139 rm -f conftest.$ac_objext
11140 if { (eval echo "$as_me:11140: \"$ac_compile\"") >&5
11141   (eval $ac_compile) 2>&5
11142   ac_status=$?
11143   echo "$as_me:11143: \$? = $ac_status" >&5
11144   (exit $ac_status); } &&
11145          { ac_try='test -s conftest.$ac_objext'
11146   { (eval echo "$as_me:11146: \"$ac_try\"") >&5
11147   (eval $ac_try) 2>&5
11148   ac_status=$?
11149   echo "$as_me:11149: \$? = $ac_status" >&5
11150   (exit $ac_status); }; }; then
11151   cf_cv_fixup_sigwinch=$cf_sigwinch
11152          break
11153 else
11154   echo "$as_me: failed program was:" >&5
11155 cat conftest.$ac_ext >&5
11156 fi
11157 rm -f conftest.$ac_objext conftest.$ac_ext
11158
11159 cf_sigwinch=`expr $cf_sigwinch - 1`
11160 done
11161
11162 fi
11163 echo "$as_me:11163: result: $cf_cv_fixup_sigwinch" >&5
11164 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11165
11166         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11167                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11168         fi
11169 fi
11170
11171 # Checks for CODESET support.
11172
11173 echo "$as_me:11173: checking for nl_langinfo and CODESET" >&5
11174 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11175 if test "${am_cv_langinfo_codeset+set}" = set; then
11176   echo $ECHO_N "(cached) $ECHO_C" >&6
11177 else
11178   cat >conftest.$ac_ext <<_ACEOF
11179 #line 11179 "configure"
11180 #include "confdefs.h"
11181 #include <langinfo.h>
11182 int
11183 main (void)
11184 {
11185 char* cs = nl_langinfo(CODESET); (void)cs
11186   ;
11187   return 0;
11188 }
11189 _ACEOF
11190 rm -f conftest.$ac_objext conftest$ac_exeext
11191 if { (eval echo "$as_me:11191: \"$ac_link\"") >&5
11192   (eval $ac_link) 2>&5
11193   ac_status=$?
11194   echo "$as_me:11194: \$? = $ac_status" >&5
11195   (exit $ac_status); } &&
11196          { ac_try='test -s conftest$ac_exeext'
11197   { (eval echo "$as_me:11197: \"$ac_try\"") >&5
11198   (eval $ac_try) 2>&5
11199   ac_status=$?
11200   echo "$as_me:11200: \$? = $ac_status" >&5
11201   (exit $ac_status); }; }; then
11202   am_cv_langinfo_codeset=yes
11203 else
11204   echo "$as_me: failed program was:" >&5
11205 cat conftest.$ac_ext >&5
11206 am_cv_langinfo_codeset=no
11207 fi
11208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11209
11210 fi
11211 echo "$as_me:11211: result: $am_cv_langinfo_codeset" >&5
11212 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11213         if test $am_cv_langinfo_codeset = yes; then
11214
11215 cat >>confdefs.h <<\EOF
11216 #define HAVE_LANGINFO_CODESET 1
11217 EOF
11218
11219         fi
11220
11221 # use these variables to work around a defect in gcc's fixincludes.
11222 NCURSES_OK_WCHAR_T=
11223 NCURSES_OK_WINT_T=
11224
11225 echo "$as_me:11225: checking if you want wide-character code" >&5
11226 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11227
11228 # Check whether --enable-widec or --disable-widec was given.
11229 if test "${enable_widec+set}" = set; then
11230   enableval="$enable_widec"
11231   with_widec=$enableval
11232 else
11233   with_widec=no
11234 fi;
11235 echo "$as_me:11235: result: $with_widec" >&5
11236 echo "${ECHO_T}$with_widec" >&6
11237
11238 NCURSES_WCWIDTH_GRAPHICS=1
11239
11240 if test "x$with_widec" = xyes ; then
11241         if test "x$disable_lib_suffixes" = xno ; then
11242                 LIB_SUFFIX="w${LIB_SUFFIX}"
11243         fi
11244
11245 cat >>confdefs.h <<\EOF
11246 #define USE_WIDEC_SUPPORT 1
11247 EOF
11248
11249 cat >>confdefs.h <<\EOF
11250 #define NCURSES_WIDECHAR 1
11251 EOF
11252
11253 for ac_header in \
11254 wchar.h \
11255 wctype.h \
11256
11257 do
11258 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11259 echo "$as_me:11259: checking for $ac_header" >&5
11260 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11262   echo $ECHO_N "(cached) $ECHO_C" >&6
11263 else
11264   cat >conftest.$ac_ext <<_ACEOF
11265 #line 11265 "configure"
11266 #include "confdefs.h"
11267 #include <$ac_header>
11268 _ACEOF
11269 if { (eval echo "$as_me:11269: \"$ac_cpp conftest.$ac_ext\"") >&5
11270   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11271   ac_status=$?
11272   egrep -v '^ *\+' conftest.er1 >conftest.err
11273   rm -f conftest.er1
11274   cat conftest.err >&5
11275   echo "$as_me:11275: \$? = $ac_status" >&5
11276   (exit $ac_status); } >/dev/null; then
11277   if test -s conftest.err; then
11278     ac_cpp_err=$ac_c_preproc_warn_flag
11279   else
11280     ac_cpp_err=
11281   fi
11282 else
11283   ac_cpp_err=yes
11284 fi
11285 if test -z "$ac_cpp_err"; then
11286   eval "$as_ac_Header=yes"
11287 else
11288   echo "$as_me: failed program was:" >&5
11289   cat conftest.$ac_ext >&5
11290   eval "$as_ac_Header=no"
11291 fi
11292 rm -f conftest.err conftest.$ac_ext
11293 fi
11294 echo "$as_me:11294: result: `eval echo '${'$as_ac_Header'}'`" >&5
11295 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11296 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11297   cat >>confdefs.h <<EOF
11298 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11299 EOF
11300
11301 fi
11302 done
11303
11304 echo "$as_me:11304: checking if wchar.h can be used as is" >&5
11305 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11306 if test "${cf_cv_wchar_h_okay+set}" = set; then
11307   echo $ECHO_N "(cached) $ECHO_C" >&6
11308 else
11309
11310 cat >conftest.$ac_ext <<_ACEOF
11311 #line 11311 "configure"
11312 #include "confdefs.h"
11313
11314 #include <stdlib.h>
11315 #ifdef HAVE_WCHAR_H
11316 #include <wchar.h>
11317 #endif
11318 #ifdef HAVE_WCTYPE_H
11319 #include <wctype.h>
11320 #endif
11321
11322 int
11323 main (void)
11324 {
11325
11326         wint_t foo = 0;
11327         int bar = iswpunct(foo)
11328   ;
11329   return 0;
11330 }
11331 _ACEOF
11332 rm -f conftest.$ac_objext
11333 if { (eval echo "$as_me:11333: \"$ac_compile\"") >&5
11334   (eval $ac_compile) 2>&5
11335   ac_status=$?
11336   echo "$as_me:11336: \$? = $ac_status" >&5
11337   (exit $ac_status); } &&
11338          { ac_try='test -s conftest.$ac_objext'
11339   { (eval echo "$as_me:11339: \"$ac_try\"") >&5
11340   (eval $ac_try) 2>&5
11341   ac_status=$?
11342   echo "$as_me:11342: \$? = $ac_status" >&5
11343   (exit $ac_status); }; }; then
11344   cf_cv_wchar_h_okay=yes
11345 else
11346   echo "$as_me: failed program was:" >&5
11347 cat conftest.$ac_ext >&5
11348 cf_cv_wchar_h_okay=no
11349 fi
11350 rm -f conftest.$ac_objext conftest.$ac_ext
11351 fi
11352 echo "$as_me:11352: result: $cf_cv_wchar_h_okay" >&5
11353 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11354
11355 if test $cf_cv_wchar_h_okay = no
11356 then
11357
11358 echo "$as_me:11358: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11359 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11360 cat >conftest.$ac_ext <<_ACEOF
11361 #line 11361 "configure"
11362 #include "confdefs.h"
11363 #include <sys/types.h>
11364
11365 int
11366 main (void)
11367 {
11368
11369 #ifndef _XOPEN_SOURCE_EXTENDED
11370 make an error
11371 #endif
11372   ;
11373   return 0;
11374 }
11375 _ACEOF
11376 rm -f conftest.$ac_objext
11377 if { (eval echo "$as_me:11377: \"$ac_compile\"") >&5
11378   (eval $ac_compile) 2>&5
11379   ac_status=$?
11380   echo "$as_me:11380: \$? = $ac_status" >&5
11381   (exit $ac_status); } &&
11382          { ac_try='test -s conftest.$ac_objext'
11383   { (eval echo "$as_me:11383: \"$ac_try\"") >&5
11384   (eval $ac_try) 2>&5
11385   ac_status=$?
11386   echo "$as_me:11386: \$? = $ac_status" >&5
11387   (exit $ac_status); }; }; then
11388   cf_result=no
11389 else
11390   echo "$as_me: failed program was:" >&5
11391 cat conftest.$ac_ext >&5
11392 cf_result=yes
11393 fi
11394 rm -f conftest.$ac_objext conftest.$ac_ext
11395 echo "$as_me:11395: result: $cf_result" >&5
11396 echo "${ECHO_T}$cf_result" >&6
11397
11398 if test "$cf_result" = yes ; then
11399         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11400 elif test "x" != "x" ; then
11401         echo "$as_me:11401: checking checking for compatible value versus " >&5
11402 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11403         cat >conftest.$ac_ext <<_ACEOF
11404 #line 11404 "configure"
11405 #include "confdefs.h"
11406 #include <sys/types.h>
11407
11408 int
11409 main (void)
11410 {
11411
11412 #if _XOPEN_SOURCE_EXTENDED- < 0
11413 make an error
11414 #endif
11415   ;
11416   return 0;
11417 }
11418 _ACEOF
11419 rm -f conftest.$ac_objext
11420 if { (eval echo "$as_me:11420: \"$ac_compile\"") >&5
11421   (eval $ac_compile) 2>&5
11422   ac_status=$?
11423   echo "$as_me:11423: \$? = $ac_status" >&5
11424   (exit $ac_status); } &&
11425          { ac_try='test -s conftest.$ac_objext'
11426   { (eval echo "$as_me:11426: \"$ac_try\"") >&5
11427   (eval $ac_try) 2>&5
11428   ac_status=$?
11429   echo "$as_me:11429: \$? = $ac_status" >&5
11430   (exit $ac_status); }; }; then
11431   cf_result=yes
11432 else
11433   echo "$as_me: failed program was:" >&5
11434 cat conftest.$ac_ext >&5
11435 cf_result=no
11436 fi
11437 rm -f conftest.$ac_objext conftest.$ac_ext
11438         echo "$as_me:11438: result: $cf_result" >&5
11439 echo "${ECHO_T}$cf_result" >&6
11440         if test "$cf_result" = no ; then
11441                 # perhaps we can override it - try...
11442                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11443         fi
11444 fi
11445
11446 fi
11447
11448 echo "$as_me:11448: checking if wcwidth agrees graphics are single-width" >&5
11449 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11450 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11451   echo $ECHO_N "(cached) $ECHO_C" >&6
11452 else
11453
11454 cat >conftest.in <<CF_EOF
11455 -       VT100 symbols
11456 0x250c  upper left corner
11457 0x2514  lower left corner
11458 0x2510  upper right corner
11459 0x2518  lower right corner
11460 0x251c  tee pointing left
11461 0x2524  tee pointing right
11462 0x2534  tee pointing up
11463 0x252c  tee pointing down
11464 0x2500  horizontal line
11465 0x2502  vertical line
11466 0x253c  large plus or crossover
11467 0x23ba  scan line 1
11468 0x23bd  scan line 9
11469 0x25c6  diamond
11470 0x2592  checker board (stipple)
11471 0x00b0  degree symbol
11472 0x00b1  plus/minus
11473 0x00b7  bullet
11474 -       Teletype 5410v1 symbols
11475 0x2190  arrow pointing left
11476 0x2192  arrow pointing right
11477 0x2193  arrow pointing down
11478 0x2191  arrow pointing up
11479 0x2592  board of squares
11480 0x2603  lantern symbol
11481 0x25ae  solid square block
11482 -       these defaults were invented for ncurses
11483 0x23bb  scan line 3
11484 0x23bc  scan line 7
11485 0x2264  less-than-or-equal-to
11486 0x2265  greater-than-or-equal-to
11487 0x03c0  greek pi
11488 0x2260  not-equal
11489 0x00a3  pound-sterling symbol
11490 -       thick-line-drawing
11491 0x250f  upper left corner
11492 0x2517  lower left corner
11493 0x2513  upper right corner
11494 0x251b  lower right corner
11495 0x2523  tee pointing left
11496 0x252b  tee pointing right
11497 0x253b  tee pointing up
11498 0x2533  tee pointing down
11499 0x2501  horizontal line
11500 0x2503  vertical line
11501 0x254b  large plus or crossover
11502 -       double-line-drawing
11503 0x2554  upper left corner
11504 0x255a  lower left corner
11505 0x2557  upper right corner
11506 0x255d  lower right corner
11507 0x2563  tee pointing left
11508 0x2560  tee pointing right
11509 0x2569  tee pointing up
11510 0x2566  tee pointing down
11511 0x2550  horizontal line
11512 0x2551  vertical line
11513 0x256c  large plus or crossover
11514 CF_EOF
11515 if test "$cross_compiling" = yes; then
11516   cf_cv_wcwidth_graphics=unknown
11517 else
11518   cat >conftest.$ac_ext <<_ACEOF
11519 #line 11519 "configure"
11520 #include "confdefs.h"
11521
11522 #include <locale.h>
11523 #include <stdio.h>
11524 #include <wchar.h>
11525
11526 #define MY_LEN 80
11527
11528 int
11529 main(void)
11530 {
11531         FILE *fp;
11532         int value;
11533         char buffer[MY_LEN + 1];
11534         char notes[MY_LEN + 1];
11535         int totals = 0;
11536         int passed = 0;
11537
11538         if (setlocale(LC_ALL, "en_US.UTF8") ||
11539                 setlocale(LC_ALL, "en_US.UTF-8") ||
11540                 setlocale(LC_ALL, "en_US.utf8") ||
11541                 setlocale(LC_ALL, "en_US.utf-8")) {
11542                 if ((fp = fopen("conftest.in", "r")) != 0) {
11543                         while (fgets(buffer, MY_LEN, fp) != 0) {
11544                                 if (*buffer == '-') {
11545                                         fprintf(stderr, "\t%s", buffer);
11546                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11547                                         ++totals;
11548                                         if (wcwidth(value) == 1)
11549                                                 ++passed;
11550                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11551                                 } else {
11552                                         fprintf(stderr, "?\t%s", buffer);
11553                                 }
11554                         }
11555                 }
11556         }
11557         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11558         return (totals == passed) ? 0 : 1;
11559 }
11560
11561 _ACEOF
11562 rm -f conftest$ac_exeext
11563 if { (eval echo "$as_me:11563: \"$ac_link\"") >&5
11564   (eval $ac_link) 2>&5
11565   ac_status=$?
11566   echo "$as_me:11566: \$? = $ac_status" >&5
11567   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11568   { (eval echo "$as_me:11568: \"$ac_try\"") >&5
11569   (eval $ac_try) 2>&5
11570   ac_status=$?
11571   echo "$as_me:11571: \$? = $ac_status" >&5
11572   (exit $ac_status); }; }; then
11573   cf_cv_wcwidth_graphics=yes
11574 else
11575   echo "$as_me: program exited with status $ac_status" >&5
11576 echo "$as_me: failed program was:" >&5
11577 cat conftest.$ac_ext >&5
11578 cf_cv_wcwidth_graphics=no
11579 fi
11580 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11581 fi
11582
11583 fi
11584 echo "$as_me:11584: result: $cf_cv_wcwidth_graphics" >&5
11585 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11586
11587         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11588
11589         # with_overwrite=no
11590         NCURSES_CH_T=cchar_t
11591
11592 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11593 do
11594 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11595 echo "$as_me:11595: checking for $ac_func" >&5
11596 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11597 if eval "test \"\${$as_ac_var+set}\" = set"; then
11598   echo $ECHO_N "(cached) $ECHO_C" >&6
11599 else
11600   cat >conftest.$ac_ext <<_ACEOF
11601 #line 11601 "configure"
11602 #include "confdefs.h"
11603 #define $ac_func autoconf_temporary
11604 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11605 #undef $ac_func
11606
11607 #ifdef __cplusplus
11608 extern "C"
11609 #endif
11610
11611 /* We use char because int might match the return type of a gcc2
11612    builtin and then its argument prototype would still apply.  */
11613 char $ac_func (void);
11614
11615 int
11616 main (void)
11617 {
11618
11619 /* The GNU C library defines stubs for functions which it implements
11620     to always fail with ENOSYS.  Some functions are actually named
11621     something starting with __ and the normal name is an alias.  */
11622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11623 #error found stub for $ac_func
11624 #endif
11625
11626         return $ac_func ();
11627   ;
11628   return 0;
11629 }
11630 _ACEOF
11631 rm -f conftest.$ac_objext conftest$ac_exeext
11632 if { (eval echo "$as_me:11632: \"$ac_link\"") >&5
11633   (eval $ac_link) 2>&5
11634   ac_status=$?
11635   echo "$as_me:11635: \$? = $ac_status" >&5
11636   (exit $ac_status); } &&
11637          { ac_try='test -s conftest$ac_exeext'
11638   { (eval echo "$as_me:11638: \"$ac_try\"") >&5
11639   (eval $ac_try) 2>&5
11640   ac_status=$?
11641   echo "$as_me:11641: \$? = $ac_status" >&5
11642   (exit $ac_status); }; }; then
11643   eval "$as_ac_var=yes"
11644 else
11645   echo "$as_me: failed program was:" >&5
11646 cat conftest.$ac_ext >&5
11647 eval "$as_ac_var=no"
11648 fi
11649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11650 fi
11651 echo "$as_me:11651: result: `eval echo '${'$as_ac_var'}'`" >&5
11652 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11653 if test `eval echo '${'$as_ac_var'}'` = yes; then
11654   cat >>confdefs.h <<EOF
11655 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11656 EOF
11657
11658 fi
11659 done
11660
11661         if test "x$ac_cv_func_putwc" != xyes ; then
11662
11663 echo "$as_me:11663: checking for multibyte character support" >&5
11664 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11665 if test "${cf_cv_utf8_lib+set}" = set; then
11666   echo $ECHO_N "(cached) $ECHO_C" >&6
11667 else
11668
11669         cf_save_LIBS="$LIBS"
11670         cat >conftest.$ac_ext <<_ACEOF
11671 #line 11671 "configure"
11672 #include "confdefs.h"
11673
11674 #include <stdlib.h>
11675 int
11676 main (void)
11677 {
11678 putwc(0,0);
11679   ;
11680   return 0;
11681 }
11682 _ACEOF
11683 rm -f conftest.$ac_objext conftest$ac_exeext
11684 if { (eval echo "$as_me:11684: \"$ac_link\"") >&5
11685   (eval $ac_link) 2>&5
11686   ac_status=$?
11687   echo "$as_me:11687: \$? = $ac_status" >&5
11688   (exit $ac_status); } &&
11689          { ac_try='test -s conftest$ac_exeext'
11690   { (eval echo "$as_me:11690: \"$ac_try\"") >&5
11691   (eval $ac_try) 2>&5
11692   ac_status=$?
11693   echo "$as_me:11693: \$? = $ac_status" >&5
11694   (exit $ac_status); }; }; then
11695   cf_cv_utf8_lib=yes
11696 else
11697   echo "$as_me: failed program was:" >&5
11698 cat conftest.$ac_ext >&5
11699
11700 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11701 # will be set on completion of the AC_TRY_LINK below.
11702 cf_cv_header_path_utf8=
11703 cf_cv_library_path_utf8=
11704
11705 echo "${as_me:-configure}:11705: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11706
11707 cf_save_LIBS="$LIBS"
11708
11709 cat >conftest.$ac_ext <<_ACEOF
11710 #line 11710 "configure"
11711 #include "confdefs.h"
11712
11713 #include <libutf8.h>
11714 int
11715 main (void)
11716 {
11717 putwc(0,0);
11718   ;
11719   return 0;
11720 }
11721 _ACEOF
11722 rm -f conftest.$ac_objext conftest$ac_exeext
11723 if { (eval echo "$as_me:11723: \"$ac_link\"") >&5
11724   (eval $ac_link) 2>&5
11725   ac_status=$?
11726   echo "$as_me:11726: \$? = $ac_status" >&5
11727   (exit $ac_status); } &&
11728          { ac_try='test -s conftest$ac_exeext'
11729   { (eval echo "$as_me:11729: \"$ac_try\"") >&5
11730   (eval $ac_try) 2>&5
11731   ac_status=$?
11732   echo "$as_me:11732: \$? = $ac_status" >&5
11733   (exit $ac_status); }; }; then
11734
11735         cf_cv_find_linkage_utf8=yes
11736         cf_cv_header_path_utf8=/usr/include
11737         cf_cv_library_path_utf8=/usr/lib
11738
11739 else
11740   echo "$as_me: failed program was:" >&5
11741 cat conftest.$ac_ext >&5
11742
11743 LIBS="-lutf8  $cf_save_LIBS"
11744
11745 cat >conftest.$ac_ext <<_ACEOF
11746 #line 11746 "configure"
11747 #include "confdefs.h"
11748
11749 #include <libutf8.h>
11750 int
11751 main (void)
11752 {
11753 putwc(0,0);
11754   ;
11755   return 0;
11756 }
11757 _ACEOF
11758 rm -f conftest.$ac_objext conftest$ac_exeext
11759 if { (eval echo "$as_me:11759: \"$ac_link\"") >&5
11760   (eval $ac_link) 2>&5
11761   ac_status=$?
11762   echo "$as_me:11762: \$? = $ac_status" >&5
11763   (exit $ac_status); } &&
11764          { ac_try='test -s conftest$ac_exeext'
11765   { (eval echo "$as_me:11765: \"$ac_try\"") >&5
11766   (eval $ac_try) 2>&5
11767   ac_status=$?
11768   echo "$as_me:11768: \$? = $ac_status" >&5
11769   (exit $ac_status); }; }; then
11770
11771         cf_cv_find_linkage_utf8=yes
11772         cf_cv_header_path_utf8=/usr/include
11773         cf_cv_library_path_utf8=/usr/lib
11774         cf_cv_library_file_utf8="-lutf8"
11775
11776 else
11777   echo "$as_me: failed program was:" >&5
11778 cat conftest.$ac_ext >&5
11779
11780         cf_cv_find_linkage_utf8=no
11781         LIBS="$cf_save_LIBS"
11782
11783         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11784
11785 echo "${as_me:-configure}:11785: testing find linkage for utf8 library ..." 1>&5
11786
11787 echo "${as_me:-configure}:11787: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11788
11789         cf_save_CPPFLAGS="$CPPFLAGS"
11790         cf_test_CPPFLAGS="$CPPFLAGS"
11791
11792 cf_search=
11793
11794 # collect the current set of include-directories from compiler flags
11795 cf_header_path_list=""
11796 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11797         for cf_header_path in $CPPFLAGS $CFLAGS
11798         do
11799                 case $cf_header_path in
11800                 (-I*)
11801                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11802
11803 test "x$cf_header_path" != "xNONE" && \
11804 test -d "$cf_header_path" && \
11805  {
11806         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11807         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11808         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11809         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11810         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11811         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11812 }
11813
11814                         cf_header_path_list="$cf_header_path_list $cf_search"
11815                         ;;
11816                 esac
11817         done
11818 fi
11819
11820 # add the variations for the package we are looking for
11821
11822 cf_search=
11823
11824 test "x$prefix" != "xNONE" && \
11825 test -d "$prefix" && \
11826  {
11827         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11828         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11829         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11830         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11831         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11832         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11833 }
11834
11835 for cf_subdir_prefix in \
11836         /usr \
11837         /usr/local \
11838         /usr/pkg \
11839         /opt \
11840         /opt/local \
11841         $HOME
11842 do
11843
11844 test "x$cf_subdir_prefix" != "x$prefix" && \
11845 test -d "$cf_subdir_prefix" && \
11846 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11847         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11848         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11849         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11850         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11851         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11852         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11853 }
11854
11855 done
11856
11857 test "$includedir" != NONE && \
11858 test "$includedir" != "/usr/include" && \
11859 test -d "$includedir" && {
11860         test -d $includedir &&    cf_search="$cf_search $includedir"
11861         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11862 }
11863
11864 test "$oldincludedir" != NONE && \
11865 test "$oldincludedir" != "/usr/include" && \
11866 test -d "$oldincludedir" && {
11867         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11868         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11869 }
11870
11871 cf_search="$cf_search $cf_header_path_list"
11872
11873         for cf_cv_header_path_utf8 in $cf_search
11874         do
11875                 if test -d $cf_cv_header_path_utf8 ; then
11876                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11877
11878 echo "${as_me:-configure}:11878: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11879
11880                         CPPFLAGS="$cf_save_CPPFLAGS"
11881
11882         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11883         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11884
11885                         cat >conftest.$ac_ext <<_ACEOF
11886 #line 11886 "configure"
11887 #include "confdefs.h"
11888
11889 #include <libutf8.h>
11890 int
11891 main (void)
11892 {
11893 putwc(0,0);
11894   ;
11895   return 0;
11896 }
11897 _ACEOF
11898 rm -f conftest.$ac_objext
11899 if { (eval echo "$as_me:11899: \"$ac_compile\"") >&5
11900   (eval $ac_compile) 2>&5
11901   ac_status=$?
11902   echo "$as_me:11902: \$? = $ac_status" >&5
11903   (exit $ac_status); } &&
11904          { ac_try='test -s conftest.$ac_objext'
11905   { (eval echo "$as_me:11905: \"$ac_try\"") >&5
11906   (eval $ac_try) 2>&5
11907   ac_status=$?
11908   echo "$as_me:11908: \$? = $ac_status" >&5
11909   (exit $ac_status); }; }; then
11910
11911                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11912
11913 echo "${as_me:-configure}:11913: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11914
11915                                 cf_cv_find_linkage_utf8=maybe
11916                                 cf_test_CPPFLAGS="$CPPFLAGS"
11917                                 break
11918 else
11919   echo "$as_me: failed program was:" >&5
11920 cat conftest.$ac_ext >&5
11921
11922                                 CPPFLAGS="$cf_save_CPPFLAGS"
11923
11924 fi
11925 rm -f conftest.$ac_objext conftest.$ac_ext
11926                 fi
11927         done
11928
11929         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11930
11931 echo "${as_me:-configure}:11931: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11932
11933                 cf_save_LIBS="$LIBS"
11934                 cf_save_LDFLAGS="$LDFLAGS"
11935
11936                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11937
11938 cf_search=
11939 cf_library_path_list=""
11940 if test -n "${LDFLAGS}${LIBS}" ; then
11941         for cf_library_path in $LDFLAGS $LIBS
11942         do
11943                 case $cf_library_path in
11944                 (-L*)
11945                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11946
11947 test "x$cf_library_path" != "xNONE" && \
11948 test -d "$cf_library_path" && \
11949  {
11950         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11951         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11952         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11953         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11954         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11955         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11956 }
11957
11958                         cf_library_path_list="$cf_library_path_list $cf_search"
11959                         ;;
11960                 esac
11961         done
11962 fi
11963
11964 cf_search=
11965
11966 test "x$prefix" != "xNONE" && \
11967 test -d "$prefix" && \
11968  {
11969         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11970         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11971         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11972         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11973         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11974         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11975 }
11976
11977 for cf_subdir_prefix in \
11978         /usr \
11979         /usr/local \
11980         /usr/pkg \
11981         /opt \
11982         /opt/local \
11983         $HOME
11984 do
11985
11986 test "x$cf_subdir_prefix" != "x$prefix" && \
11987 test -d "$cf_subdir_prefix" && \
11988 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11989         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11990         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11991         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11992         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11993         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11994         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11995 }
11996
11997 done
11998
11999 cf_search="$cf_library_path_list $cf_search"
12000
12001                         for cf_cv_library_path_utf8 in $cf_search
12002                         do
12003                                 if test -d $cf_cv_library_path_utf8 ; then
12004                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12005
12006 echo "${as_me:-configure}:12006: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12007
12008                                         CPPFLAGS="$cf_test_CPPFLAGS"
12009                                         LIBS="-lutf8  $cf_save_LIBS"
12010                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12011                                         cat >conftest.$ac_ext <<_ACEOF
12012 #line 12012 "configure"
12013 #include "confdefs.h"
12014
12015 #include <libutf8.h>
12016 int
12017 main (void)
12018 {
12019 putwc(0,0);
12020   ;
12021   return 0;
12022 }
12023 _ACEOF
12024 rm -f conftest.$ac_objext conftest$ac_exeext
12025 if { (eval echo "$as_me:12025: \"$ac_link\"") >&5
12026   (eval $ac_link) 2>&5
12027   ac_status=$?
12028   echo "$as_me:12028: \$? = $ac_status" >&5
12029   (exit $ac_status); } &&
12030          { ac_try='test -s conftest$ac_exeext'
12031   { (eval echo "$as_me:12031: \"$ac_try\"") >&5
12032   (eval $ac_try) 2>&5
12033   ac_status=$?
12034   echo "$as_me:12034: \$? = $ac_status" >&5
12035   (exit $ac_status); }; }; then
12036
12037                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12038
12039 echo "${as_me:-configure}:12039: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12040
12041                                         cf_cv_find_linkage_utf8=yes
12042                                         cf_cv_library_file_utf8="-lutf8"
12043                                         break
12044 else
12045   echo "$as_me: failed program was:" >&5
12046 cat conftest.$ac_ext >&5
12047
12048                                         CPPFLAGS="$cf_save_CPPFLAGS"
12049                                         LIBS="$cf_save_LIBS"
12050                                         LDFLAGS="$cf_save_LDFLAGS"
12051
12052 fi
12053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12054                                 fi
12055                         done
12056                         CPPFLAGS="$cf_save_CPPFLAGS"
12057                         LDFLAGS="$cf_save_LDFLAGS"
12058                 fi
12059
12060         else
12061                 cf_cv_find_linkage_utf8=no
12062         fi
12063
12064 fi
12065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12066
12067 fi
12068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12069
12070 LIBS="$cf_save_LIBS"
12071
12072 if test "$cf_cv_find_linkage_utf8" = yes ; then
12073 cf_cv_utf8_lib=add-on
12074 else
12075 cf_cv_utf8_lib=no
12076 fi
12077
12078 fi
12079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12080 fi
12081 echo "$as_me:12081: result: $cf_cv_utf8_lib" >&5
12082 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12083
12084 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12085 # ncurses/ncursesw:
12086 if test "$cf_cv_utf8_lib" = "add-on" ; then
12087
12088 cat >>confdefs.h <<\EOF
12089 #define HAVE_LIBUTF8_H 1
12090 EOF
12091
12092 if test -n "$cf_cv_header_path_utf8" ; then
12093   for cf_add_incdir in $cf_cv_header_path_utf8
12094   do
12095         while test $cf_add_incdir != /usr/include
12096         do
12097           if test -d $cf_add_incdir
12098           then
12099                 cf_have_incdir=no
12100                 if test -n "$CFLAGS$CPPFLAGS" ; then
12101                   # a loop is needed to ensure we can add subdirs of existing dirs
12102                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12103                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12104                           cf_have_incdir=yes; break
12105                         fi
12106                   done
12107                 fi
12108
12109                 if test "$cf_have_incdir" = no ; then
12110                   if test "$cf_add_incdir" = /usr/local/include ; then
12111                         if test "$GCC" = yes
12112                         then
12113                           cf_save_CPPFLAGS=$CPPFLAGS
12114
12115         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12116         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12117
12118                           cat >conftest.$ac_ext <<_ACEOF
12119 #line 12119 "configure"
12120 #include "confdefs.h"
12121 #include <stdio.h>
12122 int
12123 main (void)
12124 {
12125 printf("Hello")
12126   ;
12127   return 0;
12128 }
12129 _ACEOF
12130 rm -f conftest.$ac_objext
12131 if { (eval echo "$as_me:12131: \"$ac_compile\"") >&5
12132   (eval $ac_compile) 2>&5
12133   ac_status=$?
12134   echo "$as_me:12134: \$? = $ac_status" >&5
12135   (exit $ac_status); } &&
12136          { ac_try='test -s conftest.$ac_objext'
12137   { (eval echo "$as_me:12137: \"$ac_try\"") >&5
12138   (eval $ac_try) 2>&5
12139   ac_status=$?
12140   echo "$as_me:12140: \$? = $ac_status" >&5
12141   (exit $ac_status); }; }; then
12142   :
12143 else
12144   echo "$as_me: failed program was:" >&5
12145 cat conftest.$ac_ext >&5
12146 cf_have_incdir=yes
12147 fi
12148 rm -f conftest.$ac_objext conftest.$ac_ext
12149                           CPPFLAGS=$cf_save_CPPFLAGS
12150                         fi
12151                   fi
12152                 fi
12153
12154                 if test "$cf_have_incdir" = no ; then
12155                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12156
12157 echo "${as_me:-configure}:12157: testing adding $cf_add_incdir to include-path ..." 1>&5
12158
12159                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12160
12161                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12162                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12163                   cf_add_incdir="$cf_top_incdir"
12164                 else
12165                   break
12166                 fi
12167           else
12168                 break
12169           fi
12170         done
12171   done
12172 fi
12173
12174 if test -n "$cf_cv_library_path_utf8" ; then
12175         for cf_add_libdir in $cf_cv_library_path_utf8
12176         do
12177                 if test $cf_add_libdir = /usr/lib ; then
12178                         :
12179                 elif test -d $cf_add_libdir
12180                 then
12181                         cf_have_libdir=no
12182                         if test -n "$LDFLAGS$LIBS" ; then
12183                                 # a loop is needed to ensure we can add subdirs of existing dirs
12184                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12185                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12186                                                 cf_have_libdir=yes; break
12187                                         fi
12188                                 done
12189                         fi
12190                         if test "$cf_have_libdir" = no ; then
12191                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12192
12193 echo "${as_me:-configure}:12193: testing adding $cf_add_libdir to library-path ..." 1>&5
12194
12195                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12196                         fi
12197                 fi
12198         done
12199 fi
12200
12201 cf_add_libs="$LIBS"
12202 # reverse order
12203 cf_add_0lib=
12204 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12205 # filter duplicates
12206 for cf_add_1lib in $cf_add_0lib; do
12207         for cf_add_2lib in $cf_add_libs; do
12208                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12209                         cf_add_1lib=
12210                         break
12211                 fi
12212         done
12213         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12214 done
12215 LIBS="$cf_add_libs"
12216
12217 fi
12218
12219                 if test "$cf_cv_utf8_lib" != no ; then
12220                         NCURSES_LIBUTF8=1
12221                 fi
12222         fi
12223
12224 # This is needed on Tru64 5.0 to declare mbstate_t
12225 echo "$as_me:12225: checking if we must include wchar.h to declare mbstate_t" >&5
12226 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12227 if test "${cf_cv_mbstate_t+set}" = set; then
12228   echo $ECHO_N "(cached) $ECHO_C" >&6
12229 else
12230
12231 cat >conftest.$ac_ext <<_ACEOF
12232 #line 12232 "configure"
12233 #include "confdefs.h"
12234
12235 #include <stdlib.h>
12236 #include <stdarg.h>
12237 #include <stdio.h>
12238 #ifdef HAVE_LIBUTF8_H
12239 #include <libutf8.h>
12240 #endif
12241 int
12242 main (void)
12243 {
12244 mbstate_t state
12245   ;
12246   return 0;
12247 }
12248 _ACEOF
12249 rm -f conftest.$ac_objext
12250 if { (eval echo "$as_me:12250: \"$ac_compile\"") >&5
12251   (eval $ac_compile) 2>&5
12252   ac_status=$?
12253   echo "$as_me:12253: \$? = $ac_status" >&5
12254   (exit $ac_status); } &&
12255          { ac_try='test -s conftest.$ac_objext'
12256   { (eval echo "$as_me:12256: \"$ac_try\"") >&5
12257   (eval $ac_try) 2>&5
12258   ac_status=$?
12259   echo "$as_me:12259: \$? = $ac_status" >&5
12260   (exit $ac_status); }; }; then
12261   cf_cv_mbstate_t=no
12262 else
12263   echo "$as_me: failed program was:" >&5
12264 cat conftest.$ac_ext >&5
12265 cat >conftest.$ac_ext <<_ACEOF
12266 #line 12266 "configure"
12267 #include "confdefs.h"
12268
12269 #include <stdlib.h>
12270 #include <stdarg.h>
12271 #include <stdio.h>
12272 #include <wchar.h>
12273 #ifdef HAVE_LIBUTF8_H
12274 #include <libutf8.h>
12275 #endif
12276 int
12277 main (void)
12278 {
12279 mbstate_t value
12280   ;
12281   return 0;
12282 }
12283 _ACEOF
12284 rm -f conftest.$ac_objext
12285 if { (eval echo "$as_me:12285: \"$ac_compile\"") >&5
12286   (eval $ac_compile) 2>&5
12287   ac_status=$?
12288   echo "$as_me:12288: \$? = $ac_status" >&5
12289   (exit $ac_status); } &&
12290          { ac_try='test -s conftest.$ac_objext'
12291   { (eval echo "$as_me:12291: \"$ac_try\"") >&5
12292   (eval $ac_try) 2>&5
12293   ac_status=$?
12294   echo "$as_me:12294: \$? = $ac_status" >&5
12295   (exit $ac_status); }; }; then
12296   cf_cv_mbstate_t=yes
12297 else
12298   echo "$as_me: failed program was:" >&5
12299 cat conftest.$ac_ext >&5
12300 cf_cv_mbstate_t=unknown
12301 fi
12302 rm -f conftest.$ac_objext conftest.$ac_ext
12303 fi
12304 rm -f conftest.$ac_objext conftest.$ac_ext
12305 fi
12306 echo "$as_me:12306: result: $cf_cv_mbstate_t" >&5
12307 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12308
12309 if test "$cf_cv_mbstate_t" = yes ; then
12310
12311 cat >>confdefs.h <<\EOF
12312 #define NEED_WCHAR_H 1
12313 EOF
12314
12315         NEED_WCHAR_H=1
12316 fi
12317
12318 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12319 if test "$cf_cv_mbstate_t" = unknown ; then
12320         NCURSES_MBSTATE_T=1
12321 fi
12322
12323 # This is needed on Tru64 5.0 to declare wchar_t
12324 echo "$as_me:12324: checking if we must include wchar.h to declare wchar_t" >&5
12325 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12326 if test "${cf_cv_wchar_t+set}" = set; then
12327   echo $ECHO_N "(cached) $ECHO_C" >&6
12328 else
12329
12330 cat >conftest.$ac_ext <<_ACEOF
12331 #line 12331 "configure"
12332 #include "confdefs.h"
12333
12334 #include <stdlib.h>
12335 #include <stdarg.h>
12336 #include <stdio.h>
12337 #ifdef HAVE_LIBUTF8_H
12338 #include <libutf8.h>
12339 #endif
12340 int
12341 main (void)
12342 {
12343 wchar_t state
12344   ;
12345   return 0;
12346 }
12347 _ACEOF
12348 rm -f conftest.$ac_objext
12349 if { (eval echo "$as_me:12349: \"$ac_compile\"") >&5
12350   (eval $ac_compile) 2>&5
12351   ac_status=$?
12352   echo "$as_me:12352: \$? = $ac_status" >&5
12353   (exit $ac_status); } &&
12354          { ac_try='test -s conftest.$ac_objext'
12355   { (eval echo "$as_me:12355: \"$ac_try\"") >&5
12356   (eval $ac_try) 2>&5
12357   ac_status=$?
12358   echo "$as_me:12358: \$? = $ac_status" >&5
12359   (exit $ac_status); }; }; then
12360   cf_cv_wchar_t=no
12361 else
12362   echo "$as_me: failed program was:" >&5
12363 cat conftest.$ac_ext >&5
12364 cat >conftest.$ac_ext <<_ACEOF
12365 #line 12365 "configure"
12366 #include "confdefs.h"
12367
12368 #include <stdlib.h>
12369 #include <stdarg.h>
12370 #include <stdio.h>
12371 #include <wchar.h>
12372 #ifdef HAVE_LIBUTF8_H
12373 #include <libutf8.h>
12374 #endif
12375 int
12376 main (void)
12377 {
12378 wchar_t value
12379   ;
12380   return 0;
12381 }
12382 _ACEOF
12383 rm -f conftest.$ac_objext
12384 if { (eval echo "$as_me:12384: \"$ac_compile\"") >&5
12385   (eval $ac_compile) 2>&5
12386   ac_status=$?
12387   echo "$as_me:12387: \$? = $ac_status" >&5
12388   (exit $ac_status); } &&
12389          { ac_try='test -s conftest.$ac_objext'
12390   { (eval echo "$as_me:12390: \"$ac_try\"") >&5
12391   (eval $ac_try) 2>&5
12392   ac_status=$?
12393   echo "$as_me:12393: \$? = $ac_status" >&5
12394   (exit $ac_status); }; }; then
12395   cf_cv_wchar_t=yes
12396 else
12397   echo "$as_me: failed program was:" >&5
12398 cat conftest.$ac_ext >&5
12399 cf_cv_wchar_t=unknown
12400 fi
12401 rm -f conftest.$ac_objext conftest.$ac_ext
12402 fi
12403 rm -f conftest.$ac_objext conftest.$ac_ext
12404 fi
12405 echo "$as_me:12405: result: $cf_cv_wchar_t" >&5
12406 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12407
12408 if test "$cf_cv_wchar_t" = yes ; then
12409
12410 cat >>confdefs.h <<\EOF
12411 #define NEED_WCHAR_H 1
12412 EOF
12413
12414         NEED_WCHAR_H=1
12415 fi
12416
12417 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12418 if test "$cf_cv_wchar_t" = unknown ; then
12419         NCURSES_WCHAR_T=1
12420 fi
12421
12422 # if we find wchar_t in either place, use substitution to provide a fallback.
12423 if test "$cf_cv_wchar_t" != unknown ; then
12424         NCURSES_OK_WCHAR_T=1
12425 fi
12426
12427 # This is needed on Tru64 5.0 to declare wint_t
12428 echo "$as_me:12428: checking if we must include wchar.h to declare wint_t" >&5
12429 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12430 if test "${cf_cv_wint_t+set}" = set; then
12431   echo $ECHO_N "(cached) $ECHO_C" >&6
12432 else
12433
12434 cat >conftest.$ac_ext <<_ACEOF
12435 #line 12435 "configure"
12436 #include "confdefs.h"
12437
12438 #include <stdlib.h>
12439 #include <stdarg.h>
12440 #include <stdio.h>
12441 #ifdef HAVE_LIBUTF8_H
12442 #include <libutf8.h>
12443 #endif
12444 int
12445 main (void)
12446 {
12447 wint_t state
12448   ;
12449   return 0;
12450 }
12451 _ACEOF
12452 rm -f conftest.$ac_objext
12453 if { (eval echo "$as_me:12453: \"$ac_compile\"") >&5
12454   (eval $ac_compile) 2>&5
12455   ac_status=$?
12456   echo "$as_me:12456: \$? = $ac_status" >&5
12457   (exit $ac_status); } &&
12458          { ac_try='test -s conftest.$ac_objext'
12459   { (eval echo "$as_me:12459: \"$ac_try\"") >&5
12460   (eval $ac_try) 2>&5
12461   ac_status=$?
12462   echo "$as_me:12462: \$? = $ac_status" >&5
12463   (exit $ac_status); }; }; then
12464   cf_cv_wint_t=no
12465 else
12466   echo "$as_me: failed program was:" >&5
12467 cat conftest.$ac_ext >&5
12468 cat >conftest.$ac_ext <<_ACEOF
12469 #line 12469 "configure"
12470 #include "confdefs.h"
12471
12472 #include <stdlib.h>
12473 #include <stdarg.h>
12474 #include <stdio.h>
12475 #include <wchar.h>
12476 #ifdef HAVE_LIBUTF8_H
12477 #include <libutf8.h>
12478 #endif
12479 int
12480 main (void)
12481 {
12482 wint_t value
12483   ;
12484   return 0;
12485 }
12486 _ACEOF
12487 rm -f conftest.$ac_objext
12488 if { (eval echo "$as_me:12488: \"$ac_compile\"") >&5
12489   (eval $ac_compile) 2>&5
12490   ac_status=$?
12491   echo "$as_me:12491: \$? = $ac_status" >&5
12492   (exit $ac_status); } &&
12493          { ac_try='test -s conftest.$ac_objext'
12494   { (eval echo "$as_me:12494: \"$ac_try\"") >&5
12495   (eval $ac_try) 2>&5
12496   ac_status=$?
12497   echo "$as_me:12497: \$? = $ac_status" >&5
12498   (exit $ac_status); }; }; then
12499   cf_cv_wint_t=yes
12500 else
12501   echo "$as_me: failed program was:" >&5
12502 cat conftest.$ac_ext >&5
12503 cf_cv_wint_t=unknown
12504 fi
12505 rm -f conftest.$ac_objext conftest.$ac_ext
12506 fi
12507 rm -f conftest.$ac_objext conftest.$ac_ext
12508 fi
12509 echo "$as_me:12509: result: $cf_cv_wint_t" >&5
12510 echo "${ECHO_T}$cf_cv_wint_t" >&6
12511
12512 if test "$cf_cv_wint_t" = yes ; then
12513
12514 cat >>confdefs.h <<\EOF
12515 #define NEED_WCHAR_H 1
12516 EOF
12517
12518         NEED_WCHAR_H=1
12519 fi
12520
12521 # if we do not find wint_t in either place, use substitution to provide a fallback.
12522 if test "$cf_cv_wint_t" = unknown ; then
12523         NCURSES_WINT_T=1
12524 fi
12525
12526 # if we find wint_t in either place, use substitution to provide a fallback.
12527 if test "$cf_cv_wint_t" != unknown ; then
12528         NCURSES_OK_WINT_T=1
12529 fi
12530
12531         if test "$NCURSES_MBSTATE_T" != 0; then
12532
12533 cat >>confdefs.h <<\EOF
12534 #define NEED_MBSTATE_T_DEF 1
12535 EOF
12536
12537         fi
12538 fi
12539
12540 ###   use option --disable-lp64 to allow long chtype
12541 echo "$as_me:12541: checking whether to enable _LP64 definition in curses.h" >&5
12542 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12543
12544 # Check whether --enable-lp64 or --disable-lp64 was given.
12545 if test "${enable_lp64+set}" = set; then
12546   enableval="$enable_lp64"
12547   with_lp64=$enableval
12548 else
12549   with_lp64=$cf_dft_with_lp64
12550 fi;
12551 echo "$as_me:12551: result: $with_lp64" >&5
12552 echo "${ECHO_T}$with_lp64" >&6
12553
12554 if test "x$with_lp64" = xyes ; then
12555         cf_cv_enable_lp64=1
12556 else
12557         cf_cv_enable_lp64=0
12558 fi
12559
12560 # Check whether --enable-largefile or --disable-largefile was given.
12561 if test "${enable_largefile+set}" = set; then
12562   enableval="$enable_largefile"
12563
12564 fi;
12565 if test "$enable_largefile" != no; then
12566
12567   echo "$as_me:12567: checking for special C compiler options needed for large files" >&5
12568 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12569 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12570   echo $ECHO_N "(cached) $ECHO_C" >&6
12571 else
12572   ac_cv_sys_largefile_CC=no
12573      if test "$GCC" != yes; then
12574        ac_save_CC=$CC
12575        while :; do
12576          # IRIX 6.2 and later do not support large files by default,
12577          # so use the C compiler's -n32 option if that helps.
12578          cat >conftest.$ac_ext <<_ACEOF
12579 #line 12579 "configure"
12580 #include "confdefs.h"
12581 #include <sys/types.h>
12582  /* Check that off_t can represent 2**63 - 1 correctly.
12583     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12584     since some C++ compilers masquerading as C compilers
12585     incorrectly reject 9223372036854775807.  */
12586 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12587   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12588                        && LARGE_OFF_T % 2147483647 == 1)
12589                       ? 1 : -1];
12590 int
12591 main (void)
12592 {
12593
12594   ;
12595   return 0;
12596 }
12597 _ACEOF
12598          rm -f conftest.$ac_objext
12599 if { (eval echo "$as_me:12599: \"$ac_compile\"") >&5
12600   (eval $ac_compile) 2>&5
12601   ac_status=$?
12602   echo "$as_me:12602: \$? = $ac_status" >&5
12603   (exit $ac_status); } &&
12604          { ac_try='test -s conftest.$ac_objext'
12605   { (eval echo "$as_me:12605: \"$ac_try\"") >&5
12606   (eval $ac_try) 2>&5
12607   ac_status=$?
12608   echo "$as_me:12608: \$? = $ac_status" >&5
12609   (exit $ac_status); }; }; then
12610   break
12611 else
12612   echo "$as_me: failed program was:" >&5
12613 cat conftest.$ac_ext >&5
12614 fi
12615 rm -f conftest.$ac_objext
12616          CC="$CC -n32"
12617          rm -f conftest.$ac_objext
12618 if { (eval echo "$as_me:12618: \"$ac_compile\"") >&5
12619   (eval $ac_compile) 2>&5
12620   ac_status=$?
12621   echo "$as_me:12621: \$? = $ac_status" >&5
12622   (exit $ac_status); } &&
12623          { ac_try='test -s conftest.$ac_objext'
12624   { (eval echo "$as_me:12624: \"$ac_try\"") >&5
12625   (eval $ac_try) 2>&5
12626   ac_status=$?
12627   echo "$as_me:12627: \$? = $ac_status" >&5
12628   (exit $ac_status); }; }; then
12629   ac_cv_sys_largefile_CC=' -n32'; break
12630 else
12631   echo "$as_me: failed program was:" >&5
12632 cat conftest.$ac_ext >&5
12633 fi
12634 rm -f conftest.$ac_objext
12635          break
12636        done
12637        CC=$ac_save_CC
12638        rm -f conftest.$ac_ext
12639     fi
12640 fi
12641 echo "$as_me:12641: result: $ac_cv_sys_largefile_CC" >&5
12642 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12643   if test "$ac_cv_sys_largefile_CC" != no; then
12644     CC=$CC$ac_cv_sys_largefile_CC
12645   fi
12646
12647   echo "$as_me:12647: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12648 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12649 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12650   echo $ECHO_N "(cached) $ECHO_C" >&6
12651 else
12652   while :; do
12653   ac_cv_sys_file_offset_bits=no
12654   cat >conftest.$ac_ext <<_ACEOF
12655 #line 12655 "configure"
12656 #include "confdefs.h"
12657 #include <sys/types.h>
12658  /* Check that off_t can represent 2**63 - 1 correctly.
12659     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12660     since some C++ compilers masquerading as C compilers
12661     incorrectly reject 9223372036854775807.  */
12662 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12663   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12664                        && LARGE_OFF_T % 2147483647 == 1)
12665                       ? 1 : -1];
12666 int
12667 main (void)
12668 {
12669
12670   ;
12671   return 0;
12672 }
12673 _ACEOF
12674 rm -f conftest.$ac_objext
12675 if { (eval echo "$as_me:12675: \"$ac_compile\"") >&5
12676   (eval $ac_compile) 2>&5
12677   ac_status=$?
12678   echo "$as_me:12678: \$? = $ac_status" >&5
12679   (exit $ac_status); } &&
12680          { ac_try='test -s conftest.$ac_objext'
12681   { (eval echo "$as_me:12681: \"$ac_try\"") >&5
12682   (eval $ac_try) 2>&5
12683   ac_status=$?
12684   echo "$as_me:12684: \$? = $ac_status" >&5
12685   (exit $ac_status); }; }; then
12686   break
12687 else
12688   echo "$as_me: failed program was:" >&5
12689 cat conftest.$ac_ext >&5
12690 fi
12691 rm -f conftest.$ac_objext conftest.$ac_ext
12692   cat >conftest.$ac_ext <<_ACEOF
12693 #line 12693 "configure"
12694 #include "confdefs.h"
12695 #define _FILE_OFFSET_BITS 64
12696 #include <sys/types.h>
12697  /* Check that off_t can represent 2**63 - 1 correctly.
12698     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12699     since some C++ compilers masquerading as C compilers
12700     incorrectly reject 9223372036854775807.  */
12701 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12702   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12703                        && LARGE_OFF_T % 2147483647 == 1)
12704                       ? 1 : -1];
12705 int
12706 main (void)
12707 {
12708
12709   ;
12710   return 0;
12711 }
12712 _ACEOF
12713 rm -f conftest.$ac_objext
12714 if { (eval echo "$as_me:12714: \"$ac_compile\"") >&5
12715   (eval $ac_compile) 2>&5
12716   ac_status=$?
12717   echo "$as_me:12717: \$? = $ac_status" >&5
12718   (exit $ac_status); } &&
12719          { ac_try='test -s conftest.$ac_objext'
12720   { (eval echo "$as_me:12720: \"$ac_try\"") >&5
12721   (eval $ac_try) 2>&5
12722   ac_status=$?
12723   echo "$as_me:12723: \$? = $ac_status" >&5
12724   (exit $ac_status); }; }; then
12725   ac_cv_sys_file_offset_bits=64; break
12726 else
12727   echo "$as_me: failed program was:" >&5
12728 cat conftest.$ac_ext >&5
12729 fi
12730 rm -f conftest.$ac_objext conftest.$ac_ext
12731   break
12732 done
12733 fi
12734 echo "$as_me:12734: result: $ac_cv_sys_file_offset_bits" >&5
12735 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12736 if test "$ac_cv_sys_file_offset_bits" != no; then
12737
12738 cat >>confdefs.h <<EOF
12739 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12740 EOF
12741
12742 fi
12743 rm -rf conftest*
12744   echo "$as_me:12744: checking for _LARGE_FILES value needed for large files" >&5
12745 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12746 if test "${ac_cv_sys_large_files+set}" = set; then
12747   echo $ECHO_N "(cached) $ECHO_C" >&6
12748 else
12749   while :; do
12750   ac_cv_sys_large_files=no
12751   cat >conftest.$ac_ext <<_ACEOF
12752 #line 12752 "configure"
12753 #include "confdefs.h"
12754 #include <sys/types.h>
12755  /* Check that off_t can represent 2**63 - 1 correctly.
12756     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12757     since some C++ compilers masquerading as C compilers
12758     incorrectly reject 9223372036854775807.  */
12759 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12760   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12761                        && LARGE_OFF_T % 2147483647 == 1)
12762                       ? 1 : -1];
12763 int
12764 main (void)
12765 {
12766
12767   ;
12768   return 0;
12769 }
12770 _ACEOF
12771 rm -f conftest.$ac_objext
12772 if { (eval echo "$as_me:12772: \"$ac_compile\"") >&5
12773   (eval $ac_compile) 2>&5
12774   ac_status=$?
12775   echo "$as_me:12775: \$? = $ac_status" >&5
12776   (exit $ac_status); } &&
12777          { ac_try='test -s conftest.$ac_objext'
12778   { (eval echo "$as_me:12778: \"$ac_try\"") >&5
12779   (eval $ac_try) 2>&5
12780   ac_status=$?
12781   echo "$as_me:12781: \$? = $ac_status" >&5
12782   (exit $ac_status); }; }; then
12783   break
12784 else
12785   echo "$as_me: failed program was:" >&5
12786 cat conftest.$ac_ext >&5
12787 fi
12788 rm -f conftest.$ac_objext conftest.$ac_ext
12789   cat >conftest.$ac_ext <<_ACEOF
12790 #line 12790 "configure"
12791 #include "confdefs.h"
12792 #define _LARGE_FILES 1
12793 #include <sys/types.h>
12794  /* Check that off_t can represent 2**63 - 1 correctly.
12795     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12796     since some C++ compilers masquerading as C compilers
12797     incorrectly reject 9223372036854775807.  */
12798 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12799   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12800                        && LARGE_OFF_T % 2147483647 == 1)
12801                       ? 1 : -1];
12802 int
12803 main (void)
12804 {
12805
12806   ;
12807   return 0;
12808 }
12809 _ACEOF
12810 rm -f conftest.$ac_objext
12811 if { (eval echo "$as_me:12811: \"$ac_compile\"") >&5
12812   (eval $ac_compile) 2>&5
12813   ac_status=$?
12814   echo "$as_me:12814: \$? = $ac_status" >&5
12815   (exit $ac_status); } &&
12816          { ac_try='test -s conftest.$ac_objext'
12817   { (eval echo "$as_me:12817: \"$ac_try\"") >&5
12818   (eval $ac_try) 2>&5
12819   ac_status=$?
12820   echo "$as_me:12820: \$? = $ac_status" >&5
12821   (exit $ac_status); }; }; then
12822   ac_cv_sys_large_files=1; break
12823 else
12824   echo "$as_me: failed program was:" >&5
12825 cat conftest.$ac_ext >&5
12826 fi
12827 rm -f conftest.$ac_objext conftest.$ac_ext
12828   break
12829 done
12830 fi
12831 echo "$as_me:12831: result: $ac_cv_sys_large_files" >&5
12832 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12833 if test "$ac_cv_sys_large_files" != no; then
12834
12835 cat >>confdefs.h <<EOF
12836 #define _LARGE_FILES $ac_cv_sys_large_files
12837 EOF
12838
12839 fi
12840 rm -rf conftest*
12841 fi
12842
12843         if test "$enable_largefile" != no ; then
12844         echo "$as_me:12844: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12845 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12846 if test "${ac_cv_sys_largefile_source+set}" = set; then
12847   echo $ECHO_N "(cached) $ECHO_C" >&6
12848 else
12849   while :; do
12850   ac_cv_sys_largefile_source=no
12851   cat >conftest.$ac_ext <<_ACEOF
12852 #line 12852 "configure"
12853 #include "confdefs.h"
12854 #include <stdio.h>
12855 int
12856 main (void)
12857 {
12858 return !fseeko;
12859   ;
12860   return 0;
12861 }
12862 _ACEOF
12863 rm -f conftest.$ac_objext
12864 if { (eval echo "$as_me:12864: \"$ac_compile\"") >&5
12865   (eval $ac_compile) 2>&5
12866   ac_status=$?
12867   echo "$as_me:12867: \$? = $ac_status" >&5
12868   (exit $ac_status); } &&
12869          { ac_try='test -s conftest.$ac_objext'
12870   { (eval echo "$as_me:12870: \"$ac_try\"") >&5
12871   (eval $ac_try) 2>&5
12872   ac_status=$?
12873   echo "$as_me:12873: \$? = $ac_status" >&5
12874   (exit $ac_status); }; }; then
12875   break
12876 else
12877   echo "$as_me: failed program was:" >&5
12878 cat conftest.$ac_ext >&5
12879 fi
12880 rm -f conftest.$ac_objext conftest.$ac_ext
12881   cat >conftest.$ac_ext <<_ACEOF
12882 #line 12882 "configure"
12883 #include "confdefs.h"
12884 #define _LARGEFILE_SOURCE 1
12885 #include <stdio.h>
12886 int
12887 main (void)
12888 {
12889 return !fseeko;
12890   ;
12891   return 0;
12892 }
12893 _ACEOF
12894 rm -f conftest.$ac_objext
12895 if { (eval echo "$as_me:12895: \"$ac_compile\"") >&5
12896   (eval $ac_compile) 2>&5
12897   ac_status=$?
12898   echo "$as_me:12898: \$? = $ac_status" >&5
12899   (exit $ac_status); } &&
12900          { ac_try='test -s conftest.$ac_objext'
12901   { (eval echo "$as_me:12901: \"$ac_try\"") >&5
12902   (eval $ac_try) 2>&5
12903   ac_status=$?
12904   echo "$as_me:12904: \$? = $ac_status" >&5
12905   (exit $ac_status); }; }; then
12906   ac_cv_sys_largefile_source=1; break
12907 else
12908   echo "$as_me: failed program was:" >&5
12909 cat conftest.$ac_ext >&5
12910 fi
12911 rm -f conftest.$ac_objext conftest.$ac_ext
12912   break
12913 done
12914 fi
12915 echo "$as_me:12915: result: $ac_cv_sys_largefile_source" >&5
12916 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12917 if test "$ac_cv_sys_largefile_source" != no; then
12918
12919 cat >>confdefs.h <<EOF
12920 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12921 EOF
12922
12923 fi
12924 rm -rf conftest*
12925
12926 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12927 # in glibc 2.1.3, but that breaks too many other things.
12928 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12929 echo "$as_me:12929: checking for fseeko" >&5
12930 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12931 if test "${ac_cv_func_fseeko+set}" = set; then
12932   echo $ECHO_N "(cached) $ECHO_C" >&6
12933 else
12934   cat >conftest.$ac_ext <<_ACEOF
12935 #line 12935 "configure"
12936 #include "confdefs.h"
12937 #include <stdio.h>
12938 int
12939 main (void)
12940 {
12941 return fseeko && fseeko (stdin, 0, 0);
12942   ;
12943   return 0;
12944 }
12945 _ACEOF
12946 rm -f conftest.$ac_objext conftest$ac_exeext
12947 if { (eval echo "$as_me:12947: \"$ac_link\"") >&5
12948   (eval $ac_link) 2>&5
12949   ac_status=$?
12950   echo "$as_me:12950: \$? = $ac_status" >&5
12951   (exit $ac_status); } &&
12952          { ac_try='test -s conftest$ac_exeext'
12953   { (eval echo "$as_me:12953: \"$ac_try\"") >&5
12954   (eval $ac_try) 2>&5
12955   ac_status=$?
12956   echo "$as_me:12956: \$? = $ac_status" >&5
12957   (exit $ac_status); }; }; then
12958   ac_cv_func_fseeko=yes
12959 else
12960   echo "$as_me: failed program was:" >&5
12961 cat conftest.$ac_ext >&5
12962 ac_cv_func_fseeko=no
12963 fi
12964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12965 fi
12966 echo "$as_me:12966: result: $ac_cv_func_fseeko" >&5
12967 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12968 if test $ac_cv_func_fseeko = yes; then
12969
12970 cat >>confdefs.h <<\EOF
12971 #define HAVE_FSEEKO 1
12972 EOF
12973
12974 fi
12975
12976         # Normally we would collect these definitions in the config.h,
12977         # but (like _XOPEN_SOURCE), some environments rely on having these
12978         # defined before any of the system headers are included.  Another
12979         # case comes up with C++, e.g., on AIX the compiler compiles the
12980         # header files by themselves before looking at the body files it is
12981         # told to compile.  For ncurses, those header files do not include
12982         # the config.h
12983         if test "$ac_cv_sys_large_files" != no
12984         then
12985
12986         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12987         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12988
12989         fi
12990         if test "$ac_cv_sys_largefile_source" != no
12991         then
12992
12993         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12994         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12995
12996         fi
12997         if test "$ac_cv_sys_file_offset_bits" != no
12998         then
12999
13000         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13001         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13002
13003         fi
13004
13005         echo "$as_me:13005: checking whether to use struct dirent64" >&5
13006 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13007 if test "${cf_cv_struct_dirent64+set}" = set; then
13008   echo $ECHO_N "(cached) $ECHO_C" >&6
13009 else
13010
13011                 cat >conftest.$ac_ext <<_ACEOF
13012 #line 13012 "configure"
13013 #include "confdefs.h"
13014
13015 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13016 #include <sys/types.h>
13017 #include <dirent.h>
13018
13019 int
13020 main (void)
13021 {
13022
13023                 /* if transitional largefile support is setup, this is true */
13024                 extern struct dirent64 * readdir(DIR *);
13025                 struct dirent64 *x = readdir((DIR *)0);
13026                 struct dirent *y = readdir((DIR *)0);
13027                 int z = x - y;
13028                 (void)z;
13029
13030   ;
13031   return 0;
13032 }
13033 _ACEOF
13034 rm -f conftest.$ac_objext
13035 if { (eval echo "$as_me:13035: \"$ac_compile\"") >&5
13036   (eval $ac_compile) 2>&5
13037   ac_status=$?
13038   echo "$as_me:13038: \$? = $ac_status" >&5
13039   (exit $ac_status); } &&
13040          { ac_try='test -s conftest.$ac_objext'
13041   { (eval echo "$as_me:13041: \"$ac_try\"") >&5
13042   (eval $ac_try) 2>&5
13043   ac_status=$?
13044   echo "$as_me:13044: \$? = $ac_status" >&5
13045   (exit $ac_status); }; }; then
13046   cf_cv_struct_dirent64=yes
13047 else
13048   echo "$as_me: failed program was:" >&5
13049 cat conftest.$ac_ext >&5
13050 cf_cv_struct_dirent64=no
13051 fi
13052 rm -f conftest.$ac_objext conftest.$ac_ext
13053
13054 fi
13055 echo "$as_me:13055: result: $cf_cv_struct_dirent64" >&5
13056 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13057         test "$cf_cv_struct_dirent64" = yes &&
13058 cat >>confdefs.h <<\EOF
13059 #define HAVE_STRUCT_DIRENT64 1
13060 EOF
13061
13062         fi
13063
13064 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13065 echo "$as_me:13065: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13066 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13067
13068 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13069 if test "${enable_tparm_varargs+set}" = set; then
13070   enableval="$enable_tparm_varargs"
13071   with_tparm_varargs=$enableval
13072 else
13073   with_tparm_varargs=yes
13074 fi;
13075 echo "$as_me:13075: result: $with_tparm_varargs" >&5
13076 echo "${ECHO_T}$with_tparm_varargs" >&6
13077 NCURSES_TPARM_VARARGS=0
13078 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13079
13080 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13081 if test "$with_ticlib" != no ; then
13082 echo "$as_me:13082: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13083 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13084
13085 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13086 if test "${enable_tic_depends+set}" = set; then
13087   enableval="$enable_tic_depends"
13088   with_tic_depends=$enableval
13089 else
13090   with_tic_depends=yes
13091 fi;
13092 echo "$as_me:13092: result: $with_tic_depends" >&5
13093 echo "${ECHO_T}$with_tic_depends" >&6
13094 else
13095         with_tic_depends=no
13096 fi
13097
13098 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13099 echo "$as_me:13099: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13100 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13101
13102 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13103 if test "${enable_wattr_macros+set}" = set; then
13104   enableval="$enable_wattr_macros"
13105   with_wattr_macros=$enableval
13106 else
13107   with_wattr_macros=yes
13108 fi;
13109 if [ "x$with_wattr_macros" != xyes ]; then
13110         NCURSES_WATTR_MACROS=0
13111         echo "$as_me:13111: result: yes" >&5
13112 echo "${ECHO_T}yes" >&6
13113 else
13114         NCURSES_WATTR_MACROS=1
13115         echo "$as_me:13115: result: no" >&5
13116 echo "${ECHO_T}no" >&6
13117 fi
13118
13119 echo "$as_me:13119: checking for X11 rgb file" >&5
13120 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13121
13122 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13123 if test "${with_x11_rgb+set}" = set; then
13124   withval="$with_x11_rgb"
13125   RGB_PATH=$withval
13126 else
13127   RGB_PATH=auto
13128 fi;
13129
13130 if test "x$RGB_PATH" = xauto
13131 then
13132         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13133         for cf_path in \
13134                 /opt/local/share/X11/rgb.txt \
13135                 /opt/X11/share/X11/rgb.txt \
13136                 /usr/share/X11/rgb.txt \
13137                 /usr/X11/share/X11/rgb.txt \
13138                 /usr/X11/lib/X11/rgb.txt \
13139                 /usr/lib/X11/rgb.txt \
13140                 /etc/X11/rgb.txt \
13141                 /usr/pkg/lib/X11/rgb.txt \
13142                 /usr/X11R7/lib/X11/rgb.txt \
13143                 /usr/X11R6/lib/X11/rgb.txt \
13144                 /usr/X11R5/lib/X11/rgb.txt \
13145                 /usr/X11R4/lib/X11/rgb.txt \
13146                 /usr/local/lib/X11/rgb.txt \
13147                 /usr/local/share/X11/rgb.txt \
13148                 /usr/lib64/X11/rgb.txt
13149         do
13150                 if test -f "$cf_path" ; then
13151                         RGB_PATH="$cf_path"
13152                         break
13153                 fi
13154         done
13155 else
13156         cf_path=$RGB_PATH
13157
13158 if test "x$prefix" != xNONE; then
13159         cf_path_syntax="$prefix"
13160 else
13161         cf_path_syntax="$ac_default_prefix"
13162 fi
13163
13164 case ".$cf_path" in
13165 (.\$\(*\)*|.\'*\'*)
13166         ;;
13167 (..|./*|.\\*)
13168         ;;
13169 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13170         ;;
13171 (.\${*prefix}*|.\${*dir}*)
13172         eval cf_path="$cf_path"
13173         case ".$cf_path" in
13174         (.NONE/*)
13175                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13176                 ;;
13177         esac
13178         ;;
13179 (.no|.NONE/*)
13180         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13181         ;;
13182 (*)
13183         { { echo "$as_me:13183: error: expected a pathname, not \"$cf_path\"" >&5
13184 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13185    { (exit 1); exit 1; }; }
13186         ;;
13187 esac
13188
13189 fi
13190
13191 echo "$as_me:13191: result: $RGB_PATH" >&5
13192 echo "${ECHO_T}$RGB_PATH" >&6
13193
13194 cat >>confdefs.h <<EOF
13195 #define RGB_PATH "$cf_path"
13196 EOF
13197
13198 no_x11_rgb=
13199 if test "$RGB_PATH" = no
13200 then
13201         no_x11_rgb="#"
13202 fi
13203
13204 ###   use option --with-bool to override bool's type
13205 echo "$as_me:13205: checking for type of bool" >&5
13206 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13207
13208 # Check whether --with-bool or --without-bool was given.
13209 if test "${with_bool+set}" = set; then
13210   withval="$with_bool"
13211   NCURSES_BOOL="$withval"
13212 else
13213   NCURSES_BOOL=auto
13214 fi;
13215 echo "$as_me:13215: result: $NCURSES_BOOL" >&5
13216 echo "${ECHO_T}$NCURSES_BOOL" >&6
13217
13218 echo "$as_me:13218: checking for alternate terminal capabilities file" >&5
13219 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13220
13221 # Check whether --with-caps or --without-caps was given.
13222 if test "${with_caps+set}" = set; then
13223   withval="$with_caps"
13224   TERMINFO_CAPS=Caps.$withval
13225 else
13226   TERMINFO_CAPS=Caps
13227 fi;
13228 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13229 echo "$as_me:13229: result: $TERMINFO_CAPS" >&5
13230 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13231
13232 ###   use option --with-chtype to override chtype's type
13233 echo "$as_me:13233: checking for type of chtype" >&5
13234 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13235
13236 # Check whether --with-chtype or --without-chtype was given.
13237 if test "${with_chtype+set}" = set; then
13238   withval="$with_chtype"
13239   NCURSES_CHTYPE="$withval"
13240 else
13241   NCURSES_CHTYPE=$cf_dft_chtype
13242 fi;
13243 echo "$as_me:13243: result: $NCURSES_CHTYPE" >&5
13244 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13245
13246 ###   use option --with-ospeed to override ospeed's type
13247 echo "$as_me:13247: checking for type of ospeed" >&5
13248 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13249
13250 # Check whether --with-ospeed or --without-ospeed was given.
13251 if test "${with_ospeed+set}" = set; then
13252   withval="$with_ospeed"
13253   NCURSES_OSPEED="$withval"
13254 else
13255   NCURSES_OSPEED=short
13256 fi;
13257 echo "$as_me:13257: result: $NCURSES_OSPEED" >&5
13258 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13259
13260 ###   use option --with-mmask-t to override mmask_t's type
13261 echo "$as_me:13261: checking for type of mmask_t" >&5
13262 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13263
13264 # Check whether --with-mmask-t or --without-mmask-t was given.
13265 if test "${with_mmask_t+set}" = set; then
13266   withval="$with_mmask_t"
13267   NCURSES_MMASK_T="$withval"
13268 else
13269   NCURSES_MMASK_T=$cf_dft_mmask_t
13270 fi;
13271 echo "$as_me:13271: result: $NCURSES_MMASK_T" >&5
13272 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13273
13274 ###   use option --with-ccharw-max to override CCHARW_MAX size
13275 echo "$as_me:13275: checking for size CCHARW_MAX" >&5
13276 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13277
13278 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13279 if test "${with_ccharw_max+set}" = set; then
13280   withval="$with_ccharw_max"
13281   NCURSES_CCHARW_MAX="$withval"
13282 else
13283   NCURSES_CCHARW_MAX=5
13284 fi;
13285 echo "$as_me:13285: result: $NCURSES_CCHARW_MAX" >&5
13286 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13287
13288 echo "$as_me:13288: checking for ANSI C header files" >&5
13289 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13290 if test "${ac_cv_header_stdc+set}" = set; then
13291   echo $ECHO_N "(cached) $ECHO_C" >&6
13292 else
13293   cat >conftest.$ac_ext <<_ACEOF
13294 #line 13294 "configure"
13295 #include "confdefs.h"
13296 #include <stdlib.h>
13297 #include <stdarg.h>
13298 #include <string.h>
13299 #include <float.h>
13300
13301 _ACEOF
13302 if { (eval echo "$as_me:13302: \"$ac_cpp conftest.$ac_ext\"") >&5
13303   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13304   ac_status=$?
13305   egrep -v '^ *\+' conftest.er1 >conftest.err
13306   rm -f conftest.er1
13307   cat conftest.err >&5
13308   echo "$as_me:13308: \$? = $ac_status" >&5
13309   (exit $ac_status); } >/dev/null; then
13310   if test -s conftest.err; then
13311     ac_cpp_err=$ac_c_preproc_warn_flag
13312   else
13313     ac_cpp_err=
13314   fi
13315 else
13316   ac_cpp_err=yes
13317 fi
13318 if test -z "$ac_cpp_err"; then
13319   ac_cv_header_stdc=yes
13320 else
13321   echo "$as_me: failed program was:" >&5
13322   cat conftest.$ac_ext >&5
13323   ac_cv_header_stdc=no
13324 fi
13325 rm -f conftest.err conftest.$ac_ext
13326
13327 if test $ac_cv_header_stdc = yes; then
13328   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13329   cat >conftest.$ac_ext <<_ACEOF
13330 #line 13330 "configure"
13331 #include "confdefs.h"
13332 #include <string.h>
13333
13334 _ACEOF
13335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13336   egrep "memchr" >/dev/null 2>&1; then
13337   :
13338 else
13339   ac_cv_header_stdc=no
13340 fi
13341 rm -rf conftest*
13342
13343 fi
13344
13345 if test $ac_cv_header_stdc = yes; then
13346   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13347   cat >conftest.$ac_ext <<_ACEOF
13348 #line 13348 "configure"
13349 #include "confdefs.h"
13350 #include <stdlib.h>
13351
13352 _ACEOF
13353 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13354   egrep "free" >/dev/null 2>&1; then
13355   :
13356 else
13357   ac_cv_header_stdc=no
13358 fi
13359 rm -rf conftest*
13360
13361 fi
13362
13363 if test $ac_cv_header_stdc = yes; then
13364   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13365   if test "$cross_compiling" = yes; then
13366   :
13367 else
13368   cat >conftest.$ac_ext <<_ACEOF
13369 #line 13369 "configure"
13370 #include "confdefs.h"
13371 #include <ctype.h>
13372 #if ((' ' & 0x0FF) == 0x020)
13373 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13374 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13375 #else
13376 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13377                      || ('j' <= (c) && (c) <= 'r') \
13378                      || ('s' <= (c) && (c) <= 'z'))
13379 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13380 #endif
13381
13382 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13383 int
13384 main (void)
13385 {
13386   int i;
13387   for (i = 0; i < 256; i++)
13388     if (XOR (islower (i), ISLOWER (i))
13389         || toupper (i) != TOUPPER (i))
13390       $ac_main_return(2);
13391   $ac_main_return (0);
13392 }
13393 _ACEOF
13394 rm -f conftest$ac_exeext
13395 if { (eval echo "$as_me:13395: \"$ac_link\"") >&5
13396   (eval $ac_link) 2>&5
13397   ac_status=$?
13398   echo "$as_me:13398: \$? = $ac_status" >&5
13399   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13400   { (eval echo "$as_me:13400: \"$ac_try\"") >&5
13401   (eval $ac_try) 2>&5
13402   ac_status=$?
13403   echo "$as_me:13403: \$? = $ac_status" >&5
13404   (exit $ac_status); }; }; then
13405   :
13406 else
13407   echo "$as_me: program exited with status $ac_status" >&5
13408 echo "$as_me: failed program was:" >&5
13409 cat conftest.$ac_ext >&5
13410 ac_cv_header_stdc=no
13411 fi
13412 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13413 fi
13414 fi
13415 fi
13416 echo "$as_me:13416: result: $ac_cv_header_stdc" >&5
13417 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13418 if test $ac_cv_header_stdc = yes; then
13419
13420 cat >>confdefs.h <<\EOF
13421 #define STDC_HEADERS 1
13422 EOF
13423
13424 fi
13425
13426 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13427
13428 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13429                   inttypes.h stdint.h unistd.h
13430 do
13431 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13432 echo "$as_me:13432: checking for $ac_header" >&5
13433 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13434 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13435   echo $ECHO_N "(cached) $ECHO_C" >&6
13436 else
13437   cat >conftest.$ac_ext <<_ACEOF
13438 #line 13438 "configure"
13439 #include "confdefs.h"
13440 $ac_includes_default
13441 #include <$ac_header>
13442 _ACEOF
13443 rm -f conftest.$ac_objext
13444 if { (eval echo "$as_me:13444: \"$ac_compile\"") >&5
13445   (eval $ac_compile) 2>&5
13446   ac_status=$?
13447   echo "$as_me:13447: \$? = $ac_status" >&5
13448   (exit $ac_status); } &&
13449          { ac_try='test -s conftest.$ac_objext'
13450   { (eval echo "$as_me:13450: \"$ac_try\"") >&5
13451   (eval $ac_try) 2>&5
13452   ac_status=$?
13453   echo "$as_me:13453: \$? = $ac_status" >&5
13454   (exit $ac_status); }; }; then
13455   eval "$as_ac_Header=yes"
13456 else
13457   echo "$as_me: failed program was:" >&5
13458 cat conftest.$ac_ext >&5
13459 eval "$as_ac_Header=no"
13460 fi
13461 rm -f conftest.$ac_objext conftest.$ac_ext
13462 fi
13463 echo "$as_me:13463: result: `eval echo '${'$as_ac_Header'}'`" >&5
13464 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13465 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13466   cat >>confdefs.h <<EOF
13467 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13468 EOF
13469
13470 fi
13471 done
13472
13473 echo "$as_me:13473: checking for signed char" >&5
13474 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13475 if test "${ac_cv_type_signed_char+set}" = set; then
13476   echo $ECHO_N "(cached) $ECHO_C" >&6
13477 else
13478   cat >conftest.$ac_ext <<_ACEOF
13479 #line 13479 "configure"
13480 #include "confdefs.h"
13481 $ac_includes_default
13482 int
13483 main (void)
13484 {
13485 if ((signed char *) 0)
13486   return 0;
13487 if (sizeof (signed char))
13488   return 0;
13489   ;
13490   return 0;
13491 }
13492 _ACEOF
13493 rm -f conftest.$ac_objext
13494 if { (eval echo "$as_me:13494: \"$ac_compile\"") >&5
13495   (eval $ac_compile) 2>&5
13496   ac_status=$?
13497   echo "$as_me:13497: \$? = $ac_status" >&5
13498   (exit $ac_status); } &&
13499          { ac_try='test -s conftest.$ac_objext'
13500   { (eval echo "$as_me:13500: \"$ac_try\"") >&5
13501   (eval $ac_try) 2>&5
13502   ac_status=$?
13503   echo "$as_me:13503: \$? = $ac_status" >&5
13504   (exit $ac_status); }; }; then
13505   ac_cv_type_signed_char=yes
13506 else
13507   echo "$as_me: failed program was:" >&5
13508 cat conftest.$ac_ext >&5
13509 ac_cv_type_signed_char=no
13510 fi
13511 rm -f conftest.$ac_objext conftest.$ac_ext
13512 fi
13513 echo "$as_me:13513: result: $ac_cv_type_signed_char" >&5
13514 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13515
13516 echo "$as_me:13516: checking size of signed char" >&5
13517 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13518 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13519   echo $ECHO_N "(cached) $ECHO_C" >&6
13520 else
13521   if test "$ac_cv_type_signed_char" = yes; then
13522   if test "$cross_compiling" = yes; then
13523   # Depending upon the size, compute the lo and hi bounds.
13524 cat >conftest.$ac_ext <<_ACEOF
13525 #line 13525 "configure"
13526 #include "confdefs.h"
13527 $ac_includes_default
13528 int
13529 main (void)
13530 {
13531 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13532   ;
13533   return 0;
13534 }
13535 _ACEOF
13536 rm -f conftest.$ac_objext
13537 if { (eval echo "$as_me:13537: \"$ac_compile\"") >&5
13538   (eval $ac_compile) 2>&5
13539   ac_status=$?
13540   echo "$as_me:13540: \$? = $ac_status" >&5
13541   (exit $ac_status); } &&
13542          { ac_try='test -s conftest.$ac_objext'
13543   { (eval echo "$as_me:13543: \"$ac_try\"") >&5
13544   (eval $ac_try) 2>&5
13545   ac_status=$?
13546   echo "$as_me:13546: \$? = $ac_status" >&5
13547   (exit $ac_status); }; }; then
13548   ac_lo=0 ac_mid=0
13549   while :; do
13550     cat >conftest.$ac_ext <<_ACEOF
13551 #line 13551 "configure"
13552 #include "confdefs.h"
13553 $ac_includes_default
13554 int
13555 main (void)
13556 {
13557 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13558   ;
13559   return 0;
13560 }
13561 _ACEOF
13562 rm -f conftest.$ac_objext
13563 if { (eval echo "$as_me:13563: \"$ac_compile\"") >&5
13564   (eval $ac_compile) 2>&5
13565   ac_status=$?
13566   echo "$as_me:13566: \$? = $ac_status" >&5
13567   (exit $ac_status); } &&
13568          { ac_try='test -s conftest.$ac_objext'
13569   { (eval echo "$as_me:13569: \"$ac_try\"") >&5
13570   (eval $ac_try) 2>&5
13571   ac_status=$?
13572   echo "$as_me:13572: \$? = $ac_status" >&5
13573   (exit $ac_status); }; }; then
13574   ac_hi=$ac_mid; break
13575 else
13576   echo "$as_me: failed program was:" >&5
13577 cat conftest.$ac_ext >&5
13578 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13579 fi
13580 rm -f conftest.$ac_objext conftest.$ac_ext
13581   done
13582 else
13583   echo "$as_me: failed program was:" >&5
13584 cat conftest.$ac_ext >&5
13585 ac_hi=-1 ac_mid=-1
13586   while :; do
13587     cat >conftest.$ac_ext <<_ACEOF
13588 #line 13588 "configure"
13589 #include "confdefs.h"
13590 $ac_includes_default
13591 int
13592 main (void)
13593 {
13594 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13595   ;
13596   return 0;
13597 }
13598 _ACEOF
13599 rm -f conftest.$ac_objext
13600 if { (eval echo "$as_me:13600: \"$ac_compile\"") >&5
13601   (eval $ac_compile) 2>&5
13602   ac_status=$?
13603   echo "$as_me:13603: \$? = $ac_status" >&5
13604   (exit $ac_status); } &&
13605          { ac_try='test -s conftest.$ac_objext'
13606   { (eval echo "$as_me:13606: \"$ac_try\"") >&5
13607   (eval $ac_try) 2>&5
13608   ac_status=$?
13609   echo "$as_me:13609: \$? = $ac_status" >&5
13610   (exit $ac_status); }; }; then
13611   ac_lo=$ac_mid; break
13612 else
13613   echo "$as_me: failed program was:" >&5
13614 cat conftest.$ac_ext >&5
13615 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13616 fi
13617 rm -f conftest.$ac_objext conftest.$ac_ext
13618   done
13619 fi
13620 rm -f conftest.$ac_objext conftest.$ac_ext
13621 # Binary search between lo and hi bounds.
13622 while test "x$ac_lo" != "x$ac_hi"; do
13623   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13624   cat >conftest.$ac_ext <<_ACEOF
13625 #line 13625 "configure"
13626 #include "confdefs.h"
13627 $ac_includes_default
13628 int
13629 main (void)
13630 {
13631 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13632   ;
13633   return 0;
13634 }
13635 _ACEOF
13636 rm -f conftest.$ac_objext
13637 if { (eval echo "$as_me:13637: \"$ac_compile\"") >&5
13638   (eval $ac_compile) 2>&5
13639   ac_status=$?
13640   echo "$as_me:13640: \$? = $ac_status" >&5
13641   (exit $ac_status); } &&
13642          { ac_try='test -s conftest.$ac_objext'
13643   { (eval echo "$as_me:13643: \"$ac_try\"") >&5
13644   (eval $ac_try) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit $ac_status); }; }; then
13648   ac_hi=$ac_mid
13649 else
13650   echo "$as_me: failed program was:" >&5
13651 cat conftest.$ac_ext >&5
13652 ac_lo=`expr $ac_mid + 1`
13653 fi
13654 rm -f conftest.$ac_objext conftest.$ac_ext
13655 done
13656 ac_cv_sizeof_signed_char=$ac_lo
13657 else
13658   if test "$cross_compiling" = yes; then
13659   { { echo "$as_me:13659: error: cannot run test program while cross compiling" >&5
13660 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13661    { (exit 1); exit 1; }; }
13662 else
13663   cat >conftest.$ac_ext <<_ACEOF
13664 #line 13664 "configure"
13665 #include "confdefs.h"
13666 $ac_includes_default
13667 int
13668 main (void)
13669 {
13670 FILE *f = fopen ("conftest.val", "w");
13671 if (!f)
13672   $ac_main_return (1);
13673 fprintf (f, "%d", (sizeof (signed char)));
13674 fclose (f);
13675   ;
13676   return 0;
13677 }
13678 _ACEOF
13679 rm -f conftest$ac_exeext
13680 if { (eval echo "$as_me:13680: \"$ac_link\"") >&5
13681   (eval $ac_link) 2>&5
13682   ac_status=$?
13683   echo "$as_me:13683: \$? = $ac_status" >&5
13684   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13685   { (eval echo "$as_me:13685: \"$ac_try\"") >&5
13686   (eval $ac_try) 2>&5
13687   ac_status=$?
13688   echo "$as_me:13688: \$? = $ac_status" >&5
13689   (exit $ac_status); }; }; then
13690   ac_cv_sizeof_signed_char=`cat conftest.val`
13691 else
13692   echo "$as_me: program exited with status $ac_status" >&5
13693 echo "$as_me: failed program was:" >&5
13694 cat conftest.$ac_ext >&5
13695 fi
13696 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13697 fi
13698 fi
13699 rm -f conftest.val
13700 else
13701   ac_cv_sizeof_signed_char=0
13702 fi
13703 fi
13704 echo "$as_me:13704: result: $ac_cv_sizeof_signed_char" >&5
13705 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13706 cat >>confdefs.h <<EOF
13707 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13708 EOF
13709
13710 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13711         NCURSES_SBOOL="signed char"
13712 else
13713         NCURSES_SBOOL="char"
13714 fi
13715 echo "$as_me:13715: checking if you want to use signed Boolean array in term.h" >&5
13716 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13717
13718 # Check whether --enable-signed-char or --disable-signed-char was given.
13719 if test "${enable_signed_char+set}" = set; then
13720   enableval="$enable_signed_char"
13721   with_signed_char=$enableval
13722 else
13723   with_signed_char=no
13724 fi;
13725 echo "$as_me:13725: result: $with_signed_char" >&5
13726 echo "${ECHO_T}$with_signed_char" >&6
13727 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13728
13729 ###   use option --with-tparm-arg to override tparm's argument type
13730 echo "$as_me:13730: checking for type of tparm args" >&5
13731 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13732
13733 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13734 if test "${with_tparm_arg+set}" = set; then
13735   withval="$with_tparm_arg"
13736   NCURSES_TPARM_ARG="$withval"
13737 else
13738   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13739 fi;
13740 echo "$as_me:13740: result: $NCURSES_TPARM_ARG" >&5
13741 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13742
13743 ### Enable compiling-in rcs id's
13744 echo "$as_me:13744: checking if RCS identifiers should be compiled-in" >&5
13745 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13746
13747 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13748 if test "${with_rcs_ids+set}" = set; then
13749   withval="$with_rcs_ids"
13750   with_rcs_ids=$withval
13751 else
13752   with_rcs_ids=no
13753 fi;
13754 echo "$as_me:13754: result: $with_rcs_ids" >&5
13755 echo "${ECHO_T}$with_rcs_ids" >&6
13756 test "x$with_rcs_ids" = xyes &&
13757 cat >>confdefs.h <<\EOF
13758 #define USE_RCS_IDS 1
13759 EOF
13760
13761 ###############################################################################
13762
13763 echo "$as_me:13763: checking format of man-pages" >&5
13764 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13765
13766 # Check whether --with-manpage-format or --without-manpage-format was given.
13767 if test "${with_manpage_format+set}" = set; then
13768   withval="$with_manpage_format"
13769   MANPAGE_FORMAT=$withval
13770 else
13771   MANPAGE_FORMAT=unknown
13772 fi;
13773
13774 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13775 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13776
13777 cf_unknown=
13778
13779 case $MANPAGE_FORMAT in
13780 (unknown)
13781         if test -z "$MANPATH" ; then
13782                 MANPATH="/usr/man:/usr/share/man"
13783         fi
13784
13785         # look for the 'date' man-page (it's most likely to be installed!)
13786         MANPAGE_FORMAT=
13787         cf_preform=no
13788         cf_catonly=yes
13789         cf_example=date
13790
13791         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13792         for cf_dir in $MANPATH; do
13793                 test -z "$cf_dir" && cf_dir=/usr/man
13794                 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
13795                 do
13796                         cf_test=`echo $cf_name | sed -e 's/*//'`
13797                         if test "x$cf_test" = "x$cf_name" ; then
13798
13799                                 case "$cf_name" in
13800                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13801                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13802                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13803                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13804                                 esac
13805
13806                                 case "$cf_name" in
13807                                 ($cf_dir/man*)
13808                                         cf_catonly=no
13809                                         ;;
13810                                 ($cf_dir/cat*)
13811                                         cf_preform=yes
13812                                         ;;
13813                                 esac
13814                                 break
13815                         fi
13816
13817                         # if we found a match in either man* or cat*, stop looking
13818                         if test -n "$MANPAGE_FORMAT" ; then
13819                                 cf_found=no
13820                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13821                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13822                                 case "$cf_name" in
13823                                 ($cf_dir/cat*)
13824                                         cf_found=yes
13825                                         ;;
13826                                 esac
13827                                 test $cf_found=yes && break
13828                         fi
13829                 done
13830                 # only check the first directory in $MANPATH where we find manpages
13831                 if test -n "$MANPAGE_FORMAT" ; then
13832                         break
13833                 fi
13834         done
13835         # if we did not find the example, just assume it is normal
13836         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13837         IFS="$ac_save_ifs"
13838         ;;
13839 (*)
13840         for cf_option in $MANPAGE_FORMAT; do
13841         case $cf_option in
13842         (gzip|compress|BSDI|normal|formatted|catonly)
13843                 ;;
13844         (*)
13845                 cf_unknown="$cf_unknown $cf_option"
13846                 ;;
13847         esac
13848         done
13849         ;;
13850 esac
13851
13852 echo "$as_me:13852: result: $MANPAGE_FORMAT" >&5
13853 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13854 if test -n "$cf_unknown" ; then
13855         { echo "$as_me:13855: WARNING: Unexpected manpage-format $cf_unknown" >&5
13856 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13857 fi
13858
13859 echo "$as_me:13859: checking for manpage renaming" >&5
13860 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13861
13862 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13863 if test "${with_manpage_renames+set}" = set; then
13864   withval="$with_manpage_renames"
13865   MANPAGE_RENAMES=$withval
13866 else
13867   MANPAGE_RENAMES=yes
13868 fi;
13869
13870 case ".$MANPAGE_RENAMES" in
13871 (.no)
13872         ;;
13873 (.|.yes)
13874         # Debian 'man' program?
13875         if test -f /etc/debian_version ; then
13876                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13877         else
13878                 MANPAGE_RENAMES=no
13879         fi
13880         ;;
13881 esac
13882
13883 if test "$MANPAGE_RENAMES" != no ; then
13884         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13885                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13886         elif test ! -f $MANPAGE_RENAMES ; then
13887                 { { echo "$as_me:13887: error: not a filename: $MANPAGE_RENAMES" >&5
13888 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13889    { (exit 1); exit 1; }; }
13890         fi
13891
13892         test ! -d man && mkdir man
13893
13894         # Construct a sed-script to perform renaming within man-pages
13895         if test -n "$MANPAGE_RENAMES" ; then
13896                 test ! -d man && mkdir man
13897                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13898         fi
13899 fi
13900
13901 echo "$as_me:13901: result: $MANPAGE_RENAMES" >&5
13902 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13903
13904 echo "$as_me:13904: checking if manpage aliases will be installed" >&5
13905 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13906
13907 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13908 if test "${with_manpage_aliases+set}" = set; then
13909   withval="$with_manpage_aliases"
13910   MANPAGE_ALIASES=$withval
13911 else
13912   MANPAGE_ALIASES=yes
13913 fi;
13914
13915 echo "$as_me:13915: result: $MANPAGE_ALIASES" >&5
13916 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13917
13918 case "x$LN_S" in
13919 (xln*)
13920         cf_use_symlinks=yes
13921         ;;
13922 (*)
13923         cf_use_symlinks=no
13924         ;;
13925 esac
13926
13927 MANPAGE_SYMLINKS=no
13928 if test "$MANPAGE_ALIASES" = yes ; then
13929 echo "$as_me:13929: checking if manpage symlinks should be used" >&5
13930 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13931
13932 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13933 if test "${with_manpage_symlinks+set}" = set; then
13934   withval="$with_manpage_symlinks"
13935   MANPAGE_SYMLINKS=$withval
13936 else
13937   MANPAGE_SYMLINKS=$cf_use_symlinks
13938 fi;
13939
13940 if test "$$cf_use_symlinks" = no; then
13941 if test "$MANPAGE_SYMLINKS" = yes ; then
13942         { echo "$as_me:13942: WARNING: cannot make symlinks" >&5
13943 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13944         MANPAGE_SYMLINKS=no
13945 fi
13946 fi
13947
13948 echo "$as_me:13948: result: $MANPAGE_SYMLINKS" >&5
13949 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13950 fi
13951
13952 echo "$as_me:13952: checking for manpage tbl" >&5
13953 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13954
13955 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13956 if test "${with_manpage_tbl+set}" = set; then
13957   withval="$with_manpage_tbl"
13958   MANPAGE_TBL=$withval
13959 else
13960   MANPAGE_TBL=no
13961 fi;
13962
13963 echo "$as_me:13963: result: $MANPAGE_TBL" >&5
13964 echo "${ECHO_T}$MANPAGE_TBL" >&6
13965
13966 if test "$prefix" = "NONE" ; then
13967         cf_prefix="$ac_default_prefix"
13968 else
13969         cf_prefix="$prefix"
13970 fi
13971
13972 case "$MANPAGE_FORMAT" in
13973 (*catonly*)
13974         cf_format=yes
13975         cf_inboth=no
13976         ;;
13977 (*formatted*)
13978         cf_format=yes
13979         cf_inboth=yes
13980         ;;
13981 (*)
13982         cf_format=no
13983         cf_inboth=no
13984         ;;
13985 esac
13986
13987 test ! -d man && mkdir man
13988
13989 cf_so_strip=
13990 cf_compress=
13991 case "$MANPAGE_FORMAT" in
13992 (*compress*)
13993         cf_so_strip="Z"
13994         cf_compress=compress
13995         ;;
13996 (*gzip*)
13997         cf_so_strip="gz"
13998         cf_compress=gzip
13999         ;;
14000 esac
14001
14002 cf_edit_man=./edit_man.sh
14003 cf_man_alias=`pwd`/man_alias.sed
14004
14005 cat >$cf_edit_man <<CF_EOF
14006 #! $SHELL
14007 # this script is generated by the configure-script CF_MAN_PAGES macro.
14008
14009 prefix="$cf_prefix"
14010 datarootdir="$datarootdir"
14011 datadir="$datadir"
14012
14013 NCURSES_MAJOR="$NCURSES_MAJOR"
14014 NCURSES_MINOR="$NCURSES_MINOR"
14015 NCURSES_PATCH="$NCURSES_PATCH"
14016
14017 NCURSES_OSPEED="$NCURSES_OSPEED"
14018 TERMINFO="$TERMINFO"
14019
14020 INSTALL="$INSTALL"
14021 INSTALL_DATA="$INSTALL_DATA"
14022
14023 transform="$program_transform_name"
14024
14025 TMP=\${TMPDIR:=/tmp}/man\$\$
14026 trap "rm -f \$TMP" 0 1 2 3 15
14027
14028 form=\$1
14029 shift || exit 1
14030
14031 verb=\$1
14032 shift || exit 1
14033
14034 mandir=\$1
14035 shift || exit 1
14036
14037 srcdir=\$1
14038 top_srcdir=\$srcdir/..
14039 shift || exit 1
14040
14041 if test "\$form" = normal ; then
14042         if test "$cf_format" = yes ; then
14043         if test "$cf_inboth" = no ; then
14044                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14045                 exit $?
14046         fi
14047         fi
14048         cf_subdir=\$mandir/man
14049         cf_tables=$MANPAGE_TBL
14050 else
14051         cf_subdir=\$mandir/cat
14052         cf_tables=yes
14053 fi
14054
14055 # process the list of source-files
14056 for i in \$* ; do
14057 case \$i in
14058 (*.orig|*.rej) ;;
14059 (*.[0-9]*)
14060         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14061         if test \$verb = installing ; then
14062         if test ! -d \$cf_subdir\${section} ; then
14063                 mkdir -p \$cf_subdir\$section
14064         fi
14065         fi
14066
14067         # replace variables in man page
14068         if test ! -f $cf_man_alias ; then
14069 cat >>$cf_man_alias <<-CF_EOF2
14070                 s,@DATADIR@,\$datadir,g
14071                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14072                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14073                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14074                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14075                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14076                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14077 CF_EOF
14078
14079         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14080         do
14081                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14082                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14083 cat >>$cf_edit_man <<-CF_EOF
14084                 s,@$cf_NAME@,$cf_name,g
14085 CF_EOF
14086         done
14087
14088 cat >>$cf_edit_man <<CF_EOF
14089 CF_EOF2
14090                 echo "...made $cf_man_alias"
14091         fi
14092
14093         aliases=
14094         cf_source=\`basename \$i\`
14095         inalias=\$cf_source
14096         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14097         if test ! -f \$inalias ; then
14098                 echo .. skipped \$cf_source
14099                 continue
14100         fi
14101 CF_EOF
14102
14103 if test "$MANPAGE_ALIASES" != no ; then
14104 cat >>$cf_edit_man <<CF_EOF
14105         nCurses=ignore.3x
14106         test $with_curses_h = yes && nCurses=ncurses.3x
14107         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14108 CF_EOF
14109 fi
14110
14111 if test "$MANPAGE_RENAMES" = no ; then
14112 cat >>$cf_edit_man <<CF_EOF
14113         # perform program transformations for section 1 man pages
14114         if test \$section = 1 ; then
14115                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14116         else
14117                 cf_target=\$cf_subdir\${section}/\$cf_source
14118         fi
14119 CF_EOF
14120 else
14121 cat >>$cf_edit_man <<CF_EOF
14122         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14123         if test -z "\$cf_target" ; then
14124                 echo '? missing rename for '\$cf_source
14125                 cf_target="\$cf_source"
14126         fi
14127         cf_target="\$cf_subdir\${section}/\${cf_target}"
14128
14129 CF_EOF
14130 fi
14131
14132 cat >>$cf_edit_man <<CF_EOF
14133         sed     -f $cf_man_alias \\
14134 CF_EOF
14135
14136 if test -f $MANPAGE_RENAMES ; then
14137 cat >>$cf_edit_man <<CF_EOF
14138                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14139 CF_EOF
14140 else
14141 cat >>$cf_edit_man <<CF_EOF
14142                 < \$i >\$TMP
14143 CF_EOF
14144 fi
14145
14146 cat >>$cf_edit_man <<CF_EOF
14147 if test \$cf_tables = yes ; then
14148         tbl \$TMP >\$TMP.out
14149         mv \$TMP.out \$TMP
14150 fi
14151 CF_EOF
14152
14153 if test $with_overwrite != yes ; then
14154 cat >>$cf_edit_man <<CF_EOF
14155         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14156         mv \$TMP.out \$TMP
14157 CF_EOF
14158 fi
14159
14160 if test $with_curses_h != yes ; then
14161 cat >>$cf_edit_man <<CF_EOF
14162         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14163         mv \$TMP.out \$TMP
14164 CF_EOF
14165 fi
14166
14167 cat >>$cf_edit_man <<CF_EOF
14168         if test \$form = format ; then
14169                 nroff -man \$TMP >\$TMP.out
14170                 mv \$TMP.out \$TMP
14171         fi
14172 CF_EOF
14173
14174 if test -n "$cf_compress" ; then
14175 cat >>$cf_edit_man <<CF_EOF
14176         if test \$verb = installing ; then
14177         if ( $cf_compress -f \$TMP )
14178         then
14179                 mv \$TMP.$cf_so_strip \$TMP
14180         fi
14181         fi
14182         cf_target="\$cf_target.$cf_so_strip"
14183 CF_EOF
14184 fi
14185
14186 case "$MANPAGE_FORMAT" in
14187 (*BSDI*)
14188 cat >>$cf_edit_man <<CF_EOF
14189         if test \$form = format ; then
14190                 # BSDI installs only .0 suffixes in the cat directories
14191                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14192         fi
14193 CF_EOF
14194   ;;
14195 esac
14196
14197 cat >>$cf_edit_man <<CF_EOF
14198         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14199         if test \$verb = installing ; then
14200                 echo \$verb \$cf_target
14201                 \$INSTALL_DATA \$TMP \$cf_target
14202                 test -d \$cf_subdir\${section} &&
14203                 test -n "\$aliases" && (
14204                         cd \$cf_subdir\${section} && (
14205                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14206                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14207                                 cf_target=\`basename \$cf_target\`
14208                                 for cf_alias in \$aliases
14209                                 do
14210                                         if test \$section = 1 ; then
14211                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14212                                         fi
14213
14214                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14215                                                 if test -f \$cf_alias\${suffix} ; then
14216                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14217                                                         then
14218                                                                 continue
14219                                                         fi
14220                                                 fi
14221                                                 echo .. \$verb alias \$cf_alias\${suffix}
14222 CF_EOF
14223 case "x$LN_S" in
14224 (*-f)
14225 cat >>$cf_edit_man <<CF_EOF
14226                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14227 CF_EOF
14228         ;;
14229 (*)
14230 cat >>$cf_edit_man <<CF_EOF
14231                                                 rm -f \$cf_alias\${suffix}
14232                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14233 CF_EOF
14234         ;;
14235 esac
14236 cat >>$cf_edit_man <<CF_EOF
14237                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14238                                                 echo ".so \$cf_source" >\$TMP
14239 CF_EOF
14240 if test -n "$cf_compress" ; then
14241 cat >>$cf_edit_man <<CF_EOF
14242                                                 if test -n "$cf_so_strip" ; then
14243                                                         $cf_compress -f \$TMP
14244                                                         mv \$TMP.$cf_so_strip \$TMP
14245                                                 fi
14246 CF_EOF
14247 fi
14248 cat >>$cf_edit_man <<CF_EOF
14249                                                 echo .. \$verb alias \$cf_alias\${suffix}
14250                                                 rm -f \$cf_alias\${suffix}
14251                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14252                                         fi
14253                                 done
14254                         )
14255                 )
14256         elif test \$verb = removing ; then
14257                 test -f \$cf_target && (
14258                         echo \$verb \$cf_target
14259                         rm -f \$cf_target
14260                 )
14261                 test -d \$cf_subdir\${section} &&
14262                 test -n "\$aliases" && (
14263                         cd \$cf_subdir\${section} && (
14264                                 for cf_alias in \$aliases
14265                                 do
14266                                         if test \$section = 1 ; then
14267                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14268                                         fi
14269
14270                                         echo .. \$verb alias \$cf_alias\${suffix}
14271                                         rm -f \$cf_alias\${suffix}
14272                                 done
14273                         )
14274                 )
14275         else
14276 #               echo ".hy 0"
14277                 cat \$TMP
14278         fi
14279         ;;
14280 esac
14281 done
14282
14283 if test $cf_inboth = yes ; then
14284 if test \$form != format ; then
14285         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14286 fi
14287 fi
14288
14289 exit 0
14290 CF_EOF
14291 chmod 755 $cf_edit_man
14292
14293 ###############################################################################
14294
14295 ### Note that some functions (such as const) are normally disabled anyway.
14296 echo "$as_me:14296: checking if you want to build with function extensions" >&5
14297 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14298
14299 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14300 if test "${enable_ext_funcs+set}" = set; then
14301   enableval="$enable_ext_funcs"
14302   with_ext_funcs=$enableval
14303 else
14304   with_ext_funcs=yes
14305 fi;
14306 echo "$as_me:14306: result: $with_ext_funcs" >&5
14307 echo "${ECHO_T}$with_ext_funcs" >&6
14308 if test "x$with_ext_funcs" = xyes ; then
14309         NCURSES_EXT_FUNCS=1
14310
14311 cat >>confdefs.h <<\EOF
14312 #define NCURSES_EXT_FUNCS 1
14313 EOF
14314
14315 cat >>confdefs.h <<\EOF
14316 #define HAVE_ASSUME_DEFAULT_COLORS 1
14317 EOF
14318
14319 cat >>confdefs.h <<\EOF
14320 #define HAVE_CURSES_VERSION 1
14321 EOF
14322
14323 cat >>confdefs.h <<\EOF
14324 #define HAVE_HAS_KEY 1
14325 EOF
14326
14327 cat >>confdefs.h <<\EOF
14328 #define HAVE_RESIZETERM 1
14329 EOF
14330
14331 cat >>confdefs.h <<\EOF
14332 #define HAVE_RESIZE_TERM 1
14333 EOF
14334
14335 cat >>confdefs.h <<\EOF
14336 #define HAVE_TERM_ENTRY_H 1
14337 EOF
14338
14339 cat >>confdefs.h <<\EOF
14340 #define HAVE_USE_DEFAULT_COLORS 1
14341 EOF
14342
14343 cat >>confdefs.h <<\EOF
14344 #define HAVE_USE_EXTENDED_NAMES 1
14345 EOF
14346
14347 cat >>confdefs.h <<\EOF
14348 #define HAVE_USE_SCREEN 1
14349 EOF
14350
14351 cat >>confdefs.h <<\EOF
14352 #define HAVE_USE_WINDOW 1
14353 EOF
14354
14355 cat >>confdefs.h <<\EOF
14356 #define HAVE_WRESIZE 1
14357 EOF
14358
14359         GENERATED_EXT_FUNCS=generated
14360         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14361 else
14362         NCURSES_EXT_FUNCS=0
14363         GENERATED_EXT_FUNCS=
14364 fi
14365
14366 echo "$as_me:14366: checking if you want to build with SCREEN extensions" >&5
14367 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14368
14369 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14370 if test "${enable_sp_funcs+set}" = set; then
14371   enableval="$enable_sp_funcs"
14372   with_sp_funcs=$enableval
14373 else
14374   with_sp_funcs=$cf_dft_ext_spfuncs
14375 fi;
14376 echo "$as_me:14376: result: $with_sp_funcs" >&5
14377 echo "${ECHO_T}$with_sp_funcs" >&6
14378 if test "x$with_sp_funcs" = xyes ; then
14379         NCURSES_SP_FUNCS=1
14380
14381 cat >>confdefs.h <<\EOF
14382 #define NCURSES_SP_FUNCS 1
14383 EOF
14384
14385 cat >>confdefs.h <<\EOF
14386 #define HAVE_TPUTS_SP 1
14387 EOF
14388
14389         GENERATED_SP_FUNCS=generated
14390 else
14391         NCURSES_SP_FUNCS=0
14392         GENERATED_SP_FUNCS=
14393 fi
14394
14395 echo "$as_me:14395: checking if you want to build with terminal-driver" >&5
14396 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14397
14398 # Check whether --enable-term-driver or --disable-term-driver was given.
14399 if test "${enable_term_driver+set}" = set; then
14400   enableval="$enable_term_driver"
14401   with_term_driver=$enableval
14402 else
14403   with_term_driver=no
14404 fi;
14405 echo "$as_me:14405: result: $with_term_driver" >&5
14406 echo "${ECHO_T}$with_term_driver" >&6
14407 if test "x$with_term_driver" = xyes ; then
14408
14409 cat >>confdefs.h <<\EOF
14410 #define USE_TERM_DRIVER 1
14411 EOF
14412
14413         if test "x$with_termlib" != xno ; then
14414                 { { echo "$as_me:14414: error: The term-driver option conflicts with the termlib option" >&5
14415 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14416    { (exit 1); exit 1; }; }
14417         fi
14418         if test "x$with_sp_funcs" != xyes ; then
14419                 { { echo "$as_me:14419: error: The term-driver option relies upon sp-funcs" >&5
14420 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14421    { (exit 1); exit 1; }; }
14422         fi
14423 fi
14424
14425 ###   use option --enable-const to turn on use of const beyond that in XSI.
14426 echo "$as_me:14426: checking for extended use of const keyword" >&5
14427 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14428
14429 # Check whether --enable-const or --disable-const was given.
14430 if test "${enable_const+set}" = set; then
14431   enableval="$enable_const"
14432   with_ext_const=$enableval
14433 else
14434   with_ext_const=$cf_dft_ext_const
14435 fi;
14436 echo "$as_me:14436: result: $with_ext_const" >&5
14437 echo "${ECHO_T}$with_ext_const" >&6
14438 NCURSES_CONST='/*nothing*/'
14439 if test "x$with_ext_const" = xyes ; then
14440         NCURSES_CONST=const
14441 fi
14442
14443 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14444 echo "$as_me:14444: checking if you want to use extended colors" >&5
14445 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14446
14447 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14448 if test "${enable_ext_colors+set}" = set; then
14449   enableval="$enable_ext_colors"
14450   with_ext_colors=$enableval
14451 else
14452   with_ext_colors=$cf_dft_ext_colors
14453 fi;
14454 echo "$as_me:14454: result: $with_ext_colors" >&5
14455 echo "${ECHO_T}$with_ext_colors" >&6
14456 NCURSES_EXT_COLORS=0
14457 if test "x$with_ext_colors" = xyes ; then
14458         if test "x$with_widec" != xyes ; then
14459                 { echo "$as_me:14459: WARNING: This option applies only to wide-character library" >&5
14460 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14461         else
14462                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14463
14464 if test "${with_abi_version+set}" != set; then
14465         case $cf_cv_rel_version in
14466         (5.*)
14467                 cf_cv_rel_version=6.0
14468                 cf_cv_abi_version=6
14469                 { echo "$as_me:14469: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14470 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14471                 ;;
14472         esac
14473 fi
14474
14475                 NCURSES_EXT_COLORS=1
14476
14477 cat >>confdefs.h <<\EOF
14478 #define NCURSES_EXT_COLORS 1
14479 EOF
14480
14481 cat >>confdefs.h <<\EOF
14482 #define HAVE_ALLOC_PAIR 1
14483 EOF
14484
14485 cat >>confdefs.h <<\EOF
14486 #define HAVE_INIT_EXTENDED_COLOR 1
14487 EOF
14488
14489 cat >>confdefs.h <<\EOF
14490 #define HAVE_RESET_COLOR_PAIRS 1
14491 EOF
14492
14493         fi
14494 fi
14495
14496 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14497 echo "$as_me:14497: checking if you want to use extended mouse encoding" >&5
14498 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14499
14500 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14501 if test "${enable_ext_mouse+set}" = set; then
14502   enableval="$enable_ext_mouse"
14503   with_ext_mouse=$enableval
14504 else
14505   with_ext_mouse=$cf_dft_ext_mouse
14506 fi;
14507 echo "$as_me:14507: result: $with_ext_mouse" >&5
14508 echo "${ECHO_T}$with_ext_mouse" >&6
14509 NCURSES_MOUSE_VERSION=1
14510 if test "x$with_ext_mouse" = xyes ; then
14511         NCURSES_MOUSE_VERSION=2
14512
14513 if test "${with_abi_version+set}" != set; then
14514         case $cf_cv_rel_version in
14515         (5.*)
14516                 cf_cv_rel_version=6.0
14517                 cf_cv_abi_version=6
14518                 { echo "$as_me:14518: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14519 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14520                 ;;
14521         esac
14522 fi
14523
14524 fi
14525
14526 ###   use option --enable-ext-putwin to turn on extended screendumps
14527 echo "$as_me:14527: checking if you want to use extended putwin/screendump" >&5
14528 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14529
14530 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14531 if test "${enable_ext_putwin+set}" = set; then
14532   enableval="$enable_ext_putwin"
14533   with_ext_putwin=$enableval
14534 else
14535   with_ext_putwin=$cf_dft_ext_putwin
14536 fi;
14537 echo "$as_me:14537: result: $with_ext_putwin" >&5
14538 echo "${ECHO_T}$with_ext_putwin" >&6
14539 if test "x$with_ext_putwin" = xyes ; then
14540
14541 cat >>confdefs.h <<\EOF
14542 #define NCURSES_EXT_PUTWIN 1
14543 EOF
14544
14545 fi
14546
14547 echo "$as_me:14547: checking if you want \$NCURSES_NO_PADDING code" >&5
14548 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14549
14550 # Check whether --enable-no-padding or --disable-no-padding was given.
14551 if test "${enable_no_padding+set}" = set; then
14552   enableval="$enable_no_padding"
14553   with_no_padding=$enableval
14554 else
14555   with_no_padding=$with_ext_funcs
14556 fi;
14557 echo "$as_me:14557: result: $with_no_padding" >&5
14558 echo "${ECHO_T}$with_no_padding" >&6
14559 test "x$with_no_padding" = xyes &&
14560 cat >>confdefs.h <<\EOF
14561 #define NCURSES_NO_PADDING 1
14562 EOF
14563
14564 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14565 echo "$as_me:14565: checking if you want SIGWINCH handler" >&5
14566 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14567
14568 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14569 if test "${enable_sigwinch+set}" = set; then
14570   enableval="$enable_sigwinch"
14571   with_sigwinch=$enableval
14572 else
14573   with_sigwinch=$with_ext_funcs
14574 fi;
14575 echo "$as_me:14575: result: $with_sigwinch" >&5
14576 echo "${ECHO_T}$with_sigwinch" >&6
14577 test "x$with_sigwinch" = xyes &&
14578 cat >>confdefs.h <<\EOF
14579 #define USE_SIGWINCH 1
14580 EOF
14581
14582 ###   use option --enable-tcap-names to allow user to define new capabilities
14583 echo "$as_me:14583: checking if you want user-definable terminal capabilities like termcap" >&5
14584 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14585
14586 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14587 if test "${enable_tcap_names+set}" = set; then
14588   enableval="$enable_tcap_names"
14589   with_tcap_names=$enableval
14590 else
14591   with_tcap_names=$with_ext_funcs
14592 fi;
14593 echo "$as_me:14593: result: $with_tcap_names" >&5
14594 echo "${ECHO_T}$with_tcap_names" >&6
14595 NCURSES_XNAMES=0
14596 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14597
14598 ##############################################################################
14599
14600 echo "$as_me:14600: checking if you want to link with the pthread library" >&5
14601 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14602
14603 # Check whether --with-pthread or --without-pthread was given.
14604 if test "${with_pthread+set}" = set; then
14605   withval="$with_pthread"
14606   with_pthread=$withval
14607 else
14608   with_pthread=no
14609 fi;
14610 echo "$as_me:14610: result: $with_pthread" >&5
14611 echo "${ECHO_T}$with_pthread" >&6
14612
14613 if test "$with_pthread" != no ; then
14614         echo "$as_me:14614: checking for pthread.h" >&5
14615 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14616 if test "${ac_cv_header_pthread_h+set}" = set; then
14617   echo $ECHO_N "(cached) $ECHO_C" >&6
14618 else
14619   cat >conftest.$ac_ext <<_ACEOF
14620 #line 14620 "configure"
14621 #include "confdefs.h"
14622 #include <pthread.h>
14623 _ACEOF
14624 if { (eval echo "$as_me:14624: \"$ac_cpp conftest.$ac_ext\"") >&5
14625   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14626   ac_status=$?
14627   egrep -v '^ *\+' conftest.er1 >conftest.err
14628   rm -f conftest.er1
14629   cat conftest.err >&5
14630   echo "$as_me:14630: \$? = $ac_status" >&5
14631   (exit $ac_status); } >/dev/null; then
14632   if test -s conftest.err; then
14633     ac_cpp_err=$ac_c_preproc_warn_flag
14634   else
14635     ac_cpp_err=
14636   fi
14637 else
14638   ac_cpp_err=yes
14639 fi
14640 if test -z "$ac_cpp_err"; then
14641   ac_cv_header_pthread_h=yes
14642 else
14643   echo "$as_me: failed program was:" >&5
14644   cat conftest.$ac_ext >&5
14645   ac_cv_header_pthread_h=no
14646 fi
14647 rm -f conftest.err conftest.$ac_ext
14648 fi
14649 echo "$as_me:14649: result: $ac_cv_header_pthread_h" >&5
14650 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14651 if test $ac_cv_header_pthread_h = yes; then
14652
14653 cat >>confdefs.h <<\EOF
14654 #define HAVE_PTHREADS_H 1
14655 EOF
14656
14657         for cf_lib_pthread in pthread c_r
14658         do
14659             echo "$as_me:14659: checking if we can link with the $cf_lib_pthread library" >&5
14660 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14661             cf_save_LIBS="$LIBS"
14662
14663 cf_add_libs="$LIBS"
14664 # reverse order
14665 cf_add_0lib=
14666 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14667 # filter duplicates
14668 for cf_add_1lib in $cf_add_0lib; do
14669         for cf_add_2lib in $cf_add_libs; do
14670                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14671                         cf_add_1lib=
14672                         break
14673                 fi
14674         done
14675         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14676 done
14677 LIBS="$cf_add_libs"
14678
14679             cat >conftest.$ac_ext <<_ACEOF
14680 #line 14680 "configure"
14681 #include "confdefs.h"
14682
14683 #include <pthread.h>
14684
14685 int
14686 main (void)
14687 {
14688
14689                 int rc = pthread_create(0,0,0,0);
14690                 int r2 = pthread_mutexattr_settype(0, 0);
14691
14692   ;
14693   return 0;
14694 }
14695 _ACEOF
14696 rm -f conftest.$ac_objext conftest$ac_exeext
14697 if { (eval echo "$as_me:14697: \"$ac_link\"") >&5
14698   (eval $ac_link) 2>&5
14699   ac_status=$?
14700   echo "$as_me:14700: \$? = $ac_status" >&5
14701   (exit $ac_status); } &&
14702          { ac_try='test -s conftest$ac_exeext'
14703   { (eval echo "$as_me:14703: \"$ac_try\"") >&5
14704   (eval $ac_try) 2>&5
14705   ac_status=$?
14706   echo "$as_me:14706: \$? = $ac_status" >&5
14707   (exit $ac_status); }; }; then
14708   with_pthread=yes
14709 else
14710   echo "$as_me: failed program was:" >&5
14711 cat conftest.$ac_ext >&5
14712 with_pthread=no
14713 fi
14714 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14715             LIBS="$cf_save_LIBS"
14716             echo "$as_me:14716: result: $with_pthread" >&5
14717 echo "${ECHO_T}$with_pthread" >&6
14718             test "$with_pthread" = yes && break
14719         done
14720
14721         if test "$with_pthread" = yes ; then
14722
14723 cf_add_libs="$LIBS"
14724 # reverse order
14725 cf_add_0lib=
14726 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14727 # filter duplicates
14728 for cf_add_1lib in $cf_add_0lib; do
14729         for cf_add_2lib in $cf_add_libs; do
14730                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14731                         cf_add_1lib=
14732                         break
14733                 fi
14734         done
14735         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14736 done
14737 LIBS="$cf_add_libs"
14738
14739 cat >>confdefs.h <<\EOF
14740 #define HAVE_LIBPTHREADS 1
14741 EOF
14742
14743         else
14744             { { echo "$as_me:14744: error: Cannot link with pthread library" >&5
14745 echo "$as_me: error: Cannot link with pthread library" >&2;}
14746    { (exit 1); exit 1; }; }
14747         fi
14748
14749 fi
14750
14751 fi
14752
14753 if test "x$with_pthread" != xno; then
14754         echo "$as_me:14754: checking for pthread_kill" >&5
14755 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14756 if test "${ac_cv_func_pthread_kill+set}" = set; then
14757   echo $ECHO_N "(cached) $ECHO_C" >&6
14758 else
14759   cat >conftest.$ac_ext <<_ACEOF
14760 #line 14760 "configure"
14761 #include "confdefs.h"
14762 #define pthread_kill autoconf_temporary
14763 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14764 #undef pthread_kill
14765
14766 #ifdef __cplusplus
14767 extern "C"
14768 #endif
14769
14770 /* We use char because int might match the return type of a gcc2
14771    builtin and then its argument prototype would still apply.  */
14772 char pthread_kill (void);
14773
14774 int
14775 main (void)
14776 {
14777
14778 /* The GNU C library defines stubs for functions which it implements
14779     to always fail with ENOSYS.  Some functions are actually named
14780     something starting with __ and the normal name is an alias.  */
14781 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14782 #error found stub for pthread_kill
14783 #endif
14784
14785         return pthread_kill ();
14786   ;
14787   return 0;
14788 }
14789 _ACEOF
14790 rm -f conftest.$ac_objext conftest$ac_exeext
14791 if { (eval echo "$as_me:14791: \"$ac_link\"") >&5
14792   (eval $ac_link) 2>&5
14793   ac_status=$?
14794   echo "$as_me:14794: \$? = $ac_status" >&5
14795   (exit $ac_status); } &&
14796          { ac_try='test -s conftest$ac_exeext'
14797   { (eval echo "$as_me:14797: \"$ac_try\"") >&5
14798   (eval $ac_try) 2>&5
14799   ac_status=$?
14800   echo "$as_me:14800: \$? = $ac_status" >&5
14801   (exit $ac_status); }; }; then
14802   ac_cv_func_pthread_kill=yes
14803 else
14804   echo "$as_me: failed program was:" >&5
14805 cat conftest.$ac_ext >&5
14806 ac_cv_func_pthread_kill=no
14807 fi
14808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14809 fi
14810 echo "$as_me:14810: result: $ac_cv_func_pthread_kill" >&5
14811 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14812 if test $ac_cv_func_pthread_kill = yes; then
14813
14814                 echo "$as_me:14814: checking if you want to allow EINTR in wgetch with pthreads" >&5
14815 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14816
14817 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14818 if test "${enable_pthreads_eintr+set}" = set; then
14819   enableval="$enable_pthreads_eintr"
14820   use_pthreads_eintr=$enableval
14821 else
14822   use_pthreads_eintr=no
14823 fi;
14824                 echo "$as_me:14824: result: $use_pthreads_eintr" >&5
14825 echo "${ECHO_T}$use_pthreads_eintr" >&6
14826                 if test "x$use_pthreads_eintr" = xyes ; then
14827
14828 cat >>confdefs.h <<\EOF
14829 #define USE_PTHREADS_EINTR 1
14830 EOF
14831
14832                 fi
14833 fi
14834
14835         echo "$as_me:14835: checking if you want to use weak-symbols for pthreads" >&5
14836 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14837
14838 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14839 if test "${enable_weak_symbols+set}" = set; then
14840   enableval="$enable_weak_symbols"
14841   use_weak_symbols=$enableval
14842 else
14843   use_weak_symbols=no
14844 fi;
14845         echo "$as_me:14845: result: $use_weak_symbols" >&5
14846 echo "${ECHO_T}$use_weak_symbols" >&6
14847         if test "x$use_weak_symbols" = xyes ; then
14848
14849 echo "$as_me:14849: checking if $CC supports weak symbols" >&5
14850 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14851 if test "${cf_cv_weak_symbols+set}" = set; then
14852   echo $ECHO_N "(cached) $ECHO_C" >&6
14853 else
14854
14855 cat >conftest.$ac_ext <<_ACEOF
14856 #line 14856 "configure"
14857 #include "confdefs.h"
14858
14859 #include <stdio.h>
14860 int
14861 main (void)
14862 {
14863
14864 #if defined(__GNUC__)
14865 #  if defined __USE_ISOC99
14866 #    define _cat_pragma(exp)    _Pragma(#exp)
14867 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14868 #  else
14869 #    define _weak_pragma(exp)
14870 #  endif
14871 #  define _declare(name)        __extension__ extern __typeof__(name) name
14872 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14873 #endif
14874
14875 weak_symbol(fopen);
14876
14877   ;
14878   return 0;
14879 }
14880 _ACEOF
14881 rm -f conftest.$ac_objext
14882 if { (eval echo "$as_me:14882: \"$ac_compile\"") >&5
14883   (eval $ac_compile) 2>&5
14884   ac_status=$?
14885   echo "$as_me:14885: \$? = $ac_status" >&5
14886   (exit $ac_status); } &&
14887          { ac_try='test -s conftest.$ac_objext'
14888   { (eval echo "$as_me:14888: \"$ac_try\"") >&5
14889   (eval $ac_try) 2>&5
14890   ac_status=$?
14891   echo "$as_me:14891: \$? = $ac_status" >&5
14892   (exit $ac_status); }; }; then
14893   cf_cv_weak_symbols=yes
14894 else
14895   echo "$as_me: failed program was:" >&5
14896 cat conftest.$ac_ext >&5
14897 cf_cv_weak_symbols=no
14898 fi
14899 rm -f conftest.$ac_objext conftest.$ac_ext
14900
14901 fi
14902 echo "$as_me:14902: result: $cf_cv_weak_symbols" >&5
14903 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14904
14905         else
14906                 cf_cv_weak_symbols=no
14907         fi
14908
14909         if test "x$cf_cv_weak_symbols" = xyes ; then
14910
14911 cat >>confdefs.h <<\EOF
14912 #define USE_WEAK_SYMBOLS 1
14913 EOF
14914
14915         fi
14916 fi
14917
14918 PTHREAD=
14919 if test "x$with_pthread" = "xyes" ; then
14920
14921 cat >>confdefs.h <<\EOF
14922 #define USE_PTHREADS 1
14923 EOF
14924
14925         enable_reentrant=yes
14926         if test "x$cf_cv_weak_symbols" = xyes ; then
14927                 PTHREAD=-lpthread
14928
14929 cf_add_libs="$PRIVATE_LIBS"
14930 # reverse order
14931 cf_add_0lib=
14932 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14933 # filter duplicates
14934 for cf_add_1lib in $cf_add_0lib; do
14935         for cf_add_2lib in $cf_add_libs; do
14936                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14937                         cf_add_1lib=
14938                         break
14939                 fi
14940         done
14941         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14942 done
14943 PRIVATE_LIBS="$cf_add_libs"
14944
14945         fi
14946 fi
14947
14948 # Reentrant code has to be opaque; there's little advantage to making ncurses
14949 # opaque outside of that, so there is no --enable-opaque option.  We can use
14950 # this option without --with-pthreads, but this will be always set for
14951 # pthreads.
14952 echo "$as_me:14952: checking if you want reentrant code" >&5
14953 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14954
14955 # Check whether --enable-reentrant or --disable-reentrant was given.
14956 if test "${enable_reentrant+set}" = set; then
14957   enableval="$enable_reentrant"
14958   with_reentrant=$enableval
14959 else
14960   with_reentrant=no
14961 fi;
14962 echo "$as_me:14962: result: $with_reentrant" >&5
14963 echo "${ECHO_T}$with_reentrant" >&6
14964 if test "x$with_reentrant" = xyes ; then
14965         cf_cv_enable_reentrant=1
14966         cf_cv_enable_opaque="NCURSES_INTERNALS"
14967         NCURSES_SIZE_T=int
14968         if test "x$cf_cv_weak_symbols" = xyes ; then
14969
14970 # remove pthread library from $LIBS
14971 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14972
14973 cf_add_libs="$TEST_LIBS"
14974 # reverse order
14975 cf_add_0lib=
14976 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14977 # filter duplicates
14978 for cf_add_1lib in $cf_add_0lib; do
14979         for cf_add_2lib in $cf_add_libs; do
14980                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14981                         cf_add_1lib=
14982                         break
14983                 fi
14984         done
14985         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14986 done
14987 TEST_LIBS="$cf_add_libs"
14988
14989 cf_add_libs="$TEST_LIBS2"
14990 # reverse order
14991 cf_add_0lib=
14992 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14993 # filter duplicates
14994 for cf_add_1lib in $cf_add_0lib; do
14995         for cf_add_2lib in $cf_add_libs; do
14996                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14997                         cf_add_1lib=
14998                         break
14999                 fi
15000         done
15001         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15002 done
15003 TEST_LIBS2="$cf_add_libs"
15004
15005 cf_add_libs="$PRIVATE_LIBS"
15006 # reverse order
15007 cf_add_0lib=
15008 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15009 # filter duplicates
15010 for cf_add_1lib in $cf_add_0lib; do
15011         for cf_add_2lib in $cf_add_libs; do
15012                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15013                         cf_add_1lib=
15014                         break
15015                 fi
15016         done
15017         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15018 done
15019 PRIVATE_LIBS="$cf_add_libs"
15020
15021         else
15022                 # when not using weak symbols but with_reentrant,
15023                 # add 't' to the library suffix on all platforms
15024                 # except cygwin, where we only do that if ALSO
15025                 # compiling with full thread support.
15026                 case "$host" in
15027                 (*cygwin* | *msys*)
15028                         if test "$with_pthread" = "yes" ; then
15029                                 if test "x$disable_lib_suffixes" = "xno" ; then
15030                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15031                                 fi
15032                         fi ;;
15033                 (*)
15034                         if test "x$disable_lib_suffixes" = "xno" ; then
15035                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15036                         fi
15037                         ;;
15038                 esac
15039         fi
15040
15041 cat >>confdefs.h <<\EOF
15042 #define USE_REENTRANT 1
15043 EOF
15044
15045 if test "${with_abi_version+set}" != set; then
15046         case $cf_cv_rel_version in
15047         (5.*)
15048                 cf_cv_rel_version=6.0
15049                 cf_cv_abi_version=6
15050                 { echo "$as_me:15050: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15051 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15052                 ;;
15053         esac
15054 fi
15055
15056 else
15057         cf_cv_enable_reentrant=0
15058         cf_cv_enable_opaque="NCURSES_OPAQUE"
15059         NCURSES_SIZE_T=short
15060 fi
15061
15062 echo "$as_me:15062: checking if you want opaque curses-library structures" >&5
15063 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15064
15065 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15066 if test "${enable_opaque_curses+set}" = set; then
15067   enableval="$enable_opaque_curses"
15068   test "$enableval" != yes && enableval=no
15069         if test "$enableval" != "no" ; then
15070     enable_opaque_curses=yes
15071         else
15072
15073          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15074          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15075
15076         fi
15077 else
15078   enableval=no
15079
15080          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15081          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15082
15083 fi;
15084 echo "$as_me:15084: result: $enable_opaque_curses" >&5
15085 echo "${ECHO_T}$enable_opaque_curses" >&6
15086
15087 test "$cf_cv_enable_reentrant" = 1 && \
15088 test "$enable_opaque_curses" = no && \
15089 { { echo "$as_me:15089: error: reentrant configuration requires opaque library" >&5
15090 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15091    { (exit 1); exit 1; }; }
15092
15093 echo "$as_me:15093: checking if you want opaque form-library structures" >&5
15094 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15095
15096 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15097 if test "${enable_opaque_form+set}" = set; then
15098   enableval="$enable_opaque_form"
15099   enable_opaque_form=yes
15100 else
15101   enable_opaque_form=no
15102 fi;
15103 echo "$as_me:15103: result: $enable_opaque_form" >&5
15104 echo "${ECHO_T}$enable_opaque_form" >&6
15105
15106 echo "$as_me:15106: checking if you want opaque menu-library structures" >&5
15107 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15108
15109 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15110 if test "${enable_opaque_menu+set}" = set; then
15111   enableval="$enable_opaque_menu"
15112   enable_opaque_menu=yes
15113 else
15114   enable_opaque_menu=no
15115 fi;
15116 echo "$as_me:15116: result: $enable_opaque_menu" >&5
15117 echo "${ECHO_T}$enable_opaque_menu" >&6
15118
15119 echo "$as_me:15119: checking if you want opaque panel-library structures" >&5
15120 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15121
15122 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15123 if test "${enable_opaque_panel+set}" = set; then
15124   enableval="$enable_opaque_panel"
15125   enable_opaque_panel=yes
15126 else
15127   enable_opaque_panel=no
15128 fi;
15129 echo "$as_me:15129: result: $enable_opaque_panel" >&5
15130 echo "${ECHO_T}$enable_opaque_panel" >&6
15131
15132 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15133 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15134 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15135 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15136
15137 ### Allow using a different wrap-prefix
15138 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15139         echo "$as_me:15139: checking for prefix used to wrap public variables" >&5
15140 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15141
15142 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15143 if test "${with_wrap_prefix+set}" = set; then
15144   withval="$with_wrap_prefix"
15145   NCURSES_WRAP_PREFIX=$withval
15146 else
15147   NCURSES_WRAP_PREFIX=_nc_
15148 fi;
15149         echo "$as_me:15149: result: $NCURSES_WRAP_PREFIX" >&5
15150 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15151 else
15152         NCURSES_WRAP_PREFIX=_nc_
15153 fi
15154
15155 cat >>confdefs.h <<EOF
15156 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15157 EOF
15158
15159 ###############################################################################
15160 # These options are relatively safe to experiment with.
15161
15162 echo "$as_me:15162: checking if you want all development code" >&5
15163 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15164
15165 # Check whether --with-develop or --without-develop was given.
15166 if test "${with_develop+set}" = set; then
15167   withval="$with_develop"
15168   with_develop=$withval
15169 else
15170   with_develop=no
15171 fi;
15172 echo "$as_me:15172: result: $with_develop" >&5
15173 echo "${ECHO_T}$with_develop" >&6
15174
15175 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15176 echo "$as_me:15176: checking if you want hard-tabs code" >&5
15177 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15178
15179 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15180 if test "${enable_hard_tabs+set}" = set; then
15181   enableval="$enable_hard_tabs"
15182
15183 else
15184   enable_hard_tabs=$with_develop
15185 fi;
15186 echo "$as_me:15186: result: $enable_hard_tabs" >&5
15187 echo "${ECHO_T}$enable_hard_tabs" >&6
15188 test "x$enable_hard_tabs" = xyes &&
15189 cat >>confdefs.h <<\EOF
15190 #define USE_HARD_TABS 1
15191 EOF
15192
15193 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15194 echo "$as_me:15194: checking if you want limited support for xmc" >&5
15195 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15196
15197 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15198 if test "${enable_xmc_glitch+set}" = set; then
15199   enableval="$enable_xmc_glitch"
15200
15201 else
15202   enable_xmc_glitch=$with_develop
15203 fi;
15204 echo "$as_me:15204: result: $enable_xmc_glitch" >&5
15205 echo "${ECHO_T}$enable_xmc_glitch" >&6
15206 test "x$enable_xmc_glitch" = xyes &&
15207 cat >>confdefs.h <<\EOF
15208 #define USE_XMC_SUPPORT 1
15209 EOF
15210
15211 ###############################################################################
15212 # These are just experimental, probably should not be in a package:
15213
15214 echo "$as_me:15214: checking if you do not want to assume colors are white-on-black" >&5
15215 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15216
15217 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15218 if test "${enable_assumed_color+set}" = set; then
15219   enableval="$enable_assumed_color"
15220   with_assumed_color=$enableval
15221 else
15222   with_assumed_color=yes
15223 fi;
15224 echo "$as_me:15224: result: $with_assumed_color" >&5
15225 echo "${ECHO_T}$with_assumed_color" >&6
15226 test "x$with_assumed_color" = xyes &&
15227 cat >>confdefs.h <<\EOF
15228 #define USE_ASSUMED_COLOR 1
15229 EOF
15230
15231 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15232 echo "$as_me:15232: checking if you want hashmap scrolling-optimization code" >&5
15233 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15234
15235 # Check whether --enable-hashmap or --disable-hashmap was given.
15236 if test "${enable_hashmap+set}" = set; then
15237   enableval="$enable_hashmap"
15238   with_hashmap=$enableval
15239 else
15240   with_hashmap=yes
15241 fi;
15242 echo "$as_me:15242: result: $with_hashmap" >&5
15243 echo "${ECHO_T}$with_hashmap" >&6
15244 test "x$with_hashmap" = xyes &&
15245 cat >>confdefs.h <<\EOF
15246 #define USE_HASHMAP 1
15247 EOF
15248
15249 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15250 echo "$as_me:15250: checking if you want colorfgbg code" >&5
15251 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15252
15253 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15254 if test "${enable_colorfgbg+set}" = set; then
15255   enableval="$enable_colorfgbg"
15256   with_colorfgbg=$enableval
15257 else
15258   with_colorfgbg=no
15259 fi;
15260 echo "$as_me:15260: result: $with_colorfgbg" >&5
15261 echo "${ECHO_T}$with_colorfgbg" >&6
15262 test "x$with_colorfgbg" = xyes &&
15263 cat >>confdefs.h <<\EOF
15264 #define USE_COLORFGBG 1
15265 EOF
15266
15267 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15268 echo "$as_me:15268: checking if you want to use gcc -fvisibility option" >&5
15269 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15270
15271 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15272 if test "${enable_fvisibility+set}" = set; then
15273   enableval="$enable_fvisibility"
15274   cf_with_fvisibility=$enableval
15275 else
15276   cf_with_fvisibility=no
15277 fi;
15278 echo "$as_me:15278: result: $cf_with_fvisibility" >&5
15279 echo "${ECHO_T}$cf_with_fvisibility" >&6
15280
15281 NCURSES_IMPEXP=
15282 NCURSES_CXX_IMPEXP=
15283 if test "x$cf_with_fvisibility" = xyes; then
15284
15285 echo "$as_me:15285: checking if $CC -fvisibility=hidden option works" >&5
15286 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15287 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15288   echo $ECHO_N "(cached) $ECHO_C" >&6
15289 else
15290
15291     cf_save_cflags="$CFLAGS"
15292     CFLAGS="$CFLAGS -fvisibility=hidden"
15293     cat >conftest.$ac_ext <<_ACEOF
15294 #line 15294 "configure"
15295 #include "confdefs.h"
15296
15297 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15298
15299 int
15300 main (void)
15301 {
15302
15303         if (somefunc()) return 1;
15304
15305   ;
15306   return 0;
15307 }
15308 _ACEOF
15309 rm -f conftest.$ac_objext conftest$ac_exeext
15310 if { (eval echo "$as_me:15310: \"$ac_link\"") >&5
15311   (eval $ac_link) 2>&5
15312   ac_status=$?
15313   echo "$as_me:15313: \$? = $ac_status" >&5
15314   (exit $ac_status); } &&
15315          { ac_try='test -s conftest$ac_exeext'
15316   { (eval echo "$as_me:15316: \"$ac_try\"") >&5
15317   (eval $ac_try) 2>&5
15318   ac_status=$?
15319   echo "$as_me:15319: \$? = $ac_status" >&5
15320   (exit $ac_status); }; }; then
15321   cf_cv_fvisibility_hidden=yes
15322 else
15323   echo "$as_me: failed program was:" >&5
15324 cat conftest.$ac_ext >&5
15325 cf_cv_fvisibility_hidden=no
15326 fi
15327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15328     CFLAGS=$cf_save_cflags
15329
15330 fi
15331 echo "$as_me:15331: result: $cf_cv_fvisibility_hidden" >&5
15332 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15333
15334         if test "x$cf_cv_fvisibility_hidden" = xyes
15335         then
15336
15337 cf_fix_cppflags=no
15338 cf_new_cflags=
15339 cf_new_cppflags=
15340 cf_new_extra_cppflags=
15341
15342 for cf_add_cflags in -fvisibility=hidden
15343 do
15344 case $cf_fix_cppflags in
15345 (no)
15346         case $cf_add_cflags in
15347         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15348                 case $cf_add_cflags in
15349                 (-D*)
15350                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15351
15352                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15353                                 && test -z "${cf_tst_cflags}" \
15354                                 && cf_fix_cppflags=yes
15355
15356                         if test $cf_fix_cppflags = yes ; then
15357
15358         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15359         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15360
15361                                 continue
15362                         elif test "${cf_tst_cflags}" = "\"'" ; then
15363
15364         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15365         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15366
15367                                 continue
15368                         fi
15369                         ;;
15370                 esac
15371                 case "$CPPFLAGS" in
15372                 (*$cf_add_cflags)
15373                         ;;
15374                 (*)
15375                         case $cf_add_cflags in
15376                         (-D*)
15377                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15378
15379 CPPFLAGS=`echo "$CPPFLAGS" | \
15380         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15381                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15382
15383                                 ;;
15384                         esac
15385
15386         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15387         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15388
15389                         ;;
15390                 esac
15391                 ;;
15392         (*)
15393
15394         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15395         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15396
15397                 ;;
15398         esac
15399         ;;
15400 (yes)
15401
15402         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15403         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15404
15405         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15406
15407         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15408                 && test -z "${cf_tst_cflags}" \
15409                 && cf_fix_cppflags=no
15410         ;;
15411 esac
15412 done
15413
15414 if test -n "$cf_new_cflags" ; then
15415
15416         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15417         CFLAGS="${CFLAGS}$cf_new_cflags"
15418
15419 fi
15420
15421 if test -n "$cf_new_cppflags" ; then
15422
15423         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15424         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15425
15426 fi
15427
15428 if test -n "$cf_new_extra_cppflags" ; then
15429
15430         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15431         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15432
15433 fi
15434
15435                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15436         fi
15437         if test -n "$CXX"
15438         then
15439                 ac_ext=cc
15440 ac_cpp='$CXXCPP $CPPFLAGS'
15441 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15442 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15443 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15444 ac_main_return=return
15445
15446 echo "$as_me:15446: checking if $CXX -fvisibility=hidden option works" >&5
15447 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15448 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15449   echo $ECHO_N "(cached) $ECHO_C" >&6
15450 else
15451
15452     cf_save_cflags="$CXXFLAGS"
15453     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15454     cat >conftest.$ac_ext <<_ACEOF
15455 #line 15455 "configure"
15456 #include "confdefs.h"
15457
15458 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15459
15460 int
15461 main (void)
15462 {
15463
15464         if (somefunc()) return 1;
15465
15466   ;
15467   return 0;
15468 }
15469 _ACEOF
15470 rm -f conftest.$ac_objext conftest$ac_exeext
15471 if { (eval echo "$as_me:15471: \"$ac_link\"") >&5
15472   (eval $ac_link) 2>&5
15473   ac_status=$?
15474   echo "$as_me:15474: \$? = $ac_status" >&5
15475   (exit $ac_status); } &&
15476          { ac_try='test -s conftest$ac_exeext'
15477   { (eval echo "$as_me:15477: \"$ac_try\"") >&5
15478   (eval $ac_try) 2>&5
15479   ac_status=$?
15480   echo "$as_me:15480: \$? = $ac_status" >&5
15481   (exit $ac_status); }; }; then
15482   cf_cv_fvisibility_hidden2=yes
15483 else
15484   echo "$as_me: failed program was:" >&5
15485 cat conftest.$ac_ext >&5
15486 cf_cv_fvisibility_hidden2=no
15487 fi
15488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15489     CXXFLAGS=$cf_save_cflags
15490
15491 fi
15492 echo "$as_me:15492: result: $cf_cv_fvisibility_hidden2" >&5
15493 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15494
15495                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15496                 then
15497
15498 cf_save_CXXFLAGS="$CFLAGS"
15499 CFLAGS="$CXXFLAGS"
15500
15501 cf_fix_cppflags=no
15502 cf_new_cflags=
15503 cf_new_cppflags=
15504 cf_new_extra_cppflags=
15505
15506 for cf_add_cflags in -fvisibility=hidden
15507 do
15508 case $cf_fix_cppflags in
15509 (no)
15510         case $cf_add_cflags in
15511         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15512                 case $cf_add_cflags in
15513                 (-D*)
15514                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15515
15516                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15517                                 && test -z "${cf_tst_cflags}" \
15518                                 && cf_fix_cppflags=yes
15519
15520                         if test $cf_fix_cppflags = yes ; then
15521
15522         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15523         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15524
15525                                 continue
15526                         elif test "${cf_tst_cflags}" = "\"'" ; then
15527
15528         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15529         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15530
15531                                 continue
15532                         fi
15533                         ;;
15534                 esac
15535                 case "$CPPFLAGS" in
15536                 (*$cf_add_cflags)
15537                         ;;
15538                 (*)
15539                         case $cf_add_cflags in
15540                         (-D*)
15541                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15542
15543 CPPFLAGS=`echo "$CPPFLAGS" | \
15544         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15545                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15546
15547                                 ;;
15548                         esac
15549
15550         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15551         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15552
15553                         ;;
15554                 esac
15555                 ;;
15556         (*)
15557
15558         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15559         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15560
15561                 ;;
15562         esac
15563         ;;
15564 (yes)
15565
15566         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15567         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15568
15569         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15570
15571         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15572                 && test -z "${cf_tst_cflags}" \
15573                 && cf_fix_cppflags=no
15574         ;;
15575 esac
15576 done
15577
15578 if test -n "$cf_new_cflags" ; then
15579
15580         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15581         CFLAGS="${CFLAGS}$cf_new_cflags"
15582
15583 fi
15584
15585 if test -n "$cf_new_cppflags" ; then
15586
15587         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15588         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15589
15590 fi
15591
15592 if test -n "$cf_new_extra_cppflags" ; then
15593
15594         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15595         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15596
15597 fi
15598
15599 CXXFLAGS="$CFLAGS"
15600 CFLAGS="$cf_save_CXXFLAGS"
15601
15602                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15603                 fi
15604                 ac_ext=c
15605 ac_cpp='$CPP $CPPFLAGS'
15606 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15607 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15608 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15609 ac_main_return=return
15610
15611         fi
15612 fi
15613
15614 ###   use option --enable-interop to turn on use of bindings used for interop
15615 echo "$as_me:15615: checking if you want interop bindings" >&5
15616 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15617
15618 # Check whether --enable-interop or --disable-interop was given.
15619 if test "${enable_interop+set}" = set; then
15620   enableval="$enable_interop"
15621   with_exp_interop=$enableval
15622 else
15623   with_exp_interop=$cf_dft_interop
15624 fi;
15625 echo "$as_me:15625: result: $with_exp_interop" >&5
15626 echo "${ECHO_T}$with_exp_interop" >&6
15627
15628 NCURSES_INTEROP_FUNCS=0
15629 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15630
15631 echo "$as_me:15631: checking if you want experimental safe-sprintf code" >&5
15632 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15633
15634 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15635 if test "${enable_safe_sprintf+set}" = set; then
15636   enableval="$enable_safe_sprintf"
15637   with_safe_sprintf=$enableval
15638 else
15639   with_safe_sprintf=no
15640 fi;
15641 echo "$as_me:15641: result: $with_safe_sprintf" >&5
15642 echo "${ECHO_T}$with_safe_sprintf" >&6
15643
15644 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15645 # when hashmap is used scroll hints are useless
15646 if test "$with_hashmap" = no ; then
15647 echo "$as_me:15647: checking if you want to experiment without scrolling-hints code" >&5
15648 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15649
15650 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15651 if test "${enable_scroll_hints+set}" = set; then
15652   enableval="$enable_scroll_hints"
15653   with_scroll_hints=$enableval
15654 else
15655   with_scroll_hints=yes
15656 fi;
15657 echo "$as_me:15657: result: $with_scroll_hints" >&5
15658 echo "${ECHO_T}$with_scroll_hints" >&6
15659 test "x$with_scroll_hints" = xyes &&
15660 cat >>confdefs.h <<\EOF
15661 #define USE_SCROLL_HINTS 1
15662 EOF
15663
15664 fi
15665
15666 echo "$as_me:15666: checking if you want wgetch-events code" >&5
15667 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15668
15669 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15670 if test "${enable_wgetch_events+set}" = set; then
15671   enableval="$enable_wgetch_events"
15672   with_wgetch_events=$enableval
15673 else
15674   with_wgetch_events=no
15675 fi;
15676 echo "$as_me:15676: result: $with_wgetch_events" >&5
15677 echo "${ECHO_T}$with_wgetch_events" >&6
15678 test "x$with_wgetch_events" = xyes &&
15679 cat >>confdefs.h <<\EOF
15680 #define NCURSES_WGETCH_EVENTS 1
15681 EOF
15682
15683 ###############################################################################
15684
15685 ###     use option --disable-echo to suppress full display compiling commands
15686
15687 echo "$as_me:15687: checking if you want to see long compiling messages" >&5
15688 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15689
15690 # Check whether --enable-echo or --disable-echo was given.
15691 if test "${enable_echo+set}" = set; then
15692   enableval="$enable_echo"
15693   test "$enableval" != no && enableval=yes
15694         if test "$enableval" != "yes" ; then
15695
15696         ECHO_LT='--silent'
15697         ECHO_LD='@echo linking $@;'
15698         RULE_CC='@echo compiling $<'
15699         SHOW_CC='@echo compiling $@'
15700         ECHO_CC='@'
15701
15702         else
15703
15704         ECHO_LT=''
15705         ECHO_LD=''
15706         RULE_CC=''
15707         SHOW_CC=''
15708         ECHO_CC=''
15709
15710         fi
15711 else
15712   enableval=yes
15713
15714         ECHO_LT=''
15715         ECHO_LD=''
15716         RULE_CC=''
15717         SHOW_CC=''
15718         ECHO_CC=''
15719
15720 fi;
15721 echo "$as_me:15721: result: $enableval" >&5
15722 echo "${ECHO_T}$enableval" >&6
15723
15724 if test "x$enable_echo" = xyes; then
15725         ECHO_LINK=
15726 else
15727         ECHO_LINK='@ echo linking $@ ... ;'
15728         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15729         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15730 fi
15731
15732 # --disable-stripping is used for debugging
15733
15734 echo "$as_me:15734: checking if you want to install stripped executables" >&5
15735 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15736
15737 # Check whether --enable-stripping or --disable-stripping was given.
15738 if test "${enable_stripping+set}" = set; then
15739   enableval="$enable_stripping"
15740   test "$enableval" != no && enableval=yes
15741         if test "$enableval" != "yes" ; then
15742     with_stripping=no
15743         else
15744                 with_stripping=yes
15745         fi
15746 else
15747   enableval=yes
15748         with_stripping=yes
15749
15750 fi;
15751 echo "$as_me:15751: result: $with_stripping" >&5
15752 echo "${ECHO_T}$with_stripping" >&6
15753
15754 if test "$with_stripping" = yes
15755 then
15756         INSTALL_OPT_S="-s"
15757 else
15758         INSTALL_OPT_S=
15759 fi
15760
15761 : ${INSTALL:=install}
15762 echo "$as_me:15762: checking if install accepts -p option" >&5
15763 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15764 if test "${cf_cv_install_p+set}" = set; then
15765   echo $ECHO_N "(cached) $ECHO_C" >&6
15766 else
15767
15768         rm -rf conftest*
15769         date >conftest.in
15770         mkdir conftest.out
15771         sleep 3
15772         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15773         then
15774                 if test -f conftest.out/conftest.in
15775                 then
15776                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15777                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15778                         if test -s conftest.err
15779                         then
15780                                 cf_cv_install_p=no
15781                         else
15782                                 cf_cv_install_p=yes
15783                         fi
15784                 else
15785                         cf_cv_install_p=no
15786                 fi
15787         else
15788                 cf_cv_install_p=no
15789         fi
15790         rm -rf conftest*
15791
15792 fi
15793 echo "$as_me:15793: result: $cf_cv_install_p" >&5
15794 echo "${ECHO_T}$cf_cv_install_p" >&6
15795
15796 echo "$as_me:15796: checking if install needs to be told about ownership" >&5
15797 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15798 case `$ac_config_guess` in
15799 (*minix)
15800         with_install_o=yes
15801         ;;
15802 (*)
15803         with_install_o=no
15804         ;;
15805 esac
15806
15807 echo "$as_me:15807: result: $with_install_o" >&5
15808 echo "${ECHO_T}$with_install_o" >&6
15809 if test "x$with_install_o" = xyes
15810 then
15811         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'`
15812 else
15813         INSTALL_OPT_O=
15814 fi
15815
15816 # If we're avoiding relinking of shared libraries during install, that is to
15817 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15818 # the install program has "-p" (for preserving timestamps).
15819 cf_cv_do_reranlib=yes
15820 if test "x$cf_cv_install_p" = xyes
15821 then
15822         if test "x$cf_cv_do_relink" != xyes
15823         then
15824                 cf_cv_do_reranlib=no
15825                 INSTALL_OPT_P="-p"
15826                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15827         fi
15828 fi
15829
15830 ###     use option --enable-warnings to turn on all gcc warnings
15831 echo "$as_me:15831: checking if you want to see compiler warnings" >&5
15832 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15833
15834 # Check whether --enable-warnings or --disable-warnings was given.
15835 if test "${enable_warnings+set}" = set; then
15836   enableval="$enable_warnings"
15837   with_warnings=$enableval
15838 fi;
15839 echo "$as_me:15839: result: $with_warnings" >&5
15840 echo "${ECHO_T}$with_warnings" >&6
15841
15842 if test "x$with_warnings" = "xyes"; then
15843
15844         ADAFLAGS="$ADAFLAGS -gnatg"
15845
15846 if test "x$have_x" = xyes; then
15847
15848 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15849 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15850 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15851 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15852 for cf_X_CFLAGS in $X_CFLAGS
15853 do
15854         case "x$cf_X_CFLAGS" in
15855         x-[IUD]*)
15856                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15857                 ;;
15858         *)
15859                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15860                 ;;
15861         esac
15862 done
15863
15864 cat >conftest.$ac_ext <<_ACEOF
15865 #line 15865 "configure"
15866 #include "confdefs.h"
15867
15868 #include <stdlib.h>
15869 #include <X11/Intrinsic.h>
15870
15871 int
15872 main (void)
15873 {
15874 String foo = malloc(1); (void)foo
15875   ;
15876   return 0;
15877 }
15878 _ACEOF
15879 rm -f conftest.$ac_objext
15880 if { (eval echo "$as_me:15880: \"$ac_compile\"") >&5
15881   (eval $ac_compile) 2>&5
15882   ac_status=$?
15883   echo "$as_me:15883: \$? = $ac_status" >&5
15884   (exit $ac_status); } &&
15885          { ac_try='test -s conftest.$ac_objext'
15886   { (eval echo "$as_me:15886: \"$ac_try\"") >&5
15887   (eval $ac_try) 2>&5
15888   ac_status=$?
15889   echo "$as_me:15889: \$? = $ac_status" >&5
15890   (exit $ac_status); }; }; then
15891
15892 echo "$as_me:15892: checking for X11/Xt const-feature" >&5
15893 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15894 if test "${cf_cv_const_x_string+set}" = set; then
15895   echo $ECHO_N "(cached) $ECHO_C" >&6
15896 else
15897
15898         cat >conftest.$ac_ext <<_ACEOF
15899 #line 15899 "configure"
15900 #include "confdefs.h"
15901
15902 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15903 #undef  XTSTRINGDEFINES /* X11R5 and later */
15904 #include <stdlib.h>
15905 #include <X11/Intrinsic.h>
15906
15907 int
15908 main (void)
15909 {
15910 String foo = malloc(1); *foo = 0
15911   ;
15912   return 0;
15913 }
15914 _ACEOF
15915 rm -f conftest.$ac_objext
15916 if { (eval echo "$as_me:15916: \"$ac_compile\"") >&5
15917   (eval $ac_compile) 2>&5
15918   ac_status=$?
15919   echo "$as_me:15919: \$? = $ac_status" >&5
15920   (exit $ac_status); } &&
15921          { ac_try='test -s conftest.$ac_objext'
15922   { (eval echo "$as_me:15922: \"$ac_try\"") >&5
15923   (eval $ac_try) 2>&5
15924   ac_status=$?
15925   echo "$as_me:15925: \$? = $ac_status" >&5
15926   (exit $ac_status); }; }; then
15927
15928                         cf_cv_const_x_string=no
15929
15930 else
15931   echo "$as_me: failed program was:" >&5
15932 cat conftest.$ac_ext >&5
15933
15934                         cf_cv_const_x_string=yes
15935
15936 fi
15937 rm -f conftest.$ac_objext conftest.$ac_ext
15938
15939 fi
15940 echo "$as_me:15940: result: $cf_cv_const_x_string" >&5
15941 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15942
15943 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15944 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15945 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15946
15947 case $cf_cv_const_x_string in
15948 (no)
15949
15950         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15951         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15952
15953         ;;
15954 (*)
15955
15956         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15957         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15958
15959         ;;
15960 esac
15961
15962 else
15963   echo "$as_me: failed program was:" >&5
15964 cat conftest.$ac_ext >&5
15965 fi
15966 rm -f conftest.$ac_objext conftest.$ac_ext
15967  fi
15968 cat > conftest.$ac_ext <<EOF
15969 #line 15969 "${as_me:-configure}"
15970 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15971 EOF
15972 if test "$INTEL_COMPILER" = yes
15973 then
15974 # The "-wdXXX" options suppress warnings:
15975 # remark #1419: external declaration in primary source file
15976 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15977 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15978 # remark #193: zero used for undefined preprocessing identifier
15979 # remark #593: variable "curs_sb_left_arrow" was set but never used
15980 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15981 # remark #869: parameter "tw" was never referenced
15982 # remark #981: operands are evaluated in unspecified order
15983 # warning #279: controlling expression is constant
15984
15985         { echo "$as_me:15985: checking for $CC warning options..." >&5
15986 echo "$as_me: checking for $CC warning options..." >&6;}
15987         cf_save_CFLAGS="$CFLAGS"
15988         EXTRA_CFLAGS="-Wall"
15989         for cf_opt in \
15990                 wd1419 \
15991                 wd1683 \
15992                 wd1684 \
15993                 wd193 \
15994                 wd593 \
15995                 wd279 \
15996                 wd810 \
15997                 wd869 \
15998                 wd981
15999         do
16000                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16001                 if { (eval echo "$as_me:16001: \"$ac_compile\"") >&5
16002   (eval $ac_compile) 2>&5
16003   ac_status=$?
16004   echo "$as_me:16004: \$? = $ac_status" >&5
16005   (exit $ac_status); }; then
16006                         test -n "$verbose" && echo "$as_me:16006: result: ... -$cf_opt" >&5
16007 echo "${ECHO_T}... -$cf_opt" >&6
16008                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16009                 fi
16010         done
16011         CFLAGS="$cf_save_CFLAGS"
16012 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16013 then
16014         { echo "$as_me:16014: checking for $CC warning options..." >&5
16015 echo "$as_me: checking for $CC warning options..." >&6;}
16016         cf_save_CFLAGS="$CFLAGS"
16017         EXTRA_CFLAGS=
16018         cf_warn_CONST=""
16019         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16020         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16021         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16022         for cf_opt in W Wall \
16023                 Wbad-function-cast \
16024                 Wcast-align \
16025                 Wcast-qual \
16026                 Wdeclaration-after-statement \
16027                 Wextra \
16028                 Winline \
16029                 Wmissing-declarations \
16030                 Wmissing-prototypes \
16031                 Wnested-externs \
16032                 Wpointer-arith \
16033                 Wshadow \
16034                 Wstrict-prototypes \
16035                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16036         do
16037                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16038                 if { (eval echo "$as_me:16038: \"$ac_compile\"") >&5
16039   (eval $ac_compile) 2>&5
16040   ac_status=$?
16041   echo "$as_me:16041: \$? = $ac_status" >&5
16042   (exit $ac_status); }; then
16043                         test -n "$verbose" && echo "$as_me:16043: result: ... -$cf_opt" >&5
16044 echo "${ECHO_T}... -$cf_opt" >&6
16045                         case $cf_opt in
16046                         (Winline)
16047                                 case $GCC_VERSION in
16048                                 ([34].*)
16049                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16050
16051 echo "${as_me:-configure}:16051: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16052
16053                                         continue;;
16054                                 esac
16055                                 ;;
16056                         (Wpointer-arith)
16057                                 case $GCC_VERSION in
16058                                 ([12].*)
16059                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16060
16061 echo "${as_me:-configure}:16061: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16062
16063                                         continue;;
16064                                 esac
16065                                 ;;
16066                         esac
16067                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16068                 fi
16069         done
16070         CFLAGS="$cf_save_CFLAGS"
16071 fi
16072 rm -rf conftest*
16073
16074         if test "x$cf_with_cxx" = xyes ; then
16075
16076 INTEL_CPLUSPLUS=no
16077
16078 if test "$GCC" = yes ; then
16079         case $host_os in
16080         (linux*|gnu*)
16081                 echo "$as_me:16081: checking if this is really Intel C++ compiler" >&5
16082 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16083                 cf_save_CFLAGS="$CXXFLAGS"
16084                 CXXFLAGS="$CXXFLAGS -no-gcc"
16085                 cat >conftest.$ac_ext <<_ACEOF
16086 #line 16086 "configure"
16087 #include "confdefs.h"
16088
16089 int
16090 main (void)
16091 {
16092
16093 #ifdef __INTEL_COMPILER
16094 #else
16095 make an error
16096 #endif
16097
16098   ;
16099   return 0;
16100 }
16101 _ACEOF
16102 rm -f conftest.$ac_objext
16103 if { (eval echo "$as_me:16103: \"$ac_compile\"") >&5
16104   (eval $ac_compile) 2>&5
16105   ac_status=$?
16106   echo "$as_me:16106: \$? = $ac_status" >&5
16107   (exit $ac_status); } &&
16108          { ac_try='test -s conftest.$ac_objext'
16109   { (eval echo "$as_me:16109: \"$ac_try\"") >&5
16110   (eval $ac_try) 2>&5
16111   ac_status=$?
16112   echo "$as_me:16112: \$? = $ac_status" >&5
16113   (exit $ac_status); }; }; then
16114   INTEL_CPLUSPLUS=yes
16115 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16116
16117 else
16118   echo "$as_me: failed program was:" >&5
16119 cat conftest.$ac_ext >&5
16120 fi
16121 rm -f conftest.$ac_objext conftest.$ac_ext
16122                 CXXFLAGS="$cf_save_CFLAGS"
16123                 echo "$as_me:16123: result: $INTEL_CPLUSPLUS" >&5
16124 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16125                 ;;
16126         esac
16127 fi
16128
16129 CLANG_CPLUSPLUS=no
16130
16131 if test "$GCC" = yes ; then
16132         echo "$as_me:16132: checking if this is really Clang C++ compiler" >&5
16133 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16134         cf_save_CFLAGS="$CXXFLAGS"
16135         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
16136         cat >conftest.$ac_ext <<_ACEOF
16137 #line 16137 "configure"
16138 #include "confdefs.h"
16139
16140 int
16141 main (void)
16142 {
16143
16144 #ifdef __clang__
16145 #else
16146 make an error
16147 #endif
16148
16149   ;
16150   return 0;
16151 }
16152 _ACEOF
16153 rm -f conftest.$ac_objext
16154 if { (eval echo "$as_me:16154: \"$ac_compile\"") >&5
16155   (eval $ac_compile) 2>&5
16156   ac_status=$?
16157   echo "$as_me:16157: \$? = $ac_status" >&5
16158   (exit $ac_status); } &&
16159          { ac_try='test -s conftest.$ac_objext'
16160   { (eval echo "$as_me:16160: \"$ac_try\"") >&5
16161   (eval $ac_try) 2>&5
16162   ac_status=$?
16163   echo "$as_me:16163: \$? = $ac_status" >&5
16164   (exit $ac_status); }; }; then
16165   CLANG_CPLUSPLUS=yes
16166 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16167
16168 else
16169   echo "$as_me: failed program was:" >&5
16170 cat conftest.$ac_ext >&5
16171 fi
16172 rm -f conftest.$ac_objext conftest.$ac_ext
16173         CXXFLAGS="$cf_save_CFLAGS"
16174         echo "$as_me:16174: result: $CLANG_CPLUSPLUS" >&5
16175 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16176 fi
16177
16178 ac_ext=cc
16179 ac_cpp='$CXXCPP $CPPFLAGS'
16180 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16181 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16182 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16183 ac_main_return=return
16184
16185 cat > conftest.$ac_ext <<EOF
16186 #line 16186 "configure"
16187 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16188 EOF
16189
16190 if test "$INTEL_CPLUSPLUS" = yes
16191 then
16192 # The "-wdXXX" options suppress warnings:
16193 # remark #1419: external declaration in primary source file
16194 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16195 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16196 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16197 # remark #193: zero used for undefined preprocessing identifier
16198 # remark #593: variable "curs_sb_left_arrow" was set but never used
16199 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16200 # remark #869: parameter "tw" was never referenced
16201 # remark #981: operands are evaluated in unspecified order
16202 # warning #269: invalid format string conversion
16203
16204         { echo "$as_me:16204: checking for $CC warning options..." >&5
16205 echo "$as_me: checking for $CC warning options..." >&6;}
16206         cf_save_CXXFLAGS="$CXXFLAGS"
16207         EXTRA_CXXFLAGS="-Wall"
16208         for cf_opt in \
16209                 wd1419 \
16210                 wd1682 \
16211                 wd1683 \
16212                 wd1684 \
16213                 wd193 \
16214                 wd279 \
16215                 wd593 \
16216                 wd810 \
16217                 wd869 \
16218                 wd981
16219         do
16220                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16221                 if { (eval echo "$as_me:16221: \"$ac_compile\"") >&5
16222   (eval $ac_compile) 2>&5
16223   ac_status=$?
16224   echo "$as_me:16224: \$? = $ac_status" >&5
16225   (exit $ac_status); }; then
16226                         test -n "$verbose" && echo "$as_me:16226: result: ... -$cf_opt" >&5
16227 echo "${ECHO_T}... -$cf_opt" >&6
16228                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16229                 fi
16230         done
16231         CXXFLAGS="$cf_save_CXXFLAGS"
16232
16233 elif test "$GXX" = yes
16234 then
16235         { echo "$as_me:16235: checking for $CXX warning options..." >&5
16236 echo "$as_me: checking for $CXX warning options..." >&6;}
16237         cf_save_CXXFLAGS="$CXXFLAGS"
16238         EXTRA_CXXFLAGS="-W -Wall"
16239         cf_gxx_extra_warnings=""
16240         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16241         case "$GCC_VERSION" in
16242         ([1-2].*)
16243                 ;;
16244         (*)
16245                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16246                 ;;
16247         esac
16248         for cf_opt in \
16249                 Wabi \
16250                 fabi-version=0 \
16251                 Wextra \
16252                 Wignored-qualifiers \
16253                 Wlogical-op \
16254                 Woverloaded-virtual \
16255                 Wsign-promo \
16256                 Wsynth \
16257                 Wold-style-cast \
16258                 Wcast-align \
16259                 Wcast-qual \
16260                 Wpointer-arith \
16261                 Wshadow \
16262                 Wundef $cf_gxx_extra_warnings Wno-unused
16263         do
16264                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16265                 if { (eval echo "$as_me:16265: \"$ac_compile\"") >&5
16266   (eval $ac_compile) 2>&5
16267   ac_status=$?
16268   echo "$as_me:16268: \$? = $ac_status" >&5
16269   (exit $ac_status); }; then
16270                         test -n "$verbose" && echo "$as_me:16270: result: ... -$cf_opt" >&5
16271 echo "${ECHO_T}... -$cf_opt" >&6
16272                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16273                 else
16274                         test -n "$verbose" && echo "$as_me:16274: result: ... no -$cf_opt" >&5
16275 echo "${ECHO_T}... no -$cf_opt" >&6
16276                 fi
16277         done
16278         CXXFLAGS="$cf_save_CXXFLAGS"
16279 fi
16280
16281 rm -rf conftest*
16282 ac_ext=c
16283 ac_cpp='$CPP $CPPFLAGS'
16284 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16285 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16286 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16287 ac_main_return=return
16288
16289         fi
16290 fi
16291
16292 if test "$GCC" = yes
16293 then
16294 cat > conftest.i <<EOF
16295 #ifndef GCC_PRINTF
16296 #define GCC_PRINTF 0
16297 #endif
16298 #ifndef GCC_SCANF
16299 #define GCC_SCANF 0
16300 #endif
16301 #ifndef GCC_NORETURN
16302 #define GCC_NORETURN /* nothing */
16303 #endif
16304 #ifndef GCC_UNUSED
16305 #define GCC_UNUSED /* nothing */
16306 #endif
16307 EOF
16308 if test "$GCC" = yes
16309 then
16310         { echo "$as_me:16310: checking for $CC __attribute__ directives..." >&5
16311 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16312 cat > conftest.$ac_ext <<EOF
16313 #line 16313 "${as_me:-configure}"
16314 #include "confdefs.h"
16315 #include "conftest.h"
16316 #include "conftest.i"
16317 #if     GCC_PRINTF
16318 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16319 #else
16320 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16321 #endif
16322 #if     GCC_SCANF
16323 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16324 #else
16325 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16326 #endif
16327 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16328 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16329 extern void foo(void) GCC_NORETURN;
16330 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16331 EOF
16332         cf_printf_attribute=no
16333         cf_scanf_attribute=no
16334         for cf_attribute in scanf printf unused noreturn
16335         do
16336
16337 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16338
16339                 cf_directive="__attribute__(($cf_attribute))"
16340                 echo "checking for $CC $cf_directive" 1>&5
16341
16342                 case $cf_attribute in
16343                 (printf)
16344                         cf_printf_attribute=yes
16345                         cat >conftest.h <<EOF
16346 #define GCC_$cf_ATTRIBUTE 1
16347 EOF
16348                         ;;
16349                 (scanf)
16350                         cf_scanf_attribute=yes
16351                         cat >conftest.h <<EOF
16352 #define GCC_$cf_ATTRIBUTE 1
16353 EOF
16354                         ;;
16355                 (*)
16356                         cat >conftest.h <<EOF
16357 #define GCC_$cf_ATTRIBUTE $cf_directive
16358 EOF
16359                         ;;
16360                 esac
16361
16362                 if { (eval echo "$as_me:16362: \"$ac_compile\"") >&5
16363   (eval $ac_compile) 2>&5
16364   ac_status=$?
16365   echo "$as_me:16365: \$? = $ac_status" >&5
16366   (exit $ac_status); }; then
16367                         test -n "$verbose" && echo "$as_me:16367: result: ... $cf_attribute" >&5
16368 echo "${ECHO_T}... $cf_attribute" >&6
16369                         cat conftest.h >>confdefs.h
16370                         case $cf_attribute in
16371                         (noreturn)
16372
16373 cat >>confdefs.h <<EOF
16374 #define GCC_NORETURN $cf_directive
16375 EOF
16376
16377                                 ;;
16378                         (printf)
16379                                 cf_value='/* nothing */'
16380                                 if test "$cf_printf_attribute" != no ; then
16381                                         cf_value='__attribute__((format(printf,fmt,var)))'
16382
16383 cat >>confdefs.h <<\EOF
16384 #define GCC_PRINTF 1
16385 EOF
16386
16387                                 fi
16388
16389 cat >>confdefs.h <<EOF
16390 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16391 EOF
16392
16393                                 ;;
16394                         (scanf)
16395                                 cf_value='/* nothing */'
16396                                 if test "$cf_scanf_attribute" != no ; then
16397                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16398
16399 cat >>confdefs.h <<\EOF
16400 #define GCC_SCANF 1
16401 EOF
16402
16403                                 fi
16404
16405 cat >>confdefs.h <<EOF
16406 #define GCC_SCANFLIKE(fmt,var) $cf_value
16407 EOF
16408
16409                                 ;;
16410                         (unused)
16411
16412 cat >>confdefs.h <<EOF
16413 #define GCC_UNUSED $cf_directive
16414 EOF
16415
16416                                 ;;
16417                         esac
16418                 fi
16419         done
16420 else
16421         fgrep define conftest.i >>confdefs.h
16422 fi
16423 rm -rf conftest*
16424 fi
16425
16426 echo "$as_me:16426: checking if you want to work around bogus compiler/loader warnings" >&5
16427 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16428
16429 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16430 if test "${enable_string_hacks+set}" = set; then
16431   enableval="$enable_string_hacks"
16432   with_string_hacks=$enableval
16433 else
16434   with_string_hacks=no
16435 fi;
16436 echo "$as_me:16436: result: $with_string_hacks" >&5
16437 echo "${ECHO_T}$with_string_hacks" >&6
16438
16439 if test "x$with_string_hacks" = "xyes"; then
16440
16441 cat >>confdefs.h <<\EOF
16442 #define USE_STRING_HACKS 1
16443 EOF
16444
16445         { echo "$as_me:16445: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16446 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16447         echo "$as_me:16447: checking for strlcat" >&5
16448 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16449 if test "${ac_cv_func_strlcat+set}" = set; then
16450   echo $ECHO_N "(cached) $ECHO_C" >&6
16451 else
16452   cat >conftest.$ac_ext <<_ACEOF
16453 #line 16453 "configure"
16454 #include "confdefs.h"
16455 #define strlcat autoconf_temporary
16456 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16457 #undef strlcat
16458
16459 #ifdef __cplusplus
16460 extern "C"
16461 #endif
16462
16463 /* We use char because int might match the return type of a gcc2
16464    builtin and then its argument prototype would still apply.  */
16465 char strlcat (void);
16466
16467 int
16468 main (void)
16469 {
16470
16471 /* The GNU C library defines stubs for functions which it implements
16472     to always fail with ENOSYS.  Some functions are actually named
16473     something starting with __ and the normal name is an alias.  */
16474 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16475 #error found stub for strlcat
16476 #endif
16477
16478         return strlcat ();
16479   ;
16480   return 0;
16481 }
16482 _ACEOF
16483 rm -f conftest.$ac_objext conftest$ac_exeext
16484 if { (eval echo "$as_me:16484: \"$ac_link\"") >&5
16485   (eval $ac_link) 2>&5
16486   ac_status=$?
16487   echo "$as_me:16487: \$? = $ac_status" >&5
16488   (exit $ac_status); } &&
16489          { ac_try='test -s conftest$ac_exeext'
16490   { (eval echo "$as_me:16490: \"$ac_try\"") >&5
16491   (eval $ac_try) 2>&5
16492   ac_status=$?
16493   echo "$as_me:16493: \$? = $ac_status" >&5
16494   (exit $ac_status); }; }; then
16495   ac_cv_func_strlcat=yes
16496 else
16497   echo "$as_me: failed program was:" >&5
16498 cat conftest.$ac_ext >&5
16499 ac_cv_func_strlcat=no
16500 fi
16501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16502 fi
16503 echo "$as_me:16503: result: $ac_cv_func_strlcat" >&5
16504 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16505 if test $ac_cv_func_strlcat = yes; then
16506
16507 cat >>confdefs.h <<\EOF
16508 #define HAVE_STRLCAT 1
16509 EOF
16510
16511 else
16512
16513                 echo "$as_me:16513: checking for strlcat in -lbsd" >&5
16514 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16515 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16516   echo $ECHO_N "(cached) $ECHO_C" >&6
16517 else
16518   ac_check_lib_save_LIBS=$LIBS
16519 LIBS="-lbsd  $LIBS"
16520 cat >conftest.$ac_ext <<_ACEOF
16521 #line 16521 "configure"
16522 #include "confdefs.h"
16523
16524 /* Override any gcc2 internal prototype to avoid an error.  */
16525 #ifdef __cplusplus
16526 extern "C"
16527 #endif
16528 /* We use char because int might match the return type of a gcc2
16529    builtin and then its argument prototype would still apply.  */
16530 char strlcat ();
16531 int
16532 main (void)
16533 {
16534 strlcat ();
16535   ;
16536   return 0;
16537 }
16538 _ACEOF
16539 rm -f conftest.$ac_objext conftest$ac_exeext
16540 if { (eval echo "$as_me:16540: \"$ac_link\"") >&5
16541   (eval $ac_link) 2>&5
16542   ac_status=$?
16543   echo "$as_me:16543: \$? = $ac_status" >&5
16544   (exit $ac_status); } &&
16545          { ac_try='test -s conftest$ac_exeext'
16546   { (eval echo "$as_me:16546: \"$ac_try\"") >&5
16547   (eval $ac_try) 2>&5
16548   ac_status=$?
16549   echo "$as_me:16549: \$? = $ac_status" >&5
16550   (exit $ac_status); }; }; then
16551   ac_cv_lib_bsd_strlcat=yes
16552 else
16553   echo "$as_me: failed program was:" >&5
16554 cat conftest.$ac_ext >&5
16555 ac_cv_lib_bsd_strlcat=no
16556 fi
16557 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16558 LIBS=$ac_check_lib_save_LIBS
16559 fi
16560 echo "$as_me:16560: result: $ac_cv_lib_bsd_strlcat" >&5
16561 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16562 if test $ac_cv_lib_bsd_strlcat = yes; then
16563
16564 cf_add_libs="$LIBS"
16565 # reverse order
16566 cf_add_0lib=
16567 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16568 # filter duplicates
16569 for cf_add_1lib in $cf_add_0lib; do
16570         for cf_add_2lib in $cf_add_libs; do
16571                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16572                         cf_add_1lib=
16573                         break
16574                 fi
16575         done
16576         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16577 done
16578 LIBS="$cf_add_libs"
16579
16580 for ac_header in bsd/string.h
16581 do
16582 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16583 echo "$as_me:16583: checking for $ac_header" >&5
16584 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16585 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16586   echo $ECHO_N "(cached) $ECHO_C" >&6
16587 else
16588   cat >conftest.$ac_ext <<_ACEOF
16589 #line 16589 "configure"
16590 #include "confdefs.h"
16591 #include <$ac_header>
16592 _ACEOF
16593 if { (eval echo "$as_me:16593: \"$ac_cpp conftest.$ac_ext\"") >&5
16594   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16595   ac_status=$?
16596   egrep -v '^ *\+' conftest.er1 >conftest.err
16597   rm -f conftest.er1
16598   cat conftest.err >&5
16599   echo "$as_me:16599: \$? = $ac_status" >&5
16600   (exit $ac_status); } >/dev/null; then
16601   if test -s conftest.err; then
16602     ac_cpp_err=$ac_c_preproc_warn_flag
16603   else
16604     ac_cpp_err=
16605   fi
16606 else
16607   ac_cpp_err=yes
16608 fi
16609 if test -z "$ac_cpp_err"; then
16610   eval "$as_ac_Header=yes"
16611 else
16612   echo "$as_me: failed program was:" >&5
16613   cat conftest.$ac_ext >&5
16614   eval "$as_ac_Header=no"
16615 fi
16616 rm -f conftest.err conftest.$ac_ext
16617 fi
16618 echo "$as_me:16618: result: `eval echo '${'$as_ac_Header'}'`" >&5
16619 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16620 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16621   cat >>confdefs.h <<EOF
16622 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16623 EOF
16624
16625 fi
16626 done
16627
16628 cat >>confdefs.h <<\EOF
16629 #define HAVE_STRLCAT 1
16630 EOF
16631
16632 fi
16633
16634 fi
16635
16636 for ac_func in strlcpy snprintf
16637 do
16638 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16639 echo "$as_me:16639: checking for $ac_func" >&5
16640 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16641 if eval "test \"\${$as_ac_var+set}\" = set"; then
16642   echo $ECHO_N "(cached) $ECHO_C" >&6
16643 else
16644   cat >conftest.$ac_ext <<_ACEOF
16645 #line 16645 "configure"
16646 #include "confdefs.h"
16647 #define $ac_func autoconf_temporary
16648 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16649 #undef $ac_func
16650
16651 #ifdef __cplusplus
16652 extern "C"
16653 #endif
16654
16655 /* We use char because int might match the return type of a gcc2
16656    builtin and then its argument prototype would still apply.  */
16657 char $ac_func (void);
16658
16659 int
16660 main (void)
16661 {
16662
16663 /* The GNU C library defines stubs for functions which it implements
16664     to always fail with ENOSYS.  Some functions are actually named
16665     something starting with __ and the normal name is an alias.  */
16666 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16667 #error found stub for $ac_func
16668 #endif
16669
16670         return $ac_func ();
16671   ;
16672   return 0;
16673 }
16674 _ACEOF
16675 rm -f conftest.$ac_objext conftest$ac_exeext
16676 if { (eval echo "$as_me:16676: \"$ac_link\"") >&5
16677   (eval $ac_link) 2>&5
16678   ac_status=$?
16679   echo "$as_me:16679: \$? = $ac_status" >&5
16680   (exit $ac_status); } &&
16681          { ac_try='test -s conftest$ac_exeext'
16682   { (eval echo "$as_me:16682: \"$ac_try\"") >&5
16683   (eval $ac_try) 2>&5
16684   ac_status=$?
16685   echo "$as_me:16685: \$? = $ac_status" >&5
16686   (exit $ac_status); }; }; then
16687   eval "$as_ac_var=yes"
16688 else
16689   echo "$as_me: failed program was:" >&5
16690 cat conftest.$ac_ext >&5
16691 eval "$as_ac_var=no"
16692 fi
16693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16694 fi
16695 echo "$as_me:16695: result: `eval echo '${'$as_ac_var'}'`" >&5
16696 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16697 if test `eval echo '${'$as_ac_var'}'` = yes; then
16698   cat >>confdefs.h <<EOF
16699 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16700 EOF
16701
16702 fi
16703 done
16704
16705 fi
16706
16707 ###     use option --enable-assertions to turn on generation of assertion code
16708 echo "$as_me:16708: checking if you want to enable runtime assertions" >&5
16709 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16710
16711 # Check whether --enable-assertions or --disable-assertions was given.
16712 if test "${enable_assertions+set}" = set; then
16713   enableval="$enable_assertions"
16714   with_assertions=$enableval
16715 else
16716   with_assertions=no
16717 fi;
16718 echo "$as_me:16718: result: $with_assertions" >&5
16719 echo "${ECHO_T}$with_assertions" >&6
16720 if test -n "$GCC"
16721 then
16722         if test "$with_assertions" = no
16723         then
16724                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16725         else
16726
16727         ADAFLAGS="$ADAFLAGS -gnata"
16728
16729         fi
16730 fi
16731
16732 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16733
16734 echo "$as_me:16734: checking if you want to use dmalloc for testing" >&5
16735 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16736
16737 # Check whether --with-dmalloc or --without-dmalloc was given.
16738 if test "${with_dmalloc+set}" = set; then
16739   withval="$with_dmalloc"
16740
16741 cat >>confdefs.h <<EOF
16742 #define USE_DMALLOC 1
16743 EOF
16744
16745         : ${with_cflags:=-g}
16746         : ${with_no_leaks:=yes}
16747          with_dmalloc=yes
16748 else
16749   with_dmalloc=
16750 fi;
16751 echo "$as_me:16751: result: ${with_dmalloc:-no}" >&5
16752 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16753
16754 case .$with_cflags in
16755 (.*-g*)
16756         case .$CFLAGS in
16757         (.*-g*)
16758                 ;;
16759         (*)
16760
16761 cf_fix_cppflags=no
16762 cf_new_cflags=
16763 cf_new_cppflags=
16764 cf_new_extra_cppflags=
16765
16766 for cf_add_cflags in -g
16767 do
16768 case $cf_fix_cppflags in
16769 (no)
16770         case $cf_add_cflags in
16771         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16772                 case $cf_add_cflags in
16773                 (-D*)
16774                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16775
16776                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16777                                 && test -z "${cf_tst_cflags}" \
16778                                 && cf_fix_cppflags=yes
16779
16780                         if test $cf_fix_cppflags = yes ; then
16781
16782         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16783         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16784
16785                                 continue
16786                         elif test "${cf_tst_cflags}" = "\"'" ; then
16787
16788         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16789         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16790
16791                                 continue
16792                         fi
16793                         ;;
16794                 esac
16795                 case "$CPPFLAGS" in
16796                 (*$cf_add_cflags)
16797                         ;;
16798                 (*)
16799                         case $cf_add_cflags in
16800                         (-D*)
16801                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16802
16803 CPPFLAGS=`echo "$CPPFLAGS" | \
16804         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16805                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16806
16807                                 ;;
16808                         esac
16809
16810         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16811         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16812
16813                         ;;
16814                 esac
16815                 ;;
16816         (*)
16817
16818         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16819         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16820
16821                 ;;
16822         esac
16823         ;;
16824 (yes)
16825
16826         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16827         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16828
16829         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16830
16831         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16832                 && test -z "${cf_tst_cflags}" \
16833                 && cf_fix_cppflags=no
16834         ;;
16835 esac
16836 done
16837
16838 if test -n "$cf_new_cflags" ; then
16839
16840         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16841         CFLAGS="${CFLAGS}$cf_new_cflags"
16842
16843 fi
16844
16845 if test -n "$cf_new_cppflags" ; then
16846
16847         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16848         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16849
16850 fi
16851
16852 if test -n "$cf_new_extra_cppflags" ; then
16853
16854         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16855         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16856
16857 fi
16858
16859                 ;;
16860         esac
16861         ;;
16862 esac
16863
16864 if test "$with_dmalloc" = yes ; then
16865         echo "$as_me:16865: checking for dmalloc.h" >&5
16866 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16867 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16868   echo $ECHO_N "(cached) $ECHO_C" >&6
16869 else
16870   cat >conftest.$ac_ext <<_ACEOF
16871 #line 16871 "configure"
16872 #include "confdefs.h"
16873 #include <dmalloc.h>
16874 _ACEOF
16875 if { (eval echo "$as_me:16875: \"$ac_cpp conftest.$ac_ext\"") >&5
16876   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16877   ac_status=$?
16878   egrep -v '^ *\+' conftest.er1 >conftest.err
16879   rm -f conftest.er1
16880   cat conftest.err >&5
16881   echo "$as_me:16881: \$? = $ac_status" >&5
16882   (exit $ac_status); } >/dev/null; then
16883   if test -s conftest.err; then
16884     ac_cpp_err=$ac_c_preproc_warn_flag
16885   else
16886     ac_cpp_err=
16887   fi
16888 else
16889   ac_cpp_err=yes
16890 fi
16891 if test -z "$ac_cpp_err"; then
16892   ac_cv_header_dmalloc_h=yes
16893 else
16894   echo "$as_me: failed program was:" >&5
16895   cat conftest.$ac_ext >&5
16896   ac_cv_header_dmalloc_h=no
16897 fi
16898 rm -f conftest.err conftest.$ac_ext
16899 fi
16900 echo "$as_me:16900: result: $ac_cv_header_dmalloc_h" >&5
16901 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16902 if test $ac_cv_header_dmalloc_h = yes; then
16903
16904 echo "$as_me:16904: checking for dmalloc_debug in -ldmalloc" >&5
16905 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16906 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16907   echo $ECHO_N "(cached) $ECHO_C" >&6
16908 else
16909   ac_check_lib_save_LIBS=$LIBS
16910 LIBS="-ldmalloc  $LIBS"
16911 cat >conftest.$ac_ext <<_ACEOF
16912 #line 16912 "configure"
16913 #include "confdefs.h"
16914
16915 /* Override any gcc2 internal prototype to avoid an error.  */
16916 #ifdef __cplusplus
16917 extern "C"
16918 #endif
16919 /* We use char because int might match the return type of a gcc2
16920    builtin and then its argument prototype would still apply.  */
16921 char dmalloc_debug ();
16922 int
16923 main (void)
16924 {
16925 dmalloc_debug ();
16926   ;
16927   return 0;
16928 }
16929 _ACEOF
16930 rm -f conftest.$ac_objext conftest$ac_exeext
16931 if { (eval echo "$as_me:16931: \"$ac_link\"") >&5
16932   (eval $ac_link) 2>&5
16933   ac_status=$?
16934   echo "$as_me:16934: \$? = $ac_status" >&5
16935   (exit $ac_status); } &&
16936          { ac_try='test -s conftest$ac_exeext'
16937   { (eval echo "$as_me:16937: \"$ac_try\"") >&5
16938   (eval $ac_try) 2>&5
16939   ac_status=$?
16940   echo "$as_me:16940: \$? = $ac_status" >&5
16941   (exit $ac_status); }; }; then
16942   ac_cv_lib_dmalloc_dmalloc_debug=yes
16943 else
16944   echo "$as_me: failed program was:" >&5
16945 cat conftest.$ac_ext >&5
16946 ac_cv_lib_dmalloc_dmalloc_debug=no
16947 fi
16948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16949 LIBS=$ac_check_lib_save_LIBS
16950 fi
16951 echo "$as_me:16951: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16952 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16953 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16954   cat >>confdefs.h <<EOF
16955 #define HAVE_LIBDMALLOC 1
16956 EOF
16957
16958   LIBS="-ldmalloc $LIBS"
16959
16960 fi
16961
16962 fi
16963
16964 fi
16965
16966 echo "$as_me:16966: checking if you want to use dbmalloc for testing" >&5
16967 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16968
16969 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16970 if test "${with_dbmalloc+set}" = set; then
16971   withval="$with_dbmalloc"
16972
16973 cat >>confdefs.h <<EOF
16974 #define USE_DBMALLOC 1
16975 EOF
16976
16977         : ${with_cflags:=-g}
16978         : ${with_no_leaks:=yes}
16979          with_dbmalloc=yes
16980 else
16981   with_dbmalloc=
16982 fi;
16983 echo "$as_me:16983: result: ${with_dbmalloc:-no}" >&5
16984 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16985
16986 case .$with_cflags in
16987 (.*-g*)
16988         case .$CFLAGS in
16989         (.*-g*)
16990                 ;;
16991         (*)
16992
16993 cf_fix_cppflags=no
16994 cf_new_cflags=
16995 cf_new_cppflags=
16996 cf_new_extra_cppflags=
16997
16998 for cf_add_cflags in -g
16999 do
17000 case $cf_fix_cppflags in
17001 (no)
17002         case $cf_add_cflags in
17003         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17004                 case $cf_add_cflags in
17005                 (-D*)
17006                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17007
17008                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17009                                 && test -z "${cf_tst_cflags}" \
17010                                 && cf_fix_cppflags=yes
17011
17012                         if test $cf_fix_cppflags = yes ; then
17013
17014         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17015         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17016
17017                                 continue
17018                         elif test "${cf_tst_cflags}" = "\"'" ; then
17019
17020         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17021         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17022
17023                                 continue
17024                         fi
17025                         ;;
17026                 esac
17027                 case "$CPPFLAGS" in
17028                 (*$cf_add_cflags)
17029                         ;;
17030                 (*)
17031                         case $cf_add_cflags in
17032                         (-D*)
17033                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17034
17035 CPPFLAGS=`echo "$CPPFLAGS" | \
17036         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17037                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17038
17039                                 ;;
17040                         esac
17041
17042         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17043         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17044
17045                         ;;
17046                 esac
17047                 ;;
17048         (*)
17049
17050         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17051         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17052
17053                 ;;
17054         esac
17055         ;;
17056 (yes)
17057
17058         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17059         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17060
17061         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17062
17063         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17064                 && test -z "${cf_tst_cflags}" \
17065                 && cf_fix_cppflags=no
17066         ;;
17067 esac
17068 done
17069
17070 if test -n "$cf_new_cflags" ; then
17071
17072         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17073         CFLAGS="${CFLAGS}$cf_new_cflags"
17074
17075 fi
17076
17077 if test -n "$cf_new_cppflags" ; then
17078
17079         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17080         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17081
17082 fi
17083
17084 if test -n "$cf_new_extra_cppflags" ; then
17085
17086         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17087         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17088
17089 fi
17090
17091                 ;;
17092         esac
17093         ;;
17094 esac
17095
17096 if test "$with_dbmalloc" = yes ; then
17097         echo "$as_me:17097: checking for dbmalloc.h" >&5
17098 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17099 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17100   echo $ECHO_N "(cached) $ECHO_C" >&6
17101 else
17102   cat >conftest.$ac_ext <<_ACEOF
17103 #line 17103 "configure"
17104 #include "confdefs.h"
17105 #include <dbmalloc.h>
17106 _ACEOF
17107 if { (eval echo "$as_me:17107: \"$ac_cpp conftest.$ac_ext\"") >&5
17108   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17109   ac_status=$?
17110   egrep -v '^ *\+' conftest.er1 >conftest.err
17111   rm -f conftest.er1
17112   cat conftest.err >&5
17113   echo "$as_me:17113: \$? = $ac_status" >&5
17114   (exit $ac_status); } >/dev/null; then
17115   if test -s conftest.err; then
17116     ac_cpp_err=$ac_c_preproc_warn_flag
17117   else
17118     ac_cpp_err=
17119   fi
17120 else
17121   ac_cpp_err=yes
17122 fi
17123 if test -z "$ac_cpp_err"; then
17124   ac_cv_header_dbmalloc_h=yes
17125 else
17126   echo "$as_me: failed program was:" >&5
17127   cat conftest.$ac_ext >&5
17128   ac_cv_header_dbmalloc_h=no
17129 fi
17130 rm -f conftest.err conftest.$ac_ext
17131 fi
17132 echo "$as_me:17132: result: $ac_cv_header_dbmalloc_h" >&5
17133 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17134 if test $ac_cv_header_dbmalloc_h = yes; then
17135
17136 echo "$as_me:17136: checking for debug_malloc in -ldbmalloc" >&5
17137 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17138 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17139   echo $ECHO_N "(cached) $ECHO_C" >&6
17140 else
17141   ac_check_lib_save_LIBS=$LIBS
17142 LIBS="-ldbmalloc  $LIBS"
17143 cat >conftest.$ac_ext <<_ACEOF
17144 #line 17144 "configure"
17145 #include "confdefs.h"
17146
17147 /* Override any gcc2 internal prototype to avoid an error.  */
17148 #ifdef __cplusplus
17149 extern "C"
17150 #endif
17151 /* We use char because int might match the return type of a gcc2
17152    builtin and then its argument prototype would still apply.  */
17153 char debug_malloc ();
17154 int
17155 main (void)
17156 {
17157 debug_malloc ();
17158   ;
17159   return 0;
17160 }
17161 _ACEOF
17162 rm -f conftest.$ac_objext conftest$ac_exeext
17163 if { (eval echo "$as_me:17163: \"$ac_link\"") >&5
17164   (eval $ac_link) 2>&5
17165   ac_status=$?
17166   echo "$as_me:17166: \$? = $ac_status" >&5
17167   (exit $ac_status); } &&
17168          { ac_try='test -s conftest$ac_exeext'
17169   { (eval echo "$as_me:17169: \"$ac_try\"") >&5
17170   (eval $ac_try) 2>&5
17171   ac_status=$?
17172   echo "$as_me:17172: \$? = $ac_status" >&5
17173   (exit $ac_status); }; }; then
17174   ac_cv_lib_dbmalloc_debug_malloc=yes
17175 else
17176   echo "$as_me: failed program was:" >&5
17177 cat conftest.$ac_ext >&5
17178 ac_cv_lib_dbmalloc_debug_malloc=no
17179 fi
17180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17181 LIBS=$ac_check_lib_save_LIBS
17182 fi
17183 echo "$as_me:17183: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17184 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17185 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17186   cat >>confdefs.h <<EOF
17187 #define HAVE_LIBDBMALLOC 1
17188 EOF
17189
17190   LIBS="-ldbmalloc $LIBS"
17191
17192 fi
17193
17194 fi
17195
17196 fi
17197
17198 echo "$as_me:17198: checking if you want to use valgrind for testing" >&5
17199 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17200
17201 # Check whether --with-valgrind or --without-valgrind was given.
17202 if test "${with_valgrind+set}" = set; then
17203   withval="$with_valgrind"
17204
17205 cat >>confdefs.h <<EOF
17206 #define USE_VALGRIND 1
17207 EOF
17208
17209         : ${with_cflags:=-g}
17210         : ${with_no_leaks:=yes}
17211          with_valgrind=yes
17212 else
17213   with_valgrind=
17214 fi;
17215 echo "$as_me:17215: result: ${with_valgrind:-no}" >&5
17216 echo "${ECHO_T}${with_valgrind:-no}" >&6
17217
17218 case .$with_cflags in
17219 (.*-g*)
17220         case .$CFLAGS in
17221         (.*-g*)
17222                 ;;
17223         (*)
17224
17225 cf_fix_cppflags=no
17226 cf_new_cflags=
17227 cf_new_cppflags=
17228 cf_new_extra_cppflags=
17229
17230 for cf_add_cflags in -g
17231 do
17232 case $cf_fix_cppflags in
17233 (no)
17234         case $cf_add_cflags in
17235         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17236                 case $cf_add_cflags in
17237                 (-D*)
17238                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17239
17240                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17241                                 && test -z "${cf_tst_cflags}" \
17242                                 && cf_fix_cppflags=yes
17243
17244                         if test $cf_fix_cppflags = yes ; then
17245
17246         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17247         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17248
17249                                 continue
17250                         elif test "${cf_tst_cflags}" = "\"'" ; then
17251
17252         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17253         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17254
17255                                 continue
17256                         fi
17257                         ;;
17258                 esac
17259                 case "$CPPFLAGS" in
17260                 (*$cf_add_cflags)
17261                         ;;
17262                 (*)
17263                         case $cf_add_cflags in
17264                         (-D*)
17265                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17266
17267 CPPFLAGS=`echo "$CPPFLAGS" | \
17268         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17269                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17270
17271                                 ;;
17272                         esac
17273
17274         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17275         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17276
17277                         ;;
17278                 esac
17279                 ;;
17280         (*)
17281
17282         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17283         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17284
17285                 ;;
17286         esac
17287         ;;
17288 (yes)
17289
17290         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17291         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17292
17293         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17294
17295         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17296                 && test -z "${cf_tst_cflags}" \
17297                 && cf_fix_cppflags=no
17298         ;;
17299 esac
17300 done
17301
17302 if test -n "$cf_new_cflags" ; then
17303
17304         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17305         CFLAGS="${CFLAGS}$cf_new_cflags"
17306
17307 fi
17308
17309 if test -n "$cf_new_cppflags" ; then
17310
17311         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17312         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17313
17314 fi
17315
17316 if test -n "$cf_new_extra_cppflags" ; then
17317
17318         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17319         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17320
17321 fi
17322
17323                 ;;
17324         esac
17325         ;;
17326 esac
17327
17328 echo "$as_me:17328: checking if you want to perform memory-leak testing" >&5
17329 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17330
17331 # Check whether --enable-leaks or --disable-leaks was given.
17332 if test "${enable_leaks+set}" = set; then
17333   enableval="$enable_leaks"
17334   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17335 else
17336   : ${with_no_leaks:=no}
17337 fi;
17338 echo "$as_me:17338: result: $with_no_leaks" >&5
17339 echo "${ECHO_T}$with_no_leaks" >&6
17340
17341 if test "$with_no_leaks" = yes ; then
17342
17343 cat >>confdefs.h <<\EOF
17344 #define NO_LEAKS 1
17345 EOF
17346
17347 cat >>confdefs.h <<\EOF
17348 #define YY_NO_LEAKS 1
17349 EOF
17350
17351 fi
17352
17353 cat >>confdefs.h <<\EOF
17354 #define HAVE_NC_ALLOC_H 1
17355 EOF
17356
17357 ###     use option --enable-expanded to generate certain macros as functions
17358
17359 # Check whether --enable-expanded or --disable-expanded was given.
17360 if test "${enable_expanded+set}" = set; then
17361   enableval="$enable_expanded"
17362   test "x$enableval" = xyes &&
17363 cat >>confdefs.h <<\EOF
17364 #define NCURSES_EXPANDED 1
17365 EOF
17366
17367 fi;
17368
17369 ###     use option --disable-macros to suppress macros in favor of functions
17370
17371 # Check whether --enable-macros or --disable-macros was given.
17372 if test "${enable_macros+set}" = set; then
17373   enableval="$enable_macros"
17374   test "$enableval" = no &&
17375 cat >>confdefs.h <<\EOF
17376 #define NCURSES_NOMACROS 1
17377 EOF
17378
17379 fi;
17380
17381 # Normally we only add trace() to the debug-library.  Allow this to be
17382 # extended to all models of the ncurses library:
17383 cf_all_traces=no
17384 case "$CFLAGS $CPPFLAGS" in
17385 (*-DTRACE*)
17386         cf_all_traces=yes
17387         ;;
17388 esac
17389
17390 echo "$as_me:17390: checking whether to add trace feature to all models" >&5
17391 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17392
17393 # Check whether --with-trace or --without-trace was given.
17394 if test "${with_trace+set}" = set; then
17395   withval="$with_trace"
17396   cf_with_trace=$withval
17397 else
17398   cf_with_trace=$cf_all_traces
17399 fi;
17400 echo "$as_me:17400: result: $cf_with_trace" >&5
17401 echo "${ECHO_T}$cf_with_trace" >&6
17402
17403 if test "x$cf_with_trace" = xyes ; then
17404         LIB_TRACING=all
17405         ADA_TRACE=TRUE
17406
17407 cf_fix_cppflags=no
17408 cf_new_cflags=
17409 cf_new_cppflags=
17410 cf_new_extra_cppflags=
17411
17412 for cf_add_cflags in -DTRACE
17413 do
17414 case $cf_fix_cppflags in
17415 (no)
17416         case $cf_add_cflags in
17417         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17418                 case $cf_add_cflags in
17419                 (-D*)
17420                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17421
17422                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17423                                 && test -z "${cf_tst_cflags}" \
17424                                 && cf_fix_cppflags=yes
17425
17426                         if test $cf_fix_cppflags = yes ; then
17427
17428         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17429         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17430
17431                                 continue
17432                         elif test "${cf_tst_cflags}" = "\"'" ; then
17433
17434         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17435         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17436
17437                                 continue
17438                         fi
17439                         ;;
17440                 esac
17441                 case "$CPPFLAGS" in
17442                 (*$cf_add_cflags)
17443                         ;;
17444                 (*)
17445                         case $cf_add_cflags in
17446                         (-D*)
17447                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17448
17449 CPPFLAGS=`echo "$CPPFLAGS" | \
17450         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17451                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17452
17453                                 ;;
17454                         esac
17455
17456         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17457         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17458
17459                         ;;
17460                 esac
17461                 ;;
17462         (*)
17463
17464         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17465         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17466
17467                 ;;
17468         esac
17469         ;;
17470 (yes)
17471
17472         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17473         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17474
17475         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17476
17477         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17478                 && test -z "${cf_tst_cflags}" \
17479                 && cf_fix_cppflags=no
17480         ;;
17481 esac
17482 done
17483
17484 if test -n "$cf_new_cflags" ; then
17485
17486         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17487         CFLAGS="${CFLAGS}$cf_new_cflags"
17488
17489 fi
17490
17491 if test -n "$cf_new_cppflags" ; then
17492
17493         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17494         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17495
17496 fi
17497
17498 if test -n "$cf_new_extra_cppflags" ; then
17499
17500         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17501         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17502
17503 fi
17504
17505 cat >>confdefs.h <<\EOF
17506 #define HAVE__TRACEF 1
17507 EOF
17508
17509 else
17510         LIB_TRACING=DEBUG
17511         ADA_TRACE=FALSE
17512 fi
17513
17514 echo "$as_me:17514: checking if we want to use GNAT projects" >&5
17515 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17516
17517 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17518 if test "${enable_gnat_projects+set}" = set; then
17519   enableval="$enable_gnat_projects"
17520   test "$enableval" != no && enableval=yes
17521         if test "$enableval" != "yes" ; then
17522     enable_gnat_projects=no
17523         else
17524                 enable_gnat_projects=yes
17525         fi
17526 else
17527   enableval=yes
17528         enable_gnat_projects=yes
17529
17530 fi;
17531 echo "$as_me:17531: result: $enable_gnat_projects" >&5
17532 echo "${ECHO_T}$enable_gnat_projects" >&6
17533
17534 ###     Checks for libraries.
17535 case $cf_cv_system_name in
17536 (*mingw32*|*mingw64*)
17537         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17538         # Note: WINVER may be a problem with Windows 10
17539         ;;
17540 (*)
17541 echo "$as_me:17541: checking for gettimeofday" >&5
17542 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17543 if test "${ac_cv_func_gettimeofday+set}" = set; then
17544   echo $ECHO_N "(cached) $ECHO_C" >&6
17545 else
17546   cat >conftest.$ac_ext <<_ACEOF
17547 #line 17547 "configure"
17548 #include "confdefs.h"
17549 #define gettimeofday autoconf_temporary
17550 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17551 #undef gettimeofday
17552
17553 #ifdef __cplusplus
17554 extern "C"
17555 #endif
17556
17557 /* We use char because int might match the return type of a gcc2
17558    builtin and then its argument prototype would still apply.  */
17559 char gettimeofday (void);
17560
17561 int
17562 main (void)
17563 {
17564
17565 /* The GNU C library defines stubs for functions which it implements
17566     to always fail with ENOSYS.  Some functions are actually named
17567     something starting with __ and the normal name is an alias.  */
17568 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17569 #error found stub for gettimeofday
17570 #endif
17571
17572         return gettimeofday ();
17573   ;
17574   return 0;
17575 }
17576 _ACEOF
17577 rm -f conftest.$ac_objext conftest$ac_exeext
17578 if { (eval echo "$as_me:17578: \"$ac_link\"") >&5
17579   (eval $ac_link) 2>&5
17580   ac_status=$?
17581   echo "$as_me:17581: \$? = $ac_status" >&5
17582   (exit $ac_status); } &&
17583          { ac_try='test -s conftest$ac_exeext'
17584   { (eval echo "$as_me:17584: \"$ac_try\"") >&5
17585   (eval $ac_try) 2>&5
17586   ac_status=$?
17587   echo "$as_me:17587: \$? = $ac_status" >&5
17588   (exit $ac_status); }; }; then
17589   ac_cv_func_gettimeofday=yes
17590 else
17591   echo "$as_me: failed program was:" >&5
17592 cat conftest.$ac_ext >&5
17593 ac_cv_func_gettimeofday=no
17594 fi
17595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17596 fi
17597 echo "$as_me:17597: result: $ac_cv_func_gettimeofday" >&5
17598 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17599 if test $ac_cv_func_gettimeofday = yes; then
17600
17601 cat >>confdefs.h <<\EOF
17602 #define HAVE_GETTIMEOFDAY 1
17603 EOF
17604
17605 else
17606
17607 echo "$as_me:17607: checking for gettimeofday in -lbsd" >&5
17608 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17609 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17610   echo $ECHO_N "(cached) $ECHO_C" >&6
17611 else
17612   ac_check_lib_save_LIBS=$LIBS
17613 LIBS="-lbsd  $LIBS"
17614 cat >conftest.$ac_ext <<_ACEOF
17615 #line 17615 "configure"
17616 #include "confdefs.h"
17617
17618 /* Override any gcc2 internal prototype to avoid an error.  */
17619 #ifdef __cplusplus
17620 extern "C"
17621 #endif
17622 /* We use char because int might match the return type of a gcc2
17623    builtin and then its argument prototype would still apply.  */
17624 char gettimeofday ();
17625 int
17626 main (void)
17627 {
17628 gettimeofday ();
17629   ;
17630   return 0;
17631 }
17632 _ACEOF
17633 rm -f conftest.$ac_objext conftest$ac_exeext
17634 if { (eval echo "$as_me:17634: \"$ac_link\"") >&5
17635   (eval $ac_link) 2>&5
17636   ac_status=$?
17637   echo "$as_me:17637: \$? = $ac_status" >&5
17638   (exit $ac_status); } &&
17639          { ac_try='test -s conftest$ac_exeext'
17640   { (eval echo "$as_me:17640: \"$ac_try\"") >&5
17641   (eval $ac_try) 2>&5
17642   ac_status=$?
17643   echo "$as_me:17643: \$? = $ac_status" >&5
17644   (exit $ac_status); }; }; then
17645   ac_cv_lib_bsd_gettimeofday=yes
17646 else
17647   echo "$as_me: failed program was:" >&5
17648 cat conftest.$ac_ext >&5
17649 ac_cv_lib_bsd_gettimeofday=no
17650 fi
17651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17652 LIBS=$ac_check_lib_save_LIBS
17653 fi
17654 echo "$as_me:17654: result: $ac_cv_lib_bsd_gettimeofday" >&5
17655 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17656 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17657
17658 cat >>confdefs.h <<\EOF
17659 #define HAVE_GETTIMEOFDAY 1
17660 EOF
17661
17662 cf_add_libs="$LIBS"
17663 # reverse order
17664 cf_add_0lib=
17665 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17666 # filter duplicates
17667 for cf_add_1lib in $cf_add_0lib; do
17668         for cf_add_2lib in $cf_add_libs; do
17669                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17670                         cf_add_1lib=
17671                         break
17672                 fi
17673         done
17674         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17675 done
17676 LIBS="$cf_add_libs"
17677
17678 fi
17679
17680 fi
17681         ;;
17682 esac
17683
17684 echo "$as_me:17684: checking if -lm needed for math functions" >&5
17685 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17686 if test "${cf_cv_need_libm+set}" = set; then
17687   echo $ECHO_N "(cached) $ECHO_C" >&6
17688 else
17689
17690         cat >conftest.$ac_ext <<_ACEOF
17691 #line 17691 "configure"
17692 #include "confdefs.h"
17693
17694         #include <stdio.h>
17695         #include <stdlib.h>
17696         #include <math.h>
17697
17698 int
17699 main (void)
17700 {
17701 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17702   ;
17703   return 0;
17704 }
17705 _ACEOF
17706 rm -f conftest.$ac_objext conftest$ac_exeext
17707 if { (eval echo "$as_me:17707: \"$ac_link\"") >&5
17708   (eval $ac_link) 2>&5
17709   ac_status=$?
17710   echo "$as_me:17710: \$? = $ac_status" >&5
17711   (exit $ac_status); } &&
17712          { ac_try='test -s conftest$ac_exeext'
17713   { (eval echo "$as_me:17713: \"$ac_try\"") >&5
17714   (eval $ac_try) 2>&5
17715   ac_status=$?
17716   echo "$as_me:17716: \$? = $ac_status" >&5
17717   (exit $ac_status); }; }; then
17718   cf_cv_need_libm=no
17719 else
17720   echo "$as_me: failed program was:" >&5
17721 cat conftest.$ac_ext >&5
17722 cf_cv_need_libm=yes
17723 fi
17724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17725 fi
17726 echo "$as_me:17726: result: $cf_cv_need_libm" >&5
17727 echo "${ECHO_T}$cf_cv_need_libm" >&6
17728 if test "$cf_cv_need_libm" = yes
17729 then
17730 MATH_LIB=-lm
17731 fi
17732
17733 ###     Checks for header files.
17734 echo "$as_me:17734: checking for ANSI C header files" >&5
17735 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17736 if test "${ac_cv_header_stdc+set}" = set; then
17737   echo $ECHO_N "(cached) $ECHO_C" >&6
17738 else
17739   cat >conftest.$ac_ext <<_ACEOF
17740 #line 17740 "configure"
17741 #include "confdefs.h"
17742 #include <stdlib.h>
17743 #include <stdarg.h>
17744 #include <string.h>
17745 #include <float.h>
17746
17747 _ACEOF
17748 if { (eval echo "$as_me:17748: \"$ac_cpp conftest.$ac_ext\"") >&5
17749   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17750   ac_status=$?
17751   egrep -v '^ *\+' conftest.er1 >conftest.err
17752   rm -f conftest.er1
17753   cat conftest.err >&5
17754   echo "$as_me:17754: \$? = $ac_status" >&5
17755   (exit $ac_status); } >/dev/null; then
17756   if test -s conftest.err; then
17757     ac_cpp_err=$ac_c_preproc_warn_flag
17758   else
17759     ac_cpp_err=
17760   fi
17761 else
17762   ac_cpp_err=yes
17763 fi
17764 if test -z "$ac_cpp_err"; then
17765   ac_cv_header_stdc=yes
17766 else
17767   echo "$as_me: failed program was:" >&5
17768   cat conftest.$ac_ext >&5
17769   ac_cv_header_stdc=no
17770 fi
17771 rm -f conftest.err conftest.$ac_ext
17772
17773 if test $ac_cv_header_stdc = yes; then
17774   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17775   cat >conftest.$ac_ext <<_ACEOF
17776 #line 17776 "configure"
17777 #include "confdefs.h"
17778 #include <string.h>
17779
17780 _ACEOF
17781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17782   egrep "memchr" >/dev/null 2>&1; then
17783   :
17784 else
17785   ac_cv_header_stdc=no
17786 fi
17787 rm -rf conftest*
17788
17789 fi
17790
17791 if test $ac_cv_header_stdc = yes; then
17792   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17793   cat >conftest.$ac_ext <<_ACEOF
17794 #line 17794 "configure"
17795 #include "confdefs.h"
17796 #include <stdlib.h>
17797
17798 _ACEOF
17799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17800   egrep "free" >/dev/null 2>&1; then
17801   :
17802 else
17803   ac_cv_header_stdc=no
17804 fi
17805 rm -rf conftest*
17806
17807 fi
17808
17809 if test $ac_cv_header_stdc = yes; then
17810   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17811   if test "$cross_compiling" = yes; then
17812   :
17813 else
17814   cat >conftest.$ac_ext <<_ACEOF
17815 #line 17815 "configure"
17816 #include "confdefs.h"
17817 #include <ctype.h>
17818 #if ((' ' & 0x0FF) == 0x020)
17819 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17820 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17821 #else
17822 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17823                      || ('j' <= (c) && (c) <= 'r') \
17824                      || ('s' <= (c) && (c) <= 'z'))
17825 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17826 #endif
17827
17828 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17829 int
17830 main (void)
17831 {
17832   int i;
17833   for (i = 0; i < 256; i++)
17834     if (XOR (islower (i), ISLOWER (i))
17835         || toupper (i) != TOUPPER (i))
17836       $ac_main_return(2);
17837   $ac_main_return (0);
17838 }
17839 _ACEOF
17840 rm -f conftest$ac_exeext
17841 if { (eval echo "$as_me:17841: \"$ac_link\"") >&5
17842   (eval $ac_link) 2>&5
17843   ac_status=$?
17844   echo "$as_me:17844: \$? = $ac_status" >&5
17845   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17846   { (eval echo "$as_me:17846: \"$ac_try\"") >&5
17847   (eval $ac_try) 2>&5
17848   ac_status=$?
17849   echo "$as_me:17849: \$? = $ac_status" >&5
17850   (exit $ac_status); }; }; then
17851   :
17852 else
17853   echo "$as_me: program exited with status $ac_status" >&5
17854 echo "$as_me: failed program was:" >&5
17855 cat conftest.$ac_ext >&5
17856 ac_cv_header_stdc=no
17857 fi
17858 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17859 fi
17860 fi
17861 fi
17862 echo "$as_me:17862: result: $ac_cv_header_stdc" >&5
17863 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17864 if test $ac_cv_header_stdc = yes; then
17865
17866 cat >>confdefs.h <<\EOF
17867 #define STDC_HEADERS 1
17868 EOF
17869
17870 fi
17871
17872 ac_header_dirent=no
17873 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17874   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17875 echo "$as_me:17875: checking for $ac_hdr that defines DIR" >&5
17876 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17877 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17878   echo $ECHO_N "(cached) $ECHO_C" >&6
17879 else
17880   cat >conftest.$ac_ext <<_ACEOF
17881 #line 17881 "configure"
17882 #include "confdefs.h"
17883 #include <sys/types.h>
17884 #include <$ac_hdr>
17885
17886 int
17887 main (void)
17888 {
17889 if ((DIR *) 0)
17890 return 0;
17891   ;
17892   return 0;
17893 }
17894 _ACEOF
17895 rm -f conftest.$ac_objext
17896 if { (eval echo "$as_me:17896: \"$ac_compile\"") >&5
17897   (eval $ac_compile) 2>&5
17898   ac_status=$?
17899   echo "$as_me:17899: \$? = $ac_status" >&5
17900   (exit $ac_status); } &&
17901          { ac_try='test -s conftest.$ac_objext'
17902   { (eval echo "$as_me:17902: \"$ac_try\"") >&5
17903   (eval $ac_try) 2>&5
17904   ac_status=$?
17905   echo "$as_me:17905: \$? = $ac_status" >&5
17906   (exit $ac_status); }; }; then
17907   eval "$as_ac_Header=yes"
17908 else
17909   echo "$as_me: failed program was:" >&5
17910 cat conftest.$ac_ext >&5
17911 eval "$as_ac_Header=no"
17912 fi
17913 rm -f conftest.$ac_objext conftest.$ac_ext
17914 fi
17915 echo "$as_me:17915: result: `eval echo '${'$as_ac_Header'}'`" >&5
17916 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17917 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17918   cat >>confdefs.h <<EOF
17919 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17920 EOF
17921
17922 ac_header_dirent=$ac_hdr; break
17923 fi
17924
17925 done
17926 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17927 if test $ac_header_dirent = dirent.h; then
17928   echo "$as_me:17928: checking for opendir in -ldir" >&5
17929 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17930 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17931   echo $ECHO_N "(cached) $ECHO_C" >&6
17932 else
17933   ac_check_lib_save_LIBS=$LIBS
17934 LIBS="-ldir  $LIBS"
17935 cat >conftest.$ac_ext <<_ACEOF
17936 #line 17936 "configure"
17937 #include "confdefs.h"
17938
17939 /* Override any gcc2 internal prototype to avoid an error.  */
17940 #ifdef __cplusplus
17941 extern "C"
17942 #endif
17943 /* We use char because int might match the return type of a gcc2
17944    builtin and then its argument prototype would still apply.  */
17945 char opendir ();
17946 int
17947 main (void)
17948 {
17949 opendir ();
17950   ;
17951   return 0;
17952 }
17953 _ACEOF
17954 rm -f conftest.$ac_objext conftest$ac_exeext
17955 if { (eval echo "$as_me:17955: \"$ac_link\"") >&5
17956   (eval $ac_link) 2>&5
17957   ac_status=$?
17958   echo "$as_me:17958: \$? = $ac_status" >&5
17959   (exit $ac_status); } &&
17960          { ac_try='test -s conftest$ac_exeext'
17961   { (eval echo "$as_me:17961: \"$ac_try\"") >&5
17962   (eval $ac_try) 2>&5
17963   ac_status=$?
17964   echo "$as_me:17964: \$? = $ac_status" >&5
17965   (exit $ac_status); }; }; then
17966   ac_cv_lib_dir_opendir=yes
17967 else
17968   echo "$as_me: failed program was:" >&5
17969 cat conftest.$ac_ext >&5
17970 ac_cv_lib_dir_opendir=no
17971 fi
17972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17973 LIBS=$ac_check_lib_save_LIBS
17974 fi
17975 echo "$as_me:17975: result: $ac_cv_lib_dir_opendir" >&5
17976 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17977 if test $ac_cv_lib_dir_opendir = yes; then
17978   LIBS="$LIBS -ldir"
17979 fi
17980
17981 else
17982   echo "$as_me:17982: checking for opendir in -lx" >&5
17983 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17984 if test "${ac_cv_lib_x_opendir+set}" = set; then
17985   echo $ECHO_N "(cached) $ECHO_C" >&6
17986 else
17987   ac_check_lib_save_LIBS=$LIBS
17988 LIBS="-lx  $LIBS"
17989 cat >conftest.$ac_ext <<_ACEOF
17990 #line 17990 "configure"
17991 #include "confdefs.h"
17992
17993 /* Override any gcc2 internal prototype to avoid an error.  */
17994 #ifdef __cplusplus
17995 extern "C"
17996 #endif
17997 /* We use char because int might match the return type of a gcc2
17998    builtin and then its argument prototype would still apply.  */
17999 char opendir ();
18000 int
18001 main (void)
18002 {
18003 opendir ();
18004   ;
18005   return 0;
18006 }
18007 _ACEOF
18008 rm -f conftest.$ac_objext conftest$ac_exeext
18009 if { (eval echo "$as_me:18009: \"$ac_link\"") >&5
18010   (eval $ac_link) 2>&5
18011   ac_status=$?
18012   echo "$as_me:18012: \$? = $ac_status" >&5
18013   (exit $ac_status); } &&
18014          { ac_try='test -s conftest$ac_exeext'
18015   { (eval echo "$as_me:18015: \"$ac_try\"") >&5
18016   (eval $ac_try) 2>&5
18017   ac_status=$?
18018   echo "$as_me:18018: \$? = $ac_status" >&5
18019   (exit $ac_status); }; }; then
18020   ac_cv_lib_x_opendir=yes
18021 else
18022   echo "$as_me: failed program was:" >&5
18023 cat conftest.$ac_ext >&5
18024 ac_cv_lib_x_opendir=no
18025 fi
18026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18027 LIBS=$ac_check_lib_save_LIBS
18028 fi
18029 echo "$as_me:18029: result: $ac_cv_lib_x_opendir" >&5
18030 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18031 if test $ac_cv_lib_x_opendir = yes; then
18032   LIBS="$LIBS -lx"
18033 fi
18034
18035 fi
18036
18037 echo "$as_me:18037: checking whether time.h and sys/time.h may both be included" >&5
18038 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18039 if test "${ac_cv_header_time+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 #include <sys/types.h>
18046 #include <sys/time.h>
18047 #include <time.h>
18048
18049 int
18050 main (void)
18051 {
18052 if ((struct tm *) 0)
18053 return 0;
18054   ;
18055   return 0;
18056 }
18057 _ACEOF
18058 rm -f conftest.$ac_objext
18059 if { (eval echo "$as_me:18059: \"$ac_compile\"") >&5
18060   (eval $ac_compile) 2>&5
18061   ac_status=$?
18062   echo "$as_me:18062: \$? = $ac_status" >&5
18063   (exit $ac_status); } &&
18064          { ac_try='test -s conftest.$ac_objext'
18065   { (eval echo "$as_me:18065: \"$ac_try\"") >&5
18066   (eval $ac_try) 2>&5
18067   ac_status=$?
18068   echo "$as_me:18068: \$? = $ac_status" >&5
18069   (exit $ac_status); }; }; then
18070   ac_cv_header_time=yes
18071 else
18072   echo "$as_me: failed program was:" >&5
18073 cat conftest.$ac_ext >&5
18074 ac_cv_header_time=no
18075 fi
18076 rm -f conftest.$ac_objext conftest.$ac_ext
18077 fi
18078 echo "$as_me:18078: result: $ac_cv_header_time" >&5
18079 echo "${ECHO_T}$ac_cv_header_time" >&6
18080 if test $ac_cv_header_time = yes; then
18081
18082 cat >>confdefs.h <<\EOF
18083 #define TIME_WITH_SYS_TIME 1
18084 EOF
18085
18086 fi
18087
18088 cf_regex_func=no
18089
18090 cf_regex_libs="regex re"
18091 case $host_os in
18092 (mingw*)
18093         cf_regex_libs="gnurx $cf_regex_libs"
18094         ;;
18095 esac
18096
18097 echo "$as_me:18097: checking for regcomp" >&5
18098 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
18099 if test "${ac_cv_func_regcomp+set}" = set; then
18100   echo $ECHO_N "(cached) $ECHO_C" >&6
18101 else
18102   cat >conftest.$ac_ext <<_ACEOF
18103 #line 18103 "configure"
18104 #include "confdefs.h"
18105 #define regcomp autoconf_temporary
18106 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18107 #undef regcomp
18108
18109 #ifdef __cplusplus
18110 extern "C"
18111 #endif
18112
18113 /* We use char because int might match the return type of a gcc2
18114    builtin and then its argument prototype would still apply.  */
18115 char regcomp (void);
18116
18117 int
18118 main (void)
18119 {
18120
18121 /* The GNU C library defines stubs for functions which it implements
18122     to always fail with ENOSYS.  Some functions are actually named
18123     something starting with __ and the normal name is an alias.  */
18124 #if defined (__stub_regcomp) || defined (__stub___regcomp)
18125 #error found stub for regcomp
18126 #endif
18127
18128         return regcomp ();
18129   ;
18130   return 0;
18131 }
18132 _ACEOF
18133 rm -f conftest.$ac_objext conftest$ac_exeext
18134 if { (eval echo "$as_me:18134: \"$ac_link\"") >&5
18135   (eval $ac_link) 2>&5
18136   ac_status=$?
18137   echo "$as_me:18137: \$? = $ac_status" >&5
18138   (exit $ac_status); } &&
18139          { ac_try='test -s conftest$ac_exeext'
18140   { (eval echo "$as_me:18140: \"$ac_try\"") >&5
18141   (eval $ac_try) 2>&5
18142   ac_status=$?
18143   echo "$as_me:18143: \$? = $ac_status" >&5
18144   (exit $ac_status); }; }; then
18145   ac_cv_func_regcomp=yes
18146 else
18147   echo "$as_me: failed program was:" >&5
18148 cat conftest.$ac_ext >&5
18149 ac_cv_func_regcomp=no
18150 fi
18151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18152 fi
18153 echo "$as_me:18153: result: $ac_cv_func_regcomp" >&5
18154 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
18155 if test $ac_cv_func_regcomp = yes; then
18156   cf_regex_func=regcomp
18157 else
18158
18159         for cf_regex_lib in $cf_regex_libs
18160         do
18161                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
18162 echo "$as_me:18162: checking for regcomp in -l$cf_regex_lib" >&5
18163 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
18164 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18165   echo $ECHO_N "(cached) $ECHO_C" >&6
18166 else
18167   ac_check_lib_save_LIBS=$LIBS
18168 LIBS="-l$cf_regex_lib  $LIBS"
18169 cat >conftest.$ac_ext <<_ACEOF
18170 #line 18170 "configure"
18171 #include "confdefs.h"
18172
18173 /* Override any gcc2 internal prototype to avoid an error.  */
18174 #ifdef __cplusplus
18175 extern "C"
18176 #endif
18177 /* We use char because int might match the return type of a gcc2
18178    builtin and then its argument prototype would still apply.  */
18179 char regcomp ();
18180 int
18181 main (void)
18182 {
18183 regcomp ();
18184   ;
18185   return 0;
18186 }
18187 _ACEOF
18188 rm -f conftest.$ac_objext conftest$ac_exeext
18189 if { (eval echo "$as_me:18189: \"$ac_link\"") >&5
18190   (eval $ac_link) 2>&5
18191   ac_status=$?
18192   echo "$as_me:18192: \$? = $ac_status" >&5
18193   (exit $ac_status); } &&
18194          { ac_try='test -s conftest$ac_exeext'
18195   { (eval echo "$as_me:18195: \"$ac_try\"") >&5
18196   (eval $ac_try) 2>&5
18197   ac_status=$?
18198   echo "$as_me:18198: \$? = $ac_status" >&5
18199   (exit $ac_status); }; }; then
18200   eval "$as_ac_Lib=yes"
18201 else
18202   echo "$as_me: failed program was:" >&5
18203 cat conftest.$ac_ext >&5
18204 eval "$as_ac_Lib=no"
18205 fi
18206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18207 LIBS=$ac_check_lib_save_LIBS
18208 fi
18209 echo "$as_me:18209: result: `eval echo '${'$as_ac_Lib'}'`" >&5
18210 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
18211 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18212
18213 cf_add_libs="$LIBS"
18214 # reverse order
18215 cf_add_0lib=
18216 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18217 # filter duplicates
18218 for cf_add_1lib in $cf_add_0lib; do
18219         for cf_add_2lib in $cf_add_libs; do
18220                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18221                         cf_add_1lib=
18222                         break
18223                 fi
18224         done
18225         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18226 done
18227 LIBS="$cf_add_libs"
18228
18229                                 cf_regex_func=regcomp
18230                                 break
18231 fi
18232
18233         done
18234
18235 fi
18236
18237 if test "$cf_regex_func" = no ; then
18238         echo "$as_me:18238: checking for compile" >&5
18239 echo $ECHO_N "checking for compile... $ECHO_C" >&6
18240 if test "${ac_cv_func_compile+set}" = set; then
18241   echo $ECHO_N "(cached) $ECHO_C" >&6
18242 else
18243   cat >conftest.$ac_ext <<_ACEOF
18244 #line 18244 "configure"
18245 #include "confdefs.h"
18246 #define compile autoconf_temporary
18247 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18248 #undef compile
18249
18250 #ifdef __cplusplus
18251 extern "C"
18252 #endif
18253
18254 /* We use char because int might match the return type of a gcc2
18255    builtin and then its argument prototype would still apply.  */
18256 char compile (void);
18257
18258 int
18259 main (void)
18260 {
18261
18262 /* The GNU C library defines stubs for functions which it implements
18263     to always fail with ENOSYS.  Some functions are actually named
18264     something starting with __ and the normal name is an alias.  */
18265 #if defined (__stub_compile) || defined (__stub___compile)
18266 #error found stub for compile
18267 #endif
18268
18269         return compile ();
18270   ;
18271   return 0;
18272 }
18273 _ACEOF
18274 rm -f conftest.$ac_objext conftest$ac_exeext
18275 if { (eval echo "$as_me:18275: \"$ac_link\"") >&5
18276   (eval $ac_link) 2>&5
18277   ac_status=$?
18278   echo "$as_me:18278: \$? = $ac_status" >&5
18279   (exit $ac_status); } &&
18280          { ac_try='test -s conftest$ac_exeext'
18281   { (eval echo "$as_me:18281: \"$ac_try\"") >&5
18282   (eval $ac_try) 2>&5
18283   ac_status=$?
18284   echo "$as_me:18284: \$? = $ac_status" >&5
18285   (exit $ac_status); }; }; then
18286   ac_cv_func_compile=yes
18287 else
18288   echo "$as_me: failed program was:" >&5
18289 cat conftest.$ac_ext >&5
18290 ac_cv_func_compile=no
18291 fi
18292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18293 fi
18294 echo "$as_me:18294: result: $ac_cv_func_compile" >&5
18295 echo "${ECHO_T}$ac_cv_func_compile" >&6
18296 if test $ac_cv_func_compile = yes; then
18297   cf_regex_func=compile
18298 else
18299
18300                 echo "$as_me:18300: checking for compile in -lgen" >&5
18301 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
18302 if test "${ac_cv_lib_gen_compile+set}" = set; then
18303   echo $ECHO_N "(cached) $ECHO_C" >&6
18304 else
18305   ac_check_lib_save_LIBS=$LIBS
18306 LIBS="-lgen  $LIBS"
18307 cat >conftest.$ac_ext <<_ACEOF
18308 #line 18308 "configure"
18309 #include "confdefs.h"
18310
18311 /* Override any gcc2 internal prototype to avoid an error.  */
18312 #ifdef __cplusplus
18313 extern "C"
18314 #endif
18315 /* We use char because int might match the return type of a gcc2
18316    builtin and then its argument prototype would still apply.  */
18317 char compile ();
18318 int
18319 main (void)
18320 {
18321 compile ();
18322   ;
18323   return 0;
18324 }
18325 _ACEOF
18326 rm -f conftest.$ac_objext conftest$ac_exeext
18327 if { (eval echo "$as_me:18327: \"$ac_link\"") >&5
18328   (eval $ac_link) 2>&5
18329   ac_status=$?
18330   echo "$as_me:18330: \$? = $ac_status" >&5
18331   (exit $ac_status); } &&
18332          { ac_try='test -s conftest$ac_exeext'
18333   { (eval echo "$as_me:18333: \"$ac_try\"") >&5
18334   (eval $ac_try) 2>&5
18335   ac_status=$?
18336   echo "$as_me:18336: \$? = $ac_status" >&5
18337   (exit $ac_status); }; }; then
18338   ac_cv_lib_gen_compile=yes
18339 else
18340   echo "$as_me: failed program was:" >&5
18341 cat conftest.$ac_ext >&5
18342 ac_cv_lib_gen_compile=no
18343 fi
18344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18345 LIBS=$ac_check_lib_save_LIBS
18346 fi
18347 echo "$as_me:18347: result: $ac_cv_lib_gen_compile" >&5
18348 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
18349 if test $ac_cv_lib_gen_compile = yes; then
18350
18351 cf_add_libs="$LIBS"
18352 # reverse order
18353 cf_add_0lib=
18354 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18355 # filter duplicates
18356 for cf_add_1lib in $cf_add_0lib; do
18357         for cf_add_2lib in $cf_add_libs; do
18358                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18359                         cf_add_1lib=
18360                         break
18361                 fi
18362         done
18363         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18364 done
18365 LIBS="$cf_add_libs"
18366
18367                                 cf_regex_func=compile
18368 fi
18369
18370 fi
18371
18372 fi
18373
18374 if test "$cf_regex_func" = no ; then
18375         { echo "$as_me:18375: WARNING: cannot find regular expression library" >&5
18376 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18377 fi
18378
18379 echo "$as_me:18379: checking for regular-expression headers" >&5
18380 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18381 if test "${cf_cv_regex_hdrs+set}" = set; then
18382   echo $ECHO_N "(cached) $ECHO_C" >&6
18383 else
18384
18385 cf_cv_regex_hdrs=no
18386 case $cf_regex_func in
18387 (compile)
18388         for cf_regex_hdr in regexp.h regexpr.h
18389         do
18390                 cat >conftest.$ac_ext <<_ACEOF
18391 #line 18391 "configure"
18392 #include "confdefs.h"
18393 #include <$cf_regex_hdr>
18394 int
18395 main (void)
18396 {
18397
18398                         char *p = compile("", "", "", 0);
18399                         int x = step("", "");
18400                         (void)p;
18401                         (void)x;
18402
18403   ;
18404   return 0;
18405 }
18406 _ACEOF
18407 rm -f conftest.$ac_objext conftest$ac_exeext
18408 if { (eval echo "$as_me:18408: \"$ac_link\"") >&5
18409   (eval $ac_link) 2>&5
18410   ac_status=$?
18411   echo "$as_me:18411: \$? = $ac_status" >&5
18412   (exit $ac_status); } &&
18413          { ac_try='test -s conftest$ac_exeext'
18414   { (eval echo "$as_me:18414: \"$ac_try\"") >&5
18415   (eval $ac_try) 2>&5
18416   ac_status=$?
18417   echo "$as_me:18417: \$? = $ac_status" >&5
18418   (exit $ac_status); }; }; then
18419
18420                         cf_cv_regex_hdrs=$cf_regex_hdr
18421                         break
18422
18423 else
18424   echo "$as_me: failed program was:" >&5
18425 cat conftest.$ac_ext >&5
18426 fi
18427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18428         done
18429         ;;
18430 (*)
18431         for cf_regex_hdr in regex.h
18432         do
18433                 cat >conftest.$ac_ext <<_ACEOF
18434 #line 18434 "configure"
18435 #include "confdefs.h"
18436 #include <sys/types.h>
18437 #include <$cf_regex_hdr>
18438 int
18439 main (void)
18440 {
18441
18442                         regex_t *p = 0;
18443                         int x = regcomp(p, "", 0);
18444                         int y = regexec(p, "", 0, 0, 0);
18445                         (void)x;
18446                         (void)y;
18447                         regfree(p);
18448
18449   ;
18450   return 0;
18451 }
18452 _ACEOF
18453 rm -f conftest.$ac_objext conftest$ac_exeext
18454 if { (eval echo "$as_me:18454: \"$ac_link\"") >&5
18455   (eval $ac_link) 2>&5
18456   ac_status=$?
18457   echo "$as_me:18457: \$? = $ac_status" >&5
18458   (exit $ac_status); } &&
18459          { ac_try='test -s conftest$ac_exeext'
18460   { (eval echo "$as_me:18460: \"$ac_try\"") >&5
18461   (eval $ac_try) 2>&5
18462   ac_status=$?
18463   echo "$as_me:18463: \$? = $ac_status" >&5
18464   (exit $ac_status); }; }; then
18465
18466                         cf_cv_regex_hdrs=$cf_regex_hdr
18467                         break
18468
18469 else
18470   echo "$as_me: failed program was:" >&5
18471 cat conftest.$ac_ext >&5
18472 fi
18473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18474         done
18475         ;;
18476 esac
18477
18478 fi
18479 echo "$as_me:18479: result: $cf_cv_regex_hdrs" >&5
18480 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18481
18482 case $cf_cv_regex_hdrs in
18483         (no)            { echo "$as_me:18483: WARNING: no regular expression header found" >&5
18484 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18485         (regex.h)
18486 cat >>confdefs.h <<\EOF
18487 #define HAVE_REGEX_H_FUNCS 1
18488 EOF
18489  ;;
18490         (regexp.h)
18491 cat >>confdefs.h <<\EOF
18492 #define HAVE_REGEXP_H_FUNCS 1
18493 EOF
18494  ;;
18495         (regexpr.h)
18496 cat >>confdefs.h <<\EOF
18497 #define HAVE_REGEXPR_H_FUNCS 1
18498 EOF
18499  ;;
18500 esac
18501
18502 for ac_header in \
18503 fcntl.h \
18504 getopt.h \
18505 limits.h \
18506 locale.h \
18507 math.h \
18508 poll.h \
18509 sys/bsdtypes.h \
18510 sys/ioctl.h \
18511 sys/param.h \
18512 sys/poll.h \
18513 sys/select.h \
18514 sys/time.h \
18515 sys/times.h \
18516 ttyent.h \
18517 unistd.h \
18518 wctype.h \
18519
18520 do
18521 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18522 echo "$as_me:18522: checking for $ac_header" >&5
18523 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18524 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18525   echo $ECHO_N "(cached) $ECHO_C" >&6
18526 else
18527   cat >conftest.$ac_ext <<_ACEOF
18528 #line 18528 "configure"
18529 #include "confdefs.h"
18530 #include <$ac_header>
18531 _ACEOF
18532 if { (eval echo "$as_me:18532: \"$ac_cpp conftest.$ac_ext\"") >&5
18533   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18534   ac_status=$?
18535   egrep -v '^ *\+' conftest.er1 >conftest.err
18536   rm -f conftest.er1
18537   cat conftest.err >&5
18538   echo "$as_me:18538: \$? = $ac_status" >&5
18539   (exit $ac_status); } >/dev/null; then
18540   if test -s conftest.err; then
18541     ac_cpp_err=$ac_c_preproc_warn_flag
18542   else
18543     ac_cpp_err=
18544   fi
18545 else
18546   ac_cpp_err=yes
18547 fi
18548 if test -z "$ac_cpp_err"; then
18549   eval "$as_ac_Header=yes"
18550 else
18551   echo "$as_me: failed program was:" >&5
18552   cat conftest.$ac_ext >&5
18553   eval "$as_ac_Header=no"
18554 fi
18555 rm -f conftest.err conftest.$ac_ext
18556 fi
18557 echo "$as_me:18557: result: `eval echo '${'$as_ac_Header'}'`" >&5
18558 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18559 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18560   cat >>confdefs.h <<EOF
18561 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18562 EOF
18563
18564 fi
18565 done
18566
18567 for ac_header in unistd.h getopt.h
18568 do
18569 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18570 echo "$as_me:18570: checking for $ac_header" >&5
18571 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18572 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18573   echo $ECHO_N "(cached) $ECHO_C" >&6
18574 else
18575   cat >conftest.$ac_ext <<_ACEOF
18576 #line 18576 "configure"
18577 #include "confdefs.h"
18578 #include <$ac_header>
18579 _ACEOF
18580 if { (eval echo "$as_me:18580: \"$ac_cpp conftest.$ac_ext\"") >&5
18581   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18582   ac_status=$?
18583   egrep -v '^ *\+' conftest.er1 >conftest.err
18584   rm -f conftest.er1
18585   cat conftest.err >&5
18586   echo "$as_me:18586: \$? = $ac_status" >&5
18587   (exit $ac_status); } >/dev/null; then
18588   if test -s conftest.err; then
18589     ac_cpp_err=$ac_c_preproc_warn_flag
18590   else
18591     ac_cpp_err=
18592   fi
18593 else
18594   ac_cpp_err=yes
18595 fi
18596 if test -z "$ac_cpp_err"; then
18597   eval "$as_ac_Header=yes"
18598 else
18599   echo "$as_me: failed program was:" >&5
18600   cat conftest.$ac_ext >&5
18601   eval "$as_ac_Header=no"
18602 fi
18603 rm -f conftest.err conftest.$ac_ext
18604 fi
18605 echo "$as_me:18605: result: `eval echo '${'$as_ac_Header'}'`" >&5
18606 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18607 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18608   cat >>confdefs.h <<EOF
18609 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18610 EOF
18611
18612 fi
18613 done
18614
18615 echo "$as_me:18615: checking for header declaring getopt variables" >&5
18616 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18617 if test "${cf_cv_getopt_header+set}" = set; then
18618   echo $ECHO_N "(cached) $ECHO_C" >&6
18619 else
18620
18621 cf_cv_getopt_header=none
18622 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18623 do
18624 cat >conftest.$ac_ext <<_ACEOF
18625 #line 18625 "configure"
18626 #include "confdefs.h"
18627
18628 #include <$cf_header>
18629 int
18630 main (void)
18631 {
18632 int x = optind; char *y = optarg
18633   ;
18634   return 0;
18635 }
18636 _ACEOF
18637 rm -f conftest.$ac_objext
18638 if { (eval echo "$as_me:18638: \"$ac_compile\"") >&5
18639   (eval $ac_compile) 2>&5
18640   ac_status=$?
18641   echo "$as_me:18641: \$? = $ac_status" >&5
18642   (exit $ac_status); } &&
18643          { ac_try='test -s conftest.$ac_objext'
18644   { (eval echo "$as_me:18644: \"$ac_try\"") >&5
18645   (eval $ac_try) 2>&5
18646   ac_status=$?
18647   echo "$as_me:18647: \$? = $ac_status" >&5
18648   (exit $ac_status); }; }; then
18649   cf_cv_getopt_header=$cf_header
18650  break
18651 else
18652   echo "$as_me: failed program was:" >&5
18653 cat conftest.$ac_ext >&5
18654 fi
18655 rm -f conftest.$ac_objext conftest.$ac_ext
18656 done
18657
18658 fi
18659 echo "$as_me:18659: result: $cf_cv_getopt_header" >&5
18660 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18661 if test $cf_cv_getopt_header != none ; then
18662
18663 cat >>confdefs.h <<\EOF
18664 #define HAVE_GETOPT_HEADER 1
18665 EOF
18666
18667 fi
18668 if test $cf_cv_getopt_header = getopt.h ; then
18669
18670 cat >>confdefs.h <<\EOF
18671 #define NEED_GETOPT_H 1
18672 EOF
18673
18674 fi
18675
18676 echo "$as_me:18676: checking if external environ is declared" >&5
18677 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18678 if test "${cf_cv_dcl_environ+set}" = set; then
18679   echo $ECHO_N "(cached) $ECHO_C" >&6
18680 else
18681
18682     cat >conftest.$ac_ext <<_ACEOF
18683 #line 18683 "configure"
18684 #include "confdefs.h"
18685
18686 #ifdef HAVE_STDLIB_H
18687 #include <stdlib.h>
18688 #endif
18689 #include <unistd.h>
18690 int
18691 main (void)
18692 {
18693 int x = (int) environ
18694   ;
18695   return 0;
18696 }
18697 _ACEOF
18698 rm -f conftest.$ac_objext
18699 if { (eval echo "$as_me:18699: \"$ac_compile\"") >&5
18700   (eval $ac_compile) 2>&5
18701   ac_status=$?
18702   echo "$as_me:18702: \$? = $ac_status" >&5
18703   (exit $ac_status); } &&
18704          { ac_try='test -s conftest.$ac_objext'
18705   { (eval echo "$as_me:18705: \"$ac_try\"") >&5
18706   (eval $ac_try) 2>&5
18707   ac_status=$?
18708   echo "$as_me:18708: \$? = $ac_status" >&5
18709   (exit $ac_status); }; }; then
18710   cf_cv_dcl_environ=yes
18711 else
18712   echo "$as_me: failed program was:" >&5
18713 cat conftest.$ac_ext >&5
18714 cf_cv_dcl_environ=no
18715 fi
18716 rm -f conftest.$ac_objext conftest.$ac_ext
18717
18718 fi
18719 echo "$as_me:18719: result: $cf_cv_dcl_environ" >&5
18720 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18721
18722 if test "$cf_cv_dcl_environ" = no ; then
18723
18724 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18725
18726     cat >>confdefs.h <<EOF
18727 #define $cf_result 1
18728 EOF
18729
18730 fi
18731
18732 # It's possible (for near-UNIX clones) that the data doesn't exist
18733
18734 echo "$as_me:18734: checking if external environ exists" >&5
18735 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18736 if test "${cf_cv_have_environ+set}" = set; then
18737   echo $ECHO_N "(cached) $ECHO_C" >&6
18738 else
18739
18740         cat >conftest.$ac_ext <<_ACEOF
18741 #line 18741 "configure"
18742 #include "confdefs.h"
18743
18744 #undef environ
18745 extern int environ;
18746
18747 int
18748 main (void)
18749 {
18750 environ = 2
18751   ;
18752   return 0;
18753 }
18754 _ACEOF
18755 rm -f conftest.$ac_objext conftest$ac_exeext
18756 if { (eval echo "$as_me:18756: \"$ac_link\"") >&5
18757   (eval $ac_link) 2>&5
18758   ac_status=$?
18759   echo "$as_me:18759: \$? = $ac_status" >&5
18760   (exit $ac_status); } &&
18761          { ac_try='test -s conftest$ac_exeext'
18762   { (eval echo "$as_me:18762: \"$ac_try\"") >&5
18763   (eval $ac_try) 2>&5
18764   ac_status=$?
18765   echo "$as_me:18765: \$? = $ac_status" >&5
18766   (exit $ac_status); }; }; then
18767   cf_cv_have_environ=yes
18768 else
18769   echo "$as_me: failed program was:" >&5
18770 cat conftest.$ac_ext >&5
18771 cf_cv_have_environ=no
18772 fi
18773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18774
18775 fi
18776 echo "$as_me:18776: result: $cf_cv_have_environ" >&5
18777 echo "${ECHO_T}$cf_cv_have_environ" >&6
18778
18779 if test "$cf_cv_have_environ" = yes ; then
18780
18781 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18782
18783         cat >>confdefs.h <<EOF
18784 #define $cf_result 1
18785 EOF
18786
18787 fi
18788
18789 echo "$as_me:18789: checking for getenv" >&5
18790 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18791 if test "${ac_cv_func_getenv+set}" = set; then
18792   echo $ECHO_N "(cached) $ECHO_C" >&6
18793 else
18794   cat >conftest.$ac_ext <<_ACEOF
18795 #line 18795 "configure"
18796 #include "confdefs.h"
18797 #define getenv autoconf_temporary
18798 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18799 #undef getenv
18800
18801 #ifdef __cplusplus
18802 extern "C"
18803 #endif
18804
18805 /* We use char because int might match the return type of a gcc2
18806    builtin and then its argument prototype would still apply.  */
18807 char getenv (void);
18808
18809 int
18810 main (void)
18811 {
18812
18813 /* The GNU C library defines stubs for functions which it implements
18814     to always fail with ENOSYS.  Some functions are actually named
18815     something starting with __ and the normal name is an alias.  */
18816 #if defined (__stub_getenv) || defined (__stub___getenv)
18817 #error found stub for getenv
18818 #endif
18819
18820         return getenv ();
18821   ;
18822   return 0;
18823 }
18824 _ACEOF
18825 rm -f conftest.$ac_objext conftest$ac_exeext
18826 if { (eval echo "$as_me:18826: \"$ac_link\"") >&5
18827   (eval $ac_link) 2>&5
18828   ac_status=$?
18829   echo "$as_me:18829: \$? = $ac_status" >&5
18830   (exit $ac_status); } &&
18831          { ac_try='test -s conftest$ac_exeext'
18832   { (eval echo "$as_me:18832: \"$ac_try\"") >&5
18833   (eval $ac_try) 2>&5
18834   ac_status=$?
18835   echo "$as_me:18835: \$? = $ac_status" >&5
18836   (exit $ac_status); }; }; then
18837   ac_cv_func_getenv=yes
18838 else
18839   echo "$as_me: failed program was:" >&5
18840 cat conftest.$ac_ext >&5
18841 ac_cv_func_getenv=no
18842 fi
18843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18844 fi
18845 echo "$as_me:18845: result: $ac_cv_func_getenv" >&5
18846 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18847
18848 for ac_func in putenv setenv strdup
18849 do
18850 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18851 echo "$as_me:18851: checking for $ac_func" >&5
18852 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18853 if eval "test \"\${$as_ac_var+set}\" = set"; then
18854   echo $ECHO_N "(cached) $ECHO_C" >&6
18855 else
18856   cat >conftest.$ac_ext <<_ACEOF
18857 #line 18857 "configure"
18858 #include "confdefs.h"
18859 #define $ac_func autoconf_temporary
18860 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18861 #undef $ac_func
18862
18863 #ifdef __cplusplus
18864 extern "C"
18865 #endif
18866
18867 /* We use char because int might match the return type of a gcc2
18868    builtin and then its argument prototype would still apply.  */
18869 char $ac_func (void);
18870
18871 int
18872 main (void)
18873 {
18874
18875 /* The GNU C library defines stubs for functions which it implements
18876     to always fail with ENOSYS.  Some functions are actually named
18877     something starting with __ and the normal name is an alias.  */
18878 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18879 #error found stub for $ac_func
18880 #endif
18881
18882         return $ac_func ();
18883   ;
18884   return 0;
18885 }
18886 _ACEOF
18887 rm -f conftest.$ac_objext conftest$ac_exeext
18888 if { (eval echo "$as_me:18888: \"$ac_link\"") >&5
18889   (eval $ac_link) 2>&5
18890   ac_status=$?
18891   echo "$as_me:18891: \$? = $ac_status" >&5
18892   (exit $ac_status); } &&
18893          { ac_try='test -s conftest$ac_exeext'
18894   { (eval echo "$as_me:18894: \"$ac_try\"") >&5
18895   (eval $ac_try) 2>&5
18896   ac_status=$?
18897   echo "$as_me:18897: \$? = $ac_status" >&5
18898   (exit $ac_status); }; }; then
18899   eval "$as_ac_var=yes"
18900 else
18901   echo "$as_me: failed program was:" >&5
18902 cat conftest.$ac_ext >&5
18903 eval "$as_ac_var=no"
18904 fi
18905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18906 fi
18907 echo "$as_me:18907: result: `eval echo '${'$as_ac_var'}'`" >&5
18908 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18909 if test `eval echo '${'$as_ac_var'}'` = yes; then
18910   cat >>confdefs.h <<EOF
18911 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18912 EOF
18913
18914 fi
18915 done
18916
18917 echo "$as_me:18917: checking if getenv returns consistent values" >&5
18918 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
18919 if test "${cf_cv_consistent_getenv+set}" = set; then
18920   echo $ECHO_N "(cached) $ECHO_C" >&6
18921 else
18922
18923 if test "$cross_compiling" = yes; then
18924   cf_cv_consistent_getenv=unknown
18925 else
18926   cat >conftest.$ac_ext <<_ACEOF
18927 #line 18927 "configure"
18928 #include "confdefs.h"
18929
18930 #include <stdlib.h>
18931 #include <unistd.h>
18932 #include <stdio.h>
18933 #include <string.h>
18934 #include <sys/types.h>
18935
18936 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
18937 extern char **environ;  /* POSIX, but some systems are not... */
18938 #endif
18939
18940 #if defined(HAVE_STRDUP)
18941 #define str_alloc(s) strdup(s)
18942 #else
18943 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
18944 #endif
18945
18946 static void set_value(const char *name, const char *value)
18947 {
18948 #if defined(HAVE_SETENV)
18949         setenv(name, value, 1);
18950 #elif defined(HAVE_PUTENV)
18951         char buffer[1024];
18952         sprintf(buffer, "%s=%s", name, value);
18953         putenv(str_alloc(buffer));
18954 #else
18955 #error neither putenv/setenv found
18956 #endif
18957 }
18958 int main(void)
18959 {
18960         int pass;
18961         size_t numenv, limit, j;
18962         char **mynames;
18963         char **myvalues;
18964         char **mypointer;
18965         char *equals;
18966         for (numenv = 0; environ[numenv]; ++numenv) ;
18967         limit = numenv + 10;
18968         mynames = (char **) calloc(limit + 1, sizeof(char *));
18969         myvalues = (char **) calloc(limit + 1, sizeof(char *));
18970         mypointer = (char **) calloc(limit + 1, sizeof(char *));
18971 #if defined(HAVE_ENVIRON)
18972         for (j = 0; environ[j]; ++j) {
18973                 mynames[j] = str_alloc(environ[j]);
18974                 equals = strchr(mynames[j], '=');
18975                 if (equals != 0) {
18976                         *equals++ = '\0';
18977                         myvalues[j] = str_alloc(equals);
18978                 } else {
18979                         myvalues[j] = str_alloc("");
18980                 }
18981         }
18982 #endif
18983         for (j = numenv; j < limit; ++j) {
18984                 char name[80];
18985                 char value[80];
18986                 size_t found;
18987                 size_t k = 0;
18988                 do {
18989                         size_t jk;
18990                         found = 0;
18991                         sprintf(name, "TERM%lu", (unsigned long) k);
18992                         for (jk = 0; jk < j; ++jk) {
18993                                 if (!strcmp(name, mynames[jk])) {
18994                                         found = 1;
18995                                         ++k;
18996                                         break;
18997                                 }
18998                         }
18999                 } while (found);
19000                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19001                 set_value(name, value);
19002                 mynames[j] = str_alloc(name);
19003                 myvalues[j] = str_alloc(value);
19004         }
19005         for (pass = 0; pass < 3; ++pass) {
19006                 for (j = 0; j < limit; ++j) {
19007                         char *value = getenv(mynames[j]);
19008                         if (pass) {
19009                                 if (value == 0) {
19010                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19011                                         ${cf_cv_main_return:-return}(1);
19012                                 } else if (value != mypointer[j]) {
19013                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19014                                         ${cf_cv_main_return:-return}(1);
19015                                 } else if (strcmp(value, myvalues[j])) {
19016                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19017                                         ${cf_cv_main_return:-return}(1);
19018                                 }
19019                         } else {
19020                                 size_t k;
19021                                 mypointer[j] = value;
19022                                 for (k = 0; k < j; ++k) {
19023                                         if (mypointer[j] == mypointer[k]) {
19024                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19025                                                 ${cf_cv_main_return:-return}(1);
19026                                         }
19027                                 }
19028                         }
19029                 }
19030         }
19031         ${cf_cv_main_return:-return}(0);
19032 }
19033
19034 _ACEOF
19035 rm -f conftest$ac_exeext
19036 if { (eval echo "$as_me:19036: \"$ac_link\"") >&5
19037   (eval $ac_link) 2>&5
19038   ac_status=$?
19039   echo "$as_me:19039: \$? = $ac_status" >&5
19040   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19041   { (eval echo "$as_me:19041: \"$ac_try\"") >&5
19042   (eval $ac_try) 2>&5
19043   ac_status=$?
19044   echo "$as_me:19044: \$? = $ac_status" >&5
19045   (exit $ac_status); }; }; then
19046   cf_cv_consistent_getenv=yes
19047 else
19048   echo "$as_me: program exited with status $ac_status" >&5
19049 echo "$as_me: failed program was:" >&5
19050 cat conftest.$ac_ext >&5
19051 cf_cv_consistent_getenv=no
19052 fi
19053 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19054 fi
19055
19056 fi
19057 echo "$as_me:19057: result: $cf_cv_consistent_getenv" >&5
19058 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
19059
19060 if test "x$cf_cv_consistent_getenv" = xno
19061 then
19062
19063 cat >>confdefs.h <<\EOF
19064 #define HAVE_CONSISTENT_GETENV 1
19065 EOF
19066
19067 fi
19068
19069 if test "x$cf_cv_consistent_getenv" = xno && \
19070         test "x$cf_with_trace" = xyes
19071 then
19072         { echo "$as_me:19072: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
19073 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
19074 fi
19075
19076 # check for ISC (this may also define _POSIX_SOURCE)
19077 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
19078 if test "x$ISC" = xyes ; then
19079
19080 echo "$as_me:19080: checking for main in -lcposix" >&5
19081 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
19082 if test "${ac_cv_lib_cposix_main+set}" = set; then
19083   echo $ECHO_N "(cached) $ECHO_C" >&6
19084 else
19085   ac_check_lib_save_LIBS=$LIBS
19086 LIBS="-lcposix  $LIBS"
19087 cat >conftest.$ac_ext <<_ACEOF
19088 #line 19088 "configure"
19089 #include "confdefs.h"
19090
19091 int
19092 main (void)
19093 {
19094 main ();
19095   ;
19096   return 0;
19097 }
19098 _ACEOF
19099 rm -f conftest.$ac_objext conftest$ac_exeext
19100 if { (eval echo "$as_me:19100: \"$ac_link\"") >&5
19101   (eval $ac_link) 2>&5
19102   ac_status=$?
19103   echo "$as_me:19103: \$? = $ac_status" >&5
19104   (exit $ac_status); } &&
19105          { ac_try='test -s conftest$ac_exeext'
19106   { (eval echo "$as_me:19106: \"$ac_try\"") >&5
19107   (eval $ac_try) 2>&5
19108   ac_status=$?
19109   echo "$as_me:19109: \$? = $ac_status" >&5
19110   (exit $ac_status); }; }; then
19111   ac_cv_lib_cposix_main=yes
19112 else
19113   echo "$as_me: failed program was:" >&5
19114 cat conftest.$ac_ext >&5
19115 ac_cv_lib_cposix_main=no
19116 fi
19117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19118 LIBS=$ac_check_lib_save_LIBS
19119 fi
19120 echo "$as_me:19120: result: $ac_cv_lib_cposix_main" >&5
19121 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
19122 if test $ac_cv_lib_cposix_main = yes; then
19123   cat >>confdefs.h <<EOF
19124 #define HAVE_LIBCPOSIX 1
19125 EOF
19126
19127   LIBS="-lcposix $LIBS"
19128
19129 fi
19130
19131         echo "$as_me:19131: checking for bzero in -linet" >&5
19132 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
19133 if test "${ac_cv_lib_inet_bzero+set}" = set; then
19134   echo $ECHO_N "(cached) $ECHO_C" >&6
19135 else
19136   ac_check_lib_save_LIBS=$LIBS
19137 LIBS="-linet  $LIBS"
19138 cat >conftest.$ac_ext <<_ACEOF
19139 #line 19139 "configure"
19140 #include "confdefs.h"
19141
19142 /* Override any gcc2 internal prototype to avoid an error.  */
19143 #ifdef __cplusplus
19144 extern "C"
19145 #endif
19146 /* We use char because int might match the return type of a gcc2
19147    builtin and then its argument prototype would still apply.  */
19148 char bzero ();
19149 int
19150 main (void)
19151 {
19152 bzero ();
19153   ;
19154   return 0;
19155 }
19156 _ACEOF
19157 rm -f conftest.$ac_objext conftest$ac_exeext
19158 if { (eval echo "$as_me:19158: \"$ac_link\"") >&5
19159   (eval $ac_link) 2>&5
19160   ac_status=$?
19161   echo "$as_me:19161: \$? = $ac_status" >&5
19162   (exit $ac_status); } &&
19163          { ac_try='test -s conftest$ac_exeext'
19164   { (eval echo "$as_me:19164: \"$ac_try\"") >&5
19165   (eval $ac_try) 2>&5
19166   ac_status=$?
19167   echo "$as_me:19167: \$? = $ac_status" >&5
19168   (exit $ac_status); }; }; then
19169   ac_cv_lib_inet_bzero=yes
19170 else
19171   echo "$as_me: failed program was:" >&5
19172 cat conftest.$ac_ext >&5
19173 ac_cv_lib_inet_bzero=no
19174 fi
19175 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19176 LIBS=$ac_check_lib_save_LIBS
19177 fi
19178 echo "$as_me:19178: result: $ac_cv_lib_inet_bzero" >&5
19179 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
19180 if test $ac_cv_lib_inet_bzero = yes; then
19181
19182 cf_add_libs="$LIBS"
19183 # reverse order
19184 cf_add_0lib=
19185 for cf_add_1lib in -linet; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19186 # filter duplicates
19187 for cf_add_1lib in $cf_add_0lib; do
19188         for cf_add_2lib in $cf_add_libs; do
19189                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19190                         cf_add_1lib=
19191                         break
19192                 fi
19193         done
19194         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19195 done
19196 LIBS="$cf_add_libs"
19197
19198 fi
19199 fi
19200
19201 echo "$as_me:19201: checking if sys/time.h works with sys/select.h" >&5
19202 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19203 if test "${cf_cv_sys_time_select+set}" = set; then
19204   echo $ECHO_N "(cached) $ECHO_C" >&6
19205 else
19206
19207 cat >conftest.$ac_ext <<_ACEOF
19208 #line 19208 "configure"
19209 #include "confdefs.h"
19210
19211 #include <sys/types.h>
19212 #ifdef HAVE_SYS_TIME_H
19213 #include <sys/time.h>
19214 #endif
19215 #ifdef HAVE_SYS_SELECT_H
19216 #include <sys/select.h>
19217 #endif
19218
19219 int
19220 main (void)
19221 {
19222
19223   ;
19224   return 0;
19225 }
19226 _ACEOF
19227 rm -f conftest.$ac_objext
19228 if { (eval echo "$as_me:19228: \"$ac_compile\"") >&5
19229   (eval $ac_compile) 2>&5
19230   ac_status=$?
19231   echo "$as_me:19231: \$? = $ac_status" >&5
19232   (exit $ac_status); } &&
19233          { ac_try='test -s conftest.$ac_objext'
19234   { (eval echo "$as_me:19234: \"$ac_try\"") >&5
19235   (eval $ac_try) 2>&5
19236   ac_status=$?
19237   echo "$as_me:19237: \$? = $ac_status" >&5
19238   (exit $ac_status); }; }; then
19239   cf_cv_sys_time_select=yes
19240 else
19241   echo "$as_me: failed program was:" >&5
19242 cat conftest.$ac_ext >&5
19243 cf_cv_sys_time_select=no
19244 fi
19245 rm -f conftest.$ac_objext conftest.$ac_ext
19246
19247 fi
19248
19249 echo "$as_me:19249: result: $cf_cv_sys_time_select" >&5
19250 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19251 test "$cf_cv_sys_time_select" = yes &&
19252 cat >>confdefs.h <<\EOF
19253 #define HAVE_SYS_TIME_SELECT 1
19254 EOF
19255
19256 ###     checks for compiler characteristics
19257 ac_ext=c
19258 ac_cpp='$CPP $CPPFLAGS'
19259 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19260 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19261 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19262 ac_main_return=return
19263
19264 echo "$as_me:19264: checking for an ANSI C-conforming const" >&5
19265 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
19266 if test "${ac_cv_c_const+set}" = set; then
19267   echo $ECHO_N "(cached) $ECHO_C" >&6
19268 else
19269   cat >conftest.$ac_ext <<_ACEOF
19270 #line 19270 "configure"
19271 #include "confdefs.h"
19272
19273 int
19274 main (void)
19275 {
19276 /* FIXME: Include the comments suggested by Paul. */
19277 #ifndef __cplusplus
19278   /* Ultrix mips cc rejects this.  */
19279   typedef int charset[2];
19280   const charset x;
19281   /* SunOS 4.1.1 cc rejects this.  */
19282   char const *const *ccp;
19283   char **p;
19284   /* NEC SVR4.0.2 mips cc rejects this.  */
19285   struct point {int x, y;};
19286   static struct point const zero = {0,0};
19287   /* AIX XL C 1.02.0.0 rejects this.
19288      It does not let you subtract one const X* pointer from another in
19289      an arm of an if-expression whose if-part is not a constant
19290      expression */
19291   const char *g = "string";
19292   ccp = &g + (g ? g-g : 0);
19293   /* HPUX 7.0 cc rejects these. */
19294   ++ccp;
19295   p = (char**) ccp;
19296   ccp = (char const *const *) p;
19297   { /* SCO 3.2v4 cc rejects this.  */
19298     char *t;
19299     char const *s = 0 ? (char *) 0 : (char const *) 0;
19300
19301     *t++ = 0;
19302   }
19303   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
19304     int x[] = {25, 17};
19305     const int *foo = &x[0];
19306     ++foo;
19307   }
19308   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19309     typedef const int *iptr;
19310     iptr p = 0;
19311     ++p;
19312   }
19313   { /* AIX XL C 1.02.0.0 rejects this saying
19314        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19315     struct s { int j; const int *ap[3]; };
19316     struct s *b; b->j = 5;
19317   }
19318   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19319     const int foo = 10;
19320   }
19321 #endif
19322
19323   ;
19324   return 0;
19325 }
19326 _ACEOF
19327 rm -f conftest.$ac_objext
19328 if { (eval echo "$as_me:19328: \"$ac_compile\"") >&5
19329   (eval $ac_compile) 2>&5
19330   ac_status=$?
19331   echo "$as_me:19331: \$? = $ac_status" >&5
19332   (exit $ac_status); } &&
19333          { ac_try='test -s conftest.$ac_objext'
19334   { (eval echo "$as_me:19334: \"$ac_try\"") >&5
19335   (eval $ac_try) 2>&5
19336   ac_status=$?
19337   echo "$as_me:19337: \$? = $ac_status" >&5
19338   (exit $ac_status); }; }; then
19339   ac_cv_c_const=yes
19340 else
19341   echo "$as_me: failed program was:" >&5
19342 cat conftest.$ac_ext >&5
19343 ac_cv_c_const=no
19344 fi
19345 rm -f conftest.$ac_objext conftest.$ac_ext
19346 fi
19347 echo "$as_me:19347: result: $ac_cv_c_const" >&5
19348 echo "${ECHO_T}$ac_cv_c_const" >&6
19349 if test $ac_cv_c_const = no; then
19350
19351 cat >>confdefs.h <<\EOF
19352 #define const
19353 EOF
19354
19355 fi
19356
19357 echo "$as_me:19357: checking for inline" >&5
19358 echo $ECHO_N "checking for inline... $ECHO_C" >&6
19359 if test "${ac_cv_c_inline+set}" = set; then
19360   echo $ECHO_N "(cached) $ECHO_C" >&6
19361 else
19362   ac_cv_c_inline=no
19363 for ac_kw in inline __inline__ __inline; do
19364   cat >conftest.$ac_ext <<_ACEOF
19365 #line 19365 "configure"
19366 #include "confdefs.h"
19367 #ifndef __cplusplus
19368 static $ac_kw int static_foo () {return 0; }
19369 $ac_kw int foo () {return 0; }
19370 #endif
19371
19372 _ACEOF
19373 rm -f conftest.$ac_objext
19374 if { (eval echo "$as_me:19374: \"$ac_compile\"") >&5
19375   (eval $ac_compile) 2>&5
19376   ac_status=$?
19377   echo "$as_me:19377: \$? = $ac_status" >&5
19378   (exit $ac_status); } &&
19379          { ac_try='test -s conftest.$ac_objext'
19380   { (eval echo "$as_me:19380: \"$ac_try\"") >&5
19381   (eval $ac_try) 2>&5
19382   ac_status=$?
19383   echo "$as_me:19383: \$? = $ac_status" >&5
19384   (exit $ac_status); }; }; then
19385   ac_cv_c_inline=$ac_kw; break
19386 else
19387   echo "$as_me: failed program was:" >&5
19388 cat conftest.$ac_ext >&5
19389 fi
19390 rm -f conftest.$ac_objext conftest.$ac_ext
19391 done
19392
19393 fi
19394 echo "$as_me:19394: result: $ac_cv_c_inline" >&5
19395 echo "${ECHO_T}$ac_cv_c_inline" >&6
19396 case $ac_cv_c_inline in
19397   inline | yes) ;;
19398   no)
19399 cat >>confdefs.h <<\EOF
19400 #define inline
19401 EOF
19402  ;;
19403   *)  cat >>confdefs.h <<EOF
19404 #define inline $ac_cv_c_inline
19405 EOF
19406  ;;
19407 esac
19408
19409 NCURSES_INLINE=
19410 if test "$ac_cv_c_inline" != no ; then
19411         NCURSES_INLINE=inline
19412         if test "$INTEL_COMPILER" = yes
19413         then
19414                 :
19415         elif test "$CLANG_COMPILER" = yes
19416         then
19417                 :
19418         elif test "$GCC" = yes
19419         then
19420                 echo "$as_me:19420: checking if $CC supports options to tune inlining" >&5
19421 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19422 if test "${cf_cv_gcc_inline+set}" = set; then
19423   echo $ECHO_N "(cached) $ECHO_C" >&6
19424 else
19425
19426                 cf_save_CFLAGS=$CFLAGS
19427                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19428                 cat >conftest.$ac_ext <<_ACEOF
19429 #line 19429 "configure"
19430 #include "confdefs.h"
19431 inline int foo(void) { return 1; }
19432 int
19433 main (void)
19434 {
19435 ${cf_cv_main_return:-return} foo()
19436   ;
19437   return 0;
19438 }
19439 _ACEOF
19440 rm -f conftest.$ac_objext
19441 if { (eval echo "$as_me:19441: \"$ac_compile\"") >&5
19442   (eval $ac_compile) 2>&5
19443   ac_status=$?
19444   echo "$as_me:19444: \$? = $ac_status" >&5
19445   (exit $ac_status); } &&
19446          { ac_try='test -s conftest.$ac_objext'
19447   { (eval echo "$as_me:19447: \"$ac_try\"") >&5
19448   (eval $ac_try) 2>&5
19449   ac_status=$?
19450   echo "$as_me:19450: \$? = $ac_status" >&5
19451   (exit $ac_status); }; }; then
19452   cf_cv_gcc_inline=yes
19453 else
19454   echo "$as_me: failed program was:" >&5
19455 cat conftest.$ac_ext >&5
19456 cf_cv_gcc_inline=no
19457 fi
19458 rm -f conftest.$ac_objext conftest.$ac_ext
19459                 CFLAGS=$cf_save_CFLAGS
19460
19461 fi
19462 echo "$as_me:19462: result: $cf_cv_gcc_inline" >&5
19463 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19464                 if test "$cf_cv_gcc_inline" = yes ; then
19465
19466 cf_fix_cppflags=no
19467 cf_new_cflags=
19468 cf_new_cppflags=
19469 cf_new_extra_cppflags=
19470
19471 for cf_add_cflags in --param max-inline-insns-single=1200
19472 do
19473 case $cf_fix_cppflags in
19474 (no)
19475         case $cf_add_cflags in
19476         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19477                 case $cf_add_cflags in
19478                 (-D*)
19479                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19480
19481                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19482                                 && test -z "${cf_tst_cflags}" \
19483                                 && cf_fix_cppflags=yes
19484
19485                         if test $cf_fix_cppflags = yes ; then
19486
19487         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19488         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19489
19490                                 continue
19491                         elif test "${cf_tst_cflags}" = "\"'" ; then
19492
19493         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19494         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19495
19496                                 continue
19497                         fi
19498                         ;;
19499                 esac
19500                 case "$CPPFLAGS" in
19501                 (*$cf_add_cflags)
19502                         ;;
19503                 (*)
19504                         case $cf_add_cflags in
19505                         (-D*)
19506                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19507
19508 CPPFLAGS=`echo "$CPPFLAGS" | \
19509         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19510                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19511
19512                                 ;;
19513                         esac
19514
19515         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19516         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19517
19518                         ;;
19519                 esac
19520                 ;;
19521         (*)
19522
19523         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19524         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19525
19526                 ;;
19527         esac
19528         ;;
19529 (yes)
19530
19531         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19532         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19533
19534         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19535
19536         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19537                 && test -z "${cf_tst_cflags}" \
19538                 && cf_fix_cppflags=no
19539         ;;
19540 esac
19541 done
19542
19543 if test -n "$cf_new_cflags" ; then
19544
19545         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19546         CFLAGS="${CFLAGS}$cf_new_cflags"
19547
19548 fi
19549
19550 if test -n "$cf_new_cppflags" ; then
19551
19552         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19553         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19554
19555 fi
19556
19557 if test -n "$cf_new_extra_cppflags" ; then
19558
19559         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19560         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19561
19562 fi
19563
19564                 fi
19565         fi
19566 fi
19567
19568 echo "$as_me:19568: checking for signal global datatype" >&5
19569 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19570 if test "${cf_cv_sig_atomic_t+set}" = set; then
19571   echo $ECHO_N "(cached) $ECHO_C" >&6
19572 else
19573
19574         for cf_type in \
19575                 "volatile sig_atomic_t" \
19576                 "sig_atomic_t" \
19577                 "int"
19578         do
19579         cat >conftest.$ac_ext <<_ACEOF
19580 #line 19580 "configure"
19581 #include "confdefs.h"
19582
19583 #include <sys/types.h>
19584 #include <signal.h>
19585 #include <stdio.h>
19586
19587 extern $cf_type x;
19588 $cf_type x;
19589 static void handler(int sig)
19590 {
19591         (void)sig;
19592         x = 5;
19593 }
19594 int
19595 main (void)
19596 {
19597 signal(SIGINT, handler);
19598                  x = 1
19599   ;
19600   return 0;
19601 }
19602 _ACEOF
19603 rm -f conftest.$ac_objext
19604 if { (eval echo "$as_me:19604: \"$ac_compile\"") >&5
19605   (eval $ac_compile) 2>&5
19606   ac_status=$?
19607   echo "$as_me:19607: \$? = $ac_status" >&5
19608   (exit $ac_status); } &&
19609          { ac_try='test -s conftest.$ac_objext'
19610   { (eval echo "$as_me:19610: \"$ac_try\"") >&5
19611   (eval $ac_try) 2>&5
19612   ac_status=$?
19613   echo "$as_me:19613: \$? = $ac_status" >&5
19614   (exit $ac_status); }; }; then
19615   cf_cv_sig_atomic_t=$cf_type
19616 else
19617   echo "$as_me: failed program was:" >&5
19618 cat conftest.$ac_ext >&5
19619 cf_cv_sig_atomic_t=no
19620 fi
19621 rm -f conftest.$ac_objext conftest.$ac_ext
19622                 test "$cf_cv_sig_atomic_t" != no && break
19623         done
19624
19625 fi
19626
19627 echo "$as_me:19627: result: $cf_cv_sig_atomic_t" >&5
19628 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19629 test "$cf_cv_sig_atomic_t" != no &&
19630 cat >>confdefs.h <<EOF
19631 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19632 EOF
19633
19634 if test $NCURSES_CHTYPE = auto ; then
19635
19636 echo "$as_me:19636: checking for type of chtype" >&5
19637 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19638 if test "${cf_cv_typeof_chtype+set}" = set; then
19639   echo $ECHO_N "(cached) $ECHO_C" >&6
19640 else
19641
19642                 if test "$cross_compiling" = yes; then
19643   cf_cv_typeof_chtype=long
19644 else
19645   cat >conftest.$ac_ext <<_ACEOF
19646 #line 19646 "configure"
19647 #include "confdefs.h"
19648
19649 #define WANT_BITS 31
19650 #include <stdio.h>
19651 int main(void)
19652 {
19653         FILE *fp = fopen("cf_test.out", "w");
19654         if (fp != 0) {
19655                 char *result = "long";
19656                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19657                         int n;
19658                         unsigned int x, y;
19659                         for (n = 0; n < WANT_BITS; n++) {
19660                                 x = (1 << n);
19661                                 y = (x >> n);
19662                                 if (y != 1 || x == 0) {
19663                                         x = 0;
19664                                         break;
19665                                 }
19666                         }
19667                         /*
19668                          * If x is nonzero, an int is big enough for the bits
19669                          * that we want.
19670                          */
19671                         result = (x != 0) ? "int" : "long";
19672                 }
19673                 fputs(result, fp);
19674                 fclose(fp);
19675         }
19676         ${cf_cv_main_return:-return}(0);
19677 }
19678
19679 _ACEOF
19680 rm -f conftest$ac_exeext
19681 if { (eval echo "$as_me:19681: \"$ac_link\"") >&5
19682   (eval $ac_link) 2>&5
19683   ac_status=$?
19684   echo "$as_me:19684: \$? = $ac_status" >&5
19685   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19686   { (eval echo "$as_me:19686: \"$ac_try\"") >&5
19687   (eval $ac_try) 2>&5
19688   ac_status=$?
19689   echo "$as_me:19689: \$? = $ac_status" >&5
19690   (exit $ac_status); }; }; then
19691   cf_cv_typeof_chtype=`cat cf_test.out`
19692 else
19693   echo "$as_me: program exited with status $ac_status" >&5
19694 echo "$as_me: failed program was:" >&5
19695 cat conftest.$ac_ext >&5
19696 cf_cv_typeof_chtype=long
19697 fi
19698 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19699 fi
19700                 rm -f cf_test.out
19701
19702 fi
19703
19704 echo "$as_me:19704: result: $cf_cv_typeof_chtype" >&5
19705 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19706
19707 cat >>confdefs.h <<EOF
19708 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19709 EOF
19710
19711 else
19712         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19713 fi
19714 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19715
19716 echo "$as_me:19716: checking if unsigned literals are legal" >&5
19717 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19718 if test "${cf_cv_unsigned_literals+set}" = set; then
19719   echo $ECHO_N "(cached) $ECHO_C" >&6
19720 else
19721
19722         cat >conftest.$ac_ext <<_ACEOF
19723 #line 19723 "configure"
19724 #include "confdefs.h"
19725
19726 int
19727 main (void)
19728 {
19729 long x = 1L + 1UL + 1U + 1
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   cf_cv_unsigned_literals=yes
19747 else
19748   echo "$as_me: failed program was:" >&5
19749 cat conftest.$ac_ext >&5
19750 cf_cv_unsigned_literals=no
19751 fi
19752 rm -f conftest.$ac_objext conftest.$ac_ext
19753
19754 fi
19755
19756 echo "$as_me:19756: result: $cf_cv_unsigned_literals" >&5
19757 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19758
19759 cf_cv_1UL="1"
19760 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19761 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19762
19763 if test $NCURSES_MMASK_T = auto ; then
19764         cf_cv_typeof_mmask_t=long
19765 else
19766         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19767 fi
19768 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19769
19770 ###     Checks for external-data
19771
19772 echo "$as_me:19772: checking if external errno is declared" >&5
19773 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19774 if test "${cf_cv_dcl_errno+set}" = set; then
19775   echo $ECHO_N "(cached) $ECHO_C" >&6
19776 else
19777
19778         cat >conftest.$ac_ext <<_ACEOF
19779 #line 19779 "configure"
19780 #include "confdefs.h"
19781
19782 #ifdef HAVE_STDLIB_H
19783 #include <stdlib.h>
19784 #endif
19785 #include <stdio.h>
19786 #include <sys/types.h>
19787 #include <errno.h>
19788 int
19789 main (void)
19790 {
19791 int x = (int) errno; (void)x
19792   ;
19793   return 0;
19794 }
19795 _ACEOF
19796 rm -f conftest.$ac_objext
19797 if { (eval echo "$as_me:19797: \"$ac_compile\"") >&5
19798   (eval $ac_compile) 2>&5
19799   ac_status=$?
19800   echo "$as_me:19800: \$? = $ac_status" >&5
19801   (exit $ac_status); } &&
19802          { ac_try='test -s conftest.$ac_objext'
19803   { (eval echo "$as_me:19803: \"$ac_try\"") >&5
19804   (eval $ac_try) 2>&5
19805   ac_status=$?
19806   echo "$as_me:19806: \$? = $ac_status" >&5
19807   (exit $ac_status); }; }; then
19808   cf_cv_dcl_errno=yes
19809 else
19810   echo "$as_me: failed program was:" >&5
19811 cat conftest.$ac_ext >&5
19812 cf_cv_dcl_errno=no
19813 fi
19814 rm -f conftest.$ac_objext conftest.$ac_ext
19815
19816 fi
19817 echo "$as_me:19817: result: $cf_cv_dcl_errno" >&5
19818 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19819
19820 if test "$cf_cv_dcl_errno" = no ; then
19821
19822 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19823
19824         cat >>confdefs.h <<EOF
19825 #define $cf_result 1
19826 EOF
19827
19828 fi
19829
19830 # It's possible (for near-UNIX clones) that the data doesn't exist
19831
19832 echo "$as_me:19832: checking if external errno exists" >&5
19833 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19834 if test "${cf_cv_have_errno+set}" = set; then
19835   echo $ECHO_N "(cached) $ECHO_C" >&6
19836 else
19837
19838         cat >conftest.$ac_ext <<_ACEOF
19839 #line 19839 "configure"
19840 #include "confdefs.h"
19841
19842 #undef errno
19843 extern int errno;
19844
19845 int
19846 main (void)
19847 {
19848 errno = 2
19849   ;
19850   return 0;
19851 }
19852 _ACEOF
19853 rm -f conftest.$ac_objext conftest$ac_exeext
19854 if { (eval echo "$as_me:19854: \"$ac_link\"") >&5
19855   (eval $ac_link) 2>&5
19856   ac_status=$?
19857   echo "$as_me:19857: \$? = $ac_status" >&5
19858   (exit $ac_status); } &&
19859          { ac_try='test -s conftest$ac_exeext'
19860   { (eval echo "$as_me:19860: \"$ac_try\"") >&5
19861   (eval $ac_try) 2>&5
19862   ac_status=$?
19863   echo "$as_me:19863: \$? = $ac_status" >&5
19864   (exit $ac_status); }; }; then
19865   cf_cv_have_errno=yes
19866 else
19867   echo "$as_me: failed program was:" >&5
19868 cat conftest.$ac_ext >&5
19869 cf_cv_have_errno=no
19870 fi
19871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19872
19873 fi
19874 echo "$as_me:19874: result: $cf_cv_have_errno" >&5
19875 echo "${ECHO_T}$cf_cv_have_errno" >&6
19876
19877 if test "$cf_cv_have_errno" = yes ; then
19878
19879 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19880
19881         cat >>confdefs.h <<EOF
19882 #define $cf_result 1
19883 EOF
19884
19885 fi
19886
19887 echo "$as_me:19887: checking if data-only library module links" >&5
19888 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19889 if test "${cf_cv_link_dataonly+set}" = set; then
19890   echo $ECHO_N "(cached) $ECHO_C" >&6
19891 else
19892
19893         rm -f conftest.a
19894         cat >conftest.$ac_ext <<EOF
19895 #line 19895 "configure"
19896 int     testdata[3] = { 123, 456, 789 };
19897 EOF
19898         if { (eval echo "$as_me:19898: \"$ac_compile\"") >&5
19899   (eval $ac_compile) 2>&5
19900   ac_status=$?
19901   echo "$as_me:19901: \$? = $ac_status" >&5
19902   (exit $ac_status); } ; then
19903                 mv conftest.o data.o && \
19904                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19905         fi
19906         rm -f conftest.$ac_ext data.o
19907         cat >conftest.$ac_ext <<EOF
19908 #line 19908 "configure"
19909 int     testfunc(void)
19910 {
19911 #if defined(NeXT)
19912         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
19913 #else
19914         extern int testdata[3];
19915         return testdata[0] == 123
19916            &&  testdata[1] == 456
19917            &&  testdata[2] == 789;
19918 #endif
19919 }
19920 EOF
19921         if { (eval echo "$as_me:19921: \"$ac_compile\"") >&5
19922   (eval $ac_compile) 2>&5
19923   ac_status=$?
19924   echo "$as_me:19924: \$? = $ac_status" >&5
19925   (exit $ac_status); }; then
19926                 mv conftest.o func.o && \
19927                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19928         fi
19929         rm -f conftest.$ac_ext func.o
19930         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19931         cf_saveLIBS="$LIBS"
19932         LIBS="conftest.a $LIBS"
19933         if test "$cross_compiling" = yes; then
19934   cf_cv_link_dataonly=unknown
19935 else
19936   cat >conftest.$ac_ext <<_ACEOF
19937 #line 19937 "configure"
19938 #include "confdefs.h"
19939
19940         int main(void)
19941         {
19942                 extern int testfunc();
19943                 ${cf_cv_main_return:-return} (!testfunc());
19944         }
19945
19946 _ACEOF
19947 rm -f conftest$ac_exeext
19948 if { (eval echo "$as_me:19948: \"$ac_link\"") >&5
19949   (eval $ac_link) 2>&5
19950   ac_status=$?
19951   echo "$as_me:19951: \$? = $ac_status" >&5
19952   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19953   { (eval echo "$as_me:19953: \"$ac_try\"") >&5
19954   (eval $ac_try) 2>&5
19955   ac_status=$?
19956   echo "$as_me:19956: \$? = $ac_status" >&5
19957   (exit $ac_status); }; }; then
19958   cf_cv_link_dataonly=yes
19959 else
19960   echo "$as_me: program exited with status $ac_status" >&5
19961 echo "$as_me: failed program was:" >&5
19962 cat conftest.$ac_ext >&5
19963 cf_cv_link_dataonly=no
19964 fi
19965 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19966 fi
19967         LIBS="$cf_saveLIBS"
19968
19969 fi
19970
19971 echo "$as_me:19971: result: $cf_cv_link_dataonly" >&5
19972 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19973
19974 if test "$cf_cv_link_dataonly" = no ; then
19975
19976 cat >>confdefs.h <<\EOF
19977 #define BROKEN_LINKER 1
19978 EOF
19979
19980         BROKEN_LINKER=1
19981 fi
19982
19983 ###     Checks for library functions.
19984
19985 for ac_func in \
19986 getcwd \
19987 getegid \
19988 geteuid \
19989 getopt \
19990 getttynam \
19991 issetugid \
19992 localeconv \
19993 poll \
19994 putenv \
19995 remove \
19996 select \
19997 setbuf \
19998 setbuffer \
19999 setenv \
20000 setvbuf \
20001 sigaction \
20002 sigvec \
20003 strdup \
20004 strstr \
20005 sysconf \
20006 tcgetpgrp \
20007 times \
20008 tsearch \
20009 vsnprintf \
20010
20011 do
20012 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20013 echo "$as_me:20013: checking for $ac_func" >&5
20014 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20015 if eval "test \"\${$as_ac_var+set}\" = set"; then
20016   echo $ECHO_N "(cached) $ECHO_C" >&6
20017 else
20018   cat >conftest.$ac_ext <<_ACEOF
20019 #line 20019 "configure"
20020 #include "confdefs.h"
20021 #define $ac_func autoconf_temporary
20022 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20023 #undef $ac_func
20024
20025 #ifdef __cplusplus
20026 extern "C"
20027 #endif
20028
20029 /* We use char because int might match the return type of a gcc2
20030    builtin and then its argument prototype would still apply.  */
20031 char $ac_func (void);
20032
20033 int
20034 main (void)
20035 {
20036
20037 /* The GNU C library defines stubs for functions which it implements
20038     to always fail with ENOSYS.  Some functions are actually named
20039     something starting with __ and the normal name is an alias.  */
20040 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20041 #error found stub for $ac_func
20042 #endif
20043
20044         return $ac_func ();
20045   ;
20046   return 0;
20047 }
20048 _ACEOF
20049 rm -f conftest.$ac_objext conftest$ac_exeext
20050 if { (eval echo "$as_me:20050: \"$ac_link\"") >&5
20051   (eval $ac_link) 2>&5
20052   ac_status=$?
20053   echo "$as_me:20053: \$? = $ac_status" >&5
20054   (exit $ac_status); } &&
20055          { ac_try='test -s conftest$ac_exeext'
20056   { (eval echo "$as_me:20056: \"$ac_try\"") >&5
20057   (eval $ac_try) 2>&5
20058   ac_status=$?
20059   echo "$as_me:20059: \$? = $ac_status" >&5
20060   (exit $ac_status); }; }; then
20061   eval "$as_ac_var=yes"
20062 else
20063   echo "$as_me: failed program was:" >&5
20064 cat conftest.$ac_ext >&5
20065 eval "$as_ac_var=no"
20066 fi
20067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20068 fi
20069 echo "$as_me:20069: result: `eval echo '${'$as_ac_var'}'`" >&5
20070 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20071 if test `eval echo '${'$as_ac_var'}'` = yes; then
20072   cat >>confdefs.h <<EOF
20073 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20074 EOF
20075
20076 fi
20077 done
20078
20079 if test "x$ac_cv_func_getopt" = xno && \
20080    test "x$cf_with_progs$cf_with_tests" != xnono; then
20081         { { echo "$as_me:20081: error: getopt is required for building programs" >&5
20082 echo "$as_me: error: getopt is required for building programs" >&2;}
20083    { (exit 1); exit 1; }; }
20084 fi
20085
20086 if test "x$with_safe_sprintf" = xyes
20087 then
20088         if test "x$ac_cv_func_vsnprintf" = xyes
20089         then
20090                 { echo "$as_me:20090: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20091 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20092         else
20093
20094 cat >>confdefs.h <<\EOF
20095 #define USE_SAFE_SPRINTF 1
20096 EOF
20097
20098         fi
20099 fi
20100
20101 if test "x$with_getcap" = "xyes" ; then
20102
20103 echo "$as_me:20103: checking for terminal-capability database functions" >&5
20104 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20105 if test "${cf_cv_cgetent+set}" = set; then
20106   echo $ECHO_N "(cached) $ECHO_C" >&6
20107 else
20108
20109 cat >conftest.$ac_ext <<_ACEOF
20110 #line 20110 "configure"
20111 #include "confdefs.h"
20112
20113 #include <stdlib.h>
20114 int
20115 main (void)
20116 {
20117
20118         char temp[128];
20119         char *buf = temp;
20120         char *db_array = temp;
20121         cgetent(&buf, &db_array, "vt100");
20122         cgetcap(buf, "tc", '=');
20123         cgetmatch(buf, "tc");
20124
20125   ;
20126   return 0;
20127 }
20128 _ACEOF
20129 rm -f conftest.$ac_objext conftest$ac_exeext
20130 if { (eval echo "$as_me:20130: \"$ac_link\"") >&5
20131   (eval $ac_link) 2>&5
20132   ac_status=$?
20133   echo "$as_me:20133: \$? = $ac_status" >&5
20134   (exit $ac_status); } &&
20135          { ac_try='test -s conftest$ac_exeext'
20136   { (eval echo "$as_me:20136: \"$ac_try\"") >&5
20137   (eval $ac_try) 2>&5
20138   ac_status=$?
20139   echo "$as_me:20139: \$? = $ac_status" >&5
20140   (exit $ac_status); }; }; then
20141   cf_cv_cgetent=yes
20142 else
20143   echo "$as_me: failed program was:" >&5
20144 cat conftest.$ac_ext >&5
20145 cf_cv_cgetent=no
20146 fi
20147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20148
20149 fi
20150 echo "$as_me:20150: result: $cf_cv_cgetent" >&5
20151 echo "${ECHO_T}$cf_cv_cgetent" >&6
20152
20153 if test "$cf_cv_cgetent" = yes
20154 then
20155
20156 cat >>confdefs.h <<\EOF
20157 #define HAVE_BSD_CGETENT 1
20158 EOF
20159
20160 echo "$as_me:20160: checking if cgetent uses const parameter" >&5
20161 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20162 if test "${cf_cv_cgetent_const+set}" = set; then
20163   echo $ECHO_N "(cached) $ECHO_C" >&6
20164 else
20165
20166 cat >conftest.$ac_ext <<_ACEOF
20167 #line 20167 "configure"
20168 #include "confdefs.h"
20169
20170 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20171 #include <stdlib.h>
20172 int
20173 main (void)
20174 {
20175
20176         char temp[128];
20177         char *buf = temp;
20178 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
20179         const char *db_array = temp;
20180         cgetent(&buf, &db_array, "vt100");
20181 #endif
20182         cgetcap(buf, "tc", '=');
20183         cgetmatch(buf, "tc");
20184
20185   ;
20186   return 0;
20187 }
20188 _ACEOF
20189 rm -f conftest.$ac_objext conftest$ac_exeext
20190 if { (eval echo "$as_me:20190: \"$ac_link\"") >&5
20191   (eval $ac_link) 2>&5
20192   ac_status=$?
20193   echo "$as_me:20193: \$? = $ac_status" >&5
20194   (exit $ac_status); } &&
20195          { ac_try='test -s conftest$ac_exeext'
20196   { (eval echo "$as_me:20196: \"$ac_try\"") >&5
20197   (eval $ac_try) 2>&5
20198   ac_status=$?
20199   echo "$as_me:20199: \$? = $ac_status" >&5
20200   (exit $ac_status); }; }; then
20201   cf_cv_cgetent_const=yes
20202 else
20203   echo "$as_me: failed program was:" >&5
20204 cat conftest.$ac_ext >&5
20205 cf_cv_cgetent_const=no
20206 fi
20207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20208
20209 fi
20210 echo "$as_me:20210: result: $cf_cv_cgetent_const" >&5
20211 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
20212         if test "$cf_cv_cgetent_const" = yes
20213         then
20214
20215 cat >>confdefs.h <<EOF
20216 #define CGETENT_CONST const
20217 EOF
20218
20219         fi
20220 fi
20221
20222 fi
20223
20224 echo "$as_me:20224: checking for isascii" >&5
20225 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
20226 if test "${cf_cv_have_isascii+set}" = set; then
20227   echo $ECHO_N "(cached) $ECHO_C" >&6
20228 else
20229
20230         cat >conftest.$ac_ext <<_ACEOF
20231 #line 20231 "configure"
20232 #include "confdefs.h"
20233 #include <ctype.h>
20234 int
20235 main (void)
20236 {
20237 int x = isascii(' ')
20238   ;
20239   return 0;
20240 }
20241 _ACEOF
20242 rm -f conftest.$ac_objext conftest$ac_exeext
20243 if { (eval echo "$as_me:20243: \"$ac_link\"") >&5
20244   (eval $ac_link) 2>&5
20245   ac_status=$?
20246   echo "$as_me:20246: \$? = $ac_status" >&5
20247   (exit $ac_status); } &&
20248          { ac_try='test -s conftest$ac_exeext'
20249   { (eval echo "$as_me:20249: \"$ac_try\"") >&5
20250   (eval $ac_try) 2>&5
20251   ac_status=$?
20252   echo "$as_me:20252: \$? = $ac_status" >&5
20253   (exit $ac_status); }; }; then
20254   cf_cv_have_isascii=yes
20255 else
20256   echo "$as_me: failed program was:" >&5
20257 cat conftest.$ac_ext >&5
20258 cf_cv_have_isascii=no
20259 fi
20260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20261
20262 fi
20263 echo "$as_me:20263: result: $cf_cv_have_isascii" >&5
20264 echo "${ECHO_T}$cf_cv_have_isascii" >&6
20265 test "$cf_cv_have_isascii" = yes &&
20266 cat >>confdefs.h <<\EOF
20267 #define HAVE_ISASCII 1
20268 EOF
20269
20270 if test "$ac_cv_func_sigaction" = yes; then
20271 echo "$as_me:20271: checking whether sigaction needs _POSIX_SOURCE" >&5
20272 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
20273 cat >conftest.$ac_ext <<_ACEOF
20274 #line 20274 "configure"
20275 #include "confdefs.h"
20276
20277 #include <sys/types.h>
20278 #include <signal.h>
20279 int
20280 main (void)
20281 {
20282 struct sigaction act
20283   ;
20284   return 0;
20285 }
20286 _ACEOF
20287 rm -f conftest.$ac_objext
20288 if { (eval echo "$as_me:20288: \"$ac_compile\"") >&5
20289   (eval $ac_compile) 2>&5
20290   ac_status=$?
20291   echo "$as_me:20291: \$? = $ac_status" >&5
20292   (exit $ac_status); } &&
20293          { ac_try='test -s conftest.$ac_objext'
20294   { (eval echo "$as_me:20294: \"$ac_try\"") >&5
20295   (eval $ac_try) 2>&5
20296   ac_status=$?
20297   echo "$as_me:20297: \$? = $ac_status" >&5
20298   (exit $ac_status); }; }; then
20299   sigact_bad=no
20300 else
20301   echo "$as_me: failed program was:" >&5
20302 cat conftest.$ac_ext >&5
20303
20304 cat >conftest.$ac_ext <<_ACEOF
20305 #line 20305 "configure"
20306 #include "confdefs.h"
20307
20308 #define _POSIX_SOURCE
20309 #include <sys/types.h>
20310 #include <signal.h>
20311 int
20312 main (void)
20313 {
20314 struct sigaction act
20315   ;
20316   return 0;
20317 }
20318 _ACEOF
20319 rm -f conftest.$ac_objext
20320 if { (eval echo "$as_me:20320: \"$ac_compile\"") >&5
20321   (eval $ac_compile) 2>&5
20322   ac_status=$?
20323   echo "$as_me:20323: \$? = $ac_status" >&5
20324   (exit $ac_status); } &&
20325          { ac_try='test -s conftest.$ac_objext'
20326   { (eval echo "$as_me:20326: \"$ac_try\"") >&5
20327   (eval $ac_try) 2>&5
20328   ac_status=$?
20329   echo "$as_me:20329: \$? = $ac_status" >&5
20330   (exit $ac_status); }; }; then
20331   sigact_bad=yes
20332
20333 cat >>confdefs.h <<\EOF
20334 #define _POSIX_SOURCE 1
20335 EOF
20336
20337 else
20338   echo "$as_me: failed program was:" >&5
20339 cat conftest.$ac_ext >&5
20340 sigact_bad=unknown
20341 fi
20342 rm -f conftest.$ac_objext conftest.$ac_ext
20343 fi
20344 rm -f conftest.$ac_objext conftest.$ac_ext
20345 echo "$as_me:20345: result: $sigact_bad" >&5
20346 echo "${ECHO_T}$sigact_bad" >&6
20347 fi
20348
20349 echo "$as_me:20349: checking if nanosleep really works" >&5
20350 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
20351 if test "${cf_cv_func_nanosleep+set}" = set; then
20352   echo $ECHO_N "(cached) $ECHO_C" >&6
20353 else
20354
20355 if test "$cross_compiling" = yes; then
20356   cf_cv_func_nanosleep=unknown
20357 else
20358   cat >conftest.$ac_ext <<_ACEOF
20359 #line 20359 "configure"
20360 #include "confdefs.h"
20361
20362 #include <stdio.h>
20363 #include <errno.h>
20364 #include <time.h>
20365
20366 #ifdef HAVE_SYS_TIME_H
20367 #include <sys/time.h>
20368 #endif
20369
20370 int main(void) {
20371         struct timespec ts1, ts2;
20372         int code;
20373         ts1.tv_sec  = 0;
20374         ts1.tv_nsec = 750000000;
20375         ts2.tv_sec  = 0;
20376         ts2.tv_nsec = 0;
20377         errno = 0;
20378         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20379         ${cf_cv_main_return:-return}(code != 0);
20380 }
20381
20382 _ACEOF
20383 rm -f conftest$ac_exeext
20384 if { (eval echo "$as_me:20384: \"$ac_link\"") >&5
20385   (eval $ac_link) 2>&5
20386   ac_status=$?
20387   echo "$as_me:20387: \$? = $ac_status" >&5
20388   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20389   { (eval echo "$as_me:20389: \"$ac_try\"") >&5
20390   (eval $ac_try) 2>&5
20391   ac_status=$?
20392   echo "$as_me:20392: \$? = $ac_status" >&5
20393   (exit $ac_status); }; }; then
20394   cf_cv_func_nanosleep=yes
20395 else
20396   echo "$as_me: program exited with status $ac_status" >&5
20397 echo "$as_me: failed program was:" >&5
20398 cat conftest.$ac_ext >&5
20399 cf_cv_func_nanosleep=no
20400 fi
20401 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20402 fi
20403 fi
20404 echo "$as_me:20404: result: $cf_cv_func_nanosleep" >&5
20405 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20406
20407 test "$cf_cv_func_nanosleep" = "yes" &&
20408 cat >>confdefs.h <<\EOF
20409 #define HAVE_NANOSLEEP 1
20410 EOF
20411
20412 for ac_header in \
20413 termio.h \
20414 termios.h \
20415 unistd.h \
20416 sys/ioctl.h \
20417 sys/termio.h \
20418
20419 do
20420 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20421 echo "$as_me:20421: checking for $ac_header" >&5
20422 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20423 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20424   echo $ECHO_N "(cached) $ECHO_C" >&6
20425 else
20426   cat >conftest.$ac_ext <<_ACEOF
20427 #line 20427 "configure"
20428 #include "confdefs.h"
20429 #include <$ac_header>
20430 _ACEOF
20431 if { (eval echo "$as_me:20431: \"$ac_cpp conftest.$ac_ext\"") >&5
20432   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20433   ac_status=$?
20434   egrep -v '^ *\+' conftest.er1 >conftest.err
20435   rm -f conftest.er1
20436   cat conftest.err >&5
20437   echo "$as_me:20437: \$? = $ac_status" >&5
20438   (exit $ac_status); } >/dev/null; then
20439   if test -s conftest.err; then
20440     ac_cpp_err=$ac_c_preproc_warn_flag
20441   else
20442     ac_cpp_err=
20443   fi
20444 else
20445   ac_cpp_err=yes
20446 fi
20447 if test -z "$ac_cpp_err"; then
20448   eval "$as_ac_Header=yes"
20449 else
20450   echo "$as_me: failed program was:" >&5
20451   cat conftest.$ac_ext >&5
20452   eval "$as_ac_Header=no"
20453 fi
20454 rm -f conftest.err conftest.$ac_ext
20455 fi
20456 echo "$as_me:20456: result: `eval echo '${'$as_ac_Header'}'`" >&5
20457 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20458 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20459   cat >>confdefs.h <<EOF
20460 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20461 EOF
20462
20463 fi
20464 done
20465
20466 if test "$ac_cv_header_termios_h" = yes ; then
20467         case "$CFLAGS $CPPFLAGS" in
20468         (*-D_POSIX_SOURCE*)
20469                 termios_bad=dunno ;;
20470         (*)     termios_bad=maybe ;;
20471         esac
20472         if test "$termios_bad" = maybe ; then
20473         echo "$as_me:20473: checking whether termios.h needs _POSIX_SOURCE" >&5
20474 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20475         cat >conftest.$ac_ext <<_ACEOF
20476 #line 20476 "configure"
20477 #include "confdefs.h"
20478 #include <termios.h>
20479 int
20480 main (void)
20481 {
20482 struct termios foo; int x = foo.c_iflag = 1; (void)x
20483   ;
20484   return 0;
20485 }
20486 _ACEOF
20487 rm -f conftest.$ac_objext
20488 if { (eval echo "$as_me:20488: \"$ac_compile\"") >&5
20489   (eval $ac_compile) 2>&5
20490   ac_status=$?
20491   echo "$as_me:20491: \$? = $ac_status" >&5
20492   (exit $ac_status); } &&
20493          { ac_try='test -s conftest.$ac_objext'
20494   { (eval echo "$as_me:20494: \"$ac_try\"") >&5
20495   (eval $ac_try) 2>&5
20496   ac_status=$?
20497   echo "$as_me:20497: \$? = $ac_status" >&5
20498   (exit $ac_status); }; }; then
20499   termios_bad=no
20500 else
20501   echo "$as_me: failed program was:" >&5
20502 cat conftest.$ac_ext >&5
20503
20504                 cat >conftest.$ac_ext <<_ACEOF
20505 #line 20505 "configure"
20506 #include "confdefs.h"
20507
20508 #define _POSIX_SOURCE
20509 #include <termios.h>
20510 int
20511 main (void)
20512 {
20513 struct termios foo; int x = foo.c_iflag = 2; (void)x
20514   ;
20515   return 0;
20516 }
20517 _ACEOF
20518 rm -f conftest.$ac_objext
20519 if { (eval echo "$as_me:20519: \"$ac_compile\"") >&5
20520   (eval $ac_compile) 2>&5
20521   ac_status=$?
20522   echo "$as_me:20522: \$? = $ac_status" >&5
20523   (exit $ac_status); } &&
20524          { ac_try='test -s conftest.$ac_objext'
20525   { (eval echo "$as_me:20525: \"$ac_try\"") >&5
20526   (eval $ac_try) 2>&5
20527   ac_status=$?
20528   echo "$as_me:20528: \$? = $ac_status" >&5
20529   (exit $ac_status); }; }; then
20530   termios_bad=unknown
20531 else
20532   echo "$as_me: failed program was:" >&5
20533 cat conftest.$ac_ext >&5
20534 termios_bad=yes
20535 cat >>confdefs.h <<\EOF
20536 #define _POSIX_SOURCE 1
20537 EOF
20538
20539 fi
20540 rm -f conftest.$ac_objext conftest.$ac_ext
20541
20542 fi
20543 rm -f conftest.$ac_objext conftest.$ac_ext
20544         echo "$as_me:20544: result: $termios_bad" >&5
20545 echo "${ECHO_T}$termios_bad" >&6
20546         fi
20547 fi
20548
20549 echo "$as_me:20549: checking for tcgetattr" >&5
20550 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20551 if test "${cf_cv_have_tcgetattr+set}" = set; then
20552   echo $ECHO_N "(cached) $ECHO_C" >&6
20553 else
20554
20555 cat >conftest.$ac_ext <<_ACEOF
20556 #line 20556 "configure"
20557 #include "confdefs.h"
20558
20559 #include <sys/types.h>
20560 #ifdef HAVE_UNISTD_H
20561 #include <unistd.h>
20562 #endif
20563 #ifdef HAVE_TERMIOS_H
20564 #include <termios.h>
20565 #define TTY struct termios
20566 #else
20567 #ifdef HAVE_TERMIO_H
20568 #include <termio.h>
20569 #define TTY struct termio
20570 #endif
20571 #endif
20572
20573 int
20574 main (void)
20575 {
20576
20577 TTY foo;
20578 tcgetattr(1, &foo);
20579   ;
20580   return 0;
20581 }
20582 _ACEOF
20583 rm -f conftest.$ac_objext conftest$ac_exeext
20584 if { (eval echo "$as_me:20584: \"$ac_link\"") >&5
20585   (eval $ac_link) 2>&5
20586   ac_status=$?
20587   echo "$as_me:20587: \$? = $ac_status" >&5
20588   (exit $ac_status); } &&
20589          { ac_try='test -s conftest$ac_exeext'
20590   { (eval echo "$as_me:20590: \"$ac_try\"") >&5
20591   (eval $ac_try) 2>&5
20592   ac_status=$?
20593   echo "$as_me:20593: \$? = $ac_status" >&5
20594   (exit $ac_status); }; }; then
20595   cf_cv_have_tcgetattr=yes
20596 else
20597   echo "$as_me: failed program was:" >&5
20598 cat conftest.$ac_ext >&5
20599 cf_cv_have_tcgetattr=no
20600 fi
20601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20602 fi
20603 echo "$as_me:20603: result: $cf_cv_have_tcgetattr" >&5
20604 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20605 test "$cf_cv_have_tcgetattr" = yes &&
20606 cat >>confdefs.h <<\EOF
20607 #define HAVE_TCGETATTR 1
20608 EOF
20609
20610 echo "$as_me:20610: checking for vsscanf function or workaround" >&5
20611 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20612 if test "${cf_cv_func_vsscanf+set}" = set; then
20613   echo $ECHO_N "(cached) $ECHO_C" >&6
20614 else
20615
20616 cat >conftest.$ac_ext <<_ACEOF
20617 #line 20617 "configure"
20618 #include "confdefs.h"
20619
20620 #include <stdarg.h>
20621 #include <stdio.h>
20622 int
20623 main (void)
20624 {
20625
20626         va_list ap;
20627         vsscanf("from", "%d", ap)
20628   ;
20629   return 0;
20630 }
20631 _ACEOF
20632 rm -f conftest.$ac_objext conftest$ac_exeext
20633 if { (eval echo "$as_me:20633: \"$ac_link\"") >&5
20634   (eval $ac_link) 2>&5
20635   ac_status=$?
20636   echo "$as_me:20636: \$? = $ac_status" >&5
20637   (exit $ac_status); } &&
20638          { ac_try='test -s conftest$ac_exeext'
20639   { (eval echo "$as_me:20639: \"$ac_try\"") >&5
20640   (eval $ac_try) 2>&5
20641   ac_status=$?
20642   echo "$as_me:20642: \$? = $ac_status" >&5
20643   (exit $ac_status); }; }; then
20644   cf_cv_func_vsscanf=vsscanf
20645 else
20646   echo "$as_me: failed program was:" >&5
20647 cat conftest.$ac_ext >&5
20648
20649 cat >conftest.$ac_ext <<_ACEOF
20650 #line 20650 "configure"
20651 #include "confdefs.h"
20652
20653 #include <stdarg.h>
20654 #include <stdio.h>
20655 int
20656 main (void)
20657 {
20658
20659         FILE strbuf;
20660         char *str = "from";
20661
20662         strbuf._flag = _IOREAD;
20663         strbuf._ptr = strbuf._base = (unsigned char *) str;
20664         strbuf._cnt = strlen(str);
20665         strbuf._file = _NFILE;
20666         return (vfscanf(&strbuf, "%d", ap))
20667   ;
20668   return 0;
20669 }
20670 _ACEOF
20671 rm -f conftest.$ac_objext conftest$ac_exeext
20672 if { (eval echo "$as_me:20672: \"$ac_link\"") >&5
20673   (eval $ac_link) 2>&5
20674   ac_status=$?
20675   echo "$as_me:20675: \$? = $ac_status" >&5
20676   (exit $ac_status); } &&
20677          { ac_try='test -s conftest$ac_exeext'
20678   { (eval echo "$as_me:20678: \"$ac_try\"") >&5
20679   (eval $ac_try) 2>&5
20680   ac_status=$?
20681   echo "$as_me:20681: \$? = $ac_status" >&5
20682   (exit $ac_status); }; }; then
20683   cf_cv_func_vsscanf=vfscanf
20684 else
20685   echo "$as_me: failed program was:" >&5
20686 cat conftest.$ac_ext >&5
20687
20688 cat >conftest.$ac_ext <<_ACEOF
20689 #line 20689 "configure"
20690 #include "confdefs.h"
20691
20692 #include <stdarg.h>
20693 #include <stdio.h>
20694 int
20695 main (void)
20696 {
20697
20698         FILE strbuf;
20699         char *str = "from";
20700
20701         strbuf._flag = _IOREAD;
20702         strbuf._ptr = strbuf._base = (unsigned char *) str;
20703         strbuf._cnt = strlen(str);
20704         strbuf._file = _NFILE;
20705         return (_doscan(&strbuf, "%d", ap))
20706   ;
20707   return 0;
20708 }
20709 _ACEOF
20710 rm -f conftest.$ac_objext conftest$ac_exeext
20711 if { (eval echo "$as_me:20711: \"$ac_link\"") >&5
20712   (eval $ac_link) 2>&5
20713   ac_status=$?
20714   echo "$as_me:20714: \$? = $ac_status" >&5
20715   (exit $ac_status); } &&
20716          { ac_try='test -s conftest$ac_exeext'
20717   { (eval echo "$as_me:20717: \"$ac_try\"") >&5
20718   (eval $ac_try) 2>&5
20719   ac_status=$?
20720   echo "$as_me:20720: \$? = $ac_status" >&5
20721   (exit $ac_status); }; }; then
20722   cf_cv_func_vsscanf=_doscan
20723 else
20724   echo "$as_me: failed program was:" >&5
20725 cat conftest.$ac_ext >&5
20726
20727 cf_cv_func_vsscanf=no
20728 fi
20729 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20730 fi
20731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20732 fi
20733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20734 fi
20735 echo "$as_me:20735: result: $cf_cv_func_vsscanf" >&5
20736 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20737
20738 case $cf_cv_func_vsscanf in
20739 (vsscanf)
20740 cat >>confdefs.h <<\EOF
20741 #define HAVE_VSSCANF 1
20742 EOF
20743 ;;
20744 (vfscanf)
20745 cat >>confdefs.h <<\EOF
20746 #define HAVE_VFSCANF 1
20747 EOF
20748 ;;
20749 (_doscan)
20750 cat >>confdefs.h <<\EOF
20751 #define HAVE__DOSCAN 1
20752 EOF
20753 ;;
20754 esac
20755
20756 for ac_header in \
20757 unistd.h \
20758
20759 do
20760 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20761 echo "$as_me:20761: checking for $ac_header" >&5
20762 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20763 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20764   echo $ECHO_N "(cached) $ECHO_C" >&6
20765 else
20766   cat >conftest.$ac_ext <<_ACEOF
20767 #line 20767 "configure"
20768 #include "confdefs.h"
20769 #include <$ac_header>
20770 _ACEOF
20771 if { (eval echo "$as_me:20771: \"$ac_cpp conftest.$ac_ext\"") >&5
20772   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20773   ac_status=$?
20774   egrep -v '^ *\+' conftest.er1 >conftest.err
20775   rm -f conftest.er1
20776   cat conftest.err >&5
20777   echo "$as_me:20777: \$? = $ac_status" >&5
20778   (exit $ac_status); } >/dev/null; then
20779   if test -s conftest.err; then
20780     ac_cpp_err=$ac_c_preproc_warn_flag
20781   else
20782     ac_cpp_err=
20783   fi
20784 else
20785   ac_cpp_err=yes
20786 fi
20787 if test -z "$ac_cpp_err"; then
20788   eval "$as_ac_Header=yes"
20789 else
20790   echo "$as_me: failed program was:" >&5
20791   cat conftest.$ac_ext >&5
20792   eval "$as_ac_Header=no"
20793 fi
20794 rm -f conftest.err conftest.$ac_ext
20795 fi
20796 echo "$as_me:20796: result: `eval echo '${'$as_ac_Header'}'`" >&5
20797 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20798 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20799   cat >>confdefs.h <<EOF
20800 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20801 EOF
20802
20803 fi
20804 done
20805
20806 echo "$as_me:20806: checking for working mkstemp" >&5
20807 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20808 if test "${cf_cv_func_mkstemp+set}" = set; then
20809   echo $ECHO_N "(cached) $ECHO_C" >&6
20810 else
20811
20812 rm -rf conftest*
20813 if test "$cross_compiling" = yes; then
20814   cf_cv_func_mkstemp=maybe
20815 else
20816   cat >conftest.$ac_ext <<_ACEOF
20817 #line 20817 "configure"
20818 #include "confdefs.h"
20819
20820 #include <sys/types.h>
20821 #ifdef HAVE_UNISTD_H
20822 #include <unistd.h>
20823 #endif
20824 #include <stdlib.h>
20825 #include <stdio.h>
20826 #include <string.h>
20827 #include <sys/stat.h>
20828 int main(void)
20829 {
20830         char *tmpl = "conftestXXXXXX";
20831         char name[2][80];
20832         int n;
20833         int result = 0;
20834         int fd;
20835         struct stat sb;
20836
20837         umask(077);
20838         for (n = 0; n < 2; ++n) {
20839                 strcpy(name[n], tmpl);
20840                 if ((fd = mkstemp(name[n])) >= 0) {
20841                         if (!strcmp(name[n], tmpl)
20842                          || stat(name[n], &sb) != 0
20843                          || (sb.st_mode & S_IFMT) != S_IFREG
20844                          || (sb.st_mode & 077) != 0) {
20845                                 result = 1;
20846                         }
20847                         close(fd);
20848                 }
20849         }
20850         if (result == 0
20851          && !strcmp(name[0], name[1]))
20852                 result = 1;
20853         ${cf_cv_main_return:-return}(result);
20854 }
20855
20856 _ACEOF
20857 rm -f conftest$ac_exeext
20858 if { (eval echo "$as_me:20858: \"$ac_link\"") >&5
20859   (eval $ac_link) 2>&5
20860   ac_status=$?
20861   echo "$as_me:20861: \$? = $ac_status" >&5
20862   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20863   { (eval echo "$as_me:20863: \"$ac_try\"") >&5
20864   (eval $ac_try) 2>&5
20865   ac_status=$?
20866   echo "$as_me:20866: \$? = $ac_status" >&5
20867   (exit $ac_status); }; }; then
20868   cf_cv_func_mkstemp=yes
20869
20870 else
20871   echo "$as_me: program exited with status $ac_status" >&5
20872 echo "$as_me: failed program was:" >&5
20873 cat conftest.$ac_ext >&5
20874 cf_cv_func_mkstemp=no
20875
20876 fi
20877 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20878 fi
20879
20880 fi
20881 echo "$as_me:20881: result: $cf_cv_func_mkstemp" >&5
20882 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20883 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20884         echo "$as_me:20884: checking for mkstemp" >&5
20885 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20886 if test "${ac_cv_func_mkstemp+set}" = set; then
20887   echo $ECHO_N "(cached) $ECHO_C" >&6
20888 else
20889   cat >conftest.$ac_ext <<_ACEOF
20890 #line 20890 "configure"
20891 #include "confdefs.h"
20892 #define mkstemp autoconf_temporary
20893 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20894 #undef mkstemp
20895
20896 #ifdef __cplusplus
20897 extern "C"
20898 #endif
20899
20900 /* We use char because int might match the return type of a gcc2
20901    builtin and then its argument prototype would still apply.  */
20902 char mkstemp (void);
20903
20904 int
20905 main (void)
20906 {
20907
20908 /* The GNU C library defines stubs for functions which it implements
20909     to always fail with ENOSYS.  Some functions are actually named
20910     something starting with __ and the normal name is an alias.  */
20911 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20912 #error found stub for mkstemp
20913 #endif
20914
20915         return mkstemp ();
20916   ;
20917   return 0;
20918 }
20919 _ACEOF
20920 rm -f conftest.$ac_objext conftest$ac_exeext
20921 if { (eval echo "$as_me:20921: \"$ac_link\"") >&5
20922   (eval $ac_link) 2>&5
20923   ac_status=$?
20924   echo "$as_me:20924: \$? = $ac_status" >&5
20925   (exit $ac_status); } &&
20926          { ac_try='test -s conftest$ac_exeext'
20927   { (eval echo "$as_me:20927: \"$ac_try\"") >&5
20928   (eval $ac_try) 2>&5
20929   ac_status=$?
20930   echo "$as_me:20930: \$? = $ac_status" >&5
20931   (exit $ac_status); }; }; then
20932   ac_cv_func_mkstemp=yes
20933 else
20934   echo "$as_me: failed program was:" >&5
20935 cat conftest.$ac_ext >&5
20936 ac_cv_func_mkstemp=no
20937 fi
20938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20939 fi
20940 echo "$as_me:20940: result: $ac_cv_func_mkstemp" >&5
20941 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20942
20943 fi
20944 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20945
20946 cat >>confdefs.h <<\EOF
20947 #define HAVE_MKSTEMP 1
20948 EOF
20949
20950 fi
20951
20952 # setup for prototype of fallback for vsscanf()
20953
20954 if test "$cf_cv_func_vsscanf" = vsscanf ; then
20955         HAVE_VSSCANF=1
20956 else
20957         HAVE_VSSCANF=0
20958 fi
20959
20960 if test "x$cross_compiling" = xyes ; then
20961         { echo "$as_me:20961: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20962 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20963 else
20964         echo "$as_me:20964: checking whether setvbuf arguments are reversed" >&5
20965 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20966 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20967   echo $ECHO_N "(cached) $ECHO_C" >&6
20968 else
20969   if test "$cross_compiling" = yes; then
20970   { { echo "$as_me:20970: error: cannot run test program while cross compiling" >&5
20971 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20972    { (exit 1); exit 1; }; }
20973 else
20974   cat >conftest.$ac_ext <<_ACEOF
20975 #line 20975 "configure"
20976 #include "confdefs.h"
20977 #include <stdio.h>
20978 /* If setvbuf has the reversed format, exit 0. */
20979 int
20980 main (void)
20981 {
20982   /* This call has the arguments reversed.
20983      A reversed system may check and see that the address of main
20984      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20985   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20986     $ac_main_return(1);
20987   putc('\r', stdout);
20988   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
20989 }
20990 _ACEOF
20991 rm -f conftest$ac_exeext
20992 if { (eval echo "$as_me:20992: \"$ac_link\"") >&5
20993   (eval $ac_link) 2>&5
20994   ac_status=$?
20995   echo "$as_me:20995: \$? = $ac_status" >&5
20996   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20997   { (eval echo "$as_me:20997: \"$ac_try\"") >&5
20998   (eval $ac_try) 2>&5
20999   ac_status=$?
21000   echo "$as_me:21000: \$? = $ac_status" >&5
21001   (exit $ac_status); }; }; then
21002   ac_cv_func_setvbuf_reversed=yes
21003 else
21004   echo "$as_me: program exited with status $ac_status" >&5
21005 echo "$as_me: failed program was:" >&5
21006 cat conftest.$ac_ext >&5
21007 ac_cv_func_setvbuf_reversed=no
21008 fi
21009 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21010 fi
21011 rm -f core core.* *.core
21012 fi
21013 echo "$as_me:21013: result: $ac_cv_func_setvbuf_reversed" >&5
21014 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21015 if test $ac_cv_func_setvbuf_reversed = yes; then
21016
21017 cat >>confdefs.h <<\EOF
21018 #define SETVBUF_REVERSED 1
21019 EOF
21020
21021 fi
21022
21023 fi
21024 echo "$as_me:21024: checking for intptr_t" >&5
21025 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21026 if test "${ac_cv_type_intptr_t+set}" = set; then
21027   echo $ECHO_N "(cached) $ECHO_C" >&6
21028 else
21029   cat >conftest.$ac_ext <<_ACEOF
21030 #line 21030 "configure"
21031 #include "confdefs.h"
21032 $ac_includes_default
21033 int
21034 main (void)
21035 {
21036 if ((intptr_t *) 0)
21037   return 0;
21038 if (sizeof (intptr_t))
21039   return 0;
21040   ;
21041   return 0;
21042 }
21043 _ACEOF
21044 rm -f conftest.$ac_objext
21045 if { (eval echo "$as_me:21045: \"$ac_compile\"") >&5
21046   (eval $ac_compile) 2>&5
21047   ac_status=$?
21048   echo "$as_me:21048: \$? = $ac_status" >&5
21049   (exit $ac_status); } &&
21050          { ac_try='test -s conftest.$ac_objext'
21051   { (eval echo "$as_me:21051: \"$ac_try\"") >&5
21052   (eval $ac_try) 2>&5
21053   ac_status=$?
21054   echo "$as_me:21054: \$? = $ac_status" >&5
21055   (exit $ac_status); }; }; then
21056   ac_cv_type_intptr_t=yes
21057 else
21058   echo "$as_me: failed program was:" >&5
21059 cat conftest.$ac_ext >&5
21060 ac_cv_type_intptr_t=no
21061 fi
21062 rm -f conftest.$ac_objext conftest.$ac_ext
21063 fi
21064 echo "$as_me:21064: result: $ac_cv_type_intptr_t" >&5
21065 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21066 if test $ac_cv_type_intptr_t = yes; then
21067   :
21068 else
21069
21070 cat >>confdefs.h <<EOF
21071 #define intptr_t long
21072 EOF
21073
21074 fi
21075
21076 echo "$as_me:21076: checking for ssize_t" >&5
21077 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21078 if test "${ac_cv_type_ssize_t+set}" = set; then
21079   echo $ECHO_N "(cached) $ECHO_C" >&6
21080 else
21081   cat >conftest.$ac_ext <<_ACEOF
21082 #line 21082 "configure"
21083 #include "confdefs.h"
21084 $ac_includes_default
21085 int
21086 main (void)
21087 {
21088 if ((ssize_t *) 0)
21089   return 0;
21090 if (sizeof (ssize_t))
21091   return 0;
21092   ;
21093   return 0;
21094 }
21095 _ACEOF
21096 rm -f conftest.$ac_objext
21097 if { (eval echo "$as_me:21097: \"$ac_compile\"") >&5
21098   (eval $ac_compile) 2>&5
21099   ac_status=$?
21100   echo "$as_me:21100: \$? = $ac_status" >&5
21101   (exit $ac_status); } &&
21102          { ac_try='test -s conftest.$ac_objext'
21103   { (eval echo "$as_me:21103: \"$ac_try\"") >&5
21104   (eval $ac_try) 2>&5
21105   ac_status=$?
21106   echo "$as_me:21106: \$? = $ac_status" >&5
21107   (exit $ac_status); }; }; then
21108   ac_cv_type_ssize_t=yes
21109 else
21110   echo "$as_me: failed program was:" >&5
21111 cat conftest.$ac_ext >&5
21112 ac_cv_type_ssize_t=no
21113 fi
21114 rm -f conftest.$ac_objext conftest.$ac_ext
21115 fi
21116 echo "$as_me:21116: result: $ac_cv_type_ssize_t" >&5
21117 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21118 if test $ac_cv_type_ssize_t = yes; then
21119   :
21120 else
21121
21122 cat >>confdefs.h <<EOF
21123 #define ssize_t int
21124 EOF
21125
21126 fi
21127
21128 echo "$as_me:21128: checking for type sigaction_t" >&5
21129 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21130 if test "${cf_cv_type_sigaction+set}" = set; then
21131   echo $ECHO_N "(cached) $ECHO_C" >&6
21132 else
21133
21134         cat >conftest.$ac_ext <<_ACEOF
21135 #line 21135 "configure"
21136 #include "confdefs.h"
21137
21138 #include <signal.h>
21139 int
21140 main (void)
21141 {
21142 sigaction_t x
21143   ;
21144   return 0;
21145 }
21146 _ACEOF
21147 rm -f conftest.$ac_objext
21148 if { (eval echo "$as_me:21148: \"$ac_compile\"") >&5
21149   (eval $ac_compile) 2>&5
21150   ac_status=$?
21151   echo "$as_me:21151: \$? = $ac_status" >&5
21152   (exit $ac_status); } &&
21153          { ac_try='test -s conftest.$ac_objext'
21154   { (eval echo "$as_me:21154: \"$ac_try\"") >&5
21155   (eval $ac_try) 2>&5
21156   ac_status=$?
21157   echo "$as_me:21157: \$? = $ac_status" >&5
21158   (exit $ac_status); }; }; then
21159   cf_cv_type_sigaction=yes
21160 else
21161   echo "$as_me: failed program was:" >&5
21162 cat conftest.$ac_ext >&5
21163 cf_cv_type_sigaction=no
21164 fi
21165 rm -f conftest.$ac_objext conftest.$ac_ext
21166 fi
21167
21168 echo "$as_me:21168: result: $cf_cv_type_sigaction" >&5
21169 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21170 test "$cf_cv_type_sigaction" = yes &&
21171 cat >>confdefs.h <<\EOF
21172 #define HAVE_TYPE_SIGACTION 1
21173 EOF
21174
21175 echo "$as_me:21175: checking declaration of size-change" >&5
21176 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21177 if test "${cf_cv_sizechange+set}" = set; then
21178   echo $ECHO_N "(cached) $ECHO_C" >&6
21179 else
21180
21181         cf_cv_sizechange=unknown
21182         cf_save_CPPFLAGS="$CPPFLAGS"
21183
21184 for cf_opts in "" "NEED_PTEM_H"
21185 do
21186
21187         CPPFLAGS="$cf_save_CPPFLAGS"
21188         if test -n "$cf_opts"
21189         then
21190
21191         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21192         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21193
21194         fi
21195         cat >conftest.$ac_ext <<_ACEOF
21196 #line 21196 "configure"
21197 #include "confdefs.h"
21198 #include <sys/types.h>
21199 #ifdef HAVE_TERMIOS_H
21200 #include <termios.h>
21201 #else
21202 #ifdef HAVE_TERMIO_H
21203 #include <termio.h>
21204 #endif
21205 #endif
21206
21207 #ifdef NEED_PTEM_H
21208 /* This is a workaround for SCO:  they neglected to define struct winsize in
21209  * termios.h -- it's only in termio.h and ptem.h
21210  */
21211 #include <sys/stream.h>
21212 #include <sys/ptem.h>
21213 #endif
21214
21215 #ifdef HAVE_SYS_IOCTL_H
21216 #include <sys/ioctl.h>
21217 #endif
21218
21219 int
21220 main (void)
21221 {
21222
21223 #ifdef TIOCGSIZE
21224         struct ttysize win;     /* SunOS 3.0... */
21225         int y = win.ts_lines = 2;
21226         int x = win.ts_cols = 1;
21227         (void)y;
21228         (void)x;
21229 #else
21230 #ifdef TIOCGWINSZ
21231         struct winsize win;     /* everything else */
21232         int y = win.ws_row = 2;
21233         int x = win.ws_col = 1;
21234         (void)y;
21235         (void)x;
21236 #else
21237         no TIOCGSIZE or TIOCGWINSZ
21238 #endif /* TIOCGWINSZ */
21239 #endif /* TIOCGSIZE */
21240
21241   ;
21242   return 0;
21243 }
21244 _ACEOF
21245 rm -f conftest.$ac_objext
21246 if { (eval echo "$as_me:21246: \"$ac_compile\"") >&5
21247   (eval $ac_compile) 2>&5
21248   ac_status=$?
21249   echo "$as_me:21249: \$? = $ac_status" >&5
21250   (exit $ac_status); } &&
21251          { ac_try='test -s conftest.$ac_objext'
21252   { (eval echo "$as_me:21252: \"$ac_try\"") >&5
21253   (eval $ac_try) 2>&5
21254   ac_status=$?
21255   echo "$as_me:21255: \$? = $ac_status" >&5
21256   (exit $ac_status); }; }; then
21257   cf_cv_sizechange=yes
21258 else
21259   echo "$as_me: failed program was:" >&5
21260 cat conftest.$ac_ext >&5
21261 cf_cv_sizechange=no
21262 fi
21263 rm -f conftest.$ac_objext conftest.$ac_ext
21264
21265         CPPFLAGS="$cf_save_CPPFLAGS"
21266         if test "$cf_cv_sizechange" = yes ; then
21267                 echo "size-change succeeded ($cf_opts)" >&5
21268                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
21269                 break
21270         fi
21271 done
21272
21273 fi
21274 echo "$as_me:21274: result: $cf_cv_sizechange" >&5
21275 echo "${ECHO_T}$cf_cv_sizechange" >&6
21276 if test "$cf_cv_sizechange" != no ; then
21277
21278 cat >>confdefs.h <<\EOF
21279 #define HAVE_SIZECHANGE 1
21280 EOF
21281
21282         case $cf_cv_sizechange in
21283         (NEED*)
21284                 cat >>confdefs.h <<EOF
21285 #define $cf_cv_sizechange  1
21286 EOF
21287
21288                 ;;
21289         esac
21290 fi
21291
21292 echo "$as_me:21292: checking for memmove" >&5
21293 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
21294 if test "${ac_cv_func_memmove+set}" = set; then
21295   echo $ECHO_N "(cached) $ECHO_C" >&6
21296 else
21297   cat >conftest.$ac_ext <<_ACEOF
21298 #line 21298 "configure"
21299 #include "confdefs.h"
21300 #define memmove autoconf_temporary
21301 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21302 #undef memmove
21303
21304 #ifdef __cplusplus
21305 extern "C"
21306 #endif
21307
21308 /* We use char because int might match the return type of a gcc2
21309    builtin and then its argument prototype would still apply.  */
21310 char memmove (void);
21311
21312 int
21313 main (void)
21314 {
21315
21316 /* The GNU C library defines stubs for functions which it implements
21317     to always fail with ENOSYS.  Some functions are actually named
21318     something starting with __ and the normal name is an alias.  */
21319 #if defined (__stub_memmove) || defined (__stub___memmove)
21320 #error found stub for memmove
21321 #endif
21322
21323         return memmove ();
21324   ;
21325   return 0;
21326 }
21327 _ACEOF
21328 rm -f conftest.$ac_objext conftest$ac_exeext
21329 if { (eval echo "$as_me:21329: \"$ac_link\"") >&5
21330   (eval $ac_link) 2>&5
21331   ac_status=$?
21332   echo "$as_me:21332: \$? = $ac_status" >&5
21333   (exit $ac_status); } &&
21334          { ac_try='test -s conftest$ac_exeext'
21335   { (eval echo "$as_me:21335: \"$ac_try\"") >&5
21336   (eval $ac_try) 2>&5
21337   ac_status=$?
21338   echo "$as_me:21338: \$? = $ac_status" >&5
21339   (exit $ac_status); }; }; then
21340   ac_cv_func_memmove=yes
21341 else
21342   echo "$as_me: failed program was:" >&5
21343 cat conftest.$ac_ext >&5
21344 ac_cv_func_memmove=no
21345 fi
21346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21347 fi
21348 echo "$as_me:21348: result: $ac_cv_func_memmove" >&5
21349 echo "${ECHO_T}$ac_cv_func_memmove" >&6
21350 if test $ac_cv_func_memmove = yes; then
21351   :
21352 else
21353
21354 echo "$as_me:21354: checking for bcopy" >&5
21355 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
21356 if test "${ac_cv_func_bcopy+set}" = set; then
21357   echo $ECHO_N "(cached) $ECHO_C" >&6
21358 else
21359   cat >conftest.$ac_ext <<_ACEOF
21360 #line 21360 "configure"
21361 #include "confdefs.h"
21362 #define bcopy autoconf_temporary
21363 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21364 #undef bcopy
21365
21366 #ifdef __cplusplus
21367 extern "C"
21368 #endif
21369
21370 /* We use char because int might match the return type of a gcc2
21371    builtin and then its argument prototype would still apply.  */
21372 char bcopy (void);
21373
21374 int
21375 main (void)
21376 {
21377
21378 /* The GNU C library defines stubs for functions which it implements
21379     to always fail with ENOSYS.  Some functions are actually named
21380     something starting with __ and the normal name is an alias.  */
21381 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21382 #error found stub for bcopy
21383 #endif
21384
21385         return bcopy ();
21386   ;
21387   return 0;
21388 }
21389 _ACEOF
21390 rm -f conftest.$ac_objext conftest$ac_exeext
21391 if { (eval echo "$as_me:21391: \"$ac_link\"") >&5
21392   (eval $ac_link) 2>&5
21393   ac_status=$?
21394   echo "$as_me:21394: \$? = $ac_status" >&5
21395   (exit $ac_status); } &&
21396          { ac_try='test -s conftest$ac_exeext'
21397   { (eval echo "$as_me:21397: \"$ac_try\"") >&5
21398   (eval $ac_try) 2>&5
21399   ac_status=$?
21400   echo "$as_me:21400: \$? = $ac_status" >&5
21401   (exit $ac_status); }; }; then
21402   ac_cv_func_bcopy=yes
21403 else
21404   echo "$as_me: failed program was:" >&5
21405 cat conftest.$ac_ext >&5
21406 ac_cv_func_bcopy=no
21407 fi
21408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21409 fi
21410 echo "$as_me:21410: result: $ac_cv_func_bcopy" >&5
21411 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21412 if test $ac_cv_func_bcopy = yes; then
21413
21414         echo "$as_me:21414: checking if bcopy does overlapping moves" >&5
21415 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21416 if test "${cf_cv_good_bcopy+set}" = set; then
21417   echo $ECHO_N "(cached) $ECHO_C" >&6
21418 else
21419
21420                 if test "$cross_compiling" = yes; then
21421   cf_cv_good_bcopy=unknown
21422 else
21423   cat >conftest.$ac_ext <<_ACEOF
21424 #line 21424 "configure"
21425 #include "confdefs.h"
21426
21427 int main(void) {
21428         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21429         char temp[40];
21430         bcopy(data, temp, sizeof(data));
21431         bcopy(temp+10, temp, 15);
21432         bcopy(temp+5, temp+15, 10);
21433         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21434 }
21435
21436 _ACEOF
21437 rm -f conftest$ac_exeext
21438 if { (eval echo "$as_me:21438: \"$ac_link\"") >&5
21439   (eval $ac_link) 2>&5
21440   ac_status=$?
21441   echo "$as_me:21441: \$? = $ac_status" >&5
21442   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21443   { (eval echo "$as_me:21443: \"$ac_try\"") >&5
21444   (eval $ac_try) 2>&5
21445   ac_status=$?
21446   echo "$as_me:21446: \$? = $ac_status" >&5
21447   (exit $ac_status); }; }; then
21448   cf_cv_good_bcopy=yes
21449 else
21450   echo "$as_me: program exited with status $ac_status" >&5
21451 echo "$as_me: failed program was:" >&5
21452 cat conftest.$ac_ext >&5
21453 cf_cv_good_bcopy=no
21454 fi
21455 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21456 fi
21457
21458 fi
21459 echo "$as_me:21459: result: $cf_cv_good_bcopy" >&5
21460 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21461
21462 else
21463   cf_cv_good_bcopy=no
21464 fi
21465
21466         if test "$cf_cv_good_bcopy" = yes ; then
21467
21468 cat >>confdefs.h <<\EOF
21469 #define USE_OK_BCOPY 1
21470 EOF
21471
21472         else
21473
21474 cat >>confdefs.h <<\EOF
21475 #define USE_MY_MEMMOVE 1
21476 EOF
21477
21478         fi
21479
21480 fi
21481
21482 tty 2>&1 >/dev/null || {
21483 for ac_func in posix_openpt
21484 do
21485 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21486 echo "$as_me:21486: checking for $ac_func" >&5
21487 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21488 if eval "test \"\${$as_ac_var+set}\" = set"; then
21489   echo $ECHO_N "(cached) $ECHO_C" >&6
21490 else
21491   cat >conftest.$ac_ext <<_ACEOF
21492 #line 21492 "configure"
21493 #include "confdefs.h"
21494 #define $ac_func autoconf_temporary
21495 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21496 #undef $ac_func
21497
21498 #ifdef __cplusplus
21499 extern "C"
21500 #endif
21501
21502 /* We use char because int might match the return type of a gcc2
21503    builtin and then its argument prototype would still apply.  */
21504 char $ac_func (void);
21505
21506 int
21507 main (void)
21508 {
21509
21510 /* The GNU C library defines stubs for functions which it implements
21511     to always fail with ENOSYS.  Some functions are actually named
21512     something starting with __ and the normal name is an alias.  */
21513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21514 #error found stub for $ac_func
21515 #endif
21516
21517         return $ac_func ();
21518   ;
21519   return 0;
21520 }
21521 _ACEOF
21522 rm -f conftest.$ac_objext conftest$ac_exeext
21523 if { (eval echo "$as_me:21523: \"$ac_link\"") >&5
21524   (eval $ac_link) 2>&5
21525   ac_status=$?
21526   echo "$as_me:21526: \$? = $ac_status" >&5
21527   (exit $ac_status); } &&
21528          { ac_try='test -s conftest$ac_exeext'
21529   { (eval echo "$as_me:21529: \"$ac_try\"") >&5
21530   (eval $ac_try) 2>&5
21531   ac_status=$?
21532   echo "$as_me:21532: \$? = $ac_status" >&5
21533   (exit $ac_status); }; }; then
21534   eval "$as_ac_var=yes"
21535 else
21536   echo "$as_me: failed program was:" >&5
21537 cat conftest.$ac_ext >&5
21538 eval "$as_ac_var=no"
21539 fi
21540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21541 fi
21542 echo "$as_me:21542: result: `eval echo '${'$as_ac_var'}'`" >&5
21543 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21544 if test `eval echo '${'$as_ac_var'}'` = yes; then
21545   cat >>confdefs.h <<EOF
21546 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21547 EOF
21548
21549 fi
21550 done
21551  }
21552 echo "$as_me:21552: checking if poll really works" >&5
21553 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21554 if test "${cf_cv_working_poll+set}" = set; then
21555   echo $ECHO_N "(cached) $ECHO_C" >&6
21556 else
21557
21558 if test "$cross_compiling" = yes; then
21559   cf_cv_working_poll=unknown
21560 else
21561   cat >conftest.$ac_ext <<_ACEOF
21562 #line 21562 "configure"
21563 #include "confdefs.h"
21564
21565 #include <stdlib.h>
21566 #include <stdio.h>
21567 #include <unistd.h>
21568 #include <fcntl.h>
21569 #ifdef HAVE_POLL_H
21570 #include <poll.h>
21571 #else
21572 #include <sys/poll.h>
21573 #endif
21574 int main(void) {
21575         struct pollfd myfds;
21576         int ret;
21577
21578         /* check for Darwin bug with respect to "devices" */
21579         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21580         if (myfds.fd < 0)
21581                 myfds.fd = 0;
21582         myfds.events = POLLIN;
21583         myfds.revents = 0;
21584
21585         ret = poll(&myfds, 1, 100);
21586
21587         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21588                 ret = -1;
21589         } else {
21590                 int fd = 0;
21591                 if (!isatty(fd)) {
21592                         fd = open("/dev/tty", 2);       /* O_RDWR */
21593                 }
21594 #ifdef HAVE_POSIX_OPENPT
21595                 if (fd < 0) {
21596                         fd = posix_openpt(O_RDWR);
21597                 }
21598 #endif
21599
21600                 if (fd >= 0) {
21601                         /* also check with standard input */
21602                         myfds.fd = fd;
21603                         myfds.events = POLLIN;
21604                         myfds.revents = 0;
21605                         ret = poll(&myfds, 1, 100);
21606                 } else {
21607                         ret = -1;
21608                 }
21609         }
21610         ${cf_cv_main_return:-return}(ret < 0);
21611 }
21612 _ACEOF
21613 rm -f conftest$ac_exeext
21614 if { (eval echo "$as_me:21614: \"$ac_link\"") >&5
21615   (eval $ac_link) 2>&5
21616   ac_status=$?
21617   echo "$as_me:21617: \$? = $ac_status" >&5
21618   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21619   { (eval echo "$as_me:21619: \"$ac_try\"") >&5
21620   (eval $ac_try) 2>&5
21621   ac_status=$?
21622   echo "$as_me:21622: \$? = $ac_status" >&5
21623   (exit $ac_status); }; }; then
21624   cf_cv_working_poll=yes
21625 else
21626   echo "$as_me: program exited with status $ac_status" >&5
21627 echo "$as_me: failed program was:" >&5
21628 cat conftest.$ac_ext >&5
21629 cf_cv_working_poll=no
21630 fi
21631 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21632 fi
21633 fi
21634 echo "$as_me:21634: result: $cf_cv_working_poll" >&5
21635 echo "${ECHO_T}$cf_cv_working_poll" >&6
21636 test "$cf_cv_working_poll" = "yes" &&
21637 cat >>confdefs.h <<\EOF
21638 #define HAVE_WORKING_POLL 1
21639 EOF
21640
21641 echo "$as_me:21641: checking for va_copy" >&5
21642 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21643 if test "${cf_cv_have_va_copy+set}" = set; then
21644   echo $ECHO_N "(cached) $ECHO_C" >&6
21645 else
21646
21647 cat >conftest.$ac_ext <<_ACEOF
21648 #line 21648 "configure"
21649 #include "confdefs.h"
21650
21651 #include <stdarg.h>
21652
21653 int
21654 main (void)
21655 {
21656
21657         static va_list dst;
21658         static va_list src;
21659         va_copy(dst, src)
21660   ;
21661   return 0;
21662 }
21663 _ACEOF
21664 rm -f conftest.$ac_objext conftest$ac_exeext
21665 if { (eval echo "$as_me:21665: \"$ac_link\"") >&5
21666   (eval $ac_link) 2>&5
21667   ac_status=$?
21668   echo "$as_me:21668: \$? = $ac_status" >&5
21669   (exit $ac_status); } &&
21670          { ac_try='test -s conftest$ac_exeext'
21671   { (eval echo "$as_me:21671: \"$ac_try\"") >&5
21672   (eval $ac_try) 2>&5
21673   ac_status=$?
21674   echo "$as_me:21674: \$? = $ac_status" >&5
21675   (exit $ac_status); }; }; then
21676   cf_cv_have_va_copy=yes
21677 else
21678   echo "$as_me: failed program was:" >&5
21679 cat conftest.$ac_ext >&5
21680 cf_cv_have_va_copy=no
21681 fi
21682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21683 fi
21684 echo "$as_me:21684: result: $cf_cv_have_va_copy" >&5
21685 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21686
21687 if test "$cf_cv_have_va_copy" = yes;
21688 then
21689
21690 cat >>confdefs.h <<\EOF
21691 #define HAVE_VA_COPY 1
21692 EOF
21693
21694 else # !cf_cv_have_va_copy
21695
21696 echo "$as_me:21696: checking for __va_copy" >&5
21697 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21698 if test "${cf_cv_have___va_copy+set}" = set; then
21699   echo $ECHO_N "(cached) $ECHO_C" >&6
21700 else
21701
21702 cat >conftest.$ac_ext <<_ACEOF
21703 #line 21703 "configure"
21704 #include "confdefs.h"
21705
21706 #include <stdarg.h>
21707
21708 int
21709 main (void)
21710 {
21711
21712         static va_list dst;
21713         static va_list src;
21714         __va_copy(dst, src)
21715   ;
21716   return 0;
21717 }
21718 _ACEOF
21719 rm -f conftest.$ac_objext conftest$ac_exeext
21720 if { (eval echo "$as_me:21720: \"$ac_link\"") >&5
21721   (eval $ac_link) 2>&5
21722   ac_status=$?
21723   echo "$as_me:21723: \$? = $ac_status" >&5
21724   (exit $ac_status); } &&
21725          { ac_try='test -s conftest$ac_exeext'
21726   { (eval echo "$as_me:21726: \"$ac_try\"") >&5
21727   (eval $ac_try) 2>&5
21728   ac_status=$?
21729   echo "$as_me:21729: \$? = $ac_status" >&5
21730   (exit $ac_status); }; }; then
21731   cf_cv_have___va_copy=yes
21732 else
21733   echo "$as_me: failed program was:" >&5
21734 cat conftest.$ac_ext >&5
21735 cf_cv_have___va_copy=no
21736 fi
21737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21738 fi
21739 echo "$as_me:21739: result: $cf_cv_have___va_copy" >&5
21740 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21741
21742 if test "$cf_cv_have___va_copy" = yes
21743 then
21744
21745 cat >>confdefs.h <<\EOF
21746 #define HAVE___VA_COPY 1
21747 EOF
21748
21749 else # !cf_cv_have___va_copy
21750
21751 echo "$as_me:21751: checking for __builtin_va_copy" >&5
21752 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21753 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21754   echo $ECHO_N "(cached) $ECHO_C" >&6
21755 else
21756
21757 cat >conftest.$ac_ext <<_ACEOF
21758 #line 21758 "configure"
21759 #include "confdefs.h"
21760
21761 #include <stdarg.h>
21762
21763 int
21764 main (void)
21765 {
21766
21767         static va_list dst;
21768         static va_list src;
21769         __builtin_va_copy(dst, src)
21770   ;
21771   return 0;
21772 }
21773 _ACEOF
21774 rm -f conftest.$ac_objext conftest$ac_exeext
21775 if { (eval echo "$as_me:21775: \"$ac_link\"") >&5
21776   (eval $ac_link) 2>&5
21777   ac_status=$?
21778   echo "$as_me:21778: \$? = $ac_status" >&5
21779   (exit $ac_status); } &&
21780          { ac_try='test -s conftest$ac_exeext'
21781   { (eval echo "$as_me:21781: \"$ac_try\"") >&5
21782   (eval $ac_try) 2>&5
21783   ac_status=$?
21784   echo "$as_me:21784: \$? = $ac_status" >&5
21785   (exit $ac_status); }; }; then
21786   cf_cv_have___builtin_va_copy=yes
21787 else
21788   echo "$as_me: failed program was:" >&5
21789 cat conftest.$ac_ext >&5
21790 cf_cv_have___builtin_va_copy=no
21791 fi
21792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21793 fi
21794 echo "$as_me:21794: result: $cf_cv_have___builtin_va_copy" >&5
21795 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21796
21797 test "$cf_cv_have___builtin_va_copy" = yes &&
21798
21799 cat >>confdefs.h <<\EOF
21800 #define HAVE___BUILTIN_VA_COPY 1
21801 EOF
21802
21803 fi # cf_cv_have___va_copy
21804
21805 fi # cf_cv_have_va_copy
21806
21807 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21808 (*yes*)
21809         ;;
21810
21811 (*)
21812         echo "$as_me:21812: checking if we can simply copy va_list" >&5
21813 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21814 if test "${cf_cv_pointer_va_list+set}" = set; then
21815   echo $ECHO_N "(cached) $ECHO_C" >&6
21816 else
21817
21818 cat >conftest.$ac_ext <<_ACEOF
21819 #line 21819 "configure"
21820 #include "confdefs.h"
21821
21822 #include <stdarg.h>
21823
21824 int
21825 main (void)
21826 {
21827
21828         va_list dst;
21829         va_list src;
21830         dst = src
21831   ;
21832   return 0;
21833 }
21834 _ACEOF
21835 rm -f conftest.$ac_objext conftest$ac_exeext
21836 if { (eval echo "$as_me:21836: \"$ac_link\"") >&5
21837   (eval $ac_link) 2>&5
21838   ac_status=$?
21839   echo "$as_me:21839: \$? = $ac_status" >&5
21840   (exit $ac_status); } &&
21841          { ac_try='test -s conftest$ac_exeext'
21842   { (eval echo "$as_me:21842: \"$ac_try\"") >&5
21843   (eval $ac_try) 2>&5
21844   ac_status=$?
21845   echo "$as_me:21845: \$? = $ac_status" >&5
21846   (exit $ac_status); }; }; then
21847   cf_cv_pointer_va_list=yes
21848 else
21849   echo "$as_me: failed program was:" >&5
21850 cat conftest.$ac_ext >&5
21851 cf_cv_pointer_va_list=no
21852 fi
21853 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21854 fi
21855 echo "$as_me:21855: result: $cf_cv_pointer_va_list" >&5
21856 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21857
21858         if test "$cf_cv_pointer_va_list" = no
21859         then
21860                 echo "$as_me:21860: checking if we can copy va_list indirectly" >&5
21861 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21862 if test "${cf_cv_array_va_list+set}" = set; then
21863   echo $ECHO_N "(cached) $ECHO_C" >&6
21864 else
21865
21866 cat >conftest.$ac_ext <<_ACEOF
21867 #line 21867 "configure"
21868 #include "confdefs.h"
21869
21870 #include <stdarg.h>
21871
21872 int
21873 main (void)
21874 {
21875
21876         va_list dst;
21877         va_list src;
21878         *dst = *src
21879   ;
21880   return 0;
21881 }
21882 _ACEOF
21883 rm -f conftest.$ac_objext conftest$ac_exeext
21884 if { (eval echo "$as_me:21884: \"$ac_link\"") >&5
21885   (eval $ac_link) 2>&5
21886   ac_status=$?
21887   echo "$as_me:21887: \$? = $ac_status" >&5
21888   (exit $ac_status); } &&
21889          { ac_try='test -s conftest$ac_exeext'
21890   { (eval echo "$as_me:21890: \"$ac_try\"") >&5
21891   (eval $ac_try) 2>&5
21892   ac_status=$?
21893   echo "$as_me:21893: \$? = $ac_status" >&5
21894   (exit $ac_status); }; }; then
21895   cf_cv_array_va_list=yes
21896 else
21897   echo "$as_me: failed program was:" >&5
21898 cat conftest.$ac_ext >&5
21899 cf_cv_array_va_list=no
21900 fi
21901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21902 fi
21903 echo "$as_me:21903: result: $cf_cv_array_va_list" >&5
21904 echo "${ECHO_T}$cf_cv_array_va_list" >&6
21905                 test "$cf_cv_array_va_list" = yes &&
21906 cat >>confdefs.h <<\EOF
21907 #define ARRAY_VA_LIST 1
21908 EOF
21909
21910         fi
21911         ;;
21912 esac
21913
21914 echo "$as_me:21914: checking for pid_t" >&5
21915 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21916 if test "${ac_cv_type_pid_t+set}" = set; then
21917   echo $ECHO_N "(cached) $ECHO_C" >&6
21918 else
21919   cat >conftest.$ac_ext <<_ACEOF
21920 #line 21920 "configure"
21921 #include "confdefs.h"
21922 $ac_includes_default
21923 int
21924 main (void)
21925 {
21926 if ((pid_t *) 0)
21927   return 0;
21928 if (sizeof (pid_t))
21929   return 0;
21930   ;
21931   return 0;
21932 }
21933 _ACEOF
21934 rm -f conftest.$ac_objext
21935 if { (eval echo "$as_me:21935: \"$ac_compile\"") >&5
21936   (eval $ac_compile) 2>&5
21937   ac_status=$?
21938   echo "$as_me:21938: \$? = $ac_status" >&5
21939   (exit $ac_status); } &&
21940          { ac_try='test -s conftest.$ac_objext'
21941   { (eval echo "$as_me:21941: \"$ac_try\"") >&5
21942   (eval $ac_try) 2>&5
21943   ac_status=$?
21944   echo "$as_me:21944: \$? = $ac_status" >&5
21945   (exit $ac_status); }; }; then
21946   ac_cv_type_pid_t=yes
21947 else
21948   echo "$as_me: failed program was:" >&5
21949 cat conftest.$ac_ext >&5
21950 ac_cv_type_pid_t=no
21951 fi
21952 rm -f conftest.$ac_objext conftest.$ac_ext
21953 fi
21954 echo "$as_me:21954: result: $ac_cv_type_pid_t" >&5
21955 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21956 if test $ac_cv_type_pid_t = yes; then
21957   :
21958 else
21959
21960 cat >>confdefs.h <<EOF
21961 #define pid_t int
21962 EOF
21963
21964 fi
21965
21966 for ac_header in unistd.h vfork.h
21967 do
21968 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21969 echo "$as_me:21969: checking for $ac_header" >&5
21970 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21971 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21972   echo $ECHO_N "(cached) $ECHO_C" >&6
21973 else
21974   cat >conftest.$ac_ext <<_ACEOF
21975 #line 21975 "configure"
21976 #include "confdefs.h"
21977 #include <$ac_header>
21978 _ACEOF
21979 if { (eval echo "$as_me:21979: \"$ac_cpp conftest.$ac_ext\"") >&5
21980   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21981   ac_status=$?
21982   egrep -v '^ *\+' conftest.er1 >conftest.err
21983   rm -f conftest.er1
21984   cat conftest.err >&5
21985   echo "$as_me:21985: \$? = $ac_status" >&5
21986   (exit $ac_status); } >/dev/null; then
21987   if test -s conftest.err; then
21988     ac_cpp_err=$ac_c_preproc_warn_flag
21989   else
21990     ac_cpp_err=
21991   fi
21992 else
21993   ac_cpp_err=yes
21994 fi
21995 if test -z "$ac_cpp_err"; then
21996   eval "$as_ac_Header=yes"
21997 else
21998   echo "$as_me: failed program was:" >&5
21999   cat conftest.$ac_ext >&5
22000   eval "$as_ac_Header=no"
22001 fi
22002 rm -f conftest.err conftest.$ac_ext
22003 fi
22004 echo "$as_me:22004: result: `eval echo '${'$as_ac_Header'}'`" >&5
22005 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22006 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22007   cat >>confdefs.h <<EOF
22008 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22009 EOF
22010
22011 fi
22012 done
22013
22014 for ac_func in fork vfork
22015 do
22016 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22017 echo "$as_me:22017: checking for $ac_func" >&5
22018 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22019 if eval "test \"\${$as_ac_var+set}\" = set"; then
22020   echo $ECHO_N "(cached) $ECHO_C" >&6
22021 else
22022   cat >conftest.$ac_ext <<_ACEOF
22023 #line 22023 "configure"
22024 #include "confdefs.h"
22025 #define $ac_func autoconf_temporary
22026 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22027 #undef $ac_func
22028
22029 #ifdef __cplusplus
22030 extern "C"
22031 #endif
22032
22033 /* We use char because int might match the return type of a gcc2
22034    builtin and then its argument prototype would still apply.  */
22035 char $ac_func (void);
22036
22037 int
22038 main (void)
22039 {
22040
22041 /* The GNU C library defines stubs for functions which it implements
22042     to always fail with ENOSYS.  Some functions are actually named
22043     something starting with __ and the normal name is an alias.  */
22044 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22045 #error found stub for $ac_func
22046 #endif
22047
22048         return $ac_func ();
22049   ;
22050   return 0;
22051 }
22052 _ACEOF
22053 rm -f conftest.$ac_objext conftest$ac_exeext
22054 if { (eval echo "$as_me:22054: \"$ac_link\"") >&5
22055   (eval $ac_link) 2>&5
22056   ac_status=$?
22057   echo "$as_me:22057: \$? = $ac_status" >&5
22058   (exit $ac_status); } &&
22059          { ac_try='test -s conftest$ac_exeext'
22060   { (eval echo "$as_me:22060: \"$ac_try\"") >&5
22061   (eval $ac_try) 2>&5
22062   ac_status=$?
22063   echo "$as_me:22063: \$? = $ac_status" >&5
22064   (exit $ac_status); }; }; then
22065   eval "$as_ac_var=yes"
22066 else
22067   echo "$as_me: failed program was:" >&5
22068 cat conftest.$ac_ext >&5
22069 eval "$as_ac_var=no"
22070 fi
22071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22072 fi
22073 echo "$as_me:22073: result: `eval echo '${'$as_ac_var'}'`" >&5
22074 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22075 if test `eval echo '${'$as_ac_var'}'` = yes; then
22076   cat >>confdefs.h <<EOF
22077 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22078 EOF
22079
22080 fi
22081 done
22082
22083 ac_cv_func_fork_works=$ac_cv_func_fork
22084 if test "x$ac_cv_func_fork" = xyes; then
22085   echo "$as_me:22085: checking for working fork" >&5
22086 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22087 if test "${ac_cv_func_fork_works+set}" = set; then
22088   echo $ECHO_N "(cached) $ECHO_C" >&6
22089 else
22090   if test "$cross_compiling" = yes; then
22091   ac_cv_func_fork_works=cross
22092 else
22093   cat >conftest.$ac_ext <<_ACEOF
22094 /* By Rüdiger Kuhlmann. */
22095       #include <sys/types.h>
22096       #if HAVE_UNISTD_H
22097       # include <unistd.h>
22098       #endif
22099       /* Some systems only have a dummy stub for fork() */
22100       int main (void)
22101       {
22102         if (fork() < 0)
22103           $ac_main_return (1);
22104         $ac_main_return (0);
22105       }
22106 _ACEOF
22107 rm -f conftest$ac_exeext
22108 if { (eval echo "$as_me:22108: \"$ac_link\"") >&5
22109   (eval $ac_link) 2>&5
22110   ac_status=$?
22111   echo "$as_me:22111: \$? = $ac_status" >&5
22112   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22113   { (eval echo "$as_me:22113: \"$ac_try\"") >&5
22114   (eval $ac_try) 2>&5
22115   ac_status=$?
22116   echo "$as_me:22116: \$? = $ac_status" >&5
22117   (exit $ac_status); }; }; then
22118   ac_cv_func_fork_works=yes
22119 else
22120   echo "$as_me: program exited with status $ac_status" >&5
22121 echo "$as_me: failed program was:" >&5
22122 cat conftest.$ac_ext >&5
22123 ac_cv_func_fork_works=no
22124 fi
22125 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22126 fi
22127 fi
22128 echo "$as_me:22128: result: $ac_cv_func_fork_works" >&5
22129 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22130
22131 fi
22132 if test "x$ac_cv_func_fork_works" = xcross; then
22133   case $host in
22134     *-*-amigaos* | *-*-msdosdjgpp*)
22135       # Override, as these systems have only a dummy fork() stub
22136       ac_cv_func_fork_works=no
22137       ;;
22138     *)
22139       ac_cv_func_fork_works=yes
22140       ;;
22141   esac
22142   { echo "$as_me:22142: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22143 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22144 fi
22145 ac_cv_func_vfork_works=$ac_cv_func_vfork
22146 if test "x$ac_cv_func_vfork" = xyes; then
22147   echo "$as_me:22147: checking for working vfork" >&5
22148 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22149 if test "${ac_cv_func_vfork_works+set}" = set; then
22150   echo $ECHO_N "(cached) $ECHO_C" >&6
22151 else
22152   if test "$cross_compiling" = yes; then
22153   ac_cv_func_vfork_works=cross
22154 else
22155   cat >conftest.$ac_ext <<_ACEOF
22156 #line 22156 "configure"
22157 #include "confdefs.h"
22158 /* Thanks to Paul Eggert for this test.  */
22159 #include <stdio.h>
22160 #include <sys/types.h>
22161 #include <sys/stat.h>
22162 #if HAVE_UNISTD_H
22163 # include <unistd.h>
22164 #endif
22165 #if HAVE_VFORK_H
22166 # include <vfork.h>
22167 #endif
22168 /* On some sparc systems, changes by the child to local and incoming
22169    argument registers are propagated back to the parent.  The compiler
22170    is told about this with #include <vfork.h>, but some compilers
22171    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22172    static variable whose address is put into a register that is
22173    clobbered by the vfork.  */
22174 static
22175 #ifdef __cplusplus
22176 sparc_address_test (int arg)
22177 # else
22178 sparc_address_test (arg) int arg;
22179 #endif
22180 {
22181   static pid_t child;
22182   if (!child) {
22183     child = vfork ();
22184     if (child < 0) {
22185       perror ("vfork");
22186       _exit(2);
22187     }
22188     if (!child) {
22189       arg = getpid();
22190       write(-1, "", 0);
22191       _exit (arg);
22192     }
22193   }
22194 }
22195
22196 int
22197 main (void)
22198 {
22199   pid_t parent = getpid ();
22200   pid_t child;
22201
22202   sparc_address_test ();
22203
22204   child = vfork ();
22205
22206   if (child == 0) {
22207     /* Here is another test for sparc vfork register problems.  This
22208        test uses lots of local variables, at least as many local
22209        variables as main has allocated so far including compiler
22210        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
22211        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
22212        reuse the register of parent for one of the local variables,
22213        since it will think that parent can't possibly be used any more
22214        in this routine.  Assigning to the local variable will thus
22215        munge parent in the parent process.  */
22216     pid_t
22217       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22218       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22219     /* Convince the compiler that p..p7 are live; otherwise, it might
22220        use the same hardware register for all 8 local variables.  */
22221     if (p != p1 || p != p2 || p != p3 || p != p4
22222         || p != p5 || p != p6 || p != p7)
22223       _exit(1);
22224
22225     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22226        from child file descriptors.  If the child closes a descriptor
22227        before it execs or exits, this munges the parent's descriptor
22228        as well.  Test for this by closing stdout in the child.  */
22229     _exit(close(fileno(stdout)) != 0);
22230   } else {
22231     int status;
22232     struct stat st;
22233
22234     while (wait(&status) != child)
22235       ;
22236     $ac_main_return(
22237          /* Was there some problem with vforking?  */
22238          child < 0
22239
22240          /* Did the child fail?  (This shouldn't happen.)  */
22241          || status
22242
22243          /* Did the vfork/compiler bug occur?  */
22244          || parent != getpid()
22245
22246          /* Did the file descriptor bug occur?  */
22247          || fstat(fileno(stdout), &st) != 0
22248          );
22249   }
22250 }
22251 _ACEOF
22252 rm -f conftest$ac_exeext
22253 if { (eval echo "$as_me:22253: \"$ac_link\"") >&5
22254   (eval $ac_link) 2>&5
22255   ac_status=$?
22256   echo "$as_me:22256: \$? = $ac_status" >&5
22257   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22258   { (eval echo "$as_me:22258: \"$ac_try\"") >&5
22259   (eval $ac_try) 2>&5
22260   ac_status=$?
22261   echo "$as_me:22261: \$? = $ac_status" >&5
22262   (exit $ac_status); }; }; then
22263   ac_cv_func_vfork_works=yes
22264 else
22265   echo "$as_me: program exited with status $ac_status" >&5
22266 echo "$as_me: failed program was:" >&5
22267 cat conftest.$ac_ext >&5
22268 ac_cv_func_vfork_works=no
22269 fi
22270 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22271 fi
22272 fi
22273 echo "$as_me:22273: result: $ac_cv_func_vfork_works" >&5
22274 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
22275
22276 fi;
22277 if test "x$ac_cv_func_fork_works" = xcross; then
22278   ac_cv_func_vfork_works=ac_cv_func_vfork
22279   { echo "$as_me:22279: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
22280 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
22281 fi
22282
22283 if test "x$ac_cv_func_vfork_works" = xyes; then
22284
22285 cat >>confdefs.h <<\EOF
22286 #define HAVE_WORKING_VFORK 1
22287 EOF
22288
22289 else
22290
22291 cat >>confdefs.h <<\EOF
22292 #define vfork fork
22293 EOF
22294
22295 fi
22296 if test "x$ac_cv_func_fork_works" = xyes; then
22297
22298 cat >>confdefs.h <<\EOF
22299 #define HAVE_WORKING_FORK 1
22300 EOF
22301
22302 fi
22303
22304 echo "$as_me:22304: checking if fopen accepts explicit binary mode" >&5
22305 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
22306 if test "${cf_cv_fopen_bin_r+set}" = set; then
22307   echo $ECHO_N "(cached) $ECHO_C" >&6
22308 else
22309
22310         if test "$cross_compiling" = yes; then
22311   cf_cv_fopen_bin_r=unknown
22312 else
22313   cat >conftest.$ac_ext <<_ACEOF
22314 #line 22314 "configure"
22315 #include "confdefs.h"
22316
22317 #include <stdio.h>
22318 int main(void) {
22319         FILE *fp = fopen("conftest.tmp", "wb");
22320         int rc = 0;
22321         if (fp != 0) {
22322                 int p, q;
22323                 for (p = 0; p < 256; ++p) {
22324                         fputc(p, fp);
22325                 }
22326                 fclose(fp);
22327                 fp = fopen("conftest.tmp", "rb");
22328                 if (fp != 0) {
22329                         for (p = 0; p < 256; ++p) {
22330                                 q = fgetc(fp);
22331                                 if (q != p) {
22332                                         rc = 1;
22333                                         break;
22334                                 }
22335                         }
22336                 } else {
22337                         rc = 1;
22338                 }
22339         } else {
22340                 rc = 1;
22341         }
22342         ${cf_cv_main_return:-return} (rc);
22343 }
22344
22345 _ACEOF
22346 rm -f conftest$ac_exeext
22347 if { (eval echo "$as_me:22347: \"$ac_link\"") >&5
22348   (eval $ac_link) 2>&5
22349   ac_status=$?
22350   echo "$as_me:22350: \$? = $ac_status" >&5
22351   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22352   { (eval echo "$as_me:22352: \"$ac_try\"") >&5
22353   (eval $ac_try) 2>&5
22354   ac_status=$?
22355   echo "$as_me:22355: \$? = $ac_status" >&5
22356   (exit $ac_status); }; }; then
22357   cf_cv_fopen_bin_r=yes
22358 else
22359   echo "$as_me: program exited with status $ac_status" >&5
22360 echo "$as_me: failed program was:" >&5
22361 cat conftest.$ac_ext >&5
22362 cf_cv_fopen_bin_r=no
22363 fi
22364 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22365 fi
22366
22367 fi
22368 echo "$as_me:22368: result: $cf_cv_fopen_bin_r" >&5
22369 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
22370 test "x$cf_cv_fopen_bin_r" != xno &&
22371 cat >>confdefs.h <<\EOF
22372 #define USE_FOPEN_BIN_R 1
22373 EOF
22374
22375 # special check for test/ditto.c
22376
22377 echo "$as_me:22377: checking for openpty in -lutil" >&5
22378 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
22379 if test "${ac_cv_lib_util_openpty+set}" = set; then
22380   echo $ECHO_N "(cached) $ECHO_C" >&6
22381 else
22382   ac_check_lib_save_LIBS=$LIBS
22383 LIBS="-lutil  $LIBS"
22384 cat >conftest.$ac_ext <<_ACEOF
22385 #line 22385 "configure"
22386 #include "confdefs.h"
22387
22388 /* Override any gcc2 internal prototype to avoid an error.  */
22389 #ifdef __cplusplus
22390 extern "C"
22391 #endif
22392 /* We use char because int might match the return type of a gcc2
22393    builtin and then its argument prototype would still apply.  */
22394 char openpty ();
22395 int
22396 main (void)
22397 {
22398 openpty ();
22399   ;
22400   return 0;
22401 }
22402 _ACEOF
22403 rm -f conftest.$ac_objext conftest$ac_exeext
22404 if { (eval echo "$as_me:22404: \"$ac_link\"") >&5
22405   (eval $ac_link) 2>&5
22406   ac_status=$?
22407   echo "$as_me:22407: \$? = $ac_status" >&5
22408   (exit $ac_status); } &&
22409          { ac_try='test -s conftest$ac_exeext'
22410   { (eval echo "$as_me:22410: \"$ac_try\"") >&5
22411   (eval $ac_try) 2>&5
22412   ac_status=$?
22413   echo "$as_me:22413: \$? = $ac_status" >&5
22414   (exit $ac_status); }; }; then
22415   ac_cv_lib_util_openpty=yes
22416 else
22417   echo "$as_me: failed program was:" >&5
22418 cat conftest.$ac_ext >&5
22419 ac_cv_lib_util_openpty=no
22420 fi
22421 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22422 LIBS=$ac_check_lib_save_LIBS
22423 fi
22424 echo "$as_me:22424: result: $ac_cv_lib_util_openpty" >&5
22425 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22426 if test $ac_cv_lib_util_openpty = yes; then
22427   cf_cv_lib_util=yes
22428 else
22429   cf_cv_lib_util=no
22430 fi
22431
22432 echo "$as_me:22432: checking for openpty header" >&5
22433 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22434 if test "${cf_cv_func_openpty+set}" = set; then
22435   echo $ECHO_N "(cached) $ECHO_C" >&6
22436 else
22437
22438         cf_save_LIBS="$LIBS"
22439         test $cf_cv_lib_util = yes && {
22440 cf_add_libs="$LIBS"
22441 # reverse order
22442 cf_add_0lib=
22443 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22444 # filter duplicates
22445 for cf_add_1lib in $cf_add_0lib; do
22446         for cf_add_2lib in $cf_add_libs; do
22447                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22448                         cf_add_1lib=
22449                         break
22450                 fi
22451         done
22452         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22453 done
22454 LIBS="$cf_add_libs"
22455  }
22456         for cf_header in pty.h libutil.h util.h
22457         do
22458         cat >conftest.$ac_ext <<_ACEOF
22459 #line 22459 "configure"
22460 #include "confdefs.h"
22461
22462 #include <$cf_header>
22463
22464 int
22465 main (void)
22466 {
22467
22468         int x = openpty((int *)0, (int *)0, (char *)0,
22469                                    (struct termios *)0, (struct winsize *)0);
22470
22471   ;
22472   return 0;
22473 }
22474 _ACEOF
22475 rm -f conftest.$ac_objext conftest$ac_exeext
22476 if { (eval echo "$as_me:22476: \"$ac_link\"") >&5
22477   (eval $ac_link) 2>&5
22478   ac_status=$?
22479   echo "$as_me:22479: \$? = $ac_status" >&5
22480   (exit $ac_status); } &&
22481          { ac_try='test -s conftest$ac_exeext'
22482   { (eval echo "$as_me:22482: \"$ac_try\"") >&5
22483   (eval $ac_try) 2>&5
22484   ac_status=$?
22485   echo "$as_me:22485: \$? = $ac_status" >&5
22486   (exit $ac_status); }; }; then
22487
22488                 cf_cv_func_openpty=$cf_header
22489                 break
22490
22491 else
22492   echo "$as_me: failed program was:" >&5
22493 cat conftest.$ac_ext >&5
22494
22495                 cf_cv_func_openpty=no
22496
22497 fi
22498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22499         done
22500         LIBS="$cf_save_LIBS"
22501
22502 fi
22503 echo "$as_me:22503: result: $cf_cv_func_openpty" >&5
22504 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22505
22506 if test "$cf_cv_func_openpty" != no ; then
22507
22508 cat >>confdefs.h <<EOF
22509 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22510 EOF
22511
22512 cat >>confdefs.h <<\EOF
22513 #define USE_XTERM_PTY 1
22514 EOF
22515
22516         if test "x$cf_cv_lib_util" = xyes ; then
22517
22518 cf_add_libs="$TEST_LIBS"
22519 # reverse order
22520 cf_add_0lib=
22521 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22522 # filter duplicates
22523 for cf_add_1lib in $cf_add_0lib; do
22524         for cf_add_2lib in $cf_add_libs; do
22525                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22526                         cf_add_1lib=
22527                         break
22528                 fi
22529         done
22530         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22531 done
22532 TEST_LIBS="$cf_add_libs"
22533
22534         fi
22535 fi
22536
22537 if test "$with_hashed_db" != no ; then
22538
22539 cat >>confdefs.h <<\EOF
22540 #define USE_HASHED_DB 1
22541 EOF
22542
22543 case $with_hashed_db in
22544 (yes|*able*)
22545         ;;
22546 (*)
22547         if test -d "$with_hashed_db" ; then
22548
22549 if test -n "$with_hashed_db/include" ; then
22550   for cf_add_incdir in $with_hashed_db/include
22551   do
22552         while test $cf_add_incdir != /usr/include
22553         do
22554           if test -d $cf_add_incdir
22555           then
22556                 cf_have_incdir=no
22557                 if test -n "$CFLAGS$CPPFLAGS" ; then
22558                   # a loop is needed to ensure we can add subdirs of existing dirs
22559                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22560                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22561                           cf_have_incdir=yes; break
22562                         fi
22563                   done
22564                 fi
22565
22566                 if test "$cf_have_incdir" = no ; then
22567                   if test "$cf_add_incdir" = /usr/local/include ; then
22568                         if test "$GCC" = yes
22569                         then
22570                           cf_save_CPPFLAGS=$CPPFLAGS
22571
22572         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22573         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22574
22575                           cat >conftest.$ac_ext <<_ACEOF
22576 #line 22576 "configure"
22577 #include "confdefs.h"
22578 #include <stdio.h>
22579 int
22580 main (void)
22581 {
22582 printf("Hello")
22583   ;
22584   return 0;
22585 }
22586 _ACEOF
22587 rm -f conftest.$ac_objext
22588 if { (eval echo "$as_me:22588: \"$ac_compile\"") >&5
22589   (eval $ac_compile) 2>&5
22590   ac_status=$?
22591   echo "$as_me:22591: \$? = $ac_status" >&5
22592   (exit $ac_status); } &&
22593          { ac_try='test -s conftest.$ac_objext'
22594   { (eval echo "$as_me:22594: \"$ac_try\"") >&5
22595   (eval $ac_try) 2>&5
22596   ac_status=$?
22597   echo "$as_me:22597: \$? = $ac_status" >&5
22598   (exit $ac_status); }; }; then
22599   :
22600 else
22601   echo "$as_me: failed program was:" >&5
22602 cat conftest.$ac_ext >&5
22603 cf_have_incdir=yes
22604 fi
22605 rm -f conftest.$ac_objext conftest.$ac_ext
22606                           CPPFLAGS=$cf_save_CPPFLAGS
22607                         fi
22608                   fi
22609                 fi
22610
22611                 if test "$cf_have_incdir" = no ; then
22612                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22613
22614 echo "${as_me:-configure}:22614: testing adding $cf_add_incdir to include-path ..." 1>&5
22615
22616                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22617
22618                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22619                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22620                   cf_add_incdir="$cf_top_incdir"
22621                 else
22622                   break
22623                 fi
22624           else
22625                 break
22626           fi
22627         done
22628   done
22629 fi
22630
22631 if test -n "$with_hashed_db/lib" ; then
22632         for cf_add_libdir in $with_hashed_db/lib
22633         do
22634                 if test $cf_add_libdir = /usr/lib ; then
22635                         :
22636                 elif test -d $cf_add_libdir
22637                 then
22638                         cf_have_libdir=no
22639                         if test -n "$LDFLAGS$LIBS" ; then
22640                                 # a loop is needed to ensure we can add subdirs of existing dirs
22641                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22642                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22643                                                 cf_have_libdir=yes; break
22644                                         fi
22645                                 done
22646                         fi
22647                         if test "$cf_have_libdir" = no ; then
22648                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22649
22650 echo "${as_me:-configure}:22650: testing adding $cf_add_libdir to library-path ..." 1>&5
22651
22652                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22653                         fi
22654                 fi
22655         done
22656 fi
22657
22658         else
22659                 case "$with_hashed_db" in
22660                 (./*|../*|/*)
22661                         { echo "$as_me:22661: WARNING: no such directory $with_hashed_db" >&5
22662 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22663                         ;;
22664                 (*)
22665
22666 cf_search=
22667
22668 test "x$prefix" != "xNONE" && \
22669 test -d "$prefix" && \
22670  {
22671         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22672         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22673         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22674         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22675         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22676         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22677 }
22678
22679 for cf_subdir_prefix in \
22680         /usr \
22681         /usr/local \
22682         /usr/pkg \
22683         /opt \
22684         /opt/local \
22685         $HOME
22686 do
22687
22688 test "x$cf_subdir_prefix" != "x$prefix" && \
22689 test -d "$cf_subdir_prefix" && \
22690 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22691         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22692         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22693         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22694         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22695         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22696         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"
22697 }
22698
22699 done
22700
22701         for cf_item in $cf_search
22702         do
22703                 case $cf_item in
22704                 (*/$with_hashed_db)
22705
22706 if test -n "$cf_item" ; then
22707   for cf_add_incdir in $cf_item
22708   do
22709         while test $cf_add_incdir != /usr/include
22710         do
22711           if test -d $cf_add_incdir
22712           then
22713                 cf_have_incdir=no
22714                 if test -n "$CFLAGS$CPPFLAGS" ; then
22715                   # a loop is needed to ensure we can add subdirs of existing dirs
22716                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22717                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22718                           cf_have_incdir=yes; break
22719                         fi
22720                   done
22721                 fi
22722
22723                 if test "$cf_have_incdir" = no ; then
22724                   if test "$cf_add_incdir" = /usr/local/include ; then
22725                         if test "$GCC" = yes
22726                         then
22727                           cf_save_CPPFLAGS=$CPPFLAGS
22728
22729         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22730         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22731
22732                           cat >conftest.$ac_ext <<_ACEOF
22733 #line 22733 "configure"
22734 #include "confdefs.h"
22735 #include <stdio.h>
22736 int
22737 main (void)
22738 {
22739 printf("Hello")
22740   ;
22741   return 0;
22742 }
22743 _ACEOF
22744 rm -f conftest.$ac_objext
22745 if { (eval echo "$as_me:22745: \"$ac_compile\"") >&5
22746   (eval $ac_compile) 2>&5
22747   ac_status=$?
22748   echo "$as_me:22748: \$? = $ac_status" >&5
22749   (exit $ac_status); } &&
22750          { ac_try='test -s conftest.$ac_objext'
22751   { (eval echo "$as_me:22751: \"$ac_try\"") >&5
22752   (eval $ac_try) 2>&5
22753   ac_status=$?
22754   echo "$as_me:22754: \$? = $ac_status" >&5
22755   (exit $ac_status); }; }; then
22756   :
22757 else
22758   echo "$as_me: failed program was:" >&5
22759 cat conftest.$ac_ext >&5
22760 cf_have_incdir=yes
22761 fi
22762 rm -f conftest.$ac_objext conftest.$ac_ext
22763                           CPPFLAGS=$cf_save_CPPFLAGS
22764                         fi
22765                   fi
22766                 fi
22767
22768                 if test "$cf_have_incdir" = no ; then
22769                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22770
22771 echo "${as_me:-configure}:22771: testing adding $cf_add_incdir to include-path ..." 1>&5
22772
22773                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22774
22775                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22776                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22777                   cf_add_incdir="$cf_top_incdir"
22778                 else
22779                   break
22780                 fi
22781           else
22782                 break
22783           fi
22784         done
22785   done
22786 fi
22787
22788                         ;;
22789                 esac
22790         done
22791
22792 cf_search=
22793
22794 test "x$prefix" != "xNONE" && \
22795 test -d "$prefix" && \
22796  {
22797         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22798         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22799         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22800         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22801         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22802         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22803 }
22804
22805 for cf_subdir_prefix in \
22806         /usr \
22807         /usr/local \
22808         /usr/pkg \
22809         /opt \
22810         /opt/local \
22811         $HOME
22812 do
22813
22814 test "x$cf_subdir_prefix" != "x$prefix" && \
22815 test -d "$cf_subdir_prefix" && \
22816 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22817         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22818         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22819         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22820         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22821         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22822         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"
22823 }
22824
22825 done
22826
22827         for cf_item in $cf_search
22828         do
22829                 case $cf_item in
22830                 (*/$with_hashed_db)
22831
22832 if test -n "$cf_item" ; then
22833         for cf_add_libdir in $cf_item
22834         do
22835                 if test $cf_add_libdir = /usr/lib ; then
22836                         :
22837                 elif test -d $cf_add_libdir
22838                 then
22839                         cf_have_libdir=no
22840                         if test -n "$LDFLAGS$LIBS" ; then
22841                                 # a loop is needed to ensure we can add subdirs of existing dirs
22842                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22843                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22844                                                 cf_have_libdir=yes; break
22845                                         fi
22846                                 done
22847                         fi
22848                         if test "$cf_have_libdir" = no ; then
22849                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22850
22851 echo "${as_me:-configure}:22851: testing adding $cf_add_libdir to library-path ..." 1>&5
22852
22853                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22854                         fi
22855                 fi
22856         done
22857 fi
22858
22859                         ;;
22860                 esac
22861         done
22862
22863                         ;;
22864                 esac
22865         fi
22866 esac
22867
22868 echo "$as_me:22868: checking for db.h" >&5
22869 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22870 if test "${ac_cv_header_db_h+set}" = set; then
22871   echo $ECHO_N "(cached) $ECHO_C" >&6
22872 else
22873   cat >conftest.$ac_ext <<_ACEOF
22874 #line 22874 "configure"
22875 #include "confdefs.h"
22876 #include <db.h>
22877 _ACEOF
22878 if { (eval echo "$as_me:22878: \"$ac_cpp conftest.$ac_ext\"") >&5
22879   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22880   ac_status=$?
22881   egrep -v '^ *\+' conftest.er1 >conftest.err
22882   rm -f conftest.er1
22883   cat conftest.err >&5
22884   echo "$as_me:22884: \$? = $ac_status" >&5
22885   (exit $ac_status); } >/dev/null; then
22886   if test -s conftest.err; then
22887     ac_cpp_err=$ac_c_preproc_warn_flag
22888   else
22889     ac_cpp_err=
22890   fi
22891 else
22892   ac_cpp_err=yes
22893 fi
22894 if test -z "$ac_cpp_err"; then
22895   ac_cv_header_db_h=yes
22896 else
22897   echo "$as_me: failed program was:" >&5
22898   cat conftest.$ac_ext >&5
22899   ac_cv_header_db_h=no
22900 fi
22901 rm -f conftest.err conftest.$ac_ext
22902 fi
22903 echo "$as_me:22903: result: $ac_cv_header_db_h" >&5
22904 echo "${ECHO_T}$ac_cv_header_db_h" >&6
22905 if test $ac_cv_header_db_h = yes; then
22906
22907 echo "$as_me:22907: checking for version of db" >&5
22908 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22909 if test "${cf_cv_hashed_db_version+set}" = set; then
22910   echo $ECHO_N "(cached) $ECHO_C" >&6
22911 else
22912
22913 cf_cv_hashed_db_version=unknown
22914
22915 for cf_db_version in 1 2 3 4 5 6
22916 do
22917
22918 echo "${as_me:-configure}:22918: testing checking for db version $cf_db_version ..." 1>&5
22919
22920         cat >conftest.$ac_ext <<_ACEOF
22921 #line 22921 "configure"
22922 #include "confdefs.h"
22923
22924 $ac_includes_default
22925 #include <db.h>
22926
22927 #ifdef DB_VERSION_MAJOR
22928         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22929 #if $cf_db_version == DB_VERSION_MAJOR
22930         /* ok */
22931 #else
22932         make an error
22933 #endif
22934 #else
22935 #if $cf_db_version == 1
22936         /* ok: assuming this is DB 1.8.5 */
22937 #else
22938         make an error
22939 #endif
22940 #endif
22941
22942 int
22943 main (void)
22944 {
22945 DBT *foo = 0
22946   ;
22947   return 0;
22948 }
22949 _ACEOF
22950 rm -f conftest.$ac_objext
22951 if { (eval echo "$as_me:22951: \"$ac_compile\"") >&5
22952   (eval $ac_compile) 2>&5
22953   ac_status=$?
22954   echo "$as_me:22954: \$? = $ac_status" >&5
22955   (exit $ac_status); } &&
22956          { ac_try='test -s conftest.$ac_objext'
22957   { (eval echo "$as_me:22957: \"$ac_try\"") >&5
22958   (eval $ac_try) 2>&5
22959   ac_status=$?
22960   echo "$as_me:22960: \$? = $ac_status" >&5
22961   (exit $ac_status); }; }; then
22962
22963         cf_cv_hashed_db_version=$cf_db_version
22964         break
22965
22966 else
22967   echo "$as_me: failed program was:" >&5
22968 cat conftest.$ac_ext >&5
22969 fi
22970 rm -f conftest.$ac_objext conftest.$ac_ext
22971 done
22972
22973 fi
22974 echo "$as_me:22974: result: $cf_cv_hashed_db_version" >&5
22975 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22976
22977 if test "$cf_cv_hashed_db_version" = unknown ; then
22978         { { echo "$as_me:22978: error: Cannot determine version of db" >&5
22979 echo "$as_me: error: Cannot determine version of db" >&2;}
22980    { (exit 1); exit 1; }; }
22981 else
22982
22983 echo "$as_me:22983: checking for db libraries" >&5
22984 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22985 if test "${cf_cv_hashed_db_libs+set}" = set; then
22986   echo $ECHO_N "(cached) $ECHO_C" >&6
22987 else
22988
22989 cf_cv_hashed_db_libs=unknown
22990 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22991 do
22992         cf_save_libs="$LIBS"
22993         if test -n "$cf_db_libs"; then
22994
22995 cf_add_libs="$LIBS"
22996 # reverse order
22997 cf_add_0lib=
22998 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22999 # filter duplicates
23000 for cf_add_1lib in $cf_add_0lib; do
23001         for cf_add_2lib in $cf_add_libs; do
23002                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23003                         cf_add_1lib=
23004                         break
23005                 fi
23006         done
23007         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23008 done
23009 LIBS="$cf_add_libs"
23010
23011         fi
23012
23013 echo "${as_me:-configure}:23013: testing checking for library "$cf_db_libs" ..." 1>&5
23014
23015         cat >conftest.$ac_ext <<_ACEOF
23016 #line 23016 "configure"
23017 #include "confdefs.h"
23018
23019 $ac_includes_default
23020 #include <db.h>
23021
23022 int
23023 main (void)
23024 {
23025
23026         char *path = "/tmp/foo";
23027 #ifdef DB_VERSION_MAJOR
23028 #if DB_VERSION_MAJOR >= 4
23029         DB *result = 0;
23030         db_create(&result, NULL, 0);
23031         result->open(result,
23032                 NULL,
23033                 path,
23034                 path,
23035                 DB_HASH,
23036                 DB_CREATE,
23037                 0644);
23038 #elif DB_VERSION_MAJOR >= 3
23039         DB *result = 0;
23040         db_create(&result, NULL, 0);
23041         result->open(result,
23042                 path,
23043                 path,
23044                 DB_HASH,
23045                 DB_CREATE,
23046                 0644);
23047 #elif DB_VERSION_MAJOR >= 2
23048         DB *result = 0;
23049         db_open(path,
23050                 DB_HASH,
23051                 DB_CREATE,
23052                 0644,
23053                 (DB_ENV *) 0,
23054                 (DB_INFO *) 0,
23055                 &result);
23056 #endif /* DB_VERSION_MAJOR */
23057 #else
23058         DB *result = dbopen(path,
23059                      2,
23060                      0644,
23061                      DB_HASH,
23062                      0);
23063 #endif
23064         ${cf_cv_main_return:-return}(result != 0)
23065
23066   ;
23067   return 0;
23068 }
23069 _ACEOF
23070 rm -f conftest.$ac_objext conftest$ac_exeext
23071 if { (eval echo "$as_me:23071: \"$ac_link\"") >&5
23072   (eval $ac_link) 2>&5
23073   ac_status=$?
23074   echo "$as_me:23074: \$? = $ac_status" >&5
23075   (exit $ac_status); } &&
23076          { ac_try='test -s conftest$ac_exeext'
23077   { (eval echo "$as_me:23077: \"$ac_try\"") >&5
23078   (eval $ac_try) 2>&5
23079   ac_status=$?
23080   echo "$as_me:23080: \$? = $ac_status" >&5
23081   (exit $ac_status); }; }; then
23082
23083         if test -n "$cf_db_libs" ; then
23084                 cf_cv_hashed_db_libs=$cf_db_libs
23085         else
23086                 cf_cv_hashed_db_libs=default
23087         fi
23088         LIBS="$cf_save_libs"
23089         break
23090
23091 else
23092   echo "$as_me: failed program was:" >&5
23093 cat conftest.$ac_ext >&5
23094 fi
23095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23096         LIBS="$cf_save_libs"
23097 done
23098
23099 fi
23100 echo "$as_me:23100: result: $cf_cv_hashed_db_libs" >&5
23101 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23102
23103         if test "$cf_cv_hashed_db_libs" = unknown ; then
23104                 { { echo "$as_me:23104: error: Cannot determine library for db" >&5
23105 echo "$as_me: error: Cannot determine library for db" >&2;}
23106    { (exit 1); exit 1; }; }
23107         elif test "$cf_cv_hashed_db_libs" != default ; then
23108
23109 cf_add_libs="$LIBS"
23110 # reverse order
23111 cf_add_0lib=
23112 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23113 # filter duplicates
23114 for cf_add_1lib in $cf_add_0lib; do
23115         for cf_add_2lib in $cf_add_libs; do
23116                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23117                         cf_add_1lib=
23118                         break
23119                 fi
23120         done
23121         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23122 done
23123 LIBS="$cf_add_libs"
23124
23125         fi
23126 fi
23127
23128 else
23129
23130         { { echo "$as_me:23130: error: Cannot find db.h" >&5
23131 echo "$as_me: error: Cannot find db.h" >&2;}
23132    { (exit 1); exit 1; }; }
23133
23134 fi
23135
23136 fi
23137
23138 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23139         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23140         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23141 fi
23142
23143 # Just in case, check if the C compiler has a bool type.
23144
23145 echo "$as_me:23145: checking if we should include stdbool.h" >&5
23146 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23147
23148 if test "${cf_cv_header_stdbool_h+set}" = set; then
23149   echo $ECHO_N "(cached) $ECHO_C" >&6
23150 else
23151
23152         cat >conftest.$ac_ext <<_ACEOF
23153 #line 23153 "configure"
23154 #include "confdefs.h"
23155
23156 int
23157 main (void)
23158 {
23159 bool foo = false
23160   ;
23161   return 0;
23162 }
23163 _ACEOF
23164 rm -f conftest.$ac_objext
23165 if { (eval echo "$as_me:23165: \"$ac_compile\"") >&5
23166   (eval $ac_compile) 2>&5
23167   ac_status=$?
23168   echo "$as_me:23168: \$? = $ac_status" >&5
23169   (exit $ac_status); } &&
23170          { ac_try='test -s conftest.$ac_objext'
23171   { (eval echo "$as_me:23171: \"$ac_try\"") >&5
23172   (eval $ac_try) 2>&5
23173   ac_status=$?
23174   echo "$as_me:23174: \$? = $ac_status" >&5
23175   (exit $ac_status); }; }; then
23176   cf_cv_header_stdbool_h=0
23177 else
23178   echo "$as_me: failed program was:" >&5
23179 cat conftest.$ac_ext >&5
23180 cat >conftest.$ac_ext <<_ACEOF
23181 #line 23181 "configure"
23182 #include "confdefs.h"
23183
23184 #ifndef __BEOS__
23185 #include <stdbool.h>
23186 #endif
23187
23188 int
23189 main (void)
23190 {
23191 bool foo = false
23192   ;
23193   return 0;
23194 }
23195 _ACEOF
23196 rm -f conftest.$ac_objext
23197 if { (eval echo "$as_me:23197: \"$ac_compile\"") >&5
23198   (eval $ac_compile) 2>&5
23199   ac_status=$?
23200   echo "$as_me:23200: \$? = $ac_status" >&5
23201   (exit $ac_status); } &&
23202          { ac_try='test -s conftest.$ac_objext'
23203   { (eval echo "$as_me:23203: \"$ac_try\"") >&5
23204   (eval $ac_try) 2>&5
23205   ac_status=$?
23206   echo "$as_me:23206: \$? = $ac_status" >&5
23207   (exit $ac_status); }; }; then
23208   cf_cv_header_stdbool_h=1
23209 else
23210   echo "$as_me: failed program was:" >&5
23211 cat conftest.$ac_ext >&5
23212 cf_cv_header_stdbool_h=0
23213 fi
23214 rm -f conftest.$ac_objext conftest.$ac_ext
23215 fi
23216 rm -f conftest.$ac_objext conftest.$ac_ext
23217 fi
23218
23219 if test "$cf_cv_header_stdbool_h" = 1
23220 then    echo "$as_me:23220: result: yes" >&5
23221 echo "${ECHO_T}yes" >&6
23222 else    echo "$as_me:23222: result: no" >&5
23223 echo "${ECHO_T}no" >&6
23224 fi
23225
23226 echo "$as_me:23226: checking for builtin bool type" >&5
23227 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23228
23229 if test "${cf_cv_cc_bool_type+set}" = set; then
23230   echo $ECHO_N "(cached) $ECHO_C" >&6
23231 else
23232
23233         cat >conftest.$ac_ext <<_ACEOF
23234 #line 23234 "configure"
23235 #include "confdefs.h"
23236
23237 #include <stdio.h>
23238 #include <sys/types.h>
23239
23240 int
23241 main (void)
23242 {
23243 bool x = false
23244   ;
23245   return 0;
23246 }
23247 _ACEOF
23248 rm -f conftest.$ac_objext
23249 if { (eval echo "$as_me:23249: \"$ac_compile\"") >&5
23250   (eval $ac_compile) 2>&5
23251   ac_status=$?
23252   echo "$as_me:23252: \$? = $ac_status" >&5
23253   (exit $ac_status); } &&
23254          { ac_try='test -s conftest.$ac_objext'
23255   { (eval echo "$as_me:23255: \"$ac_try\"") >&5
23256   (eval $ac_try) 2>&5
23257   ac_status=$?
23258   echo "$as_me:23258: \$? = $ac_status" >&5
23259   (exit $ac_status); }; }; then
23260   cf_cv_cc_bool_type=1
23261 else
23262   echo "$as_me: failed program was:" >&5
23263 cat conftest.$ac_ext >&5
23264 cf_cv_cc_bool_type=0
23265 fi
23266 rm -f conftest.$ac_objext conftest.$ac_ext
23267
23268 fi
23269
23270 if test "$cf_cv_cc_bool_type" = 1
23271 then    echo "$as_me:23271: result: yes" >&5
23272 echo "${ECHO_T}yes" >&6
23273 else    echo "$as_me:23273: result: no" >&5
23274 echo "${ECHO_T}no" >&6
23275 fi
23276
23277 # Check for C++ compiler characteristics (and ensure that it's there!)
23278 if test -n "$CXX" ; then
23279         ac_ext=cc
23280 ac_cpp='$CXXCPP $CPPFLAGS'
23281 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23282 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23283 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23284 ac_main_return=return
23285
23286 if test -n "$GXX" ; then
23287
23288         cf_save="$LIBS"
23289         LIBS="$LIBS $CXXLIBS"
23290         echo "$as_me:23290: checking if we already have C++ library" >&5
23291 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
23292         cat >conftest.$ac_ext <<_ACEOF
23293 #line 23293 "configure"
23294 #include "confdefs.h"
23295
23296                         #include <iostream>
23297 int
23298 main (void)
23299 {
23300
23301                         std::cout << "Hello World!" << std::endl;
23302   ;
23303   return 0;
23304 }
23305 _ACEOF
23306 rm -f conftest.$ac_objext conftest$ac_exeext
23307 if { (eval echo "$as_me:23307: \"$ac_link\"") >&5
23308   (eval $ac_link) 2>&5
23309   ac_status=$?
23310   echo "$as_me:23310: \$? = $ac_status" >&5
23311   (exit $ac_status); } &&
23312          { ac_try='test -s conftest$ac_exeext'
23313   { (eval echo "$as_me:23313: \"$ac_try\"") >&5
23314   (eval $ac_try) 2>&5
23315   ac_status=$?
23316   echo "$as_me:23316: \$? = $ac_status" >&5
23317   (exit $ac_status); }; }; then
23318   cf_have_libstdcpp=yes
23319 else
23320   echo "$as_me: failed program was:" >&5
23321 cat conftest.$ac_ext >&5
23322 cf_have_libstdcpp=no
23323 fi
23324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23325         echo "$as_me:23325: result: $cf_have_libstdcpp" >&5
23326 echo "${ECHO_T}$cf_have_libstdcpp" >&6
23327         LIBS="$cf_save"
23328
23329         if test $cf_have_libstdcpp != yes
23330         then
23331                 case $cf_cv_system_name in
23332                 (os2*)
23333                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
23334                                 cf_stdcpp_libname=stdcpp
23335                         else
23336                                 cf_stdcpp_libname=stdc++
23337                         fi
23338                         ;;
23339                 (*)
23340                         cf_stdcpp_libname=stdc++
23341                         ;;
23342                 esac
23343
23344                 echo "$as_me:23344: checking for library $cf_stdcpp_libname" >&5
23345 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
23346 if test "${cf_cv_libstdcpp+set}" = set; then
23347   echo $ECHO_N "(cached) $ECHO_C" >&6
23348 else
23349
23350                         cf_save="$LIBS"
23351                         LIBS="$LIBS $CXXLIBS"
23352
23353 cf_add_libs="$LIBS"
23354 # reverse order
23355 cf_add_0lib=
23356 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23357 # filter duplicates
23358 for cf_add_1lib in $cf_add_0lib; do
23359         for cf_add_2lib in $cf_add_libs; do
23360                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23361                         cf_add_1lib=
23362                         break
23363                 fi
23364         done
23365         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23366 done
23367 LIBS="$cf_add_libs"
23368
23369                 cat >conftest.$ac_ext <<_ACEOF
23370 #line 23370 "configure"
23371 #include "confdefs.h"
23372
23373                                 #include <iostream>
23374 int
23375 main (void)
23376 {
23377
23378                                 std::cout << "Hello World!" << std::endl;
23379   ;
23380   return 0;
23381 }
23382 _ACEOF
23383 rm -f conftest.$ac_objext conftest$ac_exeext
23384 if { (eval echo "$as_me:23384: \"$ac_link\"") >&5
23385   (eval $ac_link) 2>&5
23386   ac_status=$?
23387   echo "$as_me:23387: \$? = $ac_status" >&5
23388   (exit $ac_status); } &&
23389          { ac_try='test -s conftest$ac_exeext'
23390   { (eval echo "$as_me:23390: \"$ac_try\"") >&5
23391   (eval $ac_try) 2>&5
23392   ac_status=$?
23393   echo "$as_me:23393: \$? = $ac_status" >&5
23394   (exit $ac_status); }; }; then
23395   cf_cv_libstdcpp=yes
23396 else
23397   echo "$as_me: failed program was:" >&5
23398 cat conftest.$ac_ext >&5
23399 cf_cv_libstdcpp=no
23400 fi
23401 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23402                         LIBS="$cf_save"
23403
23404 fi
23405 echo "$as_me:23405: result: $cf_cv_libstdcpp" >&5
23406 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23407                 test "$cf_cv_libstdcpp" = yes && {
23408 cf_add_libs="$CXXLIBS"
23409 # reverse order
23410 cf_add_0lib=
23411 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23412 # filter duplicates
23413 for cf_add_1lib in $cf_add_0lib; do
23414         for cf_add_2lib in $cf_add_libs; do
23415                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23416                         cf_add_1lib=
23417                         break
23418                 fi
23419         done
23420         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23421 done
23422 CXXLIBS="$cf_add_libs"
23423  }
23424         fi
23425 fi
23426
23427         echo "$as_me:23427: checking whether $CXX understands -c and -o together" >&5
23428 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23429 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23430   echo $ECHO_N "(cached) $ECHO_C" >&6
23431 else
23432
23433 cat > conftest.$ac_ext <<CF_EOF
23434 int main(void)
23435 {
23436         ${cf_cv_main_return:-return}(0);
23437 }
23438 CF_EOF
23439 # We do the test twice because some compilers refuse to overwrite an
23440 # existing .o file with -o, though they will create one.
23441 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23442 if { (eval echo "$as_me:23442: \"$ac_try\"") >&5
23443   (eval $ac_try) 2>&5
23444   ac_status=$?
23445   echo "$as_me:23445: \$? = $ac_status" >&5
23446   (exit $ac_status); } &&
23447   test -f conftest2.$ac_objext && { (eval echo "$as_me:23447: \"$ac_try\"") >&5
23448   (eval $ac_try) 2>&5
23449   ac_status=$?
23450   echo "$as_me:23450: \$? = $ac_status" >&5
23451   (exit $ac_status); };
23452 then
23453   eval cf_cv_prog_CXX_c_o=yes
23454 else
23455   eval cf_cv_prog_CXX_c_o=no
23456 fi
23457 rm -rf conftest*
23458
23459 fi
23460 if test $cf_cv_prog_CXX_c_o = yes; then
23461   echo "$as_me:23461: result: yes" >&5
23462 echo "${ECHO_T}yes" >&6
23463 else
23464   echo "$as_me:23464: result: no" >&5
23465 echo "${ECHO_T}no" >&6
23466 fi
23467
23468         case $GXX_VERSION in
23469         (1*|2.0-6*)
23470                 cf_cxx_library=yes
23471                 ;;
23472         (*-2.7*|2.7*)
23473
23474 cf_cxx_library=unknown
23475 case $cf_cv_system_name in
23476 (os2*)
23477         cf_gpp_libname=gpp
23478         ;;
23479 (*)
23480         cf_gpp_libname=g++
23481         ;;
23482 esac
23483 if test "$GXX" = yes; then
23484         echo "$as_me:23484: checking for lib$cf_gpp_libname" >&5
23485 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23486         cf_save="$LIBS"
23487
23488 cf_add_libs="$LIBS"
23489 # reverse order
23490 cf_add_0lib=
23491 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23492 # filter duplicates
23493 for cf_add_1lib in $cf_add_0lib; do
23494         for cf_add_2lib in $cf_add_libs; do
23495                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23496                         cf_add_1lib=
23497                         break
23498                 fi
23499         done
23500         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23501 done
23502 LIBS="$cf_add_libs"
23503
23504         cat >conftest.$ac_ext <<_ACEOF
23505 #line 23505 "configure"
23506 #include "confdefs.h"
23507
23508 #include <$cf_gpp_libname/builtin.h>
23509
23510 int
23511 main (void)
23512 {
23513 two_arg_error_handler_t foo2 = lib_error_handler
23514   ;
23515   return 0;
23516 }
23517 _ACEOF
23518 rm -f conftest.$ac_objext conftest$ac_exeext
23519 if { (eval echo "$as_me:23519: \"$ac_link\"") >&5
23520   (eval $ac_link) 2>&5
23521   ac_status=$?
23522   echo "$as_me:23522: \$? = $ac_status" >&5
23523   (exit $ac_status); } &&
23524          { ac_try='test -s conftest$ac_exeext'
23525   { (eval echo "$as_me:23525: \"$ac_try\"") >&5
23526   (eval $ac_try) 2>&5
23527   ac_status=$?
23528   echo "$as_me:23528: \$? = $ac_status" >&5
23529   (exit $ac_status); }; }; then
23530   cf_cxx_library=yes
23531
23532 cf_add_libs="$CXXLIBS"
23533 # reverse order
23534 cf_add_0lib=
23535 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23536 # filter duplicates
23537 for cf_add_1lib in $cf_add_0lib; do
23538         for cf_add_2lib in $cf_add_libs; do
23539                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23540                         cf_add_1lib=
23541                         break
23542                 fi
23543         done
23544         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23545 done
23546 CXXLIBS="$cf_add_libs"
23547
23548          if test "$cf_gpp_libname" = cpp ; then
23549
23550 cat >>confdefs.h <<\EOF
23551 #define HAVE_GPP_BUILTIN_H 1
23552 EOF
23553
23554          else
23555
23556 cat >>confdefs.h <<\EOF
23557 #define HAVE_GXX_BUILTIN_H 1
23558 EOF
23559
23560          fi
23561 else
23562   echo "$as_me: failed program was:" >&5
23563 cat conftest.$ac_ext >&5
23564 cat >conftest.$ac_ext <<_ACEOF
23565 #line 23565 "configure"
23566 #include "confdefs.h"
23567
23568 #include <builtin.h>
23569
23570 int
23571 main (void)
23572 {
23573 two_arg_error_handler_t foo2 = lib_error_handler
23574   ;
23575   return 0;
23576 }
23577 _ACEOF
23578 rm -f conftest.$ac_objext conftest$ac_exeext
23579 if { (eval echo "$as_me:23579: \"$ac_link\"") >&5
23580   (eval $ac_link) 2>&5
23581   ac_status=$?
23582   echo "$as_me:23582: \$? = $ac_status" >&5
23583   (exit $ac_status); } &&
23584          { ac_try='test -s conftest$ac_exeext'
23585   { (eval echo "$as_me:23585: \"$ac_try\"") >&5
23586   (eval $ac_try) 2>&5
23587   ac_status=$?
23588   echo "$as_me:23588: \$? = $ac_status" >&5
23589   (exit $ac_status); }; }; then
23590   cf_cxx_library=yes
23591
23592 cf_add_libs="$CXXLIBS"
23593 # reverse order
23594 cf_add_0lib=
23595 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23596 # filter duplicates
23597 for cf_add_1lib in $cf_add_0lib; do
23598         for cf_add_2lib in $cf_add_libs; do
23599                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23600                         cf_add_1lib=
23601                         break
23602                 fi
23603         done
23604         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23605 done
23606 CXXLIBS="$cf_add_libs"
23607
23608 cat >>confdefs.h <<\EOF
23609 #define HAVE_BUILTIN_H 1
23610 EOF
23611
23612 else
23613   echo "$as_me: failed program was:" >&5
23614 cat conftest.$ac_ext >&5
23615 cf_cxx_library=no
23616 fi
23617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23618 fi
23619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23620         LIBS="$cf_save"
23621         echo "$as_me:23621: result: $cf_cxx_library" >&5
23622 echo "${ECHO_T}$cf_cxx_library" >&6
23623 fi
23624
23625                 ;;
23626         (*)
23627                 cf_cxx_library=no
23628                 ;;
23629         esac
23630
23631         ac_ext=cc
23632 ac_cpp='$CXXCPP $CPPFLAGS'
23633 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23634 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23635 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23636 ac_main_return=return
23637 echo "$as_me:23637: checking how to run the C++ preprocessor" >&5
23638 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23639 if test -z "$CXXCPP"; then
23640   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23641   echo $ECHO_N "(cached) $ECHO_C" >&6
23642 else
23643       # Double quotes because CXXCPP needs to be expanded
23644     for CXXCPP in "$CXX -E" "/lib/cpp"
23645     do
23646       ac_preproc_ok=false
23647 for ac_cxx_preproc_warn_flag in '' yes
23648 do
23649   # Use a header file that comes with gcc, so configuring glibc
23650   # with a fresh cross-compiler works.
23651   # On the NeXT, cc -E runs the code through the compiler's parser,
23652   # not just through cpp. "Syntax error" is here to catch this case.
23653   cat >conftest.$ac_ext <<_ACEOF
23654 #line 23654 "configure"
23655 #include "confdefs.h"
23656 #include <assert.h>
23657                      Syntax error
23658 _ACEOF
23659 if { (eval echo "$as_me:23659: \"$ac_cpp conftest.$ac_ext\"") >&5
23660   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23661   ac_status=$?
23662   egrep -v '^ *\+' conftest.er1 >conftest.err
23663   rm -f conftest.er1
23664   cat conftest.err >&5
23665   echo "$as_me:23665: \$? = $ac_status" >&5
23666   (exit $ac_status); } >/dev/null; then
23667   if test -s conftest.err; then
23668     ac_cpp_err=$ac_cxx_preproc_warn_flag
23669   else
23670     ac_cpp_err=
23671   fi
23672 else
23673   ac_cpp_err=yes
23674 fi
23675 if test -z "$ac_cpp_err"; then
23676   :
23677 else
23678   echo "$as_me: failed program was:" >&5
23679   cat conftest.$ac_ext >&5
23680   # Broken: fails on valid input.
23681 continue
23682 fi
23683 rm -f conftest.err conftest.$ac_ext
23684
23685   # OK, works on sane cases.  Now check whether non-existent headers
23686   # can be detected and how.
23687   cat >conftest.$ac_ext <<_ACEOF
23688 #line 23688 "configure"
23689 #include "confdefs.h"
23690 #include <ac_nonexistent.h>
23691 _ACEOF
23692 if { (eval echo "$as_me:23692: \"$ac_cpp conftest.$ac_ext\"") >&5
23693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23694   ac_status=$?
23695   egrep -v '^ *\+' conftest.er1 >conftest.err
23696   rm -f conftest.er1
23697   cat conftest.err >&5
23698   echo "$as_me:23698: \$? = $ac_status" >&5
23699   (exit $ac_status); } >/dev/null; then
23700   if test -s conftest.err; then
23701     ac_cpp_err=$ac_cxx_preproc_warn_flag
23702   else
23703     ac_cpp_err=
23704   fi
23705 else
23706   ac_cpp_err=yes
23707 fi
23708 if test -z "$ac_cpp_err"; then
23709   # Broken: success on invalid input.
23710 continue
23711 else
23712   echo "$as_me: failed program was:" >&5
23713   cat conftest.$ac_ext >&5
23714   # Passes both tests.
23715 ac_preproc_ok=:
23716 break
23717 fi
23718 rm -f conftest.err conftest.$ac_ext
23719
23720 done
23721 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23722 rm -f conftest.err conftest.$ac_ext
23723 if $ac_preproc_ok; then
23724   break
23725 fi
23726
23727     done
23728     ac_cv_prog_CXXCPP=$CXXCPP
23729
23730 fi
23731   CXXCPP=$ac_cv_prog_CXXCPP
23732 else
23733   ac_cv_prog_CXXCPP=$CXXCPP
23734 fi
23735 echo "$as_me:23735: result: $CXXCPP" >&5
23736 echo "${ECHO_T}$CXXCPP" >&6
23737 ac_preproc_ok=false
23738 for ac_cxx_preproc_warn_flag in '' yes
23739 do
23740   # Use a header file that comes with gcc, so configuring glibc
23741   # with a fresh cross-compiler works.
23742   # On the NeXT, cc -E runs the code through the compiler's parser,
23743   # not just through cpp. "Syntax error" is here to catch this case.
23744   cat >conftest.$ac_ext <<_ACEOF
23745 #line 23745 "configure"
23746 #include "confdefs.h"
23747 #include <assert.h>
23748                      Syntax error
23749 _ACEOF
23750 if { (eval echo "$as_me:23750: \"$ac_cpp conftest.$ac_ext\"") >&5
23751   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23752   ac_status=$?
23753   egrep -v '^ *\+' conftest.er1 >conftest.err
23754   rm -f conftest.er1
23755   cat conftest.err >&5
23756   echo "$as_me:23756: \$? = $ac_status" >&5
23757   (exit $ac_status); } >/dev/null; then
23758   if test -s conftest.err; then
23759     ac_cpp_err=$ac_cxx_preproc_warn_flag
23760   else
23761     ac_cpp_err=
23762   fi
23763 else
23764   ac_cpp_err=yes
23765 fi
23766 if test -z "$ac_cpp_err"; then
23767   :
23768 else
23769   echo "$as_me: failed program was:" >&5
23770   cat conftest.$ac_ext >&5
23771   # Broken: fails on valid input.
23772 continue
23773 fi
23774 rm -f conftest.err conftest.$ac_ext
23775
23776   # OK, works on sane cases.  Now check whether non-existent headers
23777   # can be detected and how.
23778   cat >conftest.$ac_ext <<_ACEOF
23779 #line 23779 "configure"
23780 #include "confdefs.h"
23781 #include <ac_nonexistent.h>
23782 _ACEOF
23783 if { (eval echo "$as_me:23783: \"$ac_cpp conftest.$ac_ext\"") >&5
23784   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23785   ac_status=$?
23786   egrep -v '^ *\+' conftest.er1 >conftest.err
23787   rm -f conftest.er1
23788   cat conftest.err >&5
23789   echo "$as_me:23789: \$? = $ac_status" >&5
23790   (exit $ac_status); } >/dev/null; then
23791   if test -s conftest.err; then
23792     ac_cpp_err=$ac_cxx_preproc_warn_flag
23793   else
23794     ac_cpp_err=
23795   fi
23796 else
23797   ac_cpp_err=yes
23798 fi
23799 if test -z "$ac_cpp_err"; then
23800   # Broken: success on invalid input.
23801 continue
23802 else
23803   echo "$as_me: failed program was:" >&5
23804   cat conftest.$ac_ext >&5
23805   # Passes both tests.
23806 ac_preproc_ok=:
23807 break
23808 fi
23809 rm -f conftest.err conftest.$ac_ext
23810
23811 done
23812 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23813 rm -f conftest.err conftest.$ac_ext
23814 if $ac_preproc_ok; then
23815   :
23816 else
23817   { { echo "$as_me:23817: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23818 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23819    { (exit 1); exit 1; }; }
23820 fi
23821
23822 ac_ext=cc
23823 ac_cpp='$CXXCPP $CPPFLAGS'
23824 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23825 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23826 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23827 ac_main_return=return
23828
23829 for ac_header in typeinfo
23830 do
23831 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23832 echo "$as_me:23832: checking for $ac_header" >&5
23833 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23834 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23835   echo $ECHO_N "(cached) $ECHO_C" >&6
23836 else
23837   cat >conftest.$ac_ext <<_ACEOF
23838 #line 23838 "configure"
23839 #include "confdefs.h"
23840 #include <$ac_header>
23841 _ACEOF
23842 if { (eval echo "$as_me:23842: \"$ac_cpp conftest.$ac_ext\"") >&5
23843   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23844   ac_status=$?
23845   egrep -v '^ *\+' conftest.er1 >conftest.err
23846   rm -f conftest.er1
23847   cat conftest.err >&5
23848   echo "$as_me:23848: \$? = $ac_status" >&5
23849   (exit $ac_status); } >/dev/null; then
23850   if test -s conftest.err; then
23851     ac_cpp_err=$ac_cxx_preproc_warn_flag
23852   else
23853     ac_cpp_err=
23854   fi
23855 else
23856   ac_cpp_err=yes
23857 fi
23858 if test -z "$ac_cpp_err"; then
23859   eval "$as_ac_Header=yes"
23860 else
23861   echo "$as_me: failed program was:" >&5
23862   cat conftest.$ac_ext >&5
23863   eval "$as_ac_Header=no"
23864 fi
23865 rm -f conftest.err conftest.$ac_ext
23866 fi
23867 echo "$as_me:23867: result: `eval echo '${'$as_ac_Header'}'`" >&5
23868 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23869 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23870   cat >>confdefs.h <<EOF
23871 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23872 EOF
23873
23874 fi
23875 done
23876
23877 for ac_header in iostream
23878 do
23879 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23880 echo "$as_me:23880: checking for $ac_header" >&5
23881 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23882 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23883   echo $ECHO_N "(cached) $ECHO_C" >&6
23884 else
23885   cat >conftest.$ac_ext <<_ACEOF
23886 #line 23886 "configure"
23887 #include "confdefs.h"
23888 #include <$ac_header>
23889 _ACEOF
23890 if { (eval echo "$as_me:23890: \"$ac_cpp conftest.$ac_ext\"") >&5
23891   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23892   ac_status=$?
23893   egrep -v '^ *\+' conftest.er1 >conftest.err
23894   rm -f conftest.er1
23895   cat conftest.err >&5
23896   echo "$as_me:23896: \$? = $ac_status" >&5
23897   (exit $ac_status); } >/dev/null; then
23898   if test -s conftest.err; then
23899     ac_cpp_err=$ac_cxx_preproc_warn_flag
23900   else
23901     ac_cpp_err=
23902   fi
23903 else
23904   ac_cpp_err=yes
23905 fi
23906 if test -z "$ac_cpp_err"; then
23907   eval "$as_ac_Header=yes"
23908 else
23909   echo "$as_me: failed program was:" >&5
23910   cat conftest.$ac_ext >&5
23911   eval "$as_ac_Header=no"
23912 fi
23913 rm -f conftest.err conftest.$ac_ext
23914 fi
23915 echo "$as_me:23915: result: `eval echo '${'$as_ac_Header'}'`" >&5
23916 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23917 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23918   cat >>confdefs.h <<EOF
23919 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23920 EOF
23921
23922 fi
23923 done
23924
23925 if test x"$ac_cv_header_iostream" = xyes ; then
23926         echo "$as_me:23926: checking if iostream uses std-namespace" >&5
23927 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23928         cat >conftest.$ac_ext <<_ACEOF
23929 #line 23929 "configure"
23930 #include "confdefs.h"
23931
23932 #include <iostream>
23933 using std::endl;
23934 using std::cerr;
23935 int
23936 main (void)
23937 {
23938
23939 cerr << "testing" << endl;
23940
23941   ;
23942   return 0;
23943 }
23944 _ACEOF
23945 rm -f conftest.$ac_objext
23946 if { (eval echo "$as_me:23946: \"$ac_compile\"") >&5
23947   (eval $ac_compile) 2>&5
23948   ac_status=$?
23949   echo "$as_me:23949: \$? = $ac_status" >&5
23950   (exit $ac_status); } &&
23951          { ac_try='test -s conftest.$ac_objext'
23952   { (eval echo "$as_me:23952: \"$ac_try\"") >&5
23953   (eval $ac_try) 2>&5
23954   ac_status=$?
23955   echo "$as_me:23955: \$? = $ac_status" >&5
23956   (exit $ac_status); }; }; then
23957   cf_iostream_namespace=yes
23958 else
23959   echo "$as_me: failed program was:" >&5
23960 cat conftest.$ac_ext >&5
23961 cf_iostream_namespace=no
23962 fi
23963 rm -f conftest.$ac_objext conftest.$ac_ext
23964         echo "$as_me:23964: result: $cf_iostream_namespace" >&5
23965 echo "${ECHO_T}$cf_iostream_namespace" >&6
23966         if test "$cf_iostream_namespace" = yes ; then
23967
23968 cat >>confdefs.h <<\EOF
23969 #define IOSTREAM_NAMESPACE 1
23970 EOF
23971
23972         fi
23973 fi
23974
23975 echo "$as_me:23975: checking if we should include stdbool.h" >&5
23976 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23977
23978 if test "${cf_cv_header_stdbool_h+set}" = set; then
23979   echo $ECHO_N "(cached) $ECHO_C" >&6
23980 else
23981
23982         cat >conftest.$ac_ext <<_ACEOF
23983 #line 23983 "configure"
23984 #include "confdefs.h"
23985
23986 int
23987 main (void)
23988 {
23989 bool foo = false
23990   ;
23991   return 0;
23992 }
23993 _ACEOF
23994 rm -f conftest.$ac_objext
23995 if { (eval echo "$as_me:23995: \"$ac_compile\"") >&5
23996   (eval $ac_compile) 2>&5
23997   ac_status=$?
23998   echo "$as_me:23998: \$? = $ac_status" >&5
23999   (exit $ac_status); } &&
24000          { ac_try='test -s conftest.$ac_objext'
24001   { (eval echo "$as_me:24001: \"$ac_try\"") >&5
24002   (eval $ac_try) 2>&5
24003   ac_status=$?
24004   echo "$as_me:24004: \$? = $ac_status" >&5
24005   (exit $ac_status); }; }; then
24006   cf_cv_header_stdbool_h=0
24007 else
24008   echo "$as_me: failed program was:" >&5
24009 cat conftest.$ac_ext >&5
24010 cat >conftest.$ac_ext <<_ACEOF
24011 #line 24011 "configure"
24012 #include "confdefs.h"
24013
24014 #ifndef __BEOS__
24015 #include <stdbool.h>
24016 #endif
24017
24018 int
24019 main (void)
24020 {
24021 bool foo = false
24022   ;
24023   return 0;
24024 }
24025 _ACEOF
24026 rm -f conftest.$ac_objext
24027 if { (eval echo "$as_me:24027: \"$ac_compile\"") >&5
24028   (eval $ac_compile) 2>&5
24029   ac_status=$?
24030   echo "$as_me:24030: \$? = $ac_status" >&5
24031   (exit $ac_status); } &&
24032          { ac_try='test -s conftest.$ac_objext'
24033   { (eval echo "$as_me:24033: \"$ac_try\"") >&5
24034   (eval $ac_try) 2>&5
24035   ac_status=$?
24036   echo "$as_me:24036: \$? = $ac_status" >&5
24037   (exit $ac_status); }; }; then
24038   cf_cv_header_stdbool_h=1
24039 else
24040   echo "$as_me: failed program was:" >&5
24041 cat conftest.$ac_ext >&5
24042 cf_cv_header_stdbool_h=0
24043 fi
24044 rm -f conftest.$ac_objext conftest.$ac_ext
24045 fi
24046 rm -f conftest.$ac_objext conftest.$ac_ext
24047 fi
24048
24049 if test "$cf_cv_header_stdbool_h" = 1
24050 then    echo "$as_me:24050: result: yes" >&5
24051 echo "${ECHO_T}yes" >&6
24052 else    echo "$as_me:24052: result: no" >&5
24053 echo "${ECHO_T}no" >&6
24054 fi
24055
24056 echo "$as_me:24056: checking for builtin bool type" >&5
24057 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24058
24059 if test "${cf_cv_builtin_bool+set}" = set; then
24060   echo $ECHO_N "(cached) $ECHO_C" >&6
24061 else
24062
24063         cat >conftest.$ac_ext <<_ACEOF
24064 #line 24064 "configure"
24065 #include "confdefs.h"
24066
24067 #include <stdio.h>
24068 #include <sys/types.h>
24069
24070 int
24071 main (void)
24072 {
24073 bool x = false
24074   ;
24075   return 0;
24076 }
24077 _ACEOF
24078 rm -f conftest.$ac_objext
24079 if { (eval echo "$as_me:24079: \"$ac_compile\"") >&5
24080   (eval $ac_compile) 2>&5
24081   ac_status=$?
24082   echo "$as_me:24082: \$? = $ac_status" >&5
24083   (exit $ac_status); } &&
24084          { ac_try='test -s conftest.$ac_objext'
24085   { (eval echo "$as_me:24085: \"$ac_try\"") >&5
24086   (eval $ac_try) 2>&5
24087   ac_status=$?
24088   echo "$as_me:24088: \$? = $ac_status" >&5
24089   (exit $ac_status); }; }; then
24090   cf_cv_builtin_bool=1
24091 else
24092   echo "$as_me: failed program was:" >&5
24093 cat conftest.$ac_ext >&5
24094 cf_cv_builtin_bool=0
24095 fi
24096 rm -f conftest.$ac_objext conftest.$ac_ext
24097
24098 fi
24099
24100 if test "$cf_cv_builtin_bool" = 1
24101 then    echo "$as_me:24101: result: yes" >&5
24102 echo "${ECHO_T}yes" >&6
24103 else    echo "$as_me:24103: result: no" >&5
24104 echo "${ECHO_T}no" >&6
24105 fi
24106
24107 echo "$as_me:24107: checking for size of bool" >&5
24108 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24109 if test "${cf_cv_type_of_bool+set}" = set; then
24110   echo $ECHO_N "(cached) $ECHO_C" >&6
24111 else
24112
24113         rm -f cf_test.out
24114         if test "$cross_compiling" = yes; then
24115   cf_cv_type_of_bool=unknown
24116 else
24117   cat >conftest.$ac_ext <<_ACEOF
24118 #line 24118 "configure"
24119 #include "confdefs.h"
24120
24121 #include <stdlib.h>
24122 #include <stdio.h>
24123
24124 #if defined(__cplusplus)
24125
24126 #ifdef HAVE_GXX_BUILTIN_H
24127 #include <g++/builtin.h>
24128 #elif HAVE_GPP_BUILTIN_H
24129 #include <gpp/builtin.h>
24130 #elif HAVE_BUILTIN_H
24131 #include <builtin.h>
24132 #endif
24133
24134 #else
24135
24136 #if $cf_cv_header_stdbool_h
24137 #include <stdbool.h>
24138 #endif
24139
24140 #endif
24141
24142 int main(void)
24143 {
24144         FILE *fp = fopen("cf_test.out", "w");
24145         if (fp != 0) {
24146                 bool x = true;
24147                 if ((bool)(-x) >= 0)
24148                         fputs("unsigned ", fp);
24149                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24150                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24151                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24152                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24153                 fclose(fp);
24154         }
24155         ${cf_cv_main_return:-return}(0);
24156 }
24157
24158 _ACEOF
24159 rm -f conftest$ac_exeext
24160 if { (eval echo "$as_me:24160: \"$ac_link\"") >&5
24161   (eval $ac_link) 2>&5
24162   ac_status=$?
24163   echo "$as_me:24163: \$? = $ac_status" >&5
24164   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24165   { (eval echo "$as_me:24165: \"$ac_try\"") >&5
24166   (eval $ac_try) 2>&5
24167   ac_status=$?
24168   echo "$as_me:24168: \$? = $ac_status" >&5
24169   (exit $ac_status); }; }; then
24170   cf_cv_type_of_bool=`cat cf_test.out`
24171                  if test -z "$cf_cv_type_of_bool"; then
24172                    cf_cv_type_of_bool=unknown
24173                  fi
24174 else
24175   echo "$as_me: program exited with status $ac_status" >&5
24176 echo "$as_me: failed program was:" >&5
24177 cat conftest.$ac_ext >&5
24178 cf_cv_type_of_bool=unknown
24179 fi
24180 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24181 fi
24182
24183 fi
24184
24185         rm -f cf_test.out
24186 echo "$as_me:24186: result: $cf_cv_type_of_bool" >&5
24187 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24188 if test "$cf_cv_type_of_bool" = unknown ; then
24189         case .$NCURSES_BOOL in
24190         (.auto|.) NCURSES_BOOL=unsigned;;
24191         esac
24192         { echo "$as_me:24192: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24193 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24194         cf_cv_type_of_bool=$NCURSES_BOOL
24195 fi
24196
24197 echo "$as_me:24197: checking for special defines needed for etip.h" >&5
24198 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
24199 cf_save_CXXFLAGS="$CXXFLAGS"
24200 cf_result="none"
24201
24202 # etip.h includes ncurses.h which includes ncurses_dll.h
24203 # But ncurses_dll.h is generated - fix here.
24204 test -d include || mkdir include
24205 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
24206
24207 for cf_math in "" MATH_H
24208 do
24209 for cf_excp in "" MATH_EXCEPTION
24210 do
24211         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
24212         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
24213         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
24214 cat >conftest.$ac_ext <<_ACEOF
24215 #line 24215 "configure"
24216 #include "confdefs.h"
24217
24218 #include <etip.h.in>
24219
24220 int
24221 main (void)
24222 {
24223
24224   ;
24225   return 0;
24226 }
24227 _ACEOF
24228 rm -f conftest.$ac_objext
24229 if { (eval echo "$as_me:24229: \"$ac_compile\"") >&5
24230   (eval $ac_compile) 2>&5
24231   ac_status=$?
24232   echo "$as_me:24232: \$? = $ac_status" >&5
24233   (exit $ac_status); } &&
24234          { ac_try='test -s conftest.$ac_objext'
24235   { (eval echo "$as_me:24235: \"$ac_try\"") >&5
24236   (eval $ac_try) 2>&5
24237   ac_status=$?
24238   echo "$as_me:24238: \$? = $ac_status" >&5
24239   (exit $ac_status); }; }; then
24240
24241         test -n "$cf_math" && cat >>confdefs.h <<EOF
24242 #define ETIP_NEEDS_${cf_math} 1
24243 EOF
24244
24245         test -n "$cf_excp" && cat >>confdefs.h <<EOF
24246 #define ETIP_NEEDS_${cf_excp} 1
24247 EOF
24248
24249         cf_result="$cf_math $cf_excp"
24250         break 2
24251
24252 else
24253   echo "$as_me: failed program was:" >&5
24254 cat conftest.$ac_ext >&5
24255 fi
24256 rm -f conftest.$ac_objext conftest.$ac_ext
24257 done
24258 done
24259 echo "$as_me:24259: result: $cf_result" >&5
24260 echo "${ECHO_T}$cf_result" >&6
24261 CXXFLAGS="$cf_save_CXXFLAGS"
24262
24263 if test -n "$CXX"; then
24264 echo "$as_me:24264: checking if $CXX accepts parameter initialization" >&5
24265 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
24266 if test "${cf_cv_cpp_param_init+set}" = set; then
24267   echo $ECHO_N "(cached) $ECHO_C" >&6
24268 else
24269
24270         ac_ext=cc
24271 ac_cpp='$CXXCPP $CPPFLAGS'
24272 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24273 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24274 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24275 ac_main_return=return
24276
24277         if test "$cross_compiling" = yes; then
24278   cf_cv_cpp_param_init=unknown
24279 else
24280   cat >conftest.$ac_ext <<_ACEOF
24281 #line 24281 "configure"
24282 #include "confdefs.h"
24283
24284 class TEST {
24285 private:
24286         int value;
24287 public:
24288         TEST(int x = 1);
24289         ~TEST();
24290 };
24291
24292 TEST::TEST(int x = 1)   // some compilers do not like second initializer
24293 {
24294         value = x;
24295 }
24296 int main(void) { }
24297
24298 _ACEOF
24299 rm -f conftest$ac_exeext
24300 if { (eval echo "$as_me:24300: \"$ac_link\"") >&5
24301   (eval $ac_link) 2>&5
24302   ac_status=$?
24303   echo "$as_me:24303: \$? = $ac_status" >&5
24304   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24305   { (eval echo "$as_me:24305: \"$ac_try\"") >&5
24306   (eval $ac_try) 2>&5
24307   ac_status=$?
24308   echo "$as_me:24308: \$? = $ac_status" >&5
24309   (exit $ac_status); }; }; then
24310   cf_cv_cpp_param_init=yes
24311 else
24312   echo "$as_me: program exited with status $ac_status" >&5
24313 echo "$as_me: failed program was:" >&5
24314 cat conftest.$ac_ext >&5
24315 cf_cv_cpp_param_init=no
24316 fi
24317 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24318 fi
24319         ac_ext=cc
24320 ac_cpp='$CXXCPP $CPPFLAGS'
24321 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24322 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24323 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24324 ac_main_return=return
24325
24326 fi
24327 echo "$as_me:24327: result: $cf_cv_cpp_param_init" >&5
24328 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
24329 fi
24330 test "$cf_cv_cpp_param_init" = yes &&
24331 cat >>confdefs.h <<\EOF
24332 #define CPP_HAS_PARAM_INIT 1
24333 EOF
24334
24335 if test -n "$CXX"; then
24336
24337 echo "$as_me:24337: checking if $CXX accepts static_cast" >&5
24338 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
24339 if test "${cf_cv_cpp_static_cast+set}" = set; then
24340   echo $ECHO_N "(cached) $ECHO_C" >&6
24341 else
24342
24343         ac_ext=cc
24344 ac_cpp='$CXXCPP $CPPFLAGS'
24345 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24346 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24347 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24348 ac_main_return=return
24349
24350         cat >conftest.$ac_ext <<_ACEOF
24351 #line 24351 "configure"
24352 #include "confdefs.h"
24353
24354 class NCursesPanel
24355 {
24356 public:
24357   NCursesPanel(int nlines,
24358                int ncols,
24359                int begin_y = 0,
24360                int begin_x = 0)
24361   {
24362   }
24363   NCursesPanel();
24364   ~NCursesPanel();
24365 };
24366
24367 template<class T> class NCursesUserPanel : public NCursesPanel
24368 {
24369 public:
24370   NCursesUserPanel (int nlines,
24371                     int ncols,
24372                     int begin_y = 0,
24373                     int begin_x = 0,
24374                     const T* p_UserData = static_cast<T*>(0))
24375     : NCursesPanel (nlines, ncols, begin_y, begin_x)
24376   {
24377   };
24378   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
24379   {
24380   };
24381
24382   virtual ~NCursesUserPanel() {};
24383 };
24384
24385 int
24386 main (void)
24387 {
24388
24389         const char* p_UserData = static_cast<char*>(0)
24390   ;
24391   return 0;
24392 }
24393 _ACEOF
24394 rm -f conftest.$ac_objext
24395 if { (eval echo "$as_me:24395: \"$ac_compile\"") >&5
24396   (eval $ac_compile) 2>&5
24397   ac_status=$?
24398   echo "$as_me:24398: \$? = $ac_status" >&5
24399   (exit $ac_status); } &&
24400          { ac_try='test -s conftest.$ac_objext'
24401   { (eval echo "$as_me:24401: \"$ac_try\"") >&5
24402   (eval $ac_try) 2>&5
24403   ac_status=$?
24404   echo "$as_me:24404: \$? = $ac_status" >&5
24405   (exit $ac_status); }; }; then
24406   cf_cv_cpp_static_cast=yes
24407 else
24408   echo "$as_me: failed program was:" >&5
24409 cat conftest.$ac_ext >&5
24410 cf_cv_cpp_static_cast=no
24411 fi
24412 rm -f conftest.$ac_objext conftest.$ac_ext
24413
24414         ac_ext=cc
24415 ac_cpp='$CXXCPP $CPPFLAGS'
24416 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24417 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24418 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24419 ac_main_return=return
24420
24421 fi
24422 echo "$as_me:24422: result: $cf_cv_cpp_static_cast" >&5
24423 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24424
24425 fi
24426
24427 test "$cf_cv_cpp_static_cast" = yes &&
24428 cat >>confdefs.h <<\EOF
24429 #define CPP_HAS_STATIC_CAST 1
24430 EOF
24431
24432         CXX_AR='$(AR)'
24433         CXX_ARFLAGS='$(ARFLAGS)'
24434         case $cf_cv_system_name in
24435         (irix*)
24436             if test "$GXX" != yes ; then
24437                 CXX_AR='$(CXX)'
24438                 CXX_ARFLAGS='-ar -o'
24439             fi
24440             ;;
24441         (sco3.2v5*)
24442             CXXLDFLAGS="-u main"
24443             ;;
24444         (solaris2*)
24445             if test "$GXX" != yes ; then
24446                 CXX_AR='$(CXX)'
24447                 CXX_ARFLAGS='-xar -o'
24448             fi
24449             ;;
24450         esac
24451
24452 else
24453         cf_cxx_library=no
24454         cf_cv_builtin_bool=1
24455
24456         # Just because we are not configuring against C++ right now does not
24457         # mean that a user will not want to use C++.  Some distributors disable
24458         # the C++ portion of this configuration as a shortcut (or just to avoid
24459         # compiling the demo in the c++ directory).  So we need a reasonable
24460         # default for the 'bool' type.
24461         #
24462         # Caveat: since the storage of the bool type is not standardized, it
24463         # may change.
24464
24465         if test "$NCURSES_BOOL" != auto ; then
24466                 cf_cv_type_of_bool=$NCURSES_BOOL
24467                 cf_cv_header_stdbool_h=0
24468         else
24469                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24470
24471 echo "$as_me:24471: checking for size of bool" >&5
24472 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24473 if test "${cf_cv_type_of_bool+set}" = set; then
24474   echo $ECHO_N "(cached) $ECHO_C" >&6
24475 else
24476
24477         rm -f cf_test.out
24478         if test "$cross_compiling" = yes; then
24479   cf_cv_type_of_bool=unknown
24480 else
24481   cat >conftest.$ac_ext <<_ACEOF
24482 #line 24482 "configure"
24483 #include "confdefs.h"
24484
24485 #include <stdlib.h>
24486 #include <stdio.h>
24487
24488 #if defined(__cplusplus)
24489
24490 #ifdef HAVE_GXX_BUILTIN_H
24491 #include <g++/builtin.h>
24492 #elif HAVE_GPP_BUILTIN_H
24493 #include <gpp/builtin.h>
24494 #elif HAVE_BUILTIN_H
24495 #include <builtin.h>
24496 #endif
24497
24498 #else
24499
24500 #if $cf_cv_header_stdbool_h
24501 #include <stdbool.h>
24502 #endif
24503
24504 #endif
24505
24506 int main(void)
24507 {
24508         FILE *fp = fopen("cf_test.out", "w");
24509         if (fp != 0) {
24510                 bool x = true;
24511                 if ((bool)(-x) >= 0)
24512                         fputs("unsigned ", fp);
24513                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24514                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24515                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24516                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24517                 fclose(fp);
24518         }
24519         ${cf_cv_main_return:-return}(0);
24520 }
24521
24522 _ACEOF
24523 rm -f conftest$ac_exeext
24524 if { (eval echo "$as_me:24524: \"$ac_link\"") >&5
24525   (eval $ac_link) 2>&5
24526   ac_status=$?
24527   echo "$as_me:24527: \$? = $ac_status" >&5
24528   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24529   { (eval echo "$as_me:24529: \"$ac_try\"") >&5
24530   (eval $ac_try) 2>&5
24531   ac_status=$?
24532   echo "$as_me:24532: \$? = $ac_status" >&5
24533   (exit $ac_status); }; }; then
24534   cf_cv_type_of_bool=`cat cf_test.out`
24535                  if test -z "$cf_cv_type_of_bool"; then
24536                    cf_cv_type_of_bool=unknown
24537                  fi
24538 else
24539   echo "$as_me: program exited with status $ac_status" >&5
24540 echo "$as_me: failed program was:" >&5
24541 cat conftest.$ac_ext >&5
24542 cf_cv_type_of_bool=unknown
24543 fi
24544 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24545 fi
24546
24547 fi
24548
24549         rm -f cf_test.out
24550 echo "$as_me:24550: result: $cf_cv_type_of_bool" >&5
24551 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24552 if test "$cf_cv_type_of_bool" = unknown ; then
24553         case .$NCURSES_BOOL in
24554         (.auto|.) NCURSES_BOOL=unsigned;;
24555         esac
24556         { echo "$as_me:24556: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24557 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24558         cf_cv_type_of_bool=$NCURSES_BOOL
24559 fi
24560
24561                 else
24562                         echo "$as_me:24562: checking for fallback type of bool" >&5
24563 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24564                         case "$host_cpu" in
24565                         (i?86)  cf_cv_type_of_bool=char ;;
24566                         (*)     cf_cv_type_of_bool=int  ;;
24567                         esac
24568                         echo "$as_me:24568: result: $cf_cv_type_of_bool" >&5
24569 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24570                 fi
24571         fi
24572 fi
24573
24574 # If the C compiler did not declare bool, and we did not determine that the C++
24575 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24576 # ncurses library use the same type as C++ bool.  Note that this allows one to
24577 # specify the type of bool in a configure-script option and postpone
24578 # integration with the C++ compiler provided that the types are compatible.
24579 USE_CXX_BOOL=1
24580 if test $cf_cv_cc_bool_type = 1
24581 then
24582         # oops: C has a bool.  Unlikely, but C++ could differ.
24583         USE_CXX_BOOL=0
24584 elif test $cf_cv_builtin_bool = 0
24585 then
24586         # C++ has no bool
24587         USE_CXX_BOOL=0
24588 else
24589         # this is the normal case
24590         USE_CXX_BOOL='defined(__cplusplus)'
24591 fi
24592
24593 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24594
24595         if test "$cf_with_ada" != "no" ; then
24596                 if test "$with_libtool" != "no"; then
24597                         { echo "$as_me:24597: WARNING: libtool does not support Ada - disabling feature" >&5
24598 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24599                         cf_with_ada=no
24600                 fi
24601         fi
24602
24603         if test "$cf_with_ada" != "no" ; then
24604
24605 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24606 do
24607
24608 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24609
24610         unset ac_cv_path_cf_TEMP_gnat
24611         unset cf_TEMP_gnat
24612         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24613 set dummy $cf_prog_gnat; ac_word=$2
24614 echo "$as_me:24614: checking for $ac_word" >&5
24615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24616 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24617   echo $ECHO_N "(cached) $ECHO_C" >&6
24618 else
24619   case $cf_TEMP_gnat in
24620   [\\/]* | ?:[\\/]*)
24621   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24622   ;;
24623   *)
24624   ac_save_IFS=$IFS; IFS=$ac_path_separator
24625 ac_dummy="$PATH"
24626 for ac_dir in $ac_dummy; do
24627   IFS=$ac_save_IFS
24628   test -z "$ac_dir" && ac_dir=.
24629   if $as_executable_p "$ac_dir/$ac_word"; then
24630    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24631    echo "$as_me:24631: found $ac_dir/$ac_word" >&5
24632    break
24633 fi
24634 done
24635
24636   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24637   ;;
24638 esac
24639 fi
24640 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24641
24642 if test -n "$cf_TEMP_gnat"; then
24643   echo "$as_me:24643: result: $cf_TEMP_gnat" >&5
24644 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24645 else
24646   echo "$as_me:24646: result: no" >&5
24647 echo "${ECHO_T}no" >&6
24648 fi
24649
24650         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24651
24652         if test "x$cf_TEMP_gnat" != xno; then
24653                 unset cf_cv_gnat_version
24654                 unset cf_TEMP_gnat
24655
24656 echo "$as_me:24656: checking for $cf_prog_gnat version" >&5
24657 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24658 if test "${cf_cv_gnat_version+set}" = set; then
24659   echo $ECHO_N "(cached) $ECHO_C" >&6
24660 else
24661
24662 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24663         grep '[0-9].[0-9][0-9]*' |\
24664         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24665
24666 fi
24667 echo "$as_me:24667: result: $cf_cv_gnat_version" >&5
24668 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24669 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24670 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24671
24672         fi
24673         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24674
24675         unset cf_TEMP_gnat
24676         unset cf_cv_gnat_version
24677         unset ac_cv_path_cf_TEMP_gnat
24678 done
24679
24680 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24681         cf_ada_make=
24682         cf_cv_prog_gnat_correct=no
24683 else
24684         cf_ada_make=gnatmake
24685         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24686                 # gprconfig is newer than gnatmake; we can continue...
24687                 cf_ada_config="##"
24688         else
24689                 rm -rf conftest* *~conftest*
24690                 if mkdir conftest.src
24691                 then
24692                         cf_ada_config=""
24693                         cd conftest.src
24694                         for cf_gprconfig in Ada C
24695                         do
24696                                 echo "$as_me:24696: checking for gprconfig name for $cf_gprconfig" >&5
24697 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24698                                 if test $cf_gprconfig = C
24699                                 then
24700                                         for cf_gprconfig_param in \
24701                                                 $cf_gprconfig,,,,GNATGCC \
24702                                                 $cf_gprconfig,,,,GCC \
24703                                                 $cf_gprconfig
24704                                         do
24705                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24706                                                 test -n "$cf_gprconfig_value" && break
24707                                         done
24708                                 else
24709                                         cf_gprconfig_param=$cf_gprconfig
24710                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24711                                 fi
24712                                 if test -n "$cf_gprconfig_value"
24713                                 then
24714                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24715                                         echo "$as_me:24715: result: $cf_gprconfig_value" >&5
24716 echo "${ECHO_T}$cf_gprconfig_value" >&6
24717                                 else
24718                                         echo "$as_me:24718: result: missing" >&5
24719 echo "${ECHO_T}missing" >&6
24720                                         cf_ada_config="#"
24721                                         break
24722                                 fi
24723                         done
24724                         cd ..
24725                         rm -rf conftest* *~conftest*
24726                 fi
24727         fi
24728         if test "x$cf_ada_config" != "x#"
24729         then
24730
24731 echo "$as_me:24731: checking for gnat version" >&5
24732 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24733 if test "${cf_cv_gnat_version+set}" = set; then
24734   echo $ECHO_N "(cached) $ECHO_C" >&6
24735 else
24736
24737 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24738         grep '[0-9].[0-9][0-9]*' |\
24739         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24740
24741 fi
24742 echo "$as_me:24742: result: $cf_cv_gnat_version" >&5
24743 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24744 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24745
24746 case $cf_cv_gnat_version in
24747 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]|[1-9][0-9].*)
24748         cf_cv_prog_gnat_correct=yes
24749         ;;
24750 (*)
24751         { echo "$as_me:24751: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24752 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24753         cf_cv_prog_gnat_correct=no
24754         ;;
24755 esac
24756
24757                 # Extract the first word of "m4", so it can be a program name with args.
24758 set dummy m4; ac_word=$2
24759 echo "$as_me:24759: checking for $ac_word" >&5
24760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24761 if test "${ac_cv_prog_M4_exists+set}" = set; then
24762   echo $ECHO_N "(cached) $ECHO_C" >&6
24763 else
24764   if test -n "$M4_exists"; then
24765   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24766 else
24767   ac_save_IFS=$IFS; IFS=$ac_path_separator
24768 ac_dummy="$PATH"
24769 for ac_dir in $ac_dummy; do
24770   IFS=$ac_save_IFS
24771   test -z "$ac_dir" && ac_dir=.
24772   $as_executable_p "$ac_dir/$ac_word" || continue
24773 ac_cv_prog_M4_exists="yes"
24774 echo "$as_me:24774: found $ac_dir/$ac_word" >&5
24775 break
24776 done
24777
24778   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24779 fi
24780 fi
24781 M4_exists=$ac_cv_prog_M4_exists
24782 if test -n "$M4_exists"; then
24783   echo "$as_me:24783: result: $M4_exists" >&5
24784 echo "${ECHO_T}$M4_exists" >&6
24785 else
24786   echo "$as_me:24786: result: no" >&5
24787 echo "${ECHO_T}no" >&6
24788 fi
24789
24790                 if test "$ac_cv_prog_M4_exists" = no; then
24791                         cf_cv_prog_gnat_correct=no
24792                         { echo "$as_me:24792: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24793 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24794                 fi
24795                 if test "$cf_cv_prog_gnat_correct" = yes; then
24796                         echo "$as_me:24796: checking if GNAT works" >&5
24797 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24798
24799 rm -rf conftest* *~conftest*
24800 cat >>conftest.ads <<CF_EOF
24801 procedure conftest;
24802 CF_EOF
24803 cat >>conftest.adb <<CF_EOF
24804 with Text_IO;
24805 with GNAT.OS_Lib;
24806 procedure conftest is
24807 begin
24808    Text_IO.Put ("Hello World");
24809    Text_IO.New_Line;
24810    GNAT.OS_Lib.OS_Exit (0);
24811 end conftest;
24812 CF_EOF
24813 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24814    if ( ./conftest 1>&5 2>&1 ) ; then
24815       cf_cv_prog_gnat_correct=yes
24816    else
24817       cf_cv_prog_gnat_correct=no
24818    fi
24819 else
24820    cf_cv_prog_gnat_correct=no
24821 fi
24822 rm -rf conftest* *~conftest*
24823
24824                         echo "$as_me:24824: result: $cf_cv_prog_gnat_correct" >&5
24825 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24826                 fi
24827         else
24828                 cf_cv_prog_gnat_correct=no
24829         fi
24830 fi
24831
24832                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24833
24834         ADAFLAGS="$ADAFLAGS -gnatpn"
24835
24836         echo "$as_me:24836: checking optimization options for ADAFLAGS" >&5
24837 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24838         case "$CFLAGS" in
24839         (*-g*)
24840
24841         ADAFLAGS="$ADAFLAGS -g"
24842
24843                 ;;
24844         esac
24845         case "$CFLAGS" in
24846         (*-O*)
24847                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24848
24849         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24850
24851                 ;;
24852         esac
24853         echo "$as_me:24853: result: $ADAFLAGS" >&5
24854 echo "${ECHO_T}$ADAFLAGS" >&6
24855
24856 echo "$as_me:24856: checking if GNATPREP supports -T option" >&5
24857 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24858 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24859   echo $ECHO_N "(cached) $ECHO_C" >&6
24860 else
24861
24862 cf_cv_gnatprep_opt_t=no
24863 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24864
24865 fi
24866 echo "$as_me:24866: result: $cf_cv_gnatprep_opt_t" >&5
24867 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24868 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24869
24870 echo "$as_me:24870: checking if GNAT supports generics" >&5
24871 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24872 case $cf_cv_gnat_version in
24873 (3.[1-9]*|[4-9].*)
24874         cf_gnat_generics=yes
24875         ;;
24876 (*)
24877         cf_gnat_generics=no
24878         ;;
24879 esac
24880 echo "$as_me:24880: result: $cf_gnat_generics" >&5
24881 echo "${ECHO_T}$cf_gnat_generics" >&6
24882
24883 if test "$cf_gnat_generics" = yes
24884 then
24885         cf_compile_generics=generics
24886         cf_generic_objects="\${GENOBJS}"
24887 else
24888         cf_compile_generics=
24889         cf_generic_objects=
24890 fi
24891
24892 echo "$as_me:24892: checking if GNAT supports SIGINT" >&5
24893 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24894 if test "${cf_cv_gnat_sigint+set}" = set; then
24895   echo $ECHO_N "(cached) $ECHO_C" >&6
24896 else
24897
24898 rm -rf conftest* *~conftest*
24899 cat >>conftest.ads <<CF_EOF
24900 with Ada.Interrupts.Names;
24901
24902 package ConfTest is
24903
24904    pragma Warnings (Off);  --  the next pragma exists since 3.11p
24905    pragma Unreserve_All_Interrupts;
24906    pragma Warnings (On);
24907
24908    protected Process is
24909       procedure Stop;
24910       function Continue return Boolean;
24911       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24912    private
24913       Done : Boolean := False;
24914    end Process;
24915
24916 end ConfTest;
24917 CF_EOF
24918 cat >>conftest.adb <<CF_EOF
24919 package body ConfTest is
24920    protected body Process is
24921       procedure Stop is
24922       begin
24923          Done := True;
24924       end Stop;
24925       function Continue return Boolean is
24926       begin
24927          return not Done;
24928       end Continue;
24929    end Process;
24930 end ConfTest;
24931 CF_EOF
24932 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24933       cf_cv_gnat_sigint=yes
24934 else
24935    cf_cv_gnat_sigint=no
24936 fi
24937 rm -rf conftest* *~conftest*
24938
24939 fi
24940 echo "$as_me:24940: result: $cf_cv_gnat_sigint" >&5
24941 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24942
24943 if test $cf_cv_gnat_sigint = yes ; then
24944         USE_GNAT_SIGINT=""
24945 else
24946         USE_GNAT_SIGINT="#"
24947 fi
24948
24949 cf_gnat_libraries=no
24950 cf_gnat_projects=no
24951
24952 if test "$enable_gnat_projects" != no ; then
24953 echo "$as_me:24953: checking if GNAT supports project files" >&5
24954 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24955 case $cf_cv_gnat_version in
24956 (3.[0-9]*)
24957         ;;
24958 (*)
24959         case $cf_cv_system_name in
24960         (cygwin*|msys*)
24961                 ;;
24962         (*)
24963                 rm -rf conftest* *~conftest*
24964                 if mkdir conftest.src conftest.bin conftest.lib
24965                 then
24966                         cd conftest.src
24967                         rm -rf conftest* *~conftest*
24968                         cat >>library.gpr <<CF_EOF
24969 project Library is
24970   Kind := External ("LIB_KIND");
24971   for Library_Name use "ConfTest";
24972   for Object_Dir use ".";
24973   for Library_ALI_Dir use External("LIBRARY_DIR");
24974   for Library_Version use External ("SONAME");
24975   for Library_Kind use Kind;
24976   for Library_Dir use External("BUILD_DIR");
24977   Source_Dir := External ("SOURCE_DIR");
24978   for Source_Dirs use (Source_Dir);
24979 end Library;
24980 CF_EOF
24981                         cat >>confpackage.ads <<CF_EOF
24982 package ConfPackage is
24983    procedure conftest;
24984 end ConfPackage;
24985 CF_EOF
24986                         cat >>confpackage.adb <<CF_EOF
24987 with Text_IO;
24988 package body ConfPackage is
24989    procedure conftest is
24990    begin
24991       Text_IO.Put ("Hello World");
24992       Text_IO.New_Line;
24993    end conftest;
24994 end ConfPackage;
24995 CF_EOF
24996                         if ( $cf_ada_make $ADAFLAGS \
24997                                         -Plibrary.gpr \
24998                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
24999                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
25000                                         -XSOURCE_DIR=`pwd` \
25001                                         -XSONAME=libConfTest.so.1 \
25002                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
25003                                 cf_gnat_projects=yes
25004                         fi
25005                         cd ..
25006                 fi
25007                 if test -f conftest.lib/confpackage.ali
25008                 then
25009                         cf_gnat_libraries=yes
25010                 fi
25011                 rm -rf conftest* *~conftest*
25012                 ;;
25013         esac
25014         ;;
25015 esac
25016 echo "$as_me:25016: result: $cf_gnat_projects" >&5
25017 echo "${ECHO_T}$cf_gnat_projects" >&6
25018 fi # enable_gnat_projects
25019
25020 if test $cf_gnat_projects = yes
25021 then
25022         echo "$as_me:25022: checking if GNAT supports libraries" >&5
25023 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
25024         echo "$as_me:25024: result: $cf_gnat_libraries" >&5
25025 echo "${ECHO_T}$cf_gnat_libraries" >&6
25026 fi
25027
25028 if test "$cf_gnat_projects" = yes
25029 then
25030         USE_OLD_MAKERULES="#"
25031         USE_GNAT_PROJECTS=""
25032 else
25033         USE_OLD_MAKERULES=""
25034         USE_GNAT_PROJECTS="#"
25035 fi
25036
25037 if test "$cf_gnat_libraries" = yes
25038 then
25039         USE_GNAT_LIBRARIES=""
25040 else
25041         USE_GNAT_LIBRARIES="#"
25042 fi
25043
25044 echo "$as_me:25044: checking for ada-compiler" >&5
25045 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
25046
25047 # Check whether --with-ada-compiler or --without-ada-compiler was given.
25048 if test "${with_ada_compiler+set}" = set; then
25049   withval="$with_ada_compiler"
25050   cf_ada_compiler=$withval
25051 else
25052   cf_ada_compiler=gnatmake
25053 fi;
25054
25055 echo "$as_me:25055: result: $cf_ada_compiler" >&5
25056 echo "${ECHO_T}$cf_ada_compiler" >&6
25057
25058                         cf_ada_package=terminal_interface
25059
25060 echo "$as_me:25060: checking for ada-include" >&5
25061 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
25062
25063 # Check whether --with-ada-include or --without-ada-include was given.
25064 if test "${with_ada_include+set}" = set; then
25065   withval="$with_ada_include"
25066
25067 else
25068   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
25069 fi; if test -n "$prefix/share/ada/adainclude" ; then
25070
25071 if test "x$prefix" != xNONE; then
25072         cf_path_syntax="$prefix"
25073 else
25074         cf_path_syntax="$ac_default_prefix"
25075 fi
25076
25077 case ".$withval" in
25078 (.\$\(*\)*|.\'*\'*)
25079         ;;
25080 (..|./*|.\\*)
25081         ;;
25082 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25083         ;;
25084 (.\${*prefix}*|.\${*dir}*)
25085         eval withval="$withval"
25086         case ".$withval" in
25087         (.NONE/*)
25088                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25089                 ;;
25090         esac
25091         ;;
25092 (.no|.NONE/*)
25093         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25094         ;;
25095 (*)
25096         { { echo "$as_me:25096: error: expected a pathname, not \"$withval\"" >&5
25097 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25098    { (exit 1); exit 1; }; }
25099         ;;
25100 esac
25101
25102 fi
25103 eval ADA_INCLUDE="$withval"
25104
25105 echo "$as_me:25105: result: $ADA_INCLUDE" >&5
25106 echo "${ECHO_T}$ADA_INCLUDE" >&6
25107
25108 echo "$as_me:25108: checking for ada-objects" >&5
25109 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
25110
25111 # Check whether --with-ada-objects or --without-ada-objects was given.
25112 if test "${with_ada_objects+set}" = set; then
25113   withval="$with_ada_objects"
25114
25115 else
25116   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
25117 fi; if test -n "$prefix/lib/ada/adalib" ; then
25118
25119 if test "x$prefix" != xNONE; then
25120         cf_path_syntax="$prefix"
25121 else
25122         cf_path_syntax="$ac_default_prefix"
25123 fi
25124
25125 case ".$withval" in
25126 (.\$\(*\)*|.\'*\'*)
25127         ;;
25128 (..|./*|.\\*)
25129         ;;
25130 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25131         ;;
25132 (.\${*prefix}*|.\${*dir}*)
25133         eval withval="$withval"
25134         case ".$withval" in
25135         (.NONE/*)
25136                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25137                 ;;
25138         esac
25139         ;;
25140 (.no|.NONE/*)
25141         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25142         ;;
25143 (*)
25144         { { echo "$as_me:25144: error: expected a pathname, not \"$withval\"" >&5
25145 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25146    { (exit 1); exit 1; }; }
25147         ;;
25148 esac
25149
25150 fi
25151 eval ADA_OBJECTS="$withval"
25152
25153 echo "$as_me:25153: result: $ADA_OBJECTS" >&5
25154 echo "${ECHO_T}$ADA_OBJECTS" >&6
25155
25156 echo "$as_me:25156: checking if an Ada95 shared-library should be built" >&5
25157 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
25158
25159 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
25160 if test "${with_ada_sharedlib+set}" = set; then
25161   withval="$with_ada_sharedlib"
25162   with_ada_sharedlib=$withval
25163 else
25164   with_ada_sharedlib=no
25165 fi;
25166 echo "$as_me:25166: result: $with_ada_sharedlib" >&5
25167 echo "${ECHO_T}$with_ada_sharedlib" >&6
25168
25169 if test "x$with_ada_sharedlib" != xno
25170 then
25171         if test "x$cf_gnat_projects" != xyes
25172         then
25173                 { echo "$as_me:25173: WARNING: disabling shared-library since GNAT projects are not supported" >&5
25174 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
25175                 with_ada_sharedlib=no
25176         fi
25177 fi
25178
25179 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
25180 MAKE_ADA_SHAREDLIB="#"
25181
25182 if test "x$with_ada_sharedlib" != xno
25183 then
25184         MAKE_ADA_SHAREDLIB=
25185         if test "x$with_ada_sharedlib" != xyes
25186         then
25187                 ADA_SHAREDLIB="$with_ada_sharedlib"
25188         fi
25189 fi
25190
25191                         # allow the Ada binding to be renamed
25192
25193 echo "$as_me:25193: checking for ada-libname" >&5
25194 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
25195
25196 # Check whether --with-ada-libname or --without-ada-libname was given.
25197 if test "${with_ada_libname+set}" = set; then
25198   withval="$with_ada_libname"
25199   ADA_LIBNAME=$withval
25200 else
25201   ADA_LIBNAME=AdaCurses
25202 fi;
25203 case "x$ADA_LIBNAME" in
25204 (x|xyes|xno)
25205         ADA_LIBNAME=AdaCurses
25206         ;;
25207 esac
25208
25209 echo "$as_me:25209: result: $ADA_LIBNAME" >&5
25210 echo "${ECHO_T}$ADA_LIBNAME" >&6
25211
25212                 fi
25213         fi
25214 else
25215         cf_with_ada=no
25216 fi
25217
25218 # do this "late" to avoid conflict with header-checks
25219 if test "x$with_widec" = xyes ; then
25220         echo "$as_me:25220: checking for wchar_t" >&5
25221 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
25222 if test "${ac_cv_type_wchar_t+set}" = set; then
25223   echo $ECHO_N "(cached) $ECHO_C" >&6
25224 else
25225   cat >conftest.$ac_ext <<_ACEOF
25226 #line 25226 "configure"
25227 #include "confdefs.h"
25228 $ac_includes_default
25229 int
25230 main (void)
25231 {
25232 if ((wchar_t *) 0)
25233   return 0;
25234 if (sizeof (wchar_t))
25235   return 0;
25236   ;
25237   return 0;
25238 }
25239 _ACEOF
25240 rm -f conftest.$ac_objext
25241 if { (eval echo "$as_me:25241: \"$ac_compile\"") >&5
25242   (eval $ac_compile) 2>&5
25243   ac_status=$?
25244   echo "$as_me:25244: \$? = $ac_status" >&5
25245   (exit $ac_status); } &&
25246          { ac_try='test -s conftest.$ac_objext'
25247   { (eval echo "$as_me:25247: \"$ac_try\"") >&5
25248   (eval $ac_try) 2>&5
25249   ac_status=$?
25250   echo "$as_me:25250: \$? = $ac_status" >&5
25251   (exit $ac_status); }; }; then
25252   ac_cv_type_wchar_t=yes
25253 else
25254   echo "$as_me: failed program was:" >&5
25255 cat conftest.$ac_ext >&5
25256 ac_cv_type_wchar_t=no
25257 fi
25258 rm -f conftest.$ac_objext conftest.$ac_ext
25259 fi
25260 echo "$as_me:25260: result: $ac_cv_type_wchar_t" >&5
25261 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
25262
25263 echo "$as_me:25263: checking size of wchar_t" >&5
25264 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
25265 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
25266   echo $ECHO_N "(cached) $ECHO_C" >&6
25267 else
25268   if test "$ac_cv_type_wchar_t" = yes; then
25269   if test "$cross_compiling" = yes; then
25270   # Depending upon the size, compute the lo and hi bounds.
25271 cat >conftest.$ac_ext <<_ACEOF
25272 #line 25272 "configure"
25273 #include "confdefs.h"
25274 $ac_includes_default
25275 int
25276 main (void)
25277 {
25278 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
25279   ;
25280   return 0;
25281 }
25282 _ACEOF
25283 rm -f conftest.$ac_objext
25284 if { (eval echo "$as_me:25284: \"$ac_compile\"") >&5
25285   (eval $ac_compile) 2>&5
25286   ac_status=$?
25287   echo "$as_me:25287: \$? = $ac_status" >&5
25288   (exit $ac_status); } &&
25289          { ac_try='test -s conftest.$ac_objext'
25290   { (eval echo "$as_me:25290: \"$ac_try\"") >&5
25291   (eval $ac_try) 2>&5
25292   ac_status=$?
25293   echo "$as_me:25293: \$? = $ac_status" >&5
25294   (exit $ac_status); }; }; then
25295   ac_lo=0 ac_mid=0
25296   while :; do
25297     cat >conftest.$ac_ext <<_ACEOF
25298 #line 25298 "configure"
25299 #include "confdefs.h"
25300 $ac_includes_default
25301 int
25302 main (void)
25303 {
25304 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25305   ;
25306   return 0;
25307 }
25308 _ACEOF
25309 rm -f conftest.$ac_objext
25310 if { (eval echo "$as_me:25310: \"$ac_compile\"") >&5
25311   (eval $ac_compile) 2>&5
25312   ac_status=$?
25313   echo "$as_me:25313: \$? = $ac_status" >&5
25314   (exit $ac_status); } &&
25315          { ac_try='test -s conftest.$ac_objext'
25316   { (eval echo "$as_me:25316: \"$ac_try\"") >&5
25317   (eval $ac_try) 2>&5
25318   ac_status=$?
25319   echo "$as_me:25319: \$? = $ac_status" >&5
25320   (exit $ac_status); }; }; then
25321   ac_hi=$ac_mid; break
25322 else
25323   echo "$as_me: failed program was:" >&5
25324 cat conftest.$ac_ext >&5
25325 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25326 fi
25327 rm -f conftest.$ac_objext conftest.$ac_ext
25328   done
25329 else
25330   echo "$as_me: failed program was:" >&5
25331 cat conftest.$ac_ext >&5
25332 ac_hi=-1 ac_mid=-1
25333   while :; do
25334     cat >conftest.$ac_ext <<_ACEOF
25335 #line 25335 "configure"
25336 #include "confdefs.h"
25337 $ac_includes_default
25338 int
25339 main (void)
25340 {
25341 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
25342   ;
25343   return 0;
25344 }
25345 _ACEOF
25346 rm -f conftest.$ac_objext
25347 if { (eval echo "$as_me:25347: \"$ac_compile\"") >&5
25348   (eval $ac_compile) 2>&5
25349   ac_status=$?
25350   echo "$as_me:25350: \$? = $ac_status" >&5
25351   (exit $ac_status); } &&
25352          { ac_try='test -s conftest.$ac_objext'
25353   { (eval echo "$as_me:25353: \"$ac_try\"") >&5
25354   (eval $ac_try) 2>&5
25355   ac_status=$?
25356   echo "$as_me:25356: \$? = $ac_status" >&5
25357   (exit $ac_status); }; }; then
25358   ac_lo=$ac_mid; break
25359 else
25360   echo "$as_me: failed program was:" >&5
25361 cat conftest.$ac_ext >&5
25362 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25363 fi
25364 rm -f conftest.$ac_objext conftest.$ac_ext
25365   done
25366 fi
25367 rm -f conftest.$ac_objext conftest.$ac_ext
25368 # Binary search between lo and hi bounds.
25369 while test "x$ac_lo" != "x$ac_hi"; do
25370   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25371   cat >conftest.$ac_ext <<_ACEOF
25372 #line 25372 "configure"
25373 #include "confdefs.h"
25374 $ac_includes_default
25375 int
25376 main (void)
25377 {
25378 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25379   ;
25380   return 0;
25381 }
25382 _ACEOF
25383 rm -f conftest.$ac_objext
25384 if { (eval echo "$as_me:25384: \"$ac_compile\"") >&5
25385   (eval $ac_compile) 2>&5
25386   ac_status=$?
25387   echo "$as_me:25387: \$? = $ac_status" >&5
25388   (exit $ac_status); } &&
25389          { ac_try='test -s conftest.$ac_objext'
25390   { (eval echo "$as_me:25390: \"$ac_try\"") >&5
25391   (eval $ac_try) 2>&5
25392   ac_status=$?
25393   echo "$as_me:25393: \$? = $ac_status" >&5
25394   (exit $ac_status); }; }; then
25395   ac_hi=$ac_mid
25396 else
25397   echo "$as_me: failed program was:" >&5
25398 cat conftest.$ac_ext >&5
25399 ac_lo=`expr $ac_mid + 1`
25400 fi
25401 rm -f conftest.$ac_objext conftest.$ac_ext
25402 done
25403 ac_cv_sizeof_wchar_t=$ac_lo
25404 else
25405   if test "$cross_compiling" = yes; then
25406   { { echo "$as_me:25406: error: cannot run test program while cross compiling" >&5
25407 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25408    { (exit 1); exit 1; }; }
25409 else
25410   cat >conftest.$ac_ext <<_ACEOF
25411 #line 25411 "configure"
25412 #include "confdefs.h"
25413 $ac_includes_default
25414 int
25415 main (void)
25416 {
25417 FILE *f = fopen ("conftest.val", "w");
25418 if (!f)
25419   $ac_main_return (1);
25420 fprintf (f, "%d", (sizeof (wchar_t)));
25421 fclose (f);
25422   ;
25423   return 0;
25424 }
25425 _ACEOF
25426 rm -f conftest$ac_exeext
25427 if { (eval echo "$as_me:25427: \"$ac_link\"") >&5
25428   (eval $ac_link) 2>&5
25429   ac_status=$?
25430   echo "$as_me:25430: \$? = $ac_status" >&5
25431   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25432   { (eval echo "$as_me:25432: \"$ac_try\"") >&5
25433   (eval $ac_try) 2>&5
25434   ac_status=$?
25435   echo "$as_me:25435: \$? = $ac_status" >&5
25436   (exit $ac_status); }; }; then
25437   ac_cv_sizeof_wchar_t=`cat conftest.val`
25438 else
25439   echo "$as_me: program exited with status $ac_status" >&5
25440 echo "$as_me: failed program was:" >&5
25441 cat conftest.$ac_ext >&5
25442 fi
25443 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25444 fi
25445 fi
25446 rm -f conftest.val
25447 else
25448   ac_cv_sizeof_wchar_t=0
25449 fi
25450 fi
25451 echo "$as_me:25451: result: $ac_cv_sizeof_wchar_t" >&5
25452 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25453 cat >>confdefs.h <<EOF
25454 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25455 EOF
25456
25457         # cross-compiling to mingw can run into the problem that attempting to
25458         # link with the regex library fails, causing the test to not set this to
25459         # a number.  "recent" autoconf does not address this problem either -TD
25460         if test -z "$ac_cv_sizeof_wchar_t"
25461         then
25462                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25463
25464 echo "${as_me:-configure}:25464: testing test failed (assume 2) ..." 1>&5
25465
25466                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25467                 mv confdefs.tmp confdefs.h
25468                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25469         fi
25470 fi
25471
25472 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25473 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25474 ###
25475 ### ticlib modules may be a separate library, otherwise contained in termlib.
25476 ### termlib modules may be a separate library, otherwise contained in ncurses.
25477 ###
25478 ### The of "+" or " " between the tokens controls the way the script
25479 ### chooses to split module lists into libraries.
25480 ###
25481 ### (see CF_LIB_RULES).
25482 echo "$as_me:25482: checking for library subsets" >&5
25483 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25484 LIB_SUBSETS=
25485
25486 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25487         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25488         if test "$with_ticlib" != no ; then
25489                 LIB_SUBSETS="${LIB_SUBSETS} "
25490         else
25491                 LIB_SUBSETS="${LIB_SUBSETS}+"
25492         fi
25493 fi
25494
25495 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25496 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25497
25498 if test "$with_termlib" != no ; then
25499         LIB_SUBSETS="${LIB_SUBSETS} "
25500 else
25501         LIB_SUBSETS="${LIB_SUBSETS}+"
25502 fi
25503
25504 LIB_SUBSETS="${LIB_SUBSETS}base"
25505
25506 # Most term-driver calls are to tinfo, but some like init_pair are to the
25507 # base library (so it resides in base).
25508 if test "$with_term_driver" != no ; then
25509         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25510         case $cf_cv_system_name in
25511         (*mingw32*|*mingw64*)
25512                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25513                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25514                 ;;
25515         (*)
25516                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25517                 ;;
25518         esac
25519 fi
25520
25521 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25522 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25523
25524 echo "$as_me:25524: result: $LIB_SUBSETS" >&5
25525 echo "${ECHO_T}$LIB_SUBSETS" >&6
25526
25527 ### Construct the list of include-directories to be generated
25528
25529 if test "$srcdir" != "."; then
25530         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25531 fi
25532 CPPFLAGS="-I../include $CPPFLAGS"
25533 if test "$srcdir" != "."; then
25534         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25535 fi
25536 CPPFLAGS="-I. $CPPFLAGS"
25537
25538 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25539 if test "$srcdir" != "."; then
25540         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25541 fi
25542 if test "$GCC" != yes; then
25543         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25544 elif test "$includedir" != "/usr/include"; then
25545         if test "$includedir" = '${prefix}/include' ; then
25546                 if test x$prefix != x/usr ; then
25547                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25548                 fi
25549         else
25550                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25551         fi
25552 fi
25553
25554 ### Build up pieces for makefile rules
25555 echo "$as_me:25555: checking default library suffix" >&5
25556 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25557
25558         case $DFT_LWR_MODEL in
25559         (libtool) DFT_ARG_SUFFIX=''   ;;
25560         (normal)  DFT_ARG_SUFFIX=''   ;;
25561         (debug)   DFT_ARG_SUFFIX='_g' ;;
25562         (profile) DFT_ARG_SUFFIX='_p' ;;
25563         (shared)  DFT_ARG_SUFFIX=''   ;;
25564         esac
25565         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25566 echo "$as_me:25566: result: $DFT_ARG_SUFFIX" >&5
25567 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25568
25569 echo "$as_me:25569: checking default library-dependency suffix" >&5
25570 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25571
25572         case X$DFT_LWR_MODEL in
25573         (Xlibtool)
25574                 DFT_LIB_SUFFIX='.la'
25575                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25576                 ;;
25577         (Xdebug)
25578                 case $cf_cv_system_name in
25579                 (*-msvc*)
25580                         DFT_LIB_SUFFIX='_g.lib'
25581                         ;;
25582                 (*)
25583                         DFT_LIB_SUFFIX='_g.a'
25584                         ;;
25585                 esac
25586                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25587                 ;;
25588         (Xprofile)
25589                 case $cf_cv_system_name in
25590                 (*-msvc*)
25591                         DFT_LIB_SUFFIX='_p.lib'
25592                         ;;
25593                 (*)
25594                         DFT_LIB_SUFFIX='_p.a'
25595                         ;;
25596                 esac
25597                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25598                 ;;
25599         (Xshared)
25600                 case $cf_cv_system_name in
25601                 (aix[5-7]*)
25602                         DFT_LIB_SUFFIX='.so'
25603                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25604                         ;;
25605                 (*-msvc*)
25606                         DFT_LIB_SUFFIX='.dll'
25607                         DFT_DEP_SUFFIX='.dll.lib'
25608                         ;;
25609                 (cygwin*|msys*|mingw*)
25610                         DFT_LIB_SUFFIX='.dll'
25611                         DFT_DEP_SUFFIX='.dll.a'
25612                         ;;
25613                 (darwin*)
25614                         DFT_LIB_SUFFIX='.dylib'
25615                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25616                         ;;
25617                 (hpux*)
25618                         case $target in
25619                         (ia64*)
25620                                 DFT_LIB_SUFFIX='.so'
25621                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25622                                 ;;
25623                         (*)
25624                                 DFT_LIB_SUFFIX='.sl'
25625                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25626                                 ;;
25627                         esac
25628                         ;;
25629                 (*)
25630                         DFT_LIB_SUFFIX='.so'
25631                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25632                         ;;
25633                 esac
25634                 ;;
25635         (*)
25636                 case $target in
25637                 (*-msvc*)
25638                         DFT_LIB_SUFFIX='.lib'
25639                         ;;
25640                 (*)
25641                         DFT_LIB_SUFFIX='.a'
25642                         ;;
25643                 esac
25644                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25645                 ;;
25646         esac
25647         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25648         then
25649                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25650                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25651         fi
25652 echo "$as_me:25652: result: $DFT_DEP_SUFFIX" >&5
25653 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25654
25655 echo "$as_me:25655: checking default object directory" >&5
25656 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25657
25658         case $DFT_LWR_MODEL in
25659         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25660         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25661         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25662         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25663         (shared)
25664                 case $cf_cv_system_name in
25665                 (cygwin|msys)
25666                         DFT_OBJ_SUBDIR='objects' ;;
25667                 (*)
25668                         DFT_OBJ_SUBDIR='obj_s' ;;
25669                 esac
25670         esac
25671 echo "$as_me:25671: result: $DFT_OBJ_SUBDIR" >&5
25672 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25673
25674 if test "x$cf_with_cxx" = xyes ; then
25675 echo "$as_me:25675: checking c++ library-dependency suffix" >&5
25676 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25677 if test "$with_libtool" != "no"; then
25678         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25679         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25680 elif test "$with_shared_cxx" != "no"; then
25681         # also for g++ users...
25682         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25683 else
25684         # we normally make a static library because C/C++ library rules differ
25685
25686         case Xnormal in
25687         (Xlibtool)
25688                 CXX_LIB_SUFFIX='.la'
25689                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25690                 ;;
25691         (Xdebug)
25692                 case $cf_cv_system_name in
25693                 (*-msvc*)
25694                         CXX_LIB_SUFFIX='_g.lib'
25695                         ;;
25696                 (*)
25697                         CXX_LIB_SUFFIX='_g.a'
25698                         ;;
25699                 esac
25700                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25701                 ;;
25702         (Xprofile)
25703                 case $cf_cv_system_name in
25704                 (*-msvc*)
25705                         CXX_LIB_SUFFIX='_p.lib'
25706                         ;;
25707                 (*)
25708                         CXX_LIB_SUFFIX='_p.a'
25709                         ;;
25710                 esac
25711                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25712                 ;;
25713         (Xshared)
25714                 case $cf_cv_system_name in
25715                 (aix[5-7]*)
25716                         CXX_LIB_SUFFIX='.so'
25717                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25718                         ;;
25719                 (*-msvc*)
25720                         CXX_LIB_SUFFIX='.dll'
25721                         CXX_DEP_SUFFIX='.dll.lib'
25722                         ;;
25723                 (cygwin*|msys*|mingw*)
25724                         CXX_LIB_SUFFIX='.dll'
25725                         CXX_DEP_SUFFIX='.dll.a'
25726                         ;;
25727                 (darwin*)
25728                         CXX_LIB_SUFFIX='.dylib'
25729                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25730                         ;;
25731                 (hpux*)
25732                         case $target in
25733                         (ia64*)
25734                                 CXX_LIB_SUFFIX='.so'
25735                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25736                                 ;;
25737                         (*)
25738                                 CXX_LIB_SUFFIX='.sl'
25739                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25740                                 ;;
25741                         esac
25742                         ;;
25743                 (*)
25744                         CXX_LIB_SUFFIX='.so'
25745                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25746                         ;;
25747                 esac
25748                 ;;
25749         (*)
25750                 case $target in
25751                 (*-msvc*)
25752                         CXX_LIB_SUFFIX='.lib'
25753                         ;;
25754                 (*)
25755                         CXX_LIB_SUFFIX='.a'
25756                         ;;
25757                 esac
25758                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25759                 ;;
25760         esac
25761         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25762         then
25763                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25764                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25765         fi
25766
25767 fi
25768 echo "$as_me:25768: result: $CXX_LIB_SUFFIX" >&5
25769 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25770
25771 fi
25772
25773 # do not want -ldl in build except as needed for -lncurses dependency
25774 if test "x$with_dlsym" = xyes ; then
25775 if test $DFT_LWR_MODEL = shared || \
25776    test $DFT_LWR_MODEL = libtool ; then
25777
25778 # remove dl library from $LIBS
25779 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25780
25781 fi
25782 fi
25783 ### Set up low-level terminfo dependencies for makefiles.
25784
25785 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25786 # do not need libdl
25787 TICS_LIST=
25788 if test "x$with_dlsym" = xyes ; then
25789
25790 # remove dl library from $SHLIB_LIST
25791 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25792
25793 fi
25794
25795 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25796 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25797 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25798 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25799 then
25800         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25801 fi
25802
25803 if test "$with_ticlib" != no ; then
25804
25805         if test "x$with_ticlib" != xyes ; then
25806                 TICS_NAME=$with_ticlib
25807                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25808                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25809                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25810                 TICS_LIB_SUFFIX="${with_ticlib}"
25811         else
25812                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25813                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25814                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25815                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25816         fi
25817         TICS_LDFLAGS="-L${LIB_DIR}"
25818         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25819 else
25820         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25821         TICS_LDFLAGS="-L${LIB_DIR}"
25822         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25823 fi
25824
25825 if test "$with_termlib" != no ; then
25826
25827         if test "x$with_termlib" != xyes ; then
25828                 TINFO_NAME=$with_termlib
25829                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25830                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25831                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25832                 TINFO_LIB_SUFFIX="${with_termlib}"
25833         else
25834                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25835                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25836                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25837                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25838         fi
25839
25840         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25841         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25842         if test "$DFT_LWR_MODEL" = "libtool"; then
25843                 TEST_ARGS="${TEST_DEPS}"
25844                 TEST_ARG2="${TEST_DEP2}"
25845                 TINFO_LDFLAGS="-L${LIB_DIR}"
25846                 TINFO_LIBS="$TEST_ARGS"
25847                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25848                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25849         else
25850                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25851                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25852                 if test "x$with_term_driver" != xno ; then
25853                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25854                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25855                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25856                 else
25857                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25858                         TINFO_LIBS="$TEST_ARGS"
25859                 fi
25860                 TINFO_LDFLAGS="-L${LIB_DIR}"
25861                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25862         fi
25863 else
25864         # the next lines are needed for linking libtic over libncurses
25865         TINFO_NAME=${LIB_NAME}
25866         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25867         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25868         if test "x$with_tic_depends" = xyes ; then
25869                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25870         else
25871                 TICS_LIST="$SHLIB_LIST"
25872         fi
25873
25874         TINFO_LDFLAGS="-L${LIB_DIR}"
25875         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25876 fi
25877
25878 if test "$DFT_LWR_MODEL" = shared ; then
25879         case $cf_cv_system_name in
25880         (cygwin*|msys*)
25881                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25882                 TINFO_SUFFIX=.dll
25883                 ;;
25884         esac
25885 fi
25886
25887 if test "x$with_dlsym" = xyes ; then
25888
25889 # remove dl library from $TICS_LIST
25890 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25891
25892 fi
25893
25894 if test "$DFT_LWR_MODEL" = "libtool"; then
25895         OBJEXT=lo
25896 fi
25897
25898 # needed for Ada95
25899 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25900
25901 case $DFT_LWR_MODEL in
25902 (normal|debug|profile)
25903
25904 if test "$GCC" = yes ; then
25905         case $cf_cv_system_name in
25906         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25907                 LDFLAGS_STATIC=
25908                 LDFLAGS_SHARED=
25909                 ;;
25910         (*)     # normally, except when broken
25911                 LDFLAGS_STATIC=-static
25912                 LDFLAGS_SHARED=-dynamic
25913                 ;;
25914         esac
25915 else
25916         case $cf_cv_system_name in
25917         (aix[4-7]*)     # from ld manpage
25918                 LDFLAGS_STATIC=-bstatic
25919                 LDFLAGS_SHARED=-bdynamic
25920                 ;;
25921         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
25922                 # We could also use just "archive" and "shared".
25923                 LDFLAGS_STATIC=-Wl,-a,archive_shared
25924                 LDFLAGS_SHARED=-Wl,-a,shared_archive
25925                 ;;
25926         (irix*)         # from ld manpage IRIX64
25927                 LDFLAGS_STATIC=-Bstatic
25928                 LDFLAGS_SHARED=-Bdynamic
25929                 ;;
25930         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
25931                 # alternative "-oldstyle_liblookup" (not in cc manpage)
25932                 LDFLAGS_STATIC=-noso
25933                 LDFLAGS_SHARED=-so_archive
25934                 ;;
25935         (solaris2*)
25936                 LDFLAGS_STATIC=-Bstatic
25937                 LDFLAGS_SHARED=-Bdynamic
25938                 ;;
25939         esac
25940 fi
25941
25942 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25943 then
25944         echo "$as_me:25944: checking if linker supports switching between static/dynamic" >&5
25945 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25946
25947         rm -f libconftest.a
25948         cat >conftest.$ac_ext <<EOF
25949 #line 25949 "configure"
25950 #include <stdio.h>
25951 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25952 EOF
25953         if { (eval echo "$as_me:25953: \"$ac_compile\"") >&5
25954   (eval $ac_compile) 2>&5
25955   ac_status=$?
25956   echo "$as_me:25956: \$? = $ac_status" >&5
25957   (exit $ac_status); } ; then
25958                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25959                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25960         fi
25961         rm -f conftest.*
25962
25963         cf_save_LIBS="$LIBS"
25964
25965         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25966         cat >conftest.$ac_ext <<_ACEOF
25967 #line 25967 "configure"
25968 #include "confdefs.h"
25969
25970 #line 25970 "configure"
25971 #include <stdio.h>
25972 int cf_ldflags_static(FILE *fp);
25973
25974 int
25975 main (void)
25976 {
25977
25978         return cf_ldflags_static(stdin);
25979
25980   ;
25981   return 0;
25982 }
25983 _ACEOF
25984 rm -f conftest.$ac_objext conftest$ac_exeext
25985 if { (eval echo "$as_me:25985: \"$ac_link\"") >&5
25986   (eval $ac_link) 2>&5
25987   ac_status=$?
25988   echo "$as_me:25988: \$? = $ac_status" >&5
25989   (exit $ac_status); } &&
25990          { ac_try='test -s conftest$ac_exeext'
25991   { (eval echo "$as_me:25991: \"$ac_try\"") >&5
25992   (eval $ac_try) 2>&5
25993   ac_status=$?
25994   echo "$as_me:25994: \$? = $ac_status" >&5
25995   (exit $ac_status); }; }; then
25996
25997         # some linkers simply ignore the -dynamic
25998         case x`file conftest$ac_exeext 2>/dev/null` in
25999         (*static*)
26000                 cf_ldflags_static=no
26001                 ;;
26002         (*)
26003                 cf_ldflags_static=yes
26004                 ;;
26005         esac
26006
26007 else
26008   echo "$as_me: failed program was:" >&5
26009 cat conftest.$ac_ext >&5
26010 cf_ldflags_static=no
26011 fi
26012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26013
26014         rm -f libconftest.*
26015         LIBS="$cf_save_LIBS"
26016
26017         echo "$as_me:26017: result: $cf_ldflags_static" >&5
26018 echo "${ECHO_T}$cf_ldflags_static" >&6
26019
26020         if test $cf_ldflags_static != yes
26021         then
26022                 LDFLAGS_STATIC=
26023                 LDFLAGS_SHARED=
26024         fi
26025 else
26026         LDFLAGS_STATIC=
26027         LDFLAGS_SHARED=
26028 fi
26029
26030         ;;
26031 esac
26032
26033 echo "$as_me:26033: checking where we will install curses.h" >&5
26034 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
26035
26036 includesubdir=
26037 if test "$with_overwrite" = no && \
26038  ( test "x$includedir" = 'x${prefix}/include' || \
26039    test "x$includedir" = "x${prefix}/include" )
26040 then
26041         includesubdir="/ncurses${USE_LIB_SUFFIX}"
26042 fi
26043 echo "$as_me:26043: result: ${includedir}${includesubdir}" >&5
26044 echo "${ECHO_T}${includedir}${includesubdir}" >&6
26045
26046 ### Resolve a conflict between normal and wide-curses by forcing applications
26047 ### that will need libutf8 to add it to their configure script.
26048 if test "$with_overwrite" != no ; then
26049 if test "$NCURSES_LIBUTF8" = 1 ; then
26050         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
26051         { echo "$as_me:26051: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
26052 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
26053 fi
26054 fi
26055 WITH_OVERWRITE=$with_overwrite
26056
26057 # used to separate tack out of the tree
26058 NCURSES_TREE=
26059
26060 ### predefined stuff for the test programs
26061
26062 cat >>confdefs.h <<\EOF
26063 #define HAVE_SLK_COLOR 1
26064 EOF
26065
26066 # pkgsrc uses these
26067
26068 echo "$as_me:26068: checking for desired basename for form library" >&5
26069 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
26070
26071 # Check whether --with-form-libname or --without-form-libname was given.
26072 if test "${with_form_libname+set}" = set; then
26073   withval="$with_form_libname"
26074   with_lib_basename=$withval
26075 else
26076   with_lib_basename=form
26077 fi;
26078 FORM_NAME="$with_lib_basename"
26079
26080 case "x$FORM_NAME" in
26081 (x|xno|xnone|xyes)
26082         FORM_NAME=form
26083         ;;
26084 (*)
26085         ;;
26086 esac
26087
26088 echo "$as_me:26088: result: $FORM_NAME" >&5
26089 echo "${ECHO_T}$FORM_NAME" >&6
26090
26091 echo "$as_me:26091: checking for desired basename for menu library" >&5
26092 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
26093
26094 # Check whether --with-menu-libname or --without-menu-libname was given.
26095 if test "${with_menu_libname+set}" = set; then
26096   withval="$with_menu_libname"
26097   with_lib_basename=$withval
26098 else
26099   with_lib_basename=menu
26100 fi;
26101 MENU_NAME="$with_lib_basename"
26102
26103 case "x$MENU_NAME" in
26104 (x|xno|xnone|xyes)
26105         MENU_NAME=menu
26106         ;;
26107 (*)
26108         ;;
26109 esac
26110
26111 echo "$as_me:26111: result: $MENU_NAME" >&5
26112 echo "${ECHO_T}$MENU_NAME" >&6
26113
26114 echo "$as_me:26114: checking for desired basename for panel library" >&5
26115 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
26116
26117 # Check whether --with-panel-libname or --without-panel-libname was given.
26118 if test "${with_panel_libname+set}" = set; then
26119   withval="$with_panel_libname"
26120   with_lib_basename=$withval
26121 else
26122   with_lib_basename=panel
26123 fi;
26124 PANEL_NAME="$with_lib_basename"
26125
26126 case "x$PANEL_NAME" in
26127 (x|xno|xnone|xyes)
26128         PANEL_NAME=panel
26129         ;;
26130 (*)
26131         ;;
26132 esac
26133
26134 echo "$as_me:26134: result: $PANEL_NAME" >&5
26135 echo "${ECHO_T}$PANEL_NAME" >&6
26136
26137 echo "$as_me:26137: checking for desired basename for cxx library" >&5
26138 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
26139
26140 # Check whether --with-cxx-libname or --without-cxx-libname was given.
26141 if test "${with_cxx_libname+set}" = set; then
26142   withval="$with_cxx_libname"
26143   with_lib_basename=$withval
26144 else
26145   with_lib_basename=ncurses++
26146 fi;
26147 CXX_NAME="$with_lib_basename"
26148
26149 case "x$CXX_NAME" in
26150 (x|xno|xnone|xyes)
26151         CXX_NAME=ncurses++
26152         ;;
26153 (*)
26154         ;;
26155 esac
26156
26157 echo "$as_me:26157: result: $CXX_NAME" >&5
26158 echo "${ECHO_T}$CXX_NAME" >&6
26159
26160 ### Construct the list of subdirectories for which we'll customize makefiles
26161 ### with the appropriate compile-rules.
26162
26163 echo "$as_me:26163: checking for src modules" >&5
26164 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
26165
26166 # dependencies and linker-arguments for test-programs
26167 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
26168 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
26169 if test "$DFT_LWR_MODEL" = "libtool"; then
26170         TEST_ARGS="${TEST_DEPS}"
26171         TEST_ARG2="${TEST_DEP2}"
26172 else
26173         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
26174         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
26175 fi
26176
26177 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
26178 cf_cv_src_modules=
26179 for cf_dir in $modules_to_build
26180 do
26181         if test -f $srcdir/$cf_dir/modules; then
26182
26183                 # We may/may not have tack in the distribution, though the
26184                 # makefile is.
26185                 if test $cf_dir = tack ; then
26186                         if test "x$cf_with_tack" != "xyes"; then
26187                                 continue
26188                         fi
26189                 fi
26190
26191                 if test -z "$cf_cv_src_modules"; then
26192                         cf_cv_src_modules=$cf_dir
26193                 else
26194                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
26195                 fi
26196
26197                 # Make the ncurses_cfg.h file record the library interface files as
26198                 # well.  These are header files that are the same name as their
26199                 # directory.  Ncurses is the only library that does not follow
26200                 # that pattern.
26201                 if test $cf_dir = tack ; then
26202                         continue
26203                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
26204
26205 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26206
26207                         cat >>confdefs.h <<EOF
26208 #define HAVE_${cf_have_include}_H 1
26209 EOF
26210
26211                         cat >>confdefs.h <<EOF
26212 #define HAVE_LIB${cf_have_include} 1
26213 EOF
26214
26215 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26216
26217 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
26218
26219                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
26220                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
26221                         if test "$DFT_LWR_MODEL" = "libtool"; then
26222                                 TEST_ARGS="${TEST_DEPS}"
26223                                 TEST_ARG2="${TEST_DEP2}"
26224                         else
26225                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
26226                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
26227                         fi
26228                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
26229                 fi
26230         fi
26231 done
26232 echo "$as_me:26232: result: $cf_cv_src_modules" >&5
26233 echo "${ECHO_T}$cf_cv_src_modules" >&6
26234
26235 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
26236 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
26237
26238 SRC_SUBDIRS=
26239 if test "x$cf_with_manpages" != xno ; then
26240         SRC_SUBDIRS="$SRC_SUBDIRS man"
26241 fi
26242 SRC_SUBDIRS="$SRC_SUBDIRS include"
26243 for cf_dir in $cf_cv_src_modules
26244 do
26245         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
26246 done
26247 if test "x$cf_with_tests" != "xno" ; then
26248         SRC_SUBDIRS="$SRC_SUBDIRS test"
26249 fi
26250 # always make this, to install the ncurses-config script
26251 SRC_SUBDIRS="$SRC_SUBDIRS misc"
26252 if test "$cf_with_cxx_binding" != no; then
26253         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
26254         SRC_SUBDIRS="$SRC_SUBDIRS c++"
26255 fi
26256
26257 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
26258 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
26259
26260 ADA_SUBDIRS=
26261 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
26262         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
26263         ADA_SUBDIRS="gen src"
26264         if test "x$cf_with_tests" != "xno" ; then
26265                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
26266         fi
26267 fi
26268
26269 SUB_MAKEFILES=
26270 for cf_dir in $SRC_SUBDIRS
26271 do
26272         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
26273 done
26274
26275 if test -n "$ADA_SUBDIRS"; then
26276         for cf_dir in $ADA_SUBDIRS
26277         do
26278                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
26279         done
26280
26281 fi
26282
26283 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26284    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
26285    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
26286    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
26287 fi
26288
26289 DIRS_TO_MAKE="lib"
26290 for cf_item in $cf_list_models
26291 do
26292
26293         case $cf_item in
26294         (libtool) cf_subdir='obj_lo'  ;;
26295         (normal)  cf_subdir='objects' ;;
26296         (debug)   cf_subdir='obj_g' ;;
26297         (profile) cf_subdir='obj_p' ;;
26298         (shared)
26299                 case $cf_cv_system_name in
26300                 (cygwin|msys)
26301                         cf_subdir='objects' ;;
26302                 (*)
26303                         cf_subdir='obj_s' ;;
26304                 esac
26305         esac
26306
26307         for cf_item2 in $DIRS_TO_MAKE
26308         do
26309                 test $cf_item2 = $cf_subdir && break
26310         done
26311         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
26312 done
26313 for cf_dir in $DIRS_TO_MAKE
26314 do
26315         test ! -d $cf_dir && mkdir $cf_dir
26316 done
26317
26318 # symbols that differ when compiling Ada95 by itself.
26319 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
26320
26321 # values to use as strings
26322
26323 cat >>confdefs.h <<EOF
26324 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
26325 EOF
26326
26327 cat >>confdefs.h <<EOF
26328 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
26329 EOF
26330
26331 ### Now that we're done running tests, add the compiler-warnings, if any
26332
26333 cf_fix_cppflags=no
26334 cf_new_cflags=
26335 cf_new_cppflags=
26336 cf_new_extra_cppflags=
26337
26338 for cf_add_cflags in $EXTRA_CFLAGS
26339 do
26340 case $cf_fix_cppflags in
26341 (no)
26342         case $cf_add_cflags in
26343         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
26344                 case $cf_add_cflags in
26345                 (-D*)
26346                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
26347
26348                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26349                                 && test -z "${cf_tst_cflags}" \
26350                                 && cf_fix_cppflags=yes
26351
26352                         if test $cf_fix_cppflags = yes ; then
26353
26354         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26355         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26356
26357                                 continue
26358                         elif test "${cf_tst_cflags}" = "\"'" ; then
26359
26360         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26361         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26362
26363                                 continue
26364                         fi
26365                         ;;
26366                 esac
26367                 case "$CPPFLAGS" in
26368                 (*$cf_add_cflags)
26369                         ;;
26370                 (*)
26371                         case $cf_add_cflags in
26372                         (-D*)
26373                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
26374
26375 CPPFLAGS=`echo "$CPPFLAGS" | \
26376         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
26377                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
26378
26379                                 ;;
26380                         esac
26381
26382         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
26383         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
26384
26385                         ;;
26386                 esac
26387                 ;;
26388         (*)
26389
26390         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
26391         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
26392
26393                 ;;
26394         esac
26395         ;;
26396 (yes)
26397
26398         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26399         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26400
26401         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
26402
26403         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26404                 && test -z "${cf_tst_cflags}" \
26405                 && cf_fix_cppflags=no
26406         ;;
26407 esac
26408 done
26409
26410 if test -n "$cf_new_cflags" ; then
26411
26412         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
26413         CFLAGS="${CFLAGS}$cf_new_cflags"
26414
26415 fi
26416
26417 if test -n "$cf_new_cppflags" ; then
26418
26419         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26420         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
26421
26422 fi
26423
26424 if test -n "$cf_new_extra_cppflags" ; then
26425
26426         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
26427         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
26428
26429 fi
26430
26431 ### Define substitutions for header files to avoid name-pollution
26432
26433 if test "x$cf_cv_have_tcgetattr" = xyes ; then
26434         HAVE_TCGETATTR=1
26435 else
26436         HAVE_TCGETATTR=0
26437 fi
26438
26439 if test "x$ac_cv_header_stdint_h" = xyes ; then
26440         HAVE_STDINT_H=1
26441 else
26442         HAVE_STDINT_H=0
26443 fi
26444
26445 if test "x$ac_cv_header_termio_h" = xyes ; then
26446         HAVE_TERMIO_H=1
26447 else
26448         HAVE_TERMIO_H=0
26449 fi
26450
26451 if test "x$ac_cv_header_termios_h" = xyes ; then
26452         HAVE_TERMIOS_H=1
26453 else
26454         HAVE_TERMIOS_H=0
26455 fi
26456
26457 ################################################################################
26458 test "x$use_database" = xyes && \
26459 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
26460
26461 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
26462 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
26463
26464 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
26465 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
26466 fi
26467
26468 if test "x$cf_with_tests" != xno ; then
26469         MAKE_TESTS=
26470 else
26471         MAKE_TESTS="#"
26472 fi
26473
26474 ADAHTML_DIR=../../doc/html/ada
26475
26476 # workaround for OS/2 (20151017)
26477 case $cf_cv_system_name in
26478 (os2*)
26479         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
26480         ;;
26481 (*)
26482         LIBTOOL_OPTS_CXX=
26483         ;;
26484 esac
26485
26486 # workaround for g++ versus Solaris (20131116)
26487 case $cf_cv_system_name in
26488 (solaris2*)
26489         case "x$CPPFLAGS" in
26490         (*-D_XOPEN_SOURCE_EXTENDED*)
26491                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
26492
26493 echo "${as_me:-configure}:26493: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
26494
26495                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
26496                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
26497                 ;;
26498         esac
26499         ;;
26500 esac
26501
26502 # Help to automatically enable the extended curses features when using either
26503 # the *-config or the ".pc" files by adding defines.
26504 echo "$as_me:26504: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
26505 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
26506 PKG_CFLAGS=
26507 for cf_loop1 in $CPPFLAGS_after_XOPEN
26508 do
26509         cf_found=no
26510         for cf_loop2 in $CPPFLAGS_before_XOPEN
26511         do
26512                 if test "x$cf_loop1" = "x$cf_loop2"
26513                 then
26514                         cf_found=yes
26515                         break
26516                 fi
26517         done
26518         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
26519 done
26520 echo "$as_me:26520: result: $PKG_CFLAGS" >&5
26521 echo "${ECHO_T}$PKG_CFLAGS" >&6
26522
26523 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26524 case "x$NCURSES_OSPEED" in
26525 (*short*)
26526         cf_compatible=1
26527         ;;
26528 (*)
26529         cf_compatible=0
26530         ;;
26531 esac
26532
26533 cat >>confdefs.h <<EOF
26534 #define NCURSES_OSPEED_COMPAT $cf_compatible
26535 EOF
26536
26537 case "x$cf_cv_typeof_chtype" in
26538 (xshort|xint|xlong)
26539         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26540         ;;
26541 esac
26542
26543 case "x$cf_cv_typeof_mmask_t" in
26544 (xshort|xint|xlong)
26545         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26546         ;;
26547 esac
26548
26549 # substitute into misc/Makefile to suppress
26550 # (un)install.data from the
26551 # (un)install rules.
26552 if test "x$cf_with_db_install" = "xno"; then
26553         MISC_INSTALL_DATA=
26554         MISC_UNINSTALL_DATA=
26555 else
26556         MISC_INSTALL_DATA=install.data
26557         MISC_UNINSTALL_DATA=uninstall.data
26558 fi
26559
26560 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26561         MAKE_DATABASE="#"
26562 else
26563         MAKE_DATABASE="$MAKE_TERMINFO"
26564 fi
26565
26566 if test -n "$PACKAGE"
26567 then
26568         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26569         export PACKAGE
26570         echo "package: $PACKAGE"
26571 fi
26572
26573 UNALTERED_SYMS=
26574 cf_filter_syms=no
26575
26576 if test -n "$RESULTING_SYMS"
26577 then
26578         cf_filter_syms=$cf_dft_filter_syms
26579         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26580
26581 echo "${as_me:-configure}:26581: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26582
26583 fi
26584
26585 if test "x$WILDCARD_SYMS" = xno
26586 then
26587         cf_filter_syms=yes
26588 fi
26589
26590 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26591
26592 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26593 if test $cf_filter_syms = yes
26594 then
26595         RESULTING_SYMS=resulting.map
26596 fi
26597
26598 if test "x$cross_compiling" = xyes ; then
26599         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26600         CHECK_BUILD="#"
26601 else
26602         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26603         CHECK_BUILD=
26604 fi
26605
26606 # This is used for the *-config script and *.pc data files.
26607
26608 echo "$as_me:26608: checking for linker search path" >&5
26609 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26610 if test "${cf_cv_ld_searchpath+set}" = set; then
26611   echo $ECHO_N "(cached) $ECHO_C" >&6
26612 else
26613
26614 if test "$cross_compiling" != yes ; then
26615
26616 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26617 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26618
26619 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26620 # update the cache, which makes it run faster.
26621 test -z "$cf_pathlist" && \
26622         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26623
26624 test -z "$cf_pathlist" &&
26625         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26626
26627 # This works with OpenBSD 6.5, which lists only filenames
26628 test -z "$cf_pathlist" &&
26629         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26630
26631 if test -z "$cf_pathlist"
26632 then
26633         # dyld default path with MacOS
26634         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26635         then
26636                 # do this to bypass check
26637                 cf_cv_ld_searchpath='$HOME/lib'
26638                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26639         fi
26640 fi
26641
26642 if test -z "$cf_pathlist"
26643 then
26644         # Solaris is hardcoded
26645         if test -d /opt/SUNWspro/lib
26646         then
26647                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26648         elif test -d /usr/ccs/lib
26649         then
26650                 cf_pathlist="/usr/ccs/lib /usr/lib"
26651         fi
26652 fi
26653
26654 fi
26655
26656 # If nothing else, assume it is conventional
26657 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26658
26659 # Finally, check that this is only directories
26660 for cf_path in $0 $cf_pathlist
26661 do
26662         if test -d "$cf_path"; then
26663                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26664                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26665         fi
26666 done
26667
26668 # Ensure that it is nonempty
26669 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26670
26671 fi
26672 echo "$as_me:26672: result: $cf_cv_ld_searchpath" >&5
26673 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26674
26675 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26676
26677 cat >>confdefs.h <<\EOF
26678 #define HAVE_CURSES_DATA_BOOLNAMES 1
26679 EOF
26680
26681 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_MAKEFILES Makefile"
26682 ac_config_commands="$ac_config_commands default"
26683 cat >confcache <<\_ACEOF
26684 # This file is a shell script that caches the results of configure
26685 # tests run on this system so they can be shared between configure
26686 # scripts and configure runs, see configure's option --config-cache.
26687 # It is not useful on other systems.  If it contains results you don't
26688 # want to keep, you may remove or edit it.
26689 #
26690 # config.status only pays attention to the cache file if you give it
26691 # the --recheck option to rerun configure.
26692 #
26693 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26694 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26695 # following values.
26696
26697 _ACEOF
26698
26699 # The following way of writing the cache mishandles newlines in values,
26700 # but we know of no workaround that is simple, portable, and efficient.
26701 # So, don't put newlines in cache variables' values.
26702 # Ultrix sh set writes to stderr and can't be redirected directly,
26703 # and sets the high bit in the cache file unless we assign to the vars.
26704 {
26705   (set) 2>&1 |
26706     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26707     *ac_space=\ *)
26708       # `set' does not quote correctly, so add quotes (double-quote
26709       # substitution turns \\\\ into \\, and sed turns \\ into \).
26710       sed -n \
26711         "s/'/'\\\\''/g;
26712           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26713       ;;
26714     *)
26715       # `set' quotes correctly as required by POSIX, so do not add quotes.
26716       sed -n \
26717         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26718       ;;
26719     esac;
26720 } |
26721   sed '
26722      t clear
26723      : clear
26724      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26725      t end
26726      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26727      : end' >>confcache
26728 if cmp -s $cache_file confcache; then :; else
26729   if test -w $cache_file; then
26730     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26731     cat confcache >$cache_file
26732   else
26733     echo "not updating unwritable cache $cache_file"
26734   fi
26735 fi
26736 rm -f confcache
26737
26738 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26739 # Let make expand exec_prefix.
26740 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26741
26742 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26743 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26744 # trailing colons and then remove the whole line if VPATH becomes empty
26745 # (actually we leave an empty line to preserve line numbers).
26746 if test "x$srcdir" = x.; then
26747   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26748 s/:*\$(srcdir):*/:/;
26749 s/:*\${srcdir}:*/:/;
26750 s/:*@srcdir@:*/:/;
26751 s/^\([^=]*=[    ]*\):*/\1/;
26752 s/:*$//;
26753 s/^[^=]*=[      ]*$//;
26754 }'
26755 fi
26756
26757 DEFS=-DHAVE_CONFIG_H
26758
26759 : ${CONFIG_STATUS=./config.status}
26760 ac_clean_files_save=$ac_clean_files
26761 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26762 { echo "$as_me:26762: creating $CONFIG_STATUS" >&5
26763 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26764 cat >$CONFIG_STATUS <<_ACEOF
26765 #! $SHELL
26766 # Generated automatically by configure.
26767 # Run this file to recreate the current configuration.
26768 # Compiler output produced by configure, useful for debugging
26769 # configure, is in config.log if it exists.
26770
26771 debug=false
26772 SHELL=\${CONFIG_SHELL-$SHELL}
26773 ac_cs_invocation="\$0 \$@"
26774
26775 _ACEOF
26776
26777 cat >>$CONFIG_STATUS <<\_ACEOF
26778 # Be Bourne compatible
26779 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26780   emulate sh
26781   NULLCMD=:
26782 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26783   set -o posix
26784 fi
26785
26786 # Name of the executable.
26787 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26788
26789 if expr a : '\(a\)' >/dev/null 2>&1; then
26790   as_expr=expr
26791 else
26792   as_expr=false
26793 fi
26794
26795 rm -f conf$$ conf$$.exe conf$$.file
26796 echo >conf$$.file
26797 if ln -s conf$$.file conf$$ 2>/dev/null; then
26798   # We could just check for DJGPP; but this test a) works b) is more generic
26799   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26800   if test -f conf$$.exe; then
26801     # Don't use ln at all; we don't have any links
26802     as_ln_s='cp -p'
26803   else
26804     as_ln_s='ln -s'
26805   fi
26806 elif ln conf$$.file conf$$ 2>/dev/null; then
26807   as_ln_s=ln
26808 else
26809   as_ln_s='cp -p'
26810 fi
26811 rm -f conf$$ conf$$.exe conf$$.file
26812
26813 as_executable_p="test -f"
26814
26815 # Support unset when possible.
26816 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26817   as_unset=unset
26818 else
26819   as_unset=false
26820 fi
26821
26822 # NLS nuisances.
26823 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26824 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26825 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26826 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26827 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26828 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26829 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26830 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26831
26832 # IFS
26833 # We need space, tab and new line, in precisely that order.
26834 as_nl='
26835 '
26836 IFS="   $as_nl"
26837
26838 # CDPATH.
26839 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26840
26841 exec 6>&1
26842
26843 _ACEOF
26844
26845 # Files that config.status was made for.
26846 if test -n "$ac_config_files"; then
26847   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26848 fi
26849
26850 if test -n "$ac_config_headers"; then
26851   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26852 fi
26853
26854 if test -n "$ac_config_links"; then
26855   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26856 fi
26857
26858 if test -n "$ac_config_commands"; then
26859   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26860 fi
26861
26862 cat >>$CONFIG_STATUS <<\EOF
26863
26864 ac_cs_usage="\
26865 \`$as_me' instantiates files from templates according to the
26866 current configuration.
26867
26868 Usage: $0 [OPTIONS] [FILE]...
26869
26870   -h, --help       print this help, then exit
26871   -V, --version    print version number, then exit
26872   -d, --debug      don't remove temporary files
26873       --recheck    update $as_me by reconfiguring in the same conditions
26874   --file=FILE[:TEMPLATE]
26875                    instantiate the configuration file FILE
26876   --header=FILE[:TEMPLATE]
26877                    instantiate the configuration header FILE
26878
26879 Configuration files:
26880 $config_files
26881
26882 Configuration headers:
26883 $config_headers
26884
26885 Configuration commands:
26886 $config_commands
26887
26888 Report bugs to <dickey@invisible-island.net>."
26889 EOF
26890
26891 cat >>$CONFIG_STATUS <<EOF
26892 ac_cs_version="\\
26893 config.status
26894 configured by $0, generated by GNU Autoconf 2.52.20200111,
26895   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26896
26897 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26898 Free Software Foundation, Inc.
26899 This config.status script is free software; the Free Software Foundation
26900 gives unlimited permission to copy, distribute and modify it."
26901 srcdir=$srcdir
26902 INSTALL="$INSTALL"
26903 EOF
26904
26905 cat >>$CONFIG_STATUS <<\EOF
26906 # If no file are specified by the user, then we need to provide default
26907 # value.  By we need to know if files were specified by the user.
26908 ac_need_defaults=:
26909 while test $# != 0
26910 do
26911   case $1 in
26912   --*=*)
26913     ac_option=`expr "x$1" : 'x\([^=]*\)='`
26914     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26915     shift
26916     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26917     shift
26918     ;;
26919   -*);;
26920   *) # This is not an option, so the user has probably given explicit
26921      # arguments.
26922      ac_need_defaults=false;;
26923   esac
26924
26925   case $1 in
26926   # Handling of the options.
26927 EOF
26928 cat >>$CONFIG_STATUS <<EOF
26929   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26930     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26931     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26932 EOF
26933 cat >>$CONFIG_STATUS <<\EOF
26934   --version | --vers* | -V )
26935     echo "$ac_cs_version"; exit 0 ;;
26936   --he | --h)
26937     # Conflict between --help and --header
26938     { { echo "$as_me:26938: error: ambiguous option: $1
26939 Try \`$0 --help' for more information." >&5
26940 echo "$as_me: error: ambiguous option: $1
26941 Try \`$0 --help' for more information." >&2;}
26942    { (exit 1); exit 1; }; };;
26943   --help | --hel | -h )
26944     echo "$ac_cs_usage"; exit 0 ;;
26945   --debug | --d* | -d )
26946     debug=: ;;
26947   --file | --fil | --fi | --f )
26948     shift
26949     CONFIG_FILES="$CONFIG_FILES $1"
26950     ac_need_defaults=false;;
26951   --header | --heade | --head | --hea )
26952     shift
26953     CONFIG_HEADERS="$CONFIG_HEADERS $1"
26954     ac_need_defaults=false;;
26955
26956   # This is an error.
26957   -*) { { echo "$as_me:26957: error: unrecognized option: $1
26958 Try \`$0 --help' for more information." >&5
26959 echo "$as_me: error: unrecognized option: $1
26960 Try \`$0 --help' for more information." >&2;}
26961    { (exit 1); exit 1; }; } ;;
26962
26963   *) ac_config_targets="$ac_config_targets $1" ;;
26964
26965   esac
26966   shift
26967 done
26968
26969 exec 5>>config.log
26970 cat >&5 << _ACEOF
26971
26972 ## ----------------------- ##
26973 ## Running config.status.  ##
26974 ## ----------------------- ##
26975
26976 This file was extended by $as_me 2.52.20200111, executed with
26977   CONFIG_FILES    = $CONFIG_FILES
26978   CONFIG_HEADERS  = $CONFIG_HEADERS
26979   CONFIG_LINKS    = $CONFIG_LINKS
26980   CONFIG_COMMANDS = $CONFIG_COMMANDS
26981   > $ac_cs_invocation
26982 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26983
26984 _ACEOF
26985 EOF
26986
26987 cat >>$CONFIG_STATUS <<EOF
26988 #
26989 # INIT-COMMANDS section.
26990 #
26991
26992 ### Special initialization commands, used to pass information from the
26993 ### configuration-run into config.status
26994
26995 ALTERNATE_SYMS="$ALTERNATE_SYMS"
26996 AWK="$AWK"
26997 CXX_NAME="$CXX_NAME"
26998 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26999 DFT_LWR_MODEL="$DFT_LWR_MODEL"
27000 ECHO_LD="$ECHO_LD"
27001 EXTRA_SUFFIX="$EXTRA_SUFFIX"
27002 FORM_NAME="$FORM_NAME"
27003 LDCONFIG="$LDCONFIG"
27004 LIBTOOL_VERSION="$LIBTOOL_VERSION"
27005 LIB_NAME="$LIB_NAME"
27006 LIB_PREFIX="$LIB_PREFIX"
27007 LIB_SUBSETS="$LIB_SUBSETS"
27008 LIB_SUFFIX="$LIB_SUFFIX"
27009 LIB_TRACING="$LIB_TRACING"
27010 LN_S="$LN_S"
27011 MAKE_TERMINFO="$MAKE_TERMINFO"
27012 MENU_NAME="$MENU_NAME"
27013 NCURSES_MAJOR="$NCURSES_MAJOR"
27014 NCURSES_MINOR="$NCURSES_MINOR"
27015 NCURSES_OSPEED="$NCURSES_OSPEED"
27016 NCURSES_PATCH="$NCURSES_PATCH"
27017 PANEL_NAME="$PANEL_NAME"
27018 SRC_SUBDIRS="$SRC_SUBDIRS"
27019 TERMINFO="$TERMINFO"
27020 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
27021 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
27022 TICS_NAME="$TICS_NAME"
27023 TICS_SUFFIX="$TICS_SUFFIX"
27024 TIC_PATH="$TIC_PATH"
27025 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
27026 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
27027 TINFO_NAME="$TINFO_NAME"
27028 TINFO_SUFFIX="$TINFO_SUFFIX"
27029 UNALTERED_SYMS="$UNALTERED_SYMS"
27030 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
27031 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
27032 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
27033 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
27034 WILDCARD_SYMS="$WILDCARD_SYMS"
27035 WITH_CURSES_H="$with_curses_h"
27036 WITH_ECHO="${enable_echo:=yes}"
27037 WITH_OVERWRITE="$with_overwrite"
27038 cf_LIST_MODELS="$cf_list_models"
27039 cf_cv_abi_version="$cf_cv_abi_version"
27040 cf_cv_do_relink="$cf_cv_do_relink"
27041 cf_cv_do_reranlib="$cf_cv_do_reranlib"
27042 cf_cv_do_symlinks="$cf_cv_do_symlinks"
27043 cf_cv_enable_lp64="$cf_cv_enable_lp64"
27044 cf_cv_enable_opaque="$cf_cv_enable_opaque"
27045 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
27046 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
27047 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
27048 cf_cv_rel_version="$cf_cv_rel_version"
27049 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
27050 cf_cv_shared_soname='$cf_cv_shared_soname'
27051 cf_cv_shlib_version="$cf_cv_shlib_version"
27052 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
27053 cf_cv_system_name="$cf_cv_system_name"
27054 cf_cv_term_driver="$with_term_driver"
27055 cf_with_ada="$cf_with_ada"
27056 cf_with_cxx_binding="$cf_with_cxx_binding"
27057 cf_with_db_install="$cf_with_db_install"
27058 cf_with_manpages="$cf_with_manpages"
27059 cf_with_tests="$cf_with_tests"
27060 host="$host"
27061 target="$target"
27062 with_shared_cxx="$with_shared_cxx"
27063
27064 EOF
27065
27066 cat >>$CONFIG_STATUS <<\EOF
27067 for ac_config_target in $ac_config_targets
27068 do
27069   case "$ac_config_target" in
27070   # Handling of arguments.
27071   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
27072   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
27073   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
27074   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
27075   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
27076   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
27077   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27078   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
27079   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
27080   *) { { echo "$as_me:27080: error: invalid argument: $ac_config_target" >&5
27081 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27082    { (exit 1); exit 1; }; };;
27083   esac
27084 done
27085
27086 # If the user did not use the arguments to specify the items to instantiate,
27087 # then the envvar interface is used.  Set only those that are not.
27088 # We use the long form for the default assignment because of an extremely
27089 # bizarre bug on SunOS 4.1.3.
27090 if $ac_need_defaults; then
27091   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27092   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27093   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27094 fi
27095
27096 # Create a temporary directory, and hook for its removal unless debugging.
27097 $debug ||
27098 {
27099   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
27100   trap '{ (exit 1); exit 1; }' 1 2 13 15
27101 }
27102
27103 # Create a (secure) tmp directory for tmp files.
27104 : ${TMPDIR=/tmp}
27105 {
27106   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
27107   test -n "$tmp" && test -d "$tmp"
27108 }  ||
27109 {
27110   tmp=$TMPDIR/cs$$-$RANDOM
27111   (umask 077 && mkdir $tmp)
27112 } ||
27113 {
27114    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
27115    { (exit 1); exit 1; }
27116 }
27117
27118 EOF
27119
27120 cat >>$CONFIG_STATUS <<EOF
27121
27122 #
27123 # CONFIG_FILES section.
27124 #
27125
27126 # No need to generate the scripts if there are no CONFIG_FILES.
27127 # This happens for instance when ./config.status config.h
27128 if test -n "\$CONFIG_FILES"; then
27129   # Protect against being on the right side of a sed subst in config.status.
27130   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
27131    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
27132 s,@SHELL@,$SHELL,;t t
27133 s,@exec_prefix@,$exec_prefix,;t t
27134 s,@prefix@,$prefix,;t t
27135 s,@program_transform_name@,$program_transform_name,;t t
27136 s,@bindir@,$bindir,;t t
27137 s,@sbindir@,$sbindir,;t t
27138 s,@libexecdir@,$libexecdir,;t t
27139 s,@datarootdir@,$datarootdir,;t t
27140 s,@datadir@,$datadir,;t t
27141 s,@sysconfdir@,$sysconfdir,;t t
27142 s,@sharedstatedir@,$sharedstatedir,;t t
27143 s,@localstatedir@,$localstatedir,;t t
27144 s,@runstatedir@,$runstatedir,;t t
27145 s,@libdir@,$libdir,;t t
27146 s,@includedir@,$includedir,;t t
27147 s,@oldincludedir@,$oldincludedir,;t t
27148 s,@infodir@,$infodir,;t t
27149 s,@mandir@,$mandir,;t t
27150 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
27151 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
27152 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
27153 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
27154 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
27155 s,@build_alias@,$build_alias,;t t
27156 s,@host_alias@,$host_alias,;t t
27157 s,@target_alias@,$target_alias,;t t
27158 s,@ECHO_C@,$ECHO_C,;t t
27159 s,@ECHO_N@,$ECHO_N,;t t
27160 s,@ECHO_T@,$ECHO_T,;t t
27161 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
27162 s,@DEFS@,$DEFS,;t t
27163 s,@LIBS@,$LIBS,;t t
27164 s,@top_builddir@,$top_builddir,;t t
27165 s,@EGREP@,$EGREP,;t t
27166 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
27167 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
27168 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
27169 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
27170 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
27171 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
27172 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
27173 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
27174 s,@VERSION@,$VERSION,;t t
27175 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
27176 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
27177 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
27178 s,@PACKAGE@,$PACKAGE,;t t
27179 s,@build@,$build,;t t
27180 s,@build_cpu@,$build_cpu,;t t
27181 s,@build_vendor@,$build_vendor,;t t
27182 s,@build_os@,$build_os,;t t
27183 s,@host@,$host,;t t
27184 s,@host_cpu@,$host_cpu,;t t
27185 s,@host_vendor@,$host_vendor,;t t
27186 s,@host_os@,$host_os,;t t
27187 s,@target@,$target,;t t
27188 s,@target_cpu@,$target_cpu,;t t
27189 s,@target_vendor@,$target_vendor,;t t
27190 s,@target_os@,$target_os,;t t
27191 s,@CC@,$CC,;t t
27192 s,@CFLAGS@,$CFLAGS,;t t
27193 s,@LDFLAGS@,$LDFLAGS,;t t
27194 s,@CPPFLAGS@,$CPPFLAGS,;t t
27195 s,@ac_ct_CC@,$ac_ct_CC,;t t
27196 s,@EXEEXT@,$EXEEXT,;t t
27197 s,@OBJEXT@,$OBJEXT,;t t
27198 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
27199 s,@CPP@,$CPP,;t t
27200 s,@LDCONFIG@,$LDCONFIG,;t t
27201 s,@CXX@,$CXX,;t t
27202 s,@CXXFLAGS@,$CXXFLAGS,;t t
27203 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
27204 s,@AWK@,$AWK,;t t
27205 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
27206 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
27207 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
27208 s,@LINT@,$LINT,;t t
27209 s,@LINT_OPTS@,$LINT_OPTS,;t t
27210 s,@LN_S@,$LN_S,;t t
27211 s,@cf_config_suffix@,$cf_config_suffix,;t t
27212 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
27213 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
27214 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
27215 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
27216 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
27217 s,@SET_MAKE@,$SET_MAKE,;t t
27218 s,@CTAGS@,$CTAGS,;t t
27219 s,@ETAGS@,$ETAGS,;t t
27220 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
27221 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
27222 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
27223 s,@RANLIB@,$RANLIB,;t t
27224 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
27225 s,@LD@,$LD,;t t
27226 s,@ac_ct_LD@,$ac_ct_LD,;t t
27227 s,@AR@,$AR,;t t
27228 s,@ac_ct_AR@,$ac_ct_AR,;t t
27229 s,@NM@,$NM,;t t
27230 s,@ac_ct_NM@,$ac_ct_NM,;t t
27231 s,@ARFLAGS@,$ARFLAGS,;t t
27232 s,@DESTDIR@,$DESTDIR,;t t
27233 s,@BUILD_CC@,$BUILD_CC,;t t
27234 s,@BUILD_CPP@,$BUILD_CPP,;t t
27235 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
27236 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
27237 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
27238 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
27239 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
27240 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
27241 s,@cf_list_models@,$cf_list_models,;t t
27242 s,@ABI_VERSION@,$ABI_VERSION,;t t
27243 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
27244 s,@LIBTOOL@,$LIBTOOL,;t t
27245 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
27246 s,@LT_UNDEF@,$LT_UNDEF,;t t
27247 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
27248 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
27249 s,@LIB_CREATE@,$LIB_CREATE,;t t
27250 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
27251 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
27252 s,@LIB_PREP@,$LIB_PREP,;t t
27253 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
27254 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
27255 s,@LIB_LINK@,$LIB_LINK,;t t
27256 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
27257 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
27258 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
27259 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
27260 s,@TICS_NAME@,$TICS_NAME,;t t
27261 s,@TINFO_NAME@,$TINFO_NAME,;t t
27262 s,@LIB_NAME@,$LIB_NAME,;t t
27263 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
27264 s,@CC_G_OPT@,$CC_G_OPT,;t t
27265 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
27266 s,@LD_MODEL@,$LD_MODEL,;t t
27267 s,@shlibdir@,$shlibdir,;t t
27268 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
27269 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
27270 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
27271 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
27272 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
27273 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
27274 s,@LINK_PROGS@,$LINK_PROGS,;t t
27275 s,@LINK_TESTS@,$LINK_TESTS,;t t
27276 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
27277 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
27278 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
27279 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
27280 s,@RPATH_LIST@,$RPATH_LIST,;t t
27281 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
27282 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
27283 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
27284 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
27285 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
27286 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
27287 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
27288 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
27289 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
27290 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
27291 s,@TIC@,$TIC,;t t
27292 s,@INFOCMP@,$INFOCMP,;t t
27293 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
27294 s,@XTERM_KBS@,$XTERM_KBS,;t t
27295 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
27296 s,@TERMINFO@,$TERMINFO,;t t
27297 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
27298 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
27299 s,@TERMPATH@,$TERMPATH,;t t
27300 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
27301 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
27302 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
27303 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
27304 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
27305 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
27306 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
27307 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
27308 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
27309 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
27310 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
27311 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
27312 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
27313 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
27314 s,@RGB_PATH@,$RGB_PATH,;t t
27315 s,@no_x11_rgb@,$no_x11_rgb,;t t
27316 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
27317 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
27318 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
27319 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
27320 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
27321 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
27322 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
27323 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
27324 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
27325 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
27326 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
27327 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
27328 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
27329 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
27330 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
27331 s,@PTHREAD@,$PTHREAD,;t t
27332 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
27333 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
27334 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
27335 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
27336 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
27337 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
27338 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
27339 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
27340 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
27341 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
27342 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
27343 s,@ECHO_LT@,$ECHO_LT,;t t
27344 s,@ECHO_LD@,$ECHO_LD,;t t
27345 s,@RULE_CC@,$RULE_CC,;t t
27346 s,@SHOW_CC@,$SHOW_CC,;t t
27347 s,@ECHO_CC@,$ECHO_CC,;t t
27348 s,@ECHO_LINK@,$ECHO_LINK,;t t
27349 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
27350 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
27351 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
27352 s,@ADAFLAGS@,$ADAFLAGS,;t t
27353 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
27354 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
27355 s,@ADA_TRACE@,$ADA_TRACE,;t t
27356 s,@MATH_LIB@,$MATH_LIB,;t t
27357 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
27358 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
27359 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
27360 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
27361 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
27362 s,@TEST_LIBS@,$TEST_LIBS,;t t
27363 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
27364 s,@CXXCPP@,$CXXCPP,;t t
27365 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
27366 s,@CXX_AR@,$CXX_AR,;t t
27367 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
27368 s,@CXXLIBS@,$CXXLIBS,;t t
27369 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
27370 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
27371 s,@M4_exists@,$M4_exists,;t t
27372 s,@cf_ada_make@,$cf_ada_make,;t t
27373 s,@cf_ada_config@,$cf_ada_config,;t t
27374 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
27375 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
27376 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
27377 s,@cf_compile_generics@,$cf_compile_generics,;t t
27378 s,@cf_generic_objects@,$cf_generic_objects,;t t
27379 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
27380 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
27381 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
27382 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
27383 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
27384 s,@cf_ada_package@,$cf_ada_package,;t t
27385 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
27386 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
27387 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
27388 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
27389 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
27390 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
27391 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
27392 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
27393 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
27394 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
27395 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
27396 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
27397 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
27398 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
27399 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
27400 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
27401 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
27402 s,@TICS_LIBS@,$TICS_LIBS,;t t
27403 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
27404 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
27405 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
27406 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
27407 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
27408 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
27409 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
27410 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
27411 s,@includesubdir@,$includesubdir,;t t
27412 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
27413 s,@TICS_LIST@,$TICS_LIST,;t t
27414 s,@TINFO_LIST@,$TINFO_LIST,;t t
27415 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
27416 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
27417 s,@FORM_NAME@,$FORM_NAME,;t t
27418 s,@MENU_NAME@,$MENU_NAME,;t t
27419 s,@PANEL_NAME@,$PANEL_NAME,;t t
27420 s,@CXX_NAME@,$CXX_NAME,;t t
27421 s,@TEST_ARGS@,$TEST_ARGS,;t t
27422 s,@TEST_DEPS@,$TEST_DEPS,;t t
27423 s,@TEST_ARG2@,$TEST_ARG2,;t t
27424 s,@TEST_DEP2@,$TEST_DEP2,;t t
27425 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
27426 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
27427 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
27428 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
27429 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
27430 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
27431 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
27432 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
27433 s,@cross_compiling@,$cross_compiling,;t t
27434 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
27435 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
27436 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
27437 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
27438 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
27439 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
27440 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
27441 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
27442 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
27443 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
27444 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
27445 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27446 CEOF
27447
27448 EOF
27449
27450   cat >>$CONFIG_STATUS <<\EOF
27451   # Split the substitutions into bite-sized pieces for seds with
27452   # small command number limits, like on Digital OSF/1 and HP-UX.
27453   ac_max_sed_lines=48
27454   ac_sed_frag=1 # Number of current file.
27455   ac_beg=1 # First line for current file.
27456   ac_end=$ac_max_sed_lines # Line after last line for current file.
27457   ac_more_lines=:
27458   ac_sed_cmds=
27459   while $ac_more_lines; do
27460     if test $ac_beg -gt 1; then
27461       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27462     else
27463       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27464     fi
27465     if test ! -s $tmp/subs.frag; then
27466       ac_more_lines=false
27467     else
27468       # The purpose of the label and of the branching condition is to
27469       # speed up the sed processing (if there are no `@' at all, there
27470       # is no need to browse any of the substitutions).
27471       # These are the two extra sed commands mentioned above.
27472       (echo ':t
27473   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27474       # It is possible to make a multiline substitution using escaped newlines.
27475       # Ensure that we do not split the substitution between script fragments.
27476       ac_BEG=$ac_end
27477       ac_END=`expr $ac_end + $ac_max_sed_lines`
27478       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
27479       if test -s $tmp/subs.next; then
27480         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
27481         if test ! -s $tmp/subs.edit; then
27482           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
27483           if test ! -s $tmp/subs.edit; then
27484             if test $ac_beg -gt 1; then
27485               ac_end=`expr $ac_end - 1`
27486               continue
27487             fi
27488           fi
27489         fi
27490       fi
27491
27492       if test -z "$ac_sed_cmds"; then
27493         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27494       else
27495         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27496       fi
27497       ac_sed_frag=`expr $ac_sed_frag + 1`
27498       ac_beg=$ac_end
27499       ac_end=`expr $ac_end + $ac_max_sed_lines`
27500     fi
27501   done
27502   if test -z "$ac_sed_cmds"; then
27503     ac_sed_cmds=cat
27504   fi
27505 fi # test -n "$CONFIG_FILES"
27506
27507 EOF
27508 cat >>$CONFIG_STATUS <<\EOF
27509 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27510   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27511   case $ac_file in
27512   - | *:- | *:-:* ) # input from stdin
27513         cat >$tmp/stdin
27514         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27515         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27516   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27517         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27518   * )   ac_file_in=$ac_file.in ;;
27519   esac
27520
27521   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27522   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27523          X"$ac_file" : 'X\(//\)[^/]' \| \
27524          X"$ac_file" : 'X\(//\)$' \| \
27525          X"$ac_file" : 'X\(/\)' \| \
27526          .     : '\(.\)' 2>/dev/null ||
27527 echo X"$ac_file" |
27528     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27529           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27530           /^X\(\/\/\)$/{ s//\1/; q; }
27531           /^X\(\/\).*/{ s//\1/; q; }
27532           s/.*/./; q'`
27533   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27534     { case "$ac_dir" in
27535   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27536   *)                      as_incr_dir=.;;
27537 esac
27538 as_dummy="$ac_dir"
27539 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27540   case $as_mkdir_dir in
27541     # Skip DOS drivespec
27542     ?:) as_incr_dir=$as_mkdir_dir ;;
27543     *)
27544       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27545       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27546     ;;
27547   esac
27548 done; }
27549
27550     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27551     # A "../" for each directory in $ac_dir_suffix.
27552     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27553   else
27554     ac_dir_suffix= ac_dots=
27555   fi
27556
27557   case $srcdir in
27558   .)  ac_srcdir=.
27559       if test -z "$ac_dots"; then
27560          ac_top_srcdir=.
27561       else
27562          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27563       fi ;;
27564   [\\/]* | ?:[\\/]* )
27565       ac_srcdir=$srcdir$ac_dir_suffix;
27566       ac_top_srcdir=$srcdir ;;
27567   *) # Relative path.
27568     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27569     ac_top_srcdir=$ac_dots$srcdir ;;
27570   esac
27571
27572   case $INSTALL in
27573   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27574   *) ac_INSTALL=$ac_dots$INSTALL ;;
27575   esac
27576
27577   if test x"$ac_file" != x-; then
27578     { echo "$as_me:27578: creating $ac_file" >&5
27579 echo "$as_me: creating $ac_file" >&6;}
27580     rm -f "$ac_file"
27581   fi
27582   # Let's still pretend it is `configure' which instantiates (i.e., don't
27583   # use $as_me), people would be surprised to read:
27584   #    /* config.h.  Generated automatically by config.status.  */
27585   configure_input="Generated automatically from `echo $ac_file_in |
27586                                                  sed 's,.*/,,'` by configure."
27587
27588   # First look for the input files in the build tree, otherwise in the
27589   # src tree.
27590   ac_file_inputs=`IFS=:
27591     for f in $ac_file_in; do
27592       case $f in
27593       -) echo $tmp/stdin ;;
27594       [\\/$]*)
27595          # Absolute (can't be DOS-style, as IFS=:)
27596          test -f "$f" || { { echo "$as_me:27596: error: cannot find input file: $f" >&5
27597 echo "$as_me: error: cannot find input file: $f" >&2;}
27598    { (exit 1); exit 1; }; }
27599          echo $f;;
27600       *) # Relative
27601          if test -f "$f"; then
27602            # Build tree
27603            echo $f
27604          elif test -f "$srcdir/$f"; then
27605            # Source tree
27606            echo $srcdir/$f
27607          else
27608            # /dev/null tree
27609            { { echo "$as_me:27609: error: cannot find input file: $f" >&5
27610 echo "$as_me: error: cannot find input file: $f" >&2;}
27611    { (exit 1); exit 1; }; }
27612          fi;;
27613       esac
27614     done` || { (exit 1); exit 1; }
27615 EOF
27616 cat >>$CONFIG_STATUS <<\EOF
27617   ac_warn_datarootdir=no
27618   if test x"$ac_file" != x-; then
27619     for ac_item in $ac_file_inputs
27620     do
27621       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27622       if test -n "$ac_seen"; then
27623         ac_used=`grep '@datarootdir@' $ac_item`
27624         if test -z "$ac_used"; then
27625           { echo "$as_me:27625: WARNING: datarootdir was used implicitly but not set:
27626 $ac_seen" >&5
27627 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27628 $ac_seen" >&2;}
27629           ac_warn_datarootdir=yes
27630         fi
27631       fi
27632       ac_seen=`grep '${datarootdir}' $ac_item`
27633       if test -n "$ac_seen"; then
27634         { echo "$as_me:27634: WARNING: datarootdir was used explicitly but not set:
27635 $ac_seen" >&5
27636 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27637 $ac_seen" >&2;}
27638         ac_warn_datarootdir=yes
27639       fi
27640     done
27641   fi
27642
27643 if test "x$ac_warn_datarootdir" = xyes; then
27644   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27645 fi
27646
27647 EOF
27648 cat >>$CONFIG_STATUS <<EOF
27649   sed "$ac_vpsub
27650 $extrasub
27651 EOF
27652 cat >>$CONFIG_STATUS <<\EOF
27653 :t
27654 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27655 s,@configure_input@,$configure_input,;t t
27656 s,@srcdir@,$ac_srcdir,;t t
27657 s,@top_srcdir@,$ac_top_srcdir,;t t
27658 s,@INSTALL@,$ac_INSTALL,;t t
27659 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27660   rm -f $tmp/stdin
27661   if test x"$ac_file" != x-; then
27662     cp $tmp/out $ac_file
27663
27664     for ac_name in prefix exec_prefix datarootdir
27665     do
27666         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27667         if test -n "$ac_seen"; then
27668             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27669             if test -z "$ac_init"; then
27670               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27671               { echo "$as_me:27671: WARNING: Variable $ac_name is used but was not set:
27672 $ac_seen" >&5
27673 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27674 $ac_seen" >&2;}
27675             fi
27676         fi
27677     done
27678     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27679     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27680     if test -s $tmp/out; then
27681       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27682       { echo "$as_me:27682: WARNING: Some variables may not be substituted:
27683 $ac_seen" >&5
27684 echo "$as_me: WARNING: Some variables may not be substituted:
27685 $ac_seen" >&2;}
27686     fi
27687   else
27688     cat $tmp/out
27689   fi
27690   rm -f $tmp/out
27691
27692 done
27693 EOF
27694 cat >>$CONFIG_STATUS <<\EOF
27695
27696 #
27697 # CONFIG_HEADER section.
27698 #
27699
27700 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27701 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27702 #
27703 # ac_d sets the value in "#define NAME VALUE" lines.
27704 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27705 ac_dB='[        ].*$,\1#\2'
27706 ac_dC=' '
27707 ac_dD=',;t'
27708 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27709 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27710 ac_iB='\([      ]\),\1#\2define\3'
27711 ac_iC=' '
27712 ac_iD='\4,;t'
27713 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27714 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27715 ac_uB='$,\1#\2define\3'
27716 ac_uC=' '
27717 ac_uD=',;t'
27718
27719 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27720   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27721   case $ac_file in
27722   - | *:- | *:-:* ) # input from stdin
27723         cat >$tmp/stdin
27724         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27725         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27726   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27727         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27728   * )   ac_file_in=$ac_file.in ;;
27729   esac
27730
27731   test x"$ac_file" != x- && { echo "$as_me:27731: creating $ac_file" >&5
27732 echo "$as_me: creating $ac_file" >&6;}
27733
27734   # First look for the input files in the build tree, otherwise in the
27735   # src tree.
27736   ac_file_inputs=`IFS=:
27737     for f in $ac_file_in; do
27738       case $f in
27739       -) echo $tmp/stdin ;;
27740       [\\/$]*)
27741          # Absolute (can't be DOS-style, as IFS=:)
27742          test -f "$f" || { { echo "$as_me:27742: error: cannot find input file: $f" >&5
27743 echo "$as_me: error: cannot find input file: $f" >&2;}
27744    { (exit 1); exit 1; }; }
27745          echo $f;;
27746       *) # Relative
27747          if test -f "$f"; then
27748            # Build tree
27749            echo $f
27750          elif test -f "$srcdir/$f"; then
27751            # Source tree
27752            echo $srcdir/$f
27753          else
27754            # /dev/null tree
27755            { { echo "$as_me:27755: error: cannot find input file: $f" >&5
27756 echo "$as_me: error: cannot find input file: $f" >&2;}
27757    { (exit 1); exit 1; }; }
27758          fi;;
27759       esac
27760     done` || { (exit 1); exit 1; }
27761   # Remove the trailing spaces.
27762   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27763
27764 EOF
27765
27766 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27767 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27768 # be either 'cat' or 'sort'.
27769 cat confdefs.h | uniq >conftest.vals
27770
27771 # Break up conftest.vals because some shells have a limit on
27772 # the size of here documents, and old seds have small limits too.
27773
27774 rm -f conftest.tail
27775 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27776 while grep . conftest.vals >/dev/null
27777 do
27778   # Write chunks of a limited-size here document to conftest.frag.
27779   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27780   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27781   echo 'CEOF' >> $CONFIG_STATUS
27782   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27783   rm -f conftest.vals
27784   mv conftest.tail conftest.vals
27785 done
27786 rm -f conftest.vals
27787
27788 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27789 # marker @DEFS@.
27790 echo '  cat >> conftest.edit <<CEOF
27791 /@DEFS@/r conftest.frag
27792 /@DEFS@/d
27793 CEOF
27794 sed -f conftest.edit $tmp/in > $tmp/out
27795 rm -f $tmp/in
27796 mv $tmp/out $tmp/in
27797 rm -f conftest.edit conftest.frag
27798 ' >> $CONFIG_STATUS
27799
27800 cat >>$CONFIG_STATUS <<\EOF
27801   # Let's still pretend it is `configure' which instantiates (i.e., don't
27802   # use $as_me), people would be surprised to read:
27803   #    /* config.h.  Generated automatically by config.status.  */
27804   if test x"$ac_file" = x-; then
27805     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27806   else
27807     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27808   fi
27809   cat $tmp/in >>$tmp/config.h
27810   rm -f $tmp/in
27811   if test x"$ac_file" != x-; then
27812     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27813       { echo "$as_me:27813: $ac_file is unchanged" >&5
27814 echo "$as_me: $ac_file is unchanged" >&6;}
27815     else
27816       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27817          X"$ac_file" : 'X\(//\)[^/]' \| \
27818          X"$ac_file" : 'X\(//\)$' \| \
27819          X"$ac_file" : 'X\(/\)' \| \
27820          .     : '\(.\)' 2>/dev/null ||
27821 echo X"$ac_file" |
27822     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27823           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27824           /^X\(\/\/\)$/{ s//\1/; q; }
27825           /^X\(\/\).*/{ s//\1/; q; }
27826           s/.*/./; q'`
27827       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27828         { case "$ac_dir" in
27829   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27830   *)                      as_incr_dir=.;;
27831 esac
27832 as_dummy="$ac_dir"
27833 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27834   case $as_mkdir_dir in
27835     # Skip DOS drivespec
27836     ?:) as_incr_dir=$as_mkdir_dir ;;
27837     *)
27838       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27839       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27840     ;;
27841   esac
27842 done; }
27843
27844       fi
27845       rm -f $ac_file
27846       mv $tmp/config.h $ac_file
27847     fi
27848   else
27849     cat $tmp/config.h
27850     rm -f $tmp/config.h
27851   fi
27852 done
27853 EOF
27854 cat >>$CONFIG_STATUS <<\EOF
27855 #
27856 # CONFIG_COMMANDS section.
27857 #
27858 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27859   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27860   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27861
27862   case $ac_dest in
27863     default )
27864 if test "x$cf_with_tests" != xno ; then
27865
27866 for cf_dir in test
27867 do
27868         if test ! -d $srcdir/$cf_dir; then
27869                 continue
27870         elif test -f $srcdir/$cf_dir/programs; then
27871                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27872         fi
27873 done
27874
27875 fi
27876
27877 cf_prefix=$LIB_PREFIX
27878
27879 case $cf_cv_shlib_version in
27880 (cygdll|msysdll|mingw|msvcdll)
27881         TINFO_NAME=$TINFO_ARG_SUFFIX
27882         TINFO_SUFFIX=.dll
27883         ;;
27884 esac
27885
27886 if test -n "$TINFO_SUFFIX" ; then
27887         case $TINFO_SUFFIX in
27888         (tw*)
27889                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27890                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27891                 ;;
27892         (t*)
27893                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27894                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27895                 ;;
27896         (w*)
27897                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27898                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
27899                 ;;
27900         esac
27901 fi
27902
27903 for cf_dir in $SRC_SUBDIRS
27904 do
27905         if test ! -d $srcdir/$cf_dir ; then
27906                 continue
27907         elif test -f $srcdir/$cf_dir/modules; then
27908
27909                 SHARED_LIB=
27910                 Libs_To_Make=
27911                 cf_awk_program=
27912                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
27913                 then
27914                         cf_awk_program="$cf_awk_program\
27915 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
27916 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
27917 "
27918                 fi
27919
27920                 if test "x$WILDCARD_SYMS" = xno
27921                 then
27922                         cf_awk_program="$cf_awk_program\
27923 /[      ]_\\*;/ { skip=1; next; }\
27924 "
27925                 fi
27926
27927                 if test "x$cf_awk_program" != "x"
27928                 then
27929                         cat >>$cf_dir/Makefile <<CF_EOF
27930
27931 # Generated by CF_LIB_RULES
27932 resulting.map: $UNALTERED_SYMS
27933         $AWK 'BEGIN { skip = 1; last=""; } \
27934 $cf_awk_program \
27935 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
27936  skip = 0; last = \$\$0; } \
27937 END { print last; }' < $UNALTERED_SYMS >\$@
27938
27939 distclean::
27940         rm -f resulting.map
27941 CF_EOF
27942                 fi
27943
27944                 for cf_item in $cf_LIST_MODELS
27945                 do
27946
27947         case X$cf_item in
27948         (Xlibtool)
27949                 cf_suffix='.la'
27950                 cf_depsuf=$cf_suffix
27951                 ;;
27952         (Xdebug)
27953                 case $cf_cv_system_name in
27954                 (*-msvc*)
27955                         cf_suffix='_g.lib'
27956                         ;;
27957                 (*)
27958                         cf_suffix='_g.a'
27959                         ;;
27960                 esac
27961                 cf_depsuf=$cf_suffix
27962                 ;;
27963         (Xprofile)
27964                 case $cf_cv_system_name in
27965                 (*-msvc*)
27966                         cf_suffix='_p.lib'
27967                         ;;
27968                 (*)
27969                         cf_suffix='_p.a'
27970                         ;;
27971                 esac
27972                 cf_depsuf=$cf_suffix
27973                 ;;
27974         (Xshared)
27975                 case $cf_cv_system_name in
27976                 (aix[5-7]*)
27977                         cf_suffix='.so'
27978                         cf_depsuf=$cf_suffix
27979                         ;;
27980                 (*-msvc*)
27981                         cf_suffix='.dll'
27982                         cf_depsuf='.dll.lib'
27983                         ;;
27984                 (cygwin*|msys*|mingw*)
27985                         cf_suffix='.dll'
27986                         cf_depsuf='.dll.a'
27987                         ;;
27988                 (darwin*)
27989                         cf_suffix='.dylib'
27990                         cf_depsuf=$cf_suffix
27991                         ;;
27992                 (hpux*)
27993                         case $target in
27994                         (ia64*)
27995                                 cf_suffix='.so'
27996                                 cf_depsuf=$cf_suffix
27997                                 ;;
27998                         (*)
27999                                 cf_suffix='.sl'
28000                                 cf_depsuf=$cf_suffix
28001                                 ;;
28002                         esac
28003                         ;;
28004                 (*)
28005                         cf_suffix='.so'
28006                         cf_depsuf=$cf_suffix
28007                         ;;
28008                 esac
28009                 ;;
28010         (*)
28011                 case $target in
28012                 (*-msvc*)
28013                         cf_suffix='.lib'
28014                         ;;
28015                 (*)
28016                         cf_suffix='.a'
28017                         ;;
28018                 esac
28019                 cf_depsuf=$cf_suffix
28020                 ;;
28021         esac
28022         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28023         then
28024                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28025                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28026         fi
28027
28028                         if test "$cf_dir" = "c++"
28029                         then
28030
28031 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28032
28033 eval cf_libname=\$${cf_map_lib_basename}_NAME
28034
28035                         else
28036
28037 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28038
28039 eval cf_libname=\$${cf_map_lib_basename}_NAME
28040
28041                         fi
28042                         test -z "$cf_libname" && cf_libname="$cf_dir"
28043                         if test $cf_item = shared ; then
28044                                 if test -n "${LIB_SUFFIX}"
28045                                 then
28046                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28047                                 else
28048                                         cf_shared_suffix="$cf_suffix"
28049                                 fi
28050                                 if test "$cf_cv_do_symlinks" = yes ; then
28051                                         cf_version_name=
28052
28053                                         case "$cf_cv_shlib_version" in
28054                                         (rel)
28055                                                 cf_version_name=REL_VERSION
28056                                                 ;;
28057                                         (abi)
28058                                                 cf_version_name=ABI_VERSION
28059                                                 ;;
28060                                         esac
28061
28062                                         if test -n "$cf_version_name"
28063                                         then
28064                                                 case "$cf_cv_system_name" in
28065                                                 (darwin*)
28066                                                         # "w", etc?
28067                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
28068                                                         ;;
28069                                                 (*)
28070                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
28071                                                         ;;
28072                                                 esac
28073                                         fi
28074                                         if test -n "${USE_LIB_SUFFIX}"
28075                                         then
28076                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28077                                         else
28078                                                 cf_shared_suffix="$cf_suffix"
28079                                         fi
28080                                 fi
28081                                 # cygwin needs import library, and has unique naming convention
28082                                 # use autodetected ${cf_prefix} for import lib and static lib, but
28083                                 # use 'cyg' prefix for shared lib.
28084                                 case $cf_cv_shlib_version in
28085                                 (cygdll)
28086                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28087                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
28088                                         ;;
28089                                 (msysdll)
28090                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28091                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
28092                                         ;;
28093                                 (mingw)
28094                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28095                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
28096                                         ;;
28097                                 (msvcdll)
28098                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28099                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
28100                                         ;;
28101                                 (*)
28102                                         cf_add_lib=
28103                                         ;;
28104                                 esac
28105                                 if test -n "$cf_add_lib"
28106                                 then
28107                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28108                                         continue
28109                                 fi
28110                         fi
28111                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
28112                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28113                 done
28114
28115                 if test $cf_dir = ncurses ; then
28116                         cf_subsets="$LIB_SUBSETS"
28117                         cf_r_parts="$cf_subsets"
28118                         cf_liblist="$Libs_To_Make"
28119
28120                         while test -n "$cf_r_parts"
28121                         do
28122                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
28123                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
28124                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
28125                                         cf_add_lib=
28126                                         case $cf_l_parts in
28127                                         (*termlib*)
28128                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
28129                                                 ;;
28130                                         (*ticlib*)
28131                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
28132                                                 ;;
28133                                         (*)
28134                                                 break
28135                                                 ;;
28136                                         esac
28137                                         if test -n "$cf_add_lib"; then
28138                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
28139                                         fi
28140                                 else
28141                                         break
28142                                 fi
28143                         done
28144                 else
28145                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
28146                 fi
28147
28148                 if test $cf_dir = c++; then
28149                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
28150                                 cf_list=
28151                                 for cf_item in $Libs_To_Make
28152                                 do
28153                                         case $cf_item in
28154                                         (*.a)
28155                                                 ;;
28156                                         (*)
28157                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
28158                                                 ;;
28159                                         esac
28160                                         for cf_test in $cf_list
28161                                         do
28162                                                 if test "$cf_test" = "$cf_item"
28163                                                 then
28164                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
28165                                                         cf_item=
28166                                                         break
28167                                                 fi
28168                                         done
28169                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
28170                                 done
28171                                 Libs_To_Make="$cf_list"
28172                         fi
28173                 fi
28174
28175                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
28176                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
28177                         $cf_dir/Makefile >$cf_dir/Makefile.out
28178                 mv $cf_dir/Makefile.out $cf_dir/Makefile
28179
28180                 $AWK -f $srcdir/mk-0th.awk \
28181                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
28182                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28183
28184                 for cf_subset in $cf_subsets
28185                 do
28186                         cf_subdirs=
28187                         for cf_item in $cf_LIST_MODELS
28188                         do
28189
28190                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
28191
28192 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28193
28194                         CXX_MODEL=$cf_ITEM
28195                         if test "$CXX_MODEL" = SHARED; then
28196                                 case $cf_cv_shlib_version in
28197                                 (cygdll|msysdll|mingw|msvcdll)
28198                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
28199
28200 echo "${as_me:-configure}:28200: testing overriding CXX_MODEL to SHARED ..." 1>&5
28201
28202                                         with_shared_cxx=yes
28203                                         ;;
28204                                 (*)
28205                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
28206                                         ;;
28207                                 esac
28208                         fi
28209
28210         case X$cf_item in
28211         (Xlibtool)
28212                 cf_suffix='.la'
28213                 cf_depsuf=$cf_suffix
28214                 ;;
28215         (Xdebug)
28216                 case $cf_cv_system_name in
28217                 (*-msvc*)
28218                         cf_suffix='_g.lib'
28219                         ;;
28220                 (*)
28221                         cf_suffix='_g.a'
28222                         ;;
28223                 esac
28224                 cf_depsuf=$cf_suffix
28225                 ;;
28226         (Xprofile)
28227                 case $cf_cv_system_name in
28228                 (*-msvc*)
28229                         cf_suffix='_p.lib'
28230                         ;;
28231                 (*)
28232                         cf_suffix='_p.a'
28233                         ;;
28234                 esac
28235                 cf_depsuf=$cf_suffix
28236                 ;;
28237         (Xshared)
28238                 case $cf_cv_system_name in
28239                 (aix[5-7]*)
28240                         cf_suffix='.so'
28241                         cf_depsuf=$cf_suffix
28242                         ;;
28243                 (*-msvc*)
28244                         cf_suffix='.dll'
28245                         cf_depsuf='.dll.lib'
28246                         ;;
28247                 (cygwin*|msys*|mingw*)
28248                         cf_suffix='.dll'
28249                         cf_depsuf='.dll.a'
28250                         ;;
28251                 (darwin*)
28252                         cf_suffix='.dylib'
28253                         cf_depsuf=$cf_suffix
28254                         ;;
28255                 (hpux*)
28256                         case $target in
28257                         (ia64*)
28258                                 cf_suffix='.so'
28259                                 cf_depsuf=$cf_suffix
28260                                 ;;
28261                         (*)
28262                                 cf_suffix='.sl'
28263                                 cf_depsuf=$cf_suffix
28264                                 ;;
28265                         esac
28266                         ;;
28267                 (*)
28268                         cf_suffix='.so'
28269                         cf_depsuf=$cf_suffix
28270                         ;;
28271                 esac
28272                 ;;
28273         (*)
28274                 case $target in
28275                 (*-msvc*)
28276                         cf_suffix='.lib'
28277                         ;;
28278                 (*)
28279                         cf_suffix='.a'
28280                         ;;
28281                 esac
28282                 cf_depsuf=$cf_suffix
28283                 ;;
28284         esac
28285         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28286         then
28287                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28288                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28289         fi
28290
28291         case $cf_item in
28292         (libtool) cf_subdir='obj_lo'  ;;
28293         (normal)  cf_subdir='objects' ;;
28294         (debug)   cf_subdir='obj_g' ;;
28295         (profile) cf_subdir='obj_p' ;;
28296         (shared)
28297                 case $cf_cv_system_name in
28298                 (cygwin|msys)
28299                         cf_subdir='objects' ;;
28300                 (*)
28301                         cf_subdir='obj_s' ;;
28302                 esac
28303         esac
28304
28305                         # Test for case where we build libtinfo with a different name.
28306                         cf_libname=$cf_dir
28307                         if test $cf_dir = ncurses ; then
28308                                 case $cf_subset in
28309                                 (*base*)
28310                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
28311                                         ;;
28312                                 (*termlib*)
28313                                         cf_libname=$TINFO_LIB_SUFFIX
28314                                         ;;
28315                                 (ticlib*)
28316                                         cf_libname=$TICS_LIB_SUFFIX
28317                                         ;;
28318                                 esac
28319                         elif test $cf_dir = c++ ; then
28320
28321 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28322
28323 eval cf_libname=\$${cf_map_lib_basename}_NAME
28324
28325                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28326                         else
28327
28328 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28329
28330 eval cf_libname=\$${cf_map_lib_basename}_NAME
28331
28332                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28333                         fi
28334                         if test -n "${USE_ARG_SUFFIX}" ; then
28335                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
28336                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
28337                         fi
28338
28339                         # These dependencies really are for development, not
28340                         # builds, but they are useful in porting, too.
28341                         cf_depend="../include/ncurses_cfg.h"
28342                         if test "$srcdir" = "."; then
28343                                 cf_reldir="."
28344                         else
28345                                 cf_reldir="\${srcdir}"
28346                         fi
28347
28348                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
28349                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
28350                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
28351                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
28352                         fi
28353
28354                         cf_dir_suffix=
28355                         old_cf_suffix="$cf_suffix"
28356                         if test "$cf_cv_shlib_version_infix" = yes ; then
28357                         if test -n "$USE_LIB_SUFFIX" ; then
28358                                 case $USE_LIB_SUFFIX in
28359                                 (tw*)
28360                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
28361                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
28362                                         cf_dir_suffix=tw$EXTRA_SUFFIX
28363                                         ;;
28364                                 (t*)
28365                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
28366                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
28367                                         cf_dir_suffix=t$EXTRA_SUFFIX
28368                                         ;;
28369                                 (w*)
28370                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
28371                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
28372                                         cf_dir_suffix=w$EXTRA_SUFFIX
28373                                         ;;
28374                                 (*)
28375                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
28376                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
28377                                         cf_dir_suffix=$EXTRA_SUFFIX
28378                                         ;;
28379                                 esac
28380                         fi
28381                         fi
28382
28383                         $AWK -f $srcdir/mk-1st.awk \
28384                                 name=${cf_libname}${cf_dir_suffix} \
28385                                 traces=$LIB_TRACING \
28386                                 MODEL=$cf_ITEM \
28387                                 CXX_MODEL=$CXX_MODEL \
28388                                 model=$cf_subdir \
28389                                 prefix=$cf_prefix \
28390                                 suffix=$cf_suffix \
28391                                 subset=$cf_subset \
28392                                 driver=$cf_cv_term_driver \
28393                                 SymLink="$LN_S" \
28394                                 TermlibRoot=$TINFO_NAME \
28395                                 TermlibSuffix=$TINFO_SUFFIX \
28396                                 ShlibVer=$cf_cv_shlib_version \
28397                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
28398                                 ReLink=${cf_cv_do_relink:-no} \
28399                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
28400                                 DoLinks=$cf_cv_do_symlinks \
28401                                 rmSoLocs=$cf_cv_rm_so_locs \
28402                                 ldconfig="$LDCONFIG" \
28403                                 overwrite=$WITH_OVERWRITE \
28404                                 depend="$cf_depend" \
28405                                 host="$host" \
28406                                 libtool_version="$LIBTOOL_VERSION" \
28407                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28408
28409                         cf_suffix="$old_cf_suffix"
28410
28411                         for cf_subdir2 in $cf_subdirs lib
28412                         do
28413                                 test $cf_subdir = $cf_subdir2 && break
28414                         done
28415                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
28416                         $AWK -f $srcdir/mk-2nd.awk \
28417                                 name=$cf_dir \
28418                                 traces=$LIB_TRACING \
28419                                 MODEL=$cf_ITEM \
28420                                 model=$cf_subdir \
28421                                 subset=$cf_subset \
28422                                 srcdir=$srcdir \
28423                                 echo=$WITH_ECHO \
28424                                 crenames=$cf_cv_prog_CC_c_o \
28425                                 cxxrenames=$cf_cv_prog_CXX_c_o \
28426                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28427                         cf_subdirs="$cf_subdirs $cf_subdir"
28428                         done
28429                 done
28430         fi
28431
28432         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
28433 done
28434
28435 for cf_dir in $SRC_SUBDIRS
28436 do
28437         if test ! -d $srcdir/$cf_dir ; then
28438                 continue
28439         fi
28440
28441         if test -f $cf_dir/Makefile ; then
28442                 case "$cf_dir" in
28443                 (Ada95)
28444                         echo 'libs \' >> Makefile
28445                         echo 'install.libs \' >> Makefile
28446                         echo 'uninstall.libs ::' >> Makefile
28447                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
28448                         ;;
28449                 esac
28450         fi
28451
28452         if test -f $srcdir/$cf_dir/modules; then
28453                 echo >> Makefile
28454                 if test -f $srcdir/$cf_dir/headers; then
28455 cat >> Makefile <<CF_EOF
28456 install.includes \\
28457 uninstall.includes \\
28458 CF_EOF
28459                 fi
28460 if test "$cf_dir" != "c++" ; then
28461 echo 'lint \' >> Makefile
28462 fi
28463 cat >> Makefile <<CF_EOF
28464 libs \\
28465 lintlib \\
28466 install.libs \\
28467 uninstall.libs \\
28468 install.$cf_dir \\
28469 uninstall.$cf_dir ::
28470         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28471 CF_EOF
28472         elif test -f $srcdir/$cf_dir/headers; then
28473 cat >> Makefile <<CF_EOF
28474
28475 libs \\
28476 install.libs \\
28477 uninstall.libs \\
28478 install.includes \\
28479 uninstall.includes ::
28480         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28481 CF_EOF
28482 fi
28483 done
28484
28485 if test "x$cf_with_db_install" = xyes; then
28486 cat >> Makefile <<CF_EOF
28487
28488 install.libs uninstall.libs \\
28489 install.data uninstall.data ::
28490 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28491 CF_EOF
28492 else
28493 cat >> Makefile <<CF_EOF
28494
28495 install.libs uninstall.libs ::
28496         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28497 CF_EOF
28498 fi
28499
28500 if test "x$cf_with_manpages" = xyes; then
28501 cat >> Makefile <<CF_EOF
28502
28503 install.man \\
28504 uninstall.man ::
28505         cd man && \${MAKE} \${TOP_MFLAGS} \$@
28506 CF_EOF
28507 fi
28508
28509 cat >> Makefile <<CF_EOF
28510
28511 distclean ::
28512         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
28513         rm -f headers.sh headers.sed mk_shared_lib.sh
28514         rm -f edit_man.* man_alias.*
28515         rm -rf \${DIRS_TO_MAKE}
28516 CF_EOF
28517
28518 # Special case: tack's manpage lives in its own directory.
28519 if test "x$cf_with_manpages" = xyes; then
28520 if test "x$cf_with_tack" = "xyes"; then
28521 cat >> Makefile <<CF_EOF
28522
28523 install.man \\
28524 uninstall.man ::
28525         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
28526 CF_EOF
28527 fi
28528 fi
28529
28530 rm -f headers.sed headers.sh
28531
28532 echo creating headers.sh
28533 cat >headers.sh <<CF_EOF
28534 #! $SHELL
28535 # This shell script is generated by the 'configure' script.  It is invoked in a
28536 # subdirectory of the build tree.  It generates a sed-script in the parent
28537 # directory that is used to adjust includes for header files that reside in a
28538 # subdirectory of /usr/include, etc.
28539 PRG=""
28540 while test \$# != 3
28541 do
28542 PRG="\$PRG \$1"; shift
28543 done
28544 DST=\$1
28545 REF=\$2
28546 SRC=\$3
28547 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
28548 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
28549 echo installing \$SRC in \$DST
28550 CF_EOF
28551
28552 if test $WITH_CURSES_H = yes; then
28553         cat >>headers.sh <<CF_EOF
28554 case \$DST in
28555 (/*/include/*)
28556         END=\`basename \$DST\`
28557         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28558         do
28559                 NAME=\`basename \$i\`
28560                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28561         done
28562         ;;
28563 (*)
28564         echo "" >> \$TMPSED
28565         ;;
28566 esac
28567 CF_EOF
28568
28569 else
28570         cat >>headers.sh <<CF_EOF
28571 case \$DST in
28572 (/*/include/*)
28573         END=\`basename \$DST\`
28574         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28575         do
28576                 NAME=\`basename \$i\`
28577                 if test "\$NAME" = "curses.h"
28578                 then
28579                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28580                         NAME=ncurses.h
28581                 fi
28582                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28583         done
28584         ;;
28585 (*)
28586         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28587         ;;
28588 esac
28589 CF_EOF
28590 fi
28591 cat >>headers.sh <<CF_EOF
28592 rm -f \$TMPSRC
28593 sed -f \$TMPSED \$SRC > \$TMPSRC
28594 NAME=\`basename \$SRC\`
28595 CF_EOF
28596 if test $WITH_CURSES_H != yes; then
28597         cat >>headers.sh <<CF_EOF
28598 test "\$NAME" = "curses.h" && NAME=ncurses.h
28599 CF_EOF
28600 fi
28601 cat >>headers.sh <<CF_EOF
28602 # Just in case someone gzip'd manpages, remove the conflicting copy.
28603 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
28604
28605 eval \$PRG \$TMPSRC \$DST/\$NAME
28606 rm -f \$TMPSRC \$TMPSED
28607 CF_EOF
28608
28609 chmod 0755 headers.sh
28610
28611 for cf_dir in $SRC_SUBDIRS
28612 do
28613         if test ! -d $srcdir/$cf_dir ; then
28614                 continue
28615         fi
28616
28617         if test -f $srcdir/$cf_dir/headers; then
28618                 $AWK -f $srcdir/mk-hdr.awk \
28619                         subset="$LIB_SUBSETS" \
28620                         compat="$WITH_CURSES_H" \
28621                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28622         fi
28623
28624         if test -f $srcdir/$cf_dir/modules; then
28625                 if test "$cf_dir" != "c++" ; then
28626                         cat >>$cf_dir/Makefile <<"CF_EOF"
28627 depend : ${AUTO_SRC}
28628         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28629
28630 # DO NOT DELETE THIS LINE -- make depend depends on it.
28631 CF_EOF
28632                 fi
28633         fi
28634 done
28635
28636 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28637 if test -z "$USE_OLD_MAKERULES" ; then
28638         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28639 fi
28640 fi
28641  ;;
28642   esac
28643 done
28644 EOF
28645
28646 cat >>$CONFIG_STATUS <<\EOF
28647
28648 { (exit 0); exit 0; }
28649 EOF
28650 chmod +x $CONFIG_STATUS
28651 ac_clean_files=$ac_clean_files_save
28652
28653 # configure is writing to config.log, and then calls config.status.
28654 # config.status does its own redirection, appending to config.log.
28655 # Unfortunately, on DOS this fails, as config.log is still kept open
28656 # by configure, so config.status won't be able to write to it; its
28657 # output is simply discarded.  So we exec the FD to /dev/null,
28658 # effectively closing config.log, so it can be properly (re)opened and
28659 # appended to by config.status.  When coming back to configure, we
28660 # need to make the FD available again.
28661 if test "$no_create" != yes; then
28662   ac_cs_success=:
28663   exec 5>/dev/null
28664   $SHELL $CONFIG_STATUS || ac_cs_success=false
28665   exec 5>>config.log
28666   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28667   # would make configure fail if this is the last instruction.
28668   $ac_cs_success || { (exit 1); exit 1; }
28669 fi
28670 ${MAKE:-make} preinstall