]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.3 - patch 20211026
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.736 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
5 #
6 # Copyright 2003-2020,2021      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr=expr
38 else
39   as_expr=false
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s=ln
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --enable-symlinks       make tic use symbolic links not hard links
789   --enable-broken_linker  compile with broken-linker support code
790   --enable-bsdpad         recognize BSD-style prefix padding
791   --enable-widec          compile with wide-char/UTF-8 code
792   --disable-lp64          allow chtype to be long (ignore _LP64)
793   --disable-largefile     omit support for large files
794   --disable-tparm-varargs compile tparm() without varargs interface
795   --disable-tic-depends   link tic library without explicit dependency on ncurses library
796   --enable-wattr-macros   enable wattr* macros
797   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
798   --with-bool=TYPE        override fallback type of bool variable
799   --with-caps=alt         compile with alternate Caps file
800   --with-chtype=TYPE      override type of chtype
801   --with-ospeed=TYPE      override type of ospeed variable
802   --with-mmask-t=TYPE     override type of mmask_t
803   --with-ccharw-max=XXX   override size CCHARW_MAX
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --with-tparm-arg=TYPE   override parameter type of tparm
806   --with-rcs-ids          compile-in RCS identifiers
807 Options to Specify How Manpages are Installed:
808   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
809                           optionally formatted/catonly, e.g., gzip,formatted
810   --with-manpage-renames  specify manpage-renaming
811   --with-manpage-aliases  specify manpage-aliases using .so
812   --with-manpage-symlinks specify manpage-aliases using symlinks
813   --with-manpage-tbl      specify manpage processing with tbl
814 Extensions:
815   --disable-ext-funcs     disable function-extensions
816   --enable-sp-funcs       enable SCREEN-extensions
817   --enable-term-driver    enable terminal-driver
818   --enable-const          compile with extra/non-standard const
819   --enable-ext-colors     compile for 256-color support
820   --enable-ext-mouse      compile for extended mouse-encoding
821   --enable-ext-putwin     compile with extended putwin/screendump
822   --enable-no-padding     compile with $NCURSES_NO_PADDING code
823   --enable-sigwinch       compile with SIGWINCH handler
824   --enable-tcap-names     compile with user-definable terminal capabilities
825 Reentrant Code:
826   --with-pthread          use POSIX thread library
827   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
828   --enable-weak-symbols   enable weak-symbols for pthreads
829   --enable-reentrant      compile with reentrant code
830   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
831   --enable-opaque-form    make form-library structures "opaque"
832   --enable-opaque-menu    make menu-library structures "opaque"
833   --enable-opaque-panel   make panel-library structures "opaque"
834   --with-wrap-prefix=XXX  override prefix used for public variables
835 Development Code:
836   --without-develop       disable development options
837   --enable-hard-tabs      compile with hard-tabs code
838   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
839 Experimental Code:
840   --disable-assumed-color do not assume anything about default-colors
841   --disable-hashmap       compile without hashmap scrolling-optimization
842   --enable-colorfgbg      compile-in experimental $COLORFGBG code
843   --enable-fvisibility    compile with -fvisibility=hidden
844   --enable-interop        compile-in interop bindings
845   --enable-safe-sprintf   compile with experimental safe-sprintf code
846   --disable-scroll-hints  compile without scroll-hints code
847   --enable-wgetch-events  compile with wgetch-events code
848   --enable-exp-win32      compile with experimental-Windows driver
849 Testing/development Options:
850   --disable-echo          do not display "compiling" commands
851   --disable-stripping     do not strip (debug info) installed executables
852   --enable-warnings       test: turn on gcc compiler warnings
853   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
854   --enable-string-hacks   work around bogus compiler/loader warnings
855   --enable-assertions     test: turn on generation of assertion code
856   --with-dmalloc          test: use Gray Watson's dmalloc library
857   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
858   --with-valgrind         test: use valgrind
859   --disable-leaks         test: free permanent memory, analyze leaks
860   --enable-expanded       test: generate functions for certain macros
861   --disable-macros        test: use functions rather than macros
862   --with-trace            test: add trace() function to all models of ncurses
863   --disable-gnat-projects test: disable GNAT projects even if usable
864 Ada Binding Options:
865   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
866   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
867   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
868   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
869   --with-ada-libname=XXX  override default Ada library-name
870   --with-form-libname=XXX override form basename of library
871   --with-menu-libname=XXX override menu basename of library
872   --with-panel-libname=XXX override panel basename of library
873   --with-cxx-libname=XXX override ncurses++ basename of library
874
875 Some influential environment variables:
876   CC          C compiler command
877   CFLAGS      C compiler flags
878   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
879               nonstandard directory <lib dir>
880   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
881               headers in a nonstandard directory <include dir>
882   CPP         C preprocessor
883   CXX         C++ compiler command
884   CXXFLAGS    C++ compiler flags
885   CXXCPP      C++ preprocessor
886
887 Use these variables to override the choices made by `configure' or to help
888 it to find libraries and programs with nonstandard names/locations.
889
890 EOF
891 fi
892
893 if test "$ac_init_help" = "recursive"; then
894   # If there are subdirs, report their specific --help.
895   ac_popdir=`pwd`
896   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
897     cd "$ac_subdir"
898     # A "../" for each directory in /$ac_subdir.
899     ac_dots=`echo "$ac_subdir" |
900              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
901
902     case "$srcdir" in
903     .) # No --srcdir option.  We are building in place.
904       ac_sub_srcdir="$srcdir" ;;
905     [\\/]* | ?:[\\/]* ) # Absolute path.
906       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
907     *) # Relative path.
908       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
909     esac
910
911     # Check for guested configure; otherwise get Cygnus style configure.
912     if test -f "$ac_sub_srcdir/configure.gnu"; then
913       echo
914       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
915     elif test -f "$ac_sub_srcdir/configure"; then
916       echo
917       $SHELL "$ac_sub_srcdir/configure" --help=recursive
918     elif test -f "$ac_sub_srcdir/configure.ac" ||
919            test -f "$ac_sub_srcdir/configure.in"; then
920       echo
921       "$ac_configure" --help
922     else
923       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
924     fi
925     cd "$ac_popdir"
926   done
927 fi
928
929 test -n "$ac_init_help" && exit 0
930 if "$ac_init_version"; then
931   cat <<\EOF
932
933 Copyright 2003-2020,2021        Thomas E. Dickey
934 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
935 Free Software Foundation, Inc.
936 This configure script is free software; the Free Software Foundation
937 gives unlimited permission to copy, distribute and modify it.
938 EOF
939   exit 0
940 fi
941 exec 5>config.log
942 cat >&5 <<EOF
943 This file contains any messages produced by compilers while
944 running configure, to aid debugging if configure makes a mistake.
945
946 It was created by $as_me, which was
947 generated by GNU Autoconf 2.52.20210509.  Invocation command line was
948
949   $ $0 $@
950
951 EOF
952 {
953 cat <<_ASUNAME
954 ## ---------- ##
955 ## Platform.  ##
956 ## ---------- ##
957
958 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
959 uname -m = `(uname -m) 2>/dev/null || echo unknown`
960 uname -r = `(uname -r) 2>/dev/null || echo unknown`
961 uname -s = `(uname -s) 2>/dev/null || echo unknown`
962 uname -v = `(uname -v) 2>/dev/null || echo unknown`
963
964 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
965 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
966
967 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
968 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
969 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
970 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
971 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
972 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
973 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
974
975 PATH = $PATH
976
977 _ASUNAME
978 } >&5
979
980 cat >&5 <<EOF
981 ## ------------ ##
982 ## Core tests.  ##
983 ## ------------ ##
984
985 EOF
986
987 # Keep a trace of the command line.
988 # Strip out --no-create and --no-recursion so they do not pile up.
989 # Also quote any args containing shell meta-characters.
990 ac_configure_args=
991 ac_sep=
992 for ac_arg
993 do
994   case "$ac_arg" in
995   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
996   | --no-cr | --no-c) ;;
997   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
998   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
999   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1000     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1001     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1002     ac_sep=" " ;;
1003   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1004      ac_sep=" " ;;
1005   esac
1006   # Get rid of the leading space.
1007 done
1008
1009 # When interrupted or exit'd, cleanup temporary files, and complete
1010 # config.log.  We remove comments because anyway the quotes in there
1011 # would cause problems or look ugly.
1012 trap 'exit_status=$?
1013   # Save into config.log some information that might help in debugging.
1014   echo >&5
1015   echo "## ----------------- ##" >&5
1016   echo "## Cache variables.  ##" >&5
1017   echo "## ----------------- ##" >&5
1018   echo >&5
1019   # The following way of writing the cache mishandles newlines in values,
1020 {
1021   (set) 2>&1 |
1022     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1023     *ac_space=\ *)
1024       sed -n \
1025         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1026           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1027       ;;
1028     *)
1029       sed -n \
1030         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1031       ;;
1032     esac;
1033 } >&5
1034   sed "/^$/d" confdefs.h >conftest.log
1035   if test -s conftest.log; then
1036     echo >&5
1037     echo "## ------------ ##" >&5
1038     echo "## confdefs.h.  ##" >&5
1039     echo "## ------------ ##" >&5
1040     echo >&5
1041     cat conftest.log >&5
1042   fi
1043   (echo; echo) >&5
1044   test "$ac_signal" != 0 &&
1045     echo "$as_me: caught signal $ac_signal" >&5
1046   echo "$as_me: exit $exit_status" >&5
1047   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1048     exit $exit_status
1049      ' 0
1050 for ac_signal in 1 2 13 15; do
1051   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1052 done
1053 ac_signal=0
1054
1055 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1056 rm -rf conftest* confdefs.h
1057 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1058 echo >confdefs.h
1059
1060 # Let the site file select an alternate cache file if it wants to.
1061 # Prefer explicitly selected file to automatically selected ones.
1062 if test -z "$CONFIG_SITE"; then
1063   if test "x$prefix" != xNONE; then
1064     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1065   else
1066     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1067   fi
1068 fi
1069 for ac_site_file in $CONFIG_SITE; do
1070   if test -r "$ac_site_file"; then
1071     { echo "$as_me:1071: loading site script $ac_site_file" >&5
1072 echo "$as_me: loading site script $ac_site_file" >&6;}
1073     cat "$ac_site_file" >&5
1074     . "$ac_site_file"
1075   fi
1076 done
1077
1078 if test -r "$cache_file"; then
1079   # Some versions of bash will fail to source /dev/null (special
1080   # files actually), so we avoid doing that.
1081   if test -f "$cache_file"; then
1082     { echo "$as_me:1082: loading cache $cache_file" >&5
1083 echo "$as_me: loading cache $cache_file" >&6;}
1084     case $cache_file in
1085       [\\/]* | ?:[\\/]* ) . $cache_file;;
1086       *)                      . ./$cache_file;;
1087     esac
1088   fi
1089 else
1090   { echo "$as_me:1090: creating cache $cache_file" >&5
1091 echo "$as_me: creating cache $cache_file" >&6;}
1092   >$cache_file
1093 fi
1094
1095 # Check that the precious variables saved in the cache have kept the same
1096 # value.
1097 ac_cache_corrupted=false
1098 for ac_var in `(set) 2>&1 |
1099                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1100   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1101   eval ac_new_set=\$ac_env_${ac_var}_set
1102   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1103   eval ac_new_val="\$ac_env_${ac_var}_value"
1104   case "$ac_old_set,$ac_new_set" in
1105     set,)
1106       { echo "$as_me:1106: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1107 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1108       ac_cache_corrupted=: ;;
1109     ,set)
1110       { echo "$as_me:1110: error: \`$ac_var' was not set in the previous run" >&5
1111 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1112       ac_cache_corrupted=: ;;
1113     ,);;
1114     *)
1115       if test "x$ac_old_val" != "x$ac_new_val"; then
1116         { echo "$as_me:1116: error: \`$ac_var' has changed since the previous run:" >&5
1117 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1118         { echo "$as_me:1118:   former value:  $ac_old_val" >&5
1119 echo "$as_me:   former value:  $ac_old_val" >&2;}
1120         { echo "$as_me:1120:   current value: $ac_new_val" >&5
1121 echo "$as_me:   current value: $ac_new_val" >&2;}
1122         ac_cache_corrupted=:
1123       fi;;
1124   esac
1125   # Pass precious variables to config.status.  It doesn't matter if
1126   # we pass some twice (in addition to the command line arguments).
1127   if test "$ac_new_set" = set; then
1128     case "$ac_new_val" in
1129     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1130       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1131       ac_configure_args="$ac_configure_args '$ac_arg'"
1132       ;;
1133     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1134        ;;
1135     esac
1136   fi
1137 done
1138 if "$ac_cache_corrupted"; then
1139   { echo "$as_me:1139: error: changes in the environment can compromise the build" >&5
1140 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1141   { { echo "$as_me:1141: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1142 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1143    { (exit 1); exit 1; }; }
1144 fi
1145
1146 ac_ext=c
1147 ac_cpp='$CPP $CPPFLAGS'
1148 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1149 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1151 ac_main_return="return"
1152
1153 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1154   *c*,-n*) ECHO_N=
1155            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1156            ECHO_T='     '
1157            ;;
1158   *c*,*  ) ECHO_N=-n
1159            ECHO_C=
1160            ECHO_T=
1161            ;;
1162   *)       ECHO_N=
1163            ECHO_C='\c'
1164            ECHO_T=
1165            ;;
1166 esac
1167 echo "#! $SHELL" >conftest.sh
1168 echo  "exit 0"   >>conftest.sh
1169 chmod +x conftest.sh
1170 if { (echo "$as_me:1170: PATH=\".;.\"; conftest.sh") >&5
1171   (PATH=".;."; conftest.sh) 2>&5
1172   ac_status=$?
1173   echo "$as_me:1173: \$? = $ac_status" >&5
1174   (exit "$ac_status"); }; then
1175   ac_path_separator=';'
1176 else
1177   ac_path_separator=:
1178 fi
1179 PATH_SEPARATOR="$ac_path_separator"
1180 rm -f conftest.sh
1181
1182 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1183
1184 top_builddir=`pwd`
1185
1186 for ac_prog in ggrep grep
1187 do
1188   # Extract the first word of "$ac_prog", so it can be a program name with args.
1189 set dummy $ac_prog; ac_word=$2
1190 echo "$as_me:1190: checking for $ac_word" >&5
1191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1192 if test "${ac_cv_prog_GREP+set}" = set; then
1193   echo $ECHO_N "(cached) $ECHO_C" >&6
1194 else
1195   if test -n "$GREP"; then
1196   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1197 else
1198   ac_save_IFS=$IFS; IFS=$ac_path_separator
1199 ac_dummy="$PATH"
1200 for ac_dir in $ac_dummy; do
1201   IFS=$ac_save_IFS
1202   test -z "$ac_dir" && ac_dir=.
1203   $as_executable_p "$ac_dir/$ac_word" || continue
1204 ac_cv_prog_GREP="$ac_prog"
1205 echo "$as_me:1205: found $ac_dir/$ac_word" >&5
1206 break
1207 done
1208
1209 fi
1210 fi
1211 GREP=$ac_cv_prog_GREP
1212 if test -n "$GREP"; then
1213   echo "$as_me:1213: result: $GREP" >&5
1214 echo "${ECHO_T}$GREP" >&6
1215 else
1216   echo "$as_me:1216: result: no" >&5
1217 echo "${ECHO_T}no" >&6
1218 fi
1219
1220   test -n "$GREP" && break
1221 done
1222 test -n "$GREP" || GREP=": "
1223
1224 echo "$as_me:1224: checking for egrep" >&5
1225 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1226 if test "${ac_cv_path_EGREP+set}" = set; then
1227   echo $ECHO_N "(cached) $ECHO_C" >&6
1228 else
1229   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1230    then ac_cv_path_EGREP="$GREP -E"
1231    else
1232      for ac_prog in gegrep egrep
1233 do
1234   # Extract the first word of "$ac_prog", so it can be a program name with args.
1235 set dummy $ac_prog; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_path_EGREP+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   case $EGREP in
1242   [\\/]* | ?:[\\/]*)
1243   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1244   ;;
1245   *)
1246   ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 ac_dummy="$PATH"
1248 for ac_dir in $ac_dummy; do
1249   IFS=$ac_save_IFS
1250   test -z "$ac_dir" && ac_dir=.
1251   if $as_executable_p "$ac_dir/$ac_word"; then
1252    ac_cv_path_EGREP="$ac_dir/$ac_word"
1253    echo "$as_me:1253: found $ac_dir/$ac_word" >&5
1254    break
1255 fi
1256 done
1257
1258   ;;
1259 esac
1260 fi
1261 EGREP=$ac_cv_path_EGREP
1262
1263 if test -n "$EGREP"; then
1264   echo "$as_me:1264: result: $EGREP" >&5
1265 echo "${ECHO_T}$EGREP" >&6
1266 else
1267   echo "$as_me:1267: result: no" >&5
1268 echo "${ECHO_T}no" >&6
1269 fi
1270
1271   test -n "$EGREP" && break
1272 done
1273 test -n "$EGREP" || EGREP=": "
1274
1275      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1275: error: cannot find workable egrep" >&5
1276 echo "$as_me: error: cannot find workable egrep" >&2;}
1277    { (exit 1); exit 1; }; }
1278    fi
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_path_EGREP" >&5
1281 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1282  EGREP="$ac_cv_path_EGREP"
1283
1284 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 cf_cv_abi_version=${NCURSES_MAJOR}
1288 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1289 cf_cv_timestamp=`date`
1290 echo "$as_me:1290: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1291 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1292
1293 if test -f "$srcdir/VERSION" ; then
1294         echo "$as_me:1294: checking for package version" >&5
1295 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1296
1297         # if there are not enough fields, cut returns the last one...
1298         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1299         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1300         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1301
1302         # this is how CF_BUNDLED_INTL uses $VERSION:
1303         VERSION="$cf_field1"
1304
1305         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1306         test -z "$VERSION_MAJOR" && { { echo "$as_me:1306: error: missing major-version" >&5
1307 echo "$as_me: error: missing major-version" >&2;}
1308    { (exit 1); exit 1; }; }
1309
1310         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1311         test -z "$VERSION_MINOR" && { { echo "$as_me:1311: error: missing minor-version" >&5
1312 echo "$as_me: error: missing minor-version" >&2;}
1313    { (exit 1); exit 1; }; }
1314
1315         echo "$as_me:1315: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1316 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1317
1318         echo "$as_me:1318: checking for package patch date" >&5
1319 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1320         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1321         case .$VERSION_PATCH in
1322         (.)
1323                 { { echo "$as_me:1323: error: missing patch-date $VERSION_PATCH" >&5
1324 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1325    { (exit 1); exit 1; }; }
1326                 ;;
1327         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1328                 ;;
1329         (*)
1330                 { { echo "$as_me:1330: error: illegal patch-date $VERSION_PATCH" >&5
1331 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1332    { (exit 1); exit 1; }; }
1333                 ;;
1334         esac
1335         echo "$as_me:1335: result: $VERSION_PATCH" >&5
1336 echo "${ECHO_T}$VERSION_PATCH" >&6
1337 else
1338         { { echo "$as_me:1338: error: did not find $srcdir/VERSION" >&5
1339 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 # show the actual data that we have for versions:
1344 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1345
1346 echo "${as_me:-configure}:1346: testing ABI VERSION $VERSION ..." 1>&5
1347
1348 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1349
1350 echo "${as_me:-configure}:1350: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1351
1352 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1353
1354 echo "${as_me:-configure}:1354: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1355
1356 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1357
1358 echo "${as_me:-configure}:1358: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1359
1360         cf_PACKAGE=NCURSES
1361         PACKAGE=ncurses
1362
1363 cat >>confdefs.h <<EOF
1364 #define PACKAGE "$PACKAGE"
1365 EOF
1366
1367 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1368
1369         cat >>confdefs.h <<EOF
1370 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1371 EOF
1372
1373         cat >>confdefs.h <<EOF
1374 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1375 EOF
1376
1377 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1378
1379 # Check whether --with-rel-version or --without-rel-version was given.
1380 if test "${with_rel_version+set}" = set; then
1381   withval="$with_rel_version"
1382   { echo "$as_me:1382: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1383 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1384  cf_cv_rel_version=$withval
1385 fi;
1386
1387  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1388  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1389
1390 if test -n "$NCURSES_MAJOR" ; then
1391   case $NCURSES_MAJOR in
1392   ([0-9]*)
1393         ;;
1394   (*)
1395         { { echo "$as_me:1395: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1396 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1397    { (exit 1); exit 1; }; }
1398         ;;
1399   esac
1400 else
1401   { { echo "$as_me:1401: error: Release major-version value is empty" >&5
1402 echo "$as_me: error: Release major-version value is empty" >&2;}
1403    { (exit 1); exit 1; }; }
1404 fi
1405
1406 if test -n "$NCURSES_MINOR" ; then
1407   case $NCURSES_MINOR in
1408   ([0-9]*)
1409         ;;
1410   (*)
1411         { { echo "$as_me:1411: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1412 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1413    { (exit 1); exit 1; }; }
1414         ;;
1415   esac
1416 else
1417   { { echo "$as_me:1417: error: Release minor-version value is empty" >&5
1418 echo "$as_me: error: Release minor-version value is empty" >&2;}
1419    { (exit 1); exit 1; }; }
1420 fi
1421
1422 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1423
1424 # Check whether --with-abi-version or --without-abi-version was given.
1425 if test "${with_abi_version+set}" = set; then
1426   withval="$with_abi_version"
1427
1428         if test "x$cf_cv_abi_version" != "x$withval"
1429         then
1430                 { echo "$as_me:1430: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1431 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1432                 case "$cf_cv_rel_version" in
1433                 (5.*)
1434                         cf_cv_rel_version=$withval.0
1435                         ;;
1436                 (6.*)
1437                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1438                         ;;
1439                 esac
1440         fi
1441         cf_cv_abi_version=$withval
1442 fi;
1443
1444 if test -n "$cf_cv_abi_version" ; then
1445   case $cf_cv_abi_version in
1446   ([0-9]*)
1447         ;;
1448   (*)
1449         { { echo "$as_me:1449: error: ABI version is not a number: $cf_cv_abi_version" >&5
1450 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1451    { (exit 1); exit 1; }; }
1452         ;;
1453   esac
1454 else
1455   { { echo "$as_me:1455: error: ABI version value is empty" >&5
1456 echo "$as_me: error: ABI version value is empty" >&2;}
1457    { (exit 1); exit 1; }; }
1458 fi
1459
1460 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1461 then
1462         case "$cf_cv_rel_version" in
1463         (5.*)
1464                 cf_cv_rel_version=$with_abi_version.0
1465                 ;;
1466         esac
1467 fi
1468
1469 ac_aux_dir=
1470 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1471   if test -f "$ac_dir/install-sh"; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/install-sh -c"
1474     break
1475   elif test -f "$ac_dir/install.sh"; then
1476     ac_aux_dir=$ac_dir
1477     ac_install_sh="$ac_aux_dir/install.sh -c"
1478     break
1479   elif test -f "$ac_dir/shtool"; then
1480     ac_aux_dir=$ac_dir
1481     ac_install_sh="$ac_aux_dir/shtool install -c"
1482     break
1483   fi
1484 done
1485 if test -z "$ac_aux_dir"; then
1486   { { echo "$as_me:1486: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1487 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1488    { (exit 1); exit 1; }; }
1489 fi
1490 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1491 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1492 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1493
1494 # Make sure we can run config.sub.
1495 $ac_config_sub sun4 >/dev/null 2>&1 ||
1496   { { echo "$as_me:1496: error: cannot run $ac_config_sub" >&5
1497 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1498    { (exit 1); exit 1; }; }
1499
1500 echo "$as_me:1500: checking build system type" >&5
1501 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1502 if test "${ac_cv_build+set}" = set; then
1503   echo $ECHO_N "(cached) $ECHO_C" >&6
1504 else
1505   ac_cv_build_alias=$build_alias
1506 test -z "$ac_cv_build_alias" &&
1507   ac_cv_build_alias=`$ac_config_guess`
1508 test -z "$ac_cv_build_alias" &&
1509   { { echo "$as_me:1509: error: cannot guess build type; you must specify one" >&5
1510 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1511    { (exit 1); exit 1; }; }
1512 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1513   { { echo "$as_me:1513: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1514 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1515    { (exit 1); exit 1; }; }
1516
1517 fi
1518 echo "$as_me:1518: result: $ac_cv_build" >&5
1519 echo "${ECHO_T}$ac_cv_build" >&6
1520 build=$ac_cv_build
1521 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1522 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1523 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1524
1525 echo "$as_me:1525: checking host system type" >&5
1526 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1527 if test "${ac_cv_host+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   ac_cv_host_alias=$host_alias
1531 test -z "$ac_cv_host_alias" &&
1532   ac_cv_host_alias=$ac_cv_build_alias
1533 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1534   { { echo "$as_me:1534: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1535 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1536    { (exit 1); exit 1; }; }
1537
1538 fi
1539 echo "$as_me:1539: result: $ac_cv_host" >&5
1540 echo "${ECHO_T}$ac_cv_host" >&6
1541 host=$ac_cv_host
1542 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1543 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1544 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1545
1546 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1547         echo "$as_me:1547: checking target system type" >&5
1548 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1549 if test "${ac_cv_target+set}" = set; then
1550   echo $ECHO_N "(cached) $ECHO_C" >&6
1551 else
1552   ac_cv_target_alias=$target_alias
1553 test "x$ac_cv_target_alias" = "x" &&
1554   ac_cv_target_alias=$ac_cv_host_alias
1555 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1556   { { echo "$as_me:1556: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1557 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1558    { (exit 1); exit 1; }; }
1559
1560 fi
1561 echo "$as_me:1561: result: $ac_cv_target" >&5
1562 echo "${ECHO_T}$ac_cv_target" >&6
1563 target=$ac_cv_target
1564 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1565 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1566 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1567
1568 # The aliases save the names the user supplied, while $host etc.
1569 # will get canonicalized.
1570 test -n "$target_alias" &&
1571   test "$program_prefix$program_suffix$program_transform_name" = \
1572     NONENONEs,x,x, &&
1573   program_prefix=${target_alias}-
1574         system_name="$host_os"
1575 else
1576         system_name="`(uname -s -r) 2>/dev/null`"
1577         if test -z "$system_name" ; then
1578                 system_name="`(hostname) 2>/dev/null`"
1579         fi
1580 fi
1581 test -n "$system_name" &&
1582 cat >>confdefs.h <<EOF
1583 #define SYSTEM_NAME "$system_name"
1584 EOF
1585
1586 if test "${cf_cv_system_name+set}" = set; then
1587   echo $ECHO_N "(cached) $ECHO_C" >&6
1588 else
1589   cf_cv_system_name="$system_name"
1590 fi
1591
1592 test -z "$system_name" && system_name="$cf_cv_system_name"
1593 test -n "$cf_cv_system_name" && echo "$as_me:1593: result: Configuring for $cf_cv_system_name" >&5
1594 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1595
1596 if test ".$system_name" != ".$cf_cv_system_name" ; then
1597         echo "$as_me:1597: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1598 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1599         { { echo "$as_me:1599: error: \"Please remove config.cache and try again.\"" >&5
1600 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1601    { (exit 1); exit 1; }; }
1602 fi
1603
1604 # Check whether --with-system-type or --without-system-type was given.
1605 if test "${with_system_type+set}" = set; then
1606   withval="$with_system_type"
1607   { echo "$as_me:1607: WARNING: overriding system type to $withval" >&5
1608 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1609         cf_cv_system_name=$withval
1610         host_os=$withval
1611
1612 fi;
1613
1614 ###     Save the given $CFLAGS to allow user-override.
1615 cf_user_CFLAGS="$CFLAGS"
1616
1617 ###     Default install-location
1618 echo "$as_me:1618: checking for fgrep" >&5
1619 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1620 if test "${ac_cv_path_FGREP+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1624    then ac_cv_path_FGREP="$GREP -F"
1625    else
1626      for ac_prog in gfgrep fgrep
1627 do
1628   # Extract the first word of "$ac_prog", so it can be a program name with args.
1629 set dummy $ac_prog; ac_word=$2
1630 echo "$as_me:1630: checking for $ac_word" >&5
1631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1632 if test "${ac_cv_path_FGREP+set}" = set; then
1633   echo $ECHO_N "(cached) $ECHO_C" >&6
1634 else
1635   case $FGREP in
1636   [\\/]* | ?:[\\/]*)
1637   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1638   ;;
1639   *)
1640   ac_save_IFS=$IFS; IFS=$ac_path_separator
1641 ac_dummy="$PATH"
1642 for ac_dir in $ac_dummy; do
1643   IFS=$ac_save_IFS
1644   test -z "$ac_dir" && ac_dir=.
1645   if $as_executable_p "$ac_dir/$ac_word"; then
1646    ac_cv_path_FGREP="$ac_dir/$ac_word"
1647    echo "$as_me:1647: found $ac_dir/$ac_word" >&5
1648    break
1649 fi
1650 done
1651
1652   ;;
1653 esac
1654 fi
1655 FGREP=$ac_cv_path_FGREP
1656
1657 if test -n "$FGREP"; then
1658   echo "$as_me:1658: result: $FGREP" >&5
1659 echo "${ECHO_T}$FGREP" >&6
1660 else
1661   echo "$as_me:1661: result: no" >&5
1662 echo "${ECHO_T}no" >&6
1663 fi
1664
1665   test -n "$FGREP" && break
1666 done
1667 test -n "$FGREP" || FGREP=": "
1668
1669      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1669: error: cannot find workable fgrep" >&5
1670 echo "$as_me: error: cannot find workable fgrep" >&2;}
1671    { (exit 1); exit 1; }; }
1672    fi
1673 fi
1674 echo "$as_me:1674: result: $ac_cv_path_FGREP" >&5
1675 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1676  FGREP="$ac_cv_path_FGREP"
1677
1678 echo "$as_me:1678: checking for prefix" >&5
1679 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1680 if test "x$prefix" = "xNONE" ; then
1681         case "$cf_cv_system_name" in
1682                 # non-vendor systems don't have a conflict
1683         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1684                 prefix=/usr
1685                 ;;
1686         (*)     prefix=$ac_default_prefix
1687                 ;;
1688         esac
1689 fi
1690 echo "$as_me:1690: result: $prefix" >&5
1691 echo "${ECHO_T}$prefix" >&6
1692
1693 if test "x$prefix" = "xNONE" ; then
1694 echo "$as_me:1694: checking for default include-directory" >&5
1695 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1696 test -n "$verbose" && echo 1>&6
1697 for cf_symbol in \
1698         "$includedir" \
1699         "$includedir/ncurses" \
1700         "$prefix/include" \
1701         "$prefix/include/ncurses" \
1702         /usr/local/include \
1703         /usr/local/include/ncurses \
1704         /usr/include \
1705         /usr/include/ncurses
1706 do
1707         cf_dir=`eval echo "$cf_symbol"`
1708         if test -f "$cf_dir/curses.h" ; then
1709         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1710                 includedir="$cf_symbol"
1711                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1712                 break
1713         fi
1714         fi
1715         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1716 done
1717 echo "$as_me:1717: result: $includedir" >&5
1718 echo "${ECHO_T}$includedir" >&6
1719 fi
1720
1721 ### Defaults for ncurses ABI
1722
1723 case x$cf_cv_abi_version in
1724 (x[6789])
1725         cf_dft_ext_colors=yes
1726         cf_dft_ext_const=yes
1727         cf_dft_ext_mouse=yes
1728         cf_dft_ext_putwin=yes
1729         cf_dft_ext_spfuncs=yes
1730         cf_dft_filter_syms=yes
1731         cf_dft_chtype=uint32_t
1732         cf_dft_mmask_t=uint32_t
1733         cf_dft_interop=yes
1734         cf_dft_tparm_arg=intptr_t
1735         cf_dft_with_lp64=yes
1736         ;;
1737 (*)
1738         cf_dft_ext_colors=no
1739         cf_dft_ext_const=no
1740         cf_dft_ext_mouse=no
1741         cf_dft_ext_putwin=no
1742         cf_dft_ext_spfuncs=no
1743         cf_dft_filter_syms=no
1744         cf_dft_chtype=auto
1745         cf_dft_mmask_t=auto
1746         cf_dft_interop=no
1747         cf_dft_tparm_arg=long
1748         cf_dft_with_lp64=no
1749         ;;
1750 esac
1751
1752 ###     Checks for programs.
1753
1754 # Check whether --with-ada or --without-ada was given.
1755 if test "${with_ada+set}" = set; then
1756   withval="$with_ada"
1757   cf_with_ada=$withval
1758 else
1759   cf_with_ada=yes
1760 fi;
1761
1762 if test "x$cf_with_ada" = xyes
1763 then
1764         cf_prog_cc="gnatgcc gcc cc"
1765 else
1766         cf_prog_cc="gcc cc"
1767 fi
1768
1769 ac_ext=c
1770 ac_cpp='$CPP $CPPFLAGS'
1771 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1772 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1773 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1774 ac_main_return="return"
1775 if test -n "$ac_tool_prefix"; then
1776   for ac_prog in $cf_prog_cc
1777   do
1778     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1779 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1780 echo "$as_me:1780: checking for $ac_word" >&5
1781 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1782 if test "${ac_cv_prog_CC+set}" = set; then
1783   echo $ECHO_N "(cached) $ECHO_C" >&6
1784 else
1785   if test -n "$CC"; then
1786   ac_cv_prog_CC="$CC" # Let the user override the test.
1787 else
1788   ac_save_IFS=$IFS; IFS=$ac_path_separator
1789 ac_dummy="$PATH"
1790 for ac_dir in $ac_dummy; do
1791   IFS=$ac_save_IFS
1792   test -z "$ac_dir" && ac_dir=.
1793   $as_executable_p "$ac_dir/$ac_word" || continue
1794 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1795 echo "$as_me:1795: found $ac_dir/$ac_word" >&5
1796 break
1797 done
1798
1799 fi
1800 fi
1801 CC=$ac_cv_prog_CC
1802 if test -n "$CC"; then
1803   echo "$as_me:1803: result: $CC" >&5
1804 echo "${ECHO_T}$CC" >&6
1805 else
1806   echo "$as_me:1806: result: no" >&5
1807 echo "${ECHO_T}no" >&6
1808 fi
1809
1810     test -n "$CC" && break
1811   done
1812 fi
1813 if test -z "$CC"; then
1814   ac_ct_CC=$CC
1815   for ac_prog in $cf_prog_cc
1816 do
1817   # Extract the first word of "$ac_prog", so it can be a program name with args.
1818 set dummy $ac_prog; ac_word=$2
1819 echo "$as_me:1819: checking for $ac_word" >&5
1820 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1821 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1822   echo $ECHO_N "(cached) $ECHO_C" >&6
1823 else
1824   if test -n "$ac_ct_CC"; then
1825   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1826 else
1827   ac_save_IFS=$IFS; IFS=$ac_path_separator
1828 ac_dummy="$PATH"
1829 for ac_dir in $ac_dummy; do
1830   IFS=$ac_save_IFS
1831   test -z "$ac_dir" && ac_dir=.
1832   $as_executable_p "$ac_dir/$ac_word" || continue
1833 ac_cv_prog_ac_ct_CC="$ac_prog"
1834 echo "$as_me:1834: found $ac_dir/$ac_word" >&5
1835 break
1836 done
1837
1838 fi
1839 fi
1840 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1841 if test -n "$ac_ct_CC"; then
1842   echo "$as_me:1842: result: $ac_ct_CC" >&5
1843 echo "${ECHO_T}$ac_ct_CC" >&6
1844 else
1845   echo "$as_me:1845: result: no" >&5
1846 echo "${ECHO_T}no" >&6
1847 fi
1848
1849   test -n "$ac_ct_CC" && break
1850 done
1851
1852   CC=$ac_ct_CC
1853 fi
1854
1855 test -z "$CC" && { { echo "$as_me:1855: error: no acceptable cc found in \$PATH" >&5
1856 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1857    { (exit 1); exit 1; }; }
1858
1859 # Provide some information about the compiler.
1860 echo "$as_me:1860:" \
1861      "checking for C compiler version" >&5
1862 ac_compiler=`set X $ac_compile; echo "$2"`
1863 { (eval echo "$as_me:1863: \"$ac_compiler --version </dev/null >&5\"") >&5
1864   (eval $ac_compiler --version </dev/null >&5) 2>&5
1865   ac_status=$?
1866   echo "$as_me:1866: \$? = $ac_status" >&5
1867   (exit "$ac_status"); }
1868 { (eval echo "$as_me:1868: \"$ac_compiler -v </dev/null >&5\"") >&5
1869   (eval $ac_compiler -v </dev/null >&5) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit "$ac_status"); }
1873 { (eval echo "$as_me:1873: \"$ac_compiler -V </dev/null >&5\"") >&5
1874   (eval $ac_compiler -V </dev/null >&5) 2>&5
1875   ac_status=$?
1876   echo "$as_me:1876: \$? = $ac_status" >&5
1877   (exit "$ac_status"); }
1878
1879 cat >"conftest.$ac_ext" <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main (void)
1885 {
1886
1887   ;
1888   return 0;
1889 }
1890 _ACEOF
1891 ac_clean_files_save=$ac_clean_files
1892 ac_clean_files="$ac_clean_files a.out a.exe"
1893 # Try to create an executable without -o first, disregard a.out.
1894 # It will help us diagnose broken compilers, and finding out an intuition
1895 # of exeext.
1896 echo "$as_me:1896: checking for C compiler default output" >&5
1897 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1898 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1899 if { (eval echo "$as_me:1899: \"$ac_link_default\"") >&5
1900   (eval $ac_link_default) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit "$ac_status"); }; then
1904   # Find the output, starting from the most likely.  This scheme is
1905 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1906 # resort.
1907 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1908                 ls a.out conftest 2>/dev/null;
1909                 ls a.* conftest.* 2>/dev/null`; do
1910   case $ac_file in
1911     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1912     a.out ) # We found the default executable, but exeext='' is most
1913             # certainly right.
1914             break;;
1915     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1916           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1917           export ac_cv_exeext
1918           break;;
1919     * ) break;;
1920   esac
1921 done
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat "conftest.$ac_ext" >&5
1925 { { echo "$as_me:1925: error: C compiler cannot create executables" >&5
1926 echo "$as_me: error: C compiler cannot create executables" >&2;}
1927    { (exit 77); exit 77; }; }
1928 fi
1929
1930 ac_exeext=$ac_cv_exeext
1931 echo "$as_me:1931: result: $ac_file" >&5
1932 echo "${ECHO_T}$ac_file" >&6
1933
1934 # Check the compiler produces executables we can run.  If not, either
1935 # the compiler is broken, or we cross compile.
1936 echo "$as_me:1936: checking whether the C compiler works" >&5
1937 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1938 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1939 # If not cross compiling, check that we can run a simple program.
1940 if test "$cross_compiling" != yes; then
1941   if { ac_try='./$ac_file'
1942   { (eval echo "$as_me:1942: \"$ac_try\"") >&5
1943   (eval $ac_try) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit "$ac_status"); }; }; then
1947     cross_compiling=no
1948   else
1949     if test "$cross_compiling" = maybe; then
1950         cross_compiling=yes
1951     else
1952         { { echo "$as_me:1952: error: cannot run C compiled programs.
1953 If you meant to cross compile, use \`--host'." >&5
1954 echo "$as_me: error: cannot run C compiled programs.
1955 If you meant to cross compile, use \`--host'." >&2;}
1956    { (exit 1); exit 1; }; }
1957     fi
1958   fi
1959 fi
1960 echo "$as_me:1960: result: yes" >&5
1961 echo "${ECHO_T}yes" >&6
1962
1963 rm -f a.out a.exe "conftest$ac_cv_exeext"
1964 ac_clean_files=$ac_clean_files_save
1965 # Check the compiler produces executables we can run.  If not, either
1966 # the compiler is broken, or we cross compile.
1967 echo "$as_me:1967: checking whether we are cross compiling" >&5
1968 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1969 echo "$as_me:1969: result: $cross_compiling" >&5
1970 echo "${ECHO_T}$cross_compiling" >&6
1971
1972 echo "$as_me:1972: checking for executable suffix" >&5
1973 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1974 if { (eval echo "$as_me:1974: \"$ac_link\"") >&5
1975   (eval $ac_link) 2>&5
1976   ac_status=$?
1977   echo "$as_me:1977: \$? = $ac_status" >&5
1978   (exit "$ac_status"); }; then
1979   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1980 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1981 # work properly (i.e., refer to `conftest.exe'), while it won't with
1982 # `rm'.
1983 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1984   case $ac_file in
1985     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1986     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1987           export ac_cv_exeext
1988           break;;
1989     * ) break;;
1990   esac
1991 done
1992 else
1993   { { echo "$as_me:1993: error: cannot compute EXEEXT: cannot compile and link" >&5
1994 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1995    { (exit 1); exit 1; }; }
1996 fi
1997
1998 rm -f "conftest$ac_cv_exeext"
1999 echo "$as_me:1999: result: $ac_cv_exeext" >&5
2000 echo "${ECHO_T}$ac_cv_exeext" >&6
2001
2002 rm -f "conftest.$ac_ext"
2003 EXEEXT=$ac_cv_exeext
2004 ac_exeext=$EXEEXT
2005 echo "$as_me:2005: checking for object suffix" >&5
2006 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2007 if test "${ac_cv_objext+set}" = set; then
2008   echo $ECHO_N "(cached) $ECHO_C" >&6
2009 else
2010   cat >"conftest.$ac_ext" <<_ACEOF
2011 #line 2011 "configure"
2012 #include "confdefs.h"
2013
2014 int
2015 main (void)
2016 {
2017
2018   ;
2019   return 0;
2020 }
2021 _ACEOF
2022 rm -f conftest.o conftest.obj
2023 if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
2024   (eval $ac_compile) 2>&5
2025   ac_status=$?
2026   echo "$as_me:2026: \$? = $ac_status" >&5
2027   (exit "$ac_status"); }; then
2028   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2029   case $ac_file in
2030     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2031     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2032        break;;
2033   esac
2034 done
2035 else
2036   echo "$as_me: failed program was:" >&5
2037 cat "conftest.$ac_ext" >&5
2038 { { echo "$as_me:2038: error: cannot compute OBJEXT: cannot compile" >&5
2039 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2040    { (exit 1); exit 1; }; }
2041 fi
2042
2043 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2044 fi
2045 echo "$as_me:2045: result: $ac_cv_objext" >&5
2046 echo "${ECHO_T}$ac_cv_objext" >&6
2047 OBJEXT=$ac_cv_objext
2048 ac_objext=$OBJEXT
2049 echo "$as_me:2049: checking whether we are using the GNU C compiler" >&5
2050 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2051 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2052   echo $ECHO_N "(cached) $ECHO_C" >&6
2053 else
2054   cat >"conftest.$ac_ext" <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057
2058 int
2059 main (void)
2060 {
2061 #ifndef __GNUC__
2062        choke me
2063 #endif
2064
2065   ;
2066   return 0;
2067 }
2068 _ACEOF
2069 rm -f "conftest.$ac_objext"
2070 if { (eval echo "$as_me:2070: \"$ac_compile\"") >&5
2071   (eval $ac_compile) 2>&5
2072   ac_status=$?
2073   echo "$as_me:2073: \$? = $ac_status" >&5
2074   (exit "$ac_status"); } &&
2075          { ac_try='test -s "conftest.$ac_objext"'
2076   { (eval echo "$as_me:2076: \"$ac_try\"") >&5
2077   (eval $ac_try) 2>&5
2078   ac_status=$?
2079   echo "$as_me:2079: \$? = $ac_status" >&5
2080   (exit "$ac_status"); }; }; then
2081   ac_compiler_gnu=yes
2082 else
2083   echo "$as_me: failed program was:" >&5
2084 cat "conftest.$ac_ext" >&5
2085 ac_compiler_gnu=no
2086 fi
2087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2088 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2089
2090 fi
2091 echo "$as_me:2091: result: $ac_cv_c_compiler_gnu" >&5
2092 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2093 GCC=`test $ac_compiler_gnu = yes && echo yes`
2094 ac_test_CFLAGS=${CFLAGS+set}
2095 ac_save_CFLAGS=$CFLAGS
2096 CFLAGS="-g"
2097 echo "$as_me:2097: checking whether $CC accepts -g" >&5
2098 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2099 if test "${ac_cv_prog_cc_g+set}" = set; then
2100   echo $ECHO_N "(cached) $ECHO_C" >&6
2101 else
2102   cat >"conftest.$ac_ext" <<_ACEOF
2103 #line 2103 "configure"
2104 #include "confdefs.h"
2105
2106 int
2107 main (void)
2108 {
2109
2110   ;
2111   return 0;
2112 }
2113 _ACEOF
2114 rm -f "conftest.$ac_objext"
2115 if { (eval echo "$as_me:2115: \"$ac_compile\"") >&5
2116   (eval $ac_compile) 2>&5
2117   ac_status=$?
2118   echo "$as_me:2118: \$? = $ac_status" >&5
2119   (exit "$ac_status"); } &&
2120          { ac_try='test -s "conftest.$ac_objext"'
2121   { (eval echo "$as_me:2121: \"$ac_try\"") >&5
2122   (eval $ac_try) 2>&5
2123   ac_status=$?
2124   echo "$as_me:2124: \$? = $ac_status" >&5
2125   (exit "$ac_status"); }; }; then
2126   ac_cv_prog_cc_g=yes
2127 else
2128   echo "$as_me: failed program was:" >&5
2129 cat "conftest.$ac_ext" >&5
2130 ac_cv_prog_cc_g=no
2131 fi
2132 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2133 fi
2134 echo "$as_me:2134: result: $ac_cv_prog_cc_g" >&5
2135 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2136 if test "$ac_test_CFLAGS" = set; then
2137   CFLAGS=$ac_save_CFLAGS
2138 elif test $ac_cv_prog_cc_g = yes; then
2139   if test "$GCC" = yes; then
2140     CFLAGS="-g -O2"
2141   else
2142     CFLAGS="-g"
2143   fi
2144 else
2145   if test "$GCC" = yes; then
2146     CFLAGS="-O2"
2147   else
2148     CFLAGS=
2149   fi
2150 fi
2151 # Some people use a C++ compiler to compile C.  Since we use `exit',
2152 # in C++ we need to declare it.  In case someone uses the same compiler
2153 # for both compiling C and C++ we need to have the C++ compiler decide
2154 # the declaration of exit, since it's the most demanding environment.
2155 cat >"conftest.$ac_ext" <<_ACEOF
2156 #ifndef __cplusplus
2157   choke me
2158 #endif
2159 _ACEOF
2160 rm -f "conftest.$ac_objext"
2161 if { (eval echo "$as_me:2161: \"$ac_compile\"") >&5
2162   (eval $ac_compile) 2>&5
2163   ac_status=$?
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit "$ac_status"); } &&
2166          { ac_try='test -s "conftest.$ac_objext"'
2167   { (eval echo "$as_me:2167: \"$ac_try\"") >&5
2168   (eval $ac_try) 2>&5
2169   ac_status=$?
2170   echo "$as_me:2170: \$? = $ac_status" >&5
2171   (exit "$ac_status"); }; }; then
2172   for ac_declaration in \
2173    ''\
2174    '#include <stdlib.h>' \
2175    'extern "C" void std::exit (int) throw (); using std::exit;' \
2176    'extern "C" void std::exit (int); using std::exit;' \
2177    'extern "C" void exit (int) throw ();' \
2178    'extern "C" void exit (int);' \
2179    'void exit (int);'
2180 do
2181   cat >"conftest.$ac_ext" <<_ACEOF
2182 #line 2182 "configure"
2183 #include "confdefs.h"
2184 #include <stdlib.h>
2185 $ac_declaration
2186 int
2187 main (void)
2188 {
2189 exit (42);
2190   ;
2191   return 0;
2192 }
2193 _ACEOF
2194 rm -f "conftest.$ac_objext"
2195 if { (eval echo "$as_me:2195: \"$ac_compile\"") >&5
2196   (eval $ac_compile) 2>&5
2197   ac_status=$?
2198   echo "$as_me:2198: \$? = $ac_status" >&5
2199   (exit "$ac_status"); } &&
2200          { ac_try='test -s "conftest.$ac_objext"'
2201   { (eval echo "$as_me:2201: \"$ac_try\"") >&5
2202   (eval $ac_try) 2>&5
2203   ac_status=$?
2204   echo "$as_me:2204: \$? = $ac_status" >&5
2205   (exit "$ac_status"); }; }; then
2206   :
2207 else
2208   echo "$as_me: failed program was:" >&5
2209 cat "conftest.$ac_ext" >&5
2210 continue
2211 fi
2212 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2213   cat >"conftest.$ac_ext" <<_ACEOF
2214 #line 2214 "configure"
2215 #include "confdefs.h"
2216 $ac_declaration
2217 int
2218 main (void)
2219 {
2220 exit (42);
2221   ;
2222   return 0;
2223 }
2224 _ACEOF
2225 rm -f "conftest.$ac_objext"
2226 if { (eval echo "$as_me:2226: \"$ac_compile\"") >&5
2227   (eval $ac_compile) 2>&5
2228   ac_status=$?
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit "$ac_status"); } &&
2231          { ac_try='test -s "conftest.$ac_objext"'
2232   { (eval echo "$as_me:2232: \"$ac_try\"") >&5
2233   (eval $ac_try) 2>&5
2234   ac_status=$?
2235   echo "$as_me:2235: \$? = $ac_status" >&5
2236   (exit "$ac_status"); }; }; then
2237   break
2238 else
2239   echo "$as_me: failed program was:" >&5
2240 cat "conftest.$ac_ext" >&5
2241 fi
2242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2243 done
2244 rm -rf conftest*
2245 if test -n "$ac_declaration"; then
2246   echo '#ifdef __cplusplus' >>confdefs.h
2247   echo "$ac_declaration"    >>confdefs.h
2248   echo '#endif'             >>confdefs.h
2249 fi
2250
2251 else
2252   echo "$as_me: failed program was:" >&5
2253 cat "conftest.$ac_ext" >&5
2254 fi
2255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2256 ac_ext=c
2257 ac_cpp='$CPP $CPPFLAGS'
2258 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2259 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2260 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2261 ac_main_return="return"
2262
2263 GCC_VERSION=none
2264 if test "$GCC" = yes ; then
2265         echo "$as_me:2265: checking version of $CC" >&5
2266 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2267         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.].*//'`"
2268         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2269         echo "$as_me:2269: result: $GCC_VERSION" >&5
2270 echo "${ECHO_T}$GCC_VERSION" >&6
2271 fi
2272
2273 INTEL_COMPILER=no
2274
2275 if test "$GCC" = yes ; then
2276         case "$host_os" in
2277         (linux*|gnu*)
2278                 echo "$as_me:2278: checking if this is really Intel C compiler" >&5
2279 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2280                 cf_save_CFLAGS="$CFLAGS"
2281                 CFLAGS="$CFLAGS -no-gcc"
2282                 cat >"conftest.$ac_ext" <<_ACEOF
2283 #line 2283 "configure"
2284 #include "confdefs.h"
2285
2286 int
2287 main (void)
2288 {
2289
2290 #ifdef __INTEL_COMPILER
2291 #else
2292 make an error
2293 #endif
2294
2295   ;
2296   return 0;
2297 }
2298 _ACEOF
2299 rm -f "conftest.$ac_objext"
2300 if { (eval echo "$as_me:2300: \"$ac_compile\"") >&5
2301   (eval $ac_compile) 2>&5
2302   ac_status=$?
2303   echo "$as_me:2303: \$? = $ac_status" >&5
2304   (exit "$ac_status"); } &&
2305          { ac_try='test -s "conftest.$ac_objext"'
2306   { (eval echo "$as_me:2306: \"$ac_try\"") >&5
2307   (eval $ac_try) 2>&5
2308   ac_status=$?
2309   echo "$as_me:2309: \$? = $ac_status" >&5
2310   (exit "$ac_status"); }; }; then
2311   INTEL_COMPILER=yes
2312 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2313
2314 else
2315   echo "$as_me: failed program was:" >&5
2316 cat "conftest.$ac_ext" >&5
2317 fi
2318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2319                 CFLAGS="$cf_save_CFLAGS"
2320                 echo "$as_me:2320: result: $INTEL_COMPILER" >&5
2321 echo "${ECHO_T}$INTEL_COMPILER" >&6
2322                 ;;
2323         esac
2324 fi
2325
2326 CLANG_COMPILER=no
2327
2328 if test "$GCC" = yes ; then
2329         echo "$as_me:2329: checking if this is really Clang C compiler" >&5
2330 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2331         cf_save_CFLAGS="$CFLAGS"
2332         cat >"conftest.$ac_ext" <<_ACEOF
2333 #line 2333 "configure"
2334 #include "confdefs.h"
2335
2336 int
2337 main (void)
2338 {
2339
2340 #ifdef __clang__
2341 #else
2342 make an error
2343 #endif
2344
2345   ;
2346   return 0;
2347 }
2348 _ACEOF
2349 rm -f "conftest.$ac_objext"
2350 if { (eval echo "$as_me:2350: \"$ac_compile\"") >&5
2351   (eval $ac_compile) 2>&5
2352   ac_status=$?
2353   echo "$as_me:2353: \$? = $ac_status" >&5
2354   (exit "$ac_status"); } &&
2355          { ac_try='test -s "conftest.$ac_objext"'
2356   { (eval echo "$as_me:2356: \"$ac_try\"") >&5
2357   (eval $ac_try) 2>&5
2358   ac_status=$?
2359   echo "$as_me:2359: \$? = $ac_status" >&5
2360   (exit "$ac_status"); }; }; then
2361   CLANG_COMPILER=yes
2362
2363 else
2364   echo "$as_me: failed program was:" >&5
2365 cat "conftest.$ac_ext" >&5
2366 fi
2367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2368         CFLAGS="$cf_save_CFLAGS"
2369         echo "$as_me:2369: result: $CLANG_COMPILER" >&5
2370 echo "${ECHO_T}$CLANG_COMPILER" >&6
2371 fi
2372
2373 CLANG_VERSION=none
2374
2375 if test "x$CLANG_COMPILER" = "xyes" ; then
2376         case "$CC" in
2377         (c[1-9][0-9]|*/c[1-9][0-9])
2378                 { echo "$as_me:2378: WARNING: replacing broken compiler alias $CC" >&5
2379 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2380                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2381                 CC=clang
2382                 ;;
2383         esac
2384
2385         echo "$as_me:2385: checking version of $CC" >&5
2386 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2387         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2388         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2389         echo "$as_me:2389: result: $CLANG_VERSION" >&5
2390 echo "${ECHO_T}$CLANG_VERSION" >&6
2391
2392         for cf_clang_opt in \
2393                 -Qunused-arguments \
2394                 -Wno-error=implicit-function-declaration
2395         do
2396                 echo "$as_me:2396: checking if option $cf_clang_opt works" >&5
2397 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2398                 cf_save_CFLAGS="$CFLAGS"
2399                 CFLAGS="$CFLAGS $cf_clang_opt"
2400                 cat >"conftest.$ac_ext" <<_ACEOF
2401 #line 2401 "configure"
2402 #include "confdefs.h"
2403
2404                         #include <stdio.h>
2405 int
2406 main (void)
2407 {
2408
2409                         printf("hello!\\n");
2410   ;
2411   return 0;
2412 }
2413 _ACEOF
2414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2415 if { (eval echo "$as_me:2415: \"$ac_link\"") >&5
2416   (eval $ac_link) 2>&5
2417   ac_status=$?
2418   echo "$as_me:2418: \$? = $ac_status" >&5
2419   (exit "$ac_status"); } &&
2420          { ac_try='test -s "conftest$ac_exeext"'
2421   { (eval echo "$as_me:2421: \"$ac_try\"") >&5
2422   (eval $ac_try) 2>&5
2423   ac_status=$?
2424   echo "$as_me:2424: \$? = $ac_status" >&5
2425   (exit "$ac_status"); }; }; then
2426
2427                         cf_clang_optok=yes
2428 else
2429   echo "$as_me: failed program was:" >&5
2430 cat "conftest.$ac_ext" >&5
2431
2432                         cf_clang_optok=no
2433 fi
2434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2435                 echo "$as_me:2435: result: $cf_clang_optok" >&5
2436 echo "${ECHO_T}$cf_clang_optok" >&6
2437                 CFLAGS="$cf_save_CFLAGS"
2438                 if test "$cf_clang_optok" = yes; then
2439                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2440
2441 echo "${as_me:-configure}:2441: testing adding option $cf_clang_opt ..." 1>&5
2442
2443         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2444         CFLAGS="${CFLAGS}$cf_clang_opt"
2445
2446                 fi
2447         done
2448 fi
2449
2450 echo "$as_me:2450: checking for $CC option to accept ANSI C" >&5
2451 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2452 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2453   echo $ECHO_N "(cached) $ECHO_C" >&6
2454 else
2455   ac_cv_prog_cc_stdc=no
2456 ac_save_CC=$CC
2457 cat >"conftest.$ac_ext" <<_ACEOF
2458 #line 2458 "configure"
2459 #include "confdefs.h"
2460 #include <stdarg.h>
2461 #include <stdio.h>
2462 #include <sys/types.h>
2463 #include <sys/stat.h>
2464 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2465 struct buf { int x; };
2466 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2467 static char *e (p, i)
2468      char **p;
2469      int i;
2470 {
2471   return p[i];
2472 }
2473 static char *f (char * (*g) (char **, int), char **p, ...)
2474 {
2475   char *s;
2476   va_list v;
2477   va_start (v,p);
2478   s = g (p, va_arg (v,int));
2479   va_end (v);
2480   return s;
2481 }
2482 int test (int i, double x);
2483 struct s1 {int (*f) (int a);};
2484 struct s2 {int (*f) (double a);};
2485 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2486 int argc;
2487 char **argv;
2488 int
2489 main (void)
2490 {
2491 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2492   ;
2493   return 0;
2494 }
2495 _ACEOF
2496 # Don't try gcc -ansi; that turns off useful extensions and
2497 # breaks some systems' header files.
2498 # AIX                   -qlanglvl=ansi
2499 # Ultrix and OSF/1      -std1
2500 # HP-UX 10.20 and later -Ae
2501 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2502 # SVR4                  -Xc -D__EXTENSIONS__
2503 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2504 do
2505   CC="$ac_save_CC $ac_arg"
2506   rm -f "conftest.$ac_objext"
2507 if { (eval echo "$as_me:2507: \"$ac_compile\"") >&5
2508   (eval $ac_compile) 2>&5
2509   ac_status=$?
2510   echo "$as_me:2510: \$? = $ac_status" >&5
2511   (exit "$ac_status"); } &&
2512          { ac_try='test -s "conftest.$ac_objext"'
2513   { (eval echo "$as_me:2513: \"$ac_try\"") >&5
2514   (eval $ac_try) 2>&5
2515   ac_status=$?
2516   echo "$as_me:2516: \$? = $ac_status" >&5
2517   (exit "$ac_status"); }; }; then
2518   ac_cv_prog_cc_stdc=$ac_arg
2519 break
2520 else
2521   echo "$as_me: failed program was:" >&5
2522 cat "conftest.$ac_ext" >&5
2523 fi
2524 rm -f "conftest.$ac_objext"
2525 done
2526 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2527 CC=$ac_save_CC
2528
2529 fi
2530
2531 case "x$ac_cv_prog_cc_stdc" in
2532   x|xno)
2533     echo "$as_me:2533: result: none needed" >&5
2534 echo "${ECHO_T}none needed" >&6 ;;
2535   *)
2536     echo "$as_me:2536: result: $ac_cv_prog_cc_stdc" >&5
2537 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2538     CC="$CC $ac_cv_prog_cc_stdc" ;;
2539 esac
2540
2541 # This should have been defined by AC_PROG_CC
2542 : "${CC:=cc}"
2543
2544 echo "$as_me:2544: checking \$CFLAGS variable" >&5
2545 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2546 case "x$CFLAGS" in
2547 (*-[IUD]*)
2548         echo "$as_me:2548: result: broken" >&5
2549 echo "${ECHO_T}broken" >&6
2550         { echo "$as_me:2550: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2551 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2552         cf_flags="$CFLAGS"
2553         CFLAGS=
2554         for cf_arg in $cf_flags
2555         do
2556
2557 cf_fix_cppflags=no
2558 cf_new_cflags=
2559 cf_new_cppflags=
2560 cf_new_extra_cppflags=
2561
2562 for cf_add_cflags in $cf_arg
2563 do
2564 case "$cf_fix_cppflags" in
2565 (no)
2566         case "$cf_add_cflags" in
2567         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2568                 case "$cf_add_cflags" in
2569                 (-D*)
2570                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2571
2572                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2573                                 && test -z "${cf_tst_cflags}" \
2574                                 && cf_fix_cppflags=yes
2575
2576                         if test "$cf_fix_cppflags" = yes ; then
2577
2578         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2579         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2580
2581                                 continue
2582                         elif test "${cf_tst_cflags}" = "\"'" ; then
2583
2584         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2585         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2586
2587                                 continue
2588                         fi
2589                         ;;
2590                 esac
2591                 case "$CPPFLAGS" in
2592                 (*$cf_add_cflags)
2593                         ;;
2594                 (*)
2595                         case "$cf_add_cflags" in
2596                         (-D*)
2597                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2598
2599 CPPFLAGS=`echo "$CPPFLAGS" | \
2600         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2601                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2602
2603                                 ;;
2604                         esac
2605
2606         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2607         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2608
2609                         ;;
2610                 esac
2611                 ;;
2612         (*)
2613
2614         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2615         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2616
2617                 ;;
2618         esac
2619         ;;
2620 (yes)
2621
2622         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2623         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2624
2625         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2626
2627         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2628                 && test -z "${cf_tst_cflags}" \
2629                 && cf_fix_cppflags=no
2630         ;;
2631 esac
2632 done
2633
2634 if test -n "$cf_new_cflags" ; then
2635
2636         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2637         CFLAGS="${CFLAGS}$cf_new_cflags"
2638
2639 fi
2640
2641 if test -n "$cf_new_cppflags" ; then
2642
2643         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2644         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2645
2646 fi
2647
2648 if test -n "$cf_new_extra_cppflags" ; then
2649
2650         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2651         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2652
2653 fi
2654
2655         done
2656         ;;
2657 (*)
2658         echo "$as_me:2658: result: ok" >&5
2659 echo "${ECHO_T}ok" >&6
2660         ;;
2661 esac
2662
2663 echo "$as_me:2663: checking \$CC variable" >&5
2664 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2665 case "$CC" in
2666 (*[\ \  ]-*)
2667         echo "$as_me:2667: result: broken" >&5
2668 echo "${ECHO_T}broken" >&6
2669         { echo "$as_me:2669: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2670 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2671         # humor him...
2672         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2673         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2674         CC="$cf_prog"
2675         for cf_arg in $cf_flags
2676         do
2677                 case "x$cf_arg" in
2678                 (x-[IUDfgOW]*)
2679
2680 cf_fix_cppflags=no
2681 cf_new_cflags=
2682 cf_new_cppflags=
2683 cf_new_extra_cppflags=
2684
2685 for cf_add_cflags in $cf_arg
2686 do
2687 case "$cf_fix_cppflags" in
2688 (no)
2689         case "$cf_add_cflags" in
2690         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2691                 case "$cf_add_cflags" in
2692                 (-D*)
2693                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2694
2695                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2696                                 && test -z "${cf_tst_cflags}" \
2697                                 && cf_fix_cppflags=yes
2698
2699                         if test "$cf_fix_cppflags" = yes ; then
2700
2701         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2702         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2703
2704                                 continue
2705                         elif test "${cf_tst_cflags}" = "\"'" ; then
2706
2707         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2708         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2709
2710                                 continue
2711                         fi
2712                         ;;
2713                 esac
2714                 case "$CPPFLAGS" in
2715                 (*$cf_add_cflags)
2716                         ;;
2717                 (*)
2718                         case "$cf_add_cflags" in
2719                         (-D*)
2720                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2721
2722 CPPFLAGS=`echo "$CPPFLAGS" | \
2723         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2724                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2725
2726                                 ;;
2727                         esac
2728
2729         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2730         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2731
2732                         ;;
2733                 esac
2734                 ;;
2735         (*)
2736
2737         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2738         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2739
2740                 ;;
2741         esac
2742         ;;
2743 (yes)
2744
2745         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2746         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2747
2748         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2749
2750         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2751                 && test -z "${cf_tst_cflags}" \
2752                 && cf_fix_cppflags=no
2753         ;;
2754 esac
2755 done
2756
2757 if test -n "$cf_new_cflags" ; then
2758
2759         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2760         CFLAGS="${CFLAGS}$cf_new_cflags"
2761
2762 fi
2763
2764 if test -n "$cf_new_cppflags" ; then
2765
2766         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2767         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2768
2769 fi
2770
2771 if test -n "$cf_new_extra_cppflags" ; then
2772
2773         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2774         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2775
2776 fi
2777
2778                         ;;
2779                 (*)
2780                         CC="$CC $cf_arg"
2781                         ;;
2782                 esac
2783         done
2784         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2785
2786 echo "${as_me:-configure}:2786: testing resulting CC: '$CC' ..." 1>&5
2787
2788         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2789
2790 echo "${as_me:-configure}:2790: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2791
2792         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2793
2794 echo "${as_me:-configure}:2794: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2795
2796         ;;
2797 (*)
2798         echo "$as_me:2798: result: ok" >&5
2799 echo "${ECHO_T}ok" >&6
2800         ;;
2801 esac
2802
2803 ac_ext=c
2804 ac_cpp='$CPP $CPPFLAGS'
2805 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2806 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2807 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2808 ac_main_return="return"
2809 echo "$as_me:2809: checking how to run the C preprocessor" >&5
2810 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2811 # On Suns, sometimes $CPP names a directory.
2812 if test -n "$CPP" && test -d "$CPP"; then
2813   CPP=
2814 fi
2815 if test -z "$CPP"; then
2816   if test "${ac_cv_prog_CPP+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819       # Double quotes because CPP needs to be expanded
2820     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2821     do
2822       ac_preproc_ok=false
2823 for ac_c_preproc_warn_flag in '' yes
2824 do
2825   # Use a header file that comes with gcc, so configuring glibc
2826   # with a fresh cross-compiler works.
2827   # On the NeXT, cc -E runs the code through the compiler's parser,
2828   # not just through cpp. "Syntax error" is here to catch this case.
2829   cat >"conftest.$ac_ext" <<_ACEOF
2830 #line 2830 "configure"
2831 #include "confdefs.h"
2832 #include <assert.h>
2833                      Syntax error
2834 _ACEOF
2835 if { (eval echo "$as_me:2835: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2836   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2837   ac_status=$?
2838   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2839   rm -f conftest.er1
2840   cat conftest.err >&5
2841   echo "$as_me:2841: \$? = $ac_status" >&5
2842   (exit "$ac_status"); } >/dev/null; then
2843   if test -s conftest.err; then
2844     ac_cpp_err=$ac_c_preproc_warn_flag
2845   else
2846     ac_cpp_err=
2847   fi
2848 else
2849   ac_cpp_err=yes
2850 fi
2851 if test -z "$ac_cpp_err"; then
2852   :
2853 else
2854   echo "$as_me: failed program was:" >&5
2855   cat "conftest.$ac_ext" >&5
2856   # Broken: fails on valid input.
2857 continue
2858 fi
2859 rm -f conftest.err "conftest.$ac_ext"
2860
2861   # OK, works on sane cases.  Now check whether non-existent headers
2862   # can be detected and how.
2863   cat >"conftest.$ac_ext" <<_ACEOF
2864 #line 2864 "configure"
2865 #include "confdefs.h"
2866 #include <ac_nonexistent.h>
2867 _ACEOF
2868 if { (eval echo "$as_me:2868: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2869   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2870   ac_status=$?
2871   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2872   rm -f conftest.er1
2873   cat conftest.err >&5
2874   echo "$as_me:2874: \$? = $ac_status" >&5
2875   (exit "$ac_status"); } >/dev/null; then
2876   if test -s conftest.err; then
2877     ac_cpp_err=$ac_c_preproc_warn_flag
2878   else
2879     ac_cpp_err=
2880   fi
2881 else
2882   ac_cpp_err=yes
2883 fi
2884 if test -z "$ac_cpp_err"; then
2885   # Broken: success on invalid input.
2886 continue
2887 else
2888   echo "$as_me: failed program was:" >&5
2889   cat "conftest.$ac_ext" >&5
2890   # Passes both tests.
2891 ac_preproc_ok=:
2892 break
2893 fi
2894 rm -f conftest.err "conftest.$ac_ext"
2895
2896 done
2897 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2898 rm -f conftest.err "conftest.$ac_ext"
2899 if $ac_preproc_ok; then
2900   break
2901 fi
2902
2903     done
2904     ac_cv_prog_CPP=$CPP
2905
2906 fi
2907   CPP=$ac_cv_prog_CPP
2908 else
2909   ac_cv_prog_CPP=$CPP
2910 fi
2911 echo "$as_me:2911: result: $CPP" >&5
2912 echo "${ECHO_T}$CPP" >&6
2913 ac_preproc_ok=false
2914 for ac_c_preproc_warn_flag in '' yes
2915 do
2916   # Use a header file that comes with gcc, so configuring glibc
2917   # with a fresh cross-compiler works.
2918   # On the NeXT, cc -E runs the code through the compiler's parser,
2919   # not just through cpp. "Syntax error" is here to catch this case.
2920   cat >"conftest.$ac_ext" <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923 #include <assert.h>
2924                      Syntax error
2925 _ACEOF
2926 if { (eval echo "$as_me:2926: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2927   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2928   ac_status=$?
2929   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2930   rm -f conftest.er1
2931   cat conftest.err >&5
2932   echo "$as_me:2932: \$? = $ac_status" >&5
2933   (exit "$ac_status"); } >/dev/null; then
2934   if test -s conftest.err; then
2935     ac_cpp_err=$ac_c_preproc_warn_flag
2936   else
2937     ac_cpp_err=
2938   fi
2939 else
2940   ac_cpp_err=yes
2941 fi
2942 if test -z "$ac_cpp_err"; then
2943   :
2944 else
2945   echo "$as_me: failed program was:" >&5
2946   cat "conftest.$ac_ext" >&5
2947   # Broken: fails on valid input.
2948 continue
2949 fi
2950 rm -f conftest.err "conftest.$ac_ext"
2951
2952   # OK, works on sane cases.  Now check whether non-existent headers
2953   # can be detected and how.
2954   cat >"conftest.$ac_ext" <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <ac_nonexistent.h>
2958 _ACEOF
2959 if { (eval echo "$as_me:2959: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2960   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2961   ac_status=$?
2962   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2963   rm -f conftest.er1
2964   cat conftest.err >&5
2965   echo "$as_me:2965: \$? = $ac_status" >&5
2966   (exit "$ac_status"); } >/dev/null; then
2967   if test -s conftest.err; then
2968     ac_cpp_err=$ac_c_preproc_warn_flag
2969   else
2970     ac_cpp_err=
2971   fi
2972 else
2973   ac_cpp_err=yes
2974 fi
2975 if test -z "$ac_cpp_err"; then
2976   # Broken: success on invalid input.
2977 continue
2978 else
2979   echo "$as_me: failed program was:" >&5
2980   cat "conftest.$ac_ext" >&5
2981   # Passes both tests.
2982 ac_preproc_ok=:
2983 break
2984 fi
2985 rm -f conftest.err "conftest.$ac_ext"
2986
2987 done
2988 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2989 rm -f conftest.err "conftest.$ac_ext"
2990 if $ac_preproc_ok; then
2991   :
2992 else
2993   { { echo "$as_me:2993: error: C preprocessor \"$CPP\" fails sanity check" >&5
2994 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2995    { (exit 1); exit 1; }; }
2996 fi
2997
2998 ac_ext=c
2999 ac_cpp='$CPP $CPPFLAGS'
3000 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3001 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3002 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3003 ac_main_return="return"
3004
3005 if test $ac_cv_c_compiler_gnu = yes; then
3006     echo "$as_me:3006: checking whether $CC needs -traditional" >&5
3007 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3008 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3009   echo $ECHO_N "(cached) $ECHO_C" >&6
3010 else
3011     ac_pattern="Autoconf.*'x'"
3012   cat >"conftest.$ac_ext" <<_ACEOF
3013 #line 3013 "configure"
3014 #include "confdefs.h"
3015 #include <sgtty.h>
3016 int Autoconf = TIOCGETP;
3017 _ACEOF
3018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3019   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3020   ac_cv_prog_gcc_traditional=yes
3021 else
3022   ac_cv_prog_gcc_traditional=no
3023 fi
3024 rm -rf conftest*
3025
3026   if test $ac_cv_prog_gcc_traditional = no; then
3027     cat >"conftest.$ac_ext" <<_ACEOF
3028 #line 3028 "configure"
3029 #include "confdefs.h"
3030 #include <termio.h>
3031 int Autoconf = TCGETA;
3032 _ACEOF
3033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3034   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3035   ac_cv_prog_gcc_traditional=yes
3036 fi
3037 rm -rf conftest*
3038
3039   fi
3040 fi
3041 echo "$as_me:3041: result: $ac_cv_prog_gcc_traditional" >&5
3042 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3043   if test $ac_cv_prog_gcc_traditional = yes; then
3044     CC="$CC -traditional"
3045   fi
3046 fi
3047
3048 echo "$as_me:3048: checking whether $CC understands -c and -o together" >&5
3049 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3050 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3051   echo $ECHO_N "(cached) $ECHO_C" >&6
3052 else
3053
3054 cat > conftest.$ac_ext <<CF_EOF
3055 int main(void)
3056 {
3057         ${cf_cv_main_return:-return}(0);
3058 }
3059 CF_EOF
3060 # We do the test twice because some compilers refuse to overwrite an
3061 # existing .o file with -o, though they will create one.
3062 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3063 if { (eval echo "$as_me:3063: \"$ac_try\"") >&5
3064   (eval $ac_try) 2>&5
3065   ac_status=$?
3066   echo "$as_me:3066: \$? = $ac_status" >&5
3067   (exit "$ac_status"); } &&
3068   test -f conftest2.$ac_objext && { (eval echo "$as_me:3068: \"$ac_try\"") >&5
3069   (eval $ac_try) 2>&5
3070   ac_status=$?
3071   echo "$as_me:3071: \$? = $ac_status" >&5
3072   (exit "$ac_status"); };
3073 then
3074   eval cf_cv_prog_CC_c_o=yes
3075 else
3076   eval cf_cv_prog_CC_c_o=no
3077 fi
3078 rm -rf ./conftest*
3079
3080 fi
3081 if test "$cf_cv_prog_CC_c_o" = yes; then
3082   echo "$as_me:3082: result: yes" >&5
3083 echo "${ECHO_T}yes" >&6
3084 else
3085   echo "$as_me:3085: result: no" >&5
3086 echo "${ECHO_T}no" >&6
3087 fi
3088
3089 if test "$cross_compiling" = yes ; then
3090         LDCONFIG=:
3091 else
3092         case "$cf_cv_system_name" in
3093         (dragonfly*|mirbsd*|freebsd*)
3094                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3095                 ;;
3096         (*) LDPATH=$PATH:/sbin:/usr/sbin
3097                 # Extract the first word of "ldconfig", so it can be a program name with args.
3098 set dummy ldconfig; ac_word=$2
3099 echo "$as_me:3099: checking for $ac_word" >&5
3100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3101 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104   case $LDCONFIG in
3105   [\\/]* | ?:[\\/]*)
3106   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3107   ;;
3108   *)
3109   ac_save_IFS=$IFS; IFS=$ac_path_separator
3110 ac_dummy="$LDPATH"
3111 for ac_dir in $ac_dummy; do
3112   IFS=$ac_save_IFS
3113   test -z "$ac_dir" && ac_dir=.
3114   if $as_executable_p "$ac_dir/$ac_word"; then
3115    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3116    echo "$as_me:3116: found $ac_dir/$ac_word" >&5
3117    break
3118 fi
3119 done
3120
3121   ;;
3122 esac
3123 fi
3124 LDCONFIG=$ac_cv_path_LDCONFIG
3125
3126 if test -n "$LDCONFIG"; then
3127   echo "$as_me:3127: result: $LDCONFIG" >&5
3128 echo "${ECHO_T}$LDCONFIG" >&6
3129 else
3130   echo "$as_me:3130: result: no" >&5
3131 echo "${ECHO_T}no" >&6
3132 fi
3133
3134                 ;;
3135         esac
3136 fi
3137
3138 echo "$as_me:3138: checking if you want to ensure bool is consistent with C++" >&5
3139 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3140
3141 # Check whether --with-cxx or --without-cxx was given.
3142 if test "${with_cxx+set}" = set; then
3143   withval="$with_cxx"
3144   cf_with_cxx=$withval
3145 else
3146   cf_with_cxx=yes
3147 fi;
3148 echo "$as_me:3148: result: $cf_with_cxx" >&5
3149 echo "${ECHO_T}$cf_with_cxx" >&6
3150 if test "X$cf_with_cxx" = Xno ; then
3151         CXX=""
3152         GXX=""
3153 else
3154         # with autoconf 2.13, we can change the error to a warning:
3155                 ac_ext=cc
3156 ac_cpp='$CXXCPP $CPPFLAGS'
3157 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3158 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3159 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3160 ac_main_return="return"
3161 if test -n "$ac_tool_prefix"; then
3162   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3163   do
3164     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3165 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3166 echo "$as_me:3166: checking for $ac_word" >&5
3167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3168 if test "${ac_cv_prog_CXX+set}" = set; then
3169   echo $ECHO_N "(cached) $ECHO_C" >&6
3170 else
3171   if test -n "$CXX"; then
3172   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3173 else
3174   ac_save_IFS=$IFS; IFS=$ac_path_separator
3175 ac_dummy="$PATH"
3176 for ac_dir in $ac_dummy; do
3177   IFS=$ac_save_IFS
3178   test -z "$ac_dir" && ac_dir=.
3179   $as_executable_p "$ac_dir/$ac_word" || continue
3180 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3181 echo "$as_me:3181: found $ac_dir/$ac_word" >&5
3182 break
3183 done
3184
3185 fi
3186 fi
3187 CXX=$ac_cv_prog_CXX
3188 if test -n "$CXX"; then
3189   echo "$as_me:3189: result: $CXX" >&5
3190 echo "${ECHO_T}$CXX" >&6
3191 else
3192   echo "$as_me:3192: result: no" >&5
3193 echo "${ECHO_T}no" >&6
3194 fi
3195
3196     test -n "$CXX" && break
3197   done
3198 fi
3199 if test -z "$CXX"; then
3200   ac_ct_CXX=$CXX
3201   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3202 do
3203   # Extract the first word of "$ac_prog", so it can be a program name with args.
3204 set dummy $ac_prog; ac_word=$2
3205 echo "$as_me:3205: checking for $ac_word" >&5
3206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3208   echo $ECHO_N "(cached) $ECHO_C" >&6
3209 else
3210   if test -n "$ac_ct_CXX"; then
3211   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3212 else
3213   ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 ac_dummy="$PATH"
3215 for ac_dir in $ac_dummy; do
3216   IFS=$ac_save_IFS
3217   test -z "$ac_dir" && ac_dir=.
3218   $as_executable_p "$ac_dir/$ac_word" || continue
3219 ac_cv_prog_ac_ct_CXX="$ac_prog"
3220 echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221 break
3222 done
3223
3224 fi
3225 fi
3226 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3227 if test -n "$ac_ct_CXX"; then
3228   echo "$as_me:3228: result: $ac_ct_CXX" >&5
3229 echo "${ECHO_T}$ac_ct_CXX" >&6
3230 else
3231   echo "$as_me:3231: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3233 fi
3234
3235   test -n "$ac_ct_CXX" && break
3236 done
3237 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3238
3239   CXX=$ac_ct_CXX
3240 fi
3241
3242 # Provide some information about the compiler.
3243 echo "$as_me:3243:" \
3244      "checking for C++ compiler version" >&5
3245 ac_compiler=`set X $ac_compile; echo $2`
3246 { (eval echo "$as_me:3246: \"$ac_compiler --version </dev/null >&5\"") >&5
3247   (eval $ac_compiler --version </dev/null >&5) 2>&5
3248   ac_status=$?
3249   echo "$as_me:3249: \$? = $ac_status" >&5
3250   (exit "$ac_status"); }
3251 { (eval echo "$as_me:3251: \"$ac_compiler -v </dev/null >&5\"") >&5
3252   (eval $ac_compiler -v </dev/null >&5) 2>&5
3253   ac_status=$?
3254   echo "$as_me:3254: \$? = $ac_status" >&5
3255   (exit "$ac_status"); }
3256 { (eval echo "$as_me:3256: \"$ac_compiler -V </dev/null >&5\"") >&5
3257   (eval $ac_compiler -V </dev/null >&5) 2>&5
3258   ac_status=$?
3259   echo "$as_me:3259: \$? = $ac_status" >&5
3260   (exit "$ac_status"); }
3261
3262 echo "$as_me:3262: checking whether we are using the GNU C++ compiler" >&5
3263 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3264 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3265   echo $ECHO_N "(cached) $ECHO_C" >&6
3266 else
3267   cat >"conftest.$ac_ext" <<_ACEOF
3268 #line 3268 "configure"
3269 #include "confdefs.h"
3270
3271 int
3272 main (void)
3273 {
3274 #ifndef __GNUC__
3275        choke me
3276 #endif
3277
3278   ;
3279   return 0;
3280 }
3281 _ACEOF
3282 rm -f "conftest.$ac_objext"
3283 if { (eval echo "$as_me:3283: \"$ac_compile\"") >&5
3284   (eval $ac_compile) 2>&5
3285   ac_status=$?
3286   echo "$as_me:3286: \$? = $ac_status" >&5
3287   (exit "$ac_status"); } &&
3288          { ac_try='test -s "conftest.$ac_objext"'
3289   { (eval echo "$as_me:3289: \"$ac_try\"") >&5
3290   (eval $ac_try) 2>&5
3291   ac_status=$?
3292   echo "$as_me:3292: \$? = $ac_status" >&5
3293   (exit "$ac_status"); }; }; then
3294   ac_compiler_gnu=yes
3295 else
3296   echo "$as_me: failed program was:" >&5
3297 cat "conftest.$ac_ext" >&5
3298 ac_compiler_gnu=no
3299 fi
3300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3301 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3302
3303 fi
3304 echo "$as_me:3304: result: $ac_cv_cxx_compiler_gnu" >&5
3305 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3306 GXX=`test $ac_compiler_gnu = yes && echo yes`
3307 ac_test_CXXFLAGS=${CXXFLAGS+set}
3308 ac_save_CXXFLAGS=$CXXFLAGS
3309 CXXFLAGS="-g"
3310 echo "$as_me:3310: checking whether $CXX accepts -g" >&5
3311 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3312 if test "${ac_cv_prog_cxx_g+set}" = set; then
3313   echo $ECHO_N "(cached) $ECHO_C" >&6
3314 else
3315   cat >"conftest.$ac_ext" <<_ACEOF
3316 #line 3316 "configure"
3317 #include "confdefs.h"
3318
3319 int
3320 main (void)
3321 {
3322
3323   ;
3324   return 0;
3325 }
3326 _ACEOF
3327 rm -f "conftest.$ac_objext"
3328 if { (eval echo "$as_me:3328: \"$ac_compile\"") >&5
3329   (eval $ac_compile) 2>&5
3330   ac_status=$?
3331   echo "$as_me:3331: \$? = $ac_status" >&5
3332   (exit "$ac_status"); } &&
3333          { ac_try='test -s "conftest.$ac_objext"'
3334   { (eval echo "$as_me:3334: \"$ac_try\"") >&5
3335   (eval $ac_try) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit "$ac_status"); }; }; then
3339   ac_cv_prog_cxx_g=yes
3340 else
3341   echo "$as_me: failed program was:" >&5
3342 cat "conftest.$ac_ext" >&5
3343 ac_cv_prog_cxx_g=no
3344 fi
3345 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3346 fi
3347 echo "$as_me:3347: result: $ac_cv_prog_cxx_g" >&5
3348 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3349 if test "$ac_test_CXXFLAGS" = set; then
3350   CXXFLAGS=$ac_save_CXXFLAGS
3351 elif test $ac_cv_prog_cxx_g = yes; then
3352   if test "$GXX" = yes; then
3353     CXXFLAGS="-g -O2"
3354   else
3355     CXXFLAGS="-g"
3356   fi
3357 else
3358   if test "$GXX" = yes; then
3359     CXXFLAGS="-O2"
3360   else
3361     CXXFLAGS=
3362   fi
3363 fi
3364 for ac_declaration in \
3365    ''\
3366    '#include <stdlib.h>' \
3367    'extern "C" void std::exit (int) throw (); using std::exit;' \
3368    'extern "C" void std::exit (int); using std::exit;' \
3369    'extern "C" void exit (int) throw ();' \
3370    'extern "C" void exit (int);' \
3371    'void exit (int);'
3372 do
3373   cat >"conftest.$ac_ext" <<_ACEOF
3374 #line 3374 "configure"
3375 #include "confdefs.h"
3376 #include <stdlib.h>
3377 $ac_declaration
3378 int
3379 main (void)
3380 {
3381 exit (42);
3382   ;
3383   return 0;
3384 }
3385 _ACEOF
3386 rm -f "conftest.$ac_objext"
3387 if { (eval echo "$as_me:3387: \"$ac_compile\"") >&5
3388   (eval $ac_compile) 2>&5
3389   ac_status=$?
3390   echo "$as_me:3390: \$? = $ac_status" >&5
3391   (exit "$ac_status"); } &&
3392          { ac_try='test -s "conftest.$ac_objext"'
3393   { (eval echo "$as_me:3393: \"$ac_try\"") >&5
3394   (eval $ac_try) 2>&5
3395   ac_status=$?
3396   echo "$as_me:3396: \$? = $ac_status" >&5
3397   (exit "$ac_status"); }; }; then
3398   :
3399 else
3400   echo "$as_me: failed program was:" >&5
3401 cat "conftest.$ac_ext" >&5
3402 continue
3403 fi
3404 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3405   cat >"conftest.$ac_ext" <<_ACEOF
3406 #line 3406 "configure"
3407 #include "confdefs.h"
3408 $ac_declaration
3409 int
3410 main (void)
3411 {
3412 exit (42);
3413   ;
3414   return 0;
3415 }
3416 _ACEOF
3417 rm -f "conftest.$ac_objext"
3418 if { (eval echo "$as_me:3418: \"$ac_compile\"") >&5
3419   (eval $ac_compile) 2>&5
3420   ac_status=$?
3421   echo "$as_me:3421: \$? = $ac_status" >&5
3422   (exit "$ac_status"); } &&
3423          { ac_try='test -s "conftest.$ac_objext"'
3424   { (eval echo "$as_me:3424: \"$ac_try\"") >&5
3425   (eval $ac_try) 2>&5
3426   ac_status=$?
3427   echo "$as_me:3427: \$? = $ac_status" >&5
3428   (exit "$ac_status"); }; }; then
3429   break
3430 else
3431   echo "$as_me: failed program was:" >&5
3432 cat "conftest.$ac_ext" >&5
3433 fi
3434 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3435 done
3436 rm -rf conftest*
3437 if test -n "$ac_declaration"; then
3438   echo '#ifdef __cplusplus' >>confdefs.h
3439   echo "$ac_declaration"    >>confdefs.h
3440   echo '#endif'             >>confdefs.h
3441 fi
3442
3443 ac_ext=c
3444 ac_cpp='$CPP $CPPFLAGS'
3445 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3446 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3448 ac_main_return="return"
3449
3450         ac_ext=cc
3451 ac_cpp='$CXXCPP $CPPFLAGS'
3452 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3453 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3454 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3455 ac_main_return="return"
3456
3457         if test "x$cf_with_cxx" != xno
3458         then
3459                 # Several of the C++ configurations do not work, particularly when
3460                 # cross-compiling (20140913 -TD)
3461                 echo "$as_me:3461: checking if $CXX works" >&5
3462 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3463
3464                 save_CPPFLAGS="$CPPFLAGS"
3465                 eval cf_includedir=${includedir}
3466                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3467
3468 cat >"conftest.$ac_ext" <<_ACEOF
3469 #line 3469 "configure"
3470 #include "confdefs.h"
3471
3472 #include <stdlib.h>
3473 #include <stdio.h>
3474
3475 int
3476 main (void)
3477 {
3478
3479                 printf("Hello world!\n")
3480
3481   ;
3482   return 0;
3483 }
3484 _ACEOF
3485 rm -f "conftest.$ac_objext"
3486 if { (eval echo "$as_me:3486: \"$ac_compile\"") >&5
3487   (eval $ac_compile) 2>&5
3488   ac_status=$?
3489   echo "$as_me:3489: \$? = $ac_status" >&5
3490   (exit "$ac_status"); } &&
3491          { ac_try='test -s "conftest.$ac_objext"'
3492   { (eval echo "$as_me:3492: \"$ac_try\"") >&5
3493   (eval $ac_try) 2>&5
3494   ac_status=$?
3495   echo "$as_me:3495: \$? = $ac_status" >&5
3496   (exit "$ac_status"); }; }; then
3497   cf_cxx_works=yes
3498 else
3499   echo "$as_me: failed program was:" >&5
3500 cat "conftest.$ac_ext" >&5
3501 cf_cxx_works=no
3502 fi
3503 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3504                 CPPFLAGS="$save_CPPFLAGS"
3505
3506                 echo "$as_me:3506: result: $cf_cxx_works" >&5
3507 echo "${ECHO_T}$cf_cxx_works" >&6
3508                 if test "x$cf_cxx_works" = xno
3509                 then
3510                         { echo "$as_me:3510: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3511 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3512                         cf_with_cxx=no; CXX=""; GXX="";
3513                 fi
3514         fi
3515         ac_ext=c
3516 ac_cpp='$CPP $CPPFLAGS'
3517 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3518 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3519 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3520 ac_main_return="return"
3521
3522         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3523         if test "$CXX" = "g++" ; then
3524                 # Extract the first word of "g++", so it can be a program name with args.
3525 set dummy g++; ac_word=$2
3526 echo "$as_me:3526: checking for $ac_word" >&5
3527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3528 if test "${ac_cv_path_CXX+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   case $CXX in
3532   [\\/]* | ?:[\\/]*)
3533   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3534   ;;
3535   *)
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   if $as_executable_p "$ac_dir/$ac_word"; then
3542    ac_cv_path_CXX="$ac_dir/$ac_word"
3543    echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544    break
3545 fi
3546 done
3547
3548   ;;
3549 esac
3550 fi
3551 CXX=$ac_cv_path_CXX
3552
3553 if test -n "$CXX"; then
3554   echo "$as_me:3554: result: $CXX" >&5
3555 echo "${ECHO_T}$CXX" >&6
3556 else
3557   echo "$as_me:3557: result: no" >&5
3558 echo "${ECHO_T}no" >&6
3559 fi
3560
3561         fi
3562         case "x$CXX" in
3563         (x|xg++)
3564                 { echo "$as_me:3564: WARNING: You don't have any C++ compiler, too bad" >&5
3565 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3566                 cf_with_cxx=no; CXX=""; GXX="";
3567                 ;;
3568         esac
3569 fi
3570
3571 GXX_VERSION=none
3572 if test "$GXX" = yes; then
3573         echo "$as_me:3573: checking version of ${CXX:-g++}" >&5
3574 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3575         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3576         if test -z "$GXX_VERSION"
3577         then
3578                 GXX_VERSION=unknown
3579                 GXX=no
3580         fi
3581         echo "$as_me:3581: result: $GXX_VERSION" >&5
3582 echo "${ECHO_T}$GXX_VERSION" >&6
3583 fi
3584
3585 case "$GXX_VERSION" in
3586 ([1-9][0-9].*)
3587         ;;
3588 (1.*|2.[0-6]*)
3589         { echo "$as_me:3589: WARNING: templates do not work" >&5
3590 echo "$as_me: WARNING: templates do not work" >&2;}
3591         ;;
3592 esac
3593
3594 echo "$as_me:3594: checking if you want to build C++ binding and demo" >&5
3595 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3596
3597 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3598 if test "${with_cxx_binding+set}" = set; then
3599   withval="$with_cxx_binding"
3600   cf_with_cxx_binding=$withval
3601 else
3602   cf_with_cxx_binding=$cf_with_cxx
3603 fi;
3604 echo "$as_me:3604: result: $cf_with_cxx_binding" >&5
3605 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3606
3607 echo "$as_me:3607: checking if you want to build with Ada" >&5
3608 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3609 echo "$as_me:3609: result: $cf_with_ada" >&5
3610 echo "${ECHO_T}$cf_with_ada" >&6
3611
3612 echo "$as_me:3612: checking if you want to install terminal database" >&5
3613 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3614
3615 # Check whether --enable-db-install or --disable-db-install was given.
3616 if test "${enable_db_install+set}" = set; then
3617   enableval="$enable_db_install"
3618   cf_with_db_install=$enableval
3619 else
3620   cf_with_db_install=yes
3621 fi;
3622 echo "$as_me:3622: result: $cf_with_db_install" >&5
3623 echo "${ECHO_T}$cf_with_db_install" >&6
3624
3625 echo "$as_me:3625: checking if you want to install manpages" >&5
3626 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3627
3628 # Check whether --with-manpages or --without-manpages was given.
3629 if test "${with_manpages+set}" = set; then
3630   withval="$with_manpages"
3631   cf_with_manpages=$withval
3632 else
3633   cf_with_manpages=yes
3634 fi;
3635 echo "$as_me:3635: result: $cf_with_manpages" >&5
3636 echo "${ECHO_T}$cf_with_manpages" >&6
3637
3638 echo "$as_me:3638: checking if you want to build programs such as tic" >&5
3639 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3640
3641 # Check whether --with-progs or --without-progs was given.
3642 if test "${with_progs+set}" = set; then
3643   withval="$with_progs"
3644   cf_with_progs=$withval
3645 else
3646   cf_with_progs=yes
3647 fi;
3648 echo "$as_me:3648: result: $cf_with_progs" >&5
3649 echo "${ECHO_T}$cf_with_progs" >&6
3650
3651 if test -f "$srcdir/tack/tack.h" ; then
3652         if test "x$cross_compiling" = xyes ; then
3653                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3654
3655 echo "${as_me:-configure}:3655: testing ignoring tack because we are cross-compiling ..." 1>&5
3656
3657                 cf_with_tack=no
3658         else
3659                 echo "$as_me:3659: checking if you want to build the tack program" >&5
3660 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3661
3662 # Check whether --with-tack or --without-tack was given.
3663 if test "${with_tack+set}" = set; then
3664   withval="$with_tack"
3665   cf_with_tack=$withval
3666 else
3667   cf_with_tack=$cf_with_progs
3668 fi;
3669                 echo "$as_me:3669: result: $cf_with_tack" >&5
3670 echo "${ECHO_T}$cf_with_tack" >&6
3671         fi
3672 else
3673         cf_with_tack=no
3674 fi
3675
3676 echo "$as_me:3676: checking if you want to build test-programs" >&5
3677 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3678
3679 # Check whether --with-tests or --without-tests was given.
3680 if test "${with_tests+set}" = set; then
3681   withval="$with_tests"
3682   cf_with_tests=$withval
3683 else
3684   cf_with_tests=yes
3685 fi;
3686 echo "$as_me:3686: result: $cf_with_tests" >&5
3687 echo "${ECHO_T}$cf_with_tests" >&6
3688
3689 echo "$as_me:3689: checking if you wish to install curses.h" >&5
3690 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3691
3692 # Check whether --with-curses-h or --without-curses-h was given.
3693 if test "${with_curses_h+set}" = set; then
3694   withval="$with_curses_h"
3695   with_curses_h=$withval
3696 else
3697   with_curses_h=yes
3698 fi;
3699 echo "$as_me:3699: result: $with_curses_h" >&5
3700 echo "${ECHO_T}$with_curses_h" >&6
3701
3702 modules_to_build="ncurses"
3703 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3704 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3705 modules_to_build="$modules_to_build panel menu form"
3706
3707 test "$program_prefix" != NONE &&
3708   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3709 # Use a double $ so make ignores it.
3710 test "$program_suffix" != NONE &&
3711   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3712 # Double any \ or $.  echo might interpret backslashes.
3713 # By default was `s,x,x', remove it if useless.
3714 cat <<\_ACEOF >conftest.sed
3715 s/[\\$]/&&/g;s/;s,x,x,$//
3716 _ACEOF
3717 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3718 rm conftest.sed
3719
3720 for ac_prog in mawk gawk nawk awk
3721 do
3722   # Extract the first word of "$ac_prog", so it can be a program name with args.
3723 set dummy $ac_prog; ac_word=$2
3724 echo "$as_me:3724: checking for $ac_word" >&5
3725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3726 if test "${ac_cv_prog_AWK+set}" = set; then
3727   echo $ECHO_N "(cached) $ECHO_C" >&6
3728 else
3729   if test -n "$AWK"; then
3730   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3731 else
3732   ac_save_IFS=$IFS; IFS=$ac_path_separator
3733 ac_dummy="$PATH"
3734 for ac_dir in $ac_dummy; do
3735   IFS=$ac_save_IFS
3736   test -z "$ac_dir" && ac_dir=.
3737   $as_executable_p "$ac_dir/$ac_word" || continue
3738 ac_cv_prog_AWK="$ac_prog"
3739 echo "$as_me:3739: found $ac_dir/$ac_word" >&5
3740 break
3741 done
3742
3743 fi
3744 fi
3745 AWK=$ac_cv_prog_AWK
3746 if test -n "$AWK"; then
3747   echo "$as_me:3747: result: $AWK" >&5
3748 echo "${ECHO_T}$AWK" >&6
3749 else
3750   echo "$as_me:3750: result: no" >&5
3751 echo "${ECHO_T}no" >&6
3752 fi
3753
3754   test -n "$AWK" && break
3755 done
3756
3757 test -z "$AWK" && { { echo "$as_me:3757: error: No awk program found" >&5
3758 echo "$as_me: error: No awk program found" >&2;}
3759    { (exit 1); exit 1; }; }
3760
3761 # Find a good install program.  We prefer a C program (faster),
3762 # so one script is as good as another.  But avoid the broken or
3763 # incompatible versions:
3764 # SysV /etc/install, /usr/sbin/install
3765 # SunOS /usr/etc/install
3766 # IRIX /sbin/install
3767 # AIX /bin/install
3768 # AmigaOS /C/install, which installs bootblocks on floppy discs
3769 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3770 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3771 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3772 # ./install, which can be erroneously created by make from ./install.sh.
3773 echo "$as_me:3773: checking for a BSD compatible install" >&5
3774 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3775 if test -z "$INSTALL"; then
3776 if test "${ac_cv_path_install+set}" = set; then
3777   echo $ECHO_N "(cached) $ECHO_C" >&6
3778 else
3779     ac_save_IFS=$IFS; IFS=$ac_path_separator
3780   for ac_dir in $PATH; do
3781     IFS=$ac_save_IFS
3782     # Account for people who put trailing slashes in PATH elements.
3783     case $ac_dir/ in
3784     / | ./ | .// | /cC/* \
3785     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3786     | /usr/ucb/* ) ;;
3787     *)
3788       # OSF1 and SCO ODT 3.0 have their own names for install.
3789       # Don't use installbsd from OSF since it installs stuff as root
3790       # by default.
3791       for ac_prog in ginstall scoinst install; do
3792         if $as_executable_p "$ac_dir/$ac_prog"; then
3793           if test $ac_prog = install &&
3794             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3795             # AIX install.  It has an incompatible calling convention.
3796             :
3797           elif test $ac_prog = install &&
3798             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3799             # program-specific install script used by HP pwplus--don't use.
3800             :
3801           else
3802             ac_cv_path_install="$ac_dir/$ac_prog -c"
3803             break 2
3804           fi
3805         fi
3806       done
3807       ;;
3808     esac
3809   done
3810
3811 fi
3812   if test "${ac_cv_path_install+set}" = set; then
3813     INSTALL=$ac_cv_path_install
3814   else
3815     # As a last resort, use the slow shell script.  We don't cache a
3816     # path for INSTALL within a source directory, because that will
3817     # break other packages using the cache if that directory is
3818     # removed, or if the path is relative.
3819     INSTALL=$ac_install_sh
3820   fi
3821 fi
3822 echo "$as_me:3822: result: $INSTALL" >&5
3823 echo "${ECHO_T}$INSTALL" >&6
3824
3825 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3826 # It thinks the first close brace ends the variable substitution.
3827 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3828
3829 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3830
3831 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3832
3833 case $INSTALL in
3834 (/*)
3835         ;;
3836 (*)
3837         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3838         test -z "$cf_dir" && cf_dir=.
3839         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3840         ;;
3841 esac
3842
3843 for ac_prog in lint cppcheck splint
3844 do
3845   # Extract the first word of "$ac_prog", so it can be a program name with args.
3846 set dummy $ac_prog; ac_word=$2
3847 echo "$as_me:3847: checking for $ac_word" >&5
3848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3849 if test "${ac_cv_prog_LINT+set}" = set; then
3850   echo $ECHO_N "(cached) $ECHO_C" >&6
3851 else
3852   if test -n "$LINT"; then
3853   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3854 else
3855   ac_save_IFS=$IFS; IFS=$ac_path_separator
3856 ac_dummy="$PATH"
3857 for ac_dir in $ac_dummy; do
3858   IFS=$ac_save_IFS
3859   test -z "$ac_dir" && ac_dir=.
3860   $as_executable_p "$ac_dir/$ac_word" || continue
3861 ac_cv_prog_LINT="$ac_prog"
3862 echo "$as_me:3862: found $ac_dir/$ac_word" >&5
3863 break
3864 done
3865
3866 fi
3867 fi
3868 LINT=$ac_cv_prog_LINT
3869 if test -n "$LINT"; then
3870   echo "$as_me:3870: result: $LINT" >&5
3871 echo "${ECHO_T}$LINT" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877   test -n "$LINT" && break
3878 done
3879
3880 case "x$LINT" in
3881 (xcppcheck|x*/cppcheck)
3882         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3883         ;;
3884 esac
3885
3886 echo "$as_me:3886: checking whether ln -s works" >&5
3887 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3888 LN_S=$as_ln_s
3889 if test "$LN_S" = "ln -s"; then
3890   echo "$as_me:3890: result: yes" >&5
3891 echo "${ECHO_T}yes" >&6
3892 else
3893   echo "$as_me:3893: result: no, using $LN_S" >&5
3894 echo "${ECHO_T}no, using $LN_S" >&6
3895 fi
3896
3897 echo "$as_me:3897: checking if $LN_S -f options work" >&5
3898 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3899
3900 rm -f conf$$.src conf$$dst
3901 echo >conf$$.dst
3902 echo first >conf$$.src
3903 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3904         cf_prog_ln_sf=yes
3905 else
3906         cf_prog_ln_sf=no
3907 fi
3908 rm -f conf$$.dst conf$$src
3909 echo "$as_me:3909: result: $cf_prog_ln_sf" >&5
3910 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3911
3912 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3913
3914 echo "$as_me:3914: checking for long file names" >&5
3915 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3916 if test "${ac_cv_sys_long_file_names+set}" = set; then
3917   echo $ECHO_N "(cached) $ECHO_C" >&6
3918 else
3919   ac_cv_sys_long_file_names=yes
3920 # Test for long file names in all the places we know might matter:
3921 #      .                the current directory, where building will happen
3922 #      $prefix/lib      where we will be installing things
3923 #      $exec_prefix/lib likewise
3924 # eval it to expand exec_prefix.
3925 #      $TMPDIR          if set, where it might want to write temporary files
3926 # if $TMPDIR is not set:
3927 #      /tmp             where it might want to write temporary files
3928 #      /var/tmp         likewise
3929 #      /usr/tmp         likewise
3930 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3931   ac_tmpdirs=$TMPDIR
3932 else
3933   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3934 fi
3935 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3936   test -d "$ac_dir" || continue
3937   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3938   ac_xdir=$ac_dir/cf$$
3939   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3940   ac_tf1=$ac_xdir/conftest9012345
3941   ac_tf2=$ac_xdir/conftest9012346
3942   (echo 1 >"$ac_tf1") 2>/dev/null
3943   (echo 2 >"$ac_tf2") 2>/dev/null
3944   ac_val=`cat "$ac_tf1" 2>/dev/null`
3945   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3946     ac_cv_sys_long_file_names=no
3947     rm -rf "$ac_xdir" 2>/dev/null
3948     break
3949   fi
3950   rm -rf "$ac_xdir" 2>/dev/null
3951 done
3952 fi
3953 echo "$as_me:3953: result: $ac_cv_sys_long_file_names" >&5
3954 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3955 if test "$ac_cv_sys_long_file_names" = yes; then
3956
3957 cat >>confdefs.h <<\EOF
3958 #define HAVE_LONG_FILE_NAMES 1
3959 EOF
3960
3961 fi
3962
3963 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3964 # of package conflict.
3965 cf_config_suffix=
3966
3967 # Check whether --with-config-suffix or --without-config-suffix was given.
3968 if test "${with_config_suffix+set}" = set; then
3969   withval="$with_config_suffix"
3970   case "x$withval" in
3971         (xyes|xno)
3972                 { echo "$as_me:3972: WARNING: expected a value for config-suffix option" >&5
3973 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3974                 ;;
3975         (*)     cf_config_suffix="$withval"
3976                 ;;
3977         esac
3978 fi;
3979
3980 # If we find pkg-config, check if we should install the ".pc" files.
3981
3982 echo "$as_me:3982: checking if you want to use pkg-config" >&5
3983 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3984
3985 # Check whether --with-pkg-config or --without-pkg-config was given.
3986 if test "${with_pkg_config+set}" = set; then
3987   withval="$with_pkg_config"
3988   cf_pkg_config=$withval
3989 else
3990   cf_pkg_config=yes
3991 fi;
3992 echo "$as_me:3992: result: $cf_pkg_config" >&5
3993 echo "${ECHO_T}$cf_pkg_config" >&6
3994
3995 case "$cf_pkg_config" in
3996 (no)
3997         PKG_CONFIG=none
3998         ;;
3999 (yes)
4000
4001 if test -n "$ac_tool_prefix"; then
4002   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4003 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4004 echo "$as_me:4004: checking for $ac_word" >&5
4005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4006 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4007   echo $ECHO_N "(cached) $ECHO_C" >&6
4008 else
4009   case $PKG_CONFIG in
4010   [\\/]* | ?:[\\/]*)
4011   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4012   ;;
4013   *)
4014   ac_save_IFS=$IFS; IFS=$ac_path_separator
4015 ac_dummy="$PATH"
4016 for ac_dir in $ac_dummy; do
4017   IFS=$ac_save_IFS
4018   test -z "$ac_dir" && ac_dir=.
4019   if $as_executable_p "$ac_dir/$ac_word"; then
4020    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4021    echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4022    break
4023 fi
4024 done
4025
4026   ;;
4027 esac
4028 fi
4029 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4030
4031 if test -n "$PKG_CONFIG"; then
4032   echo "$as_me:4032: result: $PKG_CONFIG" >&5
4033 echo "${ECHO_T}$PKG_CONFIG" >&6
4034 else
4035   echo "$as_me:4035: result: no" >&5
4036 echo "${ECHO_T}no" >&6
4037 fi
4038
4039 fi
4040 if test -z "$ac_cv_path_PKG_CONFIG"; then
4041   ac_pt_PKG_CONFIG=$PKG_CONFIG
4042   # Extract the first word of "pkg-config", so it can be a program name with args.
4043 set dummy pkg-config; ac_word=$2
4044 echo "$as_me:4044: checking for $ac_word" >&5
4045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4046 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4047   echo $ECHO_N "(cached) $ECHO_C" >&6
4048 else
4049   case $ac_pt_PKG_CONFIG in
4050   [\\/]* | ?:[\\/]*)
4051   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4052   ;;
4053   *)
4054   ac_save_IFS=$IFS; IFS=$ac_path_separator
4055 ac_dummy="$PATH"
4056 for ac_dir in $ac_dummy; do
4057   IFS=$ac_save_IFS
4058   test -z "$ac_dir" && ac_dir=.
4059   if $as_executable_p "$ac_dir/$ac_word"; then
4060    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4061    echo "$as_me:4061: found $ac_dir/$ac_word" >&5
4062    break
4063 fi
4064 done
4065
4066   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4067   ;;
4068 esac
4069 fi
4070 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4071
4072 if test -n "$ac_pt_PKG_CONFIG"; then
4073   echo "$as_me:4073: result: $ac_pt_PKG_CONFIG" >&5
4074 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4075 else
4076   echo "$as_me:4076: result: no" >&5
4077 echo "${ECHO_T}no" >&6
4078 fi
4079
4080   PKG_CONFIG=$ac_pt_PKG_CONFIG
4081 else
4082   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4083 fi
4084
4085         ;;
4086 (*)
4087         PKG_CONFIG=$withval
4088         ;;
4089 esac
4090
4091 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4092 if test "$PKG_CONFIG" != none ; then
4093
4094 if test "x$prefix" != xNONE; then
4095         cf_path_syntax="$prefix"
4096 else
4097         cf_path_syntax="$ac_default_prefix"
4098 fi
4099
4100 case ".$PKG_CONFIG" in
4101 (.\$\(*\)*|.\'*\'*)
4102         ;;
4103 (..|./*|.\\*)
4104         ;;
4105 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4106         ;;
4107 (.\$\{*prefix\}*|.\$\{*dir\}*)
4108         eval PKG_CONFIG="$PKG_CONFIG"
4109         case ".$PKG_CONFIG" in
4110         (.NONE/*)
4111                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4112                 ;;
4113         esac
4114         ;;
4115 (.no|.NONE/*)
4116         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4117         ;;
4118 (*)
4119         { { echo "$as_me:4119: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4120 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4121    { (exit 1); exit 1; }; }
4122         ;;
4123 esac
4124
4125 elif test "x$cf_pkg_config" != xno ; then
4126         { echo "$as_me:4126: WARNING: pkg-config is not installed" >&5
4127 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4128 fi
4129
4130 case "$PKG_CONFIG" in
4131 (no|none|yes)
4132         echo "$as_me:4132: checking for pkg-config library directory" >&5
4133 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4134         ;;
4135 (*)
4136         echo "$as_me:4136: checking for $PKG_CONFIG library directory" >&5
4137 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4138         ;;
4139 esac
4140
4141 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,'`
4142
4143 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4144 if test "${with_pkg_config_libdir+set}" = set; then
4145   withval="$with_pkg_config_libdir"
4146   cf_search_path=$withval
4147 else
4148   test "x$PKG_CONFIG" != xnone && cf_search_path=yes
4149 fi;
4150
4151 case x$cf_search_path in
4152 (x/*)
4153         ;;
4154 (xyes)
4155         cf_search_path=
4156         test -n "$verbose" && echo "    auto..." 1>&6
4157
4158 echo "${as_me:-configure}:4158: testing auto... ..." 1>&5
4159
4160         # Look for the library directory using the same prefix as the executable
4161         echo "$as_me:4161: checking for search-list" >&5
4162 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4163         if test "x$PKG_CONFIG" != xnone
4164         then
4165                 # works for pkg-config since version 0.24 (2009)
4166                 cf_pkg_program=`echo "$PKG_CONFIG" | sed -e 's,^.*/,,'`
4167                 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4168
4169                 # works for pkgconf since version 0.8.3 (2012)
4170                 test -z "$cf_search_path" && \
4171                 cf_search_path=`pkgconf --variable=pc_path pkgconf 2>/dev/null | tr : ' '`
4172
4173                 # works for pkg-config since import in 2005 of original 2001 HP code.
4174                 test -z "$cf_search_path" && \
4175                 cf_search_path=`
4176                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4177 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4178         sub(\"^[^']*'\",\"\"); \
4179         sub(\"'.*\",\"\"); \
4180         printf \" %s\", \\$0; } \
4181 { next; } \
4182 "`
4183         fi
4184
4185         echo "$as_me:4185: result: $cf_search_path" >&5
4186 echo "${ECHO_T}$cf_search_path" >&6
4187
4188         ;;
4189 (*)
4190         ;;
4191 esac
4192
4193 echo "$as_me:4193: checking for first directory" >&5
4194 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4195 cf_pkg_config_path=none
4196 for cf_config in $cf_search_path
4197 do
4198         if test -d "$cf_config"
4199         then
4200                 cf_pkg_config_path=$cf_config
4201                 break
4202         fi
4203 done
4204 echo "$as_me:4204: result: $cf_pkg_config_path" >&5
4205 echo "${ECHO_T}$cf_pkg_config_path" >&6
4206
4207 if test "x$cf_pkg_config_path" != xnone ; then
4208         # limit this to the first directory found
4209         PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4210 fi
4211
4212 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4213 then
4214         echo "$as_me:4214: checking for workaround" >&5
4215 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4216         if test "$prefix" = "NONE" ; then
4217                 cf_prefix="$ac_default_prefix"
4218         else
4219                 cf_prefix="$prefix"
4220         fi
4221         eval cf_libdir=$libdir
4222         cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4223         cf_backup=
4224         for cf_config in $cf_search_path
4225         do
4226                 case $cf_config in
4227                 $cf_libdir/pkgconfig)
4228                         PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4229                         break
4230                         ;;
4231                 *)
4232                         test -z "$cf_backup" && cf_backup=$cf_config
4233                         ;;
4234                 esac
4235         done
4236         test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4237         echo "$as_me:4237: result: $PKG_CONFIG_LIBDIR" >&5
4238 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4239 fi
4240
4241 if test "x$PKG_CONFIG" != xnone
4242 then
4243         echo "$as_me:4243: checking if we should install .pc files for $PKG_CONFIG" >&5
4244 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4245 else
4246         echo "$as_me:4246: checking if we should install .pc files" >&5
4247 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4248 fi
4249
4250 # Check whether --enable-pc-files or --disable-pc-files was given.
4251 if test "${enable_pc_files+set}" = set; then
4252   enableval="$enable_pc_files"
4253   enable_pc_files=$enableval
4254 else
4255   enable_pc_files=no
4256 fi;
4257 echo "$as_me:4257: result: $enable_pc_files" >&5
4258 echo "${ECHO_T}$enable_pc_files" >&6
4259
4260 if test "x$enable_pc_files" != xno
4261 then
4262         MAKE_PC_FILES=
4263         case "x$PKG_CONFIG_LIBDIR" in
4264         (xno|xnone|xyes|x)
4265                 { echo "$as_me:4265: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4266 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4267                 ;;
4268         (*)
4269
4270 if test "x$prefix" != xNONE; then
4271         cf_path_syntax="$prefix"
4272 else
4273         cf_path_syntax="$ac_default_prefix"
4274 fi
4275
4276 case ".$PKG_CONFIG_LIBDIR" in
4277 (.\$\(*\)*|.\'*\'*)
4278         ;;
4279 (..|./*|.\\*)
4280         ;;
4281 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4282         ;;
4283 (.\$\{*prefix\}*|.\$\{*dir\}*)
4284         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4285         case ".$PKG_CONFIG_LIBDIR" in
4286         (.NONE/*)
4287                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4288                 ;;
4289         esac
4290         ;;
4291 (.no|.NONE/*)
4292         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4293         ;;
4294 (*)
4295         { { echo "$as_me:4295: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4296 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4297    { (exit 1); exit 1; }; }
4298         ;;
4299 esac
4300
4301                 ;;
4302         esac
4303 else
4304         MAKE_PC_FILES="#"
4305 fi
4306
4307 if test -z "$MAKE_PC_FILES"
4308 then
4309         echo "$as_me:4309: checking for suffix to add to pc-files" >&5
4310 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4311
4312 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4313 if test "${with_pc_suffix+set}" = set; then
4314   withval="$with_pc_suffix"
4315   case "x$withval" in
4316         (xyes|xno)
4317                 PC_MODULE_SUFFIX=
4318                 ;;
4319         (*)     PC_MODULE_SUFFIX="$withval"
4320                 ;;
4321         esac
4322 fi;
4323         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4324         echo "$as_me:4324: result: $PC_MODULE_SUFFIX" >&5
4325 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4326         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4327
4328 fi
4329
4330 echo "$as_me:4330: checking if we should assume mixed-case filenames" >&5
4331 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4332
4333 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4334 if test "${enable_mixed_case+set}" = set; then
4335   enableval="$enable_mixed_case"
4336   enable_mixedcase=$enableval
4337 else
4338   enable_mixedcase=auto
4339 fi;
4340 echo "$as_me:4340: result: $enable_mixedcase" >&5
4341 echo "${ECHO_T}$enable_mixedcase" >&6
4342 if test "$enable_mixedcase" = "auto" ; then
4343
4344 echo "$as_me:4344: checking if filesystem supports mixed-case filenames" >&5
4345 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4346 if test "${cf_cv_mixedcase+set}" = set; then
4347   echo $ECHO_N "(cached) $ECHO_C" >&6
4348 else
4349
4350 if test "$cross_compiling" = yes ; then
4351         case "$target_alias" in
4352         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4353                 cf_cv_mixedcase=no
4354                 ;;
4355         (*)
4356                 cf_cv_mixedcase=yes
4357                 ;;
4358         esac
4359 else
4360         rm -f conftest CONFTEST
4361         echo test >conftest
4362         if test -f CONFTEST ; then
4363                 cf_cv_mixedcase=no
4364         else
4365                 cf_cv_mixedcase=yes
4366         fi
4367         rm -f conftest CONFTEST
4368 fi
4369
4370 fi
4371 echo "$as_me:4371: result: $cf_cv_mixedcase" >&5
4372 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4373 test "$cf_cv_mixedcase" = yes &&
4374 cat >>confdefs.h <<\EOF
4375 #define MIXEDCASE_FILENAMES 1
4376 EOF
4377
4378 else
4379         cf_cv_mixedcase=$enable_mixedcase
4380         if test "x$enable_mixedcase" = "xyes" ; then
4381
4382 cat >>confdefs.h <<\EOF
4383 #define MIXEDCASE_FILENAMES 1
4384 EOF
4385
4386         fi
4387 fi
4388
4389 # do this after mixed-case option (tags/TAGS is not as important as tic).
4390 echo "$as_me:4390: checking whether ${MAKE-make} sets \${MAKE}" >&5
4391 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4392 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4393 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4394   echo $ECHO_N "(cached) $ECHO_C" >&6
4395 else
4396   cat >conftest.make <<\EOF
4397 all:
4398         @echo 'ac_maketemp="${MAKE}"'
4399 EOF
4400 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4401 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4402 if test -n "$ac_maketemp"; then
4403   eval ac_cv_prog_make_${ac_make}_set=yes
4404 else
4405   eval ac_cv_prog_make_${ac_make}_set=no
4406 fi
4407 rm -f conftest.make
4408 fi
4409 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4410   echo "$as_me:4410: result: yes" >&5
4411 echo "${ECHO_T}yes" >&6
4412   SET_MAKE=
4413 else
4414   echo "$as_me:4414: result: no" >&5
4415 echo "${ECHO_T}no" >&6
4416   SET_MAKE="MAKE=${MAKE-make}"
4417 fi
4418
4419 echo "$as_me:4419: checking for \".PHONY\" make-support" >&5
4420 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4421 if test "${cf_cv_make_PHONY+set}" = set; then
4422   echo $ECHO_N "(cached) $ECHO_C" >&6
4423 else
4424
4425         rm -rf conftest*
4426         (
4427                 mkdir conftest || exit 1
4428                 cd conftest
4429                 cat >makefile <<'CF_EOF'
4430 .PHONY: always
4431 DATA=0
4432 always: always.out
4433         @echo "** making $@ $(DATA)"
4434 once: once.out
4435         @echo "** making $@ $(DATA)"
4436 always.out:
4437         @echo "** making $@ $(DATA)"
4438         echo $(DATA) > $@
4439 once.out:
4440         @echo "** making $@ $(DATA)"
4441         echo $(DATA) > $@
4442 CF_EOF
4443                 for cf_data in 1 2 3
4444                 do
4445                         ${MAKE:-make} always DATA=$cf_data
4446                         ${MAKE:-make} once   DATA=$cf_data
4447                         ${MAKE:-make} -t always once
4448                         if test -f always ; then
4449                                 echo "no (case 1)" > ../conftest.tmp
4450                         elif test ! -f always.out ; then
4451                                 echo "no (case 2)" > ../conftest.tmp
4452                         elif test ! -f once.out ; then
4453                                 echo "no (case 3)" > ../conftest.tmp
4454                         elif ! cmp -s always.out once.out ; then
4455                                 echo "no (case 4)" > ../conftest.tmp
4456                                 diff always.out once.out
4457                         else
4458                                 cf_check="`cat always.out`"
4459                                 if test "x$cf_check" != "x$cf_data" ; then
4460                                         echo "no (case 5)" > ../conftest.tmp
4461                                 else
4462                                         echo yes > ../conftest.tmp
4463                                         rm -f ./*.out
4464                                         continue
4465                                 fi
4466                         fi
4467                         break
4468                 done
4469         ) >&5 2>&1
4470         cf_cv_make_PHONY="`cat conftest.tmp`"
4471         rm -rf conftest*
4472
4473 fi
4474 echo "$as_me:4474: result: $cf_cv_make_PHONY" >&5
4475 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4476 MAKE_NO_PHONY="#"
4477 MAKE_PHONY="#"
4478 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4479 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4480
4481 for ac_prog in exctags ctags
4482 do
4483   # Extract the first word of "$ac_prog", so it can be a program name with args.
4484 set dummy $ac_prog; ac_word=$2
4485 echo "$as_me:4485: checking for $ac_word" >&5
4486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4487 if test "${ac_cv_prog_CTAGS+set}" = set; then
4488   echo $ECHO_N "(cached) $ECHO_C" >&6
4489 else
4490   if test -n "$CTAGS"; then
4491   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4492 else
4493   ac_save_IFS=$IFS; IFS=$ac_path_separator
4494 ac_dummy="$PATH"
4495 for ac_dir in $ac_dummy; do
4496   IFS=$ac_save_IFS
4497   test -z "$ac_dir" && ac_dir=.
4498   $as_executable_p "$ac_dir/$ac_word" || continue
4499 ac_cv_prog_CTAGS="$ac_prog"
4500 echo "$as_me:4500: found $ac_dir/$ac_word" >&5
4501 break
4502 done
4503
4504 fi
4505 fi
4506 CTAGS=$ac_cv_prog_CTAGS
4507 if test -n "$CTAGS"; then
4508   echo "$as_me:4508: result: $CTAGS" >&5
4509 echo "${ECHO_T}$CTAGS" >&6
4510 else
4511   echo "$as_me:4511: result: no" >&5
4512 echo "${ECHO_T}no" >&6
4513 fi
4514
4515   test -n "$CTAGS" && break
4516 done
4517
4518 for ac_prog in exetags etags
4519 do
4520   # Extract the first word of "$ac_prog", so it can be a program name with args.
4521 set dummy $ac_prog; ac_word=$2
4522 echo "$as_me:4522: checking for $ac_word" >&5
4523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4524 if test "${ac_cv_prog_ETAGS+set}" = set; then
4525   echo $ECHO_N "(cached) $ECHO_C" >&6
4526 else
4527   if test -n "$ETAGS"; then
4528   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4529 else
4530   ac_save_IFS=$IFS; IFS=$ac_path_separator
4531 ac_dummy="$PATH"
4532 for ac_dir in $ac_dummy; do
4533   IFS=$ac_save_IFS
4534   test -z "$ac_dir" && ac_dir=.
4535   $as_executable_p "$ac_dir/$ac_word" || continue
4536 ac_cv_prog_ETAGS="$ac_prog"
4537 echo "$as_me:4537: found $ac_dir/$ac_word" >&5
4538 break
4539 done
4540
4541 fi
4542 fi
4543 ETAGS=$ac_cv_prog_ETAGS
4544 if test -n "$ETAGS"; then
4545   echo "$as_me:4545: result: $ETAGS" >&5
4546 echo "${ECHO_T}$ETAGS" >&6
4547 else
4548   echo "$as_me:4548: result: no" >&5
4549 echo "${ECHO_T}no" >&6
4550 fi
4551
4552   test -n "$ETAGS" && break
4553 done
4554
4555 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4556 set dummy ${CTAGS:-ctags}; ac_word=$2
4557 echo "$as_me:4557: checking for $ac_word" >&5
4558 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4559 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4560   echo $ECHO_N "(cached) $ECHO_C" >&6
4561 else
4562   if test -n "$MAKE_LOWER_TAGS"; then
4563   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4564 else
4565   ac_save_IFS=$IFS; IFS=$ac_path_separator
4566 ac_dummy="$PATH"
4567 for ac_dir in $ac_dummy; do
4568   IFS=$ac_save_IFS
4569   test -z "$ac_dir" && ac_dir=.
4570   $as_executable_p "$ac_dir/$ac_word" || continue
4571 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4572 echo "$as_me:4572: found $ac_dir/$ac_word" >&5
4573 break
4574 done
4575
4576   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4577 fi
4578 fi
4579 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4580 if test -n "$MAKE_LOWER_TAGS"; then
4581   echo "$as_me:4581: result: $MAKE_LOWER_TAGS" >&5
4582 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4583 else
4584   echo "$as_me:4584: result: no" >&5
4585 echo "${ECHO_T}no" >&6
4586 fi
4587
4588 if test "$cf_cv_mixedcase" = yes ; then
4589         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4590 set dummy ${ETAGS:-etags}; ac_word=$2
4591 echo "$as_me:4591: checking for $ac_word" >&5
4592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4593 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4594   echo $ECHO_N "(cached) $ECHO_C" >&6
4595 else
4596   if test -n "$MAKE_UPPER_TAGS"; then
4597   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4598 else
4599   ac_save_IFS=$IFS; IFS=$ac_path_separator
4600 ac_dummy="$PATH"
4601 for ac_dir in $ac_dummy; do
4602   IFS=$ac_save_IFS
4603   test -z "$ac_dir" && ac_dir=.
4604   $as_executable_p "$ac_dir/$ac_word" || continue
4605 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4606 echo "$as_me:4606: found $ac_dir/$ac_word" >&5
4607 break
4608 done
4609
4610   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4611 fi
4612 fi
4613 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4614 if test -n "$MAKE_UPPER_TAGS"; then
4615   echo "$as_me:4615: result: $MAKE_UPPER_TAGS" >&5
4616 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4617 else
4618   echo "$as_me:4618: result: no" >&5
4619 echo "${ECHO_T}no" >&6
4620 fi
4621
4622 else
4623         MAKE_UPPER_TAGS=no
4624 fi
4625
4626 if test "$MAKE_UPPER_TAGS" = yes ; then
4627         MAKE_UPPER_TAGS=
4628 else
4629         MAKE_UPPER_TAGS="#"
4630 fi
4631
4632 if test "$MAKE_LOWER_TAGS" = yes ; then
4633         MAKE_LOWER_TAGS=
4634 else
4635         MAKE_LOWER_TAGS="#"
4636 fi
4637
4638 echo "$as_me:4638: checking for makeflags variable" >&5
4639 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4640 if test "${cf_cv_makeflags+set}" = set; then
4641   echo $ECHO_N "(cached) $ECHO_C" >&6
4642 else
4643
4644         cf_cv_makeflags=''
4645         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4646         do
4647                 cat >cf_makeflags.tmp <<CF_EOF
4648 SHELL = $SHELL
4649 all :
4650         @ echo '.$cf_option'
4651 CF_EOF
4652                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4653                 case "$cf_result" in
4654                 (.*k|.*kw)
4655                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4656                         case "$cf_result" in
4657                         (.*CC=*)        cf_cv_makeflags=
4658                                 ;;
4659                         (*)     cf_cv_makeflags=$cf_option
4660                                 ;;
4661                         esac
4662                         break
4663                         ;;
4664                 (.-)
4665                         ;;
4666                 (*)
4667
4668 echo "${as_me:-configure}:4668: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4669
4670                         ;;
4671                 esac
4672         done
4673         rm -f cf_makeflags.tmp
4674
4675 fi
4676 echo "$as_me:4676: result: $cf_cv_makeflags" >&5
4677 echo "${ECHO_T}$cf_cv_makeflags" >&6
4678
4679 if test -n "$ac_tool_prefix"; then
4680   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4681 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4682 echo "$as_me:4682: checking for $ac_word" >&5
4683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4684 if test "${ac_cv_prog_RANLIB+set}" = set; then
4685   echo $ECHO_N "(cached) $ECHO_C" >&6
4686 else
4687   if test -n "$RANLIB"; then
4688   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4689 else
4690   ac_save_IFS=$IFS; IFS=$ac_path_separator
4691 ac_dummy="$PATH"
4692 for ac_dir in $ac_dummy; do
4693   IFS=$ac_save_IFS
4694   test -z "$ac_dir" && ac_dir=.
4695   $as_executable_p "$ac_dir/$ac_word" || continue
4696 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4697 echo "$as_me:4697: found $ac_dir/$ac_word" >&5
4698 break
4699 done
4700
4701 fi
4702 fi
4703 RANLIB=$ac_cv_prog_RANLIB
4704 if test -n "$RANLIB"; then
4705   echo "$as_me:4705: result: $RANLIB" >&5
4706 echo "${ECHO_T}$RANLIB" >&6
4707 else
4708   echo "$as_me:4708: result: no" >&5
4709 echo "${ECHO_T}no" >&6
4710 fi
4711
4712 fi
4713 if test -z "$ac_cv_prog_RANLIB"; then
4714   ac_ct_RANLIB=$RANLIB
4715   # Extract the first word of "ranlib", so it can be a program name with args.
4716 set dummy ranlib; ac_word=$2
4717 echo "$as_me:4717: checking for $ac_word" >&5
4718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4719 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4720   echo $ECHO_N "(cached) $ECHO_C" >&6
4721 else
4722   if test -n "$ac_ct_RANLIB"; then
4723   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4724 else
4725   ac_save_IFS=$IFS; IFS=$ac_path_separator
4726 ac_dummy="$PATH"
4727 for ac_dir in $ac_dummy; do
4728   IFS=$ac_save_IFS
4729   test -z "$ac_dir" && ac_dir=.
4730   $as_executable_p "$ac_dir/$ac_word" || continue
4731 ac_cv_prog_ac_ct_RANLIB="ranlib"
4732 echo "$as_me:4732: found $ac_dir/$ac_word" >&5
4733 break
4734 done
4735
4736   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4737 fi
4738 fi
4739 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4740 if test -n "$ac_ct_RANLIB"; then
4741   echo "$as_me:4741: result: $ac_ct_RANLIB" >&5
4742 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4743 else
4744   echo "$as_me:4744: result: no" >&5
4745 echo "${ECHO_T}no" >&6
4746 fi
4747
4748   RANLIB=$ac_ct_RANLIB
4749 else
4750   RANLIB="$ac_cv_prog_RANLIB"
4751 fi
4752
4753 if test -n "$ac_tool_prefix"; then
4754   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4755 set dummy ${ac_tool_prefix}ld; ac_word=$2
4756 echo "$as_me:4756: checking for $ac_word" >&5
4757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4758 if test "${ac_cv_prog_LD+set}" = set; then
4759   echo $ECHO_N "(cached) $ECHO_C" >&6
4760 else
4761   if test -n "$LD"; then
4762   ac_cv_prog_LD="$LD" # Let the user override the test.
4763 else
4764   ac_save_IFS=$IFS; IFS=$ac_path_separator
4765 ac_dummy="$PATH"
4766 for ac_dir in $ac_dummy; do
4767   IFS=$ac_save_IFS
4768   test -z "$ac_dir" && ac_dir=.
4769   $as_executable_p "$ac_dir/$ac_word" || continue
4770 ac_cv_prog_LD="${ac_tool_prefix}ld"
4771 echo "$as_me:4771: found $ac_dir/$ac_word" >&5
4772 break
4773 done
4774
4775 fi
4776 fi
4777 LD=$ac_cv_prog_LD
4778 if test -n "$LD"; then
4779   echo "$as_me:4779: result: $LD" >&5
4780 echo "${ECHO_T}$LD" >&6
4781 else
4782   echo "$as_me:4782: result: no" >&5
4783 echo "${ECHO_T}no" >&6
4784 fi
4785
4786 fi
4787 if test -z "$ac_cv_prog_LD"; then
4788   ac_ct_LD=$LD
4789   # Extract the first word of "ld", so it can be a program name with args.
4790 set dummy ld; ac_word=$2
4791 echo "$as_me:4791: checking for $ac_word" >&5
4792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4793 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4794   echo $ECHO_N "(cached) $ECHO_C" >&6
4795 else
4796   if test -n "$ac_ct_LD"; then
4797   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4798 else
4799   ac_save_IFS=$IFS; IFS=$ac_path_separator
4800 ac_dummy="$PATH"
4801 for ac_dir in $ac_dummy; do
4802   IFS=$ac_save_IFS
4803   test -z "$ac_dir" && ac_dir=.
4804   $as_executable_p "$ac_dir/$ac_word" || continue
4805 ac_cv_prog_ac_ct_LD="ld"
4806 echo "$as_me:4806: found $ac_dir/$ac_word" >&5
4807 break
4808 done
4809
4810   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4811 fi
4812 fi
4813 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4814 if test -n "$ac_ct_LD"; then
4815   echo "$as_me:4815: result: $ac_ct_LD" >&5
4816 echo "${ECHO_T}$ac_ct_LD" >&6
4817 else
4818   echo "$as_me:4818: result: no" >&5
4819 echo "${ECHO_T}no" >&6
4820 fi
4821
4822   LD=$ac_ct_LD
4823 else
4824   LD="$ac_cv_prog_LD"
4825 fi
4826
4827 if test -n "$ac_tool_prefix"; then
4828   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4829 set dummy ${ac_tool_prefix}ar; ac_word=$2
4830 echo "$as_me:4830: checking for $ac_word" >&5
4831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4832 if test "${ac_cv_prog_AR+set}" = set; then
4833   echo $ECHO_N "(cached) $ECHO_C" >&6
4834 else
4835   if test -n "$AR"; then
4836   ac_cv_prog_AR="$AR" # Let the user override the test.
4837 else
4838   ac_save_IFS=$IFS; IFS=$ac_path_separator
4839 ac_dummy="$PATH"
4840 for ac_dir in $ac_dummy; do
4841   IFS=$ac_save_IFS
4842   test -z "$ac_dir" && ac_dir=.
4843   $as_executable_p "$ac_dir/$ac_word" || continue
4844 ac_cv_prog_AR="${ac_tool_prefix}ar"
4845 echo "$as_me:4845: found $ac_dir/$ac_word" >&5
4846 break
4847 done
4848
4849 fi
4850 fi
4851 AR=$ac_cv_prog_AR
4852 if test -n "$AR"; then
4853   echo "$as_me:4853: result: $AR" >&5
4854 echo "${ECHO_T}$AR" >&6
4855 else
4856   echo "$as_me:4856: result: no" >&5
4857 echo "${ECHO_T}no" >&6
4858 fi
4859
4860 fi
4861 if test -z "$ac_cv_prog_AR"; then
4862   ac_ct_AR=$AR
4863   # Extract the first word of "ar", so it can be a program name with args.
4864 set dummy ar; ac_word=$2
4865 echo "$as_me:4865: checking for $ac_word" >&5
4866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4867 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4868   echo $ECHO_N "(cached) $ECHO_C" >&6
4869 else
4870   if test -n "$ac_ct_AR"; then
4871   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4872 else
4873   ac_save_IFS=$IFS; IFS=$ac_path_separator
4874 ac_dummy="$PATH"
4875 for ac_dir in $ac_dummy; do
4876   IFS=$ac_save_IFS
4877   test -z "$ac_dir" && ac_dir=.
4878   $as_executable_p "$ac_dir/$ac_word" || continue
4879 ac_cv_prog_ac_ct_AR="ar"
4880 echo "$as_me:4880: found $ac_dir/$ac_word" >&5
4881 break
4882 done
4883
4884   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4885 fi
4886 fi
4887 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4888 if test -n "$ac_ct_AR"; then
4889   echo "$as_me:4889: result: $ac_ct_AR" >&5
4890 echo "${ECHO_T}$ac_ct_AR" >&6
4891 else
4892   echo "$as_me:4892: result: no" >&5
4893 echo "${ECHO_T}no" >&6
4894 fi
4895
4896   AR=$ac_ct_AR
4897 else
4898   AR="$ac_cv_prog_AR"
4899 fi
4900
4901 if test -n "$ac_tool_prefix"; then
4902   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4903 set dummy ${ac_tool_prefix}nm; ac_word=$2
4904 echo "$as_me:4904: checking for $ac_word" >&5
4905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4906 if test "${ac_cv_prog_NM+set}" = set; then
4907   echo $ECHO_N "(cached) $ECHO_C" >&6
4908 else
4909   if test -n "$NM"; then
4910   ac_cv_prog_NM="$NM" # Let the user override the test.
4911 else
4912   ac_save_IFS=$IFS; IFS=$ac_path_separator
4913 ac_dummy="$PATH"
4914 for ac_dir in $ac_dummy; do
4915   IFS=$ac_save_IFS
4916   test -z "$ac_dir" && ac_dir=.
4917   $as_executable_p "$ac_dir/$ac_word" || continue
4918 ac_cv_prog_NM="${ac_tool_prefix}nm"
4919 echo "$as_me:4919: found $ac_dir/$ac_word" >&5
4920 break
4921 done
4922
4923 fi
4924 fi
4925 NM=$ac_cv_prog_NM
4926 if test -n "$NM"; then
4927   echo "$as_me:4927: result: $NM" >&5
4928 echo "${ECHO_T}$NM" >&6
4929 else
4930   echo "$as_me:4930: result: no" >&5
4931 echo "${ECHO_T}no" >&6
4932 fi
4933
4934 fi
4935 if test -z "$ac_cv_prog_NM"; then
4936   ac_ct_NM=$NM
4937   # Extract the first word of "nm", so it can be a program name with args.
4938 set dummy nm; ac_word=$2
4939 echo "$as_me:4939: checking for $ac_word" >&5
4940 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4941 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4942   echo $ECHO_N "(cached) $ECHO_C" >&6
4943 else
4944   if test -n "$ac_ct_NM"; then
4945   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4946 else
4947   ac_save_IFS=$IFS; IFS=$ac_path_separator
4948 ac_dummy="$PATH"
4949 for ac_dir in $ac_dummy; do
4950   IFS=$ac_save_IFS
4951   test -z "$ac_dir" && ac_dir=.
4952   $as_executable_p "$ac_dir/$ac_word" || continue
4953 ac_cv_prog_ac_ct_NM="nm"
4954 echo "$as_me:4954: found $ac_dir/$ac_word" >&5
4955 break
4956 done
4957
4958   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4959 fi
4960 fi
4961 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4962 if test -n "$ac_ct_NM"; then
4963   echo "$as_me:4963: result: $ac_ct_NM" >&5
4964 echo "${ECHO_T}$ac_ct_NM" >&6
4965 else
4966   echo "$as_me:4966: result: no" >&5
4967 echo "${ECHO_T}no" >&6
4968 fi
4969
4970   NM=$ac_ct_NM
4971 else
4972   NM="$ac_cv_prog_NM"
4973 fi
4974
4975 if test -n "$ac_tool_prefix"; then
4976   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4977 set dummy ${ac_tool_prefix}ar; ac_word=$2
4978 echo "$as_me:4978: checking for $ac_word" >&5
4979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4980 if test "${ac_cv_prog_AR+set}" = set; then
4981   echo $ECHO_N "(cached) $ECHO_C" >&6
4982 else
4983   if test -n "$AR"; then
4984   ac_cv_prog_AR="$AR" # Let the user override the test.
4985 else
4986   ac_save_IFS=$IFS; IFS=$ac_path_separator
4987 ac_dummy="$PATH"
4988 for ac_dir in $ac_dummy; do
4989   IFS=$ac_save_IFS
4990   test -z "$ac_dir" && ac_dir=.
4991   $as_executable_p "$ac_dir/$ac_word" || continue
4992 ac_cv_prog_AR="${ac_tool_prefix}ar"
4993 echo "$as_me:4993: found $ac_dir/$ac_word" >&5
4994 break
4995 done
4996
4997 fi
4998 fi
4999 AR=$ac_cv_prog_AR
5000 if test -n "$AR"; then
5001   echo "$as_me:5001: result: $AR" >&5
5002 echo "${ECHO_T}$AR" >&6
5003 else
5004   echo "$as_me:5004: result: no" >&5
5005 echo "${ECHO_T}no" >&6
5006 fi
5007
5008 fi
5009 if test -z "$ac_cv_prog_AR"; then
5010   ac_ct_AR=$AR
5011   # Extract the first word of "ar", so it can be a program name with args.
5012 set dummy ar; ac_word=$2
5013 echo "$as_me:5013: checking for $ac_word" >&5
5014 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5015 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5016   echo $ECHO_N "(cached) $ECHO_C" >&6
5017 else
5018   if test -n "$ac_ct_AR"; then
5019   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5020 else
5021   ac_save_IFS=$IFS; IFS=$ac_path_separator
5022 ac_dummy="$PATH"
5023 for ac_dir in $ac_dummy; do
5024   IFS=$ac_save_IFS
5025   test -z "$ac_dir" && ac_dir=.
5026   $as_executable_p "$ac_dir/$ac_word" || continue
5027 ac_cv_prog_ac_ct_AR="ar"
5028 echo "$as_me:5028: found $ac_dir/$ac_word" >&5
5029 break
5030 done
5031
5032   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5033 fi
5034 fi
5035 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5036 if test -n "$ac_ct_AR"; then
5037   echo "$as_me:5037: result: $ac_ct_AR" >&5
5038 echo "${ECHO_T}$ac_ct_AR" >&6
5039 else
5040   echo "$as_me:5040: result: no" >&5
5041 echo "${ECHO_T}no" >&6
5042 fi
5043
5044   AR=$ac_ct_AR
5045 else
5046   AR="$ac_cv_prog_AR"
5047 fi
5048
5049 echo "$as_me:5049: checking for options to update archives" >&5
5050 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5051 if test "${cf_cv_ar_flags+set}" = set; then
5052   echo $ECHO_N "(cached) $ECHO_C" >&6
5053 else
5054
5055         case "$cf_cv_system_name" in
5056         (*-msvc*)
5057                 cf_cv_ar_flags=''
5058                 cat >mk_static_lib.sh <<-EOF
5059                 #!$SHELL
5060                 MSVC_BIN="$AR"
5061                 out="\$1"
5062                 shift
5063                 exec \$MSVC_BIN -out:"\$out" \$@
5064                 EOF
5065                 chmod +x mk_static_lib.sh
5066                 AR=`pwd`/mk_static_lib.sh
5067                 ;;
5068         (*)
5069                 cf_cv_ar_flags=unknown
5070                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5071                 do
5072
5073                         # check if $ARFLAGS already contains this choice
5074                         if test "x$ARFLAGS" != "x" ; then
5075                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5076                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5077                                         cf_cv_ar_flags=
5078                                         break
5079                                 fi
5080                         fi
5081
5082                         rm -f "conftest.$ac_cv_objext"
5083                         rm -f conftest.a
5084
5085                         cat >"conftest.$ac_ext" <<EOF
5086 #line 5086 "configure"
5087 int     testdata[3] = { 123, 456, 789 };
5088 EOF
5089                         if { (eval echo "$as_me:5089: \"$ac_compile\"") >&5
5090   (eval $ac_compile) 2>&5
5091   ac_status=$?
5092   echo "$as_me:5092: \$? = $ac_status" >&5
5093   (exit "$ac_status"); } ; then
5094                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5095                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5096                                 if test -f conftest.a ; then
5097                                         cf_cv_ar_flags="$cf_ar_flags"
5098                                         break
5099                                 fi
5100                         else
5101                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5102
5103 echo "${as_me:-configure}:5103: testing cannot compile test-program ..." 1>&5
5104
5105                                 break
5106                         fi
5107                 done
5108                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5109                 ;;
5110         esac
5111
5112 fi
5113 echo "$as_me:5113: result: $cf_cv_ar_flags" >&5
5114 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5115
5116 if test -n "$ARFLAGS" ; then
5117         if test -n "$cf_cv_ar_flags" ; then
5118                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5119         fi
5120 else
5121         ARFLAGS=$cf_cv_ar_flags
5122 fi
5123
5124 echo "$as_me:5124: checking if you have specified an install-prefix" >&5
5125 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5126
5127 # Check whether --with-install-prefix or --without-install-prefix was given.
5128 if test "${with_install_prefix+set}" = set; then
5129   withval="$with_install_prefix"
5130   case "x$withval" in
5131         (xyes|xno)
5132                 ;;
5133         (*)     DESTDIR="$withval"
5134                 ;;
5135         esac
5136 fi;
5137 echo "$as_me:5137: result: $DESTDIR" >&5
5138 echo "${ECHO_T}$DESTDIR" >&6
5139
5140 ###############################################################################
5141
5142 # If we're cross-compiling, allow the user to override the tools and their
5143 # options.  The configure script is oriented toward identifying the host
5144 # compiler, etc., but we need a build compiler to generate parts of the source.
5145
5146 case "$cf_cv_system_name" in
5147 (*-msvc*)
5148         LDFLAGS="$LDFLAGS user32.lib"
5149         export LDFLAGS
5150         ;;
5151 esac
5152
5153 if test "$cross_compiling" = yes ; then
5154
5155         # defaults that we might want to override
5156         : ${BUILD_CFLAGS:=''}
5157         : ${BUILD_CPPFLAGS:=''}
5158         : ${BUILD_LDFLAGS:=''}
5159         : ${BUILD_LIBS:=''}
5160         : ${BUILD_EXEEXT:='$x'}
5161         : ${BUILD_OBJEXT:='o'}
5162
5163 # Check whether --with-build-cc or --without-build-cc was given.
5164 if test "${with_build_cc+set}" = set; then
5165   withval="$with_build_cc"
5166   BUILD_CC="$withval"
5167 else
5168   for ac_prog in gcc clang c99 c89 cc cl
5169 do
5170   # Extract the first word of "$ac_prog", so it can be a program name with args.
5171 set dummy $ac_prog; ac_word=$2
5172 echo "$as_me:5172: checking for $ac_word" >&5
5173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5174 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5175   echo $ECHO_N "(cached) $ECHO_C" >&6
5176 else
5177   if test -n "$BUILD_CC"; then
5178   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5179 else
5180   ac_save_IFS=$IFS; IFS=$ac_path_separator
5181 ac_dummy="$PATH"
5182 for ac_dir in $ac_dummy; do
5183   IFS=$ac_save_IFS
5184   test -z "$ac_dir" && ac_dir=.
5185   $as_executable_p "$ac_dir/$ac_word" || continue
5186 ac_cv_prog_BUILD_CC="$ac_prog"
5187 echo "$as_me:5187: found $ac_dir/$ac_word" >&5
5188 break
5189 done
5190
5191 fi
5192 fi
5193 BUILD_CC=$ac_cv_prog_BUILD_CC
5194 if test -n "$BUILD_CC"; then
5195   echo "$as_me:5195: result: $BUILD_CC" >&5
5196 echo "${ECHO_T}$BUILD_CC" >&6
5197 else
5198   echo "$as_me:5198: result: no" >&5
5199 echo "${ECHO_T}no" >&6
5200 fi
5201
5202   test -n "$BUILD_CC" && break
5203 done
5204 test -n "$BUILD_CC" || BUILD_CC="none"
5205
5206 fi;
5207         echo "$as_me:5207: checking for native build C compiler" >&5
5208 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5209         echo "$as_me:5209: result: $BUILD_CC" >&5
5210 echo "${ECHO_T}$BUILD_CC" >&6
5211
5212         echo "$as_me:5212: checking for native build C preprocessor" >&5
5213 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5214
5215 # Check whether --with-build-cpp or --without-build-cpp was given.
5216 if test "${with_build_cpp+set}" = set; then
5217   withval="$with_build_cpp"
5218   BUILD_CPP="$withval"
5219 else
5220   BUILD_CPP='${BUILD_CC} -E'
5221 fi;
5222         echo "$as_me:5222: result: $BUILD_CPP" >&5
5223 echo "${ECHO_T}$BUILD_CPP" >&6
5224
5225         echo "$as_me:5225: checking for native build C flags" >&5
5226 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5227
5228 # Check whether --with-build-cflags or --without-build-cflags was given.
5229 if test "${with_build_cflags+set}" = set; then
5230   withval="$with_build_cflags"
5231   BUILD_CFLAGS="$withval"
5232 fi;
5233         echo "$as_me:5233: result: $BUILD_CFLAGS" >&5
5234 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5235
5236         echo "$as_me:5236: checking for native build C preprocessor-flags" >&5
5237 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5238
5239 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5240 if test "${with_build_cppflags+set}" = set; then
5241   withval="$with_build_cppflags"
5242   BUILD_CPPFLAGS="$withval"
5243 fi;
5244         echo "$as_me:5244: result: $BUILD_CPPFLAGS" >&5
5245 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5246
5247         echo "$as_me:5247: checking for native build linker-flags" >&5
5248 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5249
5250 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5251 if test "${with_build_ldflags+set}" = set; then
5252   withval="$with_build_ldflags"
5253   BUILD_LDFLAGS="$withval"
5254 fi;
5255         echo "$as_me:5255: result: $BUILD_LDFLAGS" >&5
5256 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5257
5258         echo "$as_me:5258: checking for native build linker-libraries" >&5
5259 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5260
5261 # Check whether --with-build-libs or --without-build-libs was given.
5262 if test "${with_build_libs+set}" = set; then
5263   withval="$with_build_libs"
5264   BUILD_LIBS="$withval"
5265 fi;
5266         echo "$as_me:5266: result: $BUILD_LIBS" >&5
5267 echo "${ECHO_T}$BUILD_LIBS" >&6
5268
5269         # this assumes we're on Unix.
5270         BUILD_EXEEXT=
5271         BUILD_OBJEXT=o
5272
5273         : ${BUILD_CC:='${CC}'}
5274
5275         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5276                 { { echo "$as_me:5276: error: Cross-build requires two compilers.
5277 Use --with-build-cc to specify the native compiler." >&5
5278 echo "$as_me: error: Cross-build requires two compilers.
5279 Use --with-build-cc to specify the native compiler." >&2;}
5280    { (exit 1); exit 1; }; }
5281         fi
5282
5283 else
5284         : ${BUILD_CC:='${CC}'}
5285         : ${BUILD_CPP:='${CPP}'}
5286         : ${BUILD_CFLAGS:='${CFLAGS}'}
5287         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5288         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5289         : ${BUILD_LIBS:='${LIBS}'}
5290         : ${BUILD_EXEEXT:='$x'}
5291         : ${BUILD_OBJEXT:='o'}
5292 fi
5293
5294 ###############################################################################
5295
5296 ### Options to allow the user to specify the set of libraries which are used.
5297 ### Use "--without-normal --with-shared" to allow the default model to be
5298 ### shared, for example.
5299 cf_list_models=""
5300
5301 echo "$as_me:5301: checking if libtool -version-number should be used" >&5
5302 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5303
5304 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5305 if test "${enable_libtool_version+set}" = set; then
5306   enableval="$enable_libtool_version"
5307   test "$enableval" != no && enableval=yes
5308         if test "$enableval" != "yes" ; then
5309     cf_libtool_version=no
5310         else
5311                 cf_libtool_version=yes
5312         fi
5313 else
5314   enableval=yes
5315         cf_libtool_version=yes
5316
5317 fi;
5318 echo "$as_me:5318: result: $cf_libtool_version" >&5
5319 echo "${ECHO_T}$cf_libtool_version" >&6
5320
5321 if test "$cf_libtool_version" = yes ; then
5322         LIBTOOL_VERSION="-version-number"
5323 else
5324         LIBTOOL_VERSION="-version-info"
5325         case "x$VERSION" in
5326         (x)
5327                 { echo "$as_me:5327: WARNING: VERSION was not set" >&5
5328 echo "$as_me: WARNING: VERSION was not set" >&2;}
5329                 ;;
5330         (x*.*.*)
5331                 ABI_VERSION="$VERSION"
5332                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5333
5334 echo "${as_me:-configure}:5334: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5335
5336                 ;;
5337         (x*:*:*)
5338                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5339                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5340
5341 echo "${as_me:-configure}:5341: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5342
5343                 ;;
5344         (*)
5345                 { echo "$as_me:5345: WARNING: unexpected VERSION value: $VERSION" >&5
5346 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5347                 ;;
5348         esac
5349 fi
5350
5351 LIBTOOL=
5352
5353 # common library maintenance symbols that are convenient for libtool scripts:
5354 LIB_CREATE='${AR} -cr'
5355 LIB_OBJECT='${OBJECTS}'
5356 LIB_SUFFIX=.a
5357 LIB_PREP="$RANLIB"
5358
5359 # symbols used to prop libtool up to enable it to determine what it should be
5360 # doing:
5361 LIB_CLEAN=
5362 LIB_COMPILE=
5363 LIB_LINK='${CC}'
5364 LIB_INSTALL=
5365 LIB_UNINSTALL=
5366
5367 echo "$as_me:5367: checking if you want to build libraries with libtool" >&5
5368 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5369
5370 # Check whether --with-libtool or --without-libtool was given.
5371 if test "${with_libtool+set}" = set; then
5372   withval="$with_libtool"
5373   with_libtool=$withval
5374 else
5375   with_libtool=no
5376 fi;
5377 echo "$as_me:5377: result: $with_libtool" >&5
5378 echo "${ECHO_T}$with_libtool" >&6
5379 if test "$with_libtool" != "no"; then
5380
5381         if test "$with_libtool" != "yes" ; then
5382
5383 if test "x$prefix" != xNONE; then
5384         cf_path_syntax="$prefix"
5385 else
5386         cf_path_syntax="$ac_default_prefix"
5387 fi
5388
5389 case ".$with_libtool" in
5390 (.\$\(*\)*|.\'*\'*)
5391         ;;
5392 (..|./*|.\\*)
5393         ;;
5394 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5395         ;;
5396 (.\$\{*prefix\}*|.\$\{*dir\}*)
5397         eval with_libtool="$with_libtool"
5398         case ".$with_libtool" in
5399         (.NONE/*)
5400                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5401                 ;;
5402         esac
5403         ;;
5404 (.no|.NONE/*)
5405         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5406         ;;
5407 (*)
5408         { { echo "$as_me:5408: error: expected a pathname, not \"$with_libtool\"" >&5
5409 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5410    { (exit 1); exit 1; }; }
5411         ;;
5412 esac
5413
5414                 LIBTOOL=$with_libtool
5415         else
5416                 if test -n "$ac_tool_prefix"; then
5417   for ac_prog in libtool glibtool
5418   do
5419     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5420 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5421 echo "$as_me:5421: checking for $ac_word" >&5
5422 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5423 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5424   echo $ECHO_N "(cached) $ECHO_C" >&6
5425 else
5426   if test -n "$LIBTOOL"; then
5427   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5428 else
5429   ac_save_IFS=$IFS; IFS=$ac_path_separator
5430 ac_dummy="$PATH"
5431 for ac_dir in $ac_dummy; do
5432   IFS=$ac_save_IFS
5433   test -z "$ac_dir" && ac_dir=.
5434   $as_executable_p "$ac_dir/$ac_word" || continue
5435 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5436 echo "$as_me:5436: found $ac_dir/$ac_word" >&5
5437 break
5438 done
5439
5440 fi
5441 fi
5442 LIBTOOL=$ac_cv_prog_LIBTOOL
5443 if test -n "$LIBTOOL"; then
5444   echo "$as_me:5444: result: $LIBTOOL" >&5
5445 echo "${ECHO_T}$LIBTOOL" >&6
5446 else
5447   echo "$as_me:5447: result: no" >&5
5448 echo "${ECHO_T}no" >&6
5449 fi
5450
5451     test -n "$LIBTOOL" && break
5452   done
5453 fi
5454 if test -z "$LIBTOOL"; then
5455   ac_ct_LIBTOOL=$LIBTOOL
5456   for ac_prog in libtool glibtool
5457 do
5458   # Extract the first word of "$ac_prog", so it can be a program name with args.
5459 set dummy $ac_prog; ac_word=$2
5460 echo "$as_me:5460: checking for $ac_word" >&5
5461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5462 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5463   echo $ECHO_N "(cached) $ECHO_C" >&6
5464 else
5465   if test -n "$ac_ct_LIBTOOL"; then
5466   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5467 else
5468   ac_save_IFS=$IFS; IFS=$ac_path_separator
5469 ac_dummy="$PATH"
5470 for ac_dir in $ac_dummy; do
5471   IFS=$ac_save_IFS
5472   test -z "$ac_dir" && ac_dir=.
5473   $as_executable_p "$ac_dir/$ac_word" || continue
5474 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5475 echo "$as_me:5475: found $ac_dir/$ac_word" >&5
5476 break
5477 done
5478
5479 fi
5480 fi
5481 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5482 if test -n "$ac_ct_LIBTOOL"; then
5483   echo "$as_me:5483: result: $ac_ct_LIBTOOL" >&5
5484 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5485 else
5486   echo "$as_me:5486: result: no" >&5
5487 echo "${ECHO_T}no" >&6
5488 fi
5489
5490   test -n "$ac_ct_LIBTOOL" && break
5491 done
5492 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5493
5494   LIBTOOL=$ac_ct_LIBTOOL
5495 fi
5496
5497 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5498 then
5499         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.].*//'`
5500 else
5501         cf_cv_libtool_version=
5502 fi
5503 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5504
5505                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5506                 then
5507
5508 unset ac_cv_prog_ac_ct_LIBTOOL
5509 unset ac_ct_LIBTOOL
5510 unset LIBTOOL
5511
5512                         if test -n "$ac_tool_prefix"; then
5513   for ac_prog in glibtool
5514   do
5515     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5516 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5517 echo "$as_me:5517: checking for $ac_word" >&5
5518 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5519 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5520   echo $ECHO_N "(cached) $ECHO_C" >&6
5521 else
5522   if test -n "$LIBTOOL"; then
5523   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5524 else
5525   ac_save_IFS=$IFS; IFS=$ac_path_separator
5526 ac_dummy="$PATH"
5527 for ac_dir in $ac_dummy; do
5528   IFS=$ac_save_IFS
5529   test -z "$ac_dir" && ac_dir=.
5530   $as_executable_p "$ac_dir/$ac_word" || continue
5531 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5532 echo "$as_me:5532: found $ac_dir/$ac_word" >&5
5533 break
5534 done
5535
5536 fi
5537 fi
5538 LIBTOOL=$ac_cv_prog_LIBTOOL
5539 if test -n "$LIBTOOL"; then
5540   echo "$as_me:5540: result: $LIBTOOL" >&5
5541 echo "${ECHO_T}$LIBTOOL" >&6
5542 else
5543   echo "$as_me:5543: result: no" >&5
5544 echo "${ECHO_T}no" >&6
5545 fi
5546
5547     test -n "$LIBTOOL" && break
5548   done
5549 fi
5550 if test -z "$LIBTOOL"; then
5551   ac_ct_LIBTOOL=$LIBTOOL
5552   for ac_prog in glibtool
5553 do
5554   # Extract the first word of "$ac_prog", so it can be a program name with args.
5555 set dummy $ac_prog; ac_word=$2
5556 echo "$as_me:5556: checking for $ac_word" >&5
5557 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5558 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5559   echo $ECHO_N "(cached) $ECHO_C" >&6
5560 else
5561   if test -n "$ac_ct_LIBTOOL"; then
5562   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5563 else
5564   ac_save_IFS=$IFS; IFS=$ac_path_separator
5565 ac_dummy="$PATH"
5566 for ac_dir in $ac_dummy; do
5567   IFS=$ac_save_IFS
5568   test -z "$ac_dir" && ac_dir=.
5569   $as_executable_p "$ac_dir/$ac_word" || continue
5570 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5571 echo "$as_me:5571: found $ac_dir/$ac_word" >&5
5572 break
5573 done
5574
5575 fi
5576 fi
5577 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5578 if test -n "$ac_ct_LIBTOOL"; then
5579   echo "$as_me:5579: result: $ac_ct_LIBTOOL" >&5
5580 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5581 else
5582   echo "$as_me:5582: result: no" >&5
5583 echo "${ECHO_T}no" >&6
5584 fi
5585
5586   test -n "$ac_ct_LIBTOOL" && break
5587 done
5588 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5589
5590   LIBTOOL=$ac_ct_LIBTOOL
5591 fi
5592
5593 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5594 then
5595         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.].*//'`
5596 else
5597         cf_cv_libtool_version=
5598 fi
5599 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5600
5601                 fi
5602         fi
5603         if test -z "$LIBTOOL" ; then
5604                 { { echo "$as_me:5604: error: Cannot find libtool" >&5
5605 echo "$as_me: error: Cannot find libtool" >&2;}
5606    { (exit 1); exit 1; }; }
5607         fi
5608         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5609         LIB_OBJECT='${OBJECTS:.o=.lo}'
5610         LIB_SUFFIX=.la
5611         LIB_CLEAN='${LIBTOOL} --mode=clean'
5612         LIB_COMPILE='${LIBTOOL} --mode=compile'
5613         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5614         LIB_INSTALL='${LIBTOOL} --mode=install'
5615         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5616         LIB_PREP=:
5617
5618 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5619 then
5620         echo "$as_me:5620: checking version of $LIBTOOL" >&5
5621 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5622
5623 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5624 then
5625         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.].*//'`
5626 else
5627         cf_cv_libtool_version=
5628 fi
5629 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5630
5631         echo "$as_me:5631: result: $cf_cv_libtool_version" >&5
5632 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5633         if test -n "$cf_cv_libtool_version"
5634         then
5635                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5636                 case "x$cf_check_libtool_version" in
5637                 (*...GNU-libtool...*)
5638                         ;;
5639                 (*)
5640                         { { echo "$as_me:5640: error: This is not GNU libtool" >&5
5641 echo "$as_me: error: This is not GNU libtool" >&2;}
5642    { (exit 1); exit 1; }; }
5643                         ;;
5644                 esac
5645         else
5646                 { { echo "$as_me:5646: error: No version found for $LIBTOOL" >&5
5647 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5648    { (exit 1); exit 1; }; }
5649         fi
5650 else
5651         { { echo "$as_me:5651: error: GNU libtool has not been found" >&5
5652 echo "$as_me: error: GNU libtool has not been found" >&2;}
5653    { (exit 1); exit 1; }; }
5654 fi
5655
5656         # special hack to add -no-undefined (which libtool should do for itself)
5657         LT_UNDEF=
5658         case "$cf_cv_system_name" in
5659         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5660                 LT_UNDEF=-no-undefined
5661                 ;;
5662         esac
5663
5664         # special hack to add --tag option for C++ compiler
5665         case "$cf_cv_libtool_version" in
5666         (1.[5-9]*|[2-9].[0-9.a-z]*)
5667                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5668                 LIBTOOL="$LIBTOOL --tag=CC"
5669                 ;;
5670         (*)
5671                 LIBTOOL_CXX="$LIBTOOL"
5672                 ;;
5673         esac
5674 else
5675         LIBTOOL=""
5676         LIBTOOL_CXX=""
5677 fi
5678
5679 test -z "$LIBTOOL" && ECHO_LT=
5680
5681 if test "$with_libtool" != "no" ; then
5682
5683 cf_list_models="$cf_list_models libtool"
5684
5685 else
5686
5687 echo "$as_me:5687: checking if you want to build shared libraries" >&5
5688 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5689
5690 # Check whether --with-shared or --without-shared was given.
5691 if test "${with_shared+set}" = set; then
5692   withval="$with_shared"
5693   with_shared=$withval
5694 else
5695   with_shared=no
5696 fi;
5697 echo "$as_me:5697: result: $with_shared" >&5
5698 echo "${ECHO_T}$with_shared" >&6
5699 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5700
5701 echo "$as_me:5701: checking if you want to build static libraries" >&5
5702 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5703
5704 # Check whether --with-normal or --without-normal was given.
5705 if test "${with_normal+set}" = set; then
5706   withval="$with_normal"
5707   with_normal=$withval
5708 else
5709   with_normal=yes
5710 fi;
5711 echo "$as_me:5711: result: $with_normal" >&5
5712 echo "${ECHO_T}$with_normal" >&6
5713 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5714
5715 echo "$as_me:5715: checking if you want to build debug libraries" >&5
5716 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5717
5718 # Check whether --with-debug or --without-debug was given.
5719 if test "${with_debug+set}" = set; then
5720   withval="$with_debug"
5721   with_debug=$withval
5722 else
5723   with_debug=yes
5724 fi;
5725 echo "$as_me:5725: result: $with_debug" >&5
5726 echo "${ECHO_T}$with_debug" >&6
5727 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5728
5729 echo "$as_me:5729: checking if you want to build profiling libraries" >&5
5730 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5731
5732 # Check whether --with-profile or --without-profile was given.
5733 if test "${with_profile+set}" = set; then
5734   withval="$with_profile"
5735   with_profile=$withval
5736 else
5737   with_profile=no
5738 fi;
5739 echo "$as_me:5739: result: $with_profile" >&5
5740 echo "${ECHO_T}$with_profile" >&6
5741 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5742
5743 fi
5744
5745 if test "X$cf_with_cxx_binding" != Xno; then
5746 if test "x$with_shared" = "xyes"; then
5747 echo "$as_me:5747: checking if you want to build C++ shared libraries" >&5
5748 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5749
5750 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5751 if test "${with_cxx_shared+set}" = set; then
5752   withval="$with_cxx_shared"
5753   with_shared_cxx=$withval
5754 else
5755   with_shared_cxx=no
5756 fi;
5757 echo "$as_me:5757: result: $with_shared_cxx" >&5
5758 echo "${ECHO_T}$with_shared_cxx" >&6
5759 fi
5760 fi
5761
5762 ###############################################################################
5763
5764 echo "$as_me:5764: checking for specified models" >&5
5765 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5766 test -z "$cf_list_models" && cf_list_models=normal
5767 test "$with_libtool" != "no" && cf_list_models=libtool
5768 echo "$as_me:5768: result: $cf_list_models" >&5
5769 echo "${ECHO_T}$cf_list_models" >&6
5770
5771 ### Use the first model as the default, and save its suffix for use in building
5772 ### up test-applications.
5773 echo "$as_me:5773: checking for default model" >&5
5774 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5775 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5776 echo "$as_me:5776: result: $DFT_LWR_MODEL" >&5
5777 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5778
5779 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5780
5781 TICS_NAME=tic
5782
5783 TINFO_NAME=tinfo
5784
5785 LIB_NAME=ncurses
5786
5787 LIB_DIR=../lib
5788 LIB_2ND=../../lib
5789
5790 echo "$as_me:5790: checking if you want to have a library-prefix" >&5
5791 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5792
5793 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5794 if test "${with_lib_prefix+set}" = set; then
5795   withval="$with_lib_prefix"
5796   with_lib_prefix=$withval
5797 else
5798   with_lib_prefix=auto
5799 fi;
5800 echo "$as_me:5800: result: $with_lib_prefix" >&5
5801 echo "${ECHO_T}$with_lib_prefix" >&6
5802
5803 if test "$with_lib_prefix" = auto
5804 then
5805
5806         case "$cf_cv_system_name" in
5807         (OS/2*|os2*)
5808                 if test "$DFT_LWR_MODEL" = libtool; then
5809                         LIB_PREFIX='lib'
5810                 else
5811                         LIB_PREFIX=''
5812                 fi
5813                 ;;
5814         (*-msvc*)
5815                 LIB_PREFIX=''
5816                 ;;
5817         (*)     LIB_PREFIX='lib'
5818                 ;;
5819         esac
5820 cf_prefix=$LIB_PREFIX
5821
5822 elif test "$with_lib_prefix" = no
5823 then
5824         LIB_PREFIX=
5825 else
5826         LIB_PREFIX=$with_lib_prefix
5827 fi
5828
5829 LIB_SUFFIX=
5830
5831         echo "$as_me:5831: checking for PATH separator" >&5
5832 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5833         case "$cf_cv_system_name" in
5834         (os2*)  PATH_SEPARATOR=';'  ;;
5835         (*)     ${PATH_SEPARATOR:=':'}  ;;
5836         esac
5837
5838         echo "$as_me:5838: result: $PATH_SEPARATOR" >&5
5839 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5840
5841 ###############################################################################
5842
5843 echo "$as_me:5843: checking if you want to build a separate terminfo library" >&5
5844 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5845
5846 # Check whether --with-termlib or --without-termlib was given.
5847 if test "${with_termlib+set}" = set; then
5848   withval="$with_termlib"
5849   with_termlib=$withval
5850 else
5851   with_termlib=no
5852 fi;
5853 echo "$as_me:5853: result: $with_termlib" >&5
5854 echo "${ECHO_T}$with_termlib" >&6
5855
5856 echo "$as_me:5856: checking if you want to build a separate tic library" >&5
5857 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5858
5859 # Check whether --with-ticlib or --without-ticlib was given.
5860 if test "${with_ticlib+set}" = set; then
5861   withval="$with_ticlib"
5862   with_ticlib=$withval
5863 else
5864   with_ticlib=no
5865 fi;
5866 echo "$as_me:5866: result: $with_ticlib" >&5
5867 echo "${ECHO_T}$with_ticlib" >&6
5868
5869 if test X"$CC_G_OPT" = X"" ; then
5870         CC_G_OPT='-g'
5871         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5872 fi
5873
5874 if test X"$CXX_G_OPT" = X"" ; then
5875         CXX_G_OPT='-g'
5876         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5877 fi
5878
5879 echo "$as_me:5879: checking for default loader flags" >&5
5880 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5881 case "$DFT_LWR_MODEL" in
5882 (libtool) LD_MODEL=''   ;;
5883 (normal)  LD_MODEL=''   ;;
5884 (debug)   LD_MODEL=$CC_G_OPT ;;
5885 (profile) LD_MODEL='-pg';;
5886 (shared)  LD_MODEL=''   ;;
5887 esac
5888 echo "$as_me:5888: result: $LD_MODEL" >&5
5889 echo "${ECHO_T}$LD_MODEL" >&6
5890
5891 case "$DFT_LWR_MODEL" in
5892 (shared)
5893
5894 echo "$as_me:5894: checking if rpath option should be used" >&5
5895 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5896
5897 # Check whether --enable-rpath or --disable-rpath was given.
5898 if test "${enable_rpath+set}" = set; then
5899   enableval="$enable_rpath"
5900   cf_cv_enable_rpath=$enableval
5901 else
5902   cf_cv_enable_rpath=no
5903 fi;
5904 echo "$as_me:5904: result: $cf_cv_enable_rpath" >&5
5905 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5906
5907 echo "$as_me:5907: checking if shared libraries should be relinked during install" >&5
5908 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5909
5910 # Check whether --enable-relink or --disable-relink was given.
5911 if test "${enable_relink+set}" = set; then
5912   enableval="$enable_relink"
5913   cf_cv_do_relink=$enableval
5914 else
5915   cf_cv_do_relink=yes
5916 fi;
5917 echo "$as_me:5917: result: $cf_cv_do_relink" >&5
5918 echo "${ECHO_T}$cf_cv_do_relink" >&6
5919         ;;
5920 esac
5921
5922 # we will build libraries one-level down.
5923 rel_builddir=..
5924
5925 LD_RPATH_OPT=
5926 if test "x$cf_cv_enable_rpath" != xno
5927 then
5928         echo "$as_me:5928: checking for an rpath option" >&5
5929 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5930         case "$cf_cv_system_name" in
5931         (irix*)
5932                 if test "$GCC" = yes; then
5933                         LD_RPATH_OPT="-Wl,-rpath,"
5934                 else
5935                         LD_RPATH_OPT="-rpath "
5936                 fi
5937                 ;;
5938         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5939                 LD_RPATH_OPT="-Wl,-rpath,"
5940                 ;;
5941         (openbsd[2-9].*|mirbsd*)
5942                 LD_RPATH_OPT="-Wl,-rpath,"
5943                 ;;
5944         (dragonfly*)
5945                 LD_RPATH_OPT="-rpath "
5946                 ;;
5947         (netbsd*)
5948                 LD_RPATH_OPT="-Wl,-rpath,"
5949                 ;;
5950         (osf*|mls+*)
5951                 LD_RPATH_OPT="-rpath "
5952                 ;;
5953         (solaris2*)
5954                 LD_RPATH_OPT="-R"
5955                 ;;
5956         (*)
5957                 ;;
5958         esac
5959         echo "$as_me:5959: result: $LD_RPATH_OPT" >&5
5960 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5961
5962         case "x$LD_RPATH_OPT" in
5963         (x-R*)
5964                 echo "$as_me:5964: checking if we need a space after rpath option" >&5
5965 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5966                 cf_save_LIBS="$LIBS"
5967
5968 cf_add_libs="$LIBS"
5969 # reverse order
5970 cf_add_0lib=
5971 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5972 # filter duplicates
5973 for cf_add_1lib in $cf_add_0lib; do
5974         for cf_add_2lib in $cf_add_libs; do
5975                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5976                         cf_add_1lib=
5977                         break
5978                 fi
5979         done
5980         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5981 done
5982 LIBS="$cf_add_libs"
5983
5984                 cat >"conftest.$ac_ext" <<_ACEOF
5985 #line 5985 "configure"
5986 #include "confdefs.h"
5987
5988 int
5989 main (void)
5990 {
5991
5992   ;
5993   return 0;
5994 }
5995 _ACEOF
5996 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5997 if { (eval echo "$as_me:5997: \"$ac_link\"") >&5
5998   (eval $ac_link) 2>&5
5999   ac_status=$?
6000   echo "$as_me:6000: \$? = $ac_status" >&5
6001   (exit "$ac_status"); } &&
6002          { ac_try='test -s "conftest$ac_exeext"'
6003   { (eval echo "$as_me:6003: \"$ac_try\"") >&5
6004   (eval $ac_try) 2>&5
6005   ac_status=$?
6006   echo "$as_me:6006: \$? = $ac_status" >&5
6007   (exit "$ac_status"); }; }; then
6008   cf_rpath_space=no
6009 else
6010   echo "$as_me: failed program was:" >&5
6011 cat "conftest.$ac_ext" >&5
6012 cf_rpath_space=yes
6013 fi
6014 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6015                 LIBS="$cf_save_LIBS"
6016                 echo "$as_me:6016: result: $cf_rpath_space" >&5
6017 echo "${ECHO_T}$cf_rpath_space" >&6
6018                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6019                 ;;
6020         esac
6021 fi
6022
6023         RM_SHARED_OPTS=
6024         LOCAL_LDFLAGS=
6025         LOCAL_LDFLAGS2=
6026         LD_SHARED_OPTS=
6027         INSTALL_LIB="-m 644"
6028         : ${rel_builddir:=.}
6029
6030         shlibdir=$libdir
6031
6032         MAKE_DLLS="#"
6033
6034         cf_cv_do_symlinks=no
6035         cf_ld_rpath_opt=
6036         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6037
6038         echo "$as_me:6038: checking if release/abi version should be used for shared libs" >&5
6039 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6040
6041 # Check whether --with-shlib-version or --without-shlib-version was given.
6042 if test "${with_shlib_version+set}" = set; then
6043   withval="$with_shlib_version"
6044   test -z "$withval" && withval=auto
6045         case "$withval" in
6046         (yes)
6047                 cf_cv_shlib_version=auto
6048                 ;;
6049         (rel|abi|auto)
6050                 cf_cv_shlib_version=$withval
6051                 ;;
6052         (*)
6053                 echo "$as_me:6053: result: $withval" >&5
6054 echo "${ECHO_T}$withval" >&6
6055                 { { echo "$as_me:6055: error: option value must be one of: rel, abi, or auto" >&5
6056 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6057    { (exit 1); exit 1; }; }
6058                 ;;
6059         esac
6060
6061 else
6062   cf_cv_shlib_version=auto
6063 fi;
6064         echo "$as_me:6064: result: $cf_cv_shlib_version" >&5
6065 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6066
6067         cf_cv_rm_so_locs=no
6068         cf_try_cflags=
6069
6070         # Some less-capable ports of gcc support only -fpic
6071         CC_SHARED_OPTS=
6072
6073         cf_try_fPIC=no
6074         if test "$GCC" = yes
6075         then
6076                 cf_try_fPIC=yes
6077         else
6078                 case "$cf_cv_system_name" in
6079                 (*linux*)       # e.g., PGI compiler
6080                         cf_try_fPIC=yes
6081                         ;;
6082                 esac
6083         fi
6084
6085         if test "$cf_try_fPIC" = yes
6086         then
6087                 echo "$as_me:6087: checking which $CC option to use" >&5
6088 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6089                 cf_save_CFLAGS="$CFLAGS"
6090                 for CC_SHARED_OPTS in -fPIC -fpic ''
6091                 do
6092                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6093                         cat >"conftest.$ac_ext" <<_ACEOF
6094 #line 6094 "configure"
6095 #include "confdefs.h"
6096 #include <stdio.h>
6097 int
6098 main (void)
6099 {
6100 int x = 1
6101   ;
6102   return 0;
6103 }
6104 _ACEOF
6105 rm -f "conftest.$ac_objext"
6106 if { (eval echo "$as_me:6106: \"$ac_compile\"") >&5
6107   (eval $ac_compile) 2>&5
6108   ac_status=$?
6109   echo "$as_me:6109: \$? = $ac_status" >&5
6110   (exit "$ac_status"); } &&
6111          { ac_try='test -s "conftest.$ac_objext"'
6112   { (eval echo "$as_me:6112: \"$ac_try\"") >&5
6113   (eval $ac_try) 2>&5
6114   ac_status=$?
6115   echo "$as_me:6115: \$? = $ac_status" >&5
6116   (exit "$ac_status"); }; }; then
6117   break
6118 else
6119   echo "$as_me: failed program was:" >&5
6120 cat "conftest.$ac_ext" >&5
6121 fi
6122 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6123                 done
6124                 echo "$as_me:6124: result: $CC_SHARED_OPTS" >&5
6125 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6126                 CFLAGS="$cf_save_CFLAGS"
6127         fi
6128
6129         cf_cv_shlib_version_infix=no
6130
6131         case "$cf_cv_system_name" in
6132         (aix4.3-9*|aix[5-7]*)
6133                 if test "$GCC" = yes; then
6134                         CC_SHARED_OPTS='-Wl,-brtl'
6135                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6136                 else
6137                         CC_SHARED_OPTS='-brtl'
6138                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6139                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6140                 fi
6141                 ;;
6142         (beos*)
6143                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6144                 ;;
6145         (cygwin*)
6146                 CC_SHARED_OPTS=
6147                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6148                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6149                 cf_cv_shlib_version=cygdll
6150                 cf_cv_shlib_version_infix=cygdll
6151                 shlibdir=$bindir
6152                 MAKE_DLLS=
6153                 cat >mk_shared_lib.sh <<-CF_EOF
6154                 #!$SHELL
6155                 SHARED_LIB=\$1
6156                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6157                 shift
6158                 cat <<-EOF
6159                 Linking shared library
6160                 ** SHARED_LIB \$SHARED_LIB
6161                 ** IMPORT_LIB \$IMPORT_LIB
6162 EOF
6163                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6164 CF_EOF
6165                 chmod +x mk_shared_lib.sh
6166                 ;;
6167         (msys*)
6168                 CC_SHARED_OPTS=
6169                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6170                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6171                 cf_cv_shlib_version=msysdll
6172                 cf_cv_shlib_version_infix=msysdll
6173                 shlibdir=$bindir
6174                 MAKE_DLLS=
6175                 cat >mk_shared_lib.sh <<-CF_EOF
6176                 #!$SHELL
6177                 SHARED_LIB=\$1
6178                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6179                 shift
6180                 cat <<-EOF
6181                 Linking shared library
6182                 ** SHARED_LIB \$SHARED_LIB
6183                 ** IMPORT_LIB \$IMPORT_LIB
6184 EOF
6185                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6186 CF_EOF
6187                 chmod +x mk_shared_lib.sh
6188                 ;;
6189         (darwin*)
6190                 cf_try_cflags="no-cpp-precomp"
6191                 CC_SHARED_OPTS="-dynamic"
6192                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6193                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6194                 cf_cv_shlib_version_infix=yes
6195                 echo "$as_me:6195: checking if ld -search_paths_first works" >&5
6196 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6197 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6198   echo $ECHO_N "(cached) $ECHO_C" >&6
6199 else
6200
6201                         cf_save_LDFLAGS=$LDFLAGS
6202                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6203                         cat >"conftest.$ac_ext" <<_ACEOF
6204 #line 6204 "configure"
6205 #include "confdefs.h"
6206
6207 int
6208 main (void)
6209 {
6210 int i;
6211   ;
6212   return 0;
6213 }
6214 _ACEOF
6215 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6216 if { (eval echo "$as_me:6216: \"$ac_link\"") >&5
6217   (eval $ac_link) 2>&5
6218   ac_status=$?
6219   echo "$as_me:6219: \$? = $ac_status" >&5
6220   (exit "$ac_status"); } &&
6221          { ac_try='test -s "conftest$ac_exeext"'
6222   { (eval echo "$as_me:6222: \"$ac_try\"") >&5
6223   (eval $ac_try) 2>&5
6224   ac_status=$?
6225   echo "$as_me:6225: \$? = $ac_status" >&5
6226   (exit "$ac_status"); }; }; then
6227   cf_cv_ldflags_search_paths_first=yes
6228 else
6229   echo "$as_me: failed program was:" >&5
6230 cat "conftest.$ac_ext" >&5
6231 cf_cv_ldflags_search_paths_first=no
6232 fi
6233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6234                                 LDFLAGS=$cf_save_LDFLAGS
6235 fi
6236 echo "$as_me:6236: result: $cf_cv_ldflags_search_paths_first" >&5
6237 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6238                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6239                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6240                 fi
6241                 ;;
6242         (haiku*)
6243
6244         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6245         if test "$cf_cv_shlib_version" = rel; then
6246                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6247         else
6248                 cf_cv_shared_soname='`basename $@`'
6249         fi
6250
6251                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6252                 ;;
6253         (hpux[7-8]*)
6254                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6255                 if test "$GCC" != yes; then
6256                         CC_SHARED_OPTS='+Z'
6257                 fi
6258                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6259                 INSTALL_LIB="-m 555"
6260                 ;;
6261         (hpux*)
6262                 # (tested with gcc 2.7.2 -- I don't have c89)
6263                 if test "$GCC" = yes; then
6264                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6265                 else
6266                         CC_SHARED_OPTS='+Z'
6267                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6268                 fi
6269                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6270                 # HP-UX shared libraries must be executable, and should be
6271                 # readonly to exploit a quirk in the memory manager.
6272                 INSTALL_LIB="-m 555"
6273                 ;;
6274         (interix*)
6275                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6276                 if test "$cf_cv_shlib_version" = rel; then
6277                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6278                 else
6279                         cf_shared_soname='`basename $@`'
6280                 fi
6281                 CC_SHARED_OPTS=
6282                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6283                 ;;
6284         (irix*)
6285                 if test "$cf_cv_enable_rpath" = yes ; then
6286                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6287                 fi
6288                 # tested with IRIX 5.2 and 'cc'.
6289                 if test "$GCC" != yes; then
6290                         CC_SHARED_OPTS='-KPIC'
6291                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6292                 else
6293                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6294                 fi
6295                 cf_cv_rm_so_locs=yes
6296                 ;;
6297         (linux*|gnu*|k*bsd*-gnu)
6298                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6299                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6300                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6301                 fi
6302                 if test "$cf_cv_enable_rpath" = yes ; then
6303                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6304                 fi
6305
6306         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6307         if test "$cf_cv_shlib_version" = rel; then
6308                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6309         else
6310                 cf_cv_shared_soname='`basename $@`'
6311         fi
6312
6313                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6314                 ;;
6315         (mingw*msvc*)
6316                 cf_cv_shlib_version=msvcdll
6317                 cf_cv_shlib_version_infix=msvcdll
6318                 shlibdir=$bindir
6319                 MAKE_DLLS=
6320                 if test "$DFT_LWR_MODEL" = "shared" ; then
6321                         LOCAL_LDFLAGS="-link -dll"
6322                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6323                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6324                 fi
6325                 CC_SHARED_OPTS=
6326                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6327                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6328                 cat >mk_shared_lib.sh <<-CF_EOF
6329                 #!$SHELL
6330                 SHARED_LIB=\$1
6331                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6332                 shift
6333                 my_ld=\$1
6334                 shift
6335                 cat <<-EOF
6336                 Linking shared library
6337                 ** SHARED LIB \$SHARED_LIB
6338                 ** IMPORT_LIB \$IMPORT_LIB
6339 EOF
6340                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6341                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6342                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6343 CF_EOF
6344                 chmod +x mk_shared_lib.sh
6345                 cat >mk_prog.sh <<-CF_EOF
6346                 #!$SHELL
6347                 shift
6348                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6349                 LD="$LD"
6350                 clopts=()
6351                 ldopts=("/subsystem:console")
6352                 libs=()
6353                 isdll=0
6354                 while test \$# -gt 0; do
6355                         case "\$1" in
6356                                 -link)
6357                                         # ignore -link argument
6358                                         ;;
6359                                 -M[TD] | -M[TD]d)
6360                                         # ignore runtime-library option
6361                                         ;;
6362                                 -dll)
6363                                         isdll=1
6364                                         ;;
6365                                 -W* | -w*)
6366                                         # ignore warnings
6367                                         ;;
6368                                 -D*)
6369                                         clopts+=("\$1")
6370                                         ;;
6371                                 -I*)
6372                                         clopts+=("\$1")
6373                                         ;;
6374                                 -l*)
6375                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6376                                         ;;
6377                                 -L*)
6378                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6379                                         ;;
6380                                 *.obj | *.o)
6381                                         ldopts+=("\$1")
6382                                         ;;
6383                                 -Wl,*)
6384                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6385                                                 ldopts+=("\${linkarg}")
6386                                         done
6387                                         ;;
6388                                 *.lib)
6389                                         ldopts+=("\$1")
6390                                         ;;
6391                                 -o)
6392                                         shift
6393                                         ldopts+=("-out:\$1")
6394                                         ;;
6395                                 *)
6396                                         clopts+=("\$1")
6397                                         ldopts+=("\$1")
6398                                         ;;
6399                         esac
6400                         shift
6401                 done
6402                 if [ "\$isdll" -ne 0 ]; then
6403                         for lib in \${libs[*]}; do
6404                                 ldopts+=("\$lib.dll.lib")
6405                         done
6406                 else
6407                         for lib in \${libs[*]}; do
6408                                 ldopts+=("\$lib.lib")
6409                         done
6410                 fi
6411                 cat <<-EOF
6412                 Creating program
6413                 ** ld options:   "\${ldopts[@]}"
6414 EOF
6415                 exec \$LD \${ldopts[@]}
6416 CF_EOF
6417                 chmod +x mk_prog.sh
6418                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6419                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6420                 ;;
6421         (mingw*)
6422                 cf_cv_shlib_version=mingw
6423                 cf_cv_shlib_version_infix=mingw
6424                 shlibdir=$bindir
6425                 MAKE_DLLS=
6426                 if test "$DFT_LWR_MODEL" = "shared" ; then
6427                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6428                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6429                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6430                 fi
6431                 CC_SHARED_OPTS=
6432                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6433                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6434                 cat >mk_shared_lib.sh <<-CF_EOF
6435                 #!$SHELL
6436                 SHARED_LIB=\$1
6437                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6438                 shift
6439                 cat <<-EOF
6440                 Linking shared library
6441                 ** SHARED_LIB \$SHARED_LIB
6442                 ** IMPORT_LIB \$IMPORT_LIB
6443 EOF
6444                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6445 CF_EOF
6446                 chmod +x mk_shared_lib.sh
6447                 ;;
6448         (openbsd[2-9].*|mirbsd*)
6449                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6450                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6451                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6452                 fi
6453                 if test "$cf_cv_enable_rpath" = yes ; then
6454                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6455                 fi
6456                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6457
6458         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6459         if test "$cf_cv_shlib_version" = rel; then
6460                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6461         else
6462                 cf_cv_shared_soname='`basename $@`'
6463         fi
6464
6465                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6466                 ;;
6467         (nskJ*)
6468                 CC_SHARED_OPTS=
6469                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6470                 ;;
6471         (nskL*)
6472                 CC_SHARED_OPTS=
6473                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6474                 ;;
6475         (nto-qnx*|openbsd*|freebsd[12].*)
6476                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6477                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6478                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6479                 ;;
6480         (dragonfly*|freebsd*)
6481                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6482                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6483                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6484                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6485                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6486                 fi
6487
6488         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6489         if test "$cf_cv_shlib_version" = rel; then
6490                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6491         else
6492                 cf_cv_shared_soname='`basename $@`'
6493         fi
6494
6495                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6496                 ;;
6497         (netbsd*)
6498                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6499                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6500                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6501                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6502                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6503                         if test "$cf_cv_shlib_version" = auto; then
6504                         if test -f /usr/libexec/ld.elf_so; then
6505                                 cf_cv_shlib_version=abi
6506                         else
6507                                 cf_cv_shlib_version=rel
6508                         fi
6509                         fi
6510
6511         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6512         if test "$cf_cv_shlib_version" = rel; then
6513                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6514         else
6515                 cf_cv_shared_soname='`basename $@`'
6516         fi
6517
6518                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6519                 else
6520                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6521                 fi
6522                 ;;
6523         (osf*|mls+*)
6524                 # tested with OSF/1 V3.2 and 'cc'
6525                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6526                 # link with shared libs).
6527                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6528                 case "$host_os" in
6529                 (osf4*)
6530                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6531                         ;;
6532                 esac
6533                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6534                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6535                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6536                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6537                 fi
6538                 cf_cv_rm_so_locs=yes
6539                 ;;
6540         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6541                 # tested with osr5.0.5
6542                 if test "$GCC" != yes; then
6543                         CC_SHARED_OPTS='-belf -KPIC'
6544                 fi
6545                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6546                 if test "$cf_cv_enable_rpath" = yes ; then
6547                         # only way is to set LD_RUN_PATH but no switch for it
6548                         RUN_PATH=$libdir
6549                 fi
6550                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6551                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6552                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6553                 ;;
6554         (sunos4*)
6555                 # tested with SunOS 4.1.1 and gcc 2.7.0
6556                 if test "$GCC" != yes; then
6557                         CC_SHARED_OPTS='-KPIC'
6558                 fi
6559                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6560                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6561                 ;;
6562         (solaris2*)
6563                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6564                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6565                 if test "$DFT_LWR_MODEL" = "shared" ; then
6566                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6567                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6568                 fi
6569                 if test "$cf_cv_enable_rpath" = yes ; then
6570                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6571                 fi
6572
6573         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6574         if test "$cf_cv_shlib_version" = rel; then
6575                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6576         else
6577                 cf_cv_shared_soname='`basename $@`'
6578         fi
6579
6580                 if test "$GCC" != yes; then
6581                         cf_save_CFLAGS="$CFLAGS"
6582                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6583                         do
6584                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6585                                 cat >"conftest.$ac_ext" <<_ACEOF
6586 #line 6586 "configure"
6587 #include "confdefs.h"
6588 #include <stdio.h>
6589 int
6590 main (void)
6591 {
6592 printf("Hello\\n");
6593   ;
6594   return 0;
6595 }
6596 _ACEOF
6597 rm -f "conftest.$ac_objext"
6598 if { (eval echo "$as_me:6598: \"$ac_compile\"") >&5
6599   (eval $ac_compile) 2>&5
6600   ac_status=$?
6601   echo "$as_me:6601: \$? = $ac_status" >&5
6602   (exit "$ac_status"); } &&
6603          { ac_try='test -s "conftest.$ac_objext"'
6604   { (eval echo "$as_me:6604: \"$ac_try\"") >&5
6605   (eval $ac_try) 2>&5
6606   ac_status=$?
6607   echo "$as_me:6607: \$? = $ac_status" >&5
6608   (exit "$ac_status"); }; }; then
6609   break
6610 else
6611   echo "$as_me: failed program was:" >&5
6612 cat "conftest.$ac_ext" >&5
6613 fi
6614 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6615                         done
6616                         CFLAGS="$cf_save_CFLAGS"
6617                         CC_SHARED_OPTS=$cf_shared_opts
6618                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6619                 else
6620                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6621                 fi
6622                 ;;
6623         (sysv5uw7*|unix_sv*)
6624                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6625                 if test "$GCC" != yes; then
6626                         CC_SHARED_OPTS='-KPIC'
6627                 fi
6628                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6629                 ;;
6630         (*)
6631                 CC_SHARED_OPTS='unknown'
6632                 MK_SHARED_LIB='echo unknown'
6633                 ;;
6634         esac
6635
6636         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6637         case "$cf_cv_shlib_version" in
6638         (rel|abi)
6639                 case "$MK_SHARED_LIB" in
6640                 (*'-o $@')
6641                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6642                         ;;
6643                 (*)
6644                         { echo "$as_me:6644: WARNING: ignored --with-shlib-version" >&5
6645 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6646                         ;;
6647                 esac
6648                 ;;
6649         esac
6650
6651         if test -n "$cf_try_cflags"
6652         then
6653 cat > conftest.$ac_ext <<EOF
6654 #line 6654 "${as_me:-configure}"
6655 #include <stdio.h>
6656 int main(int argc, char *argv[])
6657 {
6658         printf("hello\\n");
6659         return (argv[argc-1] == 0) ;
6660 }
6661 EOF
6662                 cf_save_CFLAGS="$CFLAGS"
6663                 for cf_opt in $cf_try_cflags
6664                 do
6665                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6666                         echo "$as_me:6666: checking if CFLAGS option -$cf_opt works" >&5
6667 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6668                         if { (eval echo "$as_me:6668: \"$ac_compile\"") >&5
6669   (eval $ac_compile) 2>&5
6670   ac_status=$?
6671   echo "$as_me:6671: \$? = $ac_status" >&5
6672   (exit "$ac_status"); }; then
6673                                 echo "$as_me:6673: result: yes" >&5
6674 echo "${ECHO_T}yes" >&6
6675                                 cf_save_CFLAGS="$CFLAGS"
6676                         else
6677                                 echo "$as_me:6677: result: no" >&5
6678 echo "${ECHO_T}no" >&6
6679                         fi
6680                 done
6681                 CFLAGS="$cf_save_CFLAGS"
6682         fi
6683
6684         # RPATH_LIST is a colon-separated list of directories
6685         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6686         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6687
6688         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6689
6690         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6691
6692 echo "${as_me:-configure}:6692: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6693
6694         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6695
6696 echo "${as_me:-configure}:6696: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6697
6698 for model in $cf_list_models ; do
6699         case "$model" in
6700         (libtool)
6701
6702 echo "$as_me:6702: checking for additional libtool options" >&5
6703 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6704
6705 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6706 if test "${with_libtool_opts+set}" = set; then
6707   withval="$with_libtool_opts"
6708   with_libtool_opts=$withval
6709 else
6710   with_libtool_opts=no
6711 fi;
6712 echo "$as_me:6712: result: $with_libtool_opts" >&5
6713 echo "${ECHO_T}$with_libtool_opts" >&6
6714
6715 case .$with_libtool_opts in
6716 (.yes|.no|.)
6717         ;;
6718 (*)
6719         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6720         ;;
6721 esac
6722
6723 echo "$as_me:6723: checking if exported-symbols file should be used" >&5
6724 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6725
6726 # Check whether --with-export-syms or --without-export-syms was given.
6727 if test "${with_export_syms+set}" = set; then
6728   withval="$with_export_syms"
6729   with_export_syms=$withval
6730 else
6731   with_export_syms=no
6732 fi;
6733 if test "x$with_export_syms" = xyes
6734 then
6735         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6736
6737 fi
6738 echo "$as_me:6738: result: $with_export_syms" >&5
6739 echo "${ECHO_T}$with_export_syms" >&6
6740 if test "x$with_export_syms" != xno
6741 then
6742         EXPORT_SYMS="-export-symbols $with_export_syms"
6743
6744 fi
6745
6746                 ;;
6747         (shared)
6748                 if test "$CC_SHARED_OPTS" = "unknown"; then
6749                         { { echo "$as_me:6749: error: Shared libraries are not supported in this version" >&5
6750 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6751    { (exit 1); exit 1; }; }
6752                 fi
6753                 # workaround for inept transition to PIE vs PIC...
6754                 echo "$as_me:6754: checking if current CFLAGS link properly" >&5
6755 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6756                 cat >"conftest.$ac_ext" <<_ACEOF
6757 #line 6757 "configure"
6758 #include "confdefs.h"
6759 #include <stdio.h>
6760 int
6761 main (void)
6762 {
6763 printf("Hello work\\n");
6764   ;
6765   return 0;
6766 }
6767 _ACEOF
6768 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6769 if { (eval echo "$as_me:6769: \"$ac_link\"") >&5
6770   (eval $ac_link) 2>&5
6771   ac_status=$?
6772   echo "$as_me:6772: \$? = $ac_status" >&5
6773   (exit "$ac_status"); } &&
6774          { ac_try='test -s "conftest$ac_exeext"'
6775   { (eval echo "$as_me:6775: \"$ac_try\"") >&5
6776   (eval $ac_try) 2>&5
6777   ac_status=$?
6778   echo "$as_me:6778: \$? = $ac_status" >&5
6779   (exit "$ac_status"); }; }; then
6780   cf_cflags_work=yes
6781 else
6782   echo "$as_me: failed program was:" >&5
6783 cat "conftest.$ac_ext" >&5
6784 cf_cflags_work=no
6785 fi
6786 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6787                 echo "$as_me:6787: result: $cf_cflags_work" >&5
6788 echo "${ECHO_T}$cf_cflags_work" >&6
6789                 if test "$cf_cflags_work" = no
6790                 then
6791                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6792
6793 echo "${as_me:-configure}:6793: testing try to work around by appending shared-options ..." 1>&5
6794
6795                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6796                 fi
6797
6798 echo "$as_me:6798: checking if versioned-symbols file should be used" >&5
6799 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6800
6801 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6802 if test "${with_versioned_syms+set}" = set; then
6803   withval="$with_versioned_syms"
6804   with_versioned_syms=$withval
6805 else
6806   with_versioned_syms=no
6807 fi;
6808 case "x$with_versioned_syms" in
6809 (xyes)
6810         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6811
6812         ;;
6813 (xno)
6814         ;;
6815 (x/*)
6816         test -f "$with_versioned_syms" || { { echo "$as_me:6816: error: expected a filename: $with_versioned_syms" >&5
6817 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6818    { (exit 1); exit 1; }; }
6819         ;;
6820 (*)
6821         test -f "$with_versioned_syms" || { { echo "$as_me:6821: error: expected a filename: $with_versioned_syms" >&5
6822 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6823    { (exit 1); exit 1; }; }
6824         with_versioned_syms=`pwd`/"$with_versioned_syms"
6825         ;;
6826 esac
6827 echo "$as_me:6827: result: $with_versioned_syms" >&5
6828 echo "${ECHO_T}$with_versioned_syms" >&6
6829
6830 RESULTING_SYMS=
6831 VERSIONED_SYMS=
6832 WILDCARD_SYMS=
6833
6834 if test "x$with_versioned_syms" != xno
6835 then
6836         RESULTING_SYMS=$with_versioned_syms
6837         case "x$MK_SHARED_LIB" in
6838         (*-Wl,*)
6839                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6840                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6841                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6842
6843 echo "${as_me:-configure}:6843: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6844
6845                 ;;
6846         (*-dy\ *)
6847                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6848                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6849                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6850
6851 echo "${as_me:-configure}:6851: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6852
6853                 ;;
6854         (*)
6855                 { echo "$as_me:6855: WARNING: this system does not support versioned-symbols" >&5
6856 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6857                 ;;
6858         esac
6859
6860         # Linux ld can selectively override scope, e.g., of symbols beginning with
6861         # "_" by first declaring some as global, and then using a wildcard to
6862         # declare the others as local.  Some other loaders cannot do this.  Check
6863         # by constructing a (very) simple shared library and inspecting its
6864         # symbols.
6865         if test "x$VERSIONED_SYMS" != "x"
6866         then
6867                 echo "$as_me:6867: checking if wildcards can be used to selectively omit symbols" >&5
6868 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6869                 WILDCARD_SYMS=no
6870
6871                 # make sources
6872                 rm -f conftest.*
6873
6874                 cat >conftest.ver <<EOF
6875 module_1.0 {
6876 global:
6877         globalf1;
6878 local:
6879         localf1;
6880 };
6881 module_2.0 {
6882 global:
6883         globalf2;
6884 local:
6885         localf2;
6886         _*;
6887 } module_1.0;
6888 submodule_1.0 {
6889 global:
6890         subglobalf1;
6891         _ismissing;
6892 local:
6893         sublocalf1;
6894 };
6895 submodule_2.0 {
6896 global:
6897         subglobalf2;
6898 local:
6899         sublocalf2;
6900         _*;
6901 } submodule_1.0;
6902 EOF
6903                 cat >conftest.$ac_ext <<EOF
6904 #line 6904 "configure"
6905 int     _ismissing(void) { return 1; }
6906 int     _localf1(void) { return 1; }
6907 int     _localf2(void) { return 2; }
6908 int     globalf1(void) { return 1; }
6909 int     globalf2(void) { return 2; }
6910 int     _sublocalf1(void) { return 1; }
6911 int     _sublocalf2(void) { return 2; }
6912 int     subglobalf1(void) { return 1; }
6913 int     subglobalf2(void) { return 2; }
6914 EOF
6915                 cat >conftest.mk <<EOF
6916 CC=${CC}
6917 CFLAGS=${CFLAGS}
6918 CPPFLAGS=${CPPFLAGS}
6919 LDFLAGS=${LDFLAGS}
6920 LIBS=${LIBS}
6921 VERSIONED_SYMS=${VERSIONED_SYMS}
6922 RESULTING_SYMS=conftest.ver
6923 MK_SHARED_LIB=${MK_SHARED_LIB}
6924 conftest.so: conftest.$ac_cv_objext
6925                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6926 EOF
6927
6928                 # compile source, make library
6929                 if make -f conftest.mk 2>&5 >/dev/null
6930                 then
6931                         # test for missing symbol in either Data or Text section
6932                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6933                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6934                 fi
6935                 echo "$as_me:6935: result: $WILDCARD_SYMS" >&5
6936 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6937                 rm -f conftest.*
6938         fi
6939 fi
6940
6941                 ;;
6942         esac
6943 done
6944
6945 ### Checks for special libraries, must be done up-front.
6946 SHLIB_LIST=""
6947
6948 echo "$as_me:6948: checking if you want to link with the GPM mouse library" >&5
6949 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6950
6951 # Check whether --with-gpm or --without-gpm was given.
6952 if test "${with_gpm+set}" = set; then
6953   withval="$with_gpm"
6954   with_gpm=$withval
6955 else
6956   with_gpm=maybe
6957 fi;
6958 echo "$as_me:6958: result: $with_gpm" >&5
6959 echo "${ECHO_T}$with_gpm" >&6
6960
6961 if test "$with_gpm" != no ; then
6962         echo "$as_me:6962: checking for gpm.h" >&5
6963 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6964 if test "${ac_cv_header_gpm_h+set}" = set; then
6965   echo $ECHO_N "(cached) $ECHO_C" >&6
6966 else
6967   cat >"conftest.$ac_ext" <<_ACEOF
6968 #line 6968 "configure"
6969 #include "confdefs.h"
6970 #include <gpm.h>
6971 _ACEOF
6972 if { (eval echo "$as_me:6972: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6973   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6974   ac_status=$?
6975   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6976   rm -f conftest.er1
6977   cat conftest.err >&5
6978   echo "$as_me:6978: \$? = $ac_status" >&5
6979   (exit "$ac_status"); } >/dev/null; then
6980   if test -s conftest.err; then
6981     ac_cpp_err=$ac_c_preproc_warn_flag
6982   else
6983     ac_cpp_err=
6984   fi
6985 else
6986   ac_cpp_err=yes
6987 fi
6988 if test -z "$ac_cpp_err"; then
6989   ac_cv_header_gpm_h=yes
6990 else
6991   echo "$as_me: failed program was:" >&5
6992   cat "conftest.$ac_ext" >&5
6993   ac_cv_header_gpm_h=no
6994 fi
6995 rm -f conftest.err "conftest.$ac_ext"
6996 fi
6997 echo "$as_me:6997: result: $ac_cv_header_gpm_h" >&5
6998 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6999 if test "$ac_cv_header_gpm_h" = yes; then
7000
7001 cat >>confdefs.h <<\EOF
7002 #define HAVE_GPM_H 1
7003 EOF
7004
7005                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7006                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7007
7008 echo "${as_me:-configure}:7008: testing assuming we really have GPM library ..." 1>&5
7009
7010 cat >>confdefs.h <<\EOF
7011 #define HAVE_LIBGPM 1
7012 EOF
7013
7014                         with_gpm=yes
7015                 else
7016                         echo "$as_me:7016: checking for Gpm_Open in -lgpm" >&5
7017 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7018 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7019   echo $ECHO_N "(cached) $ECHO_C" >&6
7020 else
7021   ac_check_lib_save_LIBS=$LIBS
7022 LIBS="-lgpm  $LIBS"
7023 cat >"conftest.$ac_ext" <<_ACEOF
7024 #line 7024 "configure"
7025 #include "confdefs.h"
7026
7027 /* Override any gcc2 internal prototype to avoid an error.  */
7028 #ifdef __cplusplus
7029 extern "C"
7030 #endif
7031 /* We use char because int might match the return type of a gcc2
7032    builtin and then its argument prototype would still apply.  */
7033 char Gpm_Open ();
7034 int
7035 main (void)
7036 {
7037 Gpm_Open ();
7038   ;
7039   return 0;
7040 }
7041 _ACEOF
7042 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7043 if { (eval echo "$as_me:7043: \"$ac_link\"") >&5
7044   (eval $ac_link) 2>&5
7045   ac_status=$?
7046   echo "$as_me:7046: \$? = $ac_status" >&5
7047   (exit "$ac_status"); } &&
7048          { ac_try='test -s "conftest$ac_exeext"'
7049   { (eval echo "$as_me:7049: \"$ac_try\"") >&5
7050   (eval $ac_try) 2>&5
7051   ac_status=$?
7052   echo "$as_me:7052: \$? = $ac_status" >&5
7053   (exit "$ac_status"); }; }; then
7054   ac_cv_lib_gpm_Gpm_Open=yes
7055 else
7056   echo "$as_me: failed program was:" >&5
7057 cat "conftest.$ac_ext" >&5
7058 ac_cv_lib_gpm_Gpm_Open=no
7059 fi
7060 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7061 LIBS=$ac_check_lib_save_LIBS
7062 fi
7063 echo "$as_me:7063: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7064 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7065 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7066   with_gpm=yes
7067 else
7068
7069                                 if test "$with_gpm" = maybe; then
7070                                         { echo "$as_me:7070: WARNING: Cannot link with GPM library" >&5
7071 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7072                                         with_gpm=no
7073                                 else
7074                                         { { echo "$as_me:7074: error: Cannot link with GPM library" >&5
7075 echo "$as_me: error: Cannot link with GPM library" >&2;}
7076    { (exit 1); exit 1; }; }
7077                                 fi
7078
7079 fi
7080
7081                 fi
7082
7083 else
7084
7085                 test "$with_gpm" != maybe && { echo "$as_me:7085: WARNING: Cannot find GPM header" >&5
7086 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7087                 with_gpm=no
7088
7089 fi
7090
7091 fi
7092
7093 if test "$with_gpm" != no ; then
7094         echo "$as_me:7094: checking if you want to load GPM dynamically" >&5
7095 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7096
7097 # Check whether --with-dlsym or --without-dlsym was given.
7098 if test "${with_dlsym+set}" = set; then
7099   withval="$with_dlsym"
7100   with_dlsym=$withval
7101 else
7102   with_dlsym=yes
7103 fi;
7104         echo "$as_me:7104: result: $with_dlsym" >&5
7105 echo "${ECHO_T}$with_dlsym" >&6
7106         if test "x$with_dlsym" = xyes ; then
7107
7108 cf_have_dlsym=no
7109 echo "$as_me:7109: checking for dlsym" >&5
7110 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7111 if test "${ac_cv_func_dlsym+set}" = set; then
7112   echo $ECHO_N "(cached) $ECHO_C" >&6
7113 else
7114   cat >"conftest.$ac_ext" <<_ACEOF
7115 #line 7115 "configure"
7116 #include "confdefs.h"
7117 #define dlsym autoconf_temporary
7118 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7119 #undef dlsym
7120
7121 #ifdef __cplusplus
7122 extern "C"
7123 #endif
7124
7125 /* We use char because int might match the return type of a gcc2
7126    builtin and then its argument prototype would still apply.  */
7127 char dlsym (void);
7128
7129 int
7130 main (void)
7131 {
7132
7133 /* The GNU C library defines stubs for functions which it implements
7134     to always fail with ENOSYS.  Some functions are actually named
7135     something starting with __ and the normal name is an alias.  */
7136 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7137 #error found stub for dlsym
7138 #endif
7139
7140         return dlsym ();
7141   ;
7142   return 0;
7143 }
7144 _ACEOF
7145 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7146 if { (eval echo "$as_me:7146: \"$ac_link\"") >&5
7147   (eval $ac_link) 2>&5
7148   ac_status=$?
7149   echo "$as_me:7149: \$? = $ac_status" >&5
7150   (exit "$ac_status"); } &&
7151          { ac_try='test -s "conftest$ac_exeext"'
7152   { (eval echo "$as_me:7152: \"$ac_try\"") >&5
7153   (eval $ac_try) 2>&5
7154   ac_status=$?
7155   echo "$as_me:7155: \$? = $ac_status" >&5
7156   (exit "$ac_status"); }; }; then
7157   ac_cv_func_dlsym=yes
7158 else
7159   echo "$as_me: failed program was:" >&5
7160 cat "conftest.$ac_ext" >&5
7161 ac_cv_func_dlsym=no
7162 fi
7163 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7164 fi
7165 echo "$as_me:7165: result: $ac_cv_func_dlsym" >&5
7166 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7167 if test "$ac_cv_func_dlsym" = yes; then
7168   cf_have_dlsym=yes
7169 else
7170
7171 cf_have_libdl=no
7172 echo "$as_me:7172: checking for dlsym in -ldl" >&5
7173 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7174 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7175   echo $ECHO_N "(cached) $ECHO_C" >&6
7176 else
7177   ac_check_lib_save_LIBS=$LIBS
7178 LIBS="-ldl  $LIBS"
7179 cat >"conftest.$ac_ext" <<_ACEOF
7180 #line 7180 "configure"
7181 #include "confdefs.h"
7182
7183 /* Override any gcc2 internal prototype to avoid an error.  */
7184 #ifdef __cplusplus
7185 extern "C"
7186 #endif
7187 /* We use char because int might match the return type of a gcc2
7188    builtin and then its argument prototype would still apply.  */
7189 char dlsym ();
7190 int
7191 main (void)
7192 {
7193 dlsym ();
7194   ;
7195   return 0;
7196 }
7197 _ACEOF
7198 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7199 if { (eval echo "$as_me:7199: \"$ac_link\"") >&5
7200   (eval $ac_link) 2>&5
7201   ac_status=$?
7202   echo "$as_me:7202: \$? = $ac_status" >&5
7203   (exit "$ac_status"); } &&
7204          { ac_try='test -s "conftest$ac_exeext"'
7205   { (eval echo "$as_me:7205: \"$ac_try\"") >&5
7206   (eval $ac_try) 2>&5
7207   ac_status=$?
7208   echo "$as_me:7208: \$? = $ac_status" >&5
7209   (exit "$ac_status"); }; }; then
7210   ac_cv_lib_dl_dlsym=yes
7211 else
7212   echo "$as_me: failed program was:" >&5
7213 cat "conftest.$ac_ext" >&5
7214 ac_cv_lib_dl_dlsym=no
7215 fi
7216 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7217 LIBS=$ac_check_lib_save_LIBS
7218 fi
7219 echo "$as_me:7219: result: $ac_cv_lib_dl_dlsym" >&5
7220 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7221 if test "$ac_cv_lib_dl_dlsym" = yes; then
7222
7223         cf_have_dlsym=yes
7224         cf_have_libdl=yes
7225 fi
7226
7227 fi
7228
7229 if test "$cf_have_dlsym" = yes ; then
7230         test "$cf_have_libdl" = yes && {
7231 cf_add_libs="$LIBS"
7232 # reverse order
7233 cf_add_0lib=
7234 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7235 # filter duplicates
7236 for cf_add_1lib in $cf_add_0lib; do
7237         for cf_add_2lib in $cf_add_libs; do
7238                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7239                         cf_add_1lib=
7240                         break
7241                 fi
7242         done
7243         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7244 done
7245 LIBS="$cf_add_libs"
7246  }
7247
7248         echo "$as_me:7248: checking whether able to link to dl*() functions" >&5
7249 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7250         cat >"conftest.$ac_ext" <<_ACEOF
7251 #line 7251 "configure"
7252 #include "confdefs.h"
7253 #include <dlfcn.h>
7254 int
7255 main (void)
7256 {
7257
7258                 void *obj;
7259                 if ((obj = dlopen("filename", 0)) != 0) {
7260                         if (dlsym(obj, "symbolname") == 0) {
7261                         dlclose(obj);
7262                         }
7263                 }
7264   ;
7265   return 0;
7266 }
7267 _ACEOF
7268 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7269 if { (eval echo "$as_me:7269: \"$ac_link\"") >&5
7270   (eval $ac_link) 2>&5
7271   ac_status=$?
7272   echo "$as_me:7272: \$? = $ac_status" >&5
7273   (exit "$ac_status"); } &&
7274          { ac_try='test -s "conftest$ac_exeext"'
7275   { (eval echo "$as_me:7275: \"$ac_try\"") >&5
7276   (eval $ac_try) 2>&5
7277   ac_status=$?
7278   echo "$as_me:7278: \$? = $ac_status" >&5
7279   (exit "$ac_status"); }; }; then
7280
7281 cat >>confdefs.h <<\EOF
7282 #define HAVE_LIBDL 1
7283 EOF
7284
7285 else
7286   echo "$as_me: failed program was:" >&5
7287 cat "conftest.$ac_ext" >&5
7288
7289                 { { echo "$as_me:7289: error: Cannot link test program for libdl" >&5
7290 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7291    { (exit 1); exit 1; }; }
7292 fi
7293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7294         echo "$as_me:7294: result: ok" >&5
7295 echo "${ECHO_T}ok" >&6
7296 else
7297         { { echo "$as_me:7297: error: Cannot find dlsym function" >&5
7298 echo "$as_me: error: Cannot find dlsym function" >&2;}
7299    { (exit 1); exit 1; }; }
7300 fi
7301
7302                 if test "x$with_gpm" != xyes ; then
7303                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7304
7305 echo "${as_me:-configure}:7305: testing assuming soname for gpm is $with_gpm ..." 1>&5
7306
7307                         cf_cv_gpm_soname="$with_gpm"
7308                 else
7309
7310 echo "$as_me:7310: checking for soname of gpm library" >&5
7311 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7312 if test "${cf_cv_gpm_soname+set}" = set; then
7313   echo $ECHO_N "(cached) $ECHO_C" >&6
7314 else
7315
7316 cf_cv_gpm_soname=unknown
7317 if test "$cross_compiling" != yes ; then
7318 cat >conftest.$ac_ext <<CF_EOF
7319 #include <gpm.h>
7320 int main(void)
7321 {
7322 if (Gpm_Open(0,0)) Gpm_Close();
7323         ${cf_cv_main_return:-return}(0);
7324 }
7325 CF_EOF
7326 cf_save_LIBS="$LIBS"
7327
7328 cf_add_libs="$LIBS"
7329 # reverse order
7330 cf_add_0lib=
7331 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7332 # filter duplicates
7333 for cf_add_1lib in $cf_add_0lib; do
7334         for cf_add_2lib in $cf_add_libs; do
7335                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7336                         cf_add_1lib=
7337                         break
7338                 fi
7339         done
7340         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7341 done
7342 LIBS="$cf_add_libs"
7343
7344         if { (eval echo "$as_me:7344: \"$ac_compile\"") >&5
7345   (eval $ac_compile) 2>&5
7346   ac_status=$?
7347   echo "$as_me:7347: \$? = $ac_status" >&5
7348   (exit "$ac_status"); } ; then
7349                 if { (eval echo "$as_me:7349: \"$ac_link\"") >&5
7350   (eval $ac_link) 2>&5
7351   ac_status=$?
7352   echo "$as_me:7352: \$? = $ac_status" >&5
7353   (exit "$ac_status"); } ; then
7354                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7355                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7356                 fi
7357         fi
7358 rm -rf ./conftest*
7359 LIBS="$cf_save_LIBS"
7360 fi
7361
7362 fi
7363 echo "$as_me:7363: result: $cf_cv_gpm_soname" >&5
7364 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7365
7366                 fi
7367                 test "$cf_cv_gpm_soname" != "unknown" &&
7368 cat >>confdefs.h <<EOF
7369 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7370 EOF
7371
7372                 SHLIB_LIST="-ldl $SHLIB_LIST"
7373
7374 cf_add_libs="$PRIVATE_LIBS"
7375 # reverse order
7376 cf_add_0lib=
7377 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7378 # filter duplicates
7379 for cf_add_1lib in $cf_add_0lib; do
7380         for cf_add_2lib in $cf_add_libs; do
7381                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7382                         cf_add_1lib=
7383                         break
7384                 fi
7385         done
7386         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7387 done
7388 PRIVATE_LIBS="$cf_add_libs"
7389
7390         else
7391                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7392
7393 cf_add_libs="$TEST_LIBS"
7394 # reverse order
7395 cf_add_0lib=
7396 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7397 # filter duplicates
7398 for cf_add_1lib in $cf_add_0lib; do
7399         for cf_add_2lib in $cf_add_libs; do
7400                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7401                         cf_add_1lib=
7402                         break
7403                 fi
7404         done
7405         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7406 done
7407 TEST_LIBS="$cf_add_libs"
7408
7409 cf_add_libs="$PRIVATE_LIBS"
7410 # reverse order
7411 cf_add_0lib=
7412 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7413 # filter duplicates
7414 for cf_add_1lib in $cf_add_0lib; do
7415         for cf_add_2lib in $cf_add_libs; do
7416                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7417                         cf_add_1lib=
7418                         break
7419                 fi
7420         done
7421         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7422 done
7423 PRIVATE_LIBS="$cf_add_libs"
7424
7425         fi
7426
7427 cat >>confdefs.h <<\EOF
7428 #define HAVE_LIBGPM 1
7429 EOF
7430
7431 echo "$as_me:7431: checking for Gpm_Wgetch in -lgpm" >&5
7432 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7433 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7434   echo $ECHO_N "(cached) $ECHO_C" >&6
7435 else
7436   ac_check_lib_save_LIBS=$LIBS
7437 LIBS="-lgpm  $LIBS"
7438 cat >"conftest.$ac_ext" <<_ACEOF
7439 #line 7439 "configure"
7440 #include "confdefs.h"
7441
7442 /* Override any gcc2 internal prototype to avoid an error.  */
7443 #ifdef __cplusplus
7444 extern "C"
7445 #endif
7446 /* We use char because int might match the return type of a gcc2
7447    builtin and then its argument prototype would still apply.  */
7448 char Gpm_Wgetch ();
7449 int
7450 main (void)
7451 {
7452 Gpm_Wgetch ();
7453   ;
7454   return 0;
7455 }
7456 _ACEOF
7457 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7458 if { (eval echo "$as_me:7458: \"$ac_link\"") >&5
7459   (eval $ac_link) 2>&5
7460   ac_status=$?
7461   echo "$as_me:7461: \$? = $ac_status" >&5
7462   (exit "$ac_status"); } &&
7463          { ac_try='test -s "conftest$ac_exeext"'
7464   { (eval echo "$as_me:7464: \"$ac_try\"") >&5
7465   (eval $ac_try) 2>&5
7466   ac_status=$?
7467   echo "$as_me:7467: \$? = $ac_status" >&5
7468   (exit "$ac_status"); }; }; then
7469   ac_cv_lib_gpm_Gpm_Wgetch=yes
7470 else
7471   echo "$as_me: failed program was:" >&5
7472 cat "conftest.$ac_ext" >&5
7473 ac_cv_lib_gpm_Gpm_Wgetch=no
7474 fi
7475 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7476 LIBS=$ac_check_lib_save_LIBS
7477 fi
7478 echo "$as_me:7478: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7479 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7480 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7481
7482 echo "$as_me:7482: checking if GPM is weakly bound to curses library" >&5
7483 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7484 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7485   echo $ECHO_N "(cached) $ECHO_C" >&6
7486 else
7487
7488 cf_cv_check_gpm_wgetch=unknown
7489 if test "$cross_compiling" != yes ; then
7490
7491 cat >conftest.$ac_ext <<CF_EOF
7492 #include <gpm.h>
7493 int main(void)
7494 {
7495         Gpm_Wgetch();
7496         ${cf_cv_main_return:-return}(0);
7497 }
7498 CF_EOF
7499
7500         cf_save_LIBS="$LIBS"
7501         # This only works if we can look at the symbol table.  If a shared
7502         # library is stripped for install, we cannot use that.  So we're forced
7503         # to rely on the static library, noting that some packagers may not
7504         # include it.
7505         LIBS="-static -lgpm -dynamic $LIBS"
7506         if { (eval echo "$as_me:7506: \"$ac_compile\"") >&5
7507   (eval $ac_compile) 2>&5
7508   ac_status=$?
7509   echo "$as_me:7509: \$? = $ac_status" >&5
7510   (exit "$ac_status"); } ; then
7511                 if { (eval echo "$as_me:7511: \"$ac_link\"") >&5
7512   (eval $ac_link) 2>&5
7513   ac_status=$?
7514   echo "$as_me:7514: \$? = $ac_status" >&5
7515   (exit "$ac_status"); } ; then
7516                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7517                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7518                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7519                 fi
7520         fi
7521         rm -rf ./conftest*
7522         LIBS="$cf_save_LIBS"
7523 fi
7524
7525 fi
7526 echo "$as_me:7526: result: $cf_cv_check_gpm_wgetch" >&5
7527 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7528
7529 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7530         { echo "$as_me:7530: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7531 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7532 fi
7533
7534 fi
7535
7536 fi
7537
7538 echo "$as_me:7538: checking if you want to use PCRE2 for regular-expressions" >&5
7539 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7540
7541 # Check whether --with-pcre2 or --without-pcre2 was given.
7542 if test "${with_pcre2+set}" = set; then
7543   withval="$with_pcre2"
7544
7545 fi;
7546 test -z "$with_pcre2" && with_pcre2=no
7547 echo "$as_me:7547: result: $with_pcre2" >&5
7548 echo "${ECHO_T}$with_pcre2" >&6
7549
7550 if test "x$with_pcre2" != xno ; then
7551         cf_with_pcre2_ok=no
7552         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7553         do
7554
7555 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7556         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7557
7558 echo "${as_me:-configure}:7558: testing found package $cf_with_pcre2 ..." 1>&5
7559
7560         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7561         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7562         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7563
7564 echo "${as_me:-configure}:7564: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7565
7566         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7567
7568 echo "${as_me:-configure}:7568: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7569
7570 cf_fix_cppflags=no
7571 cf_new_cflags=
7572 cf_new_cppflags=
7573 cf_new_extra_cppflags=
7574
7575 for cf_add_cflags in $cf_pkgconfig_incs
7576 do
7577 case "$cf_fix_cppflags" in
7578 (no)
7579         case "$cf_add_cflags" in
7580         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7581                 case "$cf_add_cflags" in
7582                 (-D*)
7583                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7584
7585                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7586                                 && test -z "${cf_tst_cflags}" \
7587                                 && cf_fix_cppflags=yes
7588
7589                         if test "$cf_fix_cppflags" = yes ; then
7590
7591         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7592         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7593
7594                                 continue
7595                         elif test "${cf_tst_cflags}" = "\"'" ; then
7596
7597         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7598         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7599
7600                                 continue
7601                         fi
7602                         ;;
7603                 esac
7604                 case "$CPPFLAGS" in
7605                 (*$cf_add_cflags)
7606                         ;;
7607                 (*)
7608                         case "$cf_add_cflags" in
7609                         (-D*)
7610                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7611
7612 CPPFLAGS=`echo "$CPPFLAGS" | \
7613         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7614                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7615
7616                                 ;;
7617                         esac
7618
7619         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7620         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7621
7622                         ;;
7623                 esac
7624                 ;;
7625         (*)
7626
7627         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7628         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7629
7630                 ;;
7631         esac
7632         ;;
7633 (yes)
7634
7635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7637
7638         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7639
7640         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7641                 && test -z "${cf_tst_cflags}" \
7642                 && cf_fix_cppflags=no
7643         ;;
7644 esac
7645 done
7646
7647 if test -n "$cf_new_cflags" ; then
7648
7649         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7650         CFLAGS="${CFLAGS}$cf_new_cflags"
7651
7652 fi
7653
7654 if test -n "$cf_new_cppflags" ; then
7655
7656         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7657         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7658
7659 fi
7660
7661 if test -n "$cf_new_extra_cppflags" ; then
7662
7663         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7664         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7665
7666 fi
7667
7668 cf_add_libs="$LIBS"
7669 # reverse order
7670 cf_add_0lib=
7671 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7672 # filter duplicates
7673 for cf_add_1lib in $cf_add_0lib; do
7674         for cf_add_2lib in $cf_add_libs; do
7675                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7676                         cf_add_1lib=
7677                         break
7678                 fi
7679         done
7680         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7681 done
7682 LIBS="$cf_add_libs"
7683
7684         cf_with_pcre2_ok=yes; break
7685 else
7686         cf_pkgconfig_incs=
7687         cf_pkgconfig_libs=
7688         :
7689 fi
7690
7691         done
7692         cf_with_pcre2_ok=yes || { { echo "$as_me:7692: error: Cannot find PCRE2 library" >&5
7693 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7694    { (exit 1); exit 1; }; }
7695
7696 cat >>confdefs.h <<\EOF
7697 #define HAVE_LIB_PCRE2 1
7698 EOF
7699
7700         # if pkgconfig gave no results, look for the libraries directly
7701         case "$LIBS" in
7702         (*pcre2-posix*|*pcreposix*)
7703                 ;;
7704         (*)
7705                 echo "$as_me:7705: checking for regcomp in -lpcre2-posix" >&5
7706 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7707 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7708   echo $ECHO_N "(cached) $ECHO_C" >&6
7709 else
7710   ac_check_lib_save_LIBS=$LIBS
7711 LIBS="-lpcre2-posix  $LIBS"
7712 cat >"conftest.$ac_ext" <<_ACEOF
7713 #line 7713 "configure"
7714 #include "confdefs.h"
7715
7716 /* Override any gcc2 internal prototype to avoid an error.  */
7717 #ifdef __cplusplus
7718 extern "C"
7719 #endif
7720 /* We use char because int might match the return type of a gcc2
7721    builtin and then its argument prototype would still apply.  */
7722 char regcomp ();
7723 int
7724 main (void)
7725 {
7726 regcomp ();
7727   ;
7728   return 0;
7729 }
7730 _ACEOF
7731 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7732 if { (eval echo "$as_me:7732: \"$ac_link\"") >&5
7733   (eval $ac_link) 2>&5
7734   ac_status=$?
7735   echo "$as_me:7735: \$? = $ac_status" >&5
7736   (exit "$ac_status"); } &&
7737          { ac_try='test -s "conftest$ac_exeext"'
7738   { (eval echo "$as_me:7738: \"$ac_try\"") >&5
7739   (eval $ac_try) 2>&5
7740   ac_status=$?
7741   echo "$as_me:7741: \$? = $ac_status" >&5
7742   (exit "$ac_status"); }; }; then
7743   ac_cv_lib_pcre2_posix_regcomp=yes
7744 else
7745   echo "$as_me: failed program was:" >&5
7746 cat "conftest.$ac_ext" >&5
7747 ac_cv_lib_pcre2_posix_regcomp=no
7748 fi
7749 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7750 LIBS=$ac_check_lib_save_LIBS
7751 fi
7752 echo "$as_me:7752: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7753 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7754 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7755
7756 cf_add_libs="$LIBS"
7757 # reverse order
7758 cf_add_0lib=
7759 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7760 # filter duplicates
7761 for cf_add_1lib in $cf_add_0lib; do
7762         for cf_add_2lib in $cf_add_libs; do
7763                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7764                         cf_add_1lib=
7765                         break
7766                 fi
7767         done
7768         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7769 done
7770 LIBS="$cf_add_libs"
7771
7772 else
7773   echo "$as_me:7773: checking for regcomp in -lpcreposix" >&5
7774 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7775 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7776   echo $ECHO_N "(cached) $ECHO_C" >&6
7777 else
7778   ac_check_lib_save_LIBS=$LIBS
7779 LIBS="-lpcreposix  $LIBS"
7780 cat >"conftest.$ac_ext" <<_ACEOF
7781 #line 7781 "configure"
7782 #include "confdefs.h"
7783
7784 /* Override any gcc2 internal prototype to avoid an error.  */
7785 #ifdef __cplusplus
7786 extern "C"
7787 #endif
7788 /* We use char because int might match the return type of a gcc2
7789    builtin and then its argument prototype would still apply.  */
7790 char regcomp ();
7791 int
7792 main (void)
7793 {
7794 regcomp ();
7795   ;
7796   return 0;
7797 }
7798 _ACEOF
7799 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7800 if { (eval echo "$as_me:7800: \"$ac_link\"") >&5
7801   (eval $ac_link) 2>&5
7802   ac_status=$?
7803   echo "$as_me:7803: \$? = $ac_status" >&5
7804   (exit "$ac_status"); } &&
7805          { ac_try='test -s "conftest$ac_exeext"'
7806   { (eval echo "$as_me:7806: \"$ac_try\"") >&5
7807   (eval $ac_try) 2>&5
7808   ac_status=$?
7809   echo "$as_me:7809: \$? = $ac_status" >&5
7810   (exit "$ac_status"); }; }; then
7811   ac_cv_lib_pcreposix_regcomp=yes
7812 else
7813   echo "$as_me: failed program was:" >&5
7814 cat "conftest.$ac_ext" >&5
7815 ac_cv_lib_pcreposix_regcomp=no
7816 fi
7817 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7818 LIBS=$ac_check_lib_save_LIBS
7819 fi
7820 echo "$as_me:7820: result: $ac_cv_lib_pcreposix_regcomp" >&5
7821 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7822 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7823
7824 cf_add_libs="$LIBS"
7825 # reverse order
7826 cf_add_0lib=
7827 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7828 # filter duplicates
7829 for cf_add_1lib in $cf_add_0lib; do
7830         for cf_add_2lib in $cf_add_libs; do
7831                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7832                         cf_add_1lib=
7833                         break
7834                 fi
7835         done
7836         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7837 done
7838 LIBS="$cf_add_libs"
7839
7840 else
7841   { { echo "$as_me:7841: error: Cannot find PCRE2 POSIX library" >&5
7842 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7843    { (exit 1); exit 1; }; }
7844 fi
7845
7846 fi
7847
7848                 ;;
7849         esac
7850
7851         # either way, check for the library header files
7852
7853 for ac_header in pcre2posix.h pcreposix.h
7854 do
7855 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7856 echo "$as_me:7856: checking for $ac_header" >&5
7857 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7858 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7859   echo $ECHO_N "(cached) $ECHO_C" >&6
7860 else
7861   cat >"conftest.$ac_ext" <<_ACEOF
7862 #line 7862 "configure"
7863 #include "confdefs.h"
7864 #include <$ac_header>
7865 _ACEOF
7866 if { (eval echo "$as_me:7866: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7867   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7868   ac_status=$?
7869   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7870   rm -f conftest.er1
7871   cat conftest.err >&5
7872   echo "$as_me:7872: \$? = $ac_status" >&5
7873   (exit "$ac_status"); } >/dev/null; then
7874   if test -s conftest.err; then
7875     ac_cpp_err=$ac_c_preproc_warn_flag
7876   else
7877     ac_cpp_err=
7878   fi
7879 else
7880   ac_cpp_err=yes
7881 fi
7882 if test -z "$ac_cpp_err"; then
7883   eval "$as_ac_Header=yes"
7884 else
7885   echo "$as_me: failed program was:" >&5
7886   cat "conftest.$ac_ext" >&5
7887   eval "$as_ac_Header=no"
7888 fi
7889 rm -f conftest.err "conftest.$ac_ext"
7890 fi
7891 echo "$as_me:7891: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7892 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7893 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7894   cat >>confdefs.h <<EOF
7895 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7896 EOF
7897
7898 fi
7899 done
7900
7901 for ac_func in PCRE2regcomp
7902 do
7903 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7904 echo "$as_me:7904: checking for $ac_func" >&5
7905 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7906 if eval "test \"\${$as_ac_var+set}\" = set"; then
7907   echo $ECHO_N "(cached) $ECHO_C" >&6
7908 else
7909   cat >"conftest.$ac_ext" <<_ACEOF
7910 #line 7910 "configure"
7911 #include "confdefs.h"
7912 #define $ac_func autoconf_temporary
7913 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7914 #undef $ac_func
7915
7916 #ifdef __cplusplus
7917 extern "C"
7918 #endif
7919
7920 /* We use char because int might match the return type of a gcc2
7921    builtin and then its argument prototype would still apply.  */
7922 char $ac_func (void);
7923
7924 int
7925 main (void)
7926 {
7927
7928 /* The GNU C library defines stubs for functions which it implements
7929     to always fail with ENOSYS.  Some functions are actually named
7930     something starting with __ and the normal name is an alias.  */
7931 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7932 #error found stub for $ac_func
7933 #endif
7934
7935         return $ac_func ();
7936   ;
7937   return 0;
7938 }
7939 _ACEOF
7940 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7941 if { (eval echo "$as_me:7941: \"$ac_link\"") >&5
7942   (eval $ac_link) 2>&5
7943   ac_status=$?
7944   echo "$as_me:7944: \$? = $ac_status" >&5
7945   (exit "$ac_status"); } &&
7946          { ac_try='test -s "conftest$ac_exeext"'
7947   { (eval echo "$as_me:7947: \"$ac_try\"") >&5
7948   (eval $ac_try) 2>&5
7949   ac_status=$?
7950   echo "$as_me:7950: \$? = $ac_status" >&5
7951   (exit "$ac_status"); }; }; then
7952   eval "$as_ac_var=yes"
7953 else
7954   echo "$as_me: failed program was:" >&5
7955 cat "conftest.$ac_ext" >&5
7956 eval "$as_ac_var=no"
7957 fi
7958 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7959 fi
7960 echo "$as_me:7960: result: `eval echo '${'"$as_ac_var"'}'`" >&5
7961 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
7962 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
7963   cat >>confdefs.h <<EOF
7964 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7965 EOF
7966
7967 fi
7968 done
7969
7970 fi
7971
7972 # not everyone has "test -c"
7973 if test -c /dev/sysmouse 2>/dev/null ; then
7974 echo "$as_me:7974: checking if you want to use sysmouse" >&5
7975 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7976
7977 # Check whether --with-sysmouse or --without-sysmouse was given.
7978 if test "${with_sysmouse+set}" = set; then
7979   withval="$with_sysmouse"
7980   cf_with_sysmouse=$withval
7981 else
7982   cf_with_sysmouse=maybe
7983 fi;
7984         if test "$cf_with_sysmouse" != no ; then
7985         cat >"conftest.$ac_ext" <<_ACEOF
7986 #line 7986 "configure"
7987 #include "confdefs.h"
7988
7989 #include <osreldate.h>
7990 #if (__FreeBSD_version >= 400017)
7991 #include <sys/consio.h>
7992 #include <sys/fbio.h>
7993 #else
7994 #include <machine/console.h>
7995 #endif
7996
7997 int
7998 main (void)
7999 {
8000
8001         struct mouse_info the_mouse;
8002         ioctl(0, CONS_MOUSECTL, &the_mouse);
8003
8004   ;
8005   return 0;
8006 }
8007 _ACEOF
8008 rm -f "conftest.$ac_objext"
8009 if { (eval echo "$as_me:8009: \"$ac_compile\"") >&5
8010   (eval $ac_compile) 2>&5
8011   ac_status=$?
8012   echo "$as_me:8012: \$? = $ac_status" >&5
8013   (exit "$ac_status"); } &&
8014          { ac_try='test -s "conftest.$ac_objext"'
8015   { (eval echo "$as_me:8015: \"$ac_try\"") >&5
8016   (eval $ac_try) 2>&5
8017   ac_status=$?
8018   echo "$as_me:8018: \$? = $ac_status" >&5
8019   (exit "$ac_status"); }; }; then
8020   cf_with_sysmouse=yes
8021 else
8022   echo "$as_me: failed program was:" >&5
8023 cat "conftest.$ac_ext" >&5
8024 cf_with_sysmouse=no
8025 fi
8026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8027         fi
8028 echo "$as_me:8028: result: $cf_with_sysmouse" >&5
8029 echo "${ECHO_T}$cf_with_sysmouse" >&6
8030 test "$cf_with_sysmouse" = yes &&
8031 cat >>confdefs.h <<\EOF
8032 #define USE_SYSMOUSE 1
8033 EOF
8034
8035 fi
8036
8037 # pretend that ncurses==ncursesw==ncursest
8038 echo "$as_me:8038: checking if you want to disable library suffixes" >&5
8039 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8040
8041 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8042 if test "${enable_lib_suffixes+set}" = set; then
8043   enableval="$enable_lib_suffixes"
8044   test "$enableval" != no && enableval=yes
8045         if test "$enableval" != "yes" ; then
8046     disable_lib_suffixes=yes
8047         else
8048                 disable_lib_suffixes=no
8049         fi
8050 else
8051   enableval=yes
8052         disable_lib_suffixes=no
8053
8054 fi;
8055 echo "$as_me:8055: result: $disable_lib_suffixes" >&5
8056 echo "${ECHO_T}$disable_lib_suffixes" >&6
8057
8058 ### If we're building with rpath, try to link non-standard libs that way too.
8059 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8060
8061 echo "$as_me:8061: checking if rpath-hack should be disabled" >&5
8062 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8063
8064 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8065 if test "${enable_rpath_hack+set}" = set; then
8066   enableval="$enable_rpath_hack"
8067   test "$enableval" != no && enableval=yes
8068         if test "$enableval" != "yes" ; then
8069     enable_rpath_hack=no
8070         else
8071                 enable_rpath_hack=yes
8072         fi
8073 else
8074   enableval=yes
8075         enable_rpath_hack=yes
8076
8077 fi;
8078 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8079 echo "$as_me:8079: result: $cf_disable_rpath_hack" >&5
8080 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8081
8082 if test "$enable_rpath_hack" = yes ; then
8083
8084 echo "$as_me:8084: checking for updated LDFLAGS" >&5
8085 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8086 if test -n "$LD_RPATH_OPT" ; then
8087         echo "$as_me:8087: result: maybe" >&5
8088 echo "${ECHO_T}maybe" >&6
8089
8090         for ac_prog in ldd
8091 do
8092   # Extract the first word of "$ac_prog", so it can be a program name with args.
8093 set dummy $ac_prog; ac_word=$2
8094 echo "$as_me:8094: checking for $ac_word" >&5
8095 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8096 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8097   echo $ECHO_N "(cached) $ECHO_C" >&6
8098 else
8099   if test -n "$cf_ldd_prog"; then
8100   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8101 else
8102   ac_save_IFS=$IFS; IFS=$ac_path_separator
8103 ac_dummy="$PATH"
8104 for ac_dir in $ac_dummy; do
8105   IFS=$ac_save_IFS
8106   test -z "$ac_dir" && ac_dir=.
8107   $as_executable_p "$ac_dir/$ac_word" || continue
8108 ac_cv_prog_cf_ldd_prog="$ac_prog"
8109 echo "$as_me:8109: found $ac_dir/$ac_word" >&5
8110 break
8111 done
8112
8113 fi
8114 fi
8115 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8116 if test -n "$cf_ldd_prog"; then
8117   echo "$as_me:8117: result: $cf_ldd_prog" >&5
8118 echo "${ECHO_T}$cf_ldd_prog" >&6
8119 else
8120   echo "$as_me:8120: result: no" >&5
8121 echo "${ECHO_T}no" >&6
8122 fi
8123
8124   test -n "$cf_ldd_prog" && break
8125 done
8126 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8127
8128         cf_rpath_list="/usr/lib /lib"
8129         if test "$cf_ldd_prog" != no
8130         then
8131                 cf_rpath_oops=
8132
8133 cat >"conftest.$ac_ext" <<_ACEOF
8134 #line 8134 "configure"
8135 #include "confdefs.h"
8136 #include <stdio.h>
8137 int
8138 main (void)
8139 {
8140 printf("Hello");
8141   ;
8142   return 0;
8143 }
8144 _ACEOF
8145 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8146 if { (eval echo "$as_me:8146: \"$ac_link\"") >&5
8147   (eval $ac_link) 2>&5
8148   ac_status=$?
8149   echo "$as_me:8149: \$? = $ac_status" >&5
8150   (exit "$ac_status"); } &&
8151          { ac_try='test -s "conftest$ac_exeext"'
8152   { (eval echo "$as_me:8152: \"$ac_try\"") >&5
8153   (eval $ac_try) 2>&5
8154   ac_status=$?
8155   echo "$as_me:8155: \$? = $ac_status" >&5
8156   (exit "$ac_status"); }; }; then
8157   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8158                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8159 else
8160   echo "$as_me: failed program was:" >&5
8161 cat "conftest.$ac_ext" >&5
8162 fi
8163 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8164
8165                 # If we passed the link-test, but get a "not found" on a given library,
8166                 # this could be due to inept reconfiguration of gcc to make it only
8167                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8168                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8169                 # /usr/local libraries.
8170                 if test -n "$cf_rpath_oops"
8171                 then
8172                         for cf_rpath_src in $cf_rpath_oops
8173                         do
8174                                 for cf_rpath_dir in \
8175                                         /usr/local \
8176                                         /usr/pkg \
8177                                         /opt/sfw
8178                                 do
8179                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8180                                         then
8181                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8182
8183 echo "${as_me:-configure}:8183: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8184
8185                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8186                                                 break
8187                                         fi
8188                                 done
8189                         done
8190                 fi
8191         fi
8192
8193         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8194
8195 echo "${as_me:-configure}:8195: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8196
8197 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8198
8199 echo "${as_me:-configure}:8199: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8200
8201 cf_rpath_dst=
8202 for cf_rpath_src in $LDFLAGS
8203 do
8204         case "$cf_rpath_src" in
8205         (-L*)
8206
8207                 # check if this refers to a directory which we will ignore
8208                 cf_rpath_skip=no
8209                 if test -n "$cf_rpath_list"
8210                 then
8211                         for cf_rpath_item in $cf_rpath_list
8212                         do
8213                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8214                                 then
8215                                         cf_rpath_skip=yes
8216                                         break
8217                                 fi
8218                         done
8219                 fi
8220
8221                 if test "$cf_rpath_skip" = no
8222                 then
8223                         # transform the option
8224                         if test "$LD_RPATH_OPT" = "-R " ; then
8225                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8226                         else
8227                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8228                         fi
8229
8230                         # if we have not already added this, add it now
8231                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8232                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8233                         then
8234                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8235
8236 echo "${as_me:-configure}:8236: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8237
8238                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8239                         fi
8240                 fi
8241                 ;;
8242         esac
8243         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8244 done
8245 LDFLAGS=$cf_rpath_dst
8246
8247 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8248
8249 echo "${as_me:-configure}:8249: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8250
8251 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8252
8253 echo "${as_me:-configure}:8253: testing ...checking LIBS $LIBS ..." 1>&5
8254
8255 cf_rpath_dst=
8256 for cf_rpath_src in $LIBS
8257 do
8258         case "$cf_rpath_src" in
8259         (-L*)
8260
8261                 # check if this refers to a directory which we will ignore
8262                 cf_rpath_skip=no
8263                 if test -n "$cf_rpath_list"
8264                 then
8265                         for cf_rpath_item in $cf_rpath_list
8266                         do
8267                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8268                                 then
8269                                         cf_rpath_skip=yes
8270                                         break
8271                                 fi
8272                         done
8273                 fi
8274
8275                 if test "$cf_rpath_skip" = no
8276                 then
8277                         # transform the option
8278                         if test "$LD_RPATH_OPT" = "-R " ; then
8279                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8280                         else
8281                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8282                         fi
8283
8284                         # if we have not already added this, add it now
8285                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8286                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8287                         then
8288                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8289
8290 echo "${as_me:-configure}:8290: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8291
8292                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8293                         fi
8294                 fi
8295                 ;;
8296         esac
8297         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8298 done
8299 LIBS=$cf_rpath_dst
8300
8301 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8302
8303 echo "${as_me:-configure}:8303: testing ...checked LIBS $LIBS ..." 1>&5
8304
8305         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8306
8307 echo "${as_me:-configure}:8307: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8308
8309 else
8310         echo "$as_me:8310: result: no" >&5
8311 echo "${ECHO_T}no" >&6
8312 fi
8313
8314 fi
8315
8316 fi
8317
8318 ### Depending on the system, someone may use rpath to build ncurses but not
8319 # want users of the package to rely upon that feature.  Give those people an
8320 # option to suppress that detail from EXTRA_LDFLAGS.
8321 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8322 if test -n "$EXTRA_PKG_LDFLAGS"
8323 then
8324         echo "$as_me:8324: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8325 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8326
8327 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8328 if test "${enable_pkg_ldflags+set}" = set; then
8329   enableval="$enable_pkg_ldflags"
8330   test "$enableval" != no && enableval=yes
8331         if test "$enableval" != "yes" ; then
8332     disable_pkg_ldflags=yes
8333         else
8334                 disable_pkg_ldflags=no
8335         fi
8336 else
8337   enableval=yes
8338         disable_pkg_ldflags=no
8339
8340 fi;
8341         echo "$as_me:8341: result: $disable_pkg_ldflags" >&5
8342 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8343         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8344 fi
8345
8346 ###############################################################################
8347
8348 ###     use option --with-extra-suffix to append suffix to headers and libraries
8349 echo "$as_me:8349: checking if you wish to append extra suffix to header/library paths" >&5
8350 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8351 EXTRA_SUFFIX=
8352
8353 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8354 if test "${with_extra_suffix+set}" = set; then
8355   withval="$with_extra_suffix"
8356   case x$withval in
8357         (xno)
8358                 ;;
8359         (xyes|x)
8360                 EXTRA_SUFFIX=$cf_cv_abi_version
8361                 ;;
8362         (*)
8363                 EXTRA_SUFFIX=$withval
8364                 ;;
8365         esac
8366
8367 fi;
8368 echo "$as_me:8368: result: $EXTRA_SUFFIX" >&5
8369 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8370
8371 ###     use option --disable-overwrite to leave out the link to -lcurses
8372 echo "$as_me:8372: checking if you wish to install ncurses overwriting curses" >&5
8373 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8374
8375 # Check whether --enable-overwrite or --disable-overwrite was given.
8376 if test "${enable_overwrite+set}" = set; then
8377   enableval="$enable_overwrite"
8378   with_overwrite=$enableval
8379 else
8380   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8381 fi;
8382 echo "$as_me:8382: result: $with_overwrite" >&5
8383 echo "${ECHO_T}$with_overwrite" >&6
8384
8385 echo "$as_me:8385: checking if external terminfo-database is used" >&5
8386 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8387
8388 # Check whether --enable-database or --disable-database was given.
8389 if test "${enable_database+set}" = set; then
8390   enableval="$enable_database"
8391   use_database=$enableval
8392 else
8393   use_database=yes
8394 fi;
8395 echo "$as_me:8395: result: $use_database" >&5
8396 echo "${ECHO_T}$use_database" >&6
8397
8398 case "$host_os" in
8399 (os2*)
8400         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8401         ;;
8402 (*)
8403         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8404         ;;
8405 esac
8406
8407 NCURSES_USE_DATABASE=0
8408 if test "$use_database" != no ; then
8409         NCURSES_USE_DATABASE=1
8410
8411         echo "$as_me:8411: checking which terminfo source-file will be installed" >&5
8412 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8413
8414 # Check whether --with-database or --without-database was given.
8415 if test "${with_database+set}" = set; then
8416   withval="$with_database"
8417   TERMINFO_SRC=$withval
8418 fi;
8419         echo "$as_me:8419: result: $TERMINFO_SRC" >&5
8420 echo "${ECHO_T}$TERMINFO_SRC" >&6
8421
8422         echo "$as_me:8422: checking whether to use hashed database instead of directory/tree" >&5
8423 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8424
8425 # Check whether --with-hashed-db or --without-hashed-db was given.
8426 if test "${with_hashed_db+set}" = set; then
8427   withval="$with_hashed_db"
8428
8429 else
8430   with_hashed_db=no
8431 fi;
8432         echo "$as_me:8432: result: $with_hashed_db" >&5
8433 echo "${ECHO_T}$with_hashed_db" >&6
8434 else
8435         with_hashed_db=no
8436 fi
8437
8438 echo "$as_me:8438: checking for list of fallback descriptions" >&5
8439 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8440
8441 # Check whether --with-fallbacks or --without-fallbacks was given.
8442 if test "${with_fallbacks+set}" = set; then
8443   withval="$with_fallbacks"
8444   with_fallback=$withval
8445 else
8446   with_fallback=
8447 fi;
8448 echo "$as_me:8448: result: $with_fallback" >&5
8449 echo "${ECHO_T}$with_fallback" >&6
8450
8451 case ".$with_fallback" in
8452 (.|.no)
8453         FALLBACK_LIST=
8454         ;;
8455 (.yes)
8456         { echo "$as_me:8456: WARNING: expected a list of terminal descriptions" >&5
8457 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8458         ;;
8459 (*)
8460         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8461         ;;
8462 esac
8463
8464 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8465 # tree for generating the terminal descriptions that will be compiled into the
8466 # library.  If your toolchain is old, it may not handle current terminal
8467 # databases.  Use configure-options to point to the tools which will be used,
8468 # rather than the first ones found on the $PATH.
8469 if test -n "$ac_tool_prefix"; then
8470   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8471 set dummy ${ac_tool_prefix}tic; ac_word=$2
8472 echo "$as_me:8472: checking for $ac_word" >&5
8473 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8474 if test "${ac_cv_prog_TIC+set}" = set; then
8475   echo $ECHO_N "(cached) $ECHO_C" >&6
8476 else
8477   if test -n "$TIC"; then
8478   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8479 else
8480   ac_save_IFS=$IFS; IFS=$ac_path_separator
8481 ac_dummy="$PATH"
8482 for ac_dir in $ac_dummy; do
8483   IFS=$ac_save_IFS
8484   test -z "$ac_dir" && ac_dir=.
8485   $as_executable_p "$ac_dir/$ac_word" || continue
8486 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8487 echo "$as_me:8487: found $ac_dir/$ac_word" >&5
8488 break
8489 done
8490
8491 fi
8492 fi
8493 TIC=$ac_cv_prog_TIC
8494 if test -n "$TIC"; then
8495   echo "$as_me:8495: result: $TIC" >&5
8496 echo "${ECHO_T}$TIC" >&6
8497 else
8498   echo "$as_me:8498: result: no" >&5
8499 echo "${ECHO_T}no" >&6
8500 fi
8501
8502 fi
8503 if test -z "$ac_cv_prog_TIC"; then
8504   ac_ct_TIC=$TIC
8505   # Extract the first word of "tic", so it can be a program name with args.
8506 set dummy tic; ac_word=$2
8507 echo "$as_me:8507: checking for $ac_word" >&5
8508 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8509 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8510   echo $ECHO_N "(cached) $ECHO_C" >&6
8511 else
8512   if test -n "$ac_ct_TIC"; then
8513   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8514 else
8515   ac_save_IFS=$IFS; IFS=$ac_path_separator
8516 ac_dummy="$PATH"
8517 for ac_dir in $ac_dummy; do
8518   IFS=$ac_save_IFS
8519   test -z "$ac_dir" && ac_dir=.
8520   $as_executable_p "$ac_dir/$ac_word" || continue
8521 ac_cv_prog_ac_ct_TIC="tic"
8522 echo "$as_me:8522: found $ac_dir/$ac_word" >&5
8523 break
8524 done
8525
8526 fi
8527 fi
8528 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8529 if test -n "$ac_ct_TIC"; then
8530   echo "$as_me:8530: result: $ac_ct_TIC" >&5
8531 echo "${ECHO_T}$ac_ct_TIC" >&6
8532 else
8533   echo "$as_me:8533: result: no" >&5
8534 echo "${ECHO_T}no" >&6
8535 fi
8536
8537   TIC=$ac_ct_TIC
8538 else
8539   TIC="$ac_cv_prog_TIC"
8540 fi
8541
8542 if test -n "$ac_tool_prefix"; then
8543   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8544 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8545 echo "$as_me:8545: checking for $ac_word" >&5
8546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8547 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8548   echo $ECHO_N "(cached) $ECHO_C" >&6
8549 else
8550   if test -n "$INFOCMP"; then
8551   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8552 else
8553   ac_save_IFS=$IFS; IFS=$ac_path_separator
8554 ac_dummy="$PATH"
8555 for ac_dir in $ac_dummy; do
8556   IFS=$ac_save_IFS
8557   test -z "$ac_dir" && ac_dir=.
8558   $as_executable_p "$ac_dir/$ac_word" || continue
8559 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8560 echo "$as_me:8560: found $ac_dir/$ac_word" >&5
8561 break
8562 done
8563
8564 fi
8565 fi
8566 INFOCMP=$ac_cv_prog_INFOCMP
8567 if test -n "$INFOCMP"; then
8568   echo "$as_me:8568: result: $INFOCMP" >&5
8569 echo "${ECHO_T}$INFOCMP" >&6
8570 else
8571   echo "$as_me:8571: result: no" >&5
8572 echo "${ECHO_T}no" >&6
8573 fi
8574
8575 fi
8576 if test -z "$ac_cv_prog_INFOCMP"; then
8577   ac_ct_INFOCMP=$INFOCMP
8578   # Extract the first word of "infocmp", so it can be a program name with args.
8579 set dummy infocmp; ac_word=$2
8580 echo "$as_me:8580: checking for $ac_word" >&5
8581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8582 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8583   echo $ECHO_N "(cached) $ECHO_C" >&6
8584 else
8585   if test -n "$ac_ct_INFOCMP"; then
8586   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8587 else
8588   ac_save_IFS=$IFS; IFS=$ac_path_separator
8589 ac_dummy="$PATH"
8590 for ac_dir in $ac_dummy; do
8591   IFS=$ac_save_IFS
8592   test -z "$ac_dir" && ac_dir=.
8593   $as_executable_p "$ac_dir/$ac_word" || continue
8594 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8595 echo "$as_me:8595: found $ac_dir/$ac_word" >&5
8596 break
8597 done
8598
8599 fi
8600 fi
8601 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8602 if test -n "$ac_ct_INFOCMP"; then
8603   echo "$as_me:8603: result: $ac_ct_INFOCMP" >&5
8604 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8605 else
8606   echo "$as_me:8606: result: no" >&5
8607 echo "${ECHO_T}no" >&6
8608 fi
8609
8610   INFOCMP=$ac_ct_INFOCMP
8611 else
8612   INFOCMP="$ac_cv_prog_INFOCMP"
8613 fi
8614
8615 if test -n "$FALLBACK_LIST"
8616 then
8617
8618 # Check whether --with-tic-path or --without-tic-path was given.
8619 if test "${with_tic_path+set}" = set; then
8620   withval="$with_tic_path"
8621   echo "$as_me:8621: checking for tic program for fallbacks" >&5
8622 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8623                 TIC=$withval
8624                 echo "$as_me:8624: result: $TIC" >&5
8625 echo "${ECHO_T}$TIC" >&6
8626
8627 if test "x$prefix" != xNONE; then
8628         cf_path_syntax="$prefix"
8629 else
8630         cf_path_syntax="$ac_default_prefix"
8631 fi
8632
8633 case ".$TIC" in
8634 (.\$\(*\)*|.\'*\'*)
8635         ;;
8636 (..|./*|.\\*)
8637         ;;
8638 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8639         ;;
8640 (.\$\{*prefix\}*|.\$\{*dir\}*)
8641         eval TIC="$TIC"
8642         case ".$TIC" in
8643         (.NONE/*)
8644                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8645                 ;;
8646         esac
8647         ;;
8648 (.no|.NONE/*)
8649         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8650         ;;
8651 (*)
8652         { { echo "$as_me:8652: error: expected a pathname, not \"$TIC\"" >&5
8653 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8654    { (exit 1); exit 1; }; }
8655         ;;
8656 esac
8657
8658 else
8659
8660 test -z "$TIC" && TIC="tic"
8661 for ac_prog in $TIC tic
8662 do
8663   # Extract the first word of "$ac_prog", so it can be a program name with args.
8664 set dummy $ac_prog; ac_word=$2
8665 echo "$as_me:8665: checking for $ac_word" >&5
8666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8667 if test "${ac_cv_path_TIC+set}" = set; then
8668   echo $ECHO_N "(cached) $ECHO_C" >&6
8669 else
8670   case $TIC in
8671   [\\/]* | ?:[\\/]*)
8672   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8673   ;;
8674   *)
8675   ac_save_IFS=$IFS; IFS=$ac_path_separator
8676 ac_dummy="$PATH:/usr/local/ncurses/bin"
8677 for ac_dir in $ac_dummy; do
8678   IFS=$ac_save_IFS
8679   test -z "$ac_dir" && ac_dir=.
8680   if $as_executable_p "$ac_dir/$ac_word"; then
8681    ac_cv_path_TIC="$ac_dir/$ac_word"
8682    echo "$as_me:8682: found $ac_dir/$ac_word" >&5
8683    break
8684 fi
8685 done
8686
8687   ;;
8688 esac
8689 fi
8690 TIC=$ac_cv_path_TIC
8691
8692 if test -n "$TIC"; then
8693   echo "$as_me:8693: result: $TIC" >&5
8694 echo "${ECHO_T}$TIC" >&6
8695 else
8696   echo "$as_me:8696: result: no" >&5
8697 echo "${ECHO_T}no" >&6
8698 fi
8699
8700   test -n "$TIC" && break
8701 done
8702 test -n "$TIC" || TIC="$TIC"
8703
8704 cf_path_prog=""
8705 cf_path_args=""
8706 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8707 for cf_temp in $ac_cv_path_TIC
8708 do
8709         if test -z "$cf_path_prog" ; then
8710                 if test "$with_full_paths" = yes ; then
8711
8712 if test "x$prefix" != xNONE; then
8713         cf_path_syntax="$prefix"
8714 else
8715         cf_path_syntax="$ac_default_prefix"
8716 fi
8717
8718 case ".$cf_temp" in
8719 (.\$\(*\)*|.\'*\'*)
8720         ;;
8721 (..|./*|.\\*)
8722         ;;
8723 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8724         ;;
8725 (.\$\{*prefix\}*|.\$\{*dir\}*)
8726         eval cf_temp="$cf_temp"
8727         case ".$cf_temp" in
8728         (.NONE/*)
8729                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8730                 ;;
8731         esac
8732         ;;
8733 (.no|.NONE/*)
8734         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8735         ;;
8736 (*)
8737         break
8738         ;;
8739 esac
8740
8741                         cf_path_prog="$cf_temp"
8742                 else
8743                         cf_path_prog="`basename "$cf_temp"`"
8744                 fi
8745         elif test -z "$cf_path_args" ; then
8746                 cf_path_args="$cf_temp"
8747         else
8748                 cf_path_args="$cf_path_args $cf_temp"
8749         fi
8750 done
8751 IFS="$cf_save_ifs"
8752
8753 if test -n "$cf_path_prog" ; then
8754
8755 echo "${as_me:-configure}:8755: testing defining path for ${cf_path_prog} ..." 1>&5
8756
8757 cat >>confdefs.h <<EOF
8758 #define TIC_PATH "$cf_path_prog"
8759 EOF
8760
8761         test -n "$cf_path_args" &&
8762 cat >>confdefs.h <<EOF
8763 #define TIC_ARGS "$cf_path_args"
8764 EOF
8765
8766 fi
8767
8768                 if test -z "$TIC"
8769                 then
8770                         { echo "$as_me:8770: WARNING: no tic program found for fallbacks" >&5
8771 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8772                 fi
8773
8774 fi;
8775
8776 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8777 if test "${with_infocmp_path+set}" = set; then
8778   withval="$with_infocmp_path"
8779   echo "$as_me:8779: checking for infocmp program for fallbacks" >&5
8780 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8781                 INFOCMP=$withval
8782                 echo "$as_me:8782: result: $INFOCMP" >&5
8783 echo "${ECHO_T}$INFOCMP" >&6
8784
8785 if test "x$prefix" != xNONE; then
8786         cf_path_syntax="$prefix"
8787 else
8788         cf_path_syntax="$ac_default_prefix"
8789 fi
8790
8791 case ".$INFOCMP" in
8792 (.\$\(*\)*|.\'*\'*)
8793         ;;
8794 (..|./*|.\\*)
8795         ;;
8796 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8797         ;;
8798 (.\$\{*prefix\}*|.\$\{*dir\}*)
8799         eval INFOCMP="$INFOCMP"
8800         case ".$INFOCMP" in
8801         (.NONE/*)
8802                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8803                 ;;
8804         esac
8805         ;;
8806 (.no|.NONE/*)
8807         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8808         ;;
8809 (*)
8810         { { echo "$as_me:8810: error: expected a pathname, not \"$INFOCMP\"" >&5
8811 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8812    { (exit 1); exit 1; }; }
8813         ;;
8814 esac
8815
8816 else
8817
8818 test -z "$INFOCMP" && INFOCMP="infocmp"
8819 for ac_prog in $INFOCMP infocmp
8820 do
8821   # Extract the first word of "$ac_prog", so it can be a program name with args.
8822 set dummy $ac_prog; ac_word=$2
8823 echo "$as_me:8823: checking for $ac_word" >&5
8824 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8825 if test "${ac_cv_path_INFOCMP+set}" = set; then
8826   echo $ECHO_N "(cached) $ECHO_C" >&6
8827 else
8828   case $INFOCMP in
8829   [\\/]* | ?:[\\/]*)
8830   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8831   ;;
8832   *)
8833   ac_save_IFS=$IFS; IFS=$ac_path_separator
8834 ac_dummy="$PATH:/usr/local/ncurses/bin"
8835 for ac_dir in $ac_dummy; do
8836   IFS=$ac_save_IFS
8837   test -z "$ac_dir" && ac_dir=.
8838   if $as_executable_p "$ac_dir/$ac_word"; then
8839    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8840    echo "$as_me:8840: found $ac_dir/$ac_word" >&5
8841    break
8842 fi
8843 done
8844
8845   ;;
8846 esac
8847 fi
8848 INFOCMP=$ac_cv_path_INFOCMP
8849
8850 if test -n "$INFOCMP"; then
8851   echo "$as_me:8851: result: $INFOCMP" >&5
8852 echo "${ECHO_T}$INFOCMP" >&6
8853 else
8854   echo "$as_me:8854: result: no" >&5
8855 echo "${ECHO_T}no" >&6
8856 fi
8857
8858   test -n "$INFOCMP" && break
8859 done
8860 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8861
8862 cf_path_prog=""
8863 cf_path_args=""
8864 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8865 for cf_temp in $ac_cv_path_INFOCMP
8866 do
8867         if test -z "$cf_path_prog" ; then
8868                 if test "$with_full_paths" = yes ; then
8869
8870 if test "x$prefix" != xNONE; then
8871         cf_path_syntax="$prefix"
8872 else
8873         cf_path_syntax="$ac_default_prefix"
8874 fi
8875
8876 case ".$cf_temp" in
8877 (.\$\(*\)*|.\'*\'*)
8878         ;;
8879 (..|./*|.\\*)
8880         ;;
8881 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8882         ;;
8883 (.\$\{*prefix\}*|.\$\{*dir\}*)
8884         eval cf_temp="$cf_temp"
8885         case ".$cf_temp" in
8886         (.NONE/*)
8887                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8888                 ;;
8889         esac
8890         ;;
8891 (.no|.NONE/*)
8892         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8893         ;;
8894 (*)
8895         break
8896         ;;
8897 esac
8898
8899                         cf_path_prog="$cf_temp"
8900                 else
8901                         cf_path_prog="`basename "$cf_temp"`"
8902                 fi
8903         elif test -z "$cf_path_args" ; then
8904                 cf_path_args="$cf_temp"
8905         else
8906                 cf_path_args="$cf_path_args $cf_temp"
8907         fi
8908 done
8909 IFS="$cf_save_ifs"
8910
8911 if test -n "$cf_path_prog" ; then
8912
8913 echo "${as_me:-configure}:8913: testing defining path for ${cf_path_prog} ..." 1>&5
8914
8915 cat >>confdefs.h <<EOF
8916 #define INFOCMP_PATH "$cf_path_prog"
8917 EOF
8918
8919         test -n "$cf_path_args" &&
8920 cat >>confdefs.h <<EOF
8921 #define INFOCMP_ARGS "$cf_path_args"
8922 EOF
8923
8924 fi
8925
8926                 if test -z "$INFOCMP"
8927                 then
8928                         { echo "$as_me:8928: WARNING: no infocmp program found for fallbacks" >&5
8929 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8930                 fi
8931
8932 fi;
8933
8934         test -z "$TIC" && FALLBACK_LIST=
8935         test -z "$INFOCMP" && FALLBACK_LIST=
8936         if test -z "$FALLBACK_LIST"
8937         then
8938                 { echo "$as_me:8938: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8939 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8940         fi
8941 fi
8942
8943 USE_FALLBACKS=
8944 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8945
8946 echo "$as_me:8946: checking if you want modern xterm or antique" >&5
8947 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8948
8949 # Check whether --with-xterm-new or --without-xterm-new was given.
8950 if test "${with_xterm_new+set}" = set; then
8951   withval="$with_xterm_new"
8952   with_xterm_new=$withval
8953 else
8954   with_xterm_new=yes
8955 fi;
8956 case "$with_xterm_new" in
8957 (no) with_xterm_new=xterm-old;;
8958 (*)      with_xterm_new=xterm-new;;
8959 esac
8960 echo "$as_me:8960: result: $with_xterm_new" >&5
8961 echo "${ECHO_T}$with_xterm_new" >&6
8962 WHICH_XTERM=$with_xterm_new
8963
8964 echo "$as_me:8964: checking if xterm backspace sends BS or DEL" >&5
8965 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8966
8967 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8968 if test "${with_xterm_kbs+set}" = set; then
8969   withval="$with_xterm_kbs"
8970   with_xterm_kbs=$withval
8971 else
8972   with_xterm_kbs=BS
8973 fi;
8974 case x$with_xterm_kbs in
8975 (xyes|xno|xBS|xbs|x8)
8976         with_xterm_kbs=BS
8977         ;;
8978 (xDEL|xdel|x127)
8979         with_xterm_kbs=DEL
8980         ;;
8981 (*)
8982         with_xterm_kbs=$withval
8983         ;;
8984 esac
8985 echo "$as_me:8985: result: $with_xterm_kbs" >&5
8986 echo "${ECHO_T}$with_xterm_kbs" >&6
8987 XTERM_KBS=$with_xterm_kbs
8988
8989 MAKE_TERMINFO=
8990 if test "$use_database" = no ; then
8991         TERMINFO="${datadir}/terminfo"
8992         MAKE_TERMINFO="#"
8993 else
8994
8995 echo "$as_me:8995: checking for list of terminfo directories" >&5
8996 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8997
8998 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8999 if test "${with_terminfo_dirs+set}" = set; then
9000   withval="$with_terminfo_dirs"
9001
9002 else
9003   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9004 fi;
9005 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9006 cf_dst_path=
9007 for cf_src_path in $withval
9008 do
9009
9010 if test "x$prefix" != xNONE; then
9011         cf_path_syntax="$prefix"
9012 else
9013         cf_path_syntax="$ac_default_prefix"
9014 fi
9015
9016 case ".$cf_src_path" in
9017 (.\$\(*\)*|.\'*\'*)
9018         ;;
9019 (..|./*|.\\*)
9020         ;;
9021 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9022         ;;
9023 (.\$\{*prefix\}*|.\$\{*dir\}*)
9024         eval cf_src_path="$cf_src_path"
9025         case ".$cf_src_path" in
9026         (.NONE/*)
9027                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9028                 ;;
9029         esac
9030         ;;
9031 (.no|.NONE/*)
9032         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9033         ;;
9034 (*)
9035         { { echo "$as_me:9035: error: expected a pathname, not \"$cf_src_path\"" >&5
9036 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9037    { (exit 1); exit 1; }; }
9038         ;;
9039 esac
9040
9041   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9042   cf_dst_path="${cf_dst_path}${cf_src_path}"
9043 done
9044 IFS="$ac_save_ifs"
9045
9046 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9047 # so we have to check/work around.  We do prefer the result of "eval"...
9048 eval cf_dst_eval="$cf_dst_path"
9049 case "x$cf_dst_eval" in
9050 (xNONE*)
9051         TERMINFO_DIRS=$cf_dst_path
9052         ;;
9053 (*)
9054         TERMINFO_DIRS="$cf_dst_eval"
9055         ;;
9056 esac
9057
9058 echo "$as_me:9058: result: $TERMINFO_DIRS" >&5
9059 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9060 test -n "$TERMINFO_DIRS" &&
9061 cat >>confdefs.h <<EOF
9062 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9063 EOF
9064
9065 case "x$TERMINFO" in
9066 x???:*)
9067         { echo "$as_me:9067: WARNING: ignoring non-directory/file TERMINFO value" >&5
9068 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9069         unset TERMINFO
9070         ;;
9071 esac
9072
9073 echo "$as_me:9073: checking for default terminfo directory" >&5
9074 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9075
9076 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9077 if test "${with_default_terminfo_dir+set}" = set; then
9078   withval="$with_default_terminfo_dir"
9079
9080 else
9081   withval="${TERMINFO:-${datadir}/terminfo}"
9082 fi; if test -n "${datadir}/terminfo" ; then
9083
9084 if test "x$prefix" != xNONE; then
9085         cf_path_syntax="$prefix"
9086 else
9087         cf_path_syntax="$ac_default_prefix"
9088 fi
9089
9090 case ".$withval" in
9091 (.\$\(*\)*|.\'*\'*)
9092         ;;
9093 (..|./*|.\\*)
9094         ;;
9095 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9096         ;;
9097 (.\$\{*prefix\}*|.\$\{*dir\}*)
9098         eval withval="$withval"
9099         case ".$withval" in
9100         (.NONE/*)
9101                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9102                 ;;
9103         esac
9104         ;;
9105 (.no|.NONE/*)
9106         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9107         ;;
9108 (*)
9109         { { echo "$as_me:9109: error: expected a pathname, not \"$withval\"" >&5
9110 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9111    { (exit 1); exit 1; }; }
9112         ;;
9113 esac
9114
9115 fi
9116 eval TERMINFO="$withval"
9117
9118 echo "$as_me:9118: result: $TERMINFO" >&5
9119 echo "${ECHO_T}$TERMINFO" >&6
9120
9121 cat >>confdefs.h <<EOF
9122 #define TERMINFO "$TERMINFO"
9123 EOF
9124
9125 fi
9126
9127 ###     use option --disable-big-core to make tic run on small machines
9128 ###     We need 4Mb, check if we can allocate 50% more than that.
9129 echo "$as_me:9129: checking if big-core option selected" >&5
9130 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9131
9132 # Check whether --enable-big-core or --disable-big-core was given.
9133 if test "${enable_big_core+set}" = set; then
9134   enableval="$enable_big_core"
9135   with_big_core=$enableval
9136 else
9137   if test "$cross_compiling" = yes; then
9138   with_big_core=no
9139 else
9140   cat >"conftest.$ac_ext" <<_ACEOF
9141 #line 9141 "configure"
9142 #include "confdefs.h"
9143
9144 #include <stdlib.h>
9145 #include <string.h>
9146 int main() {
9147         unsigned long n = 6000000L;
9148         char *s = malloc(n);
9149         if (s != 0)
9150                 s[0] = s[n-1] = 0;
9151         ${cf_cv_main_return:-return}(s == 0);
9152 }
9153 _ACEOF
9154 rm -f "conftest$ac_exeext"
9155 if { (eval echo "$as_me:9155: \"$ac_link\"") >&5
9156   (eval $ac_link) 2>&5
9157   ac_status=$?
9158   echo "$as_me:9158: \$? = $ac_status" >&5
9159   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9160   { (eval echo "$as_me:9160: \"$ac_try\"") >&5
9161   (eval $ac_try) 2>&5
9162   ac_status=$?
9163   echo "$as_me:9163: \$? = $ac_status" >&5
9164   (exit "$ac_status"); }; }; then
9165   with_big_core=yes
9166 else
9167   echo "$as_me: program exited with status $ac_status" >&5
9168 echo "$as_me: failed program was:" >&5
9169 cat "conftest.$ac_ext" >&5
9170 with_big_core=no
9171 fi
9172 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9173 fi
9174 fi;
9175 echo "$as_me:9175: result: $with_big_core" >&5
9176 echo "${ECHO_T}$with_big_core" >&6
9177 test "x$with_big_core" = "xyes" &&
9178 cat >>confdefs.h <<\EOF
9179 #define HAVE_BIG_CORE 1
9180 EOF
9181
9182 ### ISO C only guarantees 512-char strings, we have tables which load faster
9183 ### when constructed using "big" strings.  More than the C compiler, the awk
9184 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9185 echo "$as_me:9185: checking if big-strings option selected" >&5
9186 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9187
9188 # Check whether --enable-big-strings or --disable-big-strings was given.
9189 if test "${enable_big_strings+set}" = set; then
9190   enableval="$enable_big_strings"
9191   with_big_strings=$enableval
9192 else
9193
9194         case x$AWK in
9195         (x)
9196                 eval with_big_strings=no
9197                 ;;
9198         (*)
9199                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9200                         | $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
9201                         eval with_big_strings=yes
9202                 else
9203                         eval with_big_strings=no
9204                 fi
9205                 ;;
9206         esac
9207
9208 fi;
9209 echo "$as_me:9209: result: $with_big_strings" >&5
9210 echo "${ECHO_T}$with_big_strings" >&6
9211
9212 USE_BIG_STRINGS=0
9213 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9214
9215 ###     use option --enable-termcap to compile in the termcap fallback support
9216 echo "$as_me:9216: checking if you want termcap-fallback support" >&5
9217 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9218
9219 # Check whether --enable-termcap or --disable-termcap was given.
9220 if test "${enable_termcap+set}" = set; then
9221   enableval="$enable_termcap"
9222   with_termcap=$enableval
9223 else
9224   with_termcap=no
9225 fi;
9226 echo "$as_me:9226: result: $with_termcap" >&5
9227 echo "${ECHO_T}$with_termcap" >&6
9228
9229 NCURSES_USE_TERMCAP=0
9230 if test "x$with_termcap" != "xyes" ; then
9231         if test "$use_database" = no ; then
9232                 if test -z "$with_fallback" ; then
9233                         { { echo "$as_me:9233: error: You have disabled the database w/o specifying fallbacks" >&5
9234 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9235    { (exit 1); exit 1; }; }
9236                 fi
9237         fi
9238
9239 cat >>confdefs.h <<\EOF
9240 #define PURE_TERMINFO 1
9241 EOF
9242
9243 else
9244
9245         if test "$with_ticlib" != no ; then
9246                 { { echo "$as_me:9246: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9247 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9248    { (exit 1); exit 1; }; }
9249         fi
9250
9251         NCURSES_USE_TERMCAP=1
9252         echo "$as_me:9252: checking for list of termcap files" >&5
9253 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9254
9255 # Check whether --with-termpath or --without-termpath was given.
9256 if test "${with_termpath+set}" = set; then
9257   withval="$with_termpath"
9258
9259 else
9260   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9261 fi;
9262 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9263 cf_dst_path=
9264 for cf_src_path in $withval
9265 do
9266
9267 if test "x$prefix" != xNONE; then
9268         cf_path_syntax="$prefix"
9269 else
9270         cf_path_syntax="$ac_default_prefix"
9271 fi
9272
9273 case ".$cf_src_path" in
9274 (.\$\(*\)*|.\'*\'*)
9275         ;;
9276 (..|./*|.\\*)
9277         ;;
9278 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9279         ;;
9280 (.\$\{*prefix\}*|.\$\{*dir\}*)
9281         eval cf_src_path="$cf_src_path"
9282         case ".$cf_src_path" in
9283         (.NONE/*)
9284                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9285                 ;;
9286         esac
9287         ;;
9288 (.no|.NONE/*)
9289         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9290         ;;
9291 (*)
9292         { { echo "$as_me:9292: error: expected a pathname, not \"$cf_src_path\"" >&5
9293 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9294    { (exit 1); exit 1; }; }
9295         ;;
9296 esac
9297
9298   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9299   cf_dst_path="${cf_dst_path}${cf_src_path}"
9300 done
9301 IFS="$ac_save_ifs"
9302
9303 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9304 # so we have to check/work around.  We do prefer the result of "eval"...
9305 eval cf_dst_eval="$cf_dst_path"
9306 case "x$cf_dst_eval" in
9307 (xNONE*)
9308         TERMPATH=$cf_dst_path
9309         ;;
9310 (*)
9311         TERMPATH="$cf_dst_eval"
9312         ;;
9313 esac
9314
9315         echo "$as_me:9315: result: $TERMPATH" >&5
9316 echo "${ECHO_T}$TERMPATH" >&6
9317         test -n "$TERMPATH" &&
9318 cat >>confdefs.h <<EOF
9319 #define TERMPATH "$TERMPATH"
9320 EOF
9321
9322         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9323         echo "$as_me:9323: checking if fast termcap-loader is needed" >&5
9324 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9325
9326 # Check whether --enable-getcap or --disable-getcap was given.
9327 if test "${enable_getcap+set}" = set; then
9328   enableval="$enable_getcap"
9329   with_getcap=$enableval
9330 else
9331   with_getcap=no
9332 fi;
9333         echo "$as_me:9333: result: $with_getcap" >&5
9334 echo "${ECHO_T}$with_getcap" >&6
9335         test "x$with_getcap" = "xyes" &&
9336 cat >>confdefs.h <<\EOF
9337 #define USE_GETCAP 1
9338 EOF
9339
9340         echo "$as_me:9340: checking if translated termcaps will be cached in ~/.terminfo" >&5
9341 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9342
9343 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9344 if test "${enable_getcap_cache+set}" = set; then
9345   enableval="$enable_getcap_cache"
9346   with_getcap_cache=$enableval
9347 else
9348   with_getcap_cache=no
9349 fi;
9350         echo "$as_me:9350: result: $with_getcap_cache" >&5
9351 echo "${ECHO_T}$with_getcap_cache" >&6
9352         test "x$with_getcap_cache" = "xyes" &&
9353 cat >>confdefs.h <<\EOF
9354 #define USE_GETCAP_CACHE 1
9355 EOF
9356
9357 fi
9358
9359 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9360 echo "$as_me:9360: checking if ~/.terminfo is wanted" >&5
9361 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9362
9363 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9364 if test "${enable_home_terminfo+set}" = set; then
9365   enableval="$enable_home_terminfo"
9366   with_home_terminfo=$enableval
9367 else
9368   with_home_terminfo=yes
9369 fi;
9370 echo "$as_me:9370: result: $with_home_terminfo" >&5
9371 echo "${ECHO_T}$with_home_terminfo" >&6
9372 test "x$with_home_terminfo" = "xyes" &&
9373 cat >>confdefs.h <<\EOF
9374 #define USE_HOME_TERMINFO 1
9375 EOF
9376
9377 echo "$as_me:9377: checking if you want to permit root to use ncurses environment variables" >&5
9378 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9379
9380 # Check whether --enable-root-environ or --disable-root-environ was given.
9381 if test "${enable_root_environ+set}" = set; then
9382   enableval="$enable_root_environ"
9383   with_root_environ=$enableval
9384 else
9385   with_root_environ=yes
9386 fi;
9387 echo "$as_me:9387: result: $with_root_environ" >&5
9388 echo "${ECHO_T}$with_root_environ" >&6
9389 test "x$with_root_environ" = xyes &&
9390 cat >>confdefs.h <<\EOF
9391 #define USE_ROOT_ENVIRON 1
9392 EOF
9393
9394 echo "$as_me:9394: checking if you want to permit setuid programs to access all files" >&5
9395 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9396
9397 # Check whether --enable-root-environ or --disable-root-environ was given.
9398 if test "${enable_root_environ+set}" = set; then
9399   enableval="$enable_root_environ"
9400   with_root_access=$enableval
9401 else
9402   with_root_access=yes
9403 fi;
9404 echo "$as_me:9404: result: $with_root_access" >&5
9405 echo "${ECHO_T}$with_root_access" >&6
9406 test "x$with_root_access" = xyes &&
9407 cat >>confdefs.h <<\EOF
9408 #define USE_ROOT_ACCESS 1
9409 EOF
9410
9411 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9412 ###   to reduce storage requirements for the terminfo database.
9413
9414 for ac_header in \
9415 unistd.h \
9416
9417 do
9418 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9419 echo "$as_me:9419: checking for $ac_header" >&5
9420 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9421 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9422   echo $ECHO_N "(cached) $ECHO_C" >&6
9423 else
9424   cat >"conftest.$ac_ext" <<_ACEOF
9425 #line 9425 "configure"
9426 #include "confdefs.h"
9427 #include <$ac_header>
9428 _ACEOF
9429 if { (eval echo "$as_me:9429: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9430   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9431   ac_status=$?
9432   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9433   rm -f conftest.er1
9434   cat conftest.err >&5
9435   echo "$as_me:9435: \$? = $ac_status" >&5
9436   (exit "$ac_status"); } >/dev/null; then
9437   if test -s conftest.err; then
9438     ac_cpp_err=$ac_c_preproc_warn_flag
9439   else
9440     ac_cpp_err=
9441   fi
9442 else
9443   ac_cpp_err=yes
9444 fi
9445 if test -z "$ac_cpp_err"; then
9446   eval "$as_ac_Header=yes"
9447 else
9448   echo "$as_me: failed program was:" >&5
9449   cat "conftest.$ac_ext" >&5
9450   eval "$as_ac_Header=no"
9451 fi
9452 rm -f conftest.err "conftest.$ac_ext"
9453 fi
9454 echo "$as_me:9454: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9455 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9456 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9457   cat >>confdefs.h <<EOF
9458 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9459 EOF
9460
9461 fi
9462 done
9463
9464 for ac_func in \
9465         remove \
9466         unlink
9467 do
9468 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9469 echo "$as_me:9469: checking for $ac_func" >&5
9470 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9471 if eval "test \"\${$as_ac_var+set}\" = set"; then
9472   echo $ECHO_N "(cached) $ECHO_C" >&6
9473 else
9474   cat >"conftest.$ac_ext" <<_ACEOF
9475 #line 9475 "configure"
9476 #include "confdefs.h"
9477 #define $ac_func autoconf_temporary
9478 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9479 #undef $ac_func
9480
9481 #ifdef __cplusplus
9482 extern "C"
9483 #endif
9484
9485 /* We use char because int might match the return type of a gcc2
9486    builtin and then its argument prototype would still apply.  */
9487 char $ac_func (void);
9488
9489 int
9490 main (void)
9491 {
9492
9493 /* The GNU C library defines stubs for functions which it implements
9494     to always fail with ENOSYS.  Some functions are actually named
9495     something starting with __ and the normal name is an alias.  */
9496 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9497 #error found stub for $ac_func
9498 #endif
9499
9500         return $ac_func ();
9501   ;
9502   return 0;
9503 }
9504 _ACEOF
9505 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9506 if { (eval echo "$as_me:9506: \"$ac_link\"") >&5
9507   (eval $ac_link) 2>&5
9508   ac_status=$?
9509   echo "$as_me:9509: \$? = $ac_status" >&5
9510   (exit "$ac_status"); } &&
9511          { ac_try='test -s "conftest$ac_exeext"'
9512   { (eval echo "$as_me:9512: \"$ac_try\"") >&5
9513   (eval $ac_try) 2>&5
9514   ac_status=$?
9515   echo "$as_me:9515: \$? = $ac_status" >&5
9516   (exit "$ac_status"); }; }; then
9517   eval "$as_ac_var=yes"
9518 else
9519   echo "$as_me: failed program was:" >&5
9520 cat "conftest.$ac_ext" >&5
9521 eval "$as_ac_var=no"
9522 fi
9523 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9524 fi
9525 echo "$as_me:9525: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9526 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9527 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9528   cat >>confdefs.h <<EOF
9529 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9530 EOF
9531
9532 fi
9533 done
9534
9535 if test "$cross_compiling" = yes ; then
9536
9537 for ac_func in \
9538                 link \
9539                 symlink
9540 do
9541 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9542 echo "$as_me:9542: checking for $ac_func" >&5
9543 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9544 if eval "test \"\${$as_ac_var+set}\" = set"; then
9545   echo $ECHO_N "(cached) $ECHO_C" >&6
9546 else
9547   cat >"conftest.$ac_ext" <<_ACEOF
9548 #line 9548 "configure"
9549 #include "confdefs.h"
9550 #define $ac_func autoconf_temporary
9551 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9552 #undef $ac_func
9553
9554 #ifdef __cplusplus
9555 extern "C"
9556 #endif
9557
9558 /* We use char because int might match the return type of a gcc2
9559    builtin and then its argument prototype would still apply.  */
9560 char $ac_func (void);
9561
9562 int
9563 main (void)
9564 {
9565
9566 /* The GNU C library defines stubs for functions which it implements
9567     to always fail with ENOSYS.  Some functions are actually named
9568     something starting with __ and the normal name is an alias.  */
9569 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9570 #error found stub for $ac_func
9571 #endif
9572
9573         return $ac_func ();
9574   ;
9575   return 0;
9576 }
9577 _ACEOF
9578 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9579 if { (eval echo "$as_me:9579: \"$ac_link\"") >&5
9580   (eval $ac_link) 2>&5
9581   ac_status=$?
9582   echo "$as_me:9582: \$? = $ac_status" >&5
9583   (exit "$ac_status"); } &&
9584          { ac_try='test -s "conftest$ac_exeext"'
9585   { (eval echo "$as_me:9585: \"$ac_try\"") >&5
9586   (eval $ac_try) 2>&5
9587   ac_status=$?
9588   echo "$as_me:9588: \$? = $ac_status" >&5
9589   (exit "$ac_status"); }; }; then
9590   eval "$as_ac_var=yes"
9591 else
9592   echo "$as_me: failed program was:" >&5
9593 cat "conftest.$ac_ext" >&5
9594 eval "$as_ac_var=no"
9595 fi
9596 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9597 fi
9598 echo "$as_me:9598: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9599 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9600 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9601   cat >>confdefs.h <<EOF
9602 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9603 EOF
9604
9605 fi
9606 done
9607
9608 else
9609         echo "$as_me:9609: checking if link/symlink functions work" >&5
9610 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9611 if test "${cf_cv_link_funcs+set}" = set; then
9612   echo $ECHO_N "(cached) $ECHO_C" >&6
9613 else
9614
9615                 cf_cv_link_funcs=
9616                 for cf_func in link symlink ; do
9617                         if test "$cross_compiling" = yes; then
9618
9619                         eval 'ac_cv_func_'$cf_func'=error'
9620 else
9621   cat >"conftest.$ac_ext" <<_ACEOF
9622 #line 9622 "configure"
9623 #include "confdefs.h"
9624
9625 #include <stdio.h>
9626 #include <sys/types.h>
9627 #include <sys/stat.h>
9628 #ifdef HAVE_UNISTD_H
9629 #include <unistd.h>
9630 #endif
9631 int main(void)
9632 {
9633         int fail = 0;
9634         char *src = "conftest.tmp";
9635         char *dst = "conftest.chk";
9636         struct stat src_sb, dst_sb;
9637         FILE *fp = fopen(src, "w");
9638         if (fp == 0) { fail = 3; } else {
9639                 fclose(fp); stat(src, &src_sb);
9640                 if ($cf_func(src, dst) < 0) {
9641                         fail = 1;
9642                 } else if (stat(dst, &dst_sb) < 0) {
9643                         fail = 2;
9644                 } else {
9645                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9646                         if (diff < 0) diff = -diff;
9647                         if (diff > 2) fail = 3;
9648                 }
9649         }
9650 #ifdef HAVE_UNLINK
9651         unlink(dst); unlink(src);
9652 #else
9653         remove(dst); remove(src);
9654 #endif
9655         ${cf_cv_main_return:-return} (fail);
9656 }
9657
9658 _ACEOF
9659 rm -f "conftest$ac_exeext"
9660 if { (eval echo "$as_me:9660: \"$ac_link\"") >&5
9661   (eval $ac_link) 2>&5
9662   ac_status=$?
9663   echo "$as_me:9663: \$? = $ac_status" >&5
9664   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9665   { (eval echo "$as_me:9665: \"$ac_try\"") >&5
9666   (eval $ac_try) 2>&5
9667   ac_status=$?
9668   echo "$as_me:9668: \$? = $ac_status" >&5
9669   (exit "$ac_status"); }; }; then
9670
9671                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9672                         eval 'ac_cv_func_'$cf_func'=yes'
9673 else
9674   echo "$as_me: program exited with status $ac_status" >&5
9675 echo "$as_me: failed program was:" >&5
9676 cat "conftest.$ac_ext" >&5
9677
9678                         eval 'ac_cv_func_'$cf_func'=no'
9679 fi
9680 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9681 fi
9682                 done
9683                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9684
9685 fi
9686 echo "$as_me:9686: result: $cf_cv_link_funcs" >&5
9687 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9688         test "$ac_cv_func_link"    = yes &&
9689 cat >>confdefs.h <<\EOF
9690 #define HAVE_LINK 1
9691 EOF
9692
9693         test "$ac_cv_func_symlink" = yes &&
9694 cat >>confdefs.h <<\EOF
9695 #define HAVE_SYMLINK 1
9696 EOF
9697
9698 fi
9699
9700 with_links=no
9701 with_symlinks=no
9702
9703 # soft links (symbolic links) are useful for some systems where hard links do
9704 # not work, or to make it simpler to copy terminfo trees around.
9705 if test "x$ac_cv_func_symlink" = xyes ; then
9706         echo "$as_me:9706: checking if tic should use symbolic links" >&5
9707 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9708
9709 # Check whether --enable-symlinks or --disable-symlinks was given.
9710 if test "${enable_symlinks+set}" = set; then
9711   enableval="$enable_symlinks"
9712   with_symlinks=$enableval
9713 else
9714   with_symlinks=no
9715 fi;
9716         echo "$as_me:9716: result: $with_symlinks" >&5
9717 echo "${ECHO_T}$with_symlinks" >&6
9718 fi
9719
9720 # If we have hard links and did not choose to use soft links instead, there is
9721 # no reason to make this choice optional - use the hard links.
9722 if test "$with_symlinks" = no ; then
9723         echo "$as_me:9723: checking if tic should use hard links" >&5
9724 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9725         if test "x$ac_cv_func_link" = xyes ; then
9726                 with_links=yes
9727         else
9728                 with_links=no
9729         fi
9730         echo "$as_me:9730: result: $with_links" >&5
9731 echo "${ECHO_T}$with_links" >&6
9732 fi
9733
9734 test "x$with_links" = xyes &&
9735 cat >>confdefs.h <<\EOF
9736 #define USE_LINKS 1
9737 EOF
9738
9739 test "x$with_symlinks" = xyes &&
9740 cat >>confdefs.h <<\EOF
9741 #define USE_SYMLINKS 1
9742 EOF
9743
9744 ###   use option --enable-broken-linker to force on use of broken-linker support
9745
9746 echo "$as_me:9746: checking if you want broken-linker support code" >&5
9747 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9748
9749 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9750 if test "${enable_broken_linker+set}" = set; then
9751   enableval="$enable_broken_linker"
9752   with_broken_linker=$enableval
9753 else
9754   with_broken_linker=no
9755 fi;
9756 echo "$as_me:9756: result: $with_broken_linker" >&5
9757 echo "${ECHO_T}$with_broken_linker" >&6
9758
9759 : "${BROKEN_LINKER:=0}"
9760 if test "x$with_broken_linker" = xyes ; then
9761
9762 cat >>confdefs.h <<\EOF
9763 #define BROKEN_LINKER 1
9764 EOF
9765
9766         BROKEN_LINKER=1
9767 fi
9768
9769 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9770 echo "$as_me:9770: checking if tputs should process BSD-style prefix padding" >&5
9771 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9772
9773 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9774 if test "${enable_bsdpad+set}" = set; then
9775   enableval="$enable_bsdpad"
9776   with_bsdpad=$enableval
9777 else
9778   with_bsdpad=no
9779 fi;
9780 echo "$as_me:9780: result: $with_bsdpad" >&5
9781 echo "${ECHO_T}$with_bsdpad" >&6
9782 test "x$with_bsdpad" = xyes &&
9783 cat >>confdefs.h <<\EOF
9784 #define BSD_TPUTS 1
9785 EOF
9786
9787 ###   use option --enable-widec to turn on use of wide-character support
9788 NCURSES_CH_T=chtype
9789 NCURSES_LIBUTF8=0
9790
9791 NEED_WCHAR_H=0
9792 NCURSES_MBSTATE_T=0
9793 NCURSES_WCHAR_T=0
9794 NCURSES_WINT_T=0
9795
9796 # Check to define _XOPEN_SOURCE "automatically"
9797 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9798
9799 echo "$as_me:9799: checking if the POSIX test-macros are already defined" >&5
9800 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9801 if test "${cf_cv_posix_visible+set}" = set; then
9802   echo $ECHO_N "(cached) $ECHO_C" >&6
9803 else
9804
9805 cat >"conftest.$ac_ext" <<_ACEOF
9806 #line 9806 "configure"
9807 #include "confdefs.h"
9808 #include <stdio.h>
9809 int
9810 main (void)
9811 {
9812
9813 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9814         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9815         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9816         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9817 #error conflicting symbols found
9818 #endif
9819
9820   ;
9821   return 0;
9822 }
9823 _ACEOF
9824 rm -f "conftest.$ac_objext"
9825 if { (eval echo "$as_me:9825: \"$ac_compile\"") >&5
9826   (eval $ac_compile) 2>&5
9827   ac_status=$?
9828   echo "$as_me:9828: \$? = $ac_status" >&5
9829   (exit "$ac_status"); } &&
9830          { ac_try='test -s "conftest.$ac_objext"'
9831   { (eval echo "$as_me:9831: \"$ac_try\"") >&5
9832   (eval $ac_try) 2>&5
9833   ac_status=$?
9834   echo "$as_me:9834: \$? = $ac_status" >&5
9835   (exit "$ac_status"); }; }; then
9836   cf_cv_posix_visible=no
9837 else
9838   echo "$as_me: failed program was:" >&5
9839 cat "conftest.$ac_ext" >&5
9840 cf_cv_posix_visible=yes
9841 fi
9842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9843
9844 fi
9845 echo "$as_me:9845: result: $cf_cv_posix_visible" >&5
9846 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9847
9848 if test "$cf_cv_posix_visible" = no; then
9849
9850 cf_XOPEN_SOURCE=600
9851 cf_POSIX_C_SOURCE=199506L
9852 cf_xopen_source=
9853
9854 case "$host_os" in
9855 (aix[4-7]*)
9856         cf_xopen_source="-D_ALL_SOURCE"
9857         ;;
9858 (msys)
9859         cf_XOPEN_SOURCE=600
9860         ;;
9861 (darwin[0-8].*)
9862         cf_xopen_source="-D_APPLE_C_SOURCE"
9863         ;;
9864 (darwin*)
9865         cf_xopen_source="-D_DARWIN_C_SOURCE"
9866         cf_XOPEN_SOURCE=
9867         ;;
9868 (freebsd*|dragonfly*|midnightbsd*)
9869         # 5.x headers associate
9870         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9871         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9872         cf_POSIX_C_SOURCE=200112L
9873         cf_XOPEN_SOURCE=600
9874         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9875         ;;
9876 (hpux11*)
9877         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9878         ;;
9879 (hpux*)
9880         cf_xopen_source="-D_HPUX_SOURCE"
9881         ;;
9882 (irix[56].*)
9883         cf_xopen_source="-D_SGI_SOURCE"
9884         cf_XOPEN_SOURCE=
9885         ;;
9886 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9887
9888 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9889
9890 echo "$as_me:9890: checking if this is the GNU C library" >&5
9891 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9892 if test "${cf_cv_gnu_library+set}" = set; then
9893   echo $ECHO_N "(cached) $ECHO_C" >&6
9894 else
9895
9896 cat >"conftest.$ac_ext" <<_ACEOF
9897 #line 9897 "configure"
9898 #include "confdefs.h"
9899 #include <sys/types.h>
9900 int
9901 main (void)
9902 {
9903
9904         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9905                 return 0;
9906         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9907                 return 0;
9908         #else
9909         #       error not GNU C library
9910         #endif
9911   ;
9912   return 0;
9913 }
9914 _ACEOF
9915 rm -f "conftest.$ac_objext"
9916 if { (eval echo "$as_me:9916: \"$ac_compile\"") >&5
9917   (eval $ac_compile) 2>&5
9918   ac_status=$?
9919   echo "$as_me:9919: \$? = $ac_status" >&5
9920   (exit "$ac_status"); } &&
9921          { ac_try='test -s "conftest.$ac_objext"'
9922   { (eval echo "$as_me:9922: \"$ac_try\"") >&5
9923   (eval $ac_try) 2>&5
9924   ac_status=$?
9925   echo "$as_me:9925: \$? = $ac_status" >&5
9926   (exit "$ac_status"); }; }; then
9927   cf_cv_gnu_library=yes
9928 else
9929   echo "$as_me: failed program was:" >&5
9930 cat "conftest.$ac_ext" >&5
9931 cf_cv_gnu_library=no
9932 fi
9933 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9934
9935 fi
9936 echo "$as_me:9936: result: $cf_cv_gnu_library" >&5
9937 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9938
9939 if test x$cf_cv_gnu_library = xyes; then
9940
9941         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9942         # was changed to help a little.  newlib incorporated the change about 4
9943         # years later.
9944         echo "$as_me:9944: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9945 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9946 if test "${cf_cv_gnu_library_219+set}" = set; then
9947   echo $ECHO_N "(cached) $ECHO_C" >&6
9948 else
9949
9950                 cf_save="$CPPFLAGS"
9951
9952         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9953         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9954
9955                 cat >"conftest.$ac_ext" <<_ACEOF
9956 #line 9956 "configure"
9957 #include "confdefs.h"
9958 #include <sys/types.h>
9959 int
9960 main (void)
9961 {
9962
9963                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9964                                 return 0;
9965                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9966                                 return 0;
9967                         #else
9968                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9969                         #endif
9970   ;
9971   return 0;
9972 }
9973 _ACEOF
9974 rm -f "conftest.$ac_objext"
9975 if { (eval echo "$as_me:9975: \"$ac_compile\"") >&5
9976   (eval $ac_compile) 2>&5
9977   ac_status=$?
9978   echo "$as_me:9978: \$? = $ac_status" >&5
9979   (exit "$ac_status"); } &&
9980          { ac_try='test -s "conftest.$ac_objext"'
9981   { (eval echo "$as_me:9981: \"$ac_try\"") >&5
9982   (eval $ac_try) 2>&5
9983   ac_status=$?
9984   echo "$as_me:9984: \$? = $ac_status" >&5
9985   (exit "$ac_status"); }; }; then
9986   cf_cv_gnu_library_219=yes
9987 else
9988   echo "$as_me: failed program was:" >&5
9989 cat "conftest.$ac_ext" >&5
9990 cf_cv_gnu_library_219=no
9991 fi
9992 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9993                 CPPFLAGS="$cf_save"
9994
9995 fi
9996 echo "$as_me:9996: result: $cf_cv_gnu_library_219" >&5
9997 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9998
9999         if test "x$cf_cv_gnu_library_219" = xyes; then
10000                 cf_save="$CPPFLAGS"
10001                 echo "$as_me:10001: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10002 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10003 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10004   echo $ECHO_N "(cached) $ECHO_C" >&6
10005 else
10006
10007 cf_fix_cppflags=no
10008 cf_new_cflags=
10009 cf_new_cppflags=
10010 cf_new_extra_cppflags=
10011
10012 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10013 do
10014 case "$cf_fix_cppflags" in
10015 (no)
10016         case "$cf_add_cflags" in
10017         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10018                 case "$cf_add_cflags" in
10019                 (-D*)
10020                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10021
10022                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10023                                 && test -z "${cf_tst_cflags}" \
10024                                 && cf_fix_cppflags=yes
10025
10026                         if test "$cf_fix_cppflags" = yes ; then
10027
10028         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10029         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10030
10031                                 continue
10032                         elif test "${cf_tst_cflags}" = "\"'" ; 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                         fi
10039                         ;;
10040                 esac
10041                 case "$CPPFLAGS" in
10042                 (*$cf_add_cflags)
10043                         ;;
10044                 (*)
10045                         case "$cf_add_cflags" in
10046                         (-D*)
10047                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10048
10049 CPPFLAGS=`echo "$CPPFLAGS" | \
10050         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10051                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10052
10053                                 ;;
10054                         esac
10055
10056         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10057         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10058
10059                         ;;
10060                 esac
10061                 ;;
10062         (*)
10063
10064         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10065         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10066
10067                 ;;
10068         esac
10069         ;;
10070 (yes)
10071
10072         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10073         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10074
10075         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10076
10077         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10078                 && test -z "${cf_tst_cflags}" \
10079                 && cf_fix_cppflags=no
10080         ;;
10081 esac
10082 done
10083
10084 if test -n "$cf_new_cflags" ; then
10085
10086         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10087         CFLAGS="${CFLAGS}$cf_new_cflags"
10088
10089 fi
10090
10091 if test -n "$cf_new_cppflags" ; then
10092
10093         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10094         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10095
10096 fi
10097
10098 if test -n "$cf_new_extra_cppflags" ; then
10099
10100         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10101         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10102
10103 fi
10104
10105                         cat >"conftest.$ac_ext" <<_ACEOF
10106 #line 10106 "configure"
10107 #include "confdefs.h"
10108
10109                                 #include <limits.h>
10110                                 #include <sys/types.h>
10111
10112 int
10113 main (void)
10114 {
10115
10116                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10117                                         return 0;
10118                                 #else
10119                                 #       error GNU C library is too old
10120                                 #endif
10121   ;
10122   return 0;
10123 }
10124 _ACEOF
10125 rm -f "conftest.$ac_objext"
10126 if { (eval echo "$as_me:10126: \"$ac_compile\"") >&5
10127   (eval $ac_compile) 2>&5
10128   ac_status=$?
10129   echo "$as_me:10129: \$? = $ac_status" >&5
10130   (exit "$ac_status"); } &&
10131          { ac_try='test -s "conftest.$ac_objext"'
10132   { (eval echo "$as_me:10132: \"$ac_try\"") >&5
10133   (eval $ac_try) 2>&5
10134   ac_status=$?
10135   echo "$as_me:10135: \$? = $ac_status" >&5
10136   (exit "$ac_status"); }; }; then
10137   cf_cv_gnu_dftsrc_219=yes
10138 else
10139   echo "$as_me: failed program was:" >&5
10140 cat "conftest.$ac_ext" >&5
10141 cf_cv_gnu_dftsrc_219=no
10142 fi
10143 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10144
10145 fi
10146 echo "$as_me:10146: result: $cf_cv_gnu_dftsrc_219" >&5
10147 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10148                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10149         else
10150                 cf_cv_gnu_dftsrc_219=maybe
10151         fi
10152
10153         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10154
10155                 echo "$as_me:10155: checking if we must define _GNU_SOURCE" >&5
10156 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10157 if test "${cf_cv_gnu_source+set}" = set; then
10158   echo $ECHO_N "(cached) $ECHO_C" >&6
10159 else
10160
10161                 cat >"conftest.$ac_ext" <<_ACEOF
10162 #line 10162 "configure"
10163 #include "confdefs.h"
10164 #include <sys/types.h>
10165 int
10166 main (void)
10167 {
10168
10169                         #ifndef _XOPEN_SOURCE
10170                         #error  expected _XOPEN_SOURCE to be defined
10171                         #endif
10172   ;
10173   return 0;
10174 }
10175 _ACEOF
10176 rm -f "conftest.$ac_objext"
10177 if { (eval echo "$as_me:10177: \"$ac_compile\"") >&5
10178   (eval $ac_compile) 2>&5
10179   ac_status=$?
10180   echo "$as_me:10180: \$? = $ac_status" >&5
10181   (exit "$ac_status"); } &&
10182          { ac_try='test -s "conftest.$ac_objext"'
10183   { (eval echo "$as_me:10183: \"$ac_try\"") >&5
10184   (eval $ac_try) 2>&5
10185   ac_status=$?
10186   echo "$as_me:10186: \$? = $ac_status" >&5
10187   (exit "$ac_status"); }; }; then
10188   cf_cv_gnu_source=no
10189 else
10190   echo "$as_me: failed program was:" >&5
10191 cat "conftest.$ac_ext" >&5
10192 cf_save="$CPPFLAGS"
10193
10194 cf_fix_cppflags=no
10195 cf_new_cflags=
10196 cf_new_cppflags=
10197 cf_new_extra_cppflags=
10198
10199 for cf_add_cflags in -D_GNU_SOURCE
10200 do
10201 case "$cf_fix_cppflags" in
10202 (no)
10203         case "$cf_add_cflags" in
10204         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10205                 case "$cf_add_cflags" in
10206                 (-D*)
10207                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10208
10209                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10210                                 && test -z "${cf_tst_cflags}" \
10211                                 && cf_fix_cppflags=yes
10212
10213                         if test "$cf_fix_cppflags" = yes ; then
10214
10215         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10216         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10217
10218                                 continue
10219                         elif test "${cf_tst_cflags}" = "\"'" ; then
10220
10221         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10222         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10223
10224                                 continue
10225                         fi
10226                         ;;
10227                 esac
10228                 case "$CPPFLAGS" in
10229                 (*$cf_add_cflags)
10230                         ;;
10231                 (*)
10232                         case "$cf_add_cflags" in
10233                         (-D*)
10234                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10235
10236 CPPFLAGS=`echo "$CPPFLAGS" | \
10237         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10238                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10239
10240                                 ;;
10241                         esac
10242
10243         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10244         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10245
10246                         ;;
10247                 esac
10248                 ;;
10249         (*)
10250
10251         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10252         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10253
10254                 ;;
10255         esac
10256         ;;
10257 (yes)
10258
10259         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10260         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10261
10262         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10263
10264         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10265                 && test -z "${cf_tst_cflags}" \
10266                 && cf_fix_cppflags=no
10267         ;;
10268 esac
10269 done
10270
10271 if test -n "$cf_new_cflags" ; then
10272
10273         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10274         CFLAGS="${CFLAGS}$cf_new_cflags"
10275
10276 fi
10277
10278 if test -n "$cf_new_cppflags" ; then
10279
10280         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10281         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10282
10283 fi
10284
10285 if test -n "$cf_new_extra_cppflags" ; then
10286
10287         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10288         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10289
10290 fi
10291
10292                          cat >"conftest.$ac_ext" <<_ACEOF
10293 #line 10293 "configure"
10294 #include "confdefs.h"
10295 #include <sys/types.h>
10296 int
10297 main (void)
10298 {
10299
10300                                 #ifdef _XOPEN_SOURCE
10301                                 #error  expected _XOPEN_SOURCE to be undefined
10302                                 #endif
10303   ;
10304   return 0;
10305 }
10306 _ACEOF
10307 rm -f "conftest.$ac_objext"
10308 if { (eval echo "$as_me:10308: \"$ac_compile\"") >&5
10309   (eval $ac_compile) 2>&5
10310   ac_status=$?
10311   echo "$as_me:10311: \$? = $ac_status" >&5
10312   (exit "$ac_status"); } &&
10313          { ac_try='test -s "conftest.$ac_objext"'
10314   { (eval echo "$as_me:10314: \"$ac_try\"") >&5
10315   (eval $ac_try) 2>&5
10316   ac_status=$?
10317   echo "$as_me:10317: \$? = $ac_status" >&5
10318   (exit "$ac_status"); }; }; then
10319   cf_cv_gnu_source=no
10320 else
10321   echo "$as_me: failed program was:" >&5
10322 cat "conftest.$ac_ext" >&5
10323 cf_cv_gnu_source=yes
10324 fi
10325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10326                         CPPFLAGS="$cf_save"
10327
10328 fi
10329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10330
10331 fi
10332 echo "$as_me:10332: result: $cf_cv_gnu_source" >&5
10333 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10334
10335                 if test "$cf_cv_gnu_source" = yes
10336                 then
10337                 echo "$as_me:10337: checking if we should also define _DEFAULT_SOURCE" >&5
10338 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10339 if test "${cf_cv_default_source+set}" = set; then
10340   echo $ECHO_N "(cached) $ECHO_C" >&6
10341 else
10342
10343         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10344         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10345
10346                         cat >"conftest.$ac_ext" <<_ACEOF
10347 #line 10347 "configure"
10348 #include "confdefs.h"
10349 #include <sys/types.h>
10350 int
10351 main (void)
10352 {
10353
10354                                 #ifdef _DEFAULT_SOURCE
10355                                 #error  expected _DEFAULT_SOURCE to be undefined
10356                                 #endif
10357   ;
10358   return 0;
10359 }
10360 _ACEOF
10361 rm -f "conftest.$ac_objext"
10362 if { (eval echo "$as_me:10362: \"$ac_compile\"") >&5
10363   (eval $ac_compile) 2>&5
10364   ac_status=$?
10365   echo "$as_me:10365: \$? = $ac_status" >&5
10366   (exit "$ac_status"); } &&
10367          { ac_try='test -s "conftest.$ac_objext"'
10368   { (eval echo "$as_me:10368: \"$ac_try\"") >&5
10369   (eval $ac_try) 2>&5
10370   ac_status=$?
10371   echo "$as_me:10371: \$? = $ac_status" >&5
10372   (exit "$ac_status"); }; }; then
10373   cf_cv_default_source=no
10374 else
10375   echo "$as_me: failed program was:" >&5
10376 cat "conftest.$ac_ext" >&5
10377 cf_cv_default_source=yes
10378 fi
10379 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10380
10381 fi
10382 echo "$as_me:10382: result: $cf_cv_default_source" >&5
10383 echo "${ECHO_T}$cf_cv_default_source" >&6
10384                         if test "$cf_cv_default_source" = yes
10385                         then
10386
10387         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10388         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10389
10390                         fi
10391                 fi
10392         fi
10393
10394 fi
10395
10396         ;;
10397 (minix*)
10398         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10399         ;;
10400 (mirbsd*)
10401         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10402         cf_XOPEN_SOURCE=
10403
10404 if test "$cf_cv_posix_visible" = no; then
10405
10406 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10407
10408 cf_save_CFLAGS="$CFLAGS"
10409 cf_save_CPPFLAGS="$CPPFLAGS"
10410
10411 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10412         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10413                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10414
10415 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10416         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10417                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10418
10419 echo "$as_me:10419: checking if we should define _POSIX_C_SOURCE" >&5
10420 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10421 if test "${cf_cv_posix_c_source+set}" = set; then
10422   echo $ECHO_N "(cached) $ECHO_C" >&6
10423 else
10424
10425 echo "${as_me:-configure}:10425: testing if the symbol is already defined go no further ..." 1>&5
10426
10427         cat >"conftest.$ac_ext" <<_ACEOF
10428 #line 10428 "configure"
10429 #include "confdefs.h"
10430 #include <sys/types.h>
10431 int
10432 main (void)
10433 {
10434
10435 #ifndef _POSIX_C_SOURCE
10436 make an error
10437 #endif
10438   ;
10439   return 0;
10440 }
10441 _ACEOF
10442 rm -f "conftest.$ac_objext"
10443 if { (eval echo "$as_me:10443: \"$ac_compile\"") >&5
10444   (eval $ac_compile) 2>&5
10445   ac_status=$?
10446   echo "$as_me:10446: \$? = $ac_status" >&5
10447   (exit "$ac_status"); } &&
10448          { ac_try='test -s "conftest.$ac_objext"'
10449   { (eval echo "$as_me:10449: \"$ac_try\"") >&5
10450   (eval $ac_try) 2>&5
10451   ac_status=$?
10452   echo "$as_me:10452: \$? = $ac_status" >&5
10453   (exit "$ac_status"); }; }; then
10454   cf_cv_posix_c_source=no
10455 else
10456   echo "$as_me: failed program was:" >&5
10457 cat "conftest.$ac_ext" >&5
10458 cf_want_posix_source=no
10459          case .$cf_POSIX_C_SOURCE in
10460          (.[12]??*)
10461                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10462                 ;;
10463          (.2)
10464                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10465                 cf_want_posix_source=yes
10466                 ;;
10467          (.*)
10468                 cf_want_posix_source=yes
10469                 ;;
10470          esac
10471          if test "$cf_want_posix_source" = yes ; then
10472                 cat >"conftest.$ac_ext" <<_ACEOF
10473 #line 10473 "configure"
10474 #include "confdefs.h"
10475 #include <sys/types.h>
10476 int
10477 main (void)
10478 {
10479
10480 #ifdef _POSIX_SOURCE
10481 make an error
10482 #endif
10483   ;
10484   return 0;
10485 }
10486 _ACEOF
10487 rm -f "conftest.$ac_objext"
10488 if { (eval echo "$as_me:10488: \"$ac_compile\"") >&5
10489   (eval $ac_compile) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit "$ac_status"); } &&
10493          { ac_try='test -s "conftest.$ac_objext"'
10494   { (eval echo "$as_me:10494: \"$ac_try\"") >&5
10495   (eval $ac_try) 2>&5
10496   ac_status=$?
10497   echo "$as_me:10497: \$? = $ac_status" >&5
10498   (exit "$ac_status"); }; }; then
10499   :
10500 else
10501   echo "$as_me: failed program was:" >&5
10502 cat "conftest.$ac_ext" >&5
10503 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10504 fi
10505 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10506          fi
10507
10508 echo "${as_me:-configure}:10508: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10509
10510          CFLAGS="$cf_trim_CFLAGS"
10511          CPPFLAGS="$cf_trim_CPPFLAGS"
10512
10513         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10514         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10515
10516 echo "${as_me:-configure}:10516: testing if the second compile does not leave our definition intact error ..." 1>&5
10517
10518          cat >"conftest.$ac_ext" <<_ACEOF
10519 #line 10519 "configure"
10520 #include "confdefs.h"
10521 #include <sys/types.h>
10522 int
10523 main (void)
10524 {
10525
10526 #ifndef _POSIX_C_SOURCE
10527 make an error
10528 #endif
10529   ;
10530   return 0;
10531 }
10532 _ACEOF
10533 rm -f "conftest.$ac_objext"
10534 if { (eval echo "$as_me:10534: \"$ac_compile\"") >&5
10535   (eval $ac_compile) 2>&5
10536   ac_status=$?
10537   echo "$as_me:10537: \$? = $ac_status" >&5
10538   (exit "$ac_status"); } &&
10539          { ac_try='test -s "conftest.$ac_objext"'
10540   { (eval echo "$as_me:10540: \"$ac_try\"") >&5
10541   (eval $ac_try) 2>&5
10542   ac_status=$?
10543   echo "$as_me:10543: \$? = $ac_status" >&5
10544   (exit "$ac_status"); }; }; then
10545   :
10546 else
10547   echo "$as_me: failed program was:" >&5
10548 cat "conftest.$ac_ext" >&5
10549 cf_cv_posix_c_source=no
10550 fi
10551 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10552          CFLAGS="$cf_save_CFLAGS"
10553          CPPFLAGS="$cf_save_CPPFLAGS"
10554
10555 fi
10556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10557
10558 fi
10559 echo "$as_me:10559: result: $cf_cv_posix_c_source" >&5
10560 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10561
10562 if test "$cf_cv_posix_c_source" != no ; then
10563         CFLAGS="$cf_trim_CFLAGS"
10564         CPPFLAGS="$cf_trim_CPPFLAGS"
10565
10566 cf_fix_cppflags=no
10567 cf_new_cflags=
10568 cf_new_cppflags=
10569 cf_new_extra_cppflags=
10570
10571 for cf_add_cflags in $cf_cv_posix_c_source
10572 do
10573 case "$cf_fix_cppflags" in
10574 (no)
10575         case "$cf_add_cflags" in
10576         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10577                 case "$cf_add_cflags" in
10578                 (-D*)
10579                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10580
10581                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10582                                 && test -z "${cf_tst_cflags}" \
10583                                 && cf_fix_cppflags=yes
10584
10585                         if test "$cf_fix_cppflags" = yes ; then
10586
10587         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10588         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10589
10590                                 continue
10591                         elif test "${cf_tst_cflags}" = "\"'" ; then
10592
10593         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10594         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10595
10596                                 continue
10597                         fi
10598                         ;;
10599                 esac
10600                 case "$CPPFLAGS" in
10601                 (*$cf_add_cflags)
10602                         ;;
10603                 (*)
10604                         case "$cf_add_cflags" in
10605                         (-D*)
10606                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10607
10608 CPPFLAGS=`echo "$CPPFLAGS" | \
10609         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10610                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10611
10612                                 ;;
10613                         esac
10614
10615         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10616         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10617
10618                         ;;
10619                 esac
10620                 ;;
10621         (*)
10622
10623         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10624         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10625
10626                 ;;
10627         esac
10628         ;;
10629 (yes)
10630
10631         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10632         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10633
10634         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10635
10636         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10637                 && test -z "${cf_tst_cflags}" \
10638                 && cf_fix_cppflags=no
10639         ;;
10640 esac
10641 done
10642
10643 if test -n "$cf_new_cflags" ; then
10644
10645         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10646         CFLAGS="${CFLAGS}$cf_new_cflags"
10647
10648 fi
10649
10650 if test -n "$cf_new_cppflags" ; then
10651
10652         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10653         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10654
10655 fi
10656
10657 if test -n "$cf_new_extra_cppflags" ; then
10658
10659         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10660         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10661
10662 fi
10663
10664 fi
10665
10666 fi # cf_cv_posix_visible
10667
10668         ;;
10669 (netbsd*)
10670         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10671         ;;
10672 (openbsd[6-9]*)
10673         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10674         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10675         # Abusing the conformance level is a workaround.
10676         { echo "$as_me:10676: WARNING: this system does not provide usable locale support" >&5
10677 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10678         cf_xopen_source="-D_BSD_SOURCE"
10679         cf_XOPEN_SOURCE=700
10680         ;;
10681 (openbsd[4-5]*)
10682         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10683         cf_xopen_source="-D_BSD_SOURCE"
10684         cf_XOPEN_SOURCE=600
10685         ;;
10686 (openbsd*)
10687         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10688         ;;
10689 (osf[45]*)
10690         cf_xopen_source="-D_OSF_SOURCE"
10691         ;;
10692 (nto-qnx*)
10693         cf_xopen_source="-D_QNX_SOURCE"
10694         ;;
10695 (sco*)
10696         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10697         ;;
10698 (solaris2.*)
10699         cf_xopen_source="-D__EXTENSIONS__"
10700         cf_cv_xopen_source=broken
10701         ;;
10702 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10703         cf_XOPEN_SOURCE=
10704         cf_POSIX_C_SOURCE=
10705         ;;
10706 (*)
10707
10708 echo "$as_me:10708: checking if we should define _XOPEN_SOURCE" >&5
10709 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10710 if test "${cf_cv_xopen_source+set}" = set; then
10711   echo $ECHO_N "(cached) $ECHO_C" >&6
10712 else
10713
10714         cat >"conftest.$ac_ext" <<_ACEOF
10715 #line 10715 "configure"
10716 #include "confdefs.h"
10717
10718 #include <stdlib.h>
10719 #include <string.h>
10720 #include <sys/types.h>
10721
10722 int
10723 main (void)
10724 {
10725
10726 #ifndef _XOPEN_SOURCE
10727 make an error
10728 #endif
10729   ;
10730   return 0;
10731 }
10732 _ACEOF
10733 rm -f "conftest.$ac_objext"
10734 if { (eval echo "$as_me:10734: \"$ac_compile\"") >&5
10735   (eval $ac_compile) 2>&5
10736   ac_status=$?
10737   echo "$as_me:10737: \$? = $ac_status" >&5
10738   (exit "$ac_status"); } &&
10739          { ac_try='test -s "conftest.$ac_objext"'
10740   { (eval echo "$as_me:10740: \"$ac_try\"") >&5
10741   (eval $ac_try) 2>&5
10742   ac_status=$?
10743   echo "$as_me:10743: \$? = $ac_status" >&5
10744   (exit "$ac_status"); }; }; then
10745   cf_cv_xopen_source=no
10746 else
10747   echo "$as_me: failed program was:" >&5
10748 cat "conftest.$ac_ext" >&5
10749 cf_save="$CPPFLAGS"
10750
10751         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10752         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10753
10754          cat >"conftest.$ac_ext" <<_ACEOF
10755 #line 10755 "configure"
10756 #include "confdefs.h"
10757
10758 #include <stdlib.h>
10759 #include <string.h>
10760 #include <sys/types.h>
10761
10762 int
10763 main (void)
10764 {
10765
10766 #ifdef _XOPEN_SOURCE
10767 make an error
10768 #endif
10769   ;
10770   return 0;
10771 }
10772 _ACEOF
10773 rm -f "conftest.$ac_objext"
10774 if { (eval echo "$as_me:10774: \"$ac_compile\"") >&5
10775   (eval $ac_compile) 2>&5
10776   ac_status=$?
10777   echo "$as_me:10777: \$? = $ac_status" >&5
10778   (exit "$ac_status"); } &&
10779          { ac_try='test -s "conftest.$ac_objext"'
10780   { (eval echo "$as_me:10780: \"$ac_try\"") >&5
10781   (eval $ac_try) 2>&5
10782   ac_status=$?
10783   echo "$as_me:10783: \$? = $ac_status" >&5
10784   (exit "$ac_status"); }; }; then
10785   cf_cv_xopen_source=no
10786 else
10787   echo "$as_me: failed program was:" >&5
10788 cat "conftest.$ac_ext" >&5
10789 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10790 fi
10791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10792         CPPFLAGS="$cf_save"
10793
10794 fi
10795 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10796
10797 fi
10798 echo "$as_me:10798: result: $cf_cv_xopen_source" >&5
10799 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10800
10801 if test "$cf_cv_xopen_source" != no ; then
10802
10803 CFLAGS=`echo "$CFLAGS" | \
10804         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10805                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10806
10807 CPPFLAGS=`echo "$CPPFLAGS" | \
10808         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10809                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10810
10811         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10812
10813 for cf_add_cflags in $cf_temp_xopen_source
10814 do
10815         case "x$cf_add_cflags" in
10816         (x-[DU]*)
10817
10818 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10819 while true
10820 do
10821         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10822         test "$CFLAGS" != "$cf_old_cflag" || break
10823
10824         CFLAGS="$cf_old_cflag"
10825 done
10826
10827 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10828 while true
10829 do
10830         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10831         test "$CPPFLAGS" != "$cf_old_cflag" || break
10832
10833         CPPFLAGS="$cf_old_cflag"
10834 done
10835
10836                 ;;
10837         esac
10838
10839 cf_fix_cppflags=no
10840 cf_new_cflags=
10841 cf_new_cppflags=
10842 cf_new_extra_cppflags=
10843
10844 for cf_add_cflags in $cf_add_cflags
10845 do
10846 case "$cf_fix_cppflags" in
10847 (no)
10848         case "$cf_add_cflags" in
10849         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10850                 case "$cf_add_cflags" in
10851                 (-D*)
10852                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10853
10854                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10855                                 && test -z "${cf_tst_cflags}" \
10856                                 && cf_fix_cppflags=yes
10857
10858                         if test "$cf_fix_cppflags" = yes ; then
10859
10860         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10861         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10862
10863                                 continue
10864                         elif test "${cf_tst_cflags}" = "\"'" ; then
10865
10866         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10867         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10868
10869                                 continue
10870                         fi
10871                         ;;
10872                 esac
10873                 case "$CPPFLAGS" in
10874                 (*$cf_add_cflags)
10875                         ;;
10876                 (*)
10877                         case "$cf_add_cflags" in
10878                         (-D*)
10879                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10880
10881 CPPFLAGS=`echo "$CPPFLAGS" | \
10882         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10883                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10884
10885                                 ;;
10886                         esac
10887
10888         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10889         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10890
10891                         ;;
10892                 esac
10893                 ;;
10894         (*)
10895
10896         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10897         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10898
10899                 ;;
10900         esac
10901         ;;
10902 (yes)
10903
10904         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10905         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10906
10907         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10908
10909         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10910                 && test -z "${cf_tst_cflags}" \
10911                 && cf_fix_cppflags=no
10912         ;;
10913 esac
10914 done
10915
10916 if test -n "$cf_new_cflags" ; then
10917
10918         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10919         CFLAGS="${CFLAGS}$cf_new_cflags"
10920
10921 fi
10922
10923 if test -n "$cf_new_cppflags" ; then
10924
10925         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10926         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10927
10928 fi
10929
10930 if test -n "$cf_new_extra_cppflags" ; then
10931
10932         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10933         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10934
10935 fi
10936
10937 done
10938
10939 fi
10940
10941 if test "$cf_cv_posix_visible" = no; then
10942
10943 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10944
10945 cf_save_CFLAGS="$CFLAGS"
10946 cf_save_CPPFLAGS="$CPPFLAGS"
10947
10948 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10949         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10950                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10951
10952 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10953         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10954                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10955
10956 echo "$as_me:10956: checking if we should define _POSIX_C_SOURCE" >&5
10957 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10958 if test "${cf_cv_posix_c_source+set}" = set; then
10959   echo $ECHO_N "(cached) $ECHO_C" >&6
10960 else
10961
10962 echo "${as_me:-configure}:10962: testing if the symbol is already defined go no further ..." 1>&5
10963
10964         cat >"conftest.$ac_ext" <<_ACEOF
10965 #line 10965 "configure"
10966 #include "confdefs.h"
10967 #include <sys/types.h>
10968 int
10969 main (void)
10970 {
10971
10972 #ifndef _POSIX_C_SOURCE
10973 make an error
10974 #endif
10975   ;
10976   return 0;
10977 }
10978 _ACEOF
10979 rm -f "conftest.$ac_objext"
10980 if { (eval echo "$as_me:10980: \"$ac_compile\"") >&5
10981   (eval $ac_compile) 2>&5
10982   ac_status=$?
10983   echo "$as_me:10983: \$? = $ac_status" >&5
10984   (exit "$ac_status"); } &&
10985          { ac_try='test -s "conftest.$ac_objext"'
10986   { (eval echo "$as_me:10986: \"$ac_try\"") >&5
10987   (eval $ac_try) 2>&5
10988   ac_status=$?
10989   echo "$as_me:10989: \$? = $ac_status" >&5
10990   (exit "$ac_status"); }; }; then
10991   cf_cv_posix_c_source=no
10992 else
10993   echo "$as_me: failed program was:" >&5
10994 cat "conftest.$ac_ext" >&5
10995 cf_want_posix_source=no
10996          case .$cf_POSIX_C_SOURCE in
10997          (.[12]??*)
10998                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10999                 ;;
11000          (.2)
11001                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11002                 cf_want_posix_source=yes
11003                 ;;
11004          (.*)
11005                 cf_want_posix_source=yes
11006                 ;;
11007          esac
11008          if test "$cf_want_posix_source" = yes ; then
11009                 cat >"conftest.$ac_ext" <<_ACEOF
11010 #line 11010 "configure"
11011 #include "confdefs.h"
11012 #include <sys/types.h>
11013 int
11014 main (void)
11015 {
11016
11017 #ifdef _POSIX_SOURCE
11018 make an error
11019 #endif
11020   ;
11021   return 0;
11022 }
11023 _ACEOF
11024 rm -f "conftest.$ac_objext"
11025 if { (eval echo "$as_me:11025: \"$ac_compile\"") >&5
11026   (eval $ac_compile) 2>&5
11027   ac_status=$?
11028   echo "$as_me:11028: \$? = $ac_status" >&5
11029   (exit "$ac_status"); } &&
11030          { ac_try='test -s "conftest.$ac_objext"'
11031   { (eval echo "$as_me:11031: \"$ac_try\"") >&5
11032   (eval $ac_try) 2>&5
11033   ac_status=$?
11034   echo "$as_me:11034: \$? = $ac_status" >&5
11035   (exit "$ac_status"); }; }; then
11036   :
11037 else
11038   echo "$as_me: failed program was:" >&5
11039 cat "conftest.$ac_ext" >&5
11040 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11041 fi
11042 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11043          fi
11044
11045 echo "${as_me:-configure}:11045: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11046
11047          CFLAGS="$cf_trim_CFLAGS"
11048          CPPFLAGS="$cf_trim_CPPFLAGS"
11049
11050         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11051         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11052
11053 echo "${as_me:-configure}:11053: testing if the second compile does not leave our definition intact error ..." 1>&5
11054
11055          cat >"conftest.$ac_ext" <<_ACEOF
11056 #line 11056 "configure"
11057 #include "confdefs.h"
11058 #include <sys/types.h>
11059 int
11060 main (void)
11061 {
11062
11063 #ifndef _POSIX_C_SOURCE
11064 make an error
11065 #endif
11066   ;
11067   return 0;
11068 }
11069 _ACEOF
11070 rm -f "conftest.$ac_objext"
11071 if { (eval echo "$as_me:11071: \"$ac_compile\"") >&5
11072   (eval $ac_compile) 2>&5
11073   ac_status=$?
11074   echo "$as_me:11074: \$? = $ac_status" >&5
11075   (exit "$ac_status"); } &&
11076          { ac_try='test -s "conftest.$ac_objext"'
11077   { (eval echo "$as_me:11077: \"$ac_try\"") >&5
11078   (eval $ac_try) 2>&5
11079   ac_status=$?
11080   echo "$as_me:11080: \$? = $ac_status" >&5
11081   (exit "$ac_status"); }; }; then
11082   :
11083 else
11084   echo "$as_me: failed program was:" >&5
11085 cat "conftest.$ac_ext" >&5
11086 cf_cv_posix_c_source=no
11087 fi
11088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11089          CFLAGS="$cf_save_CFLAGS"
11090          CPPFLAGS="$cf_save_CPPFLAGS"
11091
11092 fi
11093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11094
11095 fi
11096 echo "$as_me:11096: result: $cf_cv_posix_c_source" >&5
11097 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11098
11099 if test "$cf_cv_posix_c_source" != no ; then
11100         CFLAGS="$cf_trim_CFLAGS"
11101         CPPFLAGS="$cf_trim_CPPFLAGS"
11102
11103 cf_fix_cppflags=no
11104 cf_new_cflags=
11105 cf_new_cppflags=
11106 cf_new_extra_cppflags=
11107
11108 for cf_add_cflags in $cf_cv_posix_c_source
11109 do
11110 case "$cf_fix_cppflags" in
11111 (no)
11112         case "$cf_add_cflags" in
11113         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11114                 case "$cf_add_cflags" in
11115                 (-D*)
11116                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11117
11118                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11119                                 && test -z "${cf_tst_cflags}" \
11120                                 && cf_fix_cppflags=yes
11121
11122                         if test "$cf_fix_cppflags" = yes ; then
11123
11124         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11125         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11126
11127                                 continue
11128                         elif test "${cf_tst_cflags}" = "\"'" ; then
11129
11130         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11131         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11132
11133                                 continue
11134                         fi
11135                         ;;
11136                 esac
11137                 case "$CPPFLAGS" in
11138                 (*$cf_add_cflags)
11139                         ;;
11140                 (*)
11141                         case "$cf_add_cflags" in
11142                         (-D*)
11143                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11144
11145 CPPFLAGS=`echo "$CPPFLAGS" | \
11146         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11147                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11148
11149                                 ;;
11150                         esac
11151
11152         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11153         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11154
11155                         ;;
11156                 esac
11157                 ;;
11158         (*)
11159
11160         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11161         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11162
11163                 ;;
11164         esac
11165         ;;
11166 (yes)
11167
11168         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11169         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11170
11171         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11172
11173         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11174                 && test -z "${cf_tst_cflags}" \
11175                 && cf_fix_cppflags=no
11176         ;;
11177 esac
11178 done
11179
11180 if test -n "$cf_new_cflags" ; then
11181
11182         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11183         CFLAGS="${CFLAGS}$cf_new_cflags"
11184
11185 fi
11186
11187 if test -n "$cf_new_cppflags" ; then
11188
11189         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11190         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11191
11192 fi
11193
11194 if test -n "$cf_new_extra_cppflags" ; then
11195
11196         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11197         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11198
11199 fi
11200
11201 fi
11202
11203 fi # cf_cv_posix_visible
11204
11205         ;;
11206 esac
11207
11208 if test -n "$cf_xopen_source" ; then
11209
11210 for cf_add_cflags in $cf_xopen_source
11211 do
11212         case "x$cf_add_cflags" in
11213         (x-[DU]*)
11214
11215 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11216 while true
11217 do
11218         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11219         test "$CFLAGS" != "$cf_old_cflag" || break
11220         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11221
11222 echo "${as_me:-configure}:11222: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11223
11224         CFLAGS="$cf_old_cflag"
11225 done
11226
11227 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11228 while true
11229 do
11230         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11231         test "$CPPFLAGS" != "$cf_old_cflag" || break
11232         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11233
11234 echo "${as_me:-configure}:11234: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11235
11236         CPPFLAGS="$cf_old_cflag"
11237 done
11238
11239                 ;;
11240         esac
11241
11242 cf_fix_cppflags=no
11243 cf_new_cflags=
11244 cf_new_cppflags=
11245 cf_new_extra_cppflags=
11246
11247 for cf_add_cflags in $cf_add_cflags
11248 do
11249 case "$cf_fix_cppflags" in
11250 (no)
11251         case "$cf_add_cflags" in
11252         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11253                 case "$cf_add_cflags" in
11254                 (-D*)
11255                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11256
11257                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11258                                 && test -z "${cf_tst_cflags}" \
11259                                 && cf_fix_cppflags=yes
11260
11261                         if test "$cf_fix_cppflags" = yes ; then
11262
11263         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11264         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11265
11266                                 continue
11267                         elif test "${cf_tst_cflags}" = "\"'" ; then
11268
11269         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11270         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11271
11272                                 continue
11273                         fi
11274                         ;;
11275                 esac
11276                 case "$CPPFLAGS" in
11277                 (*$cf_add_cflags)
11278                         ;;
11279                 (*)
11280                         case "$cf_add_cflags" in
11281                         (-D*)
11282                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11283
11284 CPPFLAGS=`echo "$CPPFLAGS" | \
11285         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11286                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11287
11288                                 ;;
11289                         esac
11290
11291         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11292         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11293
11294                         ;;
11295                 esac
11296                 ;;
11297         (*)
11298
11299         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11300         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11301
11302                 ;;
11303         esac
11304         ;;
11305 (yes)
11306
11307         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11308         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11309
11310         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11311
11312         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11313                 && test -z "${cf_tst_cflags}" \
11314                 && cf_fix_cppflags=no
11315         ;;
11316 esac
11317 done
11318
11319 if test -n "$cf_new_cflags" ; then
11320         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11321
11322 echo "${as_me:-configure}:11322: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11323
11324         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11325         CFLAGS="${CFLAGS}$cf_new_cflags"
11326
11327 fi
11328
11329 if test -n "$cf_new_cppflags" ; then
11330         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11331
11332 echo "${as_me:-configure}:11332: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11333
11334         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11335         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11336
11337 fi
11338
11339 if test -n "$cf_new_extra_cppflags" ; then
11340         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11341
11342 echo "${as_me:-configure}:11342: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11343
11344         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11345         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11346
11347 fi
11348
11349 done
11350
11351 fi
11352
11353 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11354         echo "$as_me:11354: checking if _XOPEN_SOURCE really is set" >&5
11355 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11356         cat >"conftest.$ac_ext" <<_ACEOF
11357 #line 11357 "configure"
11358 #include "confdefs.h"
11359 #include <stdlib.h>
11360 int
11361 main (void)
11362 {
11363
11364 #ifndef _XOPEN_SOURCE
11365 make an error
11366 #endif
11367   ;
11368   return 0;
11369 }
11370 _ACEOF
11371 rm -f "conftest.$ac_objext"
11372 if { (eval echo "$as_me:11372: \"$ac_compile\"") >&5
11373   (eval $ac_compile) 2>&5
11374   ac_status=$?
11375   echo "$as_me:11375: \$? = $ac_status" >&5
11376   (exit "$ac_status"); } &&
11377          { ac_try='test -s "conftest.$ac_objext"'
11378   { (eval echo "$as_me:11378: \"$ac_try\"") >&5
11379   (eval $ac_try) 2>&5
11380   ac_status=$?
11381   echo "$as_me:11381: \$? = $ac_status" >&5
11382   (exit "$ac_status"); }; }; then
11383   cf_XOPEN_SOURCE_set=yes
11384 else
11385   echo "$as_me: failed program was:" >&5
11386 cat "conftest.$ac_ext" >&5
11387 cf_XOPEN_SOURCE_set=no
11388 fi
11389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11390         echo "$as_me:11390: result: $cf_XOPEN_SOURCE_set" >&5
11391 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11392         if test "$cf_XOPEN_SOURCE_set" = yes
11393         then
11394                 cat >"conftest.$ac_ext" <<_ACEOF
11395 #line 11395 "configure"
11396 #include "confdefs.h"
11397 #include <stdlib.h>
11398 int
11399 main (void)
11400 {
11401
11402 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11403 make an error
11404 #endif
11405   ;
11406   return 0;
11407 }
11408 _ACEOF
11409 rm -f "conftest.$ac_objext"
11410 if { (eval echo "$as_me:11410: \"$ac_compile\"") >&5
11411   (eval $ac_compile) 2>&5
11412   ac_status=$?
11413   echo "$as_me:11413: \$? = $ac_status" >&5
11414   (exit "$ac_status"); } &&
11415          { ac_try='test -s "conftest.$ac_objext"'
11416   { (eval echo "$as_me:11416: \"$ac_try\"") >&5
11417   (eval $ac_try) 2>&5
11418   ac_status=$?
11419   echo "$as_me:11419: \$? = $ac_status" >&5
11420   (exit "$ac_status"); }; }; then
11421   cf_XOPEN_SOURCE_set_ok=yes
11422 else
11423   echo "$as_me: failed program was:" >&5
11424 cat "conftest.$ac_ext" >&5
11425 cf_XOPEN_SOURCE_set_ok=no
11426 fi
11427 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11428                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11429                 then
11430                         { echo "$as_me:11430: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11431 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11432                 fi
11433         else
11434
11435 echo "$as_me:11435: checking if we should define _XOPEN_SOURCE" >&5
11436 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11437 if test "${cf_cv_xopen_source+set}" = set; then
11438   echo $ECHO_N "(cached) $ECHO_C" >&6
11439 else
11440
11441         cat >"conftest.$ac_ext" <<_ACEOF
11442 #line 11442 "configure"
11443 #include "confdefs.h"
11444
11445 #include <stdlib.h>
11446 #include <string.h>
11447 #include <sys/types.h>
11448
11449 int
11450 main (void)
11451 {
11452
11453 #ifndef _XOPEN_SOURCE
11454 make an error
11455 #endif
11456   ;
11457   return 0;
11458 }
11459 _ACEOF
11460 rm -f "conftest.$ac_objext"
11461 if { (eval echo "$as_me:11461: \"$ac_compile\"") >&5
11462   (eval $ac_compile) 2>&5
11463   ac_status=$?
11464   echo "$as_me:11464: \$? = $ac_status" >&5
11465   (exit "$ac_status"); } &&
11466          { ac_try='test -s "conftest.$ac_objext"'
11467   { (eval echo "$as_me:11467: \"$ac_try\"") >&5
11468   (eval $ac_try) 2>&5
11469   ac_status=$?
11470   echo "$as_me:11470: \$? = $ac_status" >&5
11471   (exit "$ac_status"); }; }; then
11472   cf_cv_xopen_source=no
11473 else
11474   echo "$as_me: failed program was:" >&5
11475 cat "conftest.$ac_ext" >&5
11476 cf_save="$CPPFLAGS"
11477
11478         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11479         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11480
11481          cat >"conftest.$ac_ext" <<_ACEOF
11482 #line 11482 "configure"
11483 #include "confdefs.h"
11484
11485 #include <stdlib.h>
11486 #include <string.h>
11487 #include <sys/types.h>
11488
11489 int
11490 main (void)
11491 {
11492
11493 #ifdef _XOPEN_SOURCE
11494 make an error
11495 #endif
11496   ;
11497   return 0;
11498 }
11499 _ACEOF
11500 rm -f "conftest.$ac_objext"
11501 if { (eval echo "$as_me:11501: \"$ac_compile\"") >&5
11502   (eval $ac_compile) 2>&5
11503   ac_status=$?
11504   echo "$as_me:11504: \$? = $ac_status" >&5
11505   (exit "$ac_status"); } &&
11506          { ac_try='test -s "conftest.$ac_objext"'
11507   { (eval echo "$as_me:11507: \"$ac_try\"") >&5
11508   (eval $ac_try) 2>&5
11509   ac_status=$?
11510   echo "$as_me:11510: \$? = $ac_status" >&5
11511   (exit "$ac_status"); }; }; then
11512   cf_cv_xopen_source=no
11513 else
11514   echo "$as_me: failed program was:" >&5
11515 cat "conftest.$ac_ext" >&5
11516 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11517 fi
11518 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11519         CPPFLAGS="$cf_save"
11520
11521 fi
11522 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11523
11524 fi
11525 echo "$as_me:11525: result: $cf_cv_xopen_source" >&5
11526 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11527
11528 if test "$cf_cv_xopen_source" != no ; then
11529
11530 CFLAGS=`echo "$CFLAGS" | \
11531         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11532                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11533
11534 CPPFLAGS=`echo "$CPPFLAGS" | \
11535         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11536                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11537
11538         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11539
11540 for cf_add_cflags in $cf_temp_xopen_source
11541 do
11542         case "x$cf_add_cflags" in
11543         (x-[DU]*)
11544
11545 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11546 while true
11547 do
11548         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11549         test "$CFLAGS" != "$cf_old_cflag" || break
11550
11551         CFLAGS="$cf_old_cflag"
11552 done
11553
11554 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11555 while true
11556 do
11557         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11558         test "$CPPFLAGS" != "$cf_old_cflag" || break
11559
11560         CPPFLAGS="$cf_old_cflag"
11561 done
11562
11563                 ;;
11564         esac
11565
11566 cf_fix_cppflags=no
11567 cf_new_cflags=
11568 cf_new_cppflags=
11569 cf_new_extra_cppflags=
11570
11571 for cf_add_cflags in $cf_add_cflags
11572 do
11573 case "$cf_fix_cppflags" in
11574 (no)
11575         case "$cf_add_cflags" in
11576         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11577                 case "$cf_add_cflags" in
11578                 (-D*)
11579                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11580
11581                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11582                                 && test -z "${cf_tst_cflags}" \
11583                                 && cf_fix_cppflags=yes
11584
11585                         if test "$cf_fix_cppflags" = yes ; then
11586
11587         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11588         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11589
11590                                 continue
11591                         elif test "${cf_tst_cflags}" = "\"'" ; then
11592
11593         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11594         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11595
11596                                 continue
11597                         fi
11598                         ;;
11599                 esac
11600                 case "$CPPFLAGS" in
11601                 (*$cf_add_cflags)
11602                         ;;
11603                 (*)
11604                         case "$cf_add_cflags" in
11605                         (-D*)
11606                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11607
11608 CPPFLAGS=`echo "$CPPFLAGS" | \
11609         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11610                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11611
11612                                 ;;
11613                         esac
11614
11615         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11616         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11617
11618                         ;;
11619                 esac
11620                 ;;
11621         (*)
11622
11623         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11624         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11625
11626                 ;;
11627         esac
11628         ;;
11629 (yes)
11630
11631         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11632         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11633
11634         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11635
11636         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11637                 && test -z "${cf_tst_cflags}" \
11638                 && cf_fix_cppflags=no
11639         ;;
11640 esac
11641 done
11642
11643 if test -n "$cf_new_cflags" ; then
11644
11645         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11646         CFLAGS="${CFLAGS}$cf_new_cflags"
11647
11648 fi
11649
11650 if test -n "$cf_new_cppflags" ; then
11651
11652         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11653         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11654
11655 fi
11656
11657 if test -n "$cf_new_extra_cppflags" ; then
11658
11659         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11660         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11661
11662 fi
11663
11664 done
11665
11666 fi
11667
11668         fi
11669 fi
11670 fi # cf_cv_posix_visible
11671
11672 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11673
11674 # Work around breakage on OS X
11675
11676 echo "$as_me:11676: checking if SIGWINCH is defined" >&5
11677 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11678 if test "${cf_cv_define_sigwinch+set}" = set; then
11679   echo $ECHO_N "(cached) $ECHO_C" >&6
11680 else
11681
11682         cat >"conftest.$ac_ext" <<_ACEOF
11683 #line 11683 "configure"
11684 #include "confdefs.h"
11685
11686 #include <sys/types.h>
11687 #include <sys/signal.h>
11688
11689 int
11690 main (void)
11691 {
11692 int x = SIGWINCH; (void)x
11693   ;
11694   return 0;
11695 }
11696 _ACEOF
11697 rm -f "conftest.$ac_objext"
11698 if { (eval echo "$as_me:11698: \"$ac_compile\"") >&5
11699   (eval $ac_compile) 2>&5
11700   ac_status=$?
11701   echo "$as_me:11701: \$? = $ac_status" >&5
11702   (exit "$ac_status"); } &&
11703          { ac_try='test -s "conftest.$ac_objext"'
11704   { (eval echo "$as_me:11704: \"$ac_try\"") >&5
11705   (eval $ac_try) 2>&5
11706   ac_status=$?
11707   echo "$as_me:11707: \$? = $ac_status" >&5
11708   (exit "$ac_status"); }; }; then
11709   cf_cv_define_sigwinch=yes
11710 else
11711   echo "$as_me: failed program was:" >&5
11712 cat "conftest.$ac_ext" >&5
11713 cat >"conftest.$ac_ext" <<_ACEOF
11714 #line 11714 "configure"
11715 #include "confdefs.h"
11716
11717 #undef _XOPEN_SOURCE
11718 #undef _POSIX_SOURCE
11719 #undef _POSIX_C_SOURCE
11720 #include <sys/types.h>
11721 #include <sys/signal.h>
11722
11723 int
11724 main (void)
11725 {
11726 int x = SIGWINCH; (void)x
11727   ;
11728   return 0;
11729 }
11730 _ACEOF
11731 rm -f "conftest.$ac_objext"
11732 if { (eval echo "$as_me:11732: \"$ac_compile\"") >&5
11733   (eval $ac_compile) 2>&5
11734   ac_status=$?
11735   echo "$as_me:11735: \$? = $ac_status" >&5
11736   (exit "$ac_status"); } &&
11737          { ac_try='test -s "conftest.$ac_objext"'
11738   { (eval echo "$as_me:11738: \"$ac_try\"") >&5
11739   (eval $ac_try) 2>&5
11740   ac_status=$?
11741   echo "$as_me:11741: \$? = $ac_status" >&5
11742   (exit "$ac_status"); }; }; then
11743   cf_cv_define_sigwinch=maybe
11744 else
11745   echo "$as_me: failed program was:" >&5
11746 cat "conftest.$ac_ext" >&5
11747 cf_cv_define_sigwinch=no
11748 fi
11749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11750
11751 fi
11752 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11753
11754 fi
11755 echo "$as_me:11755: result: $cf_cv_define_sigwinch" >&5
11756 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11757
11758 if test "$cf_cv_define_sigwinch" = maybe ; then
11759 echo "$as_me:11759: checking for actual SIGWINCH definition" >&5
11760 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11761 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11762   echo $ECHO_N "(cached) $ECHO_C" >&6
11763 else
11764
11765 cf_cv_fixup_sigwinch=unknown
11766 cf_sigwinch=32
11767 while test "$cf_sigwinch" != 1
11768 do
11769         cat >"conftest.$ac_ext" <<_ACEOF
11770 #line 11770 "configure"
11771 #include "confdefs.h"
11772
11773 #undef _XOPEN_SOURCE
11774 #undef _POSIX_SOURCE
11775 #undef _POSIX_C_SOURCE
11776 #include <sys/types.h>
11777 #include <sys/signal.h>
11778
11779 int
11780 main (void)
11781 {
11782
11783 #if SIGWINCH != $cf_sigwinch
11784 make an error
11785 #endif
11786 int x = SIGWINCH; (void)x
11787   ;
11788   return 0;
11789 }
11790 _ACEOF
11791 rm -f "conftest.$ac_objext"
11792 if { (eval echo "$as_me:11792: \"$ac_compile\"") >&5
11793   (eval $ac_compile) 2>&5
11794   ac_status=$?
11795   echo "$as_me:11795: \$? = $ac_status" >&5
11796   (exit "$ac_status"); } &&
11797          { ac_try='test -s "conftest.$ac_objext"'
11798   { (eval echo "$as_me:11798: \"$ac_try\"") >&5
11799   (eval $ac_try) 2>&5
11800   ac_status=$?
11801   echo "$as_me:11801: \$? = $ac_status" >&5
11802   (exit "$ac_status"); }; }; then
11803   cf_cv_fixup_sigwinch=$cf_sigwinch
11804          break
11805 else
11806   echo "$as_me: failed program was:" >&5
11807 cat "conftest.$ac_ext" >&5
11808 fi
11809 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11810
11811 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11812 done
11813
11814 fi
11815 echo "$as_me:11815: result: $cf_cv_fixup_sigwinch" >&5
11816 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11817
11818         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11819                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11820         fi
11821 fi
11822
11823 # Checks for CODESET support.
11824
11825 echo "$as_me:11825: checking for nl_langinfo and CODESET" >&5
11826 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11827 if test "${am_cv_langinfo_codeset+set}" = set; then
11828   echo $ECHO_N "(cached) $ECHO_C" >&6
11829 else
11830   cat >"conftest.$ac_ext" <<_ACEOF
11831 #line 11831 "configure"
11832 #include "confdefs.h"
11833 #include <langinfo.h>
11834 int
11835 main (void)
11836 {
11837 char* cs = nl_langinfo(CODESET); (void)cs
11838   ;
11839   return 0;
11840 }
11841 _ACEOF
11842 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11843 if { (eval echo "$as_me:11843: \"$ac_link\"") >&5
11844   (eval $ac_link) 2>&5
11845   ac_status=$?
11846   echo "$as_me:11846: \$? = $ac_status" >&5
11847   (exit "$ac_status"); } &&
11848          { ac_try='test -s "conftest$ac_exeext"'
11849   { (eval echo "$as_me:11849: \"$ac_try\"") >&5
11850   (eval $ac_try) 2>&5
11851   ac_status=$?
11852   echo "$as_me:11852: \$? = $ac_status" >&5
11853   (exit "$ac_status"); }; }; then
11854   am_cv_langinfo_codeset=yes
11855 else
11856   echo "$as_me: failed program was:" >&5
11857 cat "conftest.$ac_ext" >&5
11858 am_cv_langinfo_codeset=no
11859 fi
11860 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11861
11862 fi
11863 echo "$as_me:11863: result: $am_cv_langinfo_codeset" >&5
11864 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11865         if test "$am_cv_langinfo_codeset" = yes; then
11866
11867 cat >>confdefs.h <<\EOF
11868 #define HAVE_LANGINFO_CODESET 1
11869 EOF
11870
11871         fi
11872
11873 # use these variables to work around a defect in gcc's fixincludes.
11874 NCURSES_OK_WCHAR_T=
11875 NCURSES_OK_WINT_T=
11876
11877 echo "$as_me:11877: checking if you want wide-character code" >&5
11878 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11879
11880 # Check whether --enable-widec or --disable-widec was given.
11881 if test "${enable_widec+set}" = set; then
11882   enableval="$enable_widec"
11883   with_widec=$enableval
11884 else
11885   with_widec=no
11886 fi;
11887 echo "$as_me:11887: result: $with_widec" >&5
11888 echo "${ECHO_T}$with_widec" >&6
11889
11890 NCURSES_WCWIDTH_GRAPHICS=1
11891
11892 if test "x$with_widec" = xyes ; then
11893         if test "x$disable_lib_suffixes" = xno ; then
11894                 LIB_SUFFIX="w${LIB_SUFFIX}"
11895         fi
11896
11897 cat >>confdefs.h <<\EOF
11898 #define USE_WIDEC_SUPPORT 1
11899 EOF
11900
11901 cat >>confdefs.h <<\EOF
11902 #define NCURSES_WIDECHAR 1
11903 EOF
11904
11905 for ac_header in \
11906 wchar.h \
11907 wctype.h \
11908
11909 do
11910 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11911 echo "$as_me:11911: checking for $ac_header" >&5
11912 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11913 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11914   echo $ECHO_N "(cached) $ECHO_C" >&6
11915 else
11916   cat >"conftest.$ac_ext" <<_ACEOF
11917 #line 11917 "configure"
11918 #include "confdefs.h"
11919 #include <$ac_header>
11920 _ACEOF
11921 if { (eval echo "$as_me:11921: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11922   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11923   ac_status=$?
11924   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11925   rm -f conftest.er1
11926   cat conftest.err >&5
11927   echo "$as_me:11927: \$? = $ac_status" >&5
11928   (exit "$ac_status"); } >/dev/null; then
11929   if test -s conftest.err; then
11930     ac_cpp_err=$ac_c_preproc_warn_flag
11931   else
11932     ac_cpp_err=
11933   fi
11934 else
11935   ac_cpp_err=yes
11936 fi
11937 if test -z "$ac_cpp_err"; then
11938   eval "$as_ac_Header=yes"
11939 else
11940   echo "$as_me: failed program was:" >&5
11941   cat "conftest.$ac_ext" >&5
11942   eval "$as_ac_Header=no"
11943 fi
11944 rm -f conftest.err "conftest.$ac_ext"
11945 fi
11946 echo "$as_me:11946: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11947 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11948 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11949   cat >>confdefs.h <<EOF
11950 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11951 EOF
11952
11953 fi
11954 done
11955
11956 echo "$as_me:11956: checking if wchar.h can be used as is" >&5
11957 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11958 if test "${cf_cv_wchar_h_okay+set}" = set; then
11959   echo $ECHO_N "(cached) $ECHO_C" >&6
11960 else
11961
11962 cat >"conftest.$ac_ext" <<_ACEOF
11963 #line 11963 "configure"
11964 #include "confdefs.h"
11965
11966 #include <stdlib.h>
11967 #ifdef HAVE_WCHAR_H
11968 #include <wchar.h>
11969 #endif
11970 #ifdef HAVE_WCTYPE_H
11971 #include <wctype.h>
11972 #endif
11973
11974 int
11975 main (void)
11976 {
11977
11978         wint_t foo = 0;
11979         int bar = iswpunct(foo)
11980   ;
11981   return 0;
11982 }
11983 _ACEOF
11984 rm -f "conftest.$ac_objext"
11985 if { (eval echo "$as_me:11985: \"$ac_compile\"") >&5
11986   (eval $ac_compile) 2>&5
11987   ac_status=$?
11988   echo "$as_me:11988: \$? = $ac_status" >&5
11989   (exit "$ac_status"); } &&
11990          { ac_try='test -s "conftest.$ac_objext"'
11991   { (eval echo "$as_me:11991: \"$ac_try\"") >&5
11992   (eval $ac_try) 2>&5
11993   ac_status=$?
11994   echo "$as_me:11994: \$? = $ac_status" >&5
11995   (exit "$ac_status"); }; }; then
11996   cf_cv_wchar_h_okay=yes
11997 else
11998   echo "$as_me: failed program was:" >&5
11999 cat "conftest.$ac_ext" >&5
12000 cf_cv_wchar_h_okay=no
12001 fi
12002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12003 fi
12004 echo "$as_me:12004: result: $cf_cv_wchar_h_okay" >&5
12005 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12006
12007 if test "$cf_cv_wchar_h_okay" = no
12008 then
12009
12010 echo "$as_me:12010: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12011 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12012 cat >"conftest.$ac_ext" <<_ACEOF
12013 #line 12013 "configure"
12014 #include "confdefs.h"
12015 #include <sys/types.h>
12016
12017 int
12018 main (void)
12019 {
12020
12021 #ifndef _XOPEN_SOURCE_EXTENDED
12022 make an error
12023 #endif
12024   ;
12025   return 0;
12026 }
12027 _ACEOF
12028 rm -f "conftest.$ac_objext"
12029 if { (eval echo "$as_me:12029: \"$ac_compile\"") >&5
12030   (eval $ac_compile) 2>&5
12031   ac_status=$?
12032   echo "$as_me:12032: \$? = $ac_status" >&5
12033   (exit "$ac_status"); } &&
12034          { ac_try='test -s "conftest.$ac_objext"'
12035   { (eval echo "$as_me:12035: \"$ac_try\"") >&5
12036   (eval $ac_try) 2>&5
12037   ac_status=$?
12038   echo "$as_me:12038: \$? = $ac_status" >&5
12039   (exit "$ac_status"); }; }; then
12040   cf_result=no
12041 else
12042   echo "$as_me: failed program was:" >&5
12043 cat "conftest.$ac_ext" >&5
12044 cf_result=yes
12045 fi
12046 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12047 echo "$as_me:12047: result: $cf_result" >&5
12048 echo "${ECHO_T}$cf_result" >&6
12049
12050 if test "$cf_result" = yes ; then
12051         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12052 elif test "x" != "x" ; then
12053         echo "$as_me:12053: checking checking for compatible value versus " >&5
12054 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12055         cat >"conftest.$ac_ext" <<_ACEOF
12056 #line 12056 "configure"
12057 #include "confdefs.h"
12058 #include <sys/types.h>
12059
12060 int
12061 main (void)
12062 {
12063
12064 #if _XOPEN_SOURCE_EXTENDED- < 0
12065 make an error
12066 #endif
12067   ;
12068   return 0;
12069 }
12070 _ACEOF
12071 rm -f "conftest.$ac_objext"
12072 if { (eval echo "$as_me:12072: \"$ac_compile\"") >&5
12073   (eval $ac_compile) 2>&5
12074   ac_status=$?
12075   echo "$as_me:12075: \$? = $ac_status" >&5
12076   (exit "$ac_status"); } &&
12077          { ac_try='test -s "conftest.$ac_objext"'
12078   { (eval echo "$as_me:12078: \"$ac_try\"") >&5
12079   (eval $ac_try) 2>&5
12080   ac_status=$?
12081   echo "$as_me:12081: \$? = $ac_status" >&5
12082   (exit "$ac_status"); }; }; then
12083   cf_result=yes
12084 else
12085   echo "$as_me: failed program was:" >&5
12086 cat "conftest.$ac_ext" >&5
12087 cf_result=no
12088 fi
12089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12090         echo "$as_me:12090: result: $cf_result" >&5
12091 echo "${ECHO_T}$cf_result" >&6
12092         if test "$cf_result" = no ; then
12093                 # perhaps we can override it - try...
12094                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12095         fi
12096 fi
12097
12098 fi
12099
12100 echo "$as_me:12100: checking if wcwidth agrees graphics are single-width" >&5
12101 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12102 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12103   echo $ECHO_N "(cached) $ECHO_C" >&6
12104 else
12105
12106 cat >conftest.in <<CF_EOF
12107 -       VT100 symbols
12108 0x250c  upper left corner
12109 0x2514  lower left corner
12110 0x2510  upper right corner
12111 0x2518  lower right corner
12112 0x251c  tee pointing left
12113 0x2524  tee pointing right
12114 0x2534  tee pointing up
12115 0x252c  tee pointing down
12116 0x2500  horizontal line
12117 0x2502  vertical line
12118 0x253c  large plus or crossover
12119 0x23ba  scan line 1
12120 0x23bd  scan line 9
12121 0x25c6  diamond
12122 0x2592  checker board (stipple)
12123 0x00b0  degree symbol
12124 0x00b1  plus/minus
12125 0x00b7  bullet
12126 -       Teletype 5410v1 symbols
12127 0x2190  arrow pointing left
12128 0x2192  arrow pointing right
12129 0x2193  arrow pointing down
12130 0x2191  arrow pointing up
12131 0x2592  board of squares
12132 0x2603  lantern symbol
12133 0x25ae  solid square block
12134 -       these defaults were invented for ncurses
12135 0x23bb  scan line 3
12136 0x23bc  scan line 7
12137 0x2264  less-than-or-equal-to
12138 0x2265  greater-than-or-equal-to
12139 0x03c0  greek pi
12140 0x2260  not-equal
12141 0x00a3  pound-sterling symbol
12142 -       thick-line-drawing
12143 0x250f  upper left corner
12144 0x2517  lower left corner
12145 0x2513  upper right corner
12146 0x251b  lower right corner
12147 0x2523  tee pointing left
12148 0x252b  tee pointing right
12149 0x253b  tee pointing up
12150 0x2533  tee pointing down
12151 0x2501  horizontal line
12152 0x2503  vertical line
12153 0x254b  large plus or crossover
12154 -       double-line-drawing
12155 0x2554  upper left corner
12156 0x255a  lower left corner
12157 0x2557  upper right corner
12158 0x255d  lower right corner
12159 0x2563  tee pointing left
12160 0x2560  tee pointing right
12161 0x2569  tee pointing up
12162 0x2566  tee pointing down
12163 0x2550  horizontal line
12164 0x2551  vertical line
12165 0x256c  large plus or crossover
12166 CF_EOF
12167 if test "$cross_compiling" = yes; then
12168   cf_cv_wcwidth_graphics=unknown
12169 else
12170   cat >"conftest.$ac_ext" <<_ACEOF
12171 #line 12171 "configure"
12172 #include "confdefs.h"
12173
12174 #include <locale.h>
12175 #include <stdio.h>
12176 #include <wchar.h>
12177
12178 #define MY_LEN 80
12179
12180 int
12181 main(void)
12182 {
12183         FILE *fp;
12184         int value;
12185         char buffer[MY_LEN + 1];
12186         char notes[MY_LEN + 1];
12187         int totals = 0;
12188         int passed = 0;
12189
12190         if (setlocale(LC_ALL, "en_US.UTF8") ||
12191                 setlocale(LC_ALL, "en_US.UTF-8") ||
12192                 setlocale(LC_ALL, "en_US.utf8") ||
12193                 setlocale(LC_ALL, "en_US.utf-8")) {
12194                 if ((fp = fopen("conftest.in", "r")) != 0) {
12195                         while (fgets(buffer, MY_LEN, fp) != 0) {
12196                                 if (*buffer == '-') {
12197                                         fprintf(stderr, "\\t%s", buffer);
12198                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12199                                         ++totals;
12200                                         if (wcwidth(value) == 1)
12201                                                 ++passed;
12202                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12203                                 } else {
12204                                         fprintf(stderr, "?\\t%s", buffer);
12205                                 }
12206                         }
12207                 }
12208         }
12209         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12210         return (totals == passed) ? 0 : 1;
12211 }
12212
12213 _ACEOF
12214 rm -f "conftest$ac_exeext"
12215 if { (eval echo "$as_me:12215: \"$ac_link\"") >&5
12216   (eval $ac_link) 2>&5
12217   ac_status=$?
12218   echo "$as_me:12218: \$? = $ac_status" >&5
12219   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12220   { (eval echo "$as_me:12220: \"$ac_try\"") >&5
12221   (eval $ac_try) 2>&5
12222   ac_status=$?
12223   echo "$as_me:12223: \$? = $ac_status" >&5
12224   (exit "$ac_status"); }; }; then
12225   cf_cv_wcwidth_graphics=yes
12226 else
12227   echo "$as_me: program exited with status $ac_status" >&5
12228 echo "$as_me: failed program was:" >&5
12229 cat "conftest.$ac_ext" >&5
12230 cf_cv_wcwidth_graphics=no
12231 fi
12232 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12233 fi
12234
12235 fi
12236 echo "$as_me:12236: result: $cf_cv_wcwidth_graphics" >&5
12237 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12238
12239         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12240
12241         # with_overwrite=no
12242         NCURSES_CH_T=cchar_t
12243
12244 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12245 do
12246 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12247 echo "$as_me:12247: checking for $ac_func" >&5
12248 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12249 if eval "test \"\${$as_ac_var+set}\" = set"; then
12250   echo $ECHO_N "(cached) $ECHO_C" >&6
12251 else
12252   cat >"conftest.$ac_ext" <<_ACEOF
12253 #line 12253 "configure"
12254 #include "confdefs.h"
12255 #define $ac_func autoconf_temporary
12256 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12257 #undef $ac_func
12258
12259 #ifdef __cplusplus
12260 extern "C"
12261 #endif
12262
12263 /* We use char because int might match the return type of a gcc2
12264    builtin and then its argument prototype would still apply.  */
12265 char $ac_func (void);
12266
12267 int
12268 main (void)
12269 {
12270
12271 /* The GNU C library defines stubs for functions which it implements
12272     to always fail with ENOSYS.  Some functions are actually named
12273     something starting with __ and the normal name is an alias.  */
12274 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12275 #error found stub for $ac_func
12276 #endif
12277
12278         return $ac_func ();
12279   ;
12280   return 0;
12281 }
12282 _ACEOF
12283 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12284 if { (eval echo "$as_me:12284: \"$ac_link\"") >&5
12285   (eval $ac_link) 2>&5
12286   ac_status=$?
12287   echo "$as_me:12287: \$? = $ac_status" >&5
12288   (exit "$ac_status"); } &&
12289          { ac_try='test -s "conftest$ac_exeext"'
12290   { (eval echo "$as_me:12290: \"$ac_try\"") >&5
12291   (eval $ac_try) 2>&5
12292   ac_status=$?
12293   echo "$as_me:12293: \$? = $ac_status" >&5
12294   (exit "$ac_status"); }; }; then
12295   eval "$as_ac_var=yes"
12296 else
12297   echo "$as_me: failed program was:" >&5
12298 cat "conftest.$ac_ext" >&5
12299 eval "$as_ac_var=no"
12300 fi
12301 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12302 fi
12303 echo "$as_me:12303: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12304 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12305 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12306   cat >>confdefs.h <<EOF
12307 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12308 EOF
12309
12310 fi
12311 done
12312
12313         if test "x$ac_cv_func_putwc" != xyes ; then
12314
12315 for ac_header in wchar.h
12316 do
12317 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12318 echo "$as_me:12318: checking for $ac_header" >&5
12319 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12320 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12321   echo $ECHO_N "(cached) $ECHO_C" >&6
12322 else
12323   cat >"conftest.$ac_ext" <<_ACEOF
12324 #line 12324 "configure"
12325 #include "confdefs.h"
12326 #include <$ac_header>
12327 _ACEOF
12328 if { (eval echo "$as_me:12328: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12329   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12330   ac_status=$?
12331   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12332   rm -f conftest.er1
12333   cat conftest.err >&5
12334   echo "$as_me:12334: \$? = $ac_status" >&5
12335   (exit "$ac_status"); } >/dev/null; then
12336   if test -s conftest.err; then
12337     ac_cpp_err=$ac_c_preproc_warn_flag
12338   else
12339     ac_cpp_err=
12340   fi
12341 else
12342   ac_cpp_err=yes
12343 fi
12344 if test -z "$ac_cpp_err"; then
12345   eval "$as_ac_Header=yes"
12346 else
12347   echo "$as_me: failed program was:" >&5
12348   cat "conftest.$ac_ext" >&5
12349   eval "$as_ac_Header=no"
12350 fi
12351 rm -f conftest.err "conftest.$ac_ext"
12352 fi
12353 echo "$as_me:12353: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12354 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12355 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12356   cat >>confdefs.h <<EOF
12357 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12358 EOF
12359
12360 fi
12361 done
12362
12363 echo "$as_me:12363: checking for multibyte character support" >&5
12364 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12365 if test "${cf_cv_utf8_lib+set}" = set; then
12366   echo $ECHO_N "(cached) $ECHO_C" >&6
12367 else
12368
12369         cf_save_LIBS="$LIBS"
12370         cat >"conftest.$ac_ext" <<_ACEOF
12371 #line 12371 "configure"
12372 #include "confdefs.h"
12373
12374 #include <stdlib.h>
12375 #include <stdio.h>
12376 #ifdef HAVE_WCHAR_H
12377 #include <wchar.h>
12378 #endif
12379
12380 int
12381 main (void)
12382 {
12383 putwc(0,0);
12384   ;
12385   return 0;
12386 }
12387 _ACEOF
12388 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12389 if { (eval echo "$as_me:12389: \"$ac_link\"") >&5
12390   (eval $ac_link) 2>&5
12391   ac_status=$?
12392   echo "$as_me:12392: \$? = $ac_status" >&5
12393   (exit "$ac_status"); } &&
12394          { ac_try='test -s "conftest$ac_exeext"'
12395   { (eval echo "$as_me:12395: \"$ac_try\"") >&5
12396   (eval $ac_try) 2>&5
12397   ac_status=$?
12398   echo "$as_me:12398: \$? = $ac_status" >&5
12399   (exit "$ac_status"); }; }; then
12400   cf_cv_utf8_lib=yes
12401 else
12402   echo "$as_me: failed program was:" >&5
12403 cat "conftest.$ac_ext" >&5
12404
12405 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12406 # will be set on completion of the AC_TRY_LINK below.
12407 cf_cv_header_path_utf8=
12408 cf_cv_library_path_utf8=
12409
12410 echo "${as_me:-configure}:12410: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12411
12412 cf_save_LIBS="$LIBS"
12413
12414 cat >"conftest.$ac_ext" <<_ACEOF
12415 #line 12415 "configure"
12416 #include "confdefs.h"
12417
12418 #include <libutf8.h>
12419 int
12420 main (void)
12421 {
12422 putwc(0,0);
12423   ;
12424   return 0;
12425 }
12426 _ACEOF
12427 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12428 if { (eval echo "$as_me:12428: \"$ac_link\"") >&5
12429   (eval $ac_link) 2>&5
12430   ac_status=$?
12431   echo "$as_me:12431: \$? = $ac_status" >&5
12432   (exit "$ac_status"); } &&
12433          { ac_try='test -s "conftest$ac_exeext"'
12434   { (eval echo "$as_me:12434: \"$ac_try\"") >&5
12435   (eval $ac_try) 2>&5
12436   ac_status=$?
12437   echo "$as_me:12437: \$? = $ac_status" >&5
12438   (exit "$ac_status"); }; }; then
12439
12440         cf_cv_find_linkage_utf8=yes
12441         cf_cv_header_path_utf8=/usr/include
12442         cf_cv_library_path_utf8=/usr/lib
12443
12444 else
12445   echo "$as_me: failed program was:" >&5
12446 cat "conftest.$ac_ext" >&5
12447
12448 LIBS="-lutf8  $cf_save_LIBS"
12449
12450 cat >"conftest.$ac_ext" <<_ACEOF
12451 #line 12451 "configure"
12452 #include "confdefs.h"
12453
12454 #include <libutf8.h>
12455 int
12456 main (void)
12457 {
12458 putwc(0,0);
12459   ;
12460   return 0;
12461 }
12462 _ACEOF
12463 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12464 if { (eval echo "$as_me:12464: \"$ac_link\"") >&5
12465   (eval $ac_link) 2>&5
12466   ac_status=$?
12467   echo "$as_me:12467: \$? = $ac_status" >&5
12468   (exit "$ac_status"); } &&
12469          { ac_try='test -s "conftest$ac_exeext"'
12470   { (eval echo "$as_me:12470: \"$ac_try\"") >&5
12471   (eval $ac_try) 2>&5
12472   ac_status=$?
12473   echo "$as_me:12473: \$? = $ac_status" >&5
12474   (exit "$ac_status"); }; }; then
12475
12476         cf_cv_find_linkage_utf8=yes
12477         cf_cv_header_path_utf8=/usr/include
12478         cf_cv_library_path_utf8=/usr/lib
12479         cf_cv_library_file_utf8="-lutf8"
12480
12481 else
12482   echo "$as_me: failed program was:" >&5
12483 cat "conftest.$ac_ext" >&5
12484
12485         cf_cv_find_linkage_utf8=no
12486         LIBS="$cf_save_LIBS"
12487
12488         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12489
12490 echo "${as_me:-configure}:12490: testing find linkage for utf8 library ..." 1>&5
12491
12492 echo "${as_me:-configure}:12492: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12493
12494         cf_save_CPPFLAGS="$CPPFLAGS"
12495         cf_test_CPPFLAGS="$CPPFLAGS"
12496
12497 cf_search=
12498
12499 # collect the current set of include-directories from compiler flags
12500 cf_header_path_list=""
12501 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12502         for cf_header_path in $CPPFLAGS $CFLAGS
12503         do
12504                 case "$cf_header_path" in
12505                 (-I*)
12506                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12507
12508 test "x$cf_header_path" != "xNONE" && \
12509 test -d "$cf_header_path" && \
12510  {
12511         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12512         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12513         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12514         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12515         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12516         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12517 }
12518
12519                         cf_header_path_list="$cf_header_path_list $cf_search"
12520                         ;;
12521                 esac
12522         done
12523 fi
12524
12525 # add the variations for the package we are looking for
12526
12527 cf_search=
12528
12529 test "x$prefix" != "xNONE" && \
12530 test -d "$prefix" && \
12531  {
12532         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12533         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12534         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12535         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12536         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12537         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12538 }
12539
12540 for cf_subdir_prefix in \
12541         /usr \
12542         /usr/local \
12543         /usr/pkg \
12544         /opt \
12545         /opt/local \
12546         $HOME
12547 do
12548
12549 test "x$cf_subdir_prefix" != "x$prefix" && \
12550 test -d "$cf_subdir_prefix" && \
12551 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12552         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12553         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12554         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12555         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12556         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12557         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12558 }
12559
12560 done
12561
12562 test "$includedir" != NONE && \
12563 test "$includedir" != "/usr/include" && \
12564 test -d "$includedir" && {
12565         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12566         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12567 }
12568
12569 test "$oldincludedir" != NONE && \
12570 test "$oldincludedir" != "/usr/include" && \
12571 test -d "$oldincludedir" && {
12572         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12573         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12574 }
12575
12576 cf_search="$cf_search $cf_header_path_list"
12577
12578         for cf_cv_header_path_utf8 in $cf_search
12579         do
12580                 if test -d "$cf_cv_header_path_utf8" ; then
12581                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12582
12583 echo "${as_me:-configure}:12583: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12584
12585                         CPPFLAGS="$cf_save_CPPFLAGS"
12586
12587         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12588         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12589
12590                         cat >"conftest.$ac_ext" <<_ACEOF
12591 #line 12591 "configure"
12592 #include "confdefs.h"
12593
12594 #include <libutf8.h>
12595 int
12596 main (void)
12597 {
12598 putwc(0,0);
12599   ;
12600   return 0;
12601 }
12602 _ACEOF
12603 rm -f "conftest.$ac_objext"
12604 if { (eval echo "$as_me:12604: \"$ac_compile\"") >&5
12605   (eval $ac_compile) 2>&5
12606   ac_status=$?
12607   echo "$as_me:12607: \$? = $ac_status" >&5
12608   (exit "$ac_status"); } &&
12609          { ac_try='test -s "conftest.$ac_objext"'
12610   { (eval echo "$as_me:12610: \"$ac_try\"") >&5
12611   (eval $ac_try) 2>&5
12612   ac_status=$?
12613   echo "$as_me:12613: \$? = $ac_status" >&5
12614   (exit "$ac_status"); }; }; then
12615
12616                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12617
12618 echo "${as_me:-configure}:12618: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12619
12620                                 cf_cv_find_linkage_utf8=maybe
12621                                 cf_test_CPPFLAGS="$CPPFLAGS"
12622                                 break
12623 else
12624   echo "$as_me: failed program was:" >&5
12625 cat "conftest.$ac_ext" >&5
12626
12627                                 CPPFLAGS="$cf_save_CPPFLAGS"
12628
12629 fi
12630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12631                 fi
12632         done
12633
12634         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12635
12636 echo "${as_me:-configure}:12636: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12637
12638                 cf_save_LIBS="$LIBS"
12639                 cf_save_LDFLAGS="$LDFLAGS"
12640
12641                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12642
12643 cf_search=
12644 cf_library_path_list=""
12645 if test -n "${LDFLAGS}${LIBS}" ; then
12646         for cf_library_path in $LDFLAGS $LIBS
12647         do
12648                 case "$cf_library_path" in
12649                 (-L*)
12650                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12651
12652 test "x$cf_library_path" != "xNONE" && \
12653 test -d "$cf_library_path" && \
12654  {
12655         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12656         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12657         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12658         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12659         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12660         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12661 }
12662
12663                         cf_library_path_list="$cf_library_path_list $cf_search"
12664                         ;;
12665                 esac
12666         done
12667 fi
12668
12669 cf_search=
12670
12671 test "x$prefix" != "xNONE" && \
12672 test -d "$prefix" && \
12673  {
12674         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12675         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12676         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12677         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12678         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12679         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12680 }
12681
12682 for cf_subdir_prefix in \
12683         /usr \
12684         /usr/local \
12685         /usr/pkg \
12686         /opt \
12687         /opt/local \
12688         $HOME
12689 do
12690
12691 test "x$cf_subdir_prefix" != "x$prefix" && \
12692 test -d "$cf_subdir_prefix" && \
12693 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12694         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12695         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12696         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12697         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12698         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12699         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12700 }
12701
12702 done
12703
12704 cf_search="$cf_library_path_list $cf_search"
12705
12706                         for cf_cv_library_path_utf8 in $cf_search
12707                         do
12708                                 if test -d "$cf_cv_library_path_utf8" ; then
12709                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12710
12711 echo "${as_me:-configure}:12711: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12712
12713                                         CPPFLAGS="$cf_test_CPPFLAGS"
12714                                         LIBS="-lutf8  $cf_save_LIBS"
12715                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12716                                         cat >"conftest.$ac_ext" <<_ACEOF
12717 #line 12717 "configure"
12718 #include "confdefs.h"
12719
12720 #include <libutf8.h>
12721 int
12722 main (void)
12723 {
12724 putwc(0,0);
12725   ;
12726   return 0;
12727 }
12728 _ACEOF
12729 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12730 if { (eval echo "$as_me:12730: \"$ac_link\"") >&5
12731   (eval $ac_link) 2>&5
12732   ac_status=$?
12733   echo "$as_me:12733: \$? = $ac_status" >&5
12734   (exit "$ac_status"); } &&
12735          { ac_try='test -s "conftest$ac_exeext"'
12736   { (eval echo "$as_me:12736: \"$ac_try\"") >&5
12737   (eval $ac_try) 2>&5
12738   ac_status=$?
12739   echo "$as_me:12739: \$? = $ac_status" >&5
12740   (exit "$ac_status"); }; }; then
12741
12742                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12743
12744 echo "${as_me:-configure}:12744: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12745
12746                                         cf_cv_find_linkage_utf8=yes
12747                                         cf_cv_library_file_utf8="-lutf8"
12748                                         break
12749 else
12750   echo "$as_me: failed program was:" >&5
12751 cat "conftest.$ac_ext" >&5
12752
12753                                         CPPFLAGS="$cf_save_CPPFLAGS"
12754                                         LIBS="$cf_save_LIBS"
12755                                         LDFLAGS="$cf_save_LDFLAGS"
12756
12757 fi
12758 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12759                                 fi
12760                         done
12761                         CPPFLAGS="$cf_save_CPPFLAGS"
12762                         LDFLAGS="$cf_save_LDFLAGS"
12763                 fi
12764
12765         else
12766                 cf_cv_find_linkage_utf8=no
12767         fi
12768
12769 fi
12770 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12771
12772 fi
12773 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12774
12775 LIBS="$cf_save_LIBS"
12776
12777 if test "$cf_cv_find_linkage_utf8" = yes ; then
12778 cf_cv_utf8_lib=add-on
12779 else
12780 cf_cv_utf8_lib=no
12781 fi
12782
12783 fi
12784 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12785 fi
12786 echo "$as_me:12786: result: $cf_cv_utf8_lib" >&5
12787 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12788
12789 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12790 # ncurses/ncursesw:
12791 if test "$cf_cv_utf8_lib" = "add-on" ; then
12792
12793 cat >>confdefs.h <<\EOF
12794 #define HAVE_LIBUTF8_H 1
12795 EOF
12796
12797 if test -n "$cf_cv_header_path_utf8" ; then
12798   for cf_add_incdir in $cf_cv_header_path_utf8
12799   do
12800         while test "$cf_add_incdir" != /usr/include
12801         do
12802           if test -d "$cf_add_incdir"
12803           then
12804                 cf_have_incdir=no
12805                 if test -n "$CFLAGS$CPPFLAGS" ; then
12806                   # a loop is needed to ensure we can add subdirs of existing dirs
12807                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12808                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12809                           cf_have_incdir=yes; break
12810                         fi
12811                   done
12812                 fi
12813
12814                 if test "$cf_have_incdir" = no ; then
12815                   if test "$cf_add_incdir" = /usr/local/include ; then
12816                         if test "$GCC" = yes
12817                         then
12818                           cf_save_CPPFLAGS=$CPPFLAGS
12819
12820         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12821         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12822
12823                           cat >"conftest.$ac_ext" <<_ACEOF
12824 #line 12824 "configure"
12825 #include "confdefs.h"
12826 #include <stdio.h>
12827 int
12828 main (void)
12829 {
12830 printf("Hello")
12831   ;
12832   return 0;
12833 }
12834 _ACEOF
12835 rm -f "conftest.$ac_objext"
12836 if { (eval echo "$as_me:12836: \"$ac_compile\"") >&5
12837   (eval $ac_compile) 2>&5
12838   ac_status=$?
12839   echo "$as_me:12839: \$? = $ac_status" >&5
12840   (exit "$ac_status"); } &&
12841          { ac_try='test -s "conftest.$ac_objext"'
12842   { (eval echo "$as_me:12842: \"$ac_try\"") >&5
12843   (eval $ac_try) 2>&5
12844   ac_status=$?
12845   echo "$as_me:12845: \$? = $ac_status" >&5
12846   (exit "$ac_status"); }; }; then
12847   :
12848 else
12849   echo "$as_me: failed program was:" >&5
12850 cat "conftest.$ac_ext" >&5
12851 cf_have_incdir=yes
12852 fi
12853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12854                           CPPFLAGS=$cf_save_CPPFLAGS
12855                         fi
12856                   fi
12857                 fi
12858
12859                 if test "$cf_have_incdir" = no ; then
12860                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12861
12862 echo "${as_me:-configure}:12862: testing adding $cf_add_incdir to include-path ..." 1>&5
12863
12864                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12865
12866                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12867                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12868                   cf_add_incdir="$cf_top_incdir"
12869                 else
12870                   break
12871                 fi
12872           else
12873                 break
12874           fi
12875         done
12876   done
12877 fi
12878
12879 if test -n "$cf_cv_library_path_utf8" ; then
12880         for cf_add_libdir in $cf_cv_library_path_utf8
12881         do
12882                 if test "$cf_add_libdir" = /usr/lib ; then
12883                         :
12884                 elif test -d "$cf_add_libdir"
12885                 then
12886                         cf_have_libdir=no
12887                         if test -n "$LDFLAGS$LIBS" ; then
12888                                 # a loop is needed to ensure we can add subdirs of existing dirs
12889                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12890                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12891                                                 cf_have_libdir=yes; break
12892                                         fi
12893                                 done
12894                         fi
12895                         if test "$cf_have_libdir" = no ; then
12896                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12897
12898 echo "${as_me:-configure}:12898: testing adding $cf_add_libdir to library-path ..." 1>&5
12899
12900                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12901                         fi
12902                 fi
12903         done
12904 fi
12905
12906 cf_add_libs="$LIBS"
12907 # reverse order
12908 cf_add_0lib=
12909 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12910 # filter duplicates
12911 for cf_add_1lib in $cf_add_0lib; do
12912         for cf_add_2lib in $cf_add_libs; do
12913                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12914                         cf_add_1lib=
12915                         break
12916                 fi
12917         done
12918         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12919 done
12920 LIBS="$cf_add_libs"
12921
12922 fi
12923
12924                 if test "$cf_cv_utf8_lib" != no ; then
12925                         NCURSES_LIBUTF8=1
12926                 fi
12927         fi
12928
12929 # This is needed on Tru64 5.0 to declare mbstate_t
12930 echo "$as_me:12930: checking if we must include wchar.h to declare mbstate_t" >&5
12931 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12932 if test "${cf_cv_mbstate_t+set}" = set; then
12933   echo $ECHO_N "(cached) $ECHO_C" >&6
12934 else
12935
12936 cat >"conftest.$ac_ext" <<_ACEOF
12937 #line 12937 "configure"
12938 #include "confdefs.h"
12939
12940 #include <stdlib.h>
12941 #include <stdarg.h>
12942 #include <stdio.h>
12943 #ifdef HAVE_LIBUTF8_H
12944 #include <libutf8.h>
12945 #endif
12946 int
12947 main (void)
12948 {
12949 mbstate_t state
12950   ;
12951   return 0;
12952 }
12953 _ACEOF
12954 rm -f "conftest.$ac_objext"
12955 if { (eval echo "$as_me:12955: \"$ac_compile\"") >&5
12956   (eval $ac_compile) 2>&5
12957   ac_status=$?
12958   echo "$as_me:12958: \$? = $ac_status" >&5
12959   (exit "$ac_status"); } &&
12960          { ac_try='test -s "conftest.$ac_objext"'
12961   { (eval echo "$as_me:12961: \"$ac_try\"") >&5
12962   (eval $ac_try) 2>&5
12963   ac_status=$?
12964   echo "$as_me:12964: \$? = $ac_status" >&5
12965   (exit "$ac_status"); }; }; then
12966   cf_cv_mbstate_t=no
12967 else
12968   echo "$as_me: failed program was:" >&5
12969 cat "conftest.$ac_ext" >&5
12970 cat >"conftest.$ac_ext" <<_ACEOF
12971 #line 12971 "configure"
12972 #include "confdefs.h"
12973
12974 #include <stdlib.h>
12975 #include <stdarg.h>
12976 #include <stdio.h>
12977 #include <wchar.h>
12978 #ifdef HAVE_LIBUTF8_H
12979 #include <libutf8.h>
12980 #endif
12981 int
12982 main (void)
12983 {
12984 mbstate_t value
12985   ;
12986   return 0;
12987 }
12988 _ACEOF
12989 rm -f "conftest.$ac_objext"
12990 if { (eval echo "$as_me:12990: \"$ac_compile\"") >&5
12991   (eval $ac_compile) 2>&5
12992   ac_status=$?
12993   echo "$as_me:12993: \$? = $ac_status" >&5
12994   (exit "$ac_status"); } &&
12995          { ac_try='test -s "conftest.$ac_objext"'
12996   { (eval echo "$as_me:12996: \"$ac_try\"") >&5
12997   (eval $ac_try) 2>&5
12998   ac_status=$?
12999   echo "$as_me:12999: \$? = $ac_status" >&5
13000   (exit "$ac_status"); }; }; then
13001   cf_cv_mbstate_t=yes
13002 else
13003   echo "$as_me: failed program was:" >&5
13004 cat "conftest.$ac_ext" >&5
13005 cf_cv_mbstate_t=unknown
13006 fi
13007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13008 fi
13009 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13010 fi
13011 echo "$as_me:13011: result: $cf_cv_mbstate_t" >&5
13012 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13013
13014 if test "$cf_cv_mbstate_t" = yes ; then
13015
13016 cat >>confdefs.h <<\EOF
13017 #define NEED_WCHAR_H 1
13018 EOF
13019
13020         NEED_WCHAR_H=1
13021 fi
13022
13023 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13024 if test "$cf_cv_mbstate_t" = unknown ; then
13025         NCURSES_MBSTATE_T=1
13026 fi
13027
13028 # This is needed on Tru64 5.0 to declare wchar_t
13029 echo "$as_me:13029: checking if we must include wchar.h to declare wchar_t" >&5
13030 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13031 if test "${cf_cv_wchar_t+set}" = set; then
13032   echo $ECHO_N "(cached) $ECHO_C" >&6
13033 else
13034
13035 cat >"conftest.$ac_ext" <<_ACEOF
13036 #line 13036 "configure"
13037 #include "confdefs.h"
13038
13039 #include <stdlib.h>
13040 #include <stdarg.h>
13041 #include <stdio.h>
13042 #ifdef HAVE_LIBUTF8_H
13043 #include <libutf8.h>
13044 #endif
13045 int
13046 main (void)
13047 {
13048 wchar_t state
13049   ;
13050   return 0;
13051 }
13052 _ACEOF
13053 rm -f "conftest.$ac_objext"
13054 if { (eval echo "$as_me:13054: \"$ac_compile\"") >&5
13055   (eval $ac_compile) 2>&5
13056   ac_status=$?
13057   echo "$as_me:13057: \$? = $ac_status" >&5
13058   (exit "$ac_status"); } &&
13059          { ac_try='test -s "conftest.$ac_objext"'
13060   { (eval echo "$as_me:13060: \"$ac_try\"") >&5
13061   (eval $ac_try) 2>&5
13062   ac_status=$?
13063   echo "$as_me:13063: \$? = $ac_status" >&5
13064   (exit "$ac_status"); }; }; then
13065   cf_cv_wchar_t=no
13066 else
13067   echo "$as_me: failed program was:" >&5
13068 cat "conftest.$ac_ext" >&5
13069 cat >"conftest.$ac_ext" <<_ACEOF
13070 #line 13070 "configure"
13071 #include "confdefs.h"
13072
13073 #include <stdlib.h>
13074 #include <stdarg.h>
13075 #include <stdio.h>
13076 #include <wchar.h>
13077 #ifdef HAVE_LIBUTF8_H
13078 #include <libutf8.h>
13079 #endif
13080 int
13081 main (void)
13082 {
13083 wchar_t value
13084   ;
13085   return 0;
13086 }
13087 _ACEOF
13088 rm -f "conftest.$ac_objext"
13089 if { (eval echo "$as_me:13089: \"$ac_compile\"") >&5
13090   (eval $ac_compile) 2>&5
13091   ac_status=$?
13092   echo "$as_me:13092: \$? = $ac_status" >&5
13093   (exit "$ac_status"); } &&
13094          { ac_try='test -s "conftest.$ac_objext"'
13095   { (eval echo "$as_me:13095: \"$ac_try\"") >&5
13096   (eval $ac_try) 2>&5
13097   ac_status=$?
13098   echo "$as_me:13098: \$? = $ac_status" >&5
13099   (exit "$ac_status"); }; }; then
13100   cf_cv_wchar_t=yes
13101 else
13102   echo "$as_me: failed program was:" >&5
13103 cat "conftest.$ac_ext" >&5
13104 cf_cv_wchar_t=unknown
13105 fi
13106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13107 fi
13108 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13109 fi
13110 echo "$as_me:13110: result: $cf_cv_wchar_t" >&5
13111 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13112
13113 if test "$cf_cv_wchar_t" = yes ; then
13114
13115 cat >>confdefs.h <<\EOF
13116 #define NEED_WCHAR_H 1
13117 EOF
13118
13119         NEED_WCHAR_H=1
13120 fi
13121
13122 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13123 if test "$cf_cv_wchar_t" = unknown ; then
13124         NCURSES_WCHAR_T=1
13125 fi
13126
13127 # if we find wchar_t in either place, use substitution to provide a fallback.
13128 if test "$cf_cv_wchar_t" != unknown ; then
13129         NCURSES_OK_WCHAR_T=1
13130 fi
13131
13132 # This is needed on Tru64 5.0 to declare wint_t
13133 echo "$as_me:13133: checking if we must include wchar.h to declare wint_t" >&5
13134 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13135 if test "${cf_cv_wint_t+set}" = set; then
13136   echo $ECHO_N "(cached) $ECHO_C" >&6
13137 else
13138
13139 cat >"conftest.$ac_ext" <<_ACEOF
13140 #line 13140 "configure"
13141 #include "confdefs.h"
13142
13143 #include <stdlib.h>
13144 #include <stdarg.h>
13145 #include <stdio.h>
13146 #ifdef HAVE_LIBUTF8_H
13147 #include <libutf8.h>
13148 #endif
13149 int
13150 main (void)
13151 {
13152 wint_t state
13153   ;
13154   return 0;
13155 }
13156 _ACEOF
13157 rm -f "conftest.$ac_objext"
13158 if { (eval echo "$as_me:13158: \"$ac_compile\"") >&5
13159   (eval $ac_compile) 2>&5
13160   ac_status=$?
13161   echo "$as_me:13161: \$? = $ac_status" >&5
13162   (exit "$ac_status"); } &&
13163          { ac_try='test -s "conftest.$ac_objext"'
13164   { (eval echo "$as_me:13164: \"$ac_try\"") >&5
13165   (eval $ac_try) 2>&5
13166   ac_status=$?
13167   echo "$as_me:13167: \$? = $ac_status" >&5
13168   (exit "$ac_status"); }; }; then
13169   cf_cv_wint_t=no
13170 else
13171   echo "$as_me: failed program was:" >&5
13172 cat "conftest.$ac_ext" >&5
13173 cat >"conftest.$ac_ext" <<_ACEOF
13174 #line 13174 "configure"
13175 #include "confdefs.h"
13176
13177 #include <stdlib.h>
13178 #include <stdarg.h>
13179 #include <stdio.h>
13180 #include <wchar.h>
13181 #ifdef HAVE_LIBUTF8_H
13182 #include <libutf8.h>
13183 #endif
13184 int
13185 main (void)
13186 {
13187 wint_t value
13188   ;
13189   return 0;
13190 }
13191 _ACEOF
13192 rm -f "conftest.$ac_objext"
13193 if { (eval echo "$as_me:13193: \"$ac_compile\"") >&5
13194   (eval $ac_compile) 2>&5
13195   ac_status=$?
13196   echo "$as_me:13196: \$? = $ac_status" >&5
13197   (exit "$ac_status"); } &&
13198          { ac_try='test -s "conftest.$ac_objext"'
13199   { (eval echo "$as_me:13199: \"$ac_try\"") >&5
13200   (eval $ac_try) 2>&5
13201   ac_status=$?
13202   echo "$as_me:13202: \$? = $ac_status" >&5
13203   (exit "$ac_status"); }; }; then
13204   cf_cv_wint_t=yes
13205 else
13206   echo "$as_me: failed program was:" >&5
13207 cat "conftest.$ac_ext" >&5
13208 cf_cv_wint_t=unknown
13209 fi
13210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13211 fi
13212 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13213 fi
13214 echo "$as_me:13214: result: $cf_cv_wint_t" >&5
13215 echo "${ECHO_T}$cf_cv_wint_t" >&6
13216
13217 if test "$cf_cv_wint_t" = yes ; then
13218
13219 cat >>confdefs.h <<\EOF
13220 #define NEED_WCHAR_H 1
13221 EOF
13222
13223         NEED_WCHAR_H=1
13224 fi
13225
13226 # if we do not find wint_t in either place, use substitution to provide a fallback.
13227 if test "$cf_cv_wint_t" = unknown ; then
13228         NCURSES_WINT_T=1
13229 fi
13230
13231 # if we find wint_t in either place, use substitution to provide a fallback.
13232 if test "$cf_cv_wint_t" != unknown ; then
13233         NCURSES_OK_WINT_T=1
13234 fi
13235
13236         if test "$NCURSES_MBSTATE_T" != 0; then
13237
13238 cat >>confdefs.h <<\EOF
13239 #define NEED_MBSTATE_T_DEF 1
13240 EOF
13241
13242         fi
13243 fi
13244
13245 ###   use option --disable-lp64 to allow long chtype
13246 echo "$as_me:13246: checking whether to enable _LP64 definition in curses.h" >&5
13247 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13248
13249 # Check whether --enable-lp64 or --disable-lp64 was given.
13250 if test "${enable_lp64+set}" = set; then
13251   enableval="$enable_lp64"
13252   with_lp64=$enableval
13253 else
13254   with_lp64=$cf_dft_with_lp64
13255 fi;
13256 echo "$as_me:13256: result: $with_lp64" >&5
13257 echo "${ECHO_T}$with_lp64" >&6
13258
13259 if test "x$with_lp64" = xyes ; then
13260         cf_cv_enable_lp64=1
13261 else
13262         cf_cv_enable_lp64=0
13263 fi
13264
13265 # Check whether --enable-largefile or --disable-largefile was given.
13266 if test "${enable_largefile+set}" = set; then
13267   enableval="$enable_largefile"
13268
13269 fi;
13270 if test "$enable_largefile" != no; then
13271
13272   echo "$as_me:13272: checking for special C compiler options needed for large files" >&5
13273 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13274 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13275   echo $ECHO_N "(cached) $ECHO_C" >&6
13276 else
13277   ac_cv_sys_largefile_CC=no
13278      if test "$GCC" != yes; then
13279        ac_save_CC=$CC
13280        while :; do
13281          # IRIX 6.2 and later do not support large files by default,
13282          # so use the C compiler's -n32 option if that helps.
13283          cat >"conftest.$ac_ext" <<_ACEOF
13284 #line 13284 "configure"
13285 #include "confdefs.h"
13286 #include <sys/types.h>
13287  /* Check that off_t can represent 2**63 - 1 correctly.
13288     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13289     since some C++ compilers masquerading as C compilers
13290     incorrectly reject 9223372036854775807.  */
13291 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13292   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13293                        && LARGE_OFF_T % 2147483647 == 1)
13294                       ? 1 : -1];
13295 int
13296 main (void)
13297 {
13298
13299   ;
13300   return 0;
13301 }
13302 _ACEOF
13303          rm -f "conftest.$ac_objext"
13304 if { (eval echo "$as_me:13304: \"$ac_compile\"") >&5
13305   (eval $ac_compile) 2>&5
13306   ac_status=$?
13307   echo "$as_me:13307: \$? = $ac_status" >&5
13308   (exit "$ac_status"); } &&
13309          { ac_try='test -s "conftest.$ac_objext"'
13310   { (eval echo "$as_me:13310: \"$ac_try\"") >&5
13311   (eval $ac_try) 2>&5
13312   ac_status=$?
13313   echo "$as_me:13313: \$? = $ac_status" >&5
13314   (exit "$ac_status"); }; }; then
13315   break
13316 else
13317   echo "$as_me: failed program was:" >&5
13318 cat "conftest.$ac_ext" >&5
13319 fi
13320 rm -f "conftest.$ac_objext"
13321          CC="$CC -n32"
13322          rm -f "conftest.$ac_objext"
13323 if { (eval echo "$as_me:13323: \"$ac_compile\"") >&5
13324   (eval $ac_compile) 2>&5
13325   ac_status=$?
13326   echo "$as_me:13326: \$? = $ac_status" >&5
13327   (exit "$ac_status"); } &&
13328          { ac_try='test -s "conftest.$ac_objext"'
13329   { (eval echo "$as_me:13329: \"$ac_try\"") >&5
13330   (eval $ac_try) 2>&5
13331   ac_status=$?
13332   echo "$as_me:13332: \$? = $ac_status" >&5
13333   (exit "$ac_status"); }; }; then
13334   ac_cv_sys_largefile_CC=' -n32'; break
13335 else
13336   echo "$as_me: failed program was:" >&5
13337 cat "conftest.$ac_ext" >&5
13338 fi
13339 rm -f "conftest.$ac_objext"
13340          break
13341        done
13342        CC=$ac_save_CC
13343        rm -f "conftest.$ac_ext"
13344     fi
13345 fi
13346 echo "$as_me:13346: result: $ac_cv_sys_largefile_CC" >&5
13347 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13348   if test "$ac_cv_sys_largefile_CC" != no; then
13349     CC=$CC$ac_cv_sys_largefile_CC
13350   fi
13351
13352   echo "$as_me:13352: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13353 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13354 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13355   echo $ECHO_N "(cached) $ECHO_C" >&6
13356 else
13357   while :; do
13358   ac_cv_sys_file_offset_bits=no
13359   cat >"conftest.$ac_ext" <<_ACEOF
13360 #line 13360 "configure"
13361 #include "confdefs.h"
13362 #include <sys/types.h>
13363  /* Check that off_t can represent 2**63 - 1 correctly.
13364     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13365     since some C++ compilers masquerading as C compilers
13366     incorrectly reject 9223372036854775807.  */
13367 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13368   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13369                        && LARGE_OFF_T % 2147483647 == 1)
13370                       ? 1 : -1];
13371 int
13372 main (void)
13373 {
13374
13375   ;
13376   return 0;
13377 }
13378 _ACEOF
13379 rm -f "conftest.$ac_objext"
13380 if { (eval echo "$as_me:13380: \"$ac_compile\"") >&5
13381   (eval $ac_compile) 2>&5
13382   ac_status=$?
13383   echo "$as_me:13383: \$? = $ac_status" >&5
13384   (exit "$ac_status"); } &&
13385          { ac_try='test -s "conftest.$ac_objext"'
13386   { (eval echo "$as_me:13386: \"$ac_try\"") >&5
13387   (eval $ac_try) 2>&5
13388   ac_status=$?
13389   echo "$as_me:13389: \$? = $ac_status" >&5
13390   (exit "$ac_status"); }; }; then
13391   break
13392 else
13393   echo "$as_me: failed program was:" >&5
13394 cat "conftest.$ac_ext" >&5
13395 fi
13396 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13397   cat >"conftest.$ac_ext" <<_ACEOF
13398 #line 13398 "configure"
13399 #include "confdefs.h"
13400 #define _FILE_OFFSET_BITS 64
13401 #include <sys/types.h>
13402  /* Check that off_t can represent 2**63 - 1 correctly.
13403     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13404     since some C++ compilers masquerading as C compilers
13405     incorrectly reject 9223372036854775807.  */
13406 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13407   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13408                        && LARGE_OFF_T % 2147483647 == 1)
13409                       ? 1 : -1];
13410 int
13411 main (void)
13412 {
13413
13414   ;
13415   return 0;
13416 }
13417 _ACEOF
13418 rm -f "conftest.$ac_objext"
13419 if { (eval echo "$as_me:13419: \"$ac_compile\"") >&5
13420   (eval $ac_compile) 2>&5
13421   ac_status=$?
13422   echo "$as_me:13422: \$? = $ac_status" >&5
13423   (exit "$ac_status"); } &&
13424          { ac_try='test -s "conftest.$ac_objext"'
13425   { (eval echo "$as_me:13425: \"$ac_try\"") >&5
13426   (eval $ac_try) 2>&5
13427   ac_status=$?
13428   echo "$as_me:13428: \$? = $ac_status" >&5
13429   (exit "$ac_status"); }; }; then
13430   ac_cv_sys_file_offset_bits=64; break
13431 else
13432   echo "$as_me: failed program was:" >&5
13433 cat "conftest.$ac_ext" >&5
13434 fi
13435 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13436   break
13437 done
13438 fi
13439 echo "$as_me:13439: result: $ac_cv_sys_file_offset_bits" >&5
13440 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13441 if test "$ac_cv_sys_file_offset_bits" != no; then
13442
13443 cat >>confdefs.h <<EOF
13444 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13445 EOF
13446
13447 fi
13448 rm -rf conftest*
13449   echo "$as_me:13449: checking for _LARGE_FILES value needed for large files" >&5
13450 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13451 if test "${ac_cv_sys_large_files+set}" = set; then
13452   echo $ECHO_N "(cached) $ECHO_C" >&6
13453 else
13454   while :; do
13455   ac_cv_sys_large_files=no
13456   cat >"conftest.$ac_ext" <<_ACEOF
13457 #line 13457 "configure"
13458 #include "confdefs.h"
13459 #include <sys/types.h>
13460  /* Check that off_t can represent 2**63 - 1 correctly.
13461     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13462     since some C++ compilers masquerading as C compilers
13463     incorrectly reject 9223372036854775807.  */
13464 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13465   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13466                        && LARGE_OFF_T % 2147483647 == 1)
13467                       ? 1 : -1];
13468 int
13469 main (void)
13470 {
13471
13472   ;
13473   return 0;
13474 }
13475 _ACEOF
13476 rm -f "conftest.$ac_objext"
13477 if { (eval echo "$as_me:13477: \"$ac_compile\"") >&5
13478   (eval $ac_compile) 2>&5
13479   ac_status=$?
13480   echo "$as_me:13480: \$? = $ac_status" >&5
13481   (exit "$ac_status"); } &&
13482          { ac_try='test -s "conftest.$ac_objext"'
13483   { (eval echo "$as_me:13483: \"$ac_try\"") >&5
13484   (eval $ac_try) 2>&5
13485   ac_status=$?
13486   echo "$as_me:13486: \$? = $ac_status" >&5
13487   (exit "$ac_status"); }; }; then
13488   break
13489 else
13490   echo "$as_me: failed program was:" >&5
13491 cat "conftest.$ac_ext" >&5
13492 fi
13493 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13494   cat >"conftest.$ac_ext" <<_ACEOF
13495 #line 13495 "configure"
13496 #include "confdefs.h"
13497 #define _LARGE_FILES 1
13498 #include <sys/types.h>
13499  /* Check that off_t can represent 2**63 - 1 correctly.
13500     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13501     since some C++ compilers masquerading as C compilers
13502     incorrectly reject 9223372036854775807.  */
13503 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13504   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13505                        && LARGE_OFF_T % 2147483647 == 1)
13506                       ? 1 : -1];
13507 int
13508 main (void)
13509 {
13510
13511   ;
13512   return 0;
13513 }
13514 _ACEOF
13515 rm -f "conftest.$ac_objext"
13516 if { (eval echo "$as_me:13516: \"$ac_compile\"") >&5
13517   (eval $ac_compile) 2>&5
13518   ac_status=$?
13519   echo "$as_me:13519: \$? = $ac_status" >&5
13520   (exit "$ac_status"); } &&
13521          { ac_try='test -s "conftest.$ac_objext"'
13522   { (eval echo "$as_me:13522: \"$ac_try\"") >&5
13523   (eval $ac_try) 2>&5
13524   ac_status=$?
13525   echo "$as_me:13525: \$? = $ac_status" >&5
13526   (exit "$ac_status"); }; }; then
13527   ac_cv_sys_large_files=1; break
13528 else
13529   echo "$as_me: failed program was:" >&5
13530 cat "conftest.$ac_ext" >&5
13531 fi
13532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13533   break
13534 done
13535 fi
13536 echo "$as_me:13536: result: $ac_cv_sys_large_files" >&5
13537 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13538 if test "$ac_cv_sys_large_files" != no; then
13539
13540 cat >>confdefs.h <<EOF
13541 #define _LARGE_FILES $ac_cv_sys_large_files
13542 EOF
13543
13544 fi
13545 rm -rf conftest*
13546 fi
13547
13548         if test "$enable_largefile" != no ; then
13549         echo "$as_me:13549: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13550 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13551 if test "${ac_cv_sys_largefile_source+set}" = set; then
13552   echo $ECHO_N "(cached) $ECHO_C" >&6
13553 else
13554   while :; do
13555   ac_cv_sys_largefile_source=no
13556   cat >"conftest.$ac_ext" <<_ACEOF
13557 #line 13557 "configure"
13558 #include "confdefs.h"
13559 #include <stdio.h>
13560 int
13561 main (void)
13562 {
13563 return !fseeko;
13564   ;
13565   return 0;
13566 }
13567 _ACEOF
13568 rm -f "conftest.$ac_objext"
13569 if { (eval echo "$as_me:13569: \"$ac_compile\"") >&5
13570   (eval $ac_compile) 2>&5
13571   ac_status=$?
13572   echo "$as_me:13572: \$? = $ac_status" >&5
13573   (exit "$ac_status"); } &&
13574          { ac_try='test -s "conftest.$ac_objext"'
13575   { (eval echo "$as_me:13575: \"$ac_try\"") >&5
13576   (eval $ac_try) 2>&5
13577   ac_status=$?
13578   echo "$as_me:13578: \$? = $ac_status" >&5
13579   (exit "$ac_status"); }; }; then
13580   break
13581 else
13582   echo "$as_me: failed program was:" >&5
13583 cat "conftest.$ac_ext" >&5
13584 fi
13585 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13586   cat >"conftest.$ac_ext" <<_ACEOF
13587 #line 13587 "configure"
13588 #include "confdefs.h"
13589 #define _LARGEFILE_SOURCE 1
13590 #include <stdio.h>
13591 int
13592 main (void)
13593 {
13594 return !fseeko;
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_cv_sys_largefile_source=1; break
13612 else
13613   echo "$as_me: failed program was:" >&5
13614 cat "conftest.$ac_ext" >&5
13615 fi
13616 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13617   break
13618 done
13619 fi
13620 echo "$as_me:13620: result: $ac_cv_sys_largefile_source" >&5
13621 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13622 if test "$ac_cv_sys_largefile_source" != no; then
13623
13624 cat >>confdefs.h <<EOF
13625 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13626 EOF
13627
13628 fi
13629 rm -rf conftest*
13630
13631 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13632 # in glibc 2.1.3, but that breaks too many other things.
13633 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13634 echo "$as_me:13634: checking for fseeko" >&5
13635 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13636 if test "${ac_cv_func_fseeko+set}" = set; then
13637   echo $ECHO_N "(cached) $ECHO_C" >&6
13638 else
13639   cat >"conftest.$ac_ext" <<_ACEOF
13640 #line 13640 "configure"
13641 #include "confdefs.h"
13642 #include <stdio.h>
13643 int
13644 main (void)
13645 {
13646 return fseeko && fseeko (stdin, 0, 0);
13647   ;
13648   return 0;
13649 }
13650 _ACEOF
13651 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13652 if { (eval echo "$as_me:13652: \"$ac_link\"") >&5
13653   (eval $ac_link) 2>&5
13654   ac_status=$?
13655   echo "$as_me:13655: \$? = $ac_status" >&5
13656   (exit "$ac_status"); } &&
13657          { ac_try='test -s "conftest$ac_exeext"'
13658   { (eval echo "$as_me:13658: \"$ac_try\"") >&5
13659   (eval $ac_try) 2>&5
13660   ac_status=$?
13661   echo "$as_me:13661: \$? = $ac_status" >&5
13662   (exit "$ac_status"); }; }; then
13663   ac_cv_func_fseeko=yes
13664 else
13665   echo "$as_me: failed program was:" >&5
13666 cat "conftest.$ac_ext" >&5
13667 ac_cv_func_fseeko=no
13668 fi
13669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13670 fi
13671 echo "$as_me:13671: result: $ac_cv_func_fseeko" >&5
13672 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13673 if test $ac_cv_func_fseeko = yes; then
13674
13675 cat >>confdefs.h <<\EOF
13676 #define HAVE_FSEEKO 1
13677 EOF
13678
13679 fi
13680
13681         # Normally we would collect these definitions in the config.h,
13682         # but (like _XOPEN_SOURCE), some environments rely on having these
13683         # defined before any of the system headers are included.  Another
13684         # case comes up with C++, e.g., on AIX the compiler compiles the
13685         # header files by themselves before looking at the body files it is
13686         # told to compile.  For ncurses, those header files do not include
13687         # the config.h
13688         if test "$ac_cv_sys_large_files" != no
13689         then
13690
13691         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13692         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13693
13694         fi
13695         if test "$ac_cv_sys_largefile_source" != no
13696         then
13697
13698         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13699         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13700
13701         fi
13702         if test "$ac_cv_sys_file_offset_bits" != no
13703         then
13704
13705         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13706         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13707
13708         fi
13709
13710         echo "$as_me:13710: checking whether to use struct dirent64" >&5
13711 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13712 if test "${cf_cv_struct_dirent64+set}" = set; then
13713   echo $ECHO_N "(cached) $ECHO_C" >&6
13714 else
13715
13716                 cat >"conftest.$ac_ext" <<_ACEOF
13717 #line 13717 "configure"
13718 #include "confdefs.h"
13719
13720 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13721 #include <sys/types.h>
13722 #include <dirent.h>
13723
13724 int
13725 main (void)
13726 {
13727
13728                 /* if transitional largefile support is setup, this is true */
13729                 extern struct dirent64 * readdir(DIR *);
13730                 struct dirent64 *x = readdir((DIR *)0);
13731                 struct dirent *y = readdir((DIR *)0);
13732                 int z = x - y;
13733                 (void)z;
13734
13735   ;
13736   return 0;
13737 }
13738 _ACEOF
13739 rm -f "conftest.$ac_objext"
13740 if { (eval echo "$as_me:13740: \"$ac_compile\"") >&5
13741   (eval $ac_compile) 2>&5
13742   ac_status=$?
13743   echo "$as_me:13743: \$? = $ac_status" >&5
13744   (exit "$ac_status"); } &&
13745          { ac_try='test -s "conftest.$ac_objext"'
13746   { (eval echo "$as_me:13746: \"$ac_try\"") >&5
13747   (eval $ac_try) 2>&5
13748   ac_status=$?
13749   echo "$as_me:13749: \$? = $ac_status" >&5
13750   (exit "$ac_status"); }; }; then
13751   cf_cv_struct_dirent64=yes
13752 else
13753   echo "$as_me: failed program was:" >&5
13754 cat "conftest.$ac_ext" >&5
13755 cf_cv_struct_dirent64=no
13756 fi
13757 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13758
13759 fi
13760 echo "$as_me:13760: result: $cf_cv_struct_dirent64" >&5
13761 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13762         test "$cf_cv_struct_dirent64" = yes &&
13763 cat >>confdefs.h <<\EOF
13764 #define HAVE_STRUCT_DIRENT64 1
13765 EOF
13766
13767         fi
13768
13769 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13770 echo "$as_me:13770: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13771 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13772
13773 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13774 if test "${enable_tparm_varargs+set}" = set; then
13775   enableval="$enable_tparm_varargs"
13776   with_tparm_varargs=$enableval
13777 else
13778   with_tparm_varargs=yes
13779 fi;
13780 echo "$as_me:13780: result: $with_tparm_varargs" >&5
13781 echo "${ECHO_T}$with_tparm_varargs" >&6
13782 NCURSES_TPARM_VARARGS=0
13783 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13784
13785 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13786 if test "$with_ticlib" != no ; then
13787 echo "$as_me:13787: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13788 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13789
13790 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13791 if test "${enable_tic_depends+set}" = set; then
13792   enableval="$enable_tic_depends"
13793   with_tic_depends=$enableval
13794 else
13795   with_tic_depends=yes
13796 fi;
13797 echo "$as_me:13797: result: $with_tic_depends" >&5
13798 echo "${ECHO_T}$with_tic_depends" >&6
13799 else
13800         with_tic_depends=no
13801 fi
13802
13803 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13804 echo "$as_me:13804: checking if you want to enable wattr* macros" >&5
13805 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13806
13807 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13808 if test "${enable_wattr_macros+set}" = set; then
13809   enableval="$enable_wattr_macros"
13810   with_wattr_macros=$enableval
13811 else
13812   with_wattr_macros=no
13813 fi;
13814 if [ "x$with_wattr_macros" != xyes ]; then
13815         NCURSES_WATTR_MACROS=0
13816         echo "$as_me:13816: result: no" >&5
13817 echo "${ECHO_T}no" >&6
13818 else
13819         NCURSES_WATTR_MACROS=1
13820         echo "$as_me:13820: result: yes" >&5
13821 echo "${ECHO_T}yes" >&6
13822 fi
13823
13824 echo "$as_me:13824: checking for X11 rgb file" >&5
13825 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13826
13827 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13828 if test "${with_x11_rgb+set}" = set; then
13829   withval="$with_x11_rgb"
13830   RGB_PATH=$withval
13831 else
13832   RGB_PATH=auto
13833 fi;
13834
13835 if test "x$RGB_PATH" = xauto
13836 then
13837         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13838         for cf_path in \
13839                 /opt/local/share/X11/rgb.txt \
13840                 /opt/X11/share/X11/rgb.txt \
13841                 /usr/share/X11/rgb.txt \
13842                 /usr/X11/share/X11/rgb.txt \
13843                 /usr/X11/lib/X11/rgb.txt \
13844                 /usr/lib/X11/rgb.txt \
13845                 /etc/X11/rgb.txt \
13846                 /usr/pkg/lib/X11/rgb.txt \
13847                 /usr/X11R7/lib/X11/rgb.txt \
13848                 /usr/X11R6/lib/X11/rgb.txt \
13849                 /usr/X11R5/lib/X11/rgb.txt \
13850                 /usr/X11R4/lib/X11/rgb.txt \
13851                 /usr/local/lib/X11/rgb.txt \
13852                 /usr/local/share/X11/rgb.txt \
13853                 /usr/lib64/X11/rgb.txt
13854         do
13855                 if test -f "$cf_path" ; then
13856                         RGB_PATH="$cf_path"
13857                         break
13858                 fi
13859         done
13860 else
13861         cf_path=$RGB_PATH
13862
13863 if test "x$prefix" != xNONE; then
13864         cf_path_syntax="$prefix"
13865 else
13866         cf_path_syntax="$ac_default_prefix"
13867 fi
13868
13869 case ".$cf_path" in
13870 (.\$\(*\)*|.\'*\'*)
13871         ;;
13872 (..|./*|.\\*)
13873         ;;
13874 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13875         ;;
13876 (.\$\{*prefix\}*|.\$\{*dir\}*)
13877         eval cf_path="$cf_path"
13878         case ".$cf_path" in
13879         (.NONE/*)
13880                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13881                 ;;
13882         esac
13883         ;;
13884 (.no|.NONE/*)
13885         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13886         ;;
13887 (*)
13888         { { echo "$as_me:13888: error: expected a pathname, not \"$cf_path\"" >&5
13889 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13890    { (exit 1); exit 1; }; }
13891         ;;
13892 esac
13893
13894 fi
13895
13896 echo "$as_me:13896: result: $RGB_PATH" >&5
13897 echo "${ECHO_T}$RGB_PATH" >&6
13898
13899 cat >>confdefs.h <<EOF
13900 #define RGB_PATH "$cf_path"
13901 EOF
13902
13903 no_x11_rgb=
13904 if test "$RGB_PATH" = no
13905 then
13906         no_x11_rgb="#"
13907 fi
13908
13909 ###   use option --with-bool to override bool's type
13910 echo "$as_me:13910: checking for type of bool" >&5
13911 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13912
13913 # Check whether --with-bool or --without-bool was given.
13914 if test "${with_bool+set}" = set; then
13915   withval="$with_bool"
13916   NCURSES_BOOL="$withval"
13917 else
13918   NCURSES_BOOL=auto
13919 fi;
13920 echo "$as_me:13920: result: $NCURSES_BOOL" >&5
13921 echo "${ECHO_T}$NCURSES_BOOL" >&6
13922
13923 echo "$as_me:13923: checking for alternate terminal capabilities file" >&5
13924 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13925
13926 # Check whether --with-caps or --without-caps was given.
13927 if test "${with_caps+set}" = set; then
13928   withval="$with_caps"
13929   TERMINFO_CAPS=Caps.$withval
13930 else
13931   TERMINFO_CAPS=Caps
13932 fi;
13933 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13934 echo "$as_me:13934: result: $TERMINFO_CAPS" >&5
13935 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13936
13937 ###   use option --with-chtype to override chtype's type
13938 echo "$as_me:13938: checking for type of chtype" >&5
13939 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13940
13941 # Check whether --with-chtype or --without-chtype was given.
13942 if test "${with_chtype+set}" = set; then
13943   withval="$with_chtype"
13944   NCURSES_CHTYPE="$withval"
13945 else
13946   NCURSES_CHTYPE=$cf_dft_chtype
13947 fi;
13948 echo "$as_me:13948: result: $NCURSES_CHTYPE" >&5
13949 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13950
13951 ###   use option --with-ospeed to override ospeed's type
13952 echo "$as_me:13952: checking for type of ospeed" >&5
13953 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13954
13955 # Check whether --with-ospeed or --without-ospeed was given.
13956 if test "${with_ospeed+set}" = set; then
13957   withval="$with_ospeed"
13958   NCURSES_OSPEED="$withval"
13959 else
13960   NCURSES_OSPEED=short
13961 fi;
13962 echo "$as_me:13962: result: $NCURSES_OSPEED" >&5
13963 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13964
13965 ###   use option --with-mmask-t to override mmask_t's type
13966 echo "$as_me:13966: checking for type of mmask_t" >&5
13967 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13968
13969 # Check whether --with-mmask-t or --without-mmask-t was given.
13970 if test "${with_mmask_t+set}" = set; then
13971   withval="$with_mmask_t"
13972   NCURSES_MMASK_T="$withval"
13973 else
13974   NCURSES_MMASK_T=$cf_dft_mmask_t
13975 fi;
13976 echo "$as_me:13976: result: $NCURSES_MMASK_T" >&5
13977 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13978
13979 ###   use option --with-ccharw-max to override CCHARW_MAX size
13980 echo "$as_me:13980: checking for size CCHARW_MAX" >&5
13981 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13982
13983 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13984 if test "${with_ccharw_max+set}" = set; then
13985   withval="$with_ccharw_max"
13986   NCURSES_CCHARW_MAX="$withval"
13987 else
13988   NCURSES_CCHARW_MAX=5
13989 fi;
13990 echo "$as_me:13990: result: $NCURSES_CCHARW_MAX" >&5
13991 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13992
13993 echo "$as_me:13993: checking for ANSI C header files" >&5
13994 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13995 if test "${ac_cv_header_stdc+set}" = set; then
13996   echo $ECHO_N "(cached) $ECHO_C" >&6
13997 else
13998   cat >"conftest.$ac_ext" <<_ACEOF
13999 #line 13999 "configure"
14000 #include "confdefs.h"
14001 #include <stdlib.h>
14002 #include <stdarg.h>
14003 #include <string.h>
14004 #include <float.h>
14005
14006 _ACEOF
14007 if { (eval echo "$as_me:14007: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14008   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14009   ac_status=$?
14010   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14011   rm -f conftest.er1
14012   cat conftest.err >&5
14013   echo "$as_me:14013: \$? = $ac_status" >&5
14014   (exit "$ac_status"); } >/dev/null; then
14015   if test -s conftest.err; then
14016     ac_cpp_err=$ac_c_preproc_warn_flag
14017   else
14018     ac_cpp_err=
14019   fi
14020 else
14021   ac_cpp_err=yes
14022 fi
14023 if test -z "$ac_cpp_err"; then
14024   ac_cv_header_stdc=yes
14025 else
14026   echo "$as_me: failed program was:" >&5
14027   cat "conftest.$ac_ext" >&5
14028   ac_cv_header_stdc=no
14029 fi
14030 rm -f conftest.err "conftest.$ac_ext"
14031
14032 if test $ac_cv_header_stdc = yes; then
14033   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14034   cat >"conftest.$ac_ext" <<_ACEOF
14035 #line 14035 "configure"
14036 #include "confdefs.h"
14037 #include <string.h>
14038
14039 _ACEOF
14040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14041   $EGREP "memchr" >/dev/null 2>&1; then
14042   :
14043 else
14044   ac_cv_header_stdc=no
14045 fi
14046 rm -rf conftest*
14047
14048 fi
14049
14050 if test $ac_cv_header_stdc = yes; then
14051   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14052   cat >"conftest.$ac_ext" <<_ACEOF
14053 #line 14053 "configure"
14054 #include "confdefs.h"
14055 #include <stdlib.h>
14056
14057 _ACEOF
14058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14059   $EGREP "free" >/dev/null 2>&1; then
14060   :
14061 else
14062   ac_cv_header_stdc=no
14063 fi
14064 rm -rf conftest*
14065
14066 fi
14067
14068 if test $ac_cv_header_stdc = yes; then
14069   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14070   if test "$cross_compiling" = yes; then
14071   :
14072 else
14073   cat >"conftest.$ac_ext" <<_ACEOF
14074 #line 14074 "configure"
14075 #include "confdefs.h"
14076 #include <ctype.h>
14077 #if ((' ' & 0x0FF) == 0x020)
14078 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14079 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14080 #else
14081 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14082                      || ('j' <= (c) && (c) <= 'r') \
14083                      || ('s' <= (c) && (c) <= 'z'))
14084 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14085 #endif
14086
14087 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14088 int
14089 main (void)
14090 {
14091   int i;
14092   for (i = 0; i < 256; i++)
14093     if (XOR (islower (i), ISLOWER (i))
14094         || toupper (i) != TOUPPER (i))
14095       $ac_main_return(2);
14096   $ac_main_return (0);
14097 }
14098 _ACEOF
14099 rm -f "conftest$ac_exeext"
14100 if { (eval echo "$as_me:14100: \"$ac_link\"") >&5
14101   (eval $ac_link) 2>&5
14102   ac_status=$?
14103   echo "$as_me:14103: \$? = $ac_status" >&5
14104   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14105   { (eval echo "$as_me:14105: \"$ac_try\"") >&5
14106   (eval $ac_try) 2>&5
14107   ac_status=$?
14108   echo "$as_me:14108: \$? = $ac_status" >&5
14109   (exit "$ac_status"); }; }; then
14110   :
14111 else
14112   echo "$as_me: program exited with status $ac_status" >&5
14113 echo "$as_me: failed program was:" >&5
14114 cat "conftest.$ac_ext" >&5
14115 ac_cv_header_stdc=no
14116 fi
14117 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14118 fi
14119 fi
14120 fi
14121 echo "$as_me:14121: result: $ac_cv_header_stdc" >&5
14122 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14123 if test $ac_cv_header_stdc = yes; then
14124
14125 cat >>confdefs.h <<\EOF
14126 #define STDC_HEADERS 1
14127 EOF
14128
14129 fi
14130
14131 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14132
14133 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14134                   inttypes.h stdint.h unistd.h
14135 do
14136 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14137 echo "$as_me:14137: checking for $ac_header" >&5
14138 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14139 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14140   echo $ECHO_N "(cached) $ECHO_C" >&6
14141 else
14142   cat >"conftest.$ac_ext" <<_ACEOF
14143 #line 14143 "configure"
14144 #include "confdefs.h"
14145 $ac_includes_default
14146 #include <$ac_header>
14147 _ACEOF
14148 rm -f "conftest.$ac_objext"
14149 if { (eval echo "$as_me:14149: \"$ac_compile\"") >&5
14150   (eval $ac_compile) 2>&5
14151   ac_status=$?
14152   echo "$as_me:14152: \$? = $ac_status" >&5
14153   (exit "$ac_status"); } &&
14154          { ac_try='test -s "conftest.$ac_objext"'
14155   { (eval echo "$as_me:14155: \"$ac_try\"") >&5
14156   (eval $ac_try) 2>&5
14157   ac_status=$?
14158   echo "$as_me:14158: \$? = $ac_status" >&5
14159   (exit "$ac_status"); }; }; then
14160   eval "$as_ac_Header=yes"
14161 else
14162   echo "$as_me: failed program was:" >&5
14163 cat "conftest.$ac_ext" >&5
14164 eval "$as_ac_Header=no"
14165 fi
14166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14167 fi
14168 echo "$as_me:14168: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14169 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14170 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14171   cat >>confdefs.h <<EOF
14172 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14173 EOF
14174
14175 fi
14176 done
14177
14178 echo "$as_me:14178: checking for signed char" >&5
14179 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14180 if test "${ac_cv_type_signed_char+set}" = set; then
14181   echo $ECHO_N "(cached) $ECHO_C" >&6
14182 else
14183   cat >"conftest.$ac_ext" <<_ACEOF
14184 #line 14184 "configure"
14185 #include "confdefs.h"
14186 $ac_includes_default
14187 int
14188 main (void)
14189 {
14190 if ((signed char *) 0)
14191   return 0;
14192 if (sizeof (signed char))
14193   return 0;
14194   ;
14195   return 0;
14196 }
14197 _ACEOF
14198 rm -f "conftest.$ac_objext"
14199 if { (eval echo "$as_me:14199: \"$ac_compile\"") >&5
14200   (eval $ac_compile) 2>&5
14201   ac_status=$?
14202   echo "$as_me:14202: \$? = $ac_status" >&5
14203   (exit "$ac_status"); } &&
14204          { ac_try='test -s "conftest.$ac_objext"'
14205   { (eval echo "$as_me:14205: \"$ac_try\"") >&5
14206   (eval $ac_try) 2>&5
14207   ac_status=$?
14208   echo "$as_me:14208: \$? = $ac_status" >&5
14209   (exit "$ac_status"); }; }; then
14210   ac_cv_type_signed_char=yes
14211 else
14212   echo "$as_me: failed program was:" >&5
14213 cat "conftest.$ac_ext" >&5
14214 ac_cv_type_signed_char=no
14215 fi
14216 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14217 fi
14218 echo "$as_me:14218: result: $ac_cv_type_signed_char" >&5
14219 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14220
14221 echo "$as_me:14221: checking size of signed char" >&5
14222 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14223 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14224   echo $ECHO_N "(cached) $ECHO_C" >&6
14225 else
14226   if test "$ac_cv_type_signed_char" = yes; then
14227   if test "$cross_compiling" = yes; then
14228   # Depending upon the size, compute the lo and hi bounds.
14229 cat >"conftest.$ac_ext" <<_ACEOF
14230 #line 14230 "configure"
14231 #include "confdefs.h"
14232 $ac_includes_default
14233 int
14234 main (void)
14235 {
14236 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14237   ;
14238   return 0;
14239 }
14240 _ACEOF
14241 rm -f "conftest.$ac_objext"
14242 if { (eval echo "$as_me:14242: \"$ac_compile\"") >&5
14243   (eval $ac_compile) 2>&5
14244   ac_status=$?
14245   echo "$as_me:14245: \$? = $ac_status" >&5
14246   (exit "$ac_status"); } &&
14247          { ac_try='test -s "conftest.$ac_objext"'
14248   { (eval echo "$as_me:14248: \"$ac_try\"") >&5
14249   (eval $ac_try) 2>&5
14250   ac_status=$?
14251   echo "$as_me:14251: \$? = $ac_status" >&5
14252   (exit "$ac_status"); }; }; then
14253   ac_lo=0 ac_mid=0
14254   while :; do
14255     cat >"conftest.$ac_ext" <<_ACEOF
14256 #line 14256 "configure"
14257 #include "confdefs.h"
14258 $ac_includes_default
14259 int
14260 main (void)
14261 {
14262 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14263   ;
14264   return 0;
14265 }
14266 _ACEOF
14267 rm -f "conftest.$ac_objext"
14268 if { (eval echo "$as_me:14268: \"$ac_compile\"") >&5
14269   (eval $ac_compile) 2>&5
14270   ac_status=$?
14271   echo "$as_me:14271: \$? = $ac_status" >&5
14272   (exit "$ac_status"); } &&
14273          { ac_try='test -s "conftest.$ac_objext"'
14274   { (eval echo "$as_me:14274: \"$ac_try\"") >&5
14275   (eval $ac_try) 2>&5
14276   ac_status=$?
14277   echo "$as_me:14277: \$? = $ac_status" >&5
14278   (exit "$ac_status"); }; }; then
14279   ac_hi=$ac_mid; break
14280 else
14281   echo "$as_me: failed program was:" >&5
14282 cat "conftest.$ac_ext" >&5
14283 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14284 fi
14285 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14286   done
14287 else
14288   echo "$as_me: failed program was:" >&5
14289 cat "conftest.$ac_ext" >&5
14290 ac_hi=-1 ac_mid=-1
14291   while :; do
14292     cat >"conftest.$ac_ext" <<_ACEOF
14293 #line 14293 "configure"
14294 #include "confdefs.h"
14295 $ac_includes_default
14296 int
14297 main (void)
14298 {
14299 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14300   ;
14301   return 0;
14302 }
14303 _ACEOF
14304 rm -f "conftest.$ac_objext"
14305 if { (eval echo "$as_me:14305: \"$ac_compile\"") >&5
14306   (eval $ac_compile) 2>&5
14307   ac_status=$?
14308   echo "$as_me:14308: \$? = $ac_status" >&5
14309   (exit "$ac_status"); } &&
14310          { ac_try='test -s "conftest.$ac_objext"'
14311   { (eval echo "$as_me:14311: \"$ac_try\"") >&5
14312   (eval $ac_try) 2>&5
14313   ac_status=$?
14314   echo "$as_me:14314: \$? = $ac_status" >&5
14315   (exit "$ac_status"); }; }; then
14316   ac_lo=$ac_mid; break
14317 else
14318   echo "$as_me: failed program was:" >&5
14319 cat "conftest.$ac_ext" >&5
14320 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14321 fi
14322 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14323   done
14324 fi
14325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14326 # Binary search between lo and hi bounds.
14327 while test "x$ac_lo" != "x$ac_hi"; do
14328   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14329   cat >"conftest.$ac_ext" <<_ACEOF
14330 #line 14330 "configure"
14331 #include "confdefs.h"
14332 $ac_includes_default
14333 int
14334 main (void)
14335 {
14336 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14337   ;
14338   return 0;
14339 }
14340 _ACEOF
14341 rm -f "conftest.$ac_objext"
14342 if { (eval echo "$as_me:14342: \"$ac_compile\"") >&5
14343   (eval $ac_compile) 2>&5
14344   ac_status=$?
14345   echo "$as_me:14345: \$? = $ac_status" >&5
14346   (exit "$ac_status"); } &&
14347          { ac_try='test -s "conftest.$ac_objext"'
14348   { (eval echo "$as_me:14348: \"$ac_try\"") >&5
14349   (eval $ac_try) 2>&5
14350   ac_status=$?
14351   echo "$as_me:14351: \$? = $ac_status" >&5
14352   (exit "$ac_status"); }; }; then
14353   ac_hi=$ac_mid
14354 else
14355   echo "$as_me: failed program was:" >&5
14356 cat "conftest.$ac_ext" >&5
14357 ac_lo=`expr "$ac_mid" + 1`
14358 fi
14359 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14360 done
14361 ac_cv_sizeof_signed_char=$ac_lo
14362 else
14363   if test "$cross_compiling" = yes; then
14364   { { echo "$as_me:14364: error: cannot run test program while cross compiling" >&5
14365 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14366    { (exit 1); exit 1; }; }
14367 else
14368   cat >"conftest.$ac_ext" <<_ACEOF
14369 #line 14369 "configure"
14370 #include "confdefs.h"
14371 $ac_includes_default
14372 int
14373 main (void)
14374 {
14375 FILE *f = fopen ("conftest.val", "w");
14376 if (!f)
14377   $ac_main_return (1);
14378 fprintf (f, "%ld", (long)(sizeof (signed char)));
14379 fclose (f);
14380   ;
14381   return 0;
14382 }
14383 _ACEOF
14384 rm -f "conftest$ac_exeext"
14385 if { (eval echo "$as_me:14385: \"$ac_link\"") >&5
14386   (eval $ac_link) 2>&5
14387   ac_status=$?
14388   echo "$as_me:14388: \$? = $ac_status" >&5
14389   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14390   { (eval echo "$as_me:14390: \"$ac_try\"") >&5
14391   (eval $ac_try) 2>&5
14392   ac_status=$?
14393   echo "$as_me:14393: \$? = $ac_status" >&5
14394   (exit "$ac_status"); }; }; then
14395   ac_cv_sizeof_signed_char=`cat conftest.val`
14396 else
14397   echo "$as_me: program exited with status $ac_status" >&5
14398 echo "$as_me: failed program was:" >&5
14399 cat "conftest.$ac_ext" >&5
14400 fi
14401 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14402 fi
14403 fi
14404 rm -f conftest.val
14405 else
14406   ac_cv_sizeof_signed_char=0
14407 fi
14408 fi
14409 echo "$as_me:14409: result: $ac_cv_sizeof_signed_char" >&5
14410 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14411 cat >>confdefs.h <<EOF
14412 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14413 EOF
14414
14415 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14416         NCURSES_SBOOL="signed char"
14417 else
14418         NCURSES_SBOOL="char"
14419 fi
14420 echo "$as_me:14420: checking if you want to use signed Boolean array in term.h" >&5
14421 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14422
14423 # Check whether --enable-signed-char or --disable-signed-char was given.
14424 if test "${enable_signed_char+set}" = set; then
14425   enableval="$enable_signed_char"
14426   with_signed_char=$enableval
14427 else
14428   with_signed_char=no
14429 fi;
14430 echo "$as_me:14430: result: $with_signed_char" >&5
14431 echo "${ECHO_T}$with_signed_char" >&6
14432 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14433
14434 ###   use option --with-tparm-arg to override tparm's argument type
14435 echo "$as_me:14435: checking for type of tparm args" >&5
14436 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14437
14438 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14439 if test "${with_tparm_arg+set}" = set; then
14440   withval="$with_tparm_arg"
14441   NCURSES_TPARM_ARG="$withval"
14442 else
14443   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14444 fi;
14445 echo "$as_me:14445: result: $NCURSES_TPARM_ARG" >&5
14446 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14447
14448 ### Enable compiling-in rcs id's
14449 echo "$as_me:14449: checking if RCS identifiers should be compiled-in" >&5
14450 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14451
14452 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14453 if test "${with_rcs_ids+set}" = set; then
14454   withval="$with_rcs_ids"
14455   with_rcs_ids=$withval
14456 else
14457   with_rcs_ids=no
14458 fi;
14459 echo "$as_me:14459: result: $with_rcs_ids" >&5
14460 echo "${ECHO_T}$with_rcs_ids" >&6
14461 test "x$with_rcs_ids" = xyes &&
14462 cat >>confdefs.h <<\EOF
14463 #define USE_RCS_IDS 1
14464 EOF
14465
14466 ###############################################################################
14467
14468 echo "$as_me:14468: checking format of man-pages" >&5
14469 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14470
14471 # Check whether --with-manpage-format or --without-manpage-format was given.
14472 if test "${with_manpage_format+set}" = set; then
14473   withval="$with_manpage_format"
14474   MANPAGE_FORMAT=$withval
14475 else
14476   MANPAGE_FORMAT=unknown
14477 fi;
14478
14479 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14480 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14481
14482 cf_unknown=
14483
14484 case "$MANPAGE_FORMAT" in
14485 (unknown)
14486         if test -z "$MANPATH" ; then
14487                 MANPATH="/usr/man:/usr/share/man"
14488         fi
14489
14490         # look for the 'date' man-page (it is most likely to be installed!)
14491         MANPAGE_FORMAT=
14492         cf_preform="no"
14493         cf_catonly="yes"
14494         cf_example="date"
14495
14496         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14497         for cf_dir in $MANPATH; do
14498                 test -z "$cf_dir" && cf_dir=/usr/man
14499                 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
14500                 do
14501                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14502                         if test "x$cf_test" = "x$cf_name" ; then
14503
14504                                 case "$cf_name" in
14505                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14506                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14507                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14508                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14509                                 esac
14510
14511                                 case "$cf_name" in
14512                                 ($cf_dir/man*)
14513                                         cf_catonly=no
14514                                         ;;
14515                                 ($cf_dir/cat*)
14516                                         cf_preform=yes
14517                                         ;;
14518                                 esac
14519                                 break
14520                         fi
14521
14522                         # if we found a match in either man* or cat*, stop looking
14523                         if test -n "$MANPAGE_FORMAT" ; then
14524                                 cf_found=no
14525                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14526                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14527                                 case "$cf_name" in
14528                                 ($cf_dir/cat*)
14529                                         cf_found=yes
14530                                         ;;
14531                                 esac
14532                                 test "$cf_found" = yes && break
14533                         fi
14534                 done
14535                 # only check the first directory in $MANPATH where we find manpages
14536                 if test -n "$MANPAGE_FORMAT" ; then
14537                         break
14538                 fi
14539         done
14540         # if we did not find the example, just assume it is normal
14541         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14542         IFS="$ac_save_ifs"
14543         ;;
14544 (*)
14545         for cf_option in $MANPAGE_FORMAT; do
14546         case "$cf_option" in
14547         (gzip|compress|BSDI|normal|formatted|catonly)
14548                 ;;
14549         (*)
14550                 cf_unknown="$cf_unknown $cf_option"
14551                 ;;
14552         esac
14553         done
14554         ;;
14555 esac
14556
14557 echo "$as_me:14557: result: $MANPAGE_FORMAT" >&5
14558 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14559 if test -n "$cf_unknown" ; then
14560         { echo "$as_me:14560: WARNING: Unexpected manpage-format $cf_unknown" >&5
14561 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14562 fi
14563
14564 echo "$as_me:14564: checking for manpage renaming" >&5
14565 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14566
14567 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14568 if test "${with_manpage_renames+set}" = set; then
14569   withval="$with_manpage_renames"
14570   MANPAGE_RENAMES=$withval
14571 else
14572   MANPAGE_RENAMES=yes
14573 fi;
14574
14575 case ".$MANPAGE_RENAMES" in
14576 (.no)
14577         ;;
14578 (.|.yes)
14579         # Debian 'man' program?
14580         if test -f /etc/debian_version ; then
14581                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14582         else
14583                 MANPAGE_RENAMES=no
14584         fi
14585         ;;
14586 esac
14587
14588 if test "$MANPAGE_RENAMES" != no ; then
14589         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14590                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14591         elif test ! -f "$MANPAGE_RENAMES" ; then
14592                 { { echo "$as_me:14592: error: not a filename: $MANPAGE_RENAMES" >&5
14593 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14594    { (exit 1); exit 1; }; }
14595         fi
14596
14597         test ! -d man && mkdir man
14598
14599         # Construct a sed-script to perform renaming within man-pages
14600         if test -n "$MANPAGE_RENAMES" ; then
14601                 test ! -d man && mkdir man
14602                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14603         fi
14604 fi
14605
14606 echo "$as_me:14606: result: $MANPAGE_RENAMES" >&5
14607 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14608
14609 echo "$as_me:14609: checking if manpage aliases will be installed" >&5
14610 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14611
14612 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14613 if test "${with_manpage_aliases+set}" = set; then
14614   withval="$with_manpage_aliases"
14615   MANPAGE_ALIASES=$withval
14616 else
14617   MANPAGE_ALIASES=yes
14618 fi;
14619
14620 echo "$as_me:14620: result: $MANPAGE_ALIASES" >&5
14621 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14622
14623 case "x$LN_S" in
14624 (xln*)
14625         cf_use_symlinks=yes
14626         ;;
14627 (*)
14628         cf_use_symlinks=no
14629         ;;
14630 esac
14631
14632 MANPAGE_SYMLINKS=no
14633 if test "$MANPAGE_ALIASES" = yes ; then
14634 echo "$as_me:14634: checking if manpage symlinks should be used" >&5
14635 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14636
14637 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14638 if test "${with_manpage_symlinks+set}" = set; then
14639   withval="$with_manpage_symlinks"
14640   MANPAGE_SYMLINKS=$withval
14641 else
14642   MANPAGE_SYMLINKS=$cf_use_symlinks
14643 fi;
14644
14645 if test "$$cf_use_symlinks" = no; then
14646 if test "$MANPAGE_SYMLINKS" = yes ; then
14647         { echo "$as_me:14647: WARNING: cannot make symlinks" >&5
14648 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14649         MANPAGE_SYMLINKS=no
14650 fi
14651 fi
14652
14653 echo "$as_me:14653: result: $MANPAGE_SYMLINKS" >&5
14654 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14655 fi
14656
14657 echo "$as_me:14657: checking for manpage tbl" >&5
14658 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14659
14660 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14661 if test "${with_manpage_tbl+set}" = set; then
14662   withval="$with_manpage_tbl"
14663   MANPAGE_TBL=$withval
14664 else
14665   MANPAGE_TBL=no
14666 fi;
14667
14668 echo "$as_me:14668: result: $MANPAGE_TBL" >&5
14669 echo "${ECHO_T}$MANPAGE_TBL" >&6
14670
14671 if test "$prefix" = "NONE" ; then
14672         cf_prefix="$ac_default_prefix"
14673 else
14674         cf_prefix="$prefix"
14675 fi
14676
14677 case "$MANPAGE_FORMAT" in
14678 (*catonly*)
14679         cf_format=yes
14680         cf_inboth=no
14681         ;;
14682 (*formatted*)
14683         cf_format=yes
14684         cf_inboth=yes
14685         ;;
14686 (*)
14687         cf_format=no
14688         cf_inboth=no
14689         ;;
14690 esac
14691
14692 test ! -d man && mkdir man
14693
14694 cf_so_strip=
14695 cf_compress=
14696 case "$MANPAGE_FORMAT" in
14697 (*compress*)
14698         cf_so_strip="Z"
14699         cf_compress=compress
14700         ;;
14701 (*gzip*)
14702         cf_so_strip="gz"
14703         cf_compress=gzip
14704         ;;
14705 esac
14706
14707 cf_edit_man=./edit_man.sh
14708 cf_man_alias=`pwd`/man_alias.sed
14709
14710 cat >$cf_edit_man <<CF_EOF
14711 #! $SHELL
14712 # this script is generated by the configure-script CF_MAN_PAGES macro.
14713
14714 prefix="$cf_prefix"
14715 datarootdir="$datarootdir"
14716 datadir="$datadir"
14717
14718 NCURSES_MAJOR="$NCURSES_MAJOR"
14719 NCURSES_MINOR="$NCURSES_MINOR"
14720 NCURSES_PATCH="$NCURSES_PATCH"
14721
14722 NCURSES_OSPEED="$NCURSES_OSPEED"
14723 TERMINFO="$TERMINFO"
14724
14725 INSTALL="$INSTALL"
14726 INSTALL_DATA="$INSTALL_DATA"
14727
14728 transform="$program_transform_name"
14729
14730 TMP=\${TMPDIR:=/tmp}/man\$\$
14731 trap "rm -f \$TMP" 0 1 2 3 15
14732
14733 form=\$1
14734 shift || exit 1
14735
14736 verb=\$1
14737 shift || exit 1
14738
14739 mandir=\$1
14740 shift || exit 1
14741
14742 srcdir=\$1
14743 top_srcdir=\$srcdir/..
14744 shift || exit 1
14745
14746 if test "\$form" = normal ; then
14747         if test "$cf_format" = yes ; then
14748         if test "$cf_inboth" = no ; then
14749                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14750                 exit $?
14751         fi
14752         fi
14753         cf_subdir=\$mandir/man
14754         cf_tables=$MANPAGE_TBL
14755 else
14756         cf_subdir=\$mandir/cat
14757         cf_tables=yes
14758 fi
14759
14760 # process the list of source-files
14761 for i in "\$@" ; do
14762 case \$i in
14763 (*.orig|*.rej) ;;
14764 (*.[0-9]*)
14765         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14766         if test "\$verb" = installing ; then
14767         if test ! -d "\$cf_subdir\${section}" ; then
14768                 mkdir -p "\$cf_subdir\$section"
14769         fi
14770         fi
14771
14772         # replace variables in man page
14773         if test ! -f "$cf_man_alias" ; then
14774 cat >>$cf_man_alias <<-CF_EOF2
14775                 s,@DATADIR@,\$datadir,g
14776                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14777                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14778                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14779                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14780                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14781                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14782 CF_EOF
14783
14784         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14785         do
14786                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14787                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14788 cat >>$cf_edit_man <<-CF_EOF
14789                 s,@$cf_NAME@,$cf_name,g
14790 CF_EOF
14791         done
14792
14793 cat >>$cf_edit_man <<CF_EOF
14794 CF_EOF2
14795                 echo "...made $cf_man_alias"
14796         fi
14797
14798         aliases=
14799         cf_source=\`basename "\$i"\`
14800         inalias=\$cf_source
14801         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14802         if test ! -f "\$inalias" ; then
14803                 echo ".. skipped \$cf_source"
14804                 continue
14805         fi
14806 CF_EOF
14807
14808 if test "$MANPAGE_ALIASES" != no ; then
14809 cat >>$cf_edit_man <<CF_EOF
14810         nCurses=ignore.3x
14811         test "$with_curses_h" = yes && nCurses=ncurses.3x
14812         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14813 CF_EOF
14814 fi
14815
14816 if test "$MANPAGE_RENAMES" = no ; then
14817 cat >>$cf_edit_man <<CF_EOF
14818         # perform program transformations for section 1 man pages
14819         if test \$section = 1 ; then
14820                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14821         else
14822                 cf_target=\$cf_subdir\${section}/\$cf_source
14823         fi
14824 CF_EOF
14825 else
14826 cat >>$cf_edit_man <<CF_EOF
14827         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14828         if test -z "\$cf_target" ; then
14829                 echo "? missing rename for \$cf_source"
14830                 cf_target="\$cf_source"
14831         fi
14832         cf_target="\$cf_subdir\${section}/\${cf_target}"
14833
14834 CF_EOF
14835 fi
14836
14837 cat >>$cf_edit_man <<CF_EOF
14838         sed     -f "$cf_man_alias" \\
14839 CF_EOF
14840
14841 if test -f "$MANPAGE_RENAMES" ; then
14842 cat >>$cf_edit_man <<CF_EOF
14843                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14844 CF_EOF
14845 else
14846 cat >>$cf_edit_man <<CF_EOF
14847                 < "\$i" >\$TMP
14848 CF_EOF
14849 fi
14850
14851 cat >>$cf_edit_man <<CF_EOF
14852 if test \$cf_tables = yes ; then
14853         tbl \$TMP >\$TMP.out
14854         mv \$TMP.out \$TMP
14855 fi
14856 CF_EOF
14857
14858 if test "$with_overwrite" != yes ; then
14859 cat >>$cf_edit_man <<CF_EOF
14860         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14861         mv \$TMP.out \$TMP
14862 CF_EOF
14863 fi
14864
14865 if test "$with_curses_h" != yes ; then
14866 cat >>$cf_edit_man <<CF_EOF
14867         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14868         mv \$TMP.out \$TMP
14869 CF_EOF
14870 fi
14871
14872 cat >>$cf_edit_man <<CF_EOF
14873         if test "\$form" = format ; then
14874                 nroff -man \$TMP >\$TMP.out
14875                 mv \$TMP.out \$TMP
14876         fi
14877 CF_EOF
14878
14879 if test -n "$cf_compress" ; then
14880 cat >>$cf_edit_man <<CF_EOF
14881         if test "\$verb" = installing ; then
14882         if ( "$cf_compress" -f \$TMP )
14883         then
14884                 mv \$TMP.$cf_so_strip \$TMP
14885         fi
14886         fi
14887         cf_target="\$cf_target.$cf_so_strip"
14888 CF_EOF
14889 fi
14890
14891 case "$MANPAGE_FORMAT" in
14892 (*BSDI*)
14893 cat >>$cf_edit_man <<CF_EOF
14894         if test "\$form" = format ; then
14895                 # BSDI installs only .0 suffixes in the cat directories
14896                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14897         fi
14898 CF_EOF
14899   ;;
14900 esac
14901
14902 cat >>$cf_edit_man <<CF_EOF
14903         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14904         if test "\$verb" = installing ; then
14905                 echo "\$verb \$cf_target"
14906                 \$INSTALL_DATA \$TMP "\$cf_target"
14907                 test -d "\$cf_subdir\${section}" &&
14908                 test -n "\$aliases" && (
14909                         cd "\$cf_subdir\${section}" && (
14910                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14911                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14912                                 cf_target=\`basename "\$cf_target"\`
14913                                 for cf_alias in \$aliases
14914                                 do
14915                                         if test "\$section" = 1 ; then
14916                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14917                                         fi
14918
14919                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14920                                                 if test -f "\$cf_alias\${suffix}" ; then
14921                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14922                                                         then
14923                                                                 continue
14924                                                         fi
14925                                                 fi
14926                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14927 CF_EOF
14928 case "x$LN_S" in
14929 (*-f)
14930 cat >>$cf_edit_man <<CF_EOF
14931                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14932 CF_EOF
14933         ;;
14934 (*)
14935 cat >>$cf_edit_man <<CF_EOF
14936                                                 rm -f "\$cf_alias\${suffix}"
14937                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14938 CF_EOF
14939         ;;
14940 esac
14941 cat >>$cf_edit_man <<CF_EOF
14942                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14943                                                 echo ".so \$cf_source" >\$TMP
14944 CF_EOF
14945 if test -n "$cf_compress" ; then
14946 cat >>$cf_edit_man <<CF_EOF
14947                                                 if test -n "$cf_so_strip" ; then
14948                                                         "$cf_compress" -f \$TMP
14949                                                         mv \$TMP.$cf_so_strip \$TMP
14950                                                 fi
14951 CF_EOF
14952 fi
14953 cat >>$cf_edit_man <<CF_EOF
14954                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14955                                                 rm -f "\$cf_alias\${suffix}"
14956                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14957                                         fi
14958                                 done
14959                         )
14960                 )
14961         elif test "\$verb" = removing ; then
14962                 test -f "\$cf_target" && (
14963                         echo "\$verb \$cf_target"
14964                         rm -f "\$cf_target"
14965                 )
14966                 test -d "\$cf_subdir\${section}" &&
14967                 test -n "\$aliases" && (
14968                         cd "\$cf_subdir\${section}" && (
14969                                 for cf_alias in \$aliases
14970                                 do
14971                                         if test "\$section" = 1 ; then
14972                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14973                                         fi
14974
14975                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14976                                         rm -f "\$cf_alias\${suffix}"
14977                                 done
14978                         )
14979                 )
14980         else
14981 #               echo ".hy 0"
14982                 cat \$TMP
14983         fi
14984         ;;
14985 esac
14986 done
14987
14988 if test "$cf_inboth" = yes ; then
14989 if test "\$form" != format ; then
14990         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14991 fi
14992 fi
14993
14994 exit 0
14995 CF_EOF
14996 chmod 755 "$cf_edit_man"
14997
14998 ###############################################################################
14999
15000 ### Note that some functions (such as const) are normally disabled anyway.
15001 echo "$as_me:15001: checking if you want to build with function extensions" >&5
15002 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15003
15004 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15005 if test "${enable_ext_funcs+set}" = set; then
15006   enableval="$enable_ext_funcs"
15007   with_ext_funcs=$enableval
15008 else
15009   with_ext_funcs=yes
15010 fi;
15011 echo "$as_me:15011: result: $with_ext_funcs" >&5
15012 echo "${ECHO_T}$with_ext_funcs" >&6
15013 if test "x$with_ext_funcs" = xyes ; then
15014         NCURSES_EXT_FUNCS=1
15015
15016 cat >>confdefs.h <<\EOF
15017 #define NCURSES_EXT_FUNCS 1
15018 EOF
15019
15020 cat >>confdefs.h <<\EOF
15021 #define HAVE_ASSUME_DEFAULT_COLORS 1
15022 EOF
15023
15024 cat >>confdefs.h <<\EOF
15025 #define HAVE_CURSES_VERSION 1
15026 EOF
15027
15028 cat >>confdefs.h <<\EOF
15029 #define HAVE_HAS_KEY 1
15030 EOF
15031
15032 cat >>confdefs.h <<\EOF
15033 #define HAVE_RESIZETERM 1
15034 EOF
15035
15036 cat >>confdefs.h <<\EOF
15037 #define HAVE_RESIZE_TERM 1
15038 EOF
15039
15040 cat >>confdefs.h <<\EOF
15041 #define HAVE_TERM_ENTRY_H 1
15042 EOF
15043
15044 cat >>confdefs.h <<\EOF
15045 #define HAVE_USE_DEFAULT_COLORS 1
15046 EOF
15047
15048 cat >>confdefs.h <<\EOF
15049 #define HAVE_USE_EXTENDED_NAMES 1
15050 EOF
15051
15052 cat >>confdefs.h <<\EOF
15053 #define HAVE_USE_SCREEN 1
15054 EOF
15055
15056 cat >>confdefs.h <<\EOF
15057 #define HAVE_USE_WINDOW 1
15058 EOF
15059
15060 cat >>confdefs.h <<\EOF
15061 #define HAVE_WRESIZE 1
15062 EOF
15063
15064         GENERATED_EXT_FUNCS=generated
15065         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15066 else
15067         NCURSES_EXT_FUNCS=0
15068         GENERATED_EXT_FUNCS=
15069 fi
15070
15071 echo "$as_me:15071: checking if you want to build with SCREEN extensions" >&5
15072 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15073
15074 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15075 if test "${enable_sp_funcs+set}" = set; then
15076   enableval="$enable_sp_funcs"
15077   with_sp_funcs=$enableval
15078 else
15079   with_sp_funcs=$cf_dft_ext_spfuncs
15080 fi;
15081 echo "$as_me:15081: result: $with_sp_funcs" >&5
15082 echo "${ECHO_T}$with_sp_funcs" >&6
15083 if test "x$with_sp_funcs" = xyes ; then
15084         NCURSES_SP_FUNCS=1
15085
15086 cat >>confdefs.h <<\EOF
15087 #define NCURSES_SP_FUNCS 1
15088 EOF
15089
15090 cat >>confdefs.h <<\EOF
15091 #define HAVE_TPUTS_SP 1
15092 EOF
15093
15094         GENERATED_SP_FUNCS=generated
15095 else
15096         NCURSES_SP_FUNCS=0
15097         GENERATED_SP_FUNCS=
15098 fi
15099
15100 echo "$as_me:15100: checking if you want to build with terminal-driver" >&5
15101 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15102
15103 # Check whether --enable-term-driver or --disable-term-driver was given.
15104 if test "${enable_term_driver+set}" = set; then
15105   enableval="$enable_term_driver"
15106   with_term_driver=$enableval
15107 else
15108   with_term_driver=no
15109 fi;
15110 echo "$as_me:15110: result: $with_term_driver" >&5
15111 echo "${ECHO_T}$with_term_driver" >&6
15112 if test "x$with_term_driver" = xyes ; then
15113
15114 cat >>confdefs.h <<\EOF
15115 #define USE_TERM_DRIVER 1
15116 EOF
15117
15118         if test "x$with_termlib" != xno ; then
15119                 { { echo "$as_me:15119: error: The term-driver option conflicts with the termlib option" >&5
15120 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15121    { (exit 1); exit 1; }; }
15122         fi
15123         if test "x$with_sp_funcs" != xyes ; then
15124                 { { echo "$as_me:15124: error: The term-driver option relies upon sp-funcs" >&5
15125 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15126    { (exit 1); exit 1; }; }
15127         fi
15128 fi
15129
15130 ###   use option --enable-const to turn on use of const beyond that in XSI.
15131 echo "$as_me:15131: checking for extended use of const keyword" >&5
15132 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15133
15134 # Check whether --enable-const or --disable-const was given.
15135 if test "${enable_const+set}" = set; then
15136   enableval="$enable_const"
15137   with_ext_const=$enableval
15138 else
15139   with_ext_const=$cf_dft_ext_const
15140 fi;
15141 echo "$as_me:15141: result: $with_ext_const" >&5
15142 echo "${ECHO_T}$with_ext_const" >&6
15143 NCURSES_CONST='/*nothing*/'
15144 if test "x$with_ext_const" = xyes ; then
15145         NCURSES_CONST=const
15146 fi
15147
15148 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15149 echo "$as_me:15149: checking if you want to use extended colors" >&5
15150 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15151
15152 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15153 if test "${enable_ext_colors+set}" = set; then
15154   enableval="$enable_ext_colors"
15155   with_ext_colors=$enableval
15156 else
15157   with_ext_colors=$cf_dft_ext_colors
15158 fi;
15159 echo "$as_me:15159: result: $with_ext_colors" >&5
15160 echo "${ECHO_T}$with_ext_colors" >&6
15161 NCURSES_EXT_COLORS=0
15162 if test "x$with_ext_colors" = xyes ; then
15163         if test "x$with_widec" != xyes ; then
15164                 { echo "$as_me:15164: WARNING: This option applies only to wide-character library" >&5
15165 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15166         else
15167                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15168
15169 if test "${with_abi_version+set}" != set; then
15170         case "$cf_cv_rel_version" in
15171         (5.*)
15172                 cf_cv_rel_version=6.0
15173                 cf_cv_abi_version=6
15174                 { echo "$as_me:15174: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15175 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15176                 ;;
15177         esac
15178 fi
15179
15180                 NCURSES_EXT_COLORS=1
15181
15182 cat >>confdefs.h <<\EOF
15183 #define NCURSES_EXT_COLORS 1
15184 EOF
15185
15186 cat >>confdefs.h <<\EOF
15187 #define HAVE_ALLOC_PAIR 1
15188 EOF
15189
15190 cat >>confdefs.h <<\EOF
15191 #define HAVE_INIT_EXTENDED_COLOR 1
15192 EOF
15193
15194 cat >>confdefs.h <<\EOF
15195 #define HAVE_RESET_COLOR_PAIRS 1
15196 EOF
15197
15198         fi
15199 fi
15200
15201 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15202 echo "$as_me:15202: checking if you want to use extended mouse encoding" >&5
15203 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15204
15205 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15206 if test "${enable_ext_mouse+set}" = set; then
15207   enableval="$enable_ext_mouse"
15208   with_ext_mouse=$enableval
15209 else
15210   with_ext_mouse=$cf_dft_ext_mouse
15211 fi;
15212 echo "$as_me:15212: result: $with_ext_mouse" >&5
15213 echo "${ECHO_T}$with_ext_mouse" >&6
15214 NCURSES_MOUSE_VERSION=1
15215 if test "x$with_ext_mouse" = xyes ; then
15216         NCURSES_MOUSE_VERSION=2
15217
15218 if test "${with_abi_version+set}" != set; then
15219         case "$cf_cv_rel_version" in
15220         (5.*)
15221                 cf_cv_rel_version=6.0
15222                 cf_cv_abi_version=6
15223                 { echo "$as_me:15223: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15224 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15225                 ;;
15226         esac
15227 fi
15228
15229 fi
15230
15231 ###   use option --enable-ext-putwin to turn on extended screendumps
15232 echo "$as_me:15232: checking if you want to use extended putwin/screendump" >&5
15233 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15234
15235 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15236 if test "${enable_ext_putwin+set}" = set; then
15237   enableval="$enable_ext_putwin"
15238   with_ext_putwin=$enableval
15239 else
15240   with_ext_putwin=$cf_dft_ext_putwin
15241 fi;
15242 echo "$as_me:15242: result: $with_ext_putwin" >&5
15243 echo "${ECHO_T}$with_ext_putwin" >&6
15244 if test "x$with_ext_putwin" = xyes ; then
15245
15246 cat >>confdefs.h <<\EOF
15247 #define NCURSES_EXT_PUTWIN 1
15248 EOF
15249
15250 fi
15251
15252 echo "$as_me:15252: checking if you want \$NCURSES_NO_PADDING code" >&5
15253 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15254
15255 # Check whether --enable-no-padding or --disable-no-padding was given.
15256 if test "${enable_no_padding+set}" = set; then
15257   enableval="$enable_no_padding"
15258   with_no_padding=$enableval
15259 else
15260   with_no_padding=$with_ext_funcs
15261 fi;
15262 echo "$as_me:15262: result: $with_no_padding" >&5
15263 echo "${ECHO_T}$with_no_padding" >&6
15264 test "x$with_no_padding" = xyes &&
15265 cat >>confdefs.h <<\EOF
15266 #define NCURSES_NO_PADDING 1
15267 EOF
15268
15269 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15270 echo "$as_me:15270: checking if you want SIGWINCH handler" >&5
15271 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15272
15273 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15274 if test "${enable_sigwinch+set}" = set; then
15275   enableval="$enable_sigwinch"
15276   with_sigwinch=$enableval
15277 else
15278   with_sigwinch=$with_ext_funcs
15279 fi;
15280 echo "$as_me:15280: result: $with_sigwinch" >&5
15281 echo "${ECHO_T}$with_sigwinch" >&6
15282 test "x$with_sigwinch" = xyes &&
15283 cat >>confdefs.h <<\EOF
15284 #define USE_SIGWINCH 1
15285 EOF
15286
15287 ###   use option --enable-tcap-names to allow user to define new capabilities
15288 echo "$as_me:15288: checking if you want user-definable terminal capabilities like termcap" >&5
15289 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15290
15291 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15292 if test "${enable_tcap_names+set}" = set; then
15293   enableval="$enable_tcap_names"
15294   with_tcap_names=$enableval
15295 else
15296   with_tcap_names=$with_ext_funcs
15297 fi;
15298 echo "$as_me:15298: result: $with_tcap_names" >&5
15299 echo "${ECHO_T}$with_tcap_names" >&6
15300 NCURSES_XNAMES=0
15301 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15302
15303 ##############################################################################
15304
15305 echo "$as_me:15305: checking if you want to link with the pthread library" >&5
15306 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15307
15308 # Check whether --with-pthread or --without-pthread was given.
15309 if test "${with_pthread+set}" = set; then
15310   withval="$with_pthread"
15311   with_pthread=$withval
15312 else
15313   with_pthread=no
15314 fi;
15315 echo "$as_me:15315: result: $with_pthread" >&5
15316 echo "${ECHO_T}$with_pthread" >&6
15317
15318 if test "$with_pthread" != no ; then
15319         echo "$as_me:15319: checking for pthread.h" >&5
15320 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15321 if test "${ac_cv_header_pthread_h+set}" = set; then
15322   echo $ECHO_N "(cached) $ECHO_C" >&6
15323 else
15324   cat >"conftest.$ac_ext" <<_ACEOF
15325 #line 15325 "configure"
15326 #include "confdefs.h"
15327 #include <pthread.h>
15328 _ACEOF
15329 if { (eval echo "$as_me:15329: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15330   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15331   ac_status=$?
15332   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15333   rm -f conftest.er1
15334   cat conftest.err >&5
15335   echo "$as_me:15335: \$? = $ac_status" >&5
15336   (exit "$ac_status"); } >/dev/null; then
15337   if test -s conftest.err; then
15338     ac_cpp_err=$ac_c_preproc_warn_flag
15339   else
15340     ac_cpp_err=
15341   fi
15342 else
15343   ac_cpp_err=yes
15344 fi
15345 if test -z "$ac_cpp_err"; then
15346   ac_cv_header_pthread_h=yes
15347 else
15348   echo "$as_me: failed program was:" >&5
15349   cat "conftest.$ac_ext" >&5
15350   ac_cv_header_pthread_h=no
15351 fi
15352 rm -f conftest.err "conftest.$ac_ext"
15353 fi
15354 echo "$as_me:15354: result: $ac_cv_header_pthread_h" >&5
15355 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15356 if test "$ac_cv_header_pthread_h" = yes; then
15357
15358 cat >>confdefs.h <<\EOF
15359 #define HAVE_PTHREADS_H 1
15360 EOF
15361
15362         for cf_lib_pthread in pthread c_r
15363         do
15364             echo "$as_me:15364: checking if we can link with the $cf_lib_pthread library" >&5
15365 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15366             cf_save_LIBS="$LIBS"
15367
15368 cf_add_libs="$LIBS"
15369 # reverse order
15370 cf_add_0lib=
15371 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15372 # filter duplicates
15373 for cf_add_1lib in $cf_add_0lib; do
15374         for cf_add_2lib in $cf_add_libs; do
15375                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15376                         cf_add_1lib=
15377                         break
15378                 fi
15379         done
15380         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15381 done
15382 LIBS="$cf_add_libs"
15383
15384             cat >"conftest.$ac_ext" <<_ACEOF
15385 #line 15385 "configure"
15386 #include "confdefs.h"
15387
15388 #include <pthread.h>
15389
15390 int
15391 main (void)
15392 {
15393
15394                 int rc = pthread_create(0,0,0,0);
15395                 int r2 = pthread_mutexattr_settype(0, 0);
15396
15397   ;
15398   return 0;
15399 }
15400 _ACEOF
15401 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15402 if { (eval echo "$as_me:15402: \"$ac_link\"") >&5
15403   (eval $ac_link) 2>&5
15404   ac_status=$?
15405   echo "$as_me:15405: \$? = $ac_status" >&5
15406   (exit "$ac_status"); } &&
15407          { ac_try='test -s "conftest$ac_exeext"'
15408   { (eval echo "$as_me:15408: \"$ac_try\"") >&5
15409   (eval $ac_try) 2>&5
15410   ac_status=$?
15411   echo "$as_me:15411: \$? = $ac_status" >&5
15412   (exit "$ac_status"); }; }; then
15413   with_pthread=yes
15414 else
15415   echo "$as_me: failed program was:" >&5
15416 cat "conftest.$ac_ext" >&5
15417 with_pthread=no
15418 fi
15419 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15420             LIBS="$cf_save_LIBS"
15421             echo "$as_me:15421: result: $with_pthread" >&5
15422 echo "${ECHO_T}$with_pthread" >&6
15423             test "$with_pthread" = yes && break
15424         done
15425
15426         if test "$with_pthread" = yes ; then
15427
15428 cf_add_libs="$LIBS"
15429 # reverse order
15430 cf_add_0lib=
15431 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15432 # filter duplicates
15433 for cf_add_1lib in $cf_add_0lib; do
15434         for cf_add_2lib in $cf_add_libs; do
15435                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15436                         cf_add_1lib=
15437                         break
15438                 fi
15439         done
15440         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15441 done
15442 LIBS="$cf_add_libs"
15443
15444 cat >>confdefs.h <<\EOF
15445 #define HAVE_LIBPTHREADS 1
15446 EOF
15447
15448         else
15449             { { echo "$as_me:15449: error: Cannot link with pthread library" >&5
15450 echo "$as_me: error: Cannot link with pthread library" >&2;}
15451    { (exit 1); exit 1; }; }
15452         fi
15453
15454 fi
15455
15456 fi
15457
15458 if test "x$with_pthread" != xno; then
15459         echo "$as_me:15459: checking for pthread_kill" >&5
15460 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15461 if test "${ac_cv_func_pthread_kill+set}" = set; then
15462   echo $ECHO_N "(cached) $ECHO_C" >&6
15463 else
15464   cat >"conftest.$ac_ext" <<_ACEOF
15465 #line 15465 "configure"
15466 #include "confdefs.h"
15467 #define pthread_kill autoconf_temporary
15468 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15469 #undef pthread_kill
15470
15471 #ifdef __cplusplus
15472 extern "C"
15473 #endif
15474
15475 /* We use char because int might match the return type of a gcc2
15476    builtin and then its argument prototype would still apply.  */
15477 char pthread_kill (void);
15478
15479 int
15480 main (void)
15481 {
15482
15483 /* The GNU C library defines stubs for functions which it implements
15484     to always fail with ENOSYS.  Some functions are actually named
15485     something starting with __ and the normal name is an alias.  */
15486 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15487 #error found stub for pthread_kill
15488 #endif
15489
15490         return pthread_kill ();
15491   ;
15492   return 0;
15493 }
15494 _ACEOF
15495 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15496 if { (eval echo "$as_me:15496: \"$ac_link\"") >&5
15497   (eval $ac_link) 2>&5
15498   ac_status=$?
15499   echo "$as_me:15499: \$? = $ac_status" >&5
15500   (exit "$ac_status"); } &&
15501          { ac_try='test -s "conftest$ac_exeext"'
15502   { (eval echo "$as_me:15502: \"$ac_try\"") >&5
15503   (eval $ac_try) 2>&5
15504   ac_status=$?
15505   echo "$as_me:15505: \$? = $ac_status" >&5
15506   (exit "$ac_status"); }; }; then
15507   ac_cv_func_pthread_kill=yes
15508 else
15509   echo "$as_me: failed program was:" >&5
15510 cat "conftest.$ac_ext" >&5
15511 ac_cv_func_pthread_kill=no
15512 fi
15513 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15514 fi
15515 echo "$as_me:15515: result: $ac_cv_func_pthread_kill" >&5
15516 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15517 if test "$ac_cv_func_pthread_kill" = yes; then
15518
15519                 echo "$as_me:15519: checking if you want to allow EINTR in wgetch with pthreads" >&5
15520 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15521
15522 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15523 if test "${enable_pthreads_eintr+set}" = set; then
15524   enableval="$enable_pthreads_eintr"
15525   use_pthreads_eintr=$enableval
15526 else
15527   use_pthreads_eintr=no
15528 fi;
15529                 echo "$as_me:15529: result: $use_pthreads_eintr" >&5
15530 echo "${ECHO_T}$use_pthreads_eintr" >&6
15531                 if test "x$use_pthreads_eintr" = xyes ; then
15532
15533 cat >>confdefs.h <<\EOF
15534 #define USE_PTHREADS_EINTR 1
15535 EOF
15536
15537                 fi
15538 fi
15539
15540         echo "$as_me:15540: checking if you want to use weak-symbols for pthreads" >&5
15541 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15542
15543 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15544 if test "${enable_weak_symbols+set}" = set; then
15545   enableval="$enable_weak_symbols"
15546   use_weak_symbols=$enableval
15547 else
15548   use_weak_symbols=no
15549 fi;
15550         echo "$as_me:15550: result: $use_weak_symbols" >&5
15551 echo "${ECHO_T}$use_weak_symbols" >&6
15552         if test "x$use_weak_symbols" = xyes ; then
15553
15554 echo "$as_me:15554: checking if $CC supports weak symbols" >&5
15555 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15556 if test "${cf_cv_weak_symbols+set}" = set; then
15557   echo $ECHO_N "(cached) $ECHO_C" >&6
15558 else
15559
15560 cat >"conftest.$ac_ext" <<_ACEOF
15561 #line 15561 "configure"
15562 #include "confdefs.h"
15563
15564 #include <stdio.h>
15565 int
15566 main (void)
15567 {
15568
15569 #if defined(__GNUC__)
15570 #  if defined __USE_ISOC99
15571 #    define _cat_pragma(exp)    _Pragma(#exp)
15572 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15573 #  else
15574 #    define _weak_pragma(exp)
15575 #  endif
15576 #  define _declare(name)        __extension__ extern __typeof__(name) name
15577 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15578 #endif
15579
15580 weak_symbol(fopen);
15581
15582   ;
15583   return 0;
15584 }
15585 _ACEOF
15586 rm -f "conftest.$ac_objext"
15587 if { (eval echo "$as_me:15587: \"$ac_compile\"") >&5
15588   (eval $ac_compile) 2>&5
15589   ac_status=$?
15590   echo "$as_me:15590: \$? = $ac_status" >&5
15591   (exit "$ac_status"); } &&
15592          { ac_try='test -s "conftest.$ac_objext"'
15593   { (eval echo "$as_me:15593: \"$ac_try\"") >&5
15594   (eval $ac_try) 2>&5
15595   ac_status=$?
15596   echo "$as_me:15596: \$? = $ac_status" >&5
15597   (exit "$ac_status"); }; }; then
15598   cf_cv_weak_symbols=yes
15599 else
15600   echo "$as_me: failed program was:" >&5
15601 cat "conftest.$ac_ext" >&5
15602 cf_cv_weak_symbols=no
15603 fi
15604 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15605
15606 fi
15607 echo "$as_me:15607: result: $cf_cv_weak_symbols" >&5
15608 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15609
15610         else
15611                 cf_cv_weak_symbols=no
15612         fi
15613
15614         if test "x$cf_cv_weak_symbols" = xyes ; then
15615
15616 cat >>confdefs.h <<\EOF
15617 #define USE_WEAK_SYMBOLS 1
15618 EOF
15619
15620         fi
15621 fi
15622
15623 PTHREAD=
15624 if test "x$with_pthread" = "xyes" ; then
15625
15626 cat >>confdefs.h <<\EOF
15627 #define USE_PTHREADS 1
15628 EOF
15629
15630         enable_reentrant=yes
15631         if test "x$cf_cv_weak_symbols" = xyes ; then
15632                 PTHREAD=-lpthread
15633
15634 cf_add_libs="$PRIVATE_LIBS"
15635 # reverse order
15636 cf_add_0lib=
15637 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15638 # filter duplicates
15639 for cf_add_1lib in $cf_add_0lib; do
15640         for cf_add_2lib in $cf_add_libs; do
15641                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15642                         cf_add_1lib=
15643                         break
15644                 fi
15645         done
15646         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15647 done
15648 PRIVATE_LIBS="$cf_add_libs"
15649
15650         fi
15651 fi
15652
15653 # Reentrant code has to be opaque; there's little advantage to making ncurses
15654 # opaque outside of that, so there is no --enable-opaque option.  We can use
15655 # this option without --with-pthreads, but this will be always set for
15656 # pthreads.
15657 echo "$as_me:15657: checking if you want reentrant code" >&5
15658 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15659
15660 # Check whether --enable-reentrant or --disable-reentrant was given.
15661 if test "${enable_reentrant+set}" = set; then
15662   enableval="$enable_reentrant"
15663   with_reentrant=$enableval
15664 else
15665   with_reentrant=no
15666 fi;
15667 echo "$as_me:15667: result: $with_reentrant" >&5
15668 echo "${ECHO_T}$with_reentrant" >&6
15669 if test "x$with_reentrant" = xyes ; then
15670         cf_cv_enable_reentrant=1
15671         cf_cv_enable_opaque="NCURSES_INTERNALS"
15672         NCURSES_SIZE_T=int
15673         if test "x$cf_cv_weak_symbols" = xyes ; then
15674
15675 # remove pthread library from $LIBS
15676 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15677
15678 cf_add_libs="$TEST_LIBS"
15679 # reverse order
15680 cf_add_0lib=
15681 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15682 # filter duplicates
15683 for cf_add_1lib in $cf_add_0lib; do
15684         for cf_add_2lib in $cf_add_libs; do
15685                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15686                         cf_add_1lib=
15687                         break
15688                 fi
15689         done
15690         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15691 done
15692 TEST_LIBS="$cf_add_libs"
15693
15694 cf_add_libs="$TEST_LIBS2"
15695 # reverse order
15696 cf_add_0lib=
15697 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15698 # filter duplicates
15699 for cf_add_1lib in $cf_add_0lib; do
15700         for cf_add_2lib in $cf_add_libs; do
15701                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15702                         cf_add_1lib=
15703                         break
15704                 fi
15705         done
15706         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15707 done
15708 TEST_LIBS2="$cf_add_libs"
15709
15710 cf_add_libs="$PRIVATE_LIBS"
15711 # reverse order
15712 cf_add_0lib=
15713 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15714 # filter duplicates
15715 for cf_add_1lib in $cf_add_0lib; do
15716         for cf_add_2lib in $cf_add_libs; do
15717                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15718                         cf_add_1lib=
15719                         break
15720                 fi
15721         done
15722         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15723 done
15724 PRIVATE_LIBS="$cf_add_libs"
15725
15726         else
15727                 # when not using weak symbols but with_reentrant,
15728                 # add 't' to the library suffix on all platforms
15729                 # except cygwin, where we only do that if ALSO
15730                 # compiling with full thread support.
15731                 case "$host" in
15732                 (*cygwin* | *msys*)
15733                         if test "$with_pthread" = "yes" ; then
15734                                 if test "x$disable_lib_suffixes" = "xno" ; then
15735                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15736                                 fi
15737                         fi ;;
15738                 (*)
15739                         if test "x$disable_lib_suffixes" = "xno" ; then
15740                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15741                         fi
15742                         ;;
15743                 esac
15744         fi
15745
15746 cat >>confdefs.h <<\EOF
15747 #define USE_REENTRANT 1
15748 EOF
15749
15750 if test "${with_abi_version+set}" != set; then
15751         case "$cf_cv_rel_version" in
15752         (5.*)
15753                 cf_cv_rel_version=6.0
15754                 cf_cv_abi_version=6
15755                 { echo "$as_me:15755: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15756 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15757                 ;;
15758         esac
15759 fi
15760
15761 else
15762         cf_cv_enable_reentrant=0
15763         cf_cv_enable_opaque="NCURSES_OPAQUE"
15764         NCURSES_SIZE_T=short
15765 fi
15766
15767 echo "$as_me:15767: checking if you want opaque curses-library structures" >&5
15768 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15769
15770 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15771 if test "${enable_opaque_curses+set}" = set; then
15772   enableval="$enable_opaque_curses"
15773   test "$enableval" != yes && enableval=no
15774         if test "$enableval" != "no" ; then
15775     enable_opaque_curses=yes
15776         else
15777
15778          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15779          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15780
15781         fi
15782 else
15783   enableval=no
15784
15785          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15786          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15787
15788 fi;
15789 echo "$as_me:15789: result: $enable_opaque_curses" >&5
15790 echo "${ECHO_T}$enable_opaque_curses" >&6
15791
15792 test "$cf_cv_enable_reentrant" = 1 && \
15793 test "$enable_opaque_curses" = no && \
15794 { { echo "$as_me:15794: error: reentrant configuration requires opaque library" >&5
15795 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15796    { (exit 1); exit 1; }; }
15797
15798 echo "$as_me:15798: checking if you want opaque form-library structures" >&5
15799 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15800
15801 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15802 if test "${enable_opaque_form+set}" = set; then
15803   enableval="$enable_opaque_form"
15804   enable_opaque_form=yes
15805 else
15806   enable_opaque_form=no
15807 fi;
15808 echo "$as_me:15808: result: $enable_opaque_form" >&5
15809 echo "${ECHO_T}$enable_opaque_form" >&6
15810
15811 echo "$as_me:15811: checking if you want opaque menu-library structures" >&5
15812 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15813
15814 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15815 if test "${enable_opaque_menu+set}" = set; then
15816   enableval="$enable_opaque_menu"
15817   enable_opaque_menu=yes
15818 else
15819   enable_opaque_menu=no
15820 fi;
15821 echo "$as_me:15821: result: $enable_opaque_menu" >&5
15822 echo "${ECHO_T}$enable_opaque_menu" >&6
15823
15824 echo "$as_me:15824: checking if you want opaque panel-library structures" >&5
15825 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15826
15827 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15828 if test "${enable_opaque_panel+set}" = set; then
15829   enableval="$enable_opaque_panel"
15830   enable_opaque_panel=yes
15831 else
15832   enable_opaque_panel=no
15833 fi;
15834 echo "$as_me:15834: result: $enable_opaque_panel" >&5
15835 echo "${ECHO_T}$enable_opaque_panel" >&6
15836
15837 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15838 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15839 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15840 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15841
15842 ### Allow using a different wrap-prefix
15843 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15844         echo "$as_me:15844: checking for prefix used to wrap public variables" >&5
15845 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15846
15847 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15848 if test "${with_wrap_prefix+set}" = set; then
15849   withval="$with_wrap_prefix"
15850   NCURSES_WRAP_PREFIX=$withval
15851 else
15852   NCURSES_WRAP_PREFIX=_nc_
15853 fi;
15854         echo "$as_me:15854: result: $NCURSES_WRAP_PREFIX" >&5
15855 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15856 else
15857         NCURSES_WRAP_PREFIX=_nc_
15858 fi
15859
15860 cat >>confdefs.h <<EOF
15861 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15862 EOF
15863
15864 ###############################################################################
15865 # These options are relatively safe to experiment with.
15866
15867 echo "$as_me:15867: checking if you want all development code" >&5
15868 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15869
15870 # Check whether --with-develop or --without-develop was given.
15871 if test "${with_develop+set}" = set; then
15872   withval="$with_develop"
15873   with_develop=$withval
15874 else
15875   with_develop=no
15876 fi;
15877 echo "$as_me:15877: result: $with_develop" >&5
15878 echo "${ECHO_T}$with_develop" >&6
15879
15880 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15881 echo "$as_me:15881: checking if you want hard-tabs code" >&5
15882 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15883
15884 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15885 if test "${enable_hard_tabs+set}" = set; then
15886   enableval="$enable_hard_tabs"
15887
15888 else
15889   enable_hard_tabs=$with_develop
15890 fi;
15891 echo "$as_me:15891: result: $enable_hard_tabs" >&5
15892 echo "${ECHO_T}$enable_hard_tabs" >&6
15893 test "x$enable_hard_tabs" = xyes &&
15894 cat >>confdefs.h <<\EOF
15895 #define USE_HARD_TABS 1
15896 EOF
15897
15898 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15899 echo "$as_me:15899: checking if you want limited support for xmc" >&5
15900 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15901
15902 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15903 if test "${enable_xmc_glitch+set}" = set; then
15904   enableval="$enable_xmc_glitch"
15905
15906 else
15907   enable_xmc_glitch=$with_develop
15908 fi;
15909 echo "$as_me:15909: result: $enable_xmc_glitch" >&5
15910 echo "${ECHO_T}$enable_xmc_glitch" >&6
15911 test "x$enable_xmc_glitch" = xyes &&
15912 cat >>confdefs.h <<\EOF
15913 #define USE_XMC_SUPPORT 1
15914 EOF
15915
15916 ###############################################################################
15917 # These are just experimental, probably should not be in a package:
15918
15919 echo "$as_me:15919: checking if you do not want to assume colors are white-on-black" >&5
15920 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15921
15922 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15923 if test "${enable_assumed_color+set}" = set; then
15924   enableval="$enable_assumed_color"
15925   with_assumed_color=$enableval
15926 else
15927   with_assumed_color=yes
15928 fi;
15929 echo "$as_me:15929: result: $with_assumed_color" >&5
15930 echo "${ECHO_T}$with_assumed_color" >&6
15931 test "x$with_assumed_color" = xyes &&
15932 cat >>confdefs.h <<\EOF
15933 #define USE_ASSUMED_COLOR 1
15934 EOF
15935
15936 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15937 echo "$as_me:15937: checking if you want hashmap scrolling-optimization code" >&5
15938 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15939
15940 # Check whether --enable-hashmap or --disable-hashmap was given.
15941 if test "${enable_hashmap+set}" = set; then
15942   enableval="$enable_hashmap"
15943   with_hashmap=$enableval
15944 else
15945   with_hashmap=yes
15946 fi;
15947 echo "$as_me:15947: result: $with_hashmap" >&5
15948 echo "${ECHO_T}$with_hashmap" >&6
15949 test "x$with_hashmap" = xyes &&
15950 cat >>confdefs.h <<\EOF
15951 #define USE_HASHMAP 1
15952 EOF
15953
15954 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15955 echo "$as_me:15955: checking if you want colorfgbg code" >&5
15956 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15957
15958 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15959 if test "${enable_colorfgbg+set}" = set; then
15960   enableval="$enable_colorfgbg"
15961   with_colorfgbg=$enableval
15962 else
15963   with_colorfgbg=no
15964 fi;
15965 echo "$as_me:15965: result: $with_colorfgbg" >&5
15966 echo "${ECHO_T}$with_colorfgbg" >&6
15967 test "x$with_colorfgbg" = xyes &&
15968 cat >>confdefs.h <<\EOF
15969 #define USE_COLORFGBG 1
15970 EOF
15971
15972 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15973 echo "$as_me:15973: checking if you want to use gcc -fvisibility option" >&5
15974 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15975
15976 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15977 if test "${enable_fvisibility+set}" = set; then
15978   enableval="$enable_fvisibility"
15979   cf_with_fvisibility=$enableval
15980 else
15981   cf_with_fvisibility=no
15982 fi;
15983 echo "$as_me:15983: result: $cf_with_fvisibility" >&5
15984 echo "${ECHO_T}$cf_with_fvisibility" >&6
15985
15986 NCURSES_IMPEXP=
15987 NCURSES_CXX_IMPEXP=
15988 if test "x$cf_with_fvisibility" = xyes; then
15989
15990 echo "$as_me:15990: checking if $CC -fvisibility=hidden option works" >&5
15991 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15992 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15993   echo $ECHO_N "(cached) $ECHO_C" >&6
15994 else
15995
15996     cf_save_cflags="$CFLAGS"
15997     CFLAGS="$CFLAGS -fvisibility=hidden"
15998     cat >"conftest.$ac_ext" <<_ACEOF
15999 #line 15999 "configure"
16000 #include "confdefs.h"
16001
16002 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16003
16004 int
16005 main (void)
16006 {
16007
16008         if (somefunc()) return 1;
16009
16010   ;
16011   return 0;
16012 }
16013 _ACEOF
16014 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16015 if { (eval echo "$as_me:16015: \"$ac_link\"") >&5
16016   (eval $ac_link) 2>&5
16017   ac_status=$?
16018   echo "$as_me:16018: \$? = $ac_status" >&5
16019   (exit "$ac_status"); } &&
16020          { ac_try='test -s "conftest$ac_exeext"'
16021   { (eval echo "$as_me:16021: \"$ac_try\"") >&5
16022   (eval $ac_try) 2>&5
16023   ac_status=$?
16024   echo "$as_me:16024: \$? = $ac_status" >&5
16025   (exit "$ac_status"); }; }; then
16026   cf_cv_fvisibility_hidden=yes
16027 else
16028   echo "$as_me: failed program was:" >&5
16029 cat "conftest.$ac_ext" >&5
16030 cf_cv_fvisibility_hidden=no
16031 fi
16032 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16033     CFLAGS=$cf_save_cflags
16034
16035 fi
16036 echo "$as_me:16036: result: $cf_cv_fvisibility_hidden" >&5
16037 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16038
16039         if test "x$cf_cv_fvisibility_hidden" = xyes
16040         then
16041
16042 cf_fix_cppflags=no
16043 cf_new_cflags=
16044 cf_new_cppflags=
16045 cf_new_extra_cppflags=
16046
16047 for cf_add_cflags in -fvisibility=hidden
16048 do
16049 case "$cf_fix_cppflags" in
16050 (no)
16051         case "$cf_add_cflags" in
16052         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16053                 case "$cf_add_cflags" in
16054                 (-D*)
16055                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16056
16057                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16058                                 && test -z "${cf_tst_cflags}" \
16059                                 && cf_fix_cppflags=yes
16060
16061                         if test "$cf_fix_cppflags" = yes ; then
16062
16063         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16064         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16065
16066                                 continue
16067                         elif test "${cf_tst_cflags}" = "\"'" ; then
16068
16069         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16070         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16071
16072                                 continue
16073                         fi
16074                         ;;
16075                 esac
16076                 case "$CPPFLAGS" in
16077                 (*$cf_add_cflags)
16078                         ;;
16079                 (*)
16080                         case "$cf_add_cflags" in
16081                         (-D*)
16082                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16083
16084 CPPFLAGS=`echo "$CPPFLAGS" | \
16085         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16086                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16087
16088                                 ;;
16089                         esac
16090
16091         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16092         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16093
16094                         ;;
16095                 esac
16096                 ;;
16097         (*)
16098
16099         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16100         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16101
16102                 ;;
16103         esac
16104         ;;
16105 (yes)
16106
16107         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16108         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16109
16110         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16111
16112         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16113                 && test -z "${cf_tst_cflags}" \
16114                 && cf_fix_cppflags=no
16115         ;;
16116 esac
16117 done
16118
16119 if test -n "$cf_new_cflags" ; then
16120
16121         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16122         CFLAGS="${CFLAGS}$cf_new_cflags"
16123
16124 fi
16125
16126 if test -n "$cf_new_cppflags" ; then
16127
16128         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16129         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16130
16131 fi
16132
16133 if test -n "$cf_new_extra_cppflags" ; then
16134
16135         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16136         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16137
16138 fi
16139
16140                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16141         fi
16142         if test -n "$CXX"
16143         then
16144                 ac_ext=cc
16145 ac_cpp='$CXXCPP $CPPFLAGS'
16146 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16147 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16148 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16149 ac_main_return="return"
16150
16151 echo "$as_me:16151: checking if $CXX -fvisibility=hidden option works" >&5
16152 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16153 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16154   echo $ECHO_N "(cached) $ECHO_C" >&6
16155 else
16156
16157     cf_save_cflags="$CXXFLAGS"
16158     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16159     cat >"conftest.$ac_ext" <<_ACEOF
16160 #line 16160 "configure"
16161 #include "confdefs.h"
16162
16163 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16164
16165 int
16166 main (void)
16167 {
16168
16169         if (somefunc()) return 1;
16170
16171   ;
16172   return 0;
16173 }
16174 _ACEOF
16175 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16176 if { (eval echo "$as_me:16176: \"$ac_link\"") >&5
16177   (eval $ac_link) 2>&5
16178   ac_status=$?
16179   echo "$as_me:16179: \$? = $ac_status" >&5
16180   (exit "$ac_status"); } &&
16181          { ac_try='test -s "conftest$ac_exeext"'
16182   { (eval echo "$as_me:16182: \"$ac_try\"") >&5
16183   (eval $ac_try) 2>&5
16184   ac_status=$?
16185   echo "$as_me:16185: \$? = $ac_status" >&5
16186   (exit "$ac_status"); }; }; then
16187   cf_cv_fvisibility_hidden2=yes
16188 else
16189   echo "$as_me: failed program was:" >&5
16190 cat "conftest.$ac_ext" >&5
16191 cf_cv_fvisibility_hidden2=no
16192 fi
16193 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16194     CXXFLAGS=$cf_save_cflags
16195
16196 fi
16197 echo "$as_me:16197: result: $cf_cv_fvisibility_hidden2" >&5
16198 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16199
16200                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16201                 then
16202
16203 cf_save_CXXFLAGS="$CFLAGS"
16204 CFLAGS="$CXXFLAGS"
16205
16206 cf_fix_cppflags=no
16207 cf_new_cflags=
16208 cf_new_cppflags=
16209 cf_new_extra_cppflags=
16210
16211 for cf_add_cflags in -fvisibility=hidden
16212 do
16213 case "$cf_fix_cppflags" in
16214 (no)
16215         case "$cf_add_cflags" in
16216         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16217                 case "$cf_add_cflags" in
16218                 (-D*)
16219                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16220
16221                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16222                                 && test -z "${cf_tst_cflags}" \
16223                                 && cf_fix_cppflags=yes
16224
16225                         if test "$cf_fix_cppflags" = yes ; then
16226
16227         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16228         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16229
16230                                 continue
16231                         elif test "${cf_tst_cflags}" = "\"'" ; then
16232
16233         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16234         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16235
16236                                 continue
16237                         fi
16238                         ;;
16239                 esac
16240                 case "$CPPFLAGS" in
16241                 (*$cf_add_cflags)
16242                         ;;
16243                 (*)
16244                         case "$cf_add_cflags" in
16245                         (-D*)
16246                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16247
16248 CPPFLAGS=`echo "$CPPFLAGS" | \
16249         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16250                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16251
16252                                 ;;
16253                         esac
16254
16255         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16256         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16257
16258                         ;;
16259                 esac
16260                 ;;
16261         (*)
16262
16263         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16264         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16265
16266                 ;;
16267         esac
16268         ;;
16269 (yes)
16270
16271         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16272         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16273
16274         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16275
16276         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16277                 && test -z "${cf_tst_cflags}" \
16278                 && cf_fix_cppflags=no
16279         ;;
16280 esac
16281 done
16282
16283 if test -n "$cf_new_cflags" ; then
16284
16285         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16286         CFLAGS="${CFLAGS}$cf_new_cflags"
16287
16288 fi
16289
16290 if test -n "$cf_new_cppflags" ; then
16291
16292         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16293         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16294
16295 fi
16296
16297 if test -n "$cf_new_extra_cppflags" ; then
16298
16299         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16300         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16301
16302 fi
16303
16304 CXXFLAGS="$CFLAGS"
16305 CFLAGS="$cf_save_CXXFLAGS"
16306
16307                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16308                 fi
16309                 ac_ext=c
16310 ac_cpp='$CPP $CPPFLAGS'
16311 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16312 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16314 ac_main_return="return"
16315
16316         fi
16317 fi
16318
16319 ###   use option --enable-interop to turn on use of bindings used for interop
16320 echo "$as_me:16320: checking if you want interop bindings" >&5
16321 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16322
16323 # Check whether --enable-interop or --disable-interop was given.
16324 if test "${enable_interop+set}" = set; then
16325   enableval="$enable_interop"
16326   with_exp_interop=$enableval
16327 else
16328   with_exp_interop=$cf_dft_interop
16329 fi;
16330 echo "$as_me:16330: result: $with_exp_interop" >&5
16331 echo "${ECHO_T}$with_exp_interop" >&6
16332
16333 NCURSES_INTEROP_FUNCS=0
16334 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16335
16336 echo "$as_me:16336: checking if you want experimental safe-sprintf code" >&5
16337 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16338
16339 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16340 if test "${enable_safe_sprintf+set}" = set; then
16341   enableval="$enable_safe_sprintf"
16342   with_safe_sprintf=$enableval
16343 else
16344   with_safe_sprintf=no
16345 fi;
16346 echo "$as_me:16346: result: $with_safe_sprintf" >&5
16347 echo "${ECHO_T}$with_safe_sprintf" >&6
16348
16349 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16350 # when hashmap is used scroll hints are useless
16351 if test "$with_hashmap" = no ; then
16352 echo "$as_me:16352: checking if you want to experiment without scrolling-hints code" >&5
16353 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16354
16355 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16356 if test "${enable_scroll_hints+set}" = set; then
16357   enableval="$enable_scroll_hints"
16358   with_scroll_hints=$enableval
16359 else
16360   with_scroll_hints=yes
16361 fi;
16362 echo "$as_me:16362: result: $with_scroll_hints" >&5
16363 echo "${ECHO_T}$with_scroll_hints" >&6
16364 test "x$with_scroll_hints" = xyes &&
16365 cat >>confdefs.h <<\EOF
16366 #define USE_SCROLL_HINTS 1
16367 EOF
16368
16369 fi
16370
16371 echo "$as_me:16371: checking if you want wgetch-events code" >&5
16372 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16373
16374 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16375 if test "${enable_wgetch_events+set}" = set; then
16376   enableval="$enable_wgetch_events"
16377   with_wgetch_events=$enableval
16378 else
16379   with_wgetch_events=no
16380 fi;
16381 echo "$as_me:16381: result: $with_wgetch_events" >&5
16382 echo "${ECHO_T}$with_wgetch_events" >&6
16383 if test "x$with_wgetch_events" = xyes ; then
16384
16385 cat >>confdefs.h <<\EOF
16386 #define NCURSES_WGETCH_EVENTS 1
16387 EOF
16388
16389         NCURSES_WGETCH_EVENTS=1
16390 else
16391         NCURSES_WGETCH_EVENTS=0
16392 fi
16393
16394 case "$cf_cv_system_name" in
16395 (*mingw32*|*mingw64*|*-msvc*)
16396         echo "$as_me:16396: checking if you want experimental-Windows driver" >&5
16397 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16398
16399 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16400 if test "${enable_exp_win32+set}" = set; then
16401   enableval="$enable_exp_win32"
16402   with_exp_win32=$enableval
16403 else
16404   with_exp_win32=no
16405 fi;
16406         echo "$as_me:16406: result: $with_exp_win32" >&5
16407 echo "${ECHO_T}$with_exp_win32" >&6
16408         if test "x$with_exp_win32" = xyes
16409         then
16410
16411 cat >>confdefs.h <<\EOF
16412 #define EXP_WIN32_DRIVER 1
16413 EOF
16414
16415                 EXP_WIN32_DRIVER=1
16416                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16417         else
16418                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16419                 EXP_WIN32_DRIVER=0
16420         fi
16421         ;;
16422 (*)
16423         EXP_WIN32_DRIVER=0
16424         INTERNALS_HDR=
16425         ;;
16426 esac
16427
16428 ###############################################################################
16429
16430 ###     use option --disable-echo to suppress full display compiling commands
16431
16432 echo "$as_me:16432: checking if you want to see long compiling messages" >&5
16433 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16434
16435 # Check whether --enable-echo or --disable-echo was given.
16436 if test "${enable_echo+set}" = set; then
16437   enableval="$enable_echo"
16438   test "$enableval" != no && enableval=yes
16439         if test "$enableval" != "yes" ; then
16440
16441         ECHO_LT='--silent'
16442         ECHO_LD='@echo linking $@;'
16443         RULE_CC='@echo compiling $<'
16444         SHOW_CC='@echo compiling $@'
16445         ECHO_CC='@'
16446
16447         else
16448
16449         ECHO_LT=''
16450         ECHO_LD=''
16451         RULE_CC=''
16452         SHOW_CC=''
16453         ECHO_CC=''
16454
16455         fi
16456 else
16457   enableval=yes
16458
16459         ECHO_LT=''
16460         ECHO_LD=''
16461         RULE_CC=''
16462         SHOW_CC=''
16463         ECHO_CC=''
16464
16465 fi;
16466 echo "$as_me:16466: result: $enableval" >&5
16467 echo "${ECHO_T}$enableval" >&6
16468
16469 if test "x$enable_echo" = xyes; then
16470         ECHO_LINK=
16471 else
16472         ECHO_LINK='@ echo linking $@ ... ;'
16473         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16474         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16475 fi
16476
16477 # --disable-stripping is used for debugging
16478
16479 echo "$as_me:16479: checking if you want to install stripped executables" >&5
16480 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16481
16482 # Check whether --enable-stripping or --disable-stripping was given.
16483 if test "${enable_stripping+set}" = set; then
16484   enableval="$enable_stripping"
16485   test "$enableval" != no && enableval=yes
16486         if test "$enableval" != "yes" ; then
16487     enable_stripping=no
16488         else
16489                 enable_stripping=yes
16490         fi
16491 else
16492   enableval=yes
16493         enable_stripping=yes
16494
16495 fi;
16496 echo "$as_me:16496: result: $enable_stripping" >&5
16497 echo "${ECHO_T}$enable_stripping" >&6
16498
16499 if test "$enable_stripping" = yes
16500 then
16501         INSTALL_OPT_S="-s"
16502 else
16503         INSTALL_OPT_S=
16504 fi
16505
16506 : "${INSTALL:=install}"
16507 echo "$as_me:16507: checking if install accepts -p option" >&5
16508 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16509 if test "${cf_cv_install_p+set}" = set; then
16510   echo $ECHO_N "(cached) $ECHO_C" >&6
16511 else
16512
16513         rm -rf ./conftest*
16514         date >conftest.in
16515         mkdir conftest.out
16516         sleep 3
16517         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16518         then
16519                 if test -f conftest.out/conftest.in
16520                 then
16521                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16522                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16523                         if test -s conftest.err
16524                         then
16525                                 cf_cv_install_p=no
16526                         else
16527                                 cf_cv_install_p=yes
16528                         fi
16529                 else
16530                         cf_cv_install_p=no
16531                 fi
16532         else
16533                 cf_cv_install_p=no
16534         fi
16535         rm -rf ./conftest*
16536
16537 fi
16538 echo "$as_me:16538: result: $cf_cv_install_p" >&5
16539 echo "${ECHO_T}$cf_cv_install_p" >&6
16540
16541 echo "$as_me:16541: checking if install needs to be told about ownership" >&5
16542 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16543 case `$ac_config_guess` in
16544 (*minix)
16545         with_install_o=yes
16546         ;;
16547 (*)
16548         with_install_o=no
16549         ;;
16550 esac
16551
16552 echo "$as_me:16552: result: $with_install_o" >&5
16553 echo "${ECHO_T}$with_install_o" >&6
16554 if test "x$with_install_o" = xyes
16555 then
16556         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'`"
16557 else
16558         INSTALL_OPT_O=
16559 fi
16560
16561 # If we're avoiding relinking of shared libraries during install, that is to
16562 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16563 # the install program has "-p" (for preserving timestamps).
16564 cf_cv_do_reranlib=yes
16565 if test "x$cf_cv_install_p" = xyes
16566 then
16567         if test "x$cf_cv_do_relink" != xyes
16568         then
16569                 cf_cv_do_reranlib=no
16570                 INSTALL_OPT_P="-p"
16571                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16572         fi
16573 fi
16574
16575 ###     use option --enable-warnings to turn on all gcc warnings
16576
16577 echo "$as_me:16577: checking if you want to use C11 _Noreturn feature" >&5
16578 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16579
16580 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16581 if test "${enable_stdnoreturn+set}" = set; then
16582   enableval="$enable_stdnoreturn"
16583   test "$enableval" != yes && enableval=no
16584         if test "$enableval" != "no" ; then
16585     enable_stdnoreturn=yes
16586         else
16587                 enable_stdnoreturn=no
16588         fi
16589 else
16590   enableval=no
16591         enable_stdnoreturn=no
16592
16593 fi;
16594 echo "$as_me:16594: result: $enable_stdnoreturn" >&5
16595 echo "${ECHO_T}$enable_stdnoreturn" >&6
16596
16597 if test $enable_stdnoreturn = yes; then
16598 echo "$as_me:16598: checking for C11 _Noreturn feature" >&5
16599 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16600 if test "${cf_cv_c11_noreturn+set}" = set; then
16601   echo $ECHO_N "(cached) $ECHO_C" >&6
16602 else
16603   cat >"conftest.$ac_ext" <<_ACEOF
16604 #line 16604 "configure"
16605 #include "confdefs.h"
16606
16607 #include <stdio.h>
16608 #include <stdlib.h>
16609 #include <stdnoreturn.h>
16610 static _Noreturn void giveup(void) { exit(0); }
16611
16612 int
16613 main (void)
16614 {
16615 if (feof(stdin)) giveup()
16616   ;
16617   return 0;
16618 }
16619 _ACEOF
16620 rm -f "conftest.$ac_objext"
16621 if { (eval echo "$as_me:16621: \"$ac_compile\"") >&5
16622   (eval $ac_compile) 2>&5
16623   ac_status=$?
16624   echo "$as_me:16624: \$? = $ac_status" >&5
16625   (exit "$ac_status"); } &&
16626          { ac_try='test -s "conftest.$ac_objext"'
16627   { (eval echo "$as_me:16627: \"$ac_try\"") >&5
16628   (eval $ac_try) 2>&5
16629   ac_status=$?
16630   echo "$as_me:16630: \$? = $ac_status" >&5
16631   (exit "$ac_status"); }; }; then
16632   cf_cv_c11_noreturn=yes
16633 else
16634   echo "$as_me: failed program was:" >&5
16635 cat "conftest.$ac_ext" >&5
16636 cf_cv_c11_noreturn=no
16637 fi
16638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16639
16640 fi
16641 echo "$as_me:16641: result: $cf_cv_c11_noreturn" >&5
16642 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16643 else
16644         cf_cv_c11_noreturn=no,
16645 fi
16646
16647 if test "$cf_cv_c11_noreturn" = yes; then
16648
16649 cat >>confdefs.h <<\EOF
16650 #define HAVE_STDNORETURN_H 1
16651 EOF
16652
16653 cat >>confdefs.h <<EOF
16654 #define STDC_NORETURN _Noreturn
16655 EOF
16656
16657         HAVE_STDNORETURN_H=1
16658 else
16659         HAVE_STDNORETURN_H=0
16660 fi
16661
16662 if test "$GCC" = yes || test "$GXX" = yes
16663 then
16664
16665 if test "$GCC" = yes || test "$GXX" = yes
16666 then
16667         case $CFLAGS in
16668         (*-Werror=*)
16669                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16670
16671 echo "${as_me:-configure}:16671: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16672
16673                 cf_temp_flags=
16674                 for cf_temp_scan in $CFLAGS
16675                 do
16676                         case "x$cf_temp_scan" in
16677                         (x-Werror=*)
16678
16679         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16680         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16681
16682                                 ;;
16683                         (*)
16684
16685         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16686         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16687
16688                                 ;;
16689                         esac
16690                 done
16691                 CFLAGS="$cf_temp_flags"
16692                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16693
16694 echo "${as_me:-configure}:16694: testing ... fixed $CFLAGS ..." 1>&5
16695
16696                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16697
16698 echo "${as_me:-configure}:16698: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16699
16700                 ;;
16701         esac
16702 fi
16703
16704 if test "$GCC" = yes || test "$GXX" = yes
16705 then
16706         case $CPPFLAGS in
16707         (*-Werror=*)
16708                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16709
16710 echo "${as_me:-configure}:16710: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16711
16712                 cf_temp_flags=
16713                 for cf_temp_scan in $CPPFLAGS
16714                 do
16715                         case "x$cf_temp_scan" in
16716                         (x-Werror=*)
16717
16718         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16719         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16720
16721                                 ;;
16722                         (*)
16723
16724         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16725         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16726
16727                                 ;;
16728                         esac
16729                 done
16730                 CPPFLAGS="$cf_temp_flags"
16731                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16732
16733 echo "${as_me:-configure}:16733: testing ... fixed $CPPFLAGS ..." 1>&5
16734
16735                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16736
16737 echo "${as_me:-configure}:16737: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16738
16739                 ;;
16740         esac
16741 fi
16742
16743 if test "$GCC" = yes || test "$GXX" = yes
16744 then
16745         case $LDFLAGS in
16746         (*-Werror=*)
16747                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16748
16749 echo "${as_me:-configure}:16749: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16750
16751                 cf_temp_flags=
16752                 for cf_temp_scan in $LDFLAGS
16753                 do
16754                         case "x$cf_temp_scan" in
16755                         (x-Werror=*)
16756
16757         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16758         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16759
16760                                 ;;
16761                         (*)
16762
16763         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16764         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16765
16766                                 ;;
16767                         esac
16768                 done
16769                 LDFLAGS="$cf_temp_flags"
16770                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16771
16772 echo "${as_me:-configure}:16772: testing ... fixed $LDFLAGS ..." 1>&5
16773
16774                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16775
16776 echo "${as_me:-configure}:16776: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16777
16778                 ;;
16779         esac
16780 fi
16781
16782 echo "$as_me:16782: checking if you want to turn on gcc warnings" >&5
16783 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16784
16785 # Check whether --enable-warnings or --disable-warnings was given.
16786 if test "${enable_warnings+set}" = set; then
16787   enableval="$enable_warnings"
16788   test "$enableval" != yes && enableval=no
16789         if test "$enableval" != "no" ; then
16790     enable_warnings=yes
16791         else
16792                 enable_warnings=no
16793         fi
16794 else
16795   enableval=no
16796         enable_warnings=no
16797
16798 fi;
16799 echo "$as_me:16799: result: $enable_warnings" >&5
16800 echo "${ECHO_T}$enable_warnings" >&6
16801 if test "$enable_warnings" = "yes"
16802 then
16803
16804 if test "x$have_x" = xyes; then
16805
16806 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16807 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16808 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16809 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16810 for cf_X_CFLAGS in $X_CFLAGS
16811 do
16812         case "x$cf_X_CFLAGS" in
16813         x-[IUD]*)
16814                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16815                 ;;
16816         *)
16817                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16818                 ;;
16819         esac
16820 done
16821
16822 cat >"conftest.$ac_ext" <<_ACEOF
16823 #line 16823 "configure"
16824 #include "confdefs.h"
16825
16826 #include <stdlib.h>
16827 #include <X11/Intrinsic.h>
16828
16829 int
16830 main (void)
16831 {
16832 String foo = malloc(1); free((void*)foo)
16833   ;
16834   return 0;
16835 }
16836 _ACEOF
16837 rm -f "conftest.$ac_objext"
16838 if { (eval echo "$as_me:16838: \"$ac_compile\"") >&5
16839   (eval $ac_compile) 2>&5
16840   ac_status=$?
16841   echo "$as_me:16841: \$? = $ac_status" >&5
16842   (exit "$ac_status"); } &&
16843          { ac_try='test -s "conftest.$ac_objext"'
16844   { (eval echo "$as_me:16844: \"$ac_try\"") >&5
16845   (eval $ac_try) 2>&5
16846   ac_status=$?
16847   echo "$as_me:16847: \$? = $ac_status" >&5
16848   (exit "$ac_status"); }; }; then
16849
16850 echo "$as_me:16850: checking for X11/Xt const-feature" >&5
16851 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16852 if test "${cf_cv_const_x_string+set}" = set; then
16853   echo $ECHO_N "(cached) $ECHO_C" >&6
16854 else
16855
16856         cat >"conftest.$ac_ext" <<_ACEOF
16857 #line 16857 "configure"
16858 #include "confdefs.h"
16859
16860 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16861 #undef  XTSTRINGDEFINES /* X11R5 and later */
16862 #include <stdlib.h>
16863 #include <X11/Intrinsic.h>
16864
16865 int
16866 main (void)
16867 {
16868 String foo = malloc(1); *foo = 0
16869   ;
16870   return 0;
16871 }
16872 _ACEOF
16873 rm -f "conftest.$ac_objext"
16874 if { (eval echo "$as_me:16874: \"$ac_compile\"") >&5
16875   (eval $ac_compile) 2>&5
16876   ac_status=$?
16877   echo "$as_me:16877: \$? = $ac_status" >&5
16878   (exit "$ac_status"); } &&
16879          { ac_try='test -s "conftest.$ac_objext"'
16880   { (eval echo "$as_me:16880: \"$ac_try\"") >&5
16881   (eval $ac_try) 2>&5
16882   ac_status=$?
16883   echo "$as_me:16883: \$? = $ac_status" >&5
16884   (exit "$ac_status"); }; }; then
16885
16886                         cf_cv_const_x_string=no
16887
16888 else
16889   echo "$as_me: failed program was:" >&5
16890 cat "conftest.$ac_ext" >&5
16891
16892                         cf_cv_const_x_string=yes
16893
16894 fi
16895 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16896
16897 fi
16898 echo "$as_me:16898: result: $cf_cv_const_x_string" >&5
16899 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16900
16901 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16902 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16903 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16904
16905 case "$cf_cv_const_x_string" in
16906 (no)
16907
16908         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16909         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16910
16911         ;;
16912 (*)
16913
16914         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16915         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16916
16917         ;;
16918 esac
16919
16920 else
16921   echo "$as_me: failed program was:" >&5
16922 cat "conftest.$ac_ext" >&5
16923 fi
16924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16925  fi
16926 cat > "conftest.$ac_ext" <<EOF
16927 #line 16927 "${as_me:-configure}"
16928 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16929 EOF
16930 if test "$INTEL_COMPILER" = yes
16931 then
16932 # The "-wdXXX" options suppress warnings:
16933 # remark #1419: external declaration in primary source file
16934 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16935 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16936 # remark #193: zero used for undefined preprocessing identifier
16937 # remark #593: variable "curs_sb_left_arrow" was set but never used
16938 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16939 # remark #869: parameter "tw" was never referenced
16940 # remark #981: operands are evaluated in unspecified order
16941 # warning #279: controlling expression is constant
16942
16943         { echo "$as_me:16943: checking for $CC warning options..." >&5
16944 echo "$as_me: checking for $CC warning options..." >&6;}
16945         cf_save_CFLAGS="$CFLAGS"
16946         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16947         for cf_opt in \
16948                 wd1419 \
16949                 wd1683 \
16950                 wd1684 \
16951                 wd193 \
16952                 wd593 \
16953                 wd279 \
16954                 wd810 \
16955                 wd869 \
16956                 wd981
16957         do
16958                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16959                 if { (eval echo "$as_me:16959: \"$ac_compile\"") >&5
16960   (eval $ac_compile) 2>&5
16961   ac_status=$?
16962   echo "$as_me:16962: \$? = $ac_status" >&5
16963   (exit "$ac_status"); }; then
16964                         test -n "$verbose" && echo "$as_me:16964: result: ... -$cf_opt" >&5
16965 echo "${ECHO_T}... -$cf_opt" >&6
16966                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16967                 fi
16968         done
16969         CFLAGS="$cf_save_CFLAGS"
16970 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16971 then
16972         { echo "$as_me:16972: checking for $CC warning options..." >&5
16973 echo "$as_me: checking for $CC warning options..." >&6;}
16974         cf_save_CFLAGS="$CFLAGS"
16975         cf_warn_CONST=""
16976         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16977         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16978         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16979         for cf_opt in W Wall \
16980                 Wbad-function-cast \
16981                 Wcast-align \
16982                 Wcast-qual \
16983                 Wdeclaration-after-statement \
16984                 Wextra \
16985                 Winline \
16986                 Wmissing-declarations \
16987                 Wmissing-prototypes \
16988                 Wnested-externs \
16989                 Wpointer-arith \
16990                 Wshadow \
16991                 Wstrict-prototypes \
16992                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16993         do
16994                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16995                 if { (eval echo "$as_me:16995: \"$ac_compile\"") >&5
16996   (eval $ac_compile) 2>&5
16997   ac_status=$?
16998   echo "$as_me:16998: \$? = $ac_status" >&5
16999   (exit "$ac_status"); }; then
17000                         test -n "$verbose" && echo "$as_me:17000: result: ... -$cf_opt" >&5
17001 echo "${ECHO_T}... -$cf_opt" >&6
17002                         case "$cf_opt" in
17003                         (Winline)
17004                                 case "$GCC_VERSION" in
17005                                 ([34].*)
17006                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17007
17008 echo "${as_me:-configure}:17008: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17009
17010                                         continue;;
17011                                 esac
17012                                 ;;
17013                         (Wpointer-arith)
17014                                 case "$GCC_VERSION" in
17015                                 ([12].*)
17016                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17017
17018 echo "${as_me:-configure}:17018: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17019
17020                                         continue;;
17021                                 esac
17022                                 ;;
17023                         esac
17024                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17025                 fi
17026         done
17027         CFLAGS="$cf_save_CFLAGS"
17028 fi
17029 rm -rf ./conftest*
17030
17031 fi
17032
17033 if test "$GCC" = yes || test "$GXX" = yes
17034 then
17035 cat > conftest.i <<EOF
17036 #ifndef GCC_PRINTF
17037 #define GCC_PRINTF 0
17038 #endif
17039 #ifndef GCC_SCANF
17040 #define GCC_SCANF 0
17041 #endif
17042 #ifndef GCC_NORETURN
17043 #define GCC_NORETURN /* nothing */
17044 #endif
17045 #ifndef GCC_UNUSED
17046 #define GCC_UNUSED /* nothing */
17047 #endif
17048 EOF
17049 if test "$GCC" = yes
17050 then
17051         { echo "$as_me:17051: checking for $CC __attribute__ directives..." >&5
17052 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17053 cat > "conftest.$ac_ext" <<EOF
17054 #line 17054 "${as_me:-configure}"
17055 #include "confdefs.h"
17056 #include "conftest.h"
17057 #include "conftest.i"
17058 #if     GCC_PRINTF
17059 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17060 #else
17061 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17062 #endif
17063 #if     GCC_SCANF
17064 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17065 #else
17066 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17067 #endif
17068 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17069 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17070 extern GCC_NORETURN void foo(void);
17071 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17072 EOF
17073         cf_printf_attribute=no
17074         cf_scanf_attribute=no
17075         for cf_attribute in scanf printf unused noreturn
17076         do
17077
17078 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17079
17080                 cf_directive="__attribute__(($cf_attribute))"
17081                 echo "checking for $CC $cf_directive" 1>&5
17082
17083                 case "$cf_attribute" in
17084                 (printf)
17085                         cf_printf_attribute=yes
17086                         cat >conftest.h <<EOF
17087 #define GCC_$cf_ATTRIBUTE 1
17088 EOF
17089                         ;;
17090                 (scanf)
17091                         cf_scanf_attribute=yes
17092                         cat >conftest.h <<EOF
17093 #define GCC_$cf_ATTRIBUTE 1
17094 EOF
17095                         ;;
17096                 (*)
17097                         cat >conftest.h <<EOF
17098 #define GCC_$cf_ATTRIBUTE $cf_directive
17099 EOF
17100                         ;;
17101                 esac
17102
17103                 if { (eval echo "$as_me:17103: \"$ac_compile\"") >&5
17104   (eval $ac_compile) 2>&5
17105   ac_status=$?
17106   echo "$as_me:17106: \$? = $ac_status" >&5
17107   (exit "$ac_status"); }; then
17108                         test -n "$verbose" && echo "$as_me:17108: result: ... $cf_attribute" >&5
17109 echo "${ECHO_T}... $cf_attribute" >&6
17110                         cat conftest.h >>confdefs.h
17111                         case "$cf_attribute" in
17112                         (noreturn)
17113
17114 cat >>confdefs.h <<EOF
17115 #define GCC_NORETURN $cf_directive
17116 EOF
17117
17118                                 ;;
17119                         (printf)
17120                                 cf_value='/* nothing */'
17121                                 if test "$cf_printf_attribute" != no ; then
17122                                         cf_value='__attribute__((format(printf,fmt,var)))'
17123
17124 cat >>confdefs.h <<\EOF
17125 #define GCC_PRINTF 1
17126 EOF
17127
17128                                 fi
17129
17130 cat >>confdefs.h <<EOF
17131 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17132 EOF
17133
17134                                 ;;
17135                         (scanf)
17136                                 cf_value='/* nothing */'
17137                                 if test "$cf_scanf_attribute" != no ; then
17138                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17139
17140 cat >>confdefs.h <<\EOF
17141 #define GCC_SCANF 1
17142 EOF
17143
17144                                 fi
17145
17146 cat >>confdefs.h <<EOF
17147 #define GCC_SCANFLIKE(fmt,var) $cf_value
17148 EOF
17149
17150                                 ;;
17151                         (unused)
17152
17153 cat >>confdefs.h <<EOF
17154 #define GCC_UNUSED $cf_directive
17155 EOF
17156
17157                                 ;;
17158                         esac
17159                 fi
17160         done
17161 else
17162         ${FGREP-fgrep} define conftest.i >>confdefs.h
17163 fi
17164 rm -rf ./conftest*
17165 fi
17166
17167 fi
17168
17169 if test "x$enable_warnings" = "xyes"; then
17170
17171         ADAFLAGS="$ADAFLAGS -gnatg"
17172
17173         if test "x$cf_with_cxx" = xyes ; then
17174
17175 INTEL_CPLUSPLUS=no
17176
17177 if test "$GCC" = yes ; then
17178         case "$host_os" in
17179         (linux*|gnu*)
17180                 echo "$as_me:17180: checking if this is really Intel C++ compiler" >&5
17181 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17182                 cf_save_CFLAGS="$CXXFLAGS"
17183                 CXXFLAGS="$CXXFLAGS -no-gcc"
17184                 cat >"conftest.$ac_ext" <<_ACEOF
17185 #line 17185 "configure"
17186 #include "confdefs.h"
17187
17188 int
17189 main (void)
17190 {
17191
17192 #ifdef __INTEL_COMPILER
17193 #else
17194 make an error
17195 #endif
17196
17197   ;
17198   return 0;
17199 }
17200 _ACEOF
17201 rm -f "conftest.$ac_objext"
17202 if { (eval echo "$as_me:17202: \"$ac_compile\"") >&5
17203   (eval $ac_compile) 2>&5
17204   ac_status=$?
17205   echo "$as_me:17205: \$? = $ac_status" >&5
17206   (exit "$ac_status"); } &&
17207          { ac_try='test -s "conftest.$ac_objext"'
17208   { (eval echo "$as_me:17208: \"$ac_try\"") >&5
17209   (eval $ac_try) 2>&5
17210   ac_status=$?
17211   echo "$as_me:17211: \$? = $ac_status" >&5
17212   (exit "$ac_status"); }; }; then
17213   INTEL_CPLUSPLUS=yes
17214 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17215
17216 else
17217   echo "$as_me: failed program was:" >&5
17218 cat "conftest.$ac_ext" >&5
17219 fi
17220 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17221                 CXXFLAGS="$cf_save_CFLAGS"
17222                 echo "$as_me:17222: result: $INTEL_CPLUSPLUS" >&5
17223 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17224                 ;;
17225         esac
17226 fi
17227
17228 CLANG_CPLUSPLUS=no
17229
17230 if test "$GCC" = yes ; then
17231         echo "$as_me:17231: checking if this is really Clang C++ compiler" >&5
17232 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17233         cf_save_CFLAGS="$CXXFLAGS"
17234         cat >"conftest.$ac_ext" <<_ACEOF
17235 #line 17235 "configure"
17236 #include "confdefs.h"
17237
17238 int
17239 main (void)
17240 {
17241
17242 #ifdef __clang__
17243 #else
17244 make an error
17245 #endif
17246
17247   ;
17248   return 0;
17249 }
17250 _ACEOF
17251 rm -f "conftest.$ac_objext"
17252 if { (eval echo "$as_me:17252: \"$ac_compile\"") >&5
17253   (eval $ac_compile) 2>&5
17254   ac_status=$?
17255   echo "$as_me:17255: \$? = $ac_status" >&5
17256   (exit "$ac_status"); } &&
17257          { ac_try='test -s "conftest.$ac_objext"'
17258   { (eval echo "$as_me:17258: \"$ac_try\"") >&5
17259   (eval $ac_try) 2>&5
17260   ac_status=$?
17261   echo "$as_me:17261: \$? = $ac_status" >&5
17262   (exit "$ac_status"); }; }; then
17263   CLANG_CPLUSPLUS=yes
17264
17265 else
17266   echo "$as_me: failed program was:" >&5
17267 cat "conftest.$ac_ext" >&5
17268 fi
17269 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17270         CXXFLAGS="$cf_save_CFLAGS"
17271         echo "$as_me:17271: result: $CLANG_CPLUSPLUS" >&5
17272 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17273 fi
17274
17275 CLANG_VERSION=none
17276
17277 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17278         case "$CC" in
17279         (c[1-9][0-9]|*/c[1-9][0-9])
17280                 { echo "$as_me:17280: WARNING: replacing broken compiler alias $CC" >&5
17281 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17282                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17283                 CC=clang
17284                 ;;
17285         esac
17286
17287         echo "$as_me:17287: checking version of $CC" >&5
17288 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17289         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
17290         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17291         echo "$as_me:17291: result: $CLANG_VERSION" >&5
17292 echo "${ECHO_T}$CLANG_VERSION" >&6
17293
17294         for cf_clang_opt in \
17295                 -Qunused-arguments \
17296                 -Wno-error=implicit-function-declaration
17297         do
17298                 echo "$as_me:17298: checking if option $cf_clang_opt works" >&5
17299 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17300                 cf_save_CFLAGS="$CFLAGS"
17301                 CFLAGS="$CFLAGS $cf_clang_opt"
17302                 cat >"conftest.$ac_ext" <<_ACEOF
17303 #line 17303 "configure"
17304 #include "confdefs.h"
17305
17306                         #include <stdio.h>
17307 int
17308 main (void)
17309 {
17310
17311                         printf("hello!\\n");
17312   ;
17313   return 0;
17314 }
17315 _ACEOF
17316 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17317 if { (eval echo "$as_me:17317: \"$ac_link\"") >&5
17318   (eval $ac_link) 2>&5
17319   ac_status=$?
17320   echo "$as_me:17320: \$? = $ac_status" >&5
17321   (exit "$ac_status"); } &&
17322          { ac_try='test -s "conftest$ac_exeext"'
17323   { (eval echo "$as_me:17323: \"$ac_try\"") >&5
17324   (eval $ac_try) 2>&5
17325   ac_status=$?
17326   echo "$as_me:17326: \$? = $ac_status" >&5
17327   (exit "$ac_status"); }; }; then
17328
17329                         cf_clang_optok=yes
17330 else
17331   echo "$as_me: failed program was:" >&5
17332 cat "conftest.$ac_ext" >&5
17333
17334                         cf_clang_optok=no
17335 fi
17336 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17337                 echo "$as_me:17337: result: $cf_clang_optok" >&5
17338 echo "${ECHO_T}$cf_clang_optok" >&6
17339                 CFLAGS="$cf_save_CFLAGS"
17340                 if test "$cf_clang_optok" = yes; then
17341                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17342
17343 echo "${as_me:-configure}:17343: testing adding option $cf_clang_opt ..." 1>&5
17344
17345         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17346         CFLAGS="${CFLAGS}$cf_clang_opt"
17347
17348                 fi
17349         done
17350 fi
17351
17352 ac_ext=cc
17353 ac_cpp='$CXXCPP $CPPFLAGS'
17354 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17355 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17356 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17357 ac_main_return="return"
17358
17359 cat > conftest.$ac_ext <<EOF
17360 #line 17360 "configure"
17361 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17362 EOF
17363
17364 if test "$INTEL_CPLUSPLUS" = yes
17365 then
17366 # The "-wdXXX" options suppress warnings:
17367 # remark #1419: external declaration in primary source file
17368 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17369 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17370 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17371 # remark #193: zero used for undefined preprocessing identifier
17372 # remark #593: variable "curs_sb_left_arrow" was set but never used
17373 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17374 # remark #869: parameter "tw" was never referenced
17375 # remark #981: operands are evaluated in unspecified order
17376 # warning #269: invalid format string conversion
17377
17378         { echo "$as_me:17378: checking for $CC warning options..." >&5
17379 echo "$as_me: checking for $CC warning options..." >&6;}
17380         cf_save_CXXFLAGS="$CXXFLAGS"
17381         EXTRA_CXXFLAGS="-Wall"
17382         for cf_opt in \
17383                 wd1419 \
17384                 wd1682 \
17385                 wd1683 \
17386                 wd1684 \
17387                 wd193 \
17388                 wd279 \
17389                 wd593 \
17390                 wd810 \
17391                 wd869 \
17392                 wd981
17393         do
17394                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17395                 if { (eval echo "$as_me:17395: \"$ac_compile\"") >&5
17396   (eval $ac_compile) 2>&5
17397   ac_status=$?
17398   echo "$as_me:17398: \$? = $ac_status" >&5
17399   (exit "$ac_status"); }; then
17400                         test -n "$verbose" && echo "$as_me:17400: result: ... -$cf_opt" >&5
17401 echo "${ECHO_T}... -$cf_opt" >&6
17402                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17403                 fi
17404         done
17405         CXXFLAGS="$cf_save_CXXFLAGS"
17406
17407 elif test "$GXX" = yes
17408 then
17409         { echo "$as_me:17409: checking for $CXX warning options..." >&5
17410 echo "$as_me: checking for $CXX warning options..." >&6;}
17411         cf_save_CXXFLAGS="$CXXFLAGS"
17412         EXTRA_CXXFLAGS="-W -Wall"
17413         cf_gxx_extra_warnings=""
17414         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17415         case "$GXX_VERSION" in
17416         ([1-2].*)
17417                 ;;
17418         (*)
17419                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17420                 ;;
17421         esac
17422         for cf_opt in \
17423                 Wabi \
17424                 fabi-version=0 \
17425                 Wextra \
17426                 Wignored-qualifiers \
17427                 Wlogical-op \
17428                 Woverloaded-virtual \
17429                 Wsign-promo \
17430                 Wsynth \
17431                 Wold-style-cast \
17432                 Wcast-align \
17433                 Wcast-qual \
17434                 Wpointer-arith \
17435                 Wshadow \
17436                 Wundef $cf_gxx_extra_warnings Wno-unused
17437         do
17438                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17439                 if { (eval echo "$as_me:17439: \"$ac_compile\"") >&5
17440   (eval $ac_compile) 2>&5
17441   ac_status=$?
17442   echo "$as_me:17442: \$? = $ac_status" >&5
17443   (exit "$ac_status"); }; then
17444                         test -n "$verbose" && echo "$as_me:17444: result: ... -$cf_opt" >&5
17445 echo "${ECHO_T}... -$cf_opt" >&6
17446                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17447                 else
17448                         test -n "$verbose" && echo "$as_me:17448: result: ... no -$cf_opt" >&5
17449 echo "${ECHO_T}... no -$cf_opt" >&6
17450                 fi
17451         done
17452         CXXFLAGS="$cf_save_CXXFLAGS"
17453 fi
17454
17455 rm -rf ./conftest*
17456 ac_ext=c
17457 ac_cpp='$CPP $CPPFLAGS'
17458 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17459 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17460 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17461 ac_main_return="return"
17462
17463         fi
17464 fi
17465
17466 echo "$as_me:17466: checking if you want to work around bogus compiler/loader warnings" >&5
17467 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17468
17469 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17470 if test "${enable_string_hacks+set}" = set; then
17471   enableval="$enable_string_hacks"
17472   enable_string_hacks=$enableval
17473 else
17474   enable_string_hacks=no
17475 fi;
17476 echo "$as_me:17476: result: $enable_string_hacks" >&5
17477 echo "${ECHO_T}$enable_string_hacks" >&6
17478
17479 if test "x$enable_string_hacks" = "xyes"; then
17480
17481 cat >>confdefs.h <<\EOF
17482 #define USE_STRING_HACKS 1
17483 EOF
17484
17485         { echo "$as_me:17485: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17486 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17487         echo "$as_me:17487: checking for strlcat" >&5
17488 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17489 if test "${ac_cv_func_strlcat+set}" = set; then
17490   echo $ECHO_N "(cached) $ECHO_C" >&6
17491 else
17492   cat >"conftest.$ac_ext" <<_ACEOF
17493 #line 17493 "configure"
17494 #include "confdefs.h"
17495 #define strlcat autoconf_temporary
17496 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17497 #undef strlcat
17498
17499 #ifdef __cplusplus
17500 extern "C"
17501 #endif
17502
17503 /* We use char because int might match the return type of a gcc2
17504    builtin and then its argument prototype would still apply.  */
17505 char strlcat (void);
17506
17507 int
17508 main (void)
17509 {
17510
17511 /* The GNU C library defines stubs for functions which it implements
17512     to always fail with ENOSYS.  Some functions are actually named
17513     something starting with __ and the normal name is an alias.  */
17514 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17515 #error found stub for strlcat
17516 #endif
17517
17518         return strlcat ();
17519   ;
17520   return 0;
17521 }
17522 _ACEOF
17523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17524 if { (eval echo "$as_me:17524: \"$ac_link\"") >&5
17525   (eval $ac_link) 2>&5
17526   ac_status=$?
17527   echo "$as_me:17527: \$? = $ac_status" >&5
17528   (exit "$ac_status"); } &&
17529          { ac_try='test -s "conftest$ac_exeext"'
17530   { (eval echo "$as_me:17530: \"$ac_try\"") >&5
17531   (eval $ac_try) 2>&5
17532   ac_status=$?
17533   echo "$as_me:17533: \$? = $ac_status" >&5
17534   (exit "$ac_status"); }; }; then
17535   ac_cv_func_strlcat=yes
17536 else
17537   echo "$as_me: failed program was:" >&5
17538 cat "conftest.$ac_ext" >&5
17539 ac_cv_func_strlcat=no
17540 fi
17541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17542 fi
17543 echo "$as_me:17543: result: $ac_cv_func_strlcat" >&5
17544 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17545 if test "$ac_cv_func_strlcat" = yes; then
17546
17547 cat >>confdefs.h <<\EOF
17548 #define HAVE_STRLCAT 1
17549 EOF
17550
17551 else
17552
17553                 echo "$as_me:17553: checking for strlcat in -lbsd" >&5
17554 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17555 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17556   echo $ECHO_N "(cached) $ECHO_C" >&6
17557 else
17558   ac_check_lib_save_LIBS=$LIBS
17559 LIBS="-lbsd  $LIBS"
17560 cat >"conftest.$ac_ext" <<_ACEOF
17561 #line 17561 "configure"
17562 #include "confdefs.h"
17563
17564 /* Override any gcc2 internal prototype to avoid an error.  */
17565 #ifdef __cplusplus
17566 extern "C"
17567 #endif
17568 /* We use char because int might match the return type of a gcc2
17569    builtin and then its argument prototype would still apply.  */
17570 char strlcat ();
17571 int
17572 main (void)
17573 {
17574 strlcat ();
17575   ;
17576   return 0;
17577 }
17578 _ACEOF
17579 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17580 if { (eval echo "$as_me:17580: \"$ac_link\"") >&5
17581   (eval $ac_link) 2>&5
17582   ac_status=$?
17583   echo "$as_me:17583: \$? = $ac_status" >&5
17584   (exit "$ac_status"); } &&
17585          { ac_try='test -s "conftest$ac_exeext"'
17586   { (eval echo "$as_me:17586: \"$ac_try\"") >&5
17587   (eval $ac_try) 2>&5
17588   ac_status=$?
17589   echo "$as_me:17589: \$? = $ac_status" >&5
17590   (exit "$ac_status"); }; }; then
17591   ac_cv_lib_bsd_strlcat=yes
17592 else
17593   echo "$as_me: failed program was:" >&5
17594 cat "conftest.$ac_ext" >&5
17595 ac_cv_lib_bsd_strlcat=no
17596 fi
17597 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17598 LIBS=$ac_check_lib_save_LIBS
17599 fi
17600 echo "$as_me:17600: result: $ac_cv_lib_bsd_strlcat" >&5
17601 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17602 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17603
17604 cf_add_libs="$LIBS"
17605 # reverse order
17606 cf_add_0lib=
17607 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17608 # filter duplicates
17609 for cf_add_1lib in $cf_add_0lib; do
17610         for cf_add_2lib in $cf_add_libs; do
17611                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17612                         cf_add_1lib=
17613                         break
17614                 fi
17615         done
17616         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17617 done
17618 LIBS="$cf_add_libs"
17619
17620 for ac_header in bsd/string.h
17621 do
17622 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17623 echo "$as_me:17623: checking for $ac_header" >&5
17624 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17625 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17626   echo $ECHO_N "(cached) $ECHO_C" >&6
17627 else
17628   cat >"conftest.$ac_ext" <<_ACEOF
17629 #line 17629 "configure"
17630 #include "confdefs.h"
17631 #include <$ac_header>
17632 _ACEOF
17633 if { (eval echo "$as_me:17633: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17634   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17635   ac_status=$?
17636   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17637   rm -f conftest.er1
17638   cat conftest.err >&5
17639   echo "$as_me:17639: \$? = $ac_status" >&5
17640   (exit "$ac_status"); } >/dev/null; then
17641   if test -s conftest.err; then
17642     ac_cpp_err=$ac_c_preproc_warn_flag
17643   else
17644     ac_cpp_err=
17645   fi
17646 else
17647   ac_cpp_err=yes
17648 fi
17649 if test -z "$ac_cpp_err"; then
17650   eval "$as_ac_Header=yes"
17651 else
17652   echo "$as_me: failed program was:" >&5
17653   cat "conftest.$ac_ext" >&5
17654   eval "$as_ac_Header=no"
17655 fi
17656 rm -f conftest.err "conftest.$ac_ext"
17657 fi
17658 echo "$as_me:17658: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17659 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17660 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17661   cat >>confdefs.h <<EOF
17662 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17663 EOF
17664
17665 fi
17666 done
17667
17668 cat >>confdefs.h <<\EOF
17669 #define HAVE_STRLCAT 1
17670 EOF
17671
17672 fi
17673
17674 fi
17675
17676 for ac_func in strlcpy snprintf
17677 do
17678 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17679 echo "$as_me:17679: checking for $ac_func" >&5
17680 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17681 if eval "test \"\${$as_ac_var+set}\" = set"; then
17682   echo $ECHO_N "(cached) $ECHO_C" >&6
17683 else
17684   cat >"conftest.$ac_ext" <<_ACEOF
17685 #line 17685 "configure"
17686 #include "confdefs.h"
17687 #define $ac_func autoconf_temporary
17688 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17689 #undef $ac_func
17690
17691 #ifdef __cplusplus
17692 extern "C"
17693 #endif
17694
17695 /* We use char because int might match the return type of a gcc2
17696    builtin and then its argument prototype would still apply.  */
17697 char $ac_func (void);
17698
17699 int
17700 main (void)
17701 {
17702
17703 /* The GNU C library defines stubs for functions which it implements
17704     to always fail with ENOSYS.  Some functions are actually named
17705     something starting with __ and the normal name is an alias.  */
17706 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17707 #error found stub for $ac_func
17708 #endif
17709
17710         return $ac_func ();
17711   ;
17712   return 0;
17713 }
17714 _ACEOF
17715 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17716 if { (eval echo "$as_me:17716: \"$ac_link\"") >&5
17717   (eval $ac_link) 2>&5
17718   ac_status=$?
17719   echo "$as_me:17719: \$? = $ac_status" >&5
17720   (exit "$ac_status"); } &&
17721          { ac_try='test -s "conftest$ac_exeext"'
17722   { (eval echo "$as_me:17722: \"$ac_try\"") >&5
17723   (eval $ac_try) 2>&5
17724   ac_status=$?
17725   echo "$as_me:17725: \$? = $ac_status" >&5
17726   (exit "$ac_status"); }; }; then
17727   eval "$as_ac_var=yes"
17728 else
17729   echo "$as_me: failed program was:" >&5
17730 cat "conftest.$ac_ext" >&5
17731 eval "$as_ac_var=no"
17732 fi
17733 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17734 fi
17735 echo "$as_me:17735: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17736 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17737 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17738   cat >>confdefs.h <<EOF
17739 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17740 EOF
17741
17742 fi
17743 done
17744
17745 fi
17746
17747 ###     use option --enable-assertions to turn on generation of assertion code
17748 echo "$as_me:17748: checking if you want to enable runtime assertions" >&5
17749 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17750
17751 # Check whether --enable-assertions or --disable-assertions was given.
17752 if test "${enable_assertions+set}" = set; then
17753   enableval="$enable_assertions"
17754   with_assertions=$enableval
17755 else
17756   with_assertions=no
17757 fi;
17758 echo "$as_me:17758: result: $with_assertions" >&5
17759 echo "${ECHO_T}$with_assertions" >&6
17760 if test -n "$GCC"
17761 then
17762         if test "$with_assertions" = no
17763         then
17764                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17765         else
17766
17767         ADAFLAGS="$ADAFLAGS -gnata"
17768
17769         fi
17770 fi
17771
17772 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17773
17774 echo "$as_me:17774: checking if you want to use dmalloc for testing" >&5
17775 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17776
17777 # Check whether --with-dmalloc or --without-dmalloc was given.
17778 if test "${with_dmalloc+set}" = set; then
17779   withval="$with_dmalloc"
17780   case "x$withval" in
17781         (x|xno) ;;
17782         (*)
17783                 : "${with_cflags:=-g}"
17784                 : "${enable_leaks:=no}"
17785                 with_dmalloc=yes
17786
17787 cat >>confdefs.h <<EOF
17788 #define USE_DMALLOC 1
17789 EOF
17790
17791                 ;;
17792         esac
17793 else
17794   with_dmalloc=
17795 fi;
17796 echo "$as_me:17796: result: ${with_dmalloc:-no}" >&5
17797 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17798
17799 case ".$with_cflags" in
17800 (.*-g*)
17801         case .$CFLAGS in
17802         (.*-g*)
17803                 ;;
17804         (*)
17805
17806 cf_fix_cppflags=no
17807 cf_new_cflags=
17808 cf_new_cppflags=
17809 cf_new_extra_cppflags=
17810
17811 for cf_add_cflags in -g
17812 do
17813 case "$cf_fix_cppflags" in
17814 (no)
17815         case "$cf_add_cflags" in
17816         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17817                 case "$cf_add_cflags" in
17818                 (-D*)
17819                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17820
17821                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17822                                 && test -z "${cf_tst_cflags}" \
17823                                 && cf_fix_cppflags=yes
17824
17825                         if test "$cf_fix_cppflags" = yes ; then
17826
17827         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17828         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17829
17830                                 continue
17831                         elif test "${cf_tst_cflags}" = "\"'" ; then
17832
17833         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17834         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17835
17836                                 continue
17837                         fi
17838                         ;;
17839                 esac
17840                 case "$CPPFLAGS" in
17841                 (*$cf_add_cflags)
17842                         ;;
17843                 (*)
17844                         case "$cf_add_cflags" in
17845                         (-D*)
17846                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17847
17848 CPPFLAGS=`echo "$CPPFLAGS" | \
17849         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17850                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17851
17852                                 ;;
17853                         esac
17854
17855         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17856         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17857
17858                         ;;
17859                 esac
17860                 ;;
17861         (*)
17862
17863         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17864         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17865
17866                 ;;
17867         esac
17868         ;;
17869 (yes)
17870
17871         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17872         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17873
17874         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17875
17876         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17877                 && test -z "${cf_tst_cflags}" \
17878                 && cf_fix_cppflags=no
17879         ;;
17880 esac
17881 done
17882
17883 if test -n "$cf_new_cflags" ; then
17884
17885         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17886         CFLAGS="${CFLAGS}$cf_new_cflags"
17887
17888 fi
17889
17890 if test -n "$cf_new_cppflags" ; then
17891
17892         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17893         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17894
17895 fi
17896
17897 if test -n "$cf_new_extra_cppflags" ; then
17898
17899         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17900         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17901
17902 fi
17903
17904                 ;;
17905         esac
17906         ;;
17907 esac
17908
17909 if test "$with_dmalloc" = yes ; then
17910         echo "$as_me:17910: checking for dmalloc.h" >&5
17911 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17912 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17913   echo $ECHO_N "(cached) $ECHO_C" >&6
17914 else
17915   cat >"conftest.$ac_ext" <<_ACEOF
17916 #line 17916 "configure"
17917 #include "confdefs.h"
17918 #include <dmalloc.h>
17919 _ACEOF
17920 if { (eval echo "$as_me:17920: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17921   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17922   ac_status=$?
17923   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17924   rm -f conftest.er1
17925   cat conftest.err >&5
17926   echo "$as_me:17926: \$? = $ac_status" >&5
17927   (exit "$ac_status"); } >/dev/null; then
17928   if test -s conftest.err; then
17929     ac_cpp_err=$ac_c_preproc_warn_flag
17930   else
17931     ac_cpp_err=
17932   fi
17933 else
17934   ac_cpp_err=yes
17935 fi
17936 if test -z "$ac_cpp_err"; then
17937   ac_cv_header_dmalloc_h=yes
17938 else
17939   echo "$as_me: failed program was:" >&5
17940   cat "conftest.$ac_ext" >&5
17941   ac_cv_header_dmalloc_h=no
17942 fi
17943 rm -f conftest.err "conftest.$ac_ext"
17944 fi
17945 echo "$as_me:17945: result: $ac_cv_header_dmalloc_h" >&5
17946 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17947 if test "$ac_cv_header_dmalloc_h" = yes; then
17948
17949 echo "$as_me:17949: checking for dmalloc_debug in -ldmalloc" >&5
17950 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17951 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17952   echo $ECHO_N "(cached) $ECHO_C" >&6
17953 else
17954   ac_check_lib_save_LIBS=$LIBS
17955 LIBS="-ldmalloc  $LIBS"
17956 cat >"conftest.$ac_ext" <<_ACEOF
17957 #line 17957 "configure"
17958 #include "confdefs.h"
17959
17960 /* Override any gcc2 internal prototype to avoid an error.  */
17961 #ifdef __cplusplus
17962 extern "C"
17963 #endif
17964 /* We use char because int might match the return type of a gcc2
17965    builtin and then its argument prototype would still apply.  */
17966 char dmalloc_debug ();
17967 int
17968 main (void)
17969 {
17970 dmalloc_debug ();
17971   ;
17972   return 0;
17973 }
17974 _ACEOF
17975 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17976 if { (eval echo "$as_me:17976: \"$ac_link\"") >&5
17977   (eval $ac_link) 2>&5
17978   ac_status=$?
17979   echo "$as_me:17979: \$? = $ac_status" >&5
17980   (exit "$ac_status"); } &&
17981          { ac_try='test -s "conftest$ac_exeext"'
17982   { (eval echo "$as_me:17982: \"$ac_try\"") >&5
17983   (eval $ac_try) 2>&5
17984   ac_status=$?
17985   echo "$as_me:17985: \$? = $ac_status" >&5
17986   (exit "$ac_status"); }; }; then
17987   ac_cv_lib_dmalloc_dmalloc_debug=yes
17988 else
17989   echo "$as_me: failed program was:" >&5
17990 cat "conftest.$ac_ext" >&5
17991 ac_cv_lib_dmalloc_dmalloc_debug=no
17992 fi
17993 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17994 LIBS=$ac_check_lib_save_LIBS
17995 fi
17996 echo "$as_me:17996: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17997 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17998 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17999   cat >>confdefs.h <<EOF
18000 #define HAVE_LIBDMALLOC 1
18001 EOF
18002
18003   LIBS="-ldmalloc $LIBS"
18004
18005 fi
18006
18007 fi
18008
18009 fi
18010
18011 echo "$as_me:18011: checking if you want to use dbmalloc for testing" >&5
18012 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18013
18014 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18015 if test "${with_dbmalloc+set}" = set; then
18016   withval="$with_dbmalloc"
18017   case "x$withval" in
18018         (x|xno) ;;
18019         (*)
18020                 : "${with_cflags:=-g}"
18021                 : "${enable_leaks:=no}"
18022                 with_dbmalloc=yes
18023
18024 cat >>confdefs.h <<EOF
18025 #define USE_DBMALLOC 1
18026 EOF
18027
18028                 ;;
18029         esac
18030 else
18031   with_dbmalloc=
18032 fi;
18033 echo "$as_me:18033: result: ${with_dbmalloc:-no}" >&5
18034 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18035
18036 case ".$with_cflags" in
18037 (.*-g*)
18038         case .$CFLAGS in
18039         (.*-g*)
18040                 ;;
18041         (*)
18042
18043 cf_fix_cppflags=no
18044 cf_new_cflags=
18045 cf_new_cppflags=
18046 cf_new_extra_cppflags=
18047
18048 for cf_add_cflags in -g
18049 do
18050 case "$cf_fix_cppflags" in
18051 (no)
18052         case "$cf_add_cflags" in
18053         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18054                 case "$cf_add_cflags" in
18055                 (-D*)
18056                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18057
18058                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18059                                 && test -z "${cf_tst_cflags}" \
18060                                 && cf_fix_cppflags=yes
18061
18062                         if test "$cf_fix_cppflags" = yes ; then
18063
18064         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18065         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18066
18067                                 continue
18068                         elif test "${cf_tst_cflags}" = "\"'" ; then
18069
18070         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18071         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18072
18073                                 continue
18074                         fi
18075                         ;;
18076                 esac
18077                 case "$CPPFLAGS" in
18078                 (*$cf_add_cflags)
18079                         ;;
18080                 (*)
18081                         case "$cf_add_cflags" in
18082                         (-D*)
18083                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18084
18085 CPPFLAGS=`echo "$CPPFLAGS" | \
18086         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18087                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18088
18089                                 ;;
18090                         esac
18091
18092         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18093         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18094
18095                         ;;
18096                 esac
18097                 ;;
18098         (*)
18099
18100         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18101         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18102
18103                 ;;
18104         esac
18105         ;;
18106 (yes)
18107
18108         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18109         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18110
18111         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18112
18113         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18114                 && test -z "${cf_tst_cflags}" \
18115                 && cf_fix_cppflags=no
18116         ;;
18117 esac
18118 done
18119
18120 if test -n "$cf_new_cflags" ; then
18121
18122         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18123         CFLAGS="${CFLAGS}$cf_new_cflags"
18124
18125 fi
18126
18127 if test -n "$cf_new_cppflags" ; then
18128
18129         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18130         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18131
18132 fi
18133
18134 if test -n "$cf_new_extra_cppflags" ; then
18135
18136         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18137         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18138
18139 fi
18140
18141                 ;;
18142         esac
18143         ;;
18144 esac
18145
18146 if test "$with_dbmalloc" = yes ; then
18147         echo "$as_me:18147: checking for dbmalloc.h" >&5
18148 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18149 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18150   echo $ECHO_N "(cached) $ECHO_C" >&6
18151 else
18152   cat >"conftest.$ac_ext" <<_ACEOF
18153 #line 18153 "configure"
18154 #include "confdefs.h"
18155 #include <dbmalloc.h>
18156 _ACEOF
18157 if { (eval echo "$as_me:18157: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18158   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18159   ac_status=$?
18160   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18161   rm -f conftest.er1
18162   cat conftest.err >&5
18163   echo "$as_me:18163: \$? = $ac_status" >&5
18164   (exit "$ac_status"); } >/dev/null; then
18165   if test -s conftest.err; then
18166     ac_cpp_err=$ac_c_preproc_warn_flag
18167   else
18168     ac_cpp_err=
18169   fi
18170 else
18171   ac_cpp_err=yes
18172 fi
18173 if test -z "$ac_cpp_err"; then
18174   ac_cv_header_dbmalloc_h=yes
18175 else
18176   echo "$as_me: failed program was:" >&5
18177   cat "conftest.$ac_ext" >&5
18178   ac_cv_header_dbmalloc_h=no
18179 fi
18180 rm -f conftest.err "conftest.$ac_ext"
18181 fi
18182 echo "$as_me:18182: result: $ac_cv_header_dbmalloc_h" >&5
18183 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18184 if test "$ac_cv_header_dbmalloc_h" = yes; then
18185
18186 echo "$as_me:18186: checking for debug_malloc in -ldbmalloc" >&5
18187 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18188 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18189   echo $ECHO_N "(cached) $ECHO_C" >&6
18190 else
18191   ac_check_lib_save_LIBS=$LIBS
18192 LIBS="-ldbmalloc  $LIBS"
18193 cat >"conftest.$ac_ext" <<_ACEOF
18194 #line 18194 "configure"
18195 #include "confdefs.h"
18196
18197 /* Override any gcc2 internal prototype to avoid an error.  */
18198 #ifdef __cplusplus
18199 extern "C"
18200 #endif
18201 /* We use char because int might match the return type of a gcc2
18202    builtin and then its argument prototype would still apply.  */
18203 char debug_malloc ();
18204 int
18205 main (void)
18206 {
18207 debug_malloc ();
18208   ;
18209   return 0;
18210 }
18211 _ACEOF
18212 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18213 if { (eval echo "$as_me:18213: \"$ac_link\"") >&5
18214   (eval $ac_link) 2>&5
18215   ac_status=$?
18216   echo "$as_me:18216: \$? = $ac_status" >&5
18217   (exit "$ac_status"); } &&
18218          { ac_try='test -s "conftest$ac_exeext"'
18219   { (eval echo "$as_me:18219: \"$ac_try\"") >&5
18220   (eval $ac_try) 2>&5
18221   ac_status=$?
18222   echo "$as_me:18222: \$? = $ac_status" >&5
18223   (exit "$ac_status"); }; }; then
18224   ac_cv_lib_dbmalloc_debug_malloc=yes
18225 else
18226   echo "$as_me: failed program was:" >&5
18227 cat "conftest.$ac_ext" >&5
18228 ac_cv_lib_dbmalloc_debug_malloc=no
18229 fi
18230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18231 LIBS=$ac_check_lib_save_LIBS
18232 fi
18233 echo "$as_me:18233: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18234 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18235 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18236   cat >>confdefs.h <<EOF
18237 #define HAVE_LIBDBMALLOC 1
18238 EOF
18239
18240   LIBS="-ldbmalloc $LIBS"
18241
18242 fi
18243
18244 fi
18245
18246 fi
18247
18248 echo "$as_me:18248: checking if you want to use valgrind for testing" >&5
18249 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18250
18251 # Check whether --with-valgrind or --without-valgrind was given.
18252 if test "${with_valgrind+set}" = set; then
18253   withval="$with_valgrind"
18254   case "x$withval" in
18255         (x|xno) ;;
18256         (*)
18257                 : "${with_cflags:=-g}"
18258                 : "${enable_leaks:=no}"
18259                 with_valgrind=yes
18260
18261 cat >>confdefs.h <<EOF
18262 #define USE_VALGRIND 1
18263 EOF
18264
18265                 ;;
18266         esac
18267 else
18268   with_valgrind=
18269 fi;
18270 echo "$as_me:18270: result: ${with_valgrind:-no}" >&5
18271 echo "${ECHO_T}${with_valgrind:-no}" >&6
18272
18273 case ".$with_cflags" in
18274 (.*-g*)
18275         case .$CFLAGS in
18276         (.*-g*)
18277                 ;;
18278         (*)
18279
18280 cf_fix_cppflags=no
18281 cf_new_cflags=
18282 cf_new_cppflags=
18283 cf_new_extra_cppflags=
18284
18285 for cf_add_cflags in -g
18286 do
18287 case "$cf_fix_cppflags" in
18288 (no)
18289         case "$cf_add_cflags" in
18290         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18291                 case "$cf_add_cflags" in
18292                 (-D*)
18293                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18294
18295                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18296                                 && test -z "${cf_tst_cflags}" \
18297                                 && cf_fix_cppflags=yes
18298
18299                         if test "$cf_fix_cppflags" = yes ; then
18300
18301         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18302         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18303
18304                                 continue
18305                         elif test "${cf_tst_cflags}" = "\"'" ; then
18306
18307         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18308         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18309
18310                                 continue
18311                         fi
18312                         ;;
18313                 esac
18314                 case "$CPPFLAGS" in
18315                 (*$cf_add_cflags)
18316                         ;;
18317                 (*)
18318                         case "$cf_add_cflags" in
18319                         (-D*)
18320                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18321
18322 CPPFLAGS=`echo "$CPPFLAGS" | \
18323         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18324                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18325
18326                                 ;;
18327                         esac
18328
18329         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18330         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18331
18332                         ;;
18333                 esac
18334                 ;;
18335         (*)
18336
18337         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18338         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18339
18340                 ;;
18341         esac
18342         ;;
18343 (yes)
18344
18345         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18346         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18347
18348         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18349
18350         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18351                 && test -z "${cf_tst_cflags}" \
18352                 && cf_fix_cppflags=no
18353         ;;
18354 esac
18355 done
18356
18357 if test -n "$cf_new_cflags" ; then
18358
18359         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18360         CFLAGS="${CFLAGS}$cf_new_cflags"
18361
18362 fi
18363
18364 if test -n "$cf_new_cppflags" ; then
18365
18366         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18367         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18368
18369 fi
18370
18371 if test -n "$cf_new_extra_cppflags" ; then
18372
18373         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18374         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18375
18376 fi
18377
18378                 ;;
18379         esac
18380         ;;
18381 esac
18382
18383 echo "$as_me:18383: checking if you want to perform memory-leak testing" >&5
18384 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18385
18386 # Check whether --enable-leaks or --disable-leaks was given.
18387 if test "${enable_leaks+set}" = set; then
18388   enableval="$enable_leaks"
18389   enable_leaks=$enableval
18390 else
18391   enable_leaks=yes
18392 fi;
18393 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18394 echo "$as_me:18394: result: $with_no_leaks" >&5
18395 echo "${ECHO_T}$with_no_leaks" >&6
18396
18397 if test "$enable_leaks" = no ; then
18398
18399 cat >>confdefs.h <<\EOF
18400 #define NO_LEAKS 1
18401 EOF
18402
18403 cat >>confdefs.h <<\EOF
18404 #define YY_NO_LEAKS 1
18405 EOF
18406
18407 fi
18408
18409 cat >>confdefs.h <<\EOF
18410 #define HAVE_NC_ALLOC_H 1
18411 EOF
18412
18413 ###     use option --enable-expanded to generate certain macros as functions
18414
18415 # Check whether --enable-expanded or --disable-expanded was given.
18416 if test "${enable_expanded+set}" = set; then
18417   enableval="$enable_expanded"
18418   test "x$enableval" = xyes &&
18419 cat >>confdefs.h <<\EOF
18420 #define NCURSES_EXPANDED 1
18421 EOF
18422
18423 fi;
18424
18425 ###     use option --disable-macros to suppress macros in favor of functions
18426
18427 # Check whether --enable-macros or --disable-macros was given.
18428 if test "${enable_macros+set}" = set; then
18429   enableval="$enable_macros"
18430   test "$enableval" = no &&
18431 cat >>confdefs.h <<\EOF
18432 #define NCURSES_NOMACROS 1
18433 EOF
18434
18435 fi;
18436
18437 # Normally we only add trace() to the debug-library.  Allow this to be
18438 # extended to all models of the ncurses library:
18439 cf_all_traces=no
18440 case "$CFLAGS $CPPFLAGS" in
18441 (*-DTRACE*)
18442         cf_all_traces=yes
18443         ;;
18444 esac
18445
18446 echo "$as_me:18446: checking whether to add trace feature to all models" >&5
18447 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18448
18449 # Check whether --with-trace or --without-trace was given.
18450 if test "${with_trace+set}" = set; then
18451   withval="$with_trace"
18452   cf_with_trace=$withval
18453 else
18454   cf_with_trace=$cf_all_traces
18455 fi;
18456 echo "$as_me:18456: result: $cf_with_trace" >&5
18457 echo "${ECHO_T}$cf_with_trace" >&6
18458
18459 if test "x$cf_with_trace" = xyes ; then
18460         LIB_TRACING=all
18461         ADA_TRACE=TRUE
18462
18463 cf_fix_cppflags=no
18464 cf_new_cflags=
18465 cf_new_cppflags=
18466 cf_new_extra_cppflags=
18467
18468 for cf_add_cflags in -DTRACE
18469 do
18470 case "$cf_fix_cppflags" in
18471 (no)
18472         case "$cf_add_cflags" in
18473         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18474                 case "$cf_add_cflags" in
18475                 (-D*)
18476                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18477
18478                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18479                                 && test -z "${cf_tst_cflags}" \
18480                                 && cf_fix_cppflags=yes
18481
18482                         if test "$cf_fix_cppflags" = yes ; then
18483
18484         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18485         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18486
18487                                 continue
18488                         elif test "${cf_tst_cflags}" = "\"'" ; then
18489
18490         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18491         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18492
18493                                 continue
18494                         fi
18495                         ;;
18496                 esac
18497                 case "$CPPFLAGS" in
18498                 (*$cf_add_cflags)
18499                         ;;
18500                 (*)
18501                         case "$cf_add_cflags" in
18502                         (-D*)
18503                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18504
18505 CPPFLAGS=`echo "$CPPFLAGS" | \
18506         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18507                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18508
18509                                 ;;
18510                         esac
18511
18512         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18513         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18514
18515                         ;;
18516                 esac
18517                 ;;
18518         (*)
18519
18520         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18521         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18522
18523                 ;;
18524         esac
18525         ;;
18526 (yes)
18527
18528         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18529         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18530
18531         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18532
18533         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18534                 && test -z "${cf_tst_cflags}" \
18535                 && cf_fix_cppflags=no
18536         ;;
18537 esac
18538 done
18539
18540 if test -n "$cf_new_cflags" ; then
18541
18542         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18543         CFLAGS="${CFLAGS}$cf_new_cflags"
18544
18545 fi
18546
18547 if test -n "$cf_new_cppflags" ; then
18548
18549         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18550         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18551
18552 fi
18553
18554 if test -n "$cf_new_extra_cppflags" ; then
18555
18556         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18557         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18558
18559 fi
18560
18561 cat >>confdefs.h <<\EOF
18562 #define HAVE__TRACEF 1
18563 EOF
18564
18565 else
18566         LIB_TRACING=DEBUG
18567         ADA_TRACE=FALSE
18568 fi
18569
18570 echo "$as_me:18570: checking if we want to use GNAT projects" >&5
18571 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18572
18573 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18574 if test "${enable_gnat_projects+set}" = set; then
18575   enableval="$enable_gnat_projects"
18576   test "$enableval" != no && enableval=yes
18577         if test "$enableval" != "yes" ; then
18578     enable_gnat_projects=no
18579         else
18580                 enable_gnat_projects=yes
18581         fi
18582 else
18583   enableval=yes
18584         enable_gnat_projects=yes
18585
18586 fi;
18587 echo "$as_me:18587: result: $enable_gnat_projects" >&5
18588 echo "${ECHO_T}$enable_gnat_projects" >&6
18589
18590 ###     Checks for libraries.
18591 case "$cf_cv_system_name" in
18592 (*mingw32*|*mingw64*)
18593         if test "x$with_exp_win32" = xyes ; then
18594         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18595         else
18596         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18597         fi
18598         # Note: WINVER may be a problem with Windows 10
18599         ;;
18600 (*)
18601 echo "$as_me:18601: checking for gettimeofday" >&5
18602 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18603 if test "${ac_cv_func_gettimeofday+set}" = set; then
18604   echo $ECHO_N "(cached) $ECHO_C" >&6
18605 else
18606   cat >"conftest.$ac_ext" <<_ACEOF
18607 #line 18607 "configure"
18608 #include "confdefs.h"
18609 #define gettimeofday autoconf_temporary
18610 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18611 #undef gettimeofday
18612
18613 #ifdef __cplusplus
18614 extern "C"
18615 #endif
18616
18617 /* We use char because int might match the return type of a gcc2
18618    builtin and then its argument prototype would still apply.  */
18619 char gettimeofday (void);
18620
18621 int
18622 main (void)
18623 {
18624
18625 /* The GNU C library defines stubs for functions which it implements
18626     to always fail with ENOSYS.  Some functions are actually named
18627     something starting with __ and the normal name is an alias.  */
18628 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18629 #error found stub for gettimeofday
18630 #endif
18631
18632         return gettimeofday ();
18633   ;
18634   return 0;
18635 }
18636 _ACEOF
18637 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18638 if { (eval echo "$as_me:18638: \"$ac_link\"") >&5
18639   (eval $ac_link) 2>&5
18640   ac_status=$?
18641   echo "$as_me:18641: \$? = $ac_status" >&5
18642   (exit "$ac_status"); } &&
18643          { ac_try='test -s "conftest$ac_exeext"'
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   ac_cv_func_gettimeofday=yes
18650 else
18651   echo "$as_me: failed program was:" >&5
18652 cat "conftest.$ac_ext" >&5
18653 ac_cv_func_gettimeofday=no
18654 fi
18655 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18656 fi
18657 echo "$as_me:18657: result: $ac_cv_func_gettimeofday" >&5
18658 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18659 if test "$ac_cv_func_gettimeofday" = yes; then
18660
18661 cat >>confdefs.h <<\EOF
18662 #define HAVE_GETTIMEOFDAY 1
18663 EOF
18664
18665 else
18666
18667 echo "$as_me:18667: checking for gettimeofday in -lbsd" >&5
18668 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18669 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18670   echo $ECHO_N "(cached) $ECHO_C" >&6
18671 else
18672   ac_check_lib_save_LIBS=$LIBS
18673 LIBS="-lbsd  $LIBS"
18674 cat >"conftest.$ac_ext" <<_ACEOF
18675 #line 18675 "configure"
18676 #include "confdefs.h"
18677
18678 /* Override any gcc2 internal prototype to avoid an error.  */
18679 #ifdef __cplusplus
18680 extern "C"
18681 #endif
18682 /* We use char because int might match the return type of a gcc2
18683    builtin and then its argument prototype would still apply.  */
18684 char gettimeofday ();
18685 int
18686 main (void)
18687 {
18688 gettimeofday ();
18689   ;
18690   return 0;
18691 }
18692 _ACEOF
18693 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18694 if { (eval echo "$as_me:18694: \"$ac_link\"") >&5
18695   (eval $ac_link) 2>&5
18696   ac_status=$?
18697   echo "$as_me:18697: \$? = $ac_status" >&5
18698   (exit "$ac_status"); } &&
18699          { ac_try='test -s "conftest$ac_exeext"'
18700   { (eval echo "$as_me:18700: \"$ac_try\"") >&5
18701   (eval $ac_try) 2>&5
18702   ac_status=$?
18703   echo "$as_me:18703: \$? = $ac_status" >&5
18704   (exit "$ac_status"); }; }; then
18705   ac_cv_lib_bsd_gettimeofday=yes
18706 else
18707   echo "$as_me: failed program was:" >&5
18708 cat "conftest.$ac_ext" >&5
18709 ac_cv_lib_bsd_gettimeofday=no
18710 fi
18711 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18712 LIBS=$ac_check_lib_save_LIBS
18713 fi
18714 echo "$as_me:18714: result: $ac_cv_lib_bsd_gettimeofday" >&5
18715 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18716 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18717
18718 cat >>confdefs.h <<\EOF
18719 #define HAVE_GETTIMEOFDAY 1
18720 EOF
18721
18722 cf_add_libs="$LIBS"
18723 # reverse order
18724 cf_add_0lib=
18725 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18726 # filter duplicates
18727 for cf_add_1lib in $cf_add_0lib; do
18728         for cf_add_2lib in $cf_add_libs; do
18729                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18730                         cf_add_1lib=
18731                         break
18732                 fi
18733         done
18734         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18735 done
18736 LIBS="$cf_add_libs"
18737
18738 fi
18739
18740 fi
18741         ;;
18742 esac
18743
18744 echo "$as_me:18744: checking if -lm needed for math functions" >&5
18745 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18746 if test "${cf_cv_need_libm+set}" = set; then
18747   echo $ECHO_N "(cached) $ECHO_C" >&6
18748 else
18749
18750         cat >"conftest.$ac_ext" <<_ACEOF
18751 #line 18751 "configure"
18752 #include "confdefs.h"
18753
18754         #include <stdio.h>
18755         #include <stdlib.h>
18756         #include <math.h>
18757
18758 int
18759 main (void)
18760 {
18761 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18762   ;
18763   return 0;
18764 }
18765 _ACEOF
18766 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18767 if { (eval echo "$as_me:18767: \"$ac_link\"") >&5
18768   (eval $ac_link) 2>&5
18769   ac_status=$?
18770   echo "$as_me:18770: \$? = $ac_status" >&5
18771   (exit "$ac_status"); } &&
18772          { ac_try='test -s "conftest$ac_exeext"'
18773   { (eval echo "$as_me:18773: \"$ac_try\"") >&5
18774   (eval $ac_try) 2>&5
18775   ac_status=$?
18776   echo "$as_me:18776: \$? = $ac_status" >&5
18777   (exit "$ac_status"); }; }; then
18778   cf_cv_need_libm=no
18779 else
18780   echo "$as_me: failed program was:" >&5
18781 cat "conftest.$ac_ext" >&5
18782 cf_cv_need_libm=yes
18783 fi
18784 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18785 fi
18786 echo "$as_me:18786: result: $cf_cv_need_libm" >&5
18787 echo "${ECHO_T}$cf_cv_need_libm" >&6
18788 if test "$cf_cv_need_libm" = yes
18789 then
18790 MATH_LIB=-lm
18791 fi
18792
18793 ###     Checks for header files.
18794 echo "$as_me:18794: checking for ANSI C header files" >&5
18795 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18796 if test "${ac_cv_header_stdc+set}" = set; then
18797   echo $ECHO_N "(cached) $ECHO_C" >&6
18798 else
18799   cat >"conftest.$ac_ext" <<_ACEOF
18800 #line 18800 "configure"
18801 #include "confdefs.h"
18802 #include <stdlib.h>
18803 #include <stdarg.h>
18804 #include <string.h>
18805 #include <float.h>
18806
18807 _ACEOF
18808 if { (eval echo "$as_me:18808: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18809   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18810   ac_status=$?
18811   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18812   rm -f conftest.er1
18813   cat conftest.err >&5
18814   echo "$as_me:18814: \$? = $ac_status" >&5
18815   (exit "$ac_status"); } >/dev/null; then
18816   if test -s conftest.err; then
18817     ac_cpp_err=$ac_c_preproc_warn_flag
18818   else
18819     ac_cpp_err=
18820   fi
18821 else
18822   ac_cpp_err=yes
18823 fi
18824 if test -z "$ac_cpp_err"; then
18825   ac_cv_header_stdc=yes
18826 else
18827   echo "$as_me: failed program was:" >&5
18828   cat "conftest.$ac_ext" >&5
18829   ac_cv_header_stdc=no
18830 fi
18831 rm -f conftest.err "conftest.$ac_ext"
18832
18833 if test $ac_cv_header_stdc = yes; then
18834   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18835   cat >"conftest.$ac_ext" <<_ACEOF
18836 #line 18836 "configure"
18837 #include "confdefs.h"
18838 #include <string.h>
18839
18840 _ACEOF
18841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18842   $EGREP "memchr" >/dev/null 2>&1; then
18843   :
18844 else
18845   ac_cv_header_stdc=no
18846 fi
18847 rm -rf conftest*
18848
18849 fi
18850
18851 if test $ac_cv_header_stdc = yes; then
18852   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18853   cat >"conftest.$ac_ext" <<_ACEOF
18854 #line 18854 "configure"
18855 #include "confdefs.h"
18856 #include <stdlib.h>
18857
18858 _ACEOF
18859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18860   $EGREP "free" >/dev/null 2>&1; then
18861   :
18862 else
18863   ac_cv_header_stdc=no
18864 fi
18865 rm -rf conftest*
18866
18867 fi
18868
18869 if test $ac_cv_header_stdc = yes; then
18870   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18871   if test "$cross_compiling" = yes; then
18872   :
18873 else
18874   cat >"conftest.$ac_ext" <<_ACEOF
18875 #line 18875 "configure"
18876 #include "confdefs.h"
18877 #include <ctype.h>
18878 #if ((' ' & 0x0FF) == 0x020)
18879 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18880 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18881 #else
18882 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18883                      || ('j' <= (c) && (c) <= 'r') \
18884                      || ('s' <= (c) && (c) <= 'z'))
18885 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18886 #endif
18887
18888 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18889 int
18890 main (void)
18891 {
18892   int i;
18893   for (i = 0; i < 256; i++)
18894     if (XOR (islower (i), ISLOWER (i))
18895         || toupper (i) != TOUPPER (i))
18896       $ac_main_return(2);
18897   $ac_main_return (0);
18898 }
18899 _ACEOF
18900 rm -f "conftest$ac_exeext"
18901 if { (eval echo "$as_me:18901: \"$ac_link\"") >&5
18902   (eval $ac_link) 2>&5
18903   ac_status=$?
18904   echo "$as_me:18904: \$? = $ac_status" >&5
18905   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18906   { (eval echo "$as_me:18906: \"$ac_try\"") >&5
18907   (eval $ac_try) 2>&5
18908   ac_status=$?
18909   echo "$as_me:18909: \$? = $ac_status" >&5
18910   (exit "$ac_status"); }; }; then
18911   :
18912 else
18913   echo "$as_me: program exited with status $ac_status" >&5
18914 echo "$as_me: failed program was:" >&5
18915 cat "conftest.$ac_ext" >&5
18916 ac_cv_header_stdc=no
18917 fi
18918 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18919 fi
18920 fi
18921 fi
18922 echo "$as_me:18922: result: $ac_cv_header_stdc" >&5
18923 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18924 if test $ac_cv_header_stdc = yes; then
18925
18926 cat >>confdefs.h <<\EOF
18927 #define STDC_HEADERS 1
18928 EOF
18929
18930 fi
18931
18932 ac_header_dirent=no
18933 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18934   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18935 echo "$as_me:18935: checking for $ac_hdr that defines DIR" >&5
18936 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18937 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18938   echo $ECHO_N "(cached) $ECHO_C" >&6
18939 else
18940   cat >"conftest.$ac_ext" <<_ACEOF
18941 #line 18941 "configure"
18942 #include "confdefs.h"
18943 #include <sys/types.h>
18944 #include <$ac_hdr>
18945
18946 int
18947 main (void)
18948 {
18949 if ((DIR *) 0)
18950 return 0;
18951   ;
18952   return 0;
18953 }
18954 _ACEOF
18955 rm -f "conftest.$ac_objext"
18956 if { (eval echo "$as_me:18956: \"$ac_compile\"") >&5
18957   (eval $ac_compile) 2>&5
18958   ac_status=$?
18959   echo "$as_me:18959: \$? = $ac_status" >&5
18960   (exit "$ac_status"); } &&
18961          { ac_try='test -s "conftest.$ac_objext"'
18962   { (eval echo "$as_me:18962: \"$ac_try\"") >&5
18963   (eval $ac_try) 2>&5
18964   ac_status=$?
18965   echo "$as_me:18965: \$? = $ac_status" >&5
18966   (exit "$ac_status"); }; }; then
18967   eval "$as_ac_Header=yes"
18968 else
18969   echo "$as_me: failed program was:" >&5
18970 cat "conftest.$ac_ext" >&5
18971 eval "$as_ac_Header=no"
18972 fi
18973 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18974 fi
18975 echo "$as_me:18975: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18976 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18977 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18978   cat >>confdefs.h <<EOF
18979 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18980 EOF
18981
18982 ac_header_dirent=$ac_hdr; break
18983 fi
18984
18985 done
18986 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18987 if test $ac_header_dirent = dirent.h; then
18988   echo "$as_me:18988: checking for opendir in -ldir" >&5
18989 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18990 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18991   echo $ECHO_N "(cached) $ECHO_C" >&6
18992 else
18993   ac_check_lib_save_LIBS=$LIBS
18994 LIBS="-ldir  $LIBS"
18995 cat >"conftest.$ac_ext" <<_ACEOF
18996 #line 18996 "configure"
18997 #include "confdefs.h"
18998
18999 /* Override any gcc2 internal prototype to avoid an error.  */
19000 #ifdef __cplusplus
19001 extern "C"
19002 #endif
19003 /* We use char because int might match the return type of a gcc2
19004    builtin and then its argument prototype would still apply.  */
19005 char opendir ();
19006 int
19007 main (void)
19008 {
19009 opendir ();
19010   ;
19011   return 0;
19012 }
19013 _ACEOF
19014 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19015 if { (eval echo "$as_me:19015: \"$ac_link\"") >&5
19016   (eval $ac_link) 2>&5
19017   ac_status=$?
19018   echo "$as_me:19018: \$? = $ac_status" >&5
19019   (exit "$ac_status"); } &&
19020          { ac_try='test -s "conftest$ac_exeext"'
19021   { (eval echo "$as_me:19021: \"$ac_try\"") >&5
19022   (eval $ac_try) 2>&5
19023   ac_status=$?
19024   echo "$as_me:19024: \$? = $ac_status" >&5
19025   (exit "$ac_status"); }; }; then
19026   ac_cv_lib_dir_opendir=yes
19027 else
19028   echo "$as_me: failed program was:" >&5
19029 cat "conftest.$ac_ext" >&5
19030 ac_cv_lib_dir_opendir=no
19031 fi
19032 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19033 LIBS=$ac_check_lib_save_LIBS
19034 fi
19035 echo "$as_me:19035: result: $ac_cv_lib_dir_opendir" >&5
19036 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19037 if test "$ac_cv_lib_dir_opendir" = yes; then
19038   LIBS="$LIBS -ldir"
19039 fi
19040
19041 else
19042   echo "$as_me:19042: checking for opendir in -lx" >&5
19043 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19044 if test "${ac_cv_lib_x_opendir+set}" = set; then
19045   echo $ECHO_N "(cached) $ECHO_C" >&6
19046 else
19047   ac_check_lib_save_LIBS=$LIBS
19048 LIBS="-lx  $LIBS"
19049 cat >"conftest.$ac_ext" <<_ACEOF
19050 #line 19050 "configure"
19051 #include "confdefs.h"
19052
19053 /* Override any gcc2 internal prototype to avoid an error.  */
19054 #ifdef __cplusplus
19055 extern "C"
19056 #endif
19057 /* We use char because int might match the return type of a gcc2
19058    builtin and then its argument prototype would still apply.  */
19059 char opendir ();
19060 int
19061 main (void)
19062 {
19063 opendir ();
19064   ;
19065   return 0;
19066 }
19067 _ACEOF
19068 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19069 if { (eval echo "$as_me:19069: \"$ac_link\"") >&5
19070   (eval $ac_link) 2>&5
19071   ac_status=$?
19072   echo "$as_me:19072: \$? = $ac_status" >&5
19073   (exit "$ac_status"); } &&
19074          { ac_try='test -s "conftest$ac_exeext"'
19075   { (eval echo "$as_me:19075: \"$ac_try\"") >&5
19076   (eval $ac_try) 2>&5
19077   ac_status=$?
19078   echo "$as_me:19078: \$? = $ac_status" >&5
19079   (exit "$ac_status"); }; }; then
19080   ac_cv_lib_x_opendir=yes
19081 else
19082   echo "$as_me: failed program was:" >&5
19083 cat "conftest.$ac_ext" >&5
19084 ac_cv_lib_x_opendir=no
19085 fi
19086 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19087 LIBS=$ac_check_lib_save_LIBS
19088 fi
19089 echo "$as_me:19089: result: $ac_cv_lib_x_opendir" >&5
19090 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19091 if test "$ac_cv_lib_x_opendir" = yes; then
19092   LIBS="$LIBS -lx"
19093 fi
19094
19095 fi
19096
19097 echo "$as_me:19097: checking whether time.h and sys/time.h may both be included" >&5
19098 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19099 if test "${ac_cv_header_time+set}" = set; then
19100   echo $ECHO_N "(cached) $ECHO_C" >&6
19101 else
19102   cat >"conftest.$ac_ext" <<_ACEOF
19103 #line 19103 "configure"
19104 #include "confdefs.h"
19105 #include <sys/types.h>
19106 #include <sys/time.h>
19107 #include <time.h>
19108
19109 int
19110 main (void)
19111 {
19112 if ((struct tm *) 0)
19113 return 0;
19114   ;
19115   return 0;
19116 }
19117 _ACEOF
19118 rm -f "conftest.$ac_objext"
19119 if { (eval echo "$as_me:19119: \"$ac_compile\"") >&5
19120   (eval $ac_compile) 2>&5
19121   ac_status=$?
19122   echo "$as_me:19122: \$? = $ac_status" >&5
19123   (exit "$ac_status"); } &&
19124          { ac_try='test -s "conftest.$ac_objext"'
19125   { (eval echo "$as_me:19125: \"$ac_try\"") >&5
19126   (eval $ac_try) 2>&5
19127   ac_status=$?
19128   echo "$as_me:19128: \$? = $ac_status" >&5
19129   (exit "$ac_status"); }; }; then
19130   ac_cv_header_time=yes
19131 else
19132   echo "$as_me: failed program was:" >&5
19133 cat "conftest.$ac_ext" >&5
19134 ac_cv_header_time=no
19135 fi
19136 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19137 fi
19138 echo "$as_me:19138: result: $ac_cv_header_time" >&5
19139 echo "${ECHO_T}$ac_cv_header_time" >&6
19140 if test $ac_cv_header_time = yes; then
19141
19142 cat >>confdefs.h <<\EOF
19143 #define TIME_WITH_SYS_TIME 1
19144 EOF
19145
19146 fi
19147
19148 cf_regex_func=no
19149 cf_regex_libs=
19150 case "$host_os" in
19151 (mingw*)
19152         # -lsystre -ltre -lintl -liconv
19153         echo "$as_me:19153: checking for regcomp in -lsystre" >&5
19154 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19155 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19156   echo $ECHO_N "(cached) $ECHO_C" >&6
19157 else
19158   ac_check_lib_save_LIBS=$LIBS
19159 LIBS="-lsystre  $LIBS"
19160 cat >"conftest.$ac_ext" <<_ACEOF
19161 #line 19161 "configure"
19162 #include "confdefs.h"
19163
19164 /* Override any gcc2 internal prototype to avoid an error.  */
19165 #ifdef __cplusplus
19166 extern "C"
19167 #endif
19168 /* We use char because int might match the return type of a gcc2
19169    builtin and then its argument prototype would still apply.  */
19170 char regcomp ();
19171 int
19172 main (void)
19173 {
19174 regcomp ();
19175   ;
19176   return 0;
19177 }
19178 _ACEOF
19179 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19180 if { (eval echo "$as_me:19180: \"$ac_link\"") >&5
19181   (eval $ac_link) 2>&5
19182   ac_status=$?
19183   echo "$as_me:19183: \$? = $ac_status" >&5
19184   (exit "$ac_status"); } &&
19185          { ac_try='test -s "conftest$ac_exeext"'
19186   { (eval echo "$as_me:19186: \"$ac_try\"") >&5
19187   (eval $ac_try) 2>&5
19188   ac_status=$?
19189   echo "$as_me:19189: \$? = $ac_status" >&5
19190   (exit "$ac_status"); }; }; then
19191   ac_cv_lib_systre_regcomp=yes
19192 else
19193   echo "$as_me: failed program was:" >&5
19194 cat "conftest.$ac_ext" >&5
19195 ac_cv_lib_systre_regcomp=no
19196 fi
19197 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19198 LIBS=$ac_check_lib_save_LIBS
19199 fi
19200 echo "$as_me:19200: result: $ac_cv_lib_systre_regcomp" >&5
19201 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19202 if test "$ac_cv_lib_systre_regcomp" = yes; then
19203
19204                 echo "$as_me:19204: checking for libiconv_open in -liconv" >&5
19205 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19206 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19207   echo $ECHO_N "(cached) $ECHO_C" >&6
19208 else
19209   ac_check_lib_save_LIBS=$LIBS
19210 LIBS="-liconv  $LIBS"
19211 cat >"conftest.$ac_ext" <<_ACEOF
19212 #line 19212 "configure"
19213 #include "confdefs.h"
19214
19215 /* Override any gcc2 internal prototype to avoid an error.  */
19216 #ifdef __cplusplus
19217 extern "C"
19218 #endif
19219 /* We use char because int might match the return type of a gcc2
19220    builtin and then its argument prototype would still apply.  */
19221 char libiconv_open ();
19222 int
19223 main (void)
19224 {
19225 libiconv_open ();
19226   ;
19227   return 0;
19228 }
19229 _ACEOF
19230 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19231 if { (eval echo "$as_me:19231: \"$ac_link\"") >&5
19232   (eval $ac_link) 2>&5
19233   ac_status=$?
19234   echo "$as_me:19234: \$? = $ac_status" >&5
19235   (exit "$ac_status"); } &&
19236          { ac_try='test -s "conftest$ac_exeext"'
19237   { (eval echo "$as_me:19237: \"$ac_try\"") >&5
19238   (eval $ac_try) 2>&5
19239   ac_status=$?
19240   echo "$as_me:19240: \$? = $ac_status" >&5
19241   (exit "$ac_status"); }; }; then
19242   ac_cv_lib_iconv_libiconv_open=yes
19243 else
19244   echo "$as_me: failed program was:" >&5
19245 cat "conftest.$ac_ext" >&5
19246 ac_cv_lib_iconv_libiconv_open=no
19247 fi
19248 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19249 LIBS=$ac_check_lib_save_LIBS
19250 fi
19251 echo "$as_me:19251: result: $ac_cv_lib_iconv_libiconv_open" >&5
19252 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19253 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19254
19255 cf_add_libs="$LIBS"
19256 # reverse order
19257 cf_add_0lib=
19258 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19259 # filter duplicates
19260 for cf_add_1lib in $cf_add_0lib; do
19261         for cf_add_2lib in $cf_add_libs; do
19262                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19263                         cf_add_1lib=
19264                         break
19265                 fi
19266         done
19267         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19268 done
19269 LIBS="$cf_add_libs"
19270
19271 fi
19272
19273                 echo "$as_me:19273: checking for libintl_gettext in -lintl" >&5
19274 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19275 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19276   echo $ECHO_N "(cached) $ECHO_C" >&6
19277 else
19278   ac_check_lib_save_LIBS=$LIBS
19279 LIBS="-lintl  $LIBS"
19280 cat >"conftest.$ac_ext" <<_ACEOF
19281 #line 19281 "configure"
19282 #include "confdefs.h"
19283
19284 /* Override any gcc2 internal prototype to avoid an error.  */
19285 #ifdef __cplusplus
19286 extern "C"
19287 #endif
19288 /* We use char because int might match the return type of a gcc2
19289    builtin and then its argument prototype would still apply.  */
19290 char libintl_gettext ();
19291 int
19292 main (void)
19293 {
19294 libintl_gettext ();
19295   ;
19296   return 0;
19297 }
19298 _ACEOF
19299 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19300 if { (eval echo "$as_me:19300: \"$ac_link\"") >&5
19301   (eval $ac_link) 2>&5
19302   ac_status=$?
19303   echo "$as_me:19303: \$? = $ac_status" >&5
19304   (exit "$ac_status"); } &&
19305          { ac_try='test -s "conftest$ac_exeext"'
19306   { (eval echo "$as_me:19306: \"$ac_try\"") >&5
19307   (eval $ac_try) 2>&5
19308   ac_status=$?
19309   echo "$as_me:19309: \$? = $ac_status" >&5
19310   (exit "$ac_status"); }; }; then
19311   ac_cv_lib_intl_libintl_gettext=yes
19312 else
19313   echo "$as_me: failed program was:" >&5
19314 cat "conftest.$ac_ext" >&5
19315 ac_cv_lib_intl_libintl_gettext=no
19316 fi
19317 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19318 LIBS=$ac_check_lib_save_LIBS
19319 fi
19320 echo "$as_me:19320: result: $ac_cv_lib_intl_libintl_gettext" >&5
19321 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19322 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19323
19324 cf_add_libs="$LIBS"
19325 # reverse order
19326 cf_add_0lib=
19327 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19328 # filter duplicates
19329 for cf_add_1lib in $cf_add_0lib; do
19330         for cf_add_2lib in $cf_add_libs; do
19331                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19332                         cf_add_1lib=
19333                         break
19334                 fi
19335         done
19336         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19337 done
19338 LIBS="$cf_add_libs"
19339
19340 fi
19341
19342                 echo "$as_me:19342: checking for tre_regcomp in -ltre" >&5
19343 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19344 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19345   echo $ECHO_N "(cached) $ECHO_C" >&6
19346 else
19347   ac_check_lib_save_LIBS=$LIBS
19348 LIBS="-ltre  $LIBS"
19349 cat >"conftest.$ac_ext" <<_ACEOF
19350 #line 19350 "configure"
19351 #include "confdefs.h"
19352
19353 /* Override any gcc2 internal prototype to avoid an error.  */
19354 #ifdef __cplusplus
19355 extern "C"
19356 #endif
19357 /* We use char because int might match the return type of a gcc2
19358    builtin and then its argument prototype would still apply.  */
19359 char tre_regcomp ();
19360 int
19361 main (void)
19362 {
19363 tre_regcomp ();
19364   ;
19365   return 0;
19366 }
19367 _ACEOF
19368 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19369 if { (eval echo "$as_me:19369: \"$ac_link\"") >&5
19370   (eval $ac_link) 2>&5
19371   ac_status=$?
19372   echo "$as_me:19372: \$? = $ac_status" >&5
19373   (exit "$ac_status"); } &&
19374          { ac_try='test -s "conftest$ac_exeext"'
19375   { (eval echo "$as_me:19375: \"$ac_try\"") >&5
19376   (eval $ac_try) 2>&5
19377   ac_status=$?
19378   echo "$as_me:19378: \$? = $ac_status" >&5
19379   (exit "$ac_status"); }; }; then
19380   ac_cv_lib_tre_tre_regcomp=yes
19381 else
19382   echo "$as_me: failed program was:" >&5
19383 cat "conftest.$ac_ext" >&5
19384 ac_cv_lib_tre_tre_regcomp=no
19385 fi
19386 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19387 LIBS=$ac_check_lib_save_LIBS
19388 fi
19389 echo "$as_me:19389: result: $ac_cv_lib_tre_tre_regcomp" >&5
19390 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19391 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19392
19393 cf_add_libs="$LIBS"
19394 # reverse order
19395 cf_add_0lib=
19396 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19397 # filter duplicates
19398 for cf_add_1lib in $cf_add_0lib; do
19399         for cf_add_2lib in $cf_add_libs; do
19400                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19401                         cf_add_1lib=
19402                         break
19403                 fi
19404         done
19405         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19406 done
19407 LIBS="$cf_add_libs"
19408
19409 fi
19410
19411 cf_add_libs="$LIBS"
19412 # reverse order
19413 cf_add_0lib=
19414 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19415 # filter duplicates
19416 for cf_add_1lib in $cf_add_0lib; do
19417         for cf_add_2lib in $cf_add_libs; do
19418                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19419                         cf_add_1lib=
19420                         break
19421                 fi
19422         done
19423         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19424 done
19425 LIBS="$cf_add_libs"
19426
19427                 cf_regex_func=regcomp
19428
19429 else
19430
19431                 echo "$as_me:19431: checking for regcomp in -lgnurx" >&5
19432 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19433 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19434   echo $ECHO_N "(cached) $ECHO_C" >&6
19435 else
19436   ac_check_lib_save_LIBS=$LIBS
19437 LIBS="-lgnurx  $LIBS"
19438 cat >"conftest.$ac_ext" <<_ACEOF
19439 #line 19439 "configure"
19440 #include "confdefs.h"
19441
19442 /* Override any gcc2 internal prototype to avoid an error.  */
19443 #ifdef __cplusplus
19444 extern "C"
19445 #endif
19446 /* We use char because int might match the return type of a gcc2
19447    builtin and then its argument prototype would still apply.  */
19448 char regcomp ();
19449 int
19450 main (void)
19451 {
19452 regcomp ();
19453   ;
19454   return 0;
19455 }
19456 _ACEOF
19457 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19458 if { (eval echo "$as_me:19458: \"$ac_link\"") >&5
19459   (eval $ac_link) 2>&5
19460   ac_status=$?
19461   echo "$as_me:19461: \$? = $ac_status" >&5
19462   (exit "$ac_status"); } &&
19463          { ac_try='test -s "conftest$ac_exeext"'
19464   { (eval echo "$as_me:19464: \"$ac_try\"") >&5
19465   (eval $ac_try) 2>&5
19466   ac_status=$?
19467   echo "$as_me:19467: \$? = $ac_status" >&5
19468   (exit "$ac_status"); }; }; then
19469   ac_cv_lib_gnurx_regcomp=yes
19470 else
19471   echo "$as_me: failed program was:" >&5
19472 cat "conftest.$ac_ext" >&5
19473 ac_cv_lib_gnurx_regcomp=no
19474 fi
19475 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19476 LIBS=$ac_check_lib_save_LIBS
19477 fi
19478 echo "$as_me:19478: result: $ac_cv_lib_gnurx_regcomp" >&5
19479 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19480 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19481
19482 cf_add_libs="$LIBS"
19483 # reverse order
19484 cf_add_0lib=
19485 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19486 # filter duplicates
19487 for cf_add_1lib in $cf_add_0lib; do
19488         for cf_add_2lib in $cf_add_libs; do
19489                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19490                         cf_add_1lib=
19491                         break
19492                 fi
19493         done
19494         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19495 done
19496 LIBS="$cf_add_libs"
19497
19498                         cf_regex_func=regcomp
19499 fi
19500
19501 fi
19502
19503         ;;
19504 (*)
19505         cf_regex_libs="regex re"
19506         echo "$as_me:19506: checking for regcomp" >&5
19507 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19508 if test "${ac_cv_func_regcomp+set}" = set; then
19509   echo $ECHO_N "(cached) $ECHO_C" >&6
19510 else
19511   cat >"conftest.$ac_ext" <<_ACEOF
19512 #line 19512 "configure"
19513 #include "confdefs.h"
19514 #define regcomp autoconf_temporary
19515 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19516 #undef regcomp
19517
19518 #ifdef __cplusplus
19519 extern "C"
19520 #endif
19521
19522 /* We use char because int might match the return type of a gcc2
19523    builtin and then its argument prototype would still apply.  */
19524 char regcomp (void);
19525
19526 int
19527 main (void)
19528 {
19529
19530 /* The GNU C library defines stubs for functions which it implements
19531     to always fail with ENOSYS.  Some functions are actually named
19532     something starting with __ and the normal name is an alias.  */
19533 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19534 #error found stub for regcomp
19535 #endif
19536
19537         return regcomp ();
19538   ;
19539   return 0;
19540 }
19541 _ACEOF
19542 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19543 if { (eval echo "$as_me:19543: \"$ac_link\"") >&5
19544   (eval $ac_link) 2>&5
19545   ac_status=$?
19546   echo "$as_me:19546: \$? = $ac_status" >&5
19547   (exit "$ac_status"); } &&
19548          { ac_try='test -s "conftest$ac_exeext"'
19549   { (eval echo "$as_me:19549: \"$ac_try\"") >&5
19550   (eval $ac_try) 2>&5
19551   ac_status=$?
19552   echo "$as_me:19552: \$? = $ac_status" >&5
19553   (exit "$ac_status"); }; }; then
19554   ac_cv_func_regcomp=yes
19555 else
19556   echo "$as_me: failed program was:" >&5
19557 cat "conftest.$ac_ext" >&5
19558 ac_cv_func_regcomp=no
19559 fi
19560 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19561 fi
19562 echo "$as_me:19562: result: $ac_cv_func_regcomp" >&5
19563 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19564 if test "$ac_cv_func_regcomp" = yes; then
19565   cf_regex_func=regcomp
19566 else
19567
19568                 for cf_regex_lib in $cf_regex_libs
19569                 do
19570                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19571 echo "$as_me:19571: checking for regcomp in -l$cf_regex_lib" >&5
19572 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19573 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19574   echo $ECHO_N "(cached) $ECHO_C" >&6
19575 else
19576   ac_check_lib_save_LIBS=$LIBS
19577 LIBS="-l$cf_regex_lib  $LIBS"
19578 cat >"conftest.$ac_ext" <<_ACEOF
19579 #line 19579 "configure"
19580 #include "confdefs.h"
19581
19582 /* Override any gcc2 internal prototype to avoid an error.  */
19583 #ifdef __cplusplus
19584 extern "C"
19585 #endif
19586 /* We use char because int might match the return type of a gcc2
19587    builtin and then its argument prototype would still apply.  */
19588 char regcomp ();
19589 int
19590 main (void)
19591 {
19592 regcomp ();
19593   ;
19594   return 0;
19595 }
19596 _ACEOF
19597 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19598 if { (eval echo "$as_me:19598: \"$ac_link\"") >&5
19599   (eval $ac_link) 2>&5
19600   ac_status=$?
19601   echo "$as_me:19601: \$? = $ac_status" >&5
19602   (exit "$ac_status"); } &&
19603          { ac_try='test -s "conftest$ac_exeext"'
19604   { (eval echo "$as_me:19604: \"$ac_try\"") >&5
19605   (eval $ac_try) 2>&5
19606   ac_status=$?
19607   echo "$as_me:19607: \$? = $ac_status" >&5
19608   (exit "$ac_status"); }; }; then
19609   eval "$as_ac_Lib=yes"
19610 else
19611   echo "$as_me: failed program was:" >&5
19612 cat "conftest.$ac_ext" >&5
19613 eval "$as_ac_Lib=no"
19614 fi
19615 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19616 LIBS=$ac_check_lib_save_LIBS
19617 fi
19618 echo "$as_me:19618: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19619 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19620 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19621
19622 cf_add_libs="$LIBS"
19623 # reverse order
19624 cf_add_0lib=
19625 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19626 # filter duplicates
19627 for cf_add_1lib in $cf_add_0lib; do
19628         for cf_add_2lib in $cf_add_libs; do
19629                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19630                         cf_add_1lib=
19631                         break
19632                 fi
19633         done
19634         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19635 done
19636 LIBS="$cf_add_libs"
19637
19638                                         cf_regex_func=regcomp
19639                                         break
19640 fi
19641
19642                 done
19643
19644 fi
19645
19646         ;;
19647 esac
19648
19649 if test "$cf_regex_func" = no ; then
19650         echo "$as_me:19650: checking for compile" >&5
19651 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19652 if test "${ac_cv_func_compile+set}" = set; then
19653   echo $ECHO_N "(cached) $ECHO_C" >&6
19654 else
19655   cat >"conftest.$ac_ext" <<_ACEOF
19656 #line 19656 "configure"
19657 #include "confdefs.h"
19658 #define compile autoconf_temporary
19659 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19660 #undef compile
19661
19662 #ifdef __cplusplus
19663 extern "C"
19664 #endif
19665
19666 /* We use char because int might match the return type of a gcc2
19667    builtin and then its argument prototype would still apply.  */
19668 char compile (void);
19669
19670 int
19671 main (void)
19672 {
19673
19674 /* The GNU C library defines stubs for functions which it implements
19675     to always fail with ENOSYS.  Some functions are actually named
19676     something starting with __ and the normal name is an alias.  */
19677 #if defined (__stub_compile) || defined (__stub___compile)
19678 #error found stub for compile
19679 #endif
19680
19681         return compile ();
19682   ;
19683   return 0;
19684 }
19685 _ACEOF
19686 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19687 if { (eval echo "$as_me:19687: \"$ac_link\"") >&5
19688   (eval $ac_link) 2>&5
19689   ac_status=$?
19690   echo "$as_me:19690: \$? = $ac_status" >&5
19691   (exit "$ac_status"); } &&
19692          { ac_try='test -s "conftest$ac_exeext"'
19693   { (eval echo "$as_me:19693: \"$ac_try\"") >&5
19694   (eval $ac_try) 2>&5
19695   ac_status=$?
19696   echo "$as_me:19696: \$? = $ac_status" >&5
19697   (exit "$ac_status"); }; }; then
19698   ac_cv_func_compile=yes
19699 else
19700   echo "$as_me: failed program was:" >&5
19701 cat "conftest.$ac_ext" >&5
19702 ac_cv_func_compile=no
19703 fi
19704 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19705 fi
19706 echo "$as_me:19706: result: $ac_cv_func_compile" >&5
19707 echo "${ECHO_T}$ac_cv_func_compile" >&6
19708 if test "$ac_cv_func_compile" = yes; then
19709   cf_regex_func=compile
19710 else
19711
19712                 echo "$as_me:19712: checking for compile in -lgen" >&5
19713 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19714 if test "${ac_cv_lib_gen_compile+set}" = set; then
19715   echo $ECHO_N "(cached) $ECHO_C" >&6
19716 else
19717   ac_check_lib_save_LIBS=$LIBS
19718 LIBS="-lgen  $LIBS"
19719 cat >"conftest.$ac_ext" <<_ACEOF
19720 #line 19720 "configure"
19721 #include "confdefs.h"
19722
19723 /* Override any gcc2 internal prototype to avoid an error.  */
19724 #ifdef __cplusplus
19725 extern "C"
19726 #endif
19727 /* We use char because int might match the return type of a gcc2
19728    builtin and then its argument prototype would still apply.  */
19729 char compile ();
19730 int
19731 main (void)
19732 {
19733 compile ();
19734   ;
19735   return 0;
19736 }
19737 _ACEOF
19738 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19739 if { (eval echo "$as_me:19739: \"$ac_link\"") >&5
19740   (eval $ac_link) 2>&5
19741   ac_status=$?
19742   echo "$as_me:19742: \$? = $ac_status" >&5
19743   (exit "$ac_status"); } &&
19744          { ac_try='test -s "conftest$ac_exeext"'
19745   { (eval echo "$as_me:19745: \"$ac_try\"") >&5
19746   (eval $ac_try) 2>&5
19747   ac_status=$?
19748   echo "$as_me:19748: \$? = $ac_status" >&5
19749   (exit "$ac_status"); }; }; then
19750   ac_cv_lib_gen_compile=yes
19751 else
19752   echo "$as_me: failed program was:" >&5
19753 cat "conftest.$ac_ext" >&5
19754 ac_cv_lib_gen_compile=no
19755 fi
19756 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19757 LIBS=$ac_check_lib_save_LIBS
19758 fi
19759 echo "$as_me:19759: result: $ac_cv_lib_gen_compile" >&5
19760 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19761 if test "$ac_cv_lib_gen_compile" = yes; then
19762
19763 cf_add_libs="$LIBS"
19764 # reverse order
19765 cf_add_0lib=
19766 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19767 # filter duplicates
19768 for cf_add_1lib in $cf_add_0lib; do
19769         for cf_add_2lib in $cf_add_libs; do
19770                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19771                         cf_add_1lib=
19772                         break
19773                 fi
19774         done
19775         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19776 done
19777 LIBS="$cf_add_libs"
19778
19779                                 cf_regex_func=compile
19780 fi
19781
19782 fi
19783
19784 fi
19785
19786 if test "$cf_regex_func" = no ; then
19787         { echo "$as_me:19787: WARNING: cannot find regular expression library" >&5
19788 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19789 fi
19790
19791 echo "$as_me:19791: checking for regular-expression headers" >&5
19792 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19793 if test "${cf_cv_regex_hdrs+set}" = set; then
19794   echo $ECHO_N "(cached) $ECHO_C" >&6
19795 else
19796
19797 cf_cv_regex_hdrs=no
19798 case "$cf_regex_func" in
19799 (compile)
19800         for cf_regex_hdr in regexp.h regexpr.h
19801         do
19802                 cat >"conftest.$ac_ext" <<_ACEOF
19803 #line 19803 "configure"
19804 #include "confdefs.h"
19805 #include <$cf_regex_hdr>
19806 int
19807 main (void)
19808 {
19809
19810                         char *p = compile("", "", "", 0);
19811                         int x = step("", "");
19812                         (void)p;
19813                         (void)x;
19814
19815   ;
19816   return 0;
19817 }
19818 _ACEOF
19819 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19820 if { (eval echo "$as_me:19820: \"$ac_link\"") >&5
19821   (eval $ac_link) 2>&5
19822   ac_status=$?
19823   echo "$as_me:19823: \$? = $ac_status" >&5
19824   (exit "$ac_status"); } &&
19825          { ac_try='test -s "conftest$ac_exeext"'
19826   { (eval echo "$as_me:19826: \"$ac_try\"") >&5
19827   (eval $ac_try) 2>&5
19828   ac_status=$?
19829   echo "$as_me:19829: \$? = $ac_status" >&5
19830   (exit "$ac_status"); }; }; then
19831
19832                         cf_cv_regex_hdrs=$cf_regex_hdr
19833                         break
19834
19835 else
19836   echo "$as_me: failed program was:" >&5
19837 cat "conftest.$ac_ext" >&5
19838 fi
19839 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19840         done
19841         ;;
19842 (*)
19843         for cf_regex_hdr in regex.h
19844         do
19845                 cat >"conftest.$ac_ext" <<_ACEOF
19846 #line 19846 "configure"
19847 #include "confdefs.h"
19848 #include <sys/types.h>
19849 #include <$cf_regex_hdr>
19850 int
19851 main (void)
19852 {
19853
19854                         regex_t *p = 0;
19855                         int x = regcomp(p, "", 0);
19856                         int y = regexec(p, "", 0, 0, 0);
19857                         (void)x;
19858                         (void)y;
19859                         regfree(p);
19860
19861   ;
19862   return 0;
19863 }
19864 _ACEOF
19865 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19866 if { (eval echo "$as_me:19866: \"$ac_link\"") >&5
19867   (eval $ac_link) 2>&5
19868   ac_status=$?
19869   echo "$as_me:19869: \$? = $ac_status" >&5
19870   (exit "$ac_status"); } &&
19871          { ac_try='test -s "conftest$ac_exeext"'
19872   { (eval echo "$as_me:19872: \"$ac_try\"") >&5
19873   (eval $ac_try) 2>&5
19874   ac_status=$?
19875   echo "$as_me:19875: \$? = $ac_status" >&5
19876   (exit "$ac_status"); }; }; then
19877
19878                         cf_cv_regex_hdrs=$cf_regex_hdr
19879                         break
19880
19881 else
19882   echo "$as_me: failed program was:" >&5
19883 cat "conftest.$ac_ext" >&5
19884 fi
19885 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19886         done
19887         ;;
19888 esac
19889
19890 fi
19891 echo "$as_me:19891: result: $cf_cv_regex_hdrs" >&5
19892 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19893
19894 case "$cf_cv_regex_hdrs" in
19895         (no)            { echo "$as_me:19895: WARNING: no regular expression header found" >&5
19896 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19897         (regex.h)
19898 cat >>confdefs.h <<\EOF
19899 #define HAVE_REGEX_H_FUNCS 1
19900 EOF
19901  ;;
19902         (regexp.h)
19903 cat >>confdefs.h <<\EOF
19904 #define HAVE_REGEXP_H_FUNCS 1
19905 EOF
19906  ;;
19907         (regexpr.h)
19908 cat >>confdefs.h <<\EOF
19909 #define HAVE_REGEXPR_H_FUNCS 1
19910 EOF
19911  ;;
19912 esac
19913
19914 for ac_header in \
19915 fcntl.h \
19916 getopt.h \
19917 limits.h \
19918 locale.h \
19919 math.h \
19920 poll.h \
19921 sys/ioctl.h \
19922 sys/param.h \
19923 sys/poll.h \
19924 sys/select.h \
19925 sys/time.h \
19926 sys/times.h \
19927 ttyent.h \
19928 unistd.h \
19929 wctype.h \
19930
19931 do
19932 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19933 echo "$as_me:19933: checking for $ac_header" >&5
19934 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19935 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19936   echo $ECHO_N "(cached) $ECHO_C" >&6
19937 else
19938   cat >"conftest.$ac_ext" <<_ACEOF
19939 #line 19939 "configure"
19940 #include "confdefs.h"
19941 #include <$ac_header>
19942 _ACEOF
19943 if { (eval echo "$as_me:19943: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19944   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19945   ac_status=$?
19946   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19947   rm -f conftest.er1
19948   cat conftest.err >&5
19949   echo "$as_me:19949: \$? = $ac_status" >&5
19950   (exit "$ac_status"); } >/dev/null; then
19951   if test -s conftest.err; then
19952     ac_cpp_err=$ac_c_preproc_warn_flag
19953   else
19954     ac_cpp_err=
19955   fi
19956 else
19957   ac_cpp_err=yes
19958 fi
19959 if test -z "$ac_cpp_err"; then
19960   eval "$as_ac_Header=yes"
19961 else
19962   echo "$as_me: failed program was:" >&5
19963   cat "conftest.$ac_ext" >&5
19964   eval "$as_ac_Header=no"
19965 fi
19966 rm -f conftest.err "conftest.$ac_ext"
19967 fi
19968 echo "$as_me:19968: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19969 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19970 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19971   cat >>confdefs.h <<EOF
19972 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19973 EOF
19974
19975 fi
19976 done
19977
19978 for ac_header in unistd.h getopt.h
19979 do
19980 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19981 echo "$as_me:19981: checking for $ac_header" >&5
19982 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19983 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19984   echo $ECHO_N "(cached) $ECHO_C" >&6
19985 else
19986   cat >"conftest.$ac_ext" <<_ACEOF
19987 #line 19987 "configure"
19988 #include "confdefs.h"
19989 #include <$ac_header>
19990 _ACEOF
19991 if { (eval echo "$as_me:19991: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19992   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19993   ac_status=$?
19994   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19995   rm -f conftest.er1
19996   cat conftest.err >&5
19997   echo "$as_me:19997: \$? = $ac_status" >&5
19998   (exit "$ac_status"); } >/dev/null; then
19999   if test -s conftest.err; then
20000     ac_cpp_err=$ac_c_preproc_warn_flag
20001   else
20002     ac_cpp_err=
20003   fi
20004 else
20005   ac_cpp_err=yes
20006 fi
20007 if test -z "$ac_cpp_err"; then
20008   eval "$as_ac_Header=yes"
20009 else
20010   echo "$as_me: failed program was:" >&5
20011   cat "conftest.$ac_ext" >&5
20012   eval "$as_ac_Header=no"
20013 fi
20014 rm -f conftest.err "conftest.$ac_ext"
20015 fi
20016 echo "$as_me:20016: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20017 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20018 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20019   cat >>confdefs.h <<EOF
20020 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20021 EOF
20022
20023 fi
20024 done
20025
20026 echo "$as_me:20026: checking for header declaring getopt variables" >&5
20027 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20028 if test "${cf_cv_getopt_header+set}" = set; then
20029   echo $ECHO_N "(cached) $ECHO_C" >&6
20030 else
20031
20032 cf_cv_getopt_header=none
20033 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20034 do
20035 cat >"conftest.$ac_ext" <<_ACEOF
20036 #line 20036 "configure"
20037 #include "confdefs.h"
20038
20039 #include <$cf_header>
20040 int
20041 main (void)
20042 {
20043 int x = optind; char *y = optarg; (void)x; (void)y
20044   ;
20045   return 0;
20046 }
20047 _ACEOF
20048 rm -f "conftest.$ac_objext"
20049 if { (eval echo "$as_me:20049: \"$ac_compile\"") >&5
20050   (eval $ac_compile) 2>&5
20051   ac_status=$?
20052   echo "$as_me:20052: \$? = $ac_status" >&5
20053   (exit "$ac_status"); } &&
20054          { ac_try='test -s "conftest.$ac_objext"'
20055   { (eval echo "$as_me:20055: \"$ac_try\"") >&5
20056   (eval $ac_try) 2>&5
20057   ac_status=$?
20058   echo "$as_me:20058: \$? = $ac_status" >&5
20059   (exit "$ac_status"); }; }; then
20060   cf_cv_getopt_header=$cf_header
20061  break
20062 else
20063   echo "$as_me: failed program was:" >&5
20064 cat "conftest.$ac_ext" >&5
20065 fi
20066 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20067 done
20068
20069 fi
20070 echo "$as_me:20070: result: $cf_cv_getopt_header" >&5
20071 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20072 if test "$cf_cv_getopt_header" != none ; then
20073
20074 cat >>confdefs.h <<\EOF
20075 #define HAVE_GETOPT_HEADER 1
20076 EOF
20077
20078 fi
20079 if test "$cf_cv_getopt_header" = getopt.h ; then
20080
20081 cat >>confdefs.h <<\EOF
20082 #define NEED_GETOPT_H 1
20083 EOF
20084
20085 fi
20086
20087 echo "$as_me:20087: checking if external environ is declared" >&5
20088 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20089 if test "${cf_cv_dcl_environ+set}" = set; then
20090   echo $ECHO_N "(cached) $ECHO_C" >&6
20091 else
20092
20093     cat >"conftest.$ac_ext" <<_ACEOF
20094 #line 20094 "configure"
20095 #include "confdefs.h"
20096
20097 #ifdef HAVE_STDLIB_H
20098 #include <stdlib.h>
20099 #endif
20100 #include <unistd.h>
20101 int
20102 main (void)
20103 {
20104 int x = (int) environ
20105   ;
20106   return 0;
20107 }
20108 _ACEOF
20109 rm -f "conftest.$ac_objext"
20110 if { (eval echo "$as_me:20110: \"$ac_compile\"") >&5
20111   (eval $ac_compile) 2>&5
20112   ac_status=$?
20113   echo "$as_me:20113: \$? = $ac_status" >&5
20114   (exit "$ac_status"); } &&
20115          { ac_try='test -s "conftest.$ac_objext"'
20116   { (eval echo "$as_me:20116: \"$ac_try\"") >&5
20117   (eval $ac_try) 2>&5
20118   ac_status=$?
20119   echo "$as_me:20119: \$? = $ac_status" >&5
20120   (exit "$ac_status"); }; }; then
20121   cf_cv_dcl_environ=yes
20122 else
20123   echo "$as_me: failed program was:" >&5
20124 cat "conftest.$ac_ext" >&5
20125 cf_cv_dcl_environ=no
20126 fi
20127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20128
20129 fi
20130 echo "$as_me:20130: result: $cf_cv_dcl_environ" >&5
20131 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20132
20133 if test "$cf_cv_dcl_environ" = no ; then
20134
20135 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20136
20137     cat >>confdefs.h <<EOF
20138 #define $cf_result 1
20139 EOF
20140
20141 fi
20142
20143 # It's possible (for near-UNIX clones) that the data doesn't exist
20144
20145 echo "$as_me:20145: checking if external environ exists" >&5
20146 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20147 if test "${cf_cv_have_environ+set}" = set; then
20148   echo $ECHO_N "(cached) $ECHO_C" >&6
20149 else
20150
20151         cat >"conftest.$ac_ext" <<_ACEOF
20152 #line 20152 "configure"
20153 #include "confdefs.h"
20154
20155 #undef environ
20156 extern int environ;
20157
20158 int
20159 main (void)
20160 {
20161 environ = 2
20162   ;
20163   return 0;
20164 }
20165 _ACEOF
20166 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20167 if { (eval echo "$as_me:20167: \"$ac_link\"") >&5
20168   (eval $ac_link) 2>&5
20169   ac_status=$?
20170   echo "$as_me:20170: \$? = $ac_status" >&5
20171   (exit "$ac_status"); } &&
20172          { ac_try='test -s "conftest$ac_exeext"'
20173   { (eval echo "$as_me:20173: \"$ac_try\"") >&5
20174   (eval $ac_try) 2>&5
20175   ac_status=$?
20176   echo "$as_me:20176: \$? = $ac_status" >&5
20177   (exit "$ac_status"); }; }; then
20178   cf_cv_have_environ=yes
20179 else
20180   echo "$as_me: failed program was:" >&5
20181 cat "conftest.$ac_ext" >&5
20182 cf_cv_have_environ=no
20183 fi
20184 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20185
20186 fi
20187 echo "$as_me:20187: result: $cf_cv_have_environ" >&5
20188 echo "${ECHO_T}$cf_cv_have_environ" >&6
20189
20190 if test "$cf_cv_have_environ" = yes ; then
20191
20192 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20193
20194         cat >>confdefs.h <<EOF
20195 #define $cf_result 1
20196 EOF
20197
20198 fi
20199
20200 echo "$as_me:20200: checking for getenv" >&5
20201 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20202 if test "${ac_cv_func_getenv+set}" = set; then
20203   echo $ECHO_N "(cached) $ECHO_C" >&6
20204 else
20205   cat >"conftest.$ac_ext" <<_ACEOF
20206 #line 20206 "configure"
20207 #include "confdefs.h"
20208 #define getenv autoconf_temporary
20209 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20210 #undef getenv
20211
20212 #ifdef __cplusplus
20213 extern "C"
20214 #endif
20215
20216 /* We use char because int might match the return type of a gcc2
20217    builtin and then its argument prototype would still apply.  */
20218 char getenv (void);
20219
20220 int
20221 main (void)
20222 {
20223
20224 /* The GNU C library defines stubs for functions which it implements
20225     to always fail with ENOSYS.  Some functions are actually named
20226     something starting with __ and the normal name is an alias.  */
20227 #if defined (__stub_getenv) || defined (__stub___getenv)
20228 #error found stub for getenv
20229 #endif
20230
20231         return getenv ();
20232   ;
20233   return 0;
20234 }
20235 _ACEOF
20236 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20237 if { (eval echo "$as_me:20237: \"$ac_link\"") >&5
20238   (eval $ac_link) 2>&5
20239   ac_status=$?
20240   echo "$as_me:20240: \$? = $ac_status" >&5
20241   (exit "$ac_status"); } &&
20242          { ac_try='test -s "conftest$ac_exeext"'
20243   { (eval echo "$as_me:20243: \"$ac_try\"") >&5
20244   (eval $ac_try) 2>&5
20245   ac_status=$?
20246   echo "$as_me:20246: \$? = $ac_status" >&5
20247   (exit "$ac_status"); }; }; then
20248   ac_cv_func_getenv=yes
20249 else
20250   echo "$as_me: failed program was:" >&5
20251 cat "conftest.$ac_ext" >&5
20252 ac_cv_func_getenv=no
20253 fi
20254 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20255 fi
20256 echo "$as_me:20256: result: $ac_cv_func_getenv" >&5
20257 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20258
20259 for ac_func in putenv setenv strdup
20260 do
20261 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20262 echo "$as_me:20262: checking for $ac_func" >&5
20263 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20264 if eval "test \"\${$as_ac_var+set}\" = set"; then
20265   echo $ECHO_N "(cached) $ECHO_C" >&6
20266 else
20267   cat >"conftest.$ac_ext" <<_ACEOF
20268 #line 20268 "configure"
20269 #include "confdefs.h"
20270 #define $ac_func autoconf_temporary
20271 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20272 #undef $ac_func
20273
20274 #ifdef __cplusplus
20275 extern "C"
20276 #endif
20277
20278 /* We use char because int might match the return type of a gcc2
20279    builtin and then its argument prototype would still apply.  */
20280 char $ac_func (void);
20281
20282 int
20283 main (void)
20284 {
20285
20286 /* The GNU C library defines stubs for functions which it implements
20287     to always fail with ENOSYS.  Some functions are actually named
20288     something starting with __ and the normal name is an alias.  */
20289 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20290 #error found stub for $ac_func
20291 #endif
20292
20293         return $ac_func ();
20294   ;
20295   return 0;
20296 }
20297 _ACEOF
20298 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20299 if { (eval echo "$as_me:20299: \"$ac_link\"") >&5
20300   (eval $ac_link) 2>&5
20301   ac_status=$?
20302   echo "$as_me:20302: \$? = $ac_status" >&5
20303   (exit "$ac_status"); } &&
20304          { ac_try='test -s "conftest$ac_exeext"'
20305   { (eval echo "$as_me:20305: \"$ac_try\"") >&5
20306   (eval $ac_try) 2>&5
20307   ac_status=$?
20308   echo "$as_me:20308: \$? = $ac_status" >&5
20309   (exit "$ac_status"); }; }; then
20310   eval "$as_ac_var=yes"
20311 else
20312   echo "$as_me: failed program was:" >&5
20313 cat "conftest.$ac_ext" >&5
20314 eval "$as_ac_var=no"
20315 fi
20316 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20317 fi
20318 echo "$as_me:20318: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20319 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20320 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20321   cat >>confdefs.h <<EOF
20322 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20323 EOF
20324
20325 fi
20326 done
20327
20328 echo "$as_me:20328: checking if getenv returns consistent values" >&5
20329 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20330 if test "${cf_cv_consistent_getenv+set}" = set; then
20331   echo $ECHO_N "(cached) $ECHO_C" >&6
20332 else
20333
20334 if test "$cross_compiling" = yes; then
20335   cf_cv_consistent_getenv=unknown
20336 else
20337   cat >"conftest.$ac_ext" <<_ACEOF
20338 #line 20338 "configure"
20339 #include "confdefs.h"
20340
20341 #include <stdlib.h>
20342 #include <unistd.h>
20343 #include <stdio.h>
20344 #include <string.h>
20345 #include <sys/types.h>
20346
20347 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20348 extern char **environ;  /* POSIX, but some systems are not... */
20349 #endif
20350
20351 #if defined(HAVE_STRDUP)
20352 #define str_alloc(s) strdup(s)
20353 #else
20354 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20355 #endif
20356
20357 static void set_value(const char *name, const char *value)
20358 {
20359 #if defined(HAVE_SETENV)
20360         setenv(name, value, 1);
20361 #elif defined(HAVE_PUTENV)
20362         char buffer[1024];
20363         sprintf(buffer, "%s=%s", name, value);
20364         putenv(str_alloc(buffer));
20365 #else
20366 #error neither putenv/setenv found
20367 #endif
20368 }
20369 int main(void)
20370 {
20371         int pass;
20372         size_t numenv, limit, j;
20373         char **mynames;
20374         char **myvalues;
20375         char **mypointer;
20376         char *equals;
20377         for (numenv = 0; environ[numenv]; ++numenv) ;
20378         limit = numenv + 10;
20379         mynames = (char **) calloc(limit + 1, sizeof(char *));
20380         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20381         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20382 #if defined(HAVE_ENVIRON)
20383         for (j = 0; environ[j]; ++j) {
20384                 mynames[j] = str_alloc(environ[j]);
20385                 equals = strchr(mynames[j], '=');
20386                 if (equals != 0) {
20387                         *equals++ = '\\0';
20388                         myvalues[j] = str_alloc(equals);
20389                 } else {
20390                         myvalues[j] = str_alloc("");
20391                 }
20392         }
20393 #endif
20394         for (j = numenv; j < limit; ++j) {
20395                 char name[80];
20396                 char value[80];
20397                 size_t found;
20398                 size_t k = 0;
20399                 do {
20400                         size_t jk;
20401                         found = 0;
20402                         sprintf(name, "TERM%lu", (unsigned long) k);
20403                         for (jk = 0; jk < j; ++jk) {
20404                                 if (!strcmp(name, mynames[jk])) {
20405                                         found = 1;
20406                                         ++k;
20407                                         break;
20408                                 }
20409                         }
20410                 } while (found);
20411                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20412                 set_value(name, value);
20413                 mynames[j] = str_alloc(name);
20414                 myvalues[j] = str_alloc(value);
20415         }
20416         for (pass = 0; pass < 3; ++pass) {
20417                 for (j = 0; j < limit; ++j) {
20418                         char *value = getenv(mynames[j]);
20419                         if (pass) {
20420                                 if (value == 0) {
20421                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20422                                         ${cf_cv_main_return:-return}(1);
20423                                 } else if (value != mypointer[j]) {
20424                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20425                                         ${cf_cv_main_return:-return}(1);
20426                                 } else if (strcmp(value, myvalues[j])) {
20427                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20428                                         ${cf_cv_main_return:-return}(1);
20429                                 }
20430                         } else {
20431                                 size_t k;
20432                                 mypointer[j] = value;
20433                                 for (k = 0; k < j; ++k) {
20434                                         if (mypointer[j] == mypointer[k]) {
20435                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20436                                                 ${cf_cv_main_return:-return}(1);
20437                                         }
20438                                 }
20439                         }
20440                 }
20441         }
20442         ${cf_cv_main_return:-return}(0);
20443 }
20444
20445 _ACEOF
20446 rm -f "conftest$ac_exeext"
20447 if { (eval echo "$as_me:20447: \"$ac_link\"") >&5
20448   (eval $ac_link) 2>&5
20449   ac_status=$?
20450   echo "$as_me:20450: \$? = $ac_status" >&5
20451   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20452   { (eval echo "$as_me:20452: \"$ac_try\"") >&5
20453   (eval $ac_try) 2>&5
20454   ac_status=$?
20455   echo "$as_me:20455: \$? = $ac_status" >&5
20456   (exit "$ac_status"); }; }; then
20457   cf_cv_consistent_getenv=yes
20458 else
20459   echo "$as_me: program exited with status $ac_status" >&5
20460 echo "$as_me: failed program was:" >&5
20461 cat "conftest.$ac_ext" >&5
20462 cf_cv_consistent_getenv=no
20463 fi
20464 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20465 fi
20466
20467 fi
20468 echo "$as_me:20468: result: $cf_cv_consistent_getenv" >&5
20469 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20470
20471 if test "x$cf_cv_consistent_getenv" = xno
20472 then
20473
20474 cat >>confdefs.h <<\EOF
20475 #define HAVE_CONSISTENT_GETENV 1
20476 EOF
20477
20478 fi
20479
20480 if test "x$cf_cv_consistent_getenv" = xno && \
20481         test "x$cf_with_trace" = xyes
20482 then
20483         { echo "$as_me:20483: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20484 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20485 fi
20486
20487 echo "$as_me:20487: checking if sys/time.h works with sys/select.h" >&5
20488 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20489 if test "${cf_cv_sys_time_select+set}" = set; then
20490   echo $ECHO_N "(cached) $ECHO_C" >&6
20491 else
20492
20493 cat >"conftest.$ac_ext" <<_ACEOF
20494 #line 20494 "configure"
20495 #include "confdefs.h"
20496
20497 #include <sys/types.h>
20498 #ifdef HAVE_SYS_TIME_H
20499 #include <sys/time.h>
20500 #endif
20501 #ifdef HAVE_SYS_SELECT_H
20502 #include <sys/select.h>
20503 #endif
20504
20505 int
20506 main (void)
20507 {
20508
20509   ;
20510   return 0;
20511 }
20512 _ACEOF
20513 rm -f "conftest.$ac_objext"
20514 if { (eval echo "$as_me:20514: \"$ac_compile\"") >&5
20515   (eval $ac_compile) 2>&5
20516   ac_status=$?
20517   echo "$as_me:20517: \$? = $ac_status" >&5
20518   (exit "$ac_status"); } &&
20519          { ac_try='test -s "conftest.$ac_objext"'
20520   { (eval echo "$as_me:20520: \"$ac_try\"") >&5
20521   (eval $ac_try) 2>&5
20522   ac_status=$?
20523   echo "$as_me:20523: \$? = $ac_status" >&5
20524   (exit "$ac_status"); }; }; then
20525   cf_cv_sys_time_select=yes
20526 else
20527   echo "$as_me: failed program was:" >&5
20528 cat "conftest.$ac_ext" >&5
20529 cf_cv_sys_time_select=no
20530 fi
20531 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20532
20533 fi
20534
20535 echo "$as_me:20535: result: $cf_cv_sys_time_select" >&5
20536 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20537 test "$cf_cv_sys_time_select" = yes &&
20538 cat >>confdefs.h <<\EOF
20539 #define HAVE_SYS_TIME_SELECT 1
20540 EOF
20541
20542 ###     checks for compiler characteristics
20543 ac_ext=c
20544 ac_cpp='$CPP $CPPFLAGS'
20545 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20546 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20547 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20548 ac_main_return="return"
20549
20550 echo "$as_me:20550: checking for an ANSI C-conforming const" >&5
20551 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20552 if test "${ac_cv_c_const+set}" = set; then
20553   echo $ECHO_N "(cached) $ECHO_C" >&6
20554 else
20555   cat >"conftest.$ac_ext" <<_ACEOF
20556 #line 20556 "configure"
20557 #include "confdefs.h"
20558
20559 int
20560 main (void)
20561 {
20562 /* FIXME: Include the comments suggested by Paul. */
20563 #ifndef __cplusplus
20564   /* Ultrix mips cc rejects this.  */
20565   typedef int charset[2];
20566   const charset x;
20567   /* SunOS 4.1.1 cc rejects this.  */
20568   char const *const *ccp;
20569   char **p;
20570   /* NEC SVR4.0.2 mips cc rejects this.  */
20571   struct point {int x, y;};
20572   static struct point const zero = {0,0};
20573   /* AIX XL C 1.02.0.0 rejects this.
20574      It does not let you subtract one const X* pointer from another in
20575      an arm of an if-expression whose if-part is not a constant
20576      expression */
20577   const char *g = "string";
20578   ccp = &g + (g ? g-g : 0);
20579   /* HPUX 7.0 cc rejects these. */
20580   ++ccp;
20581   p = (char**) ccp;
20582   ccp = (char const *const *) p;
20583   { /* SCO 3.2v4 cc rejects this.  */
20584     char *t;
20585     char const *s = 0 ? (char *) 0 : (char const *) 0;
20586
20587     *t++ = 0;
20588   }
20589   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20590     int x[] = {25, 17};
20591     const int *foo = &x[0];
20592     ++foo;
20593   }
20594   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20595     typedef const int *iptr;
20596     iptr p = 0;
20597     ++p;
20598   }
20599   { /* AIX XL C 1.02.0.0 rejects this saying
20600        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20601     struct s { int j; const int *ap[3]; };
20602     struct s *b; b->j = 5;
20603   }
20604   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20605     const int foo = 10;
20606   }
20607 #endif
20608
20609   ;
20610   return 0;
20611 }
20612 _ACEOF
20613 rm -f "conftest.$ac_objext"
20614 if { (eval echo "$as_me:20614: \"$ac_compile\"") >&5
20615   (eval $ac_compile) 2>&5
20616   ac_status=$?
20617   echo "$as_me:20617: \$? = $ac_status" >&5
20618   (exit "$ac_status"); } &&
20619          { ac_try='test -s "conftest.$ac_objext"'
20620   { (eval echo "$as_me:20620: \"$ac_try\"") >&5
20621   (eval $ac_try) 2>&5
20622   ac_status=$?
20623   echo "$as_me:20623: \$? = $ac_status" >&5
20624   (exit "$ac_status"); }; }; then
20625   ac_cv_c_const=yes
20626 else
20627   echo "$as_me: failed program was:" >&5
20628 cat "conftest.$ac_ext" >&5
20629 ac_cv_c_const=no
20630 fi
20631 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20632 fi
20633 echo "$as_me:20633: result: $ac_cv_c_const" >&5
20634 echo "${ECHO_T}$ac_cv_c_const" >&6
20635 if test $ac_cv_c_const = no; then
20636
20637 cat >>confdefs.h <<\EOF
20638 #define const
20639 EOF
20640
20641 fi
20642
20643 echo "$as_me:20643: checking for inline" >&5
20644 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20645 if test "${ac_cv_c_inline+set}" = set; then
20646   echo $ECHO_N "(cached) $ECHO_C" >&6
20647 else
20648   ac_cv_c_inline=no
20649 for ac_kw in inline __inline__ __inline; do
20650   cat >"conftest.$ac_ext" <<_ACEOF
20651 #line 20651 "configure"
20652 #include "confdefs.h"
20653 #ifndef __cplusplus
20654 static $ac_kw int static_foo () {return 0; }
20655 $ac_kw int foo () {return 0; }
20656 #endif
20657
20658 _ACEOF
20659 rm -f "conftest.$ac_objext"
20660 if { (eval echo "$as_me:20660: \"$ac_compile\"") >&5
20661   (eval $ac_compile) 2>&5
20662   ac_status=$?
20663   echo "$as_me:20663: \$? = $ac_status" >&5
20664   (exit "$ac_status"); } &&
20665          { ac_try='test -s "conftest.$ac_objext"'
20666   { (eval echo "$as_me:20666: \"$ac_try\"") >&5
20667   (eval $ac_try) 2>&5
20668   ac_status=$?
20669   echo "$as_me:20669: \$? = $ac_status" >&5
20670   (exit "$ac_status"); }; }; then
20671   ac_cv_c_inline=$ac_kw; break
20672 else
20673   echo "$as_me: failed program was:" >&5
20674 cat "conftest.$ac_ext" >&5
20675 fi
20676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20677 done
20678
20679 fi
20680 echo "$as_me:20680: result: $ac_cv_c_inline" >&5
20681 echo "${ECHO_T}$ac_cv_c_inline" >&6
20682 case $ac_cv_c_inline in
20683   inline | yes) ;;
20684   no)
20685 cat >>confdefs.h <<\EOF
20686 #define inline
20687 EOF
20688  ;;
20689   *)  cat >>confdefs.h <<EOF
20690 #define inline $ac_cv_c_inline
20691 EOF
20692  ;;
20693 esac
20694
20695 NCURSES_INLINE=
20696 if test "$ac_cv_c_inline" != no ; then
20697         NCURSES_INLINE=inline
20698         if test "$INTEL_COMPILER" = yes
20699         then
20700                 :
20701         elif test "$CLANG_COMPILER" = yes
20702         then
20703                 :
20704         elif test "$GCC" = yes
20705         then
20706                 echo "$as_me:20706: checking if $CC supports options to tune inlining" >&5
20707 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20708 if test "${cf_cv_gcc_inline+set}" = set; then
20709   echo $ECHO_N "(cached) $ECHO_C" >&6
20710 else
20711
20712                 cf_save_CFLAGS=$CFLAGS
20713                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20714                 cat >"conftest.$ac_ext" <<_ACEOF
20715 #line 20715 "configure"
20716 #include "confdefs.h"
20717 inline int foo(void) { return 1; }
20718 int
20719 main (void)
20720 {
20721 ${cf_cv_main_return:-return} foo()
20722   ;
20723   return 0;
20724 }
20725 _ACEOF
20726 rm -f "conftest.$ac_objext"
20727 if { (eval echo "$as_me:20727: \"$ac_compile\"") >&5
20728   (eval $ac_compile) 2>&5
20729   ac_status=$?
20730   echo "$as_me:20730: \$? = $ac_status" >&5
20731   (exit "$ac_status"); } &&
20732          { ac_try='test -s "conftest.$ac_objext"'
20733   { (eval echo "$as_me:20733: \"$ac_try\"") >&5
20734   (eval $ac_try) 2>&5
20735   ac_status=$?
20736   echo "$as_me:20736: \$? = $ac_status" >&5
20737   (exit "$ac_status"); }; }; then
20738   cf_cv_gcc_inline=yes
20739 else
20740   echo "$as_me: failed program was:" >&5
20741 cat "conftest.$ac_ext" >&5
20742 cf_cv_gcc_inline=no
20743 fi
20744 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20745                 CFLAGS=$cf_save_CFLAGS
20746
20747 fi
20748 echo "$as_me:20748: result: $cf_cv_gcc_inline" >&5
20749 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20750                 if test "$cf_cv_gcc_inline" = yes ; then
20751
20752 cf_fix_cppflags=no
20753 cf_new_cflags=
20754 cf_new_cppflags=
20755 cf_new_extra_cppflags=
20756
20757 for cf_add_cflags in --param max-inline-insns-single=1200
20758 do
20759 case "$cf_fix_cppflags" in
20760 (no)
20761         case "$cf_add_cflags" in
20762         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20763                 case "$cf_add_cflags" in
20764                 (-D*)
20765                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20766
20767                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20768                                 && test -z "${cf_tst_cflags}" \
20769                                 && cf_fix_cppflags=yes
20770
20771                         if test "$cf_fix_cppflags" = yes ; then
20772
20773         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20774         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20775
20776                                 continue
20777                         elif test "${cf_tst_cflags}" = "\"'" ; then
20778
20779         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20780         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20781
20782                                 continue
20783                         fi
20784                         ;;
20785                 esac
20786                 case "$CPPFLAGS" in
20787                 (*$cf_add_cflags)
20788                         ;;
20789                 (*)
20790                         case "$cf_add_cflags" in
20791                         (-D*)
20792                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20793
20794 CPPFLAGS=`echo "$CPPFLAGS" | \
20795         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20796                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20797
20798                                 ;;
20799                         esac
20800
20801         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20802         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20803
20804                         ;;
20805                 esac
20806                 ;;
20807         (*)
20808
20809         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20810         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20811
20812                 ;;
20813         esac
20814         ;;
20815 (yes)
20816
20817         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20818         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20819
20820         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20821
20822         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20823                 && test -z "${cf_tst_cflags}" \
20824                 && cf_fix_cppflags=no
20825         ;;
20826 esac
20827 done
20828
20829 if test -n "$cf_new_cflags" ; then
20830
20831         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20832         CFLAGS="${CFLAGS}$cf_new_cflags"
20833
20834 fi
20835
20836 if test -n "$cf_new_cppflags" ; then
20837
20838         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20839         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20840
20841 fi
20842
20843 if test -n "$cf_new_extra_cppflags" ; then
20844
20845         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20846         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20847
20848 fi
20849
20850                 fi
20851         fi
20852 fi
20853
20854 echo "$as_me:20854: checking for signal global datatype" >&5
20855 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20856 if test "${cf_cv_sig_atomic_t+set}" = set; then
20857   echo $ECHO_N "(cached) $ECHO_C" >&6
20858 else
20859
20860         for cf_type in \
20861                 "volatile sig_atomic_t" \
20862                 "sig_atomic_t" \
20863                 "int"
20864         do
20865         cat >"conftest.$ac_ext" <<_ACEOF
20866 #line 20866 "configure"
20867 #include "confdefs.h"
20868
20869 #include <sys/types.h>
20870 #include <signal.h>
20871 #include <stdio.h>
20872
20873 extern $cf_type x;
20874 $cf_type x;
20875 static void handler(int sig)
20876 {
20877         (void)sig;
20878         x = 5;
20879 }
20880 int
20881 main (void)
20882 {
20883 signal(SIGINT, handler);
20884                  x = 1
20885   ;
20886   return 0;
20887 }
20888 _ACEOF
20889 rm -f "conftest.$ac_objext"
20890 if { (eval echo "$as_me:20890: \"$ac_compile\"") >&5
20891   (eval $ac_compile) 2>&5
20892   ac_status=$?
20893   echo "$as_me:20893: \$? = $ac_status" >&5
20894   (exit "$ac_status"); } &&
20895          { ac_try='test -s "conftest.$ac_objext"'
20896   { (eval echo "$as_me:20896: \"$ac_try\"") >&5
20897   (eval $ac_try) 2>&5
20898   ac_status=$?
20899   echo "$as_me:20899: \$? = $ac_status" >&5
20900   (exit "$ac_status"); }; }; then
20901   cf_cv_sig_atomic_t=$cf_type
20902 else
20903   echo "$as_me: failed program was:" >&5
20904 cat "conftest.$ac_ext" >&5
20905 cf_cv_sig_atomic_t=no
20906 fi
20907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20908                 test "$cf_cv_sig_atomic_t" != no && break
20909         done
20910
20911 fi
20912
20913 echo "$as_me:20913: result: $cf_cv_sig_atomic_t" >&5
20914 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20915 test "$cf_cv_sig_atomic_t" != no &&
20916 cat >>confdefs.h <<EOF
20917 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20918 EOF
20919
20920 if test "$NCURSES_CHTYPE" = auto ; then
20921
20922 echo "$as_me:20922: checking for type of chtype" >&5
20923 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20924 if test "${cf_cv_typeof_chtype+set}" = set; then
20925   echo $ECHO_N "(cached) $ECHO_C" >&6
20926 else
20927
20928                 if test "$cross_compiling" = yes; then
20929   cf_cv_typeof_chtype=long
20930 else
20931   cat >"conftest.$ac_ext" <<_ACEOF
20932 #line 20932 "configure"
20933 #include "confdefs.h"
20934
20935 #define WANT_BITS 31
20936 #include <stdio.h>
20937 int main(void)
20938 {
20939         FILE *fp = fopen("cf_test.out", "w");
20940         if (fp != 0) {
20941                 char *result = "long";
20942                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20943                         int n;
20944                         unsigned int x, y;
20945                         for (n = 0; n < WANT_BITS; n++) {
20946                                 x = (1 << n);
20947                                 y = (x >> n);
20948                                 if (y != 1 || x == 0) {
20949                                         x = 0;
20950                                         break;
20951                                 }
20952                         }
20953                         /*
20954                          * If x is nonzero, an int is big enough for the bits
20955                          * that we want.
20956                          */
20957                         result = (x != 0) ? "int" : "long";
20958                 }
20959                 fputs(result, fp);
20960                 fclose(fp);
20961         }
20962         ${cf_cv_main_return:-return}(0);
20963 }
20964
20965 _ACEOF
20966 rm -f "conftest$ac_exeext"
20967 if { (eval echo "$as_me:20967: \"$ac_link\"") >&5
20968   (eval $ac_link) 2>&5
20969   ac_status=$?
20970   echo "$as_me:20970: \$? = $ac_status" >&5
20971   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20972   { (eval echo "$as_me:20972: \"$ac_try\"") >&5
20973   (eval $ac_try) 2>&5
20974   ac_status=$?
20975   echo "$as_me:20975: \$? = $ac_status" >&5
20976   (exit "$ac_status"); }; }; then
20977   cf_cv_typeof_chtype=`cat cf_test.out`
20978 else
20979   echo "$as_me: program exited with status $ac_status" >&5
20980 echo "$as_me: failed program was:" >&5
20981 cat "conftest.$ac_ext" >&5
20982 cf_cv_typeof_chtype=long
20983 fi
20984 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20985 fi
20986                 rm -f cf_test.out
20987
20988 fi
20989
20990 echo "$as_me:20990: result: $cf_cv_typeof_chtype" >&5
20991 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20992
20993 cat >>confdefs.h <<EOF
20994 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20995 EOF
20996
20997 else
20998         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20999 fi
21000 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21001
21002 echo "$as_me:21002: checking if unsigned literals are legal" >&5
21003 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21004 if test "${cf_cv_unsigned_literals+set}" = set; then
21005   echo $ECHO_N "(cached) $ECHO_C" >&6
21006 else
21007
21008         cat >"conftest.$ac_ext" <<_ACEOF
21009 #line 21009 "configure"
21010 #include "confdefs.h"
21011
21012 int
21013 main (void)
21014 {
21015 long x = 1L + 1UL + 1U + 1
21016   ;
21017   return 0;
21018 }
21019 _ACEOF
21020 rm -f "conftest.$ac_objext"
21021 if { (eval echo "$as_me:21021: \"$ac_compile\"") >&5
21022   (eval $ac_compile) 2>&5
21023   ac_status=$?
21024   echo "$as_me:21024: \$? = $ac_status" >&5
21025   (exit "$ac_status"); } &&
21026          { ac_try='test -s "conftest.$ac_objext"'
21027   { (eval echo "$as_me:21027: \"$ac_try\"") >&5
21028   (eval $ac_try) 2>&5
21029   ac_status=$?
21030   echo "$as_me:21030: \$? = $ac_status" >&5
21031   (exit "$ac_status"); }; }; then
21032   cf_cv_unsigned_literals=yes
21033 else
21034   echo "$as_me: failed program was:" >&5
21035 cat "conftest.$ac_ext" >&5
21036 cf_cv_unsigned_literals=no
21037 fi
21038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21039
21040 fi
21041
21042 echo "$as_me:21042: result: $cf_cv_unsigned_literals" >&5
21043 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21044
21045 cf_cv_1UL="1"
21046 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21047 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21048
21049 if test "$NCURSES_MMASK_T" = auto ; then
21050         cf_cv_typeof_mmask_t=long
21051 else
21052         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21053 fi
21054 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21055
21056 ###     Checks for external-data
21057
21058 echo "$as_me:21058: checking if external errno is declared" >&5
21059 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21060 if test "${cf_cv_dcl_errno+set}" = set; then
21061   echo $ECHO_N "(cached) $ECHO_C" >&6
21062 else
21063
21064         cat >"conftest.$ac_ext" <<_ACEOF
21065 #line 21065 "configure"
21066 #include "confdefs.h"
21067
21068 #ifdef HAVE_STDLIB_H
21069 #include <stdlib.h>
21070 #endif
21071 #include <stdio.h>
21072 #include <sys/types.h>
21073 #include <errno.h>
21074 int
21075 main (void)
21076 {
21077 int x = (int) errno; (void)x
21078   ;
21079   return 0;
21080 }
21081 _ACEOF
21082 rm -f "conftest.$ac_objext"
21083 if { (eval echo "$as_me:21083: \"$ac_compile\"") >&5
21084   (eval $ac_compile) 2>&5
21085   ac_status=$?
21086   echo "$as_me:21086: \$? = $ac_status" >&5
21087   (exit "$ac_status"); } &&
21088          { ac_try='test -s "conftest.$ac_objext"'
21089   { (eval echo "$as_me:21089: \"$ac_try\"") >&5
21090   (eval $ac_try) 2>&5
21091   ac_status=$?
21092   echo "$as_me:21092: \$? = $ac_status" >&5
21093   (exit "$ac_status"); }; }; then
21094   cf_cv_dcl_errno=yes
21095 else
21096   echo "$as_me: failed program was:" >&5
21097 cat "conftest.$ac_ext" >&5
21098 cf_cv_dcl_errno=no
21099 fi
21100 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21101
21102 fi
21103 echo "$as_me:21103: result: $cf_cv_dcl_errno" >&5
21104 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21105
21106 if test "$cf_cv_dcl_errno" = no ; then
21107
21108 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21109
21110         cat >>confdefs.h <<EOF
21111 #define $cf_result 1
21112 EOF
21113
21114 fi
21115
21116 # It's possible (for near-UNIX clones) that the data doesn't exist
21117
21118 echo "$as_me:21118: checking if external errno exists" >&5
21119 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21120 if test "${cf_cv_have_errno+set}" = set; then
21121   echo $ECHO_N "(cached) $ECHO_C" >&6
21122 else
21123
21124         cat >"conftest.$ac_ext" <<_ACEOF
21125 #line 21125 "configure"
21126 #include "confdefs.h"
21127
21128 #undef errno
21129 extern int errno;
21130
21131 int
21132 main (void)
21133 {
21134 errno = 2
21135   ;
21136   return 0;
21137 }
21138 _ACEOF
21139 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21140 if { (eval echo "$as_me:21140: \"$ac_link\"") >&5
21141   (eval $ac_link) 2>&5
21142   ac_status=$?
21143   echo "$as_me:21143: \$? = $ac_status" >&5
21144   (exit "$ac_status"); } &&
21145          { ac_try='test -s "conftest$ac_exeext"'
21146   { (eval echo "$as_me:21146: \"$ac_try\"") >&5
21147   (eval $ac_try) 2>&5
21148   ac_status=$?
21149   echo "$as_me:21149: \$? = $ac_status" >&5
21150   (exit "$ac_status"); }; }; then
21151   cf_cv_have_errno=yes
21152 else
21153   echo "$as_me: failed program was:" >&5
21154 cat "conftest.$ac_ext" >&5
21155 cf_cv_have_errno=no
21156 fi
21157 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21158
21159 fi
21160 echo "$as_me:21160: result: $cf_cv_have_errno" >&5
21161 echo "${ECHO_T}$cf_cv_have_errno" >&6
21162
21163 if test "$cf_cv_have_errno" = yes ; then
21164
21165 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21166
21167         cat >>confdefs.h <<EOF
21168 #define $cf_result 1
21169 EOF
21170
21171 fi
21172
21173 echo "$as_me:21173: checking if data-only library module links" >&5
21174 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21175 if test "${cf_cv_link_dataonly+set}" = set; then
21176   echo $ECHO_N "(cached) $ECHO_C" >&6
21177 else
21178
21179         rm -f conftest.a
21180         cat >conftest.$ac_ext <<EOF
21181 #line 21181 "configure"
21182 int     testdata[3] = { 123, 456, 789 };
21183 EOF
21184         if { (eval echo "$as_me:21184: \"$ac_compile\"") >&5
21185   (eval $ac_compile) 2>&5
21186   ac_status=$?
21187   echo "$as_me:21187: \$? = $ac_status" >&5
21188   (exit "$ac_status"); } ; then
21189                 mv conftest.o data.o && \
21190                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21191         fi
21192         rm -f conftest.$ac_ext data.o
21193         cat >conftest.$ac_ext <<EOF
21194 #line 21194 "configure"
21195 int     testfunc(void)
21196 {
21197 #if defined(NeXT)
21198         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21199 #else
21200         extern int testdata[3];
21201         return testdata[0] == 123
21202            &&  testdata[1] == 456
21203            &&  testdata[2] == 789;
21204 #endif
21205 }
21206 EOF
21207         if { (eval echo "$as_me:21207: \"$ac_compile\"") >&5
21208   (eval $ac_compile) 2>&5
21209   ac_status=$?
21210   echo "$as_me:21210: \$? = $ac_status" >&5
21211   (exit "$ac_status"); }; then
21212                 mv conftest.o func.o && \
21213                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21214         fi
21215         rm -f conftest.$ac_ext func.o
21216         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21217         cf_saveLIBS="$LIBS"
21218         LIBS="conftest.a $LIBS"
21219         if test "$cross_compiling" = yes; then
21220   cf_cv_link_dataonly=unknown
21221 else
21222   cat >"conftest.$ac_ext" <<_ACEOF
21223 #line 21223 "configure"
21224 #include "confdefs.h"
21225
21226         int main(void)
21227         {
21228                 extern int testfunc();
21229                 ${cf_cv_main_return:-return} (!testfunc());
21230         }
21231
21232 _ACEOF
21233 rm -f "conftest$ac_exeext"
21234 if { (eval echo "$as_me:21234: \"$ac_link\"") >&5
21235   (eval $ac_link) 2>&5
21236   ac_status=$?
21237   echo "$as_me:21237: \$? = $ac_status" >&5
21238   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21239   { (eval echo "$as_me:21239: \"$ac_try\"") >&5
21240   (eval $ac_try) 2>&5
21241   ac_status=$?
21242   echo "$as_me:21242: \$? = $ac_status" >&5
21243   (exit "$ac_status"); }; }; then
21244   cf_cv_link_dataonly=yes
21245 else
21246   echo "$as_me: program exited with status $ac_status" >&5
21247 echo "$as_me: failed program was:" >&5
21248 cat "conftest.$ac_ext" >&5
21249 cf_cv_link_dataonly=no
21250 fi
21251 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21252 fi
21253         LIBS="$cf_saveLIBS"
21254
21255 fi
21256
21257 echo "$as_me:21257: result: $cf_cv_link_dataonly" >&5
21258 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21259
21260 if test "$cf_cv_link_dataonly" = no ; then
21261
21262 cat >>confdefs.h <<\EOF
21263 #define BROKEN_LINKER 1
21264 EOF
21265
21266         BROKEN_LINKER=1
21267 fi
21268
21269 ###     Checks for library functions.
21270
21271 for ac_func in \
21272 getcwd \
21273 getegid \
21274 geteuid \
21275 getopt \
21276 getttynam \
21277 issetugid \
21278 localeconv \
21279 poll \
21280 putenv \
21281 remove \
21282 select \
21283 setbuf \
21284 setbuffer \
21285 setenv \
21286 setfsuid \
21287 setvbuf \
21288 sigaction \
21289 sigvec \
21290 snprintf \
21291 strdup \
21292 strstr \
21293 sysconf \
21294 tcgetpgrp \
21295 times \
21296 tsearch \
21297 vsnprintf \
21298
21299 do
21300 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21301 echo "$as_me:21301: checking for $ac_func" >&5
21302 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21303 if eval "test \"\${$as_ac_var+set}\" = set"; then
21304   echo $ECHO_N "(cached) $ECHO_C" >&6
21305 else
21306   cat >"conftest.$ac_ext" <<_ACEOF
21307 #line 21307 "configure"
21308 #include "confdefs.h"
21309 #define $ac_func autoconf_temporary
21310 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21311 #undef $ac_func
21312
21313 #ifdef __cplusplus
21314 extern "C"
21315 #endif
21316
21317 /* We use char because int might match the return type of a gcc2
21318    builtin and then its argument prototype would still apply.  */
21319 char $ac_func (void);
21320
21321 int
21322 main (void)
21323 {
21324
21325 /* The GNU C library defines stubs for functions which it implements
21326     to always fail with ENOSYS.  Some functions are actually named
21327     something starting with __ and the normal name is an alias.  */
21328 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21329 #error found stub for $ac_func
21330 #endif
21331
21332         return $ac_func ();
21333   ;
21334   return 0;
21335 }
21336 _ACEOF
21337 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21338 if { (eval echo "$as_me:21338: \"$ac_link\"") >&5
21339   (eval $ac_link) 2>&5
21340   ac_status=$?
21341   echo "$as_me:21341: \$? = $ac_status" >&5
21342   (exit "$ac_status"); } &&
21343          { ac_try='test -s "conftest$ac_exeext"'
21344   { (eval echo "$as_me:21344: \"$ac_try\"") >&5
21345   (eval $ac_try) 2>&5
21346   ac_status=$?
21347   echo "$as_me:21347: \$? = $ac_status" >&5
21348   (exit "$ac_status"); }; }; then
21349   eval "$as_ac_var=yes"
21350 else
21351   echo "$as_me: failed program was:" >&5
21352 cat "conftest.$ac_ext" >&5
21353 eval "$as_ac_var=no"
21354 fi
21355 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21356 fi
21357 echo "$as_me:21357: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21358 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21359 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21360   cat >>confdefs.h <<EOF
21361 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21362 EOF
21363
21364 fi
21365 done
21366
21367 if test "x$ac_cv_func_getopt" = xno && \
21368    test "x$cf_with_progs$cf_with_tests" != xnono; then
21369         { { echo "$as_me:21369: error: getopt is required for building programs" >&5
21370 echo "$as_me: error: getopt is required for building programs" >&2;}
21371    { (exit 1); exit 1; }; }
21372 fi
21373
21374 if test "x$with_safe_sprintf" = xyes
21375 then
21376         if test "x$ac_cv_func_vsnprintf" = xyes
21377         then
21378                 { echo "$as_me:21378: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21379 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21380         else
21381
21382 cat >>confdefs.h <<\EOF
21383 #define USE_SAFE_SPRINTF 1
21384 EOF
21385
21386         fi
21387 fi
21388
21389 if test "x$with_getcap" = "xyes" ; then
21390
21391 echo "$as_me:21391: checking for terminal-capability database functions" >&5
21392 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21393 if test "${cf_cv_cgetent+set}" = set; then
21394   echo $ECHO_N "(cached) $ECHO_C" >&6
21395 else
21396
21397 cat >"conftest.$ac_ext" <<_ACEOF
21398 #line 21398 "configure"
21399 #include "confdefs.h"
21400
21401 #include <stdlib.h>
21402 int
21403 main (void)
21404 {
21405
21406         char temp[128];
21407         char *buf = temp;
21408         char *db_array = temp;
21409         cgetent(&buf, &db_array, "vt100");
21410         cgetcap(buf, "tc", '=');
21411         cgetmatch(buf, "tc");
21412
21413   ;
21414   return 0;
21415 }
21416 _ACEOF
21417 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21418 if { (eval echo "$as_me:21418: \"$ac_link\"") >&5
21419   (eval $ac_link) 2>&5
21420   ac_status=$?
21421   echo "$as_me:21421: \$? = $ac_status" >&5
21422   (exit "$ac_status"); } &&
21423          { ac_try='test -s "conftest$ac_exeext"'
21424   { (eval echo "$as_me:21424: \"$ac_try\"") >&5
21425   (eval $ac_try) 2>&5
21426   ac_status=$?
21427   echo "$as_me:21427: \$? = $ac_status" >&5
21428   (exit "$ac_status"); }; }; then
21429   cf_cv_cgetent=yes
21430 else
21431   echo "$as_me: failed program was:" >&5
21432 cat "conftest.$ac_ext" >&5
21433 cf_cv_cgetent=no
21434 fi
21435 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21436
21437 fi
21438 echo "$as_me:21438: result: $cf_cv_cgetent" >&5
21439 echo "${ECHO_T}$cf_cv_cgetent" >&6
21440
21441 if test "$cf_cv_cgetent" = yes
21442 then
21443
21444 cat >>confdefs.h <<\EOF
21445 #define HAVE_BSD_CGETENT 1
21446 EOF
21447
21448 echo "$as_me:21448: checking if cgetent uses const parameter" >&5
21449 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21450 if test "${cf_cv_cgetent_const+set}" = set; then
21451   echo $ECHO_N "(cached) $ECHO_C" >&6
21452 else
21453
21454 cat >"conftest.$ac_ext" <<_ACEOF
21455 #line 21455 "configure"
21456 #include "confdefs.h"
21457
21458 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21459 #include <stdlib.h>
21460 int
21461 main (void)
21462 {
21463
21464         char temp[128];
21465         char *buf = temp;
21466 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21467         const char *db_array = temp;
21468         cgetent(&buf, &db_array, "vt100");
21469 #endif
21470         cgetcap(buf, "tc", '=');
21471         cgetmatch(buf, "tc");
21472
21473   ;
21474   return 0;
21475 }
21476 _ACEOF
21477 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21478 if { (eval echo "$as_me:21478: \"$ac_link\"") >&5
21479   (eval $ac_link) 2>&5
21480   ac_status=$?
21481   echo "$as_me:21481: \$? = $ac_status" >&5
21482   (exit "$ac_status"); } &&
21483          { ac_try='test -s "conftest$ac_exeext"'
21484   { (eval echo "$as_me:21484: \"$ac_try\"") >&5
21485   (eval $ac_try) 2>&5
21486   ac_status=$?
21487   echo "$as_me:21487: \$? = $ac_status" >&5
21488   (exit "$ac_status"); }; }; then
21489   cf_cv_cgetent_const=yes
21490 else
21491   echo "$as_me: failed program was:" >&5
21492 cat "conftest.$ac_ext" >&5
21493 cf_cv_cgetent_const=no
21494 fi
21495 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21496
21497 fi
21498 echo "$as_me:21498: result: $cf_cv_cgetent_const" >&5
21499 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21500         if test "$cf_cv_cgetent_const" = yes
21501         then
21502
21503 cat >>confdefs.h <<EOF
21504 #define CGETENT_CONST const
21505 EOF
21506
21507         fi
21508 fi
21509
21510 fi
21511
21512 echo "$as_me:21512: checking for isascii" >&5
21513 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21514 if test "${cf_cv_have_isascii+set}" = set; then
21515   echo $ECHO_N "(cached) $ECHO_C" >&6
21516 else
21517
21518         cat >"conftest.$ac_ext" <<_ACEOF
21519 #line 21519 "configure"
21520 #include "confdefs.h"
21521 #include <ctype.h>
21522 int
21523 main (void)
21524 {
21525 int x = isascii(' ')
21526   ;
21527   return 0;
21528 }
21529 _ACEOF
21530 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21531 if { (eval echo "$as_me:21531: \"$ac_link\"") >&5
21532   (eval $ac_link) 2>&5
21533   ac_status=$?
21534   echo "$as_me:21534: \$? = $ac_status" >&5
21535   (exit "$ac_status"); } &&
21536          { ac_try='test -s "conftest$ac_exeext"'
21537   { (eval echo "$as_me:21537: \"$ac_try\"") >&5
21538   (eval $ac_try) 2>&5
21539   ac_status=$?
21540   echo "$as_me:21540: \$? = $ac_status" >&5
21541   (exit "$ac_status"); }; }; then
21542   cf_cv_have_isascii=yes
21543 else
21544   echo "$as_me: failed program was:" >&5
21545 cat "conftest.$ac_ext" >&5
21546 cf_cv_have_isascii=no
21547 fi
21548 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21549
21550 fi
21551 echo "$as_me:21551: result: $cf_cv_have_isascii" >&5
21552 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21553 test "$cf_cv_have_isascii" = yes &&
21554 cat >>confdefs.h <<\EOF
21555 #define HAVE_ISASCII 1
21556 EOF
21557
21558 if test "$ac_cv_func_sigaction" = yes; then
21559 echo "$as_me:21559: checking whether sigaction needs _POSIX_SOURCE" >&5
21560 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21561 cat >"conftest.$ac_ext" <<_ACEOF
21562 #line 21562 "configure"
21563 #include "confdefs.h"
21564
21565 #include <sys/types.h>
21566 #include <signal.h>
21567 int
21568 main (void)
21569 {
21570 struct sigaction act
21571   ;
21572   return 0;
21573 }
21574 _ACEOF
21575 rm -f "conftest.$ac_objext"
21576 if { (eval echo "$as_me:21576: \"$ac_compile\"") >&5
21577   (eval $ac_compile) 2>&5
21578   ac_status=$?
21579   echo "$as_me:21579: \$? = $ac_status" >&5
21580   (exit "$ac_status"); } &&
21581          { ac_try='test -s "conftest.$ac_objext"'
21582   { (eval echo "$as_me:21582: \"$ac_try\"") >&5
21583   (eval $ac_try) 2>&5
21584   ac_status=$?
21585   echo "$as_me:21585: \$? = $ac_status" >&5
21586   (exit "$ac_status"); }; }; then
21587   sigact_bad=no
21588 else
21589   echo "$as_me: failed program was:" >&5
21590 cat "conftest.$ac_ext" >&5
21591
21592 cat >"conftest.$ac_ext" <<_ACEOF
21593 #line 21593 "configure"
21594 #include "confdefs.h"
21595
21596 #define _POSIX_SOURCE
21597 #include <sys/types.h>
21598 #include <signal.h>
21599 int
21600 main (void)
21601 {
21602 struct sigaction act
21603   ;
21604   return 0;
21605 }
21606 _ACEOF
21607 rm -f "conftest.$ac_objext"
21608 if { (eval echo "$as_me:21608: \"$ac_compile\"") >&5
21609   (eval $ac_compile) 2>&5
21610   ac_status=$?
21611   echo "$as_me:21611: \$? = $ac_status" >&5
21612   (exit "$ac_status"); } &&
21613          { ac_try='test -s "conftest.$ac_objext"'
21614   { (eval echo "$as_me:21614: \"$ac_try\"") >&5
21615   (eval $ac_try) 2>&5
21616   ac_status=$?
21617   echo "$as_me:21617: \$? = $ac_status" >&5
21618   (exit "$ac_status"); }; }; then
21619   sigact_bad=yes
21620
21621 cat >>confdefs.h <<\EOF
21622 #define _POSIX_SOURCE 1
21623 EOF
21624
21625 else
21626   echo "$as_me: failed program was:" >&5
21627 cat "conftest.$ac_ext" >&5
21628 sigact_bad=unknown
21629 fi
21630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21631 fi
21632 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21633 echo "$as_me:21633: result: $sigact_bad" >&5
21634 echo "${ECHO_T}$sigact_bad" >&6
21635 fi
21636
21637 echo "$as_me:21637: checking if nanosleep really works" >&5
21638 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21639 if test "${cf_cv_func_nanosleep+set}" = set; then
21640   echo $ECHO_N "(cached) $ECHO_C" >&6
21641 else
21642
21643 if test "$cross_compiling" = yes; then
21644   cf_cv_func_nanosleep=unknown
21645 else
21646   cat >"conftest.$ac_ext" <<_ACEOF
21647 #line 21647 "configure"
21648 #include "confdefs.h"
21649
21650 #include <stdio.h>
21651 #include <errno.h>
21652 #include <time.h>
21653
21654 #ifdef HAVE_SYS_TIME_H
21655 #include <sys/time.h>
21656 #endif
21657
21658 int main(void) {
21659         struct timespec ts1, ts2;
21660         int code;
21661         ts1.tv_sec  = 0;
21662         ts1.tv_nsec = 750000000;
21663         ts2.tv_sec  = 0;
21664         ts2.tv_nsec = 0;
21665         errno = 0;
21666         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21667         ${cf_cv_main_return:-return}(code != 0);
21668 }
21669
21670 _ACEOF
21671 rm -f "conftest$ac_exeext"
21672 if { (eval echo "$as_me:21672: \"$ac_link\"") >&5
21673   (eval $ac_link) 2>&5
21674   ac_status=$?
21675   echo "$as_me:21675: \$? = $ac_status" >&5
21676   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21677   { (eval echo "$as_me:21677: \"$ac_try\"") >&5
21678   (eval $ac_try) 2>&5
21679   ac_status=$?
21680   echo "$as_me:21680: \$? = $ac_status" >&5
21681   (exit "$ac_status"); }; }; then
21682   cf_cv_func_nanosleep=yes
21683 else
21684   echo "$as_me: program exited with status $ac_status" >&5
21685 echo "$as_me: failed program was:" >&5
21686 cat "conftest.$ac_ext" >&5
21687 cf_cv_func_nanosleep=no
21688 fi
21689 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21690 fi
21691 fi
21692 echo "$as_me:21692: result: $cf_cv_func_nanosleep" >&5
21693 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21694
21695 test "$cf_cv_func_nanosleep" = "yes" &&
21696 cat >>confdefs.h <<\EOF
21697 #define HAVE_NANOSLEEP 1
21698 EOF
21699
21700 for ac_header in \
21701 termio.h \
21702 termios.h \
21703 unistd.h \
21704 sys/ioctl.h \
21705 sys/termio.h \
21706
21707 do
21708 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21709 echo "$as_me:21709: checking for $ac_header" >&5
21710 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21711 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21712   echo $ECHO_N "(cached) $ECHO_C" >&6
21713 else
21714   cat >"conftest.$ac_ext" <<_ACEOF
21715 #line 21715 "configure"
21716 #include "confdefs.h"
21717 #include <$ac_header>
21718 _ACEOF
21719 if { (eval echo "$as_me:21719: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21720   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21721   ac_status=$?
21722   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21723   rm -f conftest.er1
21724   cat conftest.err >&5
21725   echo "$as_me:21725: \$? = $ac_status" >&5
21726   (exit "$ac_status"); } >/dev/null; then
21727   if test -s conftest.err; then
21728     ac_cpp_err=$ac_c_preproc_warn_flag
21729   else
21730     ac_cpp_err=
21731   fi
21732 else
21733   ac_cpp_err=yes
21734 fi
21735 if test -z "$ac_cpp_err"; then
21736   eval "$as_ac_Header=yes"
21737 else
21738   echo "$as_me: failed program was:" >&5
21739   cat "conftest.$ac_ext" >&5
21740   eval "$as_ac_Header=no"
21741 fi
21742 rm -f conftest.err "conftest.$ac_ext"
21743 fi
21744 echo "$as_me:21744: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21745 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21746 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21747   cat >>confdefs.h <<EOF
21748 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21749 EOF
21750
21751 fi
21752 done
21753
21754 if test "$ac_cv_header_termios_h" = yes ; then
21755         case "$CFLAGS $CPPFLAGS" in
21756         (*-D_POSIX_SOURCE*)
21757                 termios_bad=dunno ;;
21758         (*)     termios_bad=maybe ;;
21759         esac
21760         if test "$termios_bad" = maybe ; then
21761         echo "$as_me:21761: checking whether termios.h needs _POSIX_SOURCE" >&5
21762 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21763         cat >"conftest.$ac_ext" <<_ACEOF
21764 #line 21764 "configure"
21765 #include "confdefs.h"
21766 #include <termios.h>
21767 int
21768 main (void)
21769 {
21770 struct termios foo; int x = foo.c_iflag = 1; (void)x
21771   ;
21772   return 0;
21773 }
21774 _ACEOF
21775 rm -f "conftest.$ac_objext"
21776 if { (eval echo "$as_me:21776: \"$ac_compile\"") >&5
21777   (eval $ac_compile) 2>&5
21778   ac_status=$?
21779   echo "$as_me:21779: \$? = $ac_status" >&5
21780   (exit "$ac_status"); } &&
21781          { ac_try='test -s "conftest.$ac_objext"'
21782   { (eval echo "$as_me:21782: \"$ac_try\"") >&5
21783   (eval $ac_try) 2>&5
21784   ac_status=$?
21785   echo "$as_me:21785: \$? = $ac_status" >&5
21786   (exit "$ac_status"); }; }; then
21787   termios_bad=no
21788 else
21789   echo "$as_me: failed program was:" >&5
21790 cat "conftest.$ac_ext" >&5
21791
21792                 cat >"conftest.$ac_ext" <<_ACEOF
21793 #line 21793 "configure"
21794 #include "confdefs.h"
21795
21796 #define _POSIX_SOURCE
21797 #include <termios.h>
21798 int
21799 main (void)
21800 {
21801 struct termios foo; int x = foo.c_iflag = 2; (void)x
21802   ;
21803   return 0;
21804 }
21805 _ACEOF
21806 rm -f "conftest.$ac_objext"
21807 if { (eval echo "$as_me:21807: \"$ac_compile\"") >&5
21808   (eval $ac_compile) 2>&5
21809   ac_status=$?
21810   echo "$as_me:21810: \$? = $ac_status" >&5
21811   (exit "$ac_status"); } &&
21812          { ac_try='test -s "conftest.$ac_objext"'
21813   { (eval echo "$as_me:21813: \"$ac_try\"") >&5
21814   (eval $ac_try) 2>&5
21815   ac_status=$?
21816   echo "$as_me:21816: \$? = $ac_status" >&5
21817   (exit "$ac_status"); }; }; then
21818   termios_bad=unknown
21819 else
21820   echo "$as_me: failed program was:" >&5
21821 cat "conftest.$ac_ext" >&5
21822 termios_bad=yes
21823 cat >>confdefs.h <<\EOF
21824 #define _POSIX_SOURCE 1
21825 EOF
21826
21827 fi
21828 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21829
21830 fi
21831 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21832         echo "$as_me:21832: result: $termios_bad" >&5
21833 echo "${ECHO_T}$termios_bad" >&6
21834         fi
21835 fi
21836
21837 echo "$as_me:21837: checking for tcgetattr" >&5
21838 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21839 if test "${cf_cv_have_tcgetattr+set}" = set; then
21840   echo $ECHO_N "(cached) $ECHO_C" >&6
21841 else
21842
21843 cat >"conftest.$ac_ext" <<_ACEOF
21844 #line 21844 "configure"
21845 #include "confdefs.h"
21846
21847 #include <sys/types.h>
21848 #ifdef HAVE_UNISTD_H
21849 #include <unistd.h>
21850 #endif
21851 #ifdef HAVE_TERMIOS_H
21852 #include <termios.h>
21853 #define TTY struct termios
21854 #else
21855 #ifdef HAVE_TERMIO_H
21856 #include <termio.h>
21857 #define TTY struct termio
21858 #endif
21859 #endif
21860
21861 int
21862 main (void)
21863 {
21864
21865 TTY foo;
21866 tcgetattr(1, &foo);
21867   ;
21868   return 0;
21869 }
21870 _ACEOF
21871 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21872 if { (eval echo "$as_me:21872: \"$ac_link\"") >&5
21873   (eval $ac_link) 2>&5
21874   ac_status=$?
21875   echo "$as_me:21875: \$? = $ac_status" >&5
21876   (exit "$ac_status"); } &&
21877          { ac_try='test -s "conftest$ac_exeext"'
21878   { (eval echo "$as_me:21878: \"$ac_try\"") >&5
21879   (eval $ac_try) 2>&5
21880   ac_status=$?
21881   echo "$as_me:21881: \$? = $ac_status" >&5
21882   (exit "$ac_status"); }; }; then
21883   cf_cv_have_tcgetattr=yes
21884 else
21885   echo "$as_me: failed program was:" >&5
21886 cat "conftest.$ac_ext" >&5
21887 cf_cv_have_tcgetattr=no
21888 fi
21889 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21890 fi
21891 echo "$as_me:21891: result: $cf_cv_have_tcgetattr" >&5
21892 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21893 test "$cf_cv_have_tcgetattr" = yes &&
21894 cat >>confdefs.h <<\EOF
21895 #define HAVE_TCGETATTR 1
21896 EOF
21897
21898 echo "$as_me:21898: checking for vsscanf function or workaround" >&5
21899 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21900 if test "${cf_cv_func_vsscanf+set}" = set; then
21901   echo $ECHO_N "(cached) $ECHO_C" >&6
21902 else
21903
21904 cat >"conftest.$ac_ext" <<_ACEOF
21905 #line 21905 "configure"
21906 #include "confdefs.h"
21907
21908 #include <stdarg.h>
21909 #include <stdio.h>
21910 int
21911 main (void)
21912 {
21913
21914         va_list ap;
21915         vsscanf("from", "%d", ap)
21916   ;
21917   return 0;
21918 }
21919 _ACEOF
21920 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21921 if { (eval echo "$as_me:21921: \"$ac_link\"") >&5
21922   (eval $ac_link) 2>&5
21923   ac_status=$?
21924   echo "$as_me:21924: \$? = $ac_status" >&5
21925   (exit "$ac_status"); } &&
21926          { ac_try='test -s "conftest$ac_exeext"'
21927   { (eval echo "$as_me:21927: \"$ac_try\"") >&5
21928   (eval $ac_try) 2>&5
21929   ac_status=$?
21930   echo "$as_me:21930: \$? = $ac_status" >&5
21931   (exit "$ac_status"); }; }; then
21932   cf_cv_func_vsscanf=vsscanf
21933 else
21934   echo "$as_me: failed program was:" >&5
21935 cat "conftest.$ac_ext" >&5
21936
21937 cat >"conftest.$ac_ext" <<_ACEOF
21938 #line 21938 "configure"
21939 #include "confdefs.h"
21940
21941 #include <stdarg.h>
21942 #include <stdio.h>
21943 int
21944 main (void)
21945 {
21946
21947         FILE strbuf;
21948         char *str = "from";
21949
21950         strbuf._flag = _IOREAD;
21951         strbuf._ptr = strbuf._base = (unsigned char *) str;
21952         strbuf._cnt = strlen(str);
21953         strbuf._file = _NFILE;
21954         return (vfscanf(&strbuf, "%d", ap))
21955   ;
21956   return 0;
21957 }
21958 _ACEOF
21959 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21960 if { (eval echo "$as_me:21960: \"$ac_link\"") >&5
21961   (eval $ac_link) 2>&5
21962   ac_status=$?
21963   echo "$as_me:21963: \$? = $ac_status" >&5
21964   (exit "$ac_status"); } &&
21965          { ac_try='test -s "conftest$ac_exeext"'
21966   { (eval echo "$as_me:21966: \"$ac_try\"") >&5
21967   (eval $ac_try) 2>&5
21968   ac_status=$?
21969   echo "$as_me:21969: \$? = $ac_status" >&5
21970   (exit "$ac_status"); }; }; then
21971   cf_cv_func_vsscanf=vfscanf
21972 else
21973   echo "$as_me: failed program was:" >&5
21974 cat "conftest.$ac_ext" >&5
21975
21976 cat >"conftest.$ac_ext" <<_ACEOF
21977 #line 21977 "configure"
21978 #include "confdefs.h"
21979
21980 #include <stdarg.h>
21981 #include <stdio.h>
21982 int
21983 main (void)
21984 {
21985
21986         FILE strbuf;
21987         char *str = "from";
21988
21989         strbuf._flag = _IOREAD;
21990         strbuf._ptr = strbuf._base = (unsigned char *) str;
21991         strbuf._cnt = strlen(str);
21992         strbuf._file = _NFILE;
21993         return (_doscan(&strbuf, "%d", ap))
21994   ;
21995   return 0;
21996 }
21997 _ACEOF
21998 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21999 if { (eval echo "$as_me:21999: \"$ac_link\"") >&5
22000   (eval $ac_link) 2>&5
22001   ac_status=$?
22002   echo "$as_me:22002: \$? = $ac_status" >&5
22003   (exit "$ac_status"); } &&
22004          { ac_try='test -s "conftest$ac_exeext"'
22005   { (eval echo "$as_me:22005: \"$ac_try\"") >&5
22006   (eval $ac_try) 2>&5
22007   ac_status=$?
22008   echo "$as_me:22008: \$? = $ac_status" >&5
22009   (exit "$ac_status"); }; }; then
22010   cf_cv_func_vsscanf=_doscan
22011 else
22012   echo "$as_me: failed program was:" >&5
22013 cat "conftest.$ac_ext" >&5
22014
22015 cf_cv_func_vsscanf=no
22016 fi
22017 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22018 fi
22019 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22020 fi
22021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22022 fi
22023 echo "$as_me:22023: result: $cf_cv_func_vsscanf" >&5
22024 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22025
22026 case "$cf_cv_func_vsscanf" in
22027 (vsscanf)
22028 cat >>confdefs.h <<\EOF
22029 #define HAVE_VSSCANF 1
22030 EOF
22031 ;;
22032 (vfscanf)
22033 cat >>confdefs.h <<\EOF
22034 #define HAVE_VFSCANF 1
22035 EOF
22036 ;;
22037 (_doscan)
22038 cat >>confdefs.h <<\EOF
22039 #define HAVE__DOSCAN 1
22040 EOF
22041 ;;
22042 esac
22043
22044 for ac_header in \
22045 unistd.h \
22046
22047 do
22048 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22049 echo "$as_me:22049: checking for $ac_header" >&5
22050 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22051 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22052   echo $ECHO_N "(cached) $ECHO_C" >&6
22053 else
22054   cat >"conftest.$ac_ext" <<_ACEOF
22055 #line 22055 "configure"
22056 #include "confdefs.h"
22057 #include <$ac_header>
22058 _ACEOF
22059 if { (eval echo "$as_me:22059: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22060   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22061   ac_status=$?
22062   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22063   rm -f conftest.er1
22064   cat conftest.err >&5
22065   echo "$as_me:22065: \$? = $ac_status" >&5
22066   (exit "$ac_status"); } >/dev/null; then
22067   if test -s conftest.err; then
22068     ac_cpp_err=$ac_c_preproc_warn_flag
22069   else
22070     ac_cpp_err=
22071   fi
22072 else
22073   ac_cpp_err=yes
22074 fi
22075 if test -z "$ac_cpp_err"; then
22076   eval "$as_ac_Header=yes"
22077 else
22078   echo "$as_me: failed program was:" >&5
22079   cat "conftest.$ac_ext" >&5
22080   eval "$as_ac_Header=no"
22081 fi
22082 rm -f conftest.err "conftest.$ac_ext"
22083 fi
22084 echo "$as_me:22084: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22085 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22086 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22087   cat >>confdefs.h <<EOF
22088 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22089 EOF
22090
22091 fi
22092 done
22093
22094 echo "$as_me:22094: checking for working mkstemp" >&5
22095 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22096 if test "${cf_cv_func_mkstemp+set}" = set; then
22097   echo $ECHO_N "(cached) $ECHO_C" >&6
22098 else
22099
22100 rm -rf ./conftest*
22101 if test "$cross_compiling" = yes; then
22102   cf_cv_func_mkstemp=maybe
22103 else
22104   cat >"conftest.$ac_ext" <<_ACEOF
22105 #line 22105 "configure"
22106 #include "confdefs.h"
22107
22108 #include <sys/types.h>
22109 #ifdef HAVE_UNISTD_H
22110 #include <unistd.h>
22111 #endif
22112 #include <stdlib.h>
22113 #include <stdio.h>
22114 #include <string.h>
22115 #include <sys/stat.h>
22116 int main(void)
22117 {
22118         char *tmpl = "conftestXXXXXX";
22119         char name[2][80];
22120         int n;
22121         int result = 0;
22122         int fd;
22123         struct stat sb;
22124
22125         umask(077);
22126         for (n = 0; n < 2; ++n) {
22127                 strcpy(name[n], tmpl);
22128                 if ((fd = mkstemp(name[n])) >= 0) {
22129                         if (!strcmp(name[n], tmpl)
22130                          || stat(name[n], &sb) != 0
22131                          || (sb.st_mode & S_IFMT) != S_IFREG
22132                          || (sb.st_mode & 077) != 0) {
22133                                 result = 1;
22134                         }
22135                         close(fd);
22136                 }
22137         }
22138         if (result == 0
22139          && !strcmp(name[0], name[1]))
22140                 result = 1;
22141         ${cf_cv_main_return:-return}(result);
22142 }
22143
22144 _ACEOF
22145 rm -f "conftest$ac_exeext"
22146 if { (eval echo "$as_me:22146: \"$ac_link\"") >&5
22147   (eval $ac_link) 2>&5
22148   ac_status=$?
22149   echo "$as_me:22149: \$? = $ac_status" >&5
22150   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22151   { (eval echo "$as_me:22151: \"$ac_try\"") >&5
22152   (eval $ac_try) 2>&5
22153   ac_status=$?
22154   echo "$as_me:22154: \$? = $ac_status" >&5
22155   (exit "$ac_status"); }; }; then
22156   cf_cv_func_mkstemp=yes
22157
22158 else
22159   echo "$as_me: program exited with status $ac_status" >&5
22160 echo "$as_me: failed program was:" >&5
22161 cat "conftest.$ac_ext" >&5
22162 cf_cv_func_mkstemp=no
22163
22164 fi
22165 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22166 fi
22167
22168 fi
22169 echo "$as_me:22169: result: $cf_cv_func_mkstemp" >&5
22170 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22171 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22172         echo "$as_me:22172: checking for mkstemp" >&5
22173 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22174 if test "${ac_cv_func_mkstemp+set}" = set; then
22175   echo $ECHO_N "(cached) $ECHO_C" >&6
22176 else
22177   cat >"conftest.$ac_ext" <<_ACEOF
22178 #line 22178 "configure"
22179 #include "confdefs.h"
22180 #define mkstemp autoconf_temporary
22181 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22182 #undef mkstemp
22183
22184 #ifdef __cplusplus
22185 extern "C"
22186 #endif
22187
22188 /* We use char because int might match the return type of a gcc2
22189    builtin and then its argument prototype would still apply.  */
22190 char mkstemp (void);
22191
22192 int
22193 main (void)
22194 {
22195
22196 /* The GNU C library defines stubs for functions which it implements
22197     to always fail with ENOSYS.  Some functions are actually named
22198     something starting with __ and the normal name is an alias.  */
22199 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22200 #error found stub for mkstemp
22201 #endif
22202
22203         return mkstemp ();
22204   ;
22205   return 0;
22206 }
22207 _ACEOF
22208 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22209 if { (eval echo "$as_me:22209: \"$ac_link\"") >&5
22210   (eval $ac_link) 2>&5
22211   ac_status=$?
22212   echo "$as_me:22212: \$? = $ac_status" >&5
22213   (exit "$ac_status"); } &&
22214          { ac_try='test -s "conftest$ac_exeext"'
22215   { (eval echo "$as_me:22215: \"$ac_try\"") >&5
22216   (eval $ac_try) 2>&5
22217   ac_status=$?
22218   echo "$as_me:22218: \$? = $ac_status" >&5
22219   (exit "$ac_status"); }; }; then
22220   ac_cv_func_mkstemp=yes
22221 else
22222   echo "$as_me: failed program was:" >&5
22223 cat "conftest.$ac_ext" >&5
22224 ac_cv_func_mkstemp=no
22225 fi
22226 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22227 fi
22228 echo "$as_me:22228: result: $ac_cv_func_mkstemp" >&5
22229 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22230
22231 fi
22232 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22233
22234 cat >>confdefs.h <<\EOF
22235 #define HAVE_MKSTEMP 1
22236 EOF
22237
22238 fi
22239
22240 # setup for prototype of fallback for vsscanf()
22241
22242 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22243         HAVE_VSSCANF=1
22244 else
22245         HAVE_VSSCANF=0
22246 fi
22247
22248 if test "x$cross_compiling" = xyes ; then
22249         { echo "$as_me:22249: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22250 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22251 else
22252         echo "$as_me:22252: checking whether setvbuf arguments are reversed" >&5
22253 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22254 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22255   echo $ECHO_N "(cached) $ECHO_C" >&6
22256 else
22257   if test "$cross_compiling" = yes; then
22258   { { echo "$as_me:22258: error: cannot run test program while cross compiling" >&5
22259 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22260    { (exit 1); exit 1; }; }
22261 else
22262   cat >"conftest.$ac_ext" <<_ACEOF
22263 #line 22263 "configure"
22264 #include "confdefs.h"
22265 #include <stdio.h>
22266 /* If setvbuf has the reversed format, exit 0. */
22267 int
22268 main (void)
22269 {
22270   /* This call has the arguments reversed.
22271      A reversed system may check and see that the address of main
22272      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22273   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22274     $ac_main_return(1);
22275   putc('\r', stdout);
22276   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22277 }
22278 _ACEOF
22279 rm -f "conftest$ac_exeext"
22280 if { (eval echo "$as_me:22280: \"$ac_link\"") >&5
22281   (eval $ac_link) 2>&5
22282   ac_status=$?
22283   echo "$as_me:22283: \$? = $ac_status" >&5
22284   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22285   { (eval echo "$as_me:22285: \"$ac_try\"") >&5
22286   (eval $ac_try) 2>&5
22287   ac_status=$?
22288   echo "$as_me:22288: \$? = $ac_status" >&5
22289   (exit "$ac_status"); }; }; then
22290   ac_cv_func_setvbuf_reversed=yes
22291 else
22292   echo "$as_me: program exited with status $ac_status" >&5
22293 echo "$as_me: failed program was:" >&5
22294 cat "conftest.$ac_ext" >&5
22295 ac_cv_func_setvbuf_reversed=no
22296 fi
22297 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22298 fi
22299 rm -f core ./core.* ./*.core
22300 fi
22301 echo "$as_me:22301: result: $ac_cv_func_setvbuf_reversed" >&5
22302 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22303 if test $ac_cv_func_setvbuf_reversed = yes; then
22304
22305 cat >>confdefs.h <<\EOF
22306 #define SETVBUF_REVERSED 1
22307 EOF
22308
22309 fi
22310
22311 fi
22312 echo "$as_me:22312: checking for intptr_t" >&5
22313 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22314 if test "${ac_cv_type_intptr_t+set}" = set; then
22315   echo $ECHO_N "(cached) $ECHO_C" >&6
22316 else
22317   cat >"conftest.$ac_ext" <<_ACEOF
22318 #line 22318 "configure"
22319 #include "confdefs.h"
22320 $ac_includes_default
22321 int
22322 main (void)
22323 {
22324 if ((intptr_t *) 0)
22325   return 0;
22326 if (sizeof (intptr_t))
22327   return 0;
22328   ;
22329   return 0;
22330 }
22331 _ACEOF
22332 rm -f "conftest.$ac_objext"
22333 if { (eval echo "$as_me:22333: \"$ac_compile\"") >&5
22334   (eval $ac_compile) 2>&5
22335   ac_status=$?
22336   echo "$as_me:22336: \$? = $ac_status" >&5
22337   (exit "$ac_status"); } &&
22338          { ac_try='test -s "conftest.$ac_objext"'
22339   { (eval echo "$as_me:22339: \"$ac_try\"") >&5
22340   (eval $ac_try) 2>&5
22341   ac_status=$?
22342   echo "$as_me:22342: \$? = $ac_status" >&5
22343   (exit "$ac_status"); }; }; then
22344   ac_cv_type_intptr_t=yes
22345 else
22346   echo "$as_me: failed program was:" >&5
22347 cat "conftest.$ac_ext" >&5
22348 ac_cv_type_intptr_t=no
22349 fi
22350 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22351 fi
22352 echo "$as_me:22352: result: $ac_cv_type_intptr_t" >&5
22353 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22354 if test "$ac_cv_type_intptr_t" = yes; then
22355   :
22356 else
22357
22358 cat >>confdefs.h <<EOF
22359 #define intptr_t long
22360 EOF
22361
22362 fi
22363
22364 echo "$as_me:22364: checking for ssize_t" >&5
22365 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22366 if test "${ac_cv_type_ssize_t+set}" = set; then
22367   echo $ECHO_N "(cached) $ECHO_C" >&6
22368 else
22369   cat >"conftest.$ac_ext" <<_ACEOF
22370 #line 22370 "configure"
22371 #include "confdefs.h"
22372 $ac_includes_default
22373 int
22374 main (void)
22375 {
22376 if ((ssize_t *) 0)
22377   return 0;
22378 if (sizeof (ssize_t))
22379   return 0;
22380   ;
22381   return 0;
22382 }
22383 _ACEOF
22384 rm -f "conftest.$ac_objext"
22385 if { (eval echo "$as_me:22385: \"$ac_compile\"") >&5
22386   (eval $ac_compile) 2>&5
22387   ac_status=$?
22388   echo "$as_me:22388: \$? = $ac_status" >&5
22389   (exit "$ac_status"); } &&
22390          { ac_try='test -s "conftest.$ac_objext"'
22391   { (eval echo "$as_me:22391: \"$ac_try\"") >&5
22392   (eval $ac_try) 2>&5
22393   ac_status=$?
22394   echo "$as_me:22394: \$? = $ac_status" >&5
22395   (exit "$ac_status"); }; }; then
22396   ac_cv_type_ssize_t=yes
22397 else
22398   echo "$as_me: failed program was:" >&5
22399 cat "conftest.$ac_ext" >&5
22400 ac_cv_type_ssize_t=no
22401 fi
22402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22403 fi
22404 echo "$as_me:22404: result: $ac_cv_type_ssize_t" >&5
22405 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22406 if test "$ac_cv_type_ssize_t" = yes; then
22407   :
22408 else
22409
22410 cat >>confdefs.h <<EOF
22411 #define ssize_t int
22412 EOF
22413
22414 fi
22415
22416 echo "$as_me:22416: checking for type sigaction_t" >&5
22417 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22418 if test "${cf_cv_type_sigaction+set}" = set; then
22419   echo $ECHO_N "(cached) $ECHO_C" >&6
22420 else
22421
22422         cat >"conftest.$ac_ext" <<_ACEOF
22423 #line 22423 "configure"
22424 #include "confdefs.h"
22425
22426 #include <signal.h>
22427 int
22428 main (void)
22429 {
22430 sigaction_t x
22431   ;
22432   return 0;
22433 }
22434 _ACEOF
22435 rm -f "conftest.$ac_objext"
22436 if { (eval echo "$as_me:22436: \"$ac_compile\"") >&5
22437   (eval $ac_compile) 2>&5
22438   ac_status=$?
22439   echo "$as_me:22439: \$? = $ac_status" >&5
22440   (exit "$ac_status"); } &&
22441          { ac_try='test -s "conftest.$ac_objext"'
22442   { (eval echo "$as_me:22442: \"$ac_try\"") >&5
22443   (eval $ac_try) 2>&5
22444   ac_status=$?
22445   echo "$as_me:22445: \$? = $ac_status" >&5
22446   (exit "$ac_status"); }; }; then
22447   cf_cv_type_sigaction=yes
22448 else
22449   echo "$as_me: failed program was:" >&5
22450 cat "conftest.$ac_ext" >&5
22451 cf_cv_type_sigaction=no
22452 fi
22453 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22454 fi
22455
22456 echo "$as_me:22456: result: $cf_cv_type_sigaction" >&5
22457 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22458 test "$cf_cv_type_sigaction" = yes &&
22459 cat >>confdefs.h <<\EOF
22460 #define HAVE_TYPE_SIGACTION 1
22461 EOF
22462
22463 echo "$as_me:22463: checking declaration of size-change" >&5
22464 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22465 if test "${cf_cv_sizechange+set}" = set; then
22466   echo $ECHO_N "(cached) $ECHO_C" >&6
22467 else
22468
22469         cf_cv_sizechange=unknown
22470         cf_save_CPPFLAGS="$CPPFLAGS"
22471
22472 for cf_opts in "" "NEED_PTEM_H"
22473 do
22474
22475         CPPFLAGS="$cf_save_CPPFLAGS"
22476         if test -n "$cf_opts"
22477         then
22478
22479         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22480         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22481
22482         fi
22483         cat >"conftest.$ac_ext" <<_ACEOF
22484 #line 22484 "configure"
22485 #include "confdefs.h"
22486 #include <sys/types.h>
22487 #ifdef HAVE_TERMIOS_H
22488 #include <termios.h>
22489 #else
22490 #ifdef HAVE_TERMIO_H
22491 #include <termio.h>
22492 #endif
22493 #endif
22494
22495 #ifdef NEED_PTEM_H
22496 /* This is a workaround for SCO:  they neglected to define struct winsize in
22497  * termios.h -- it is only in termio.h and ptem.h
22498  */
22499 #include <sys/stream.h>
22500 #include <sys/ptem.h>
22501 #endif
22502
22503 #ifdef HAVE_SYS_IOCTL_H
22504 #include <sys/ioctl.h>
22505 #endif
22506
22507 int
22508 main (void)
22509 {
22510
22511 #ifdef TIOCGSIZE
22512         struct ttysize win;     /* SunOS 3.0... */
22513         int y = win.ts_lines = 2;
22514         int x = win.ts_cols = 1;
22515         (void)y;
22516         (void)x;
22517 #else
22518 #ifdef TIOCGWINSZ
22519         struct winsize win;     /* everything else */
22520         int y = win.ws_row = 2;
22521         int x = win.ws_col = 1;
22522         (void)y;
22523         (void)x;
22524 #else
22525         no TIOCGSIZE or TIOCGWINSZ
22526 #endif /* TIOCGWINSZ */
22527 #endif /* TIOCGSIZE */
22528
22529   ;
22530   return 0;
22531 }
22532 _ACEOF
22533 rm -f "conftest.$ac_objext"
22534 if { (eval echo "$as_me:22534: \"$ac_compile\"") >&5
22535   (eval $ac_compile) 2>&5
22536   ac_status=$?
22537   echo "$as_me:22537: \$? = $ac_status" >&5
22538   (exit "$ac_status"); } &&
22539          { ac_try='test -s "conftest.$ac_objext"'
22540   { (eval echo "$as_me:22540: \"$ac_try\"") >&5
22541   (eval $ac_try) 2>&5
22542   ac_status=$?
22543   echo "$as_me:22543: \$? = $ac_status" >&5
22544   (exit "$ac_status"); }; }; then
22545   cf_cv_sizechange=yes
22546 else
22547   echo "$as_me: failed program was:" >&5
22548 cat "conftest.$ac_ext" >&5
22549 cf_cv_sizechange=no
22550 fi
22551 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22552
22553         CPPFLAGS="$cf_save_CPPFLAGS"
22554         if test "$cf_cv_sizechange" = yes ; then
22555                 echo "size-change succeeded ($cf_opts)" >&5
22556                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22557                 break
22558         fi
22559 done
22560
22561 fi
22562 echo "$as_me:22562: result: $cf_cv_sizechange" >&5
22563 echo "${ECHO_T}$cf_cv_sizechange" >&6
22564 if test "$cf_cv_sizechange" != no ; then
22565
22566 cat >>confdefs.h <<\EOF
22567 #define HAVE_SIZECHANGE 1
22568 EOF
22569
22570         case "$cf_cv_sizechange" in
22571         (NEED*)
22572                 cat >>confdefs.h <<EOF
22573 #define $cf_cv_sizechange  1
22574 EOF
22575
22576                 ;;
22577         esac
22578 fi
22579
22580 echo "$as_me:22580: checking for memmove" >&5
22581 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22582 if test "${ac_cv_func_memmove+set}" = set; then
22583   echo $ECHO_N "(cached) $ECHO_C" >&6
22584 else
22585   cat >"conftest.$ac_ext" <<_ACEOF
22586 #line 22586 "configure"
22587 #include "confdefs.h"
22588 #define memmove autoconf_temporary
22589 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22590 #undef memmove
22591
22592 #ifdef __cplusplus
22593 extern "C"
22594 #endif
22595
22596 /* We use char because int might match the return type of a gcc2
22597    builtin and then its argument prototype would still apply.  */
22598 char memmove (void);
22599
22600 int
22601 main (void)
22602 {
22603
22604 /* The GNU C library defines stubs for functions which it implements
22605     to always fail with ENOSYS.  Some functions are actually named
22606     something starting with __ and the normal name is an alias.  */
22607 #if defined (__stub_memmove) || defined (__stub___memmove)
22608 #error found stub for memmove
22609 #endif
22610
22611         return memmove ();
22612   ;
22613   return 0;
22614 }
22615 _ACEOF
22616 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22617 if { (eval echo "$as_me:22617: \"$ac_link\"") >&5
22618   (eval $ac_link) 2>&5
22619   ac_status=$?
22620   echo "$as_me:22620: \$? = $ac_status" >&5
22621   (exit "$ac_status"); } &&
22622          { ac_try='test -s "conftest$ac_exeext"'
22623   { (eval echo "$as_me:22623: \"$ac_try\"") >&5
22624   (eval $ac_try) 2>&5
22625   ac_status=$?
22626   echo "$as_me:22626: \$? = $ac_status" >&5
22627   (exit "$ac_status"); }; }; then
22628   ac_cv_func_memmove=yes
22629 else
22630   echo "$as_me: failed program was:" >&5
22631 cat "conftest.$ac_ext" >&5
22632 ac_cv_func_memmove=no
22633 fi
22634 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22635 fi
22636 echo "$as_me:22636: result: $ac_cv_func_memmove" >&5
22637 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22638 if test "$ac_cv_func_memmove" = yes; then
22639   :
22640 else
22641
22642 echo "$as_me:22642: checking for bcopy" >&5
22643 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22644 if test "${ac_cv_func_bcopy+set}" = set; then
22645   echo $ECHO_N "(cached) $ECHO_C" >&6
22646 else
22647   cat >"conftest.$ac_ext" <<_ACEOF
22648 #line 22648 "configure"
22649 #include "confdefs.h"
22650 #define bcopy autoconf_temporary
22651 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22652 #undef bcopy
22653
22654 #ifdef __cplusplus
22655 extern "C"
22656 #endif
22657
22658 /* We use char because int might match the return type of a gcc2
22659    builtin and then its argument prototype would still apply.  */
22660 char bcopy (void);
22661
22662 int
22663 main (void)
22664 {
22665
22666 /* The GNU C library defines stubs for functions which it implements
22667     to always fail with ENOSYS.  Some functions are actually named
22668     something starting with __ and the normal name is an alias.  */
22669 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22670 #error found stub for bcopy
22671 #endif
22672
22673         return bcopy ();
22674   ;
22675   return 0;
22676 }
22677 _ACEOF
22678 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22679 if { (eval echo "$as_me:22679: \"$ac_link\"") >&5
22680   (eval $ac_link) 2>&5
22681   ac_status=$?
22682   echo "$as_me:22682: \$? = $ac_status" >&5
22683   (exit "$ac_status"); } &&
22684          { ac_try='test -s "conftest$ac_exeext"'
22685   { (eval echo "$as_me:22685: \"$ac_try\"") >&5
22686   (eval $ac_try) 2>&5
22687   ac_status=$?
22688   echo "$as_me:22688: \$? = $ac_status" >&5
22689   (exit "$ac_status"); }; }; then
22690   ac_cv_func_bcopy=yes
22691 else
22692   echo "$as_me: failed program was:" >&5
22693 cat "conftest.$ac_ext" >&5
22694 ac_cv_func_bcopy=no
22695 fi
22696 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22697 fi
22698 echo "$as_me:22698: result: $ac_cv_func_bcopy" >&5
22699 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22700 if test "$ac_cv_func_bcopy" = yes; then
22701
22702         echo "$as_me:22702: checking if bcopy does overlapping moves" >&5
22703 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22704 if test "${cf_cv_good_bcopy+set}" = set; then
22705   echo $ECHO_N "(cached) $ECHO_C" >&6
22706 else
22707
22708                 if test "$cross_compiling" = yes; then
22709   cf_cv_good_bcopy=unknown
22710 else
22711   cat >"conftest.$ac_ext" <<_ACEOF
22712 #line 22712 "configure"
22713 #include "confdefs.h"
22714
22715 int main(void) {
22716         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22717         char temp[40];
22718         bcopy(data, temp, sizeof(data));
22719         bcopy(temp+10, temp, 15);
22720         bcopy(temp+5, temp+15, 10);
22721         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22722 }
22723
22724 _ACEOF
22725 rm -f "conftest$ac_exeext"
22726 if { (eval echo "$as_me:22726: \"$ac_link\"") >&5
22727   (eval $ac_link) 2>&5
22728   ac_status=$?
22729   echo "$as_me:22729: \$? = $ac_status" >&5
22730   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22731   { (eval echo "$as_me:22731: \"$ac_try\"") >&5
22732   (eval $ac_try) 2>&5
22733   ac_status=$?
22734   echo "$as_me:22734: \$? = $ac_status" >&5
22735   (exit "$ac_status"); }; }; then
22736   cf_cv_good_bcopy=yes
22737 else
22738   echo "$as_me: program exited with status $ac_status" >&5
22739 echo "$as_me: failed program was:" >&5
22740 cat "conftest.$ac_ext" >&5
22741 cf_cv_good_bcopy=no
22742 fi
22743 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22744 fi
22745
22746 fi
22747 echo "$as_me:22747: result: $cf_cv_good_bcopy" >&5
22748 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22749
22750 else
22751   cf_cv_good_bcopy=no
22752 fi
22753
22754         if test "$cf_cv_good_bcopy" = yes ; then
22755
22756 cat >>confdefs.h <<\EOF
22757 #define USE_OK_BCOPY 1
22758 EOF
22759
22760         else
22761
22762 cat >>confdefs.h <<\EOF
22763 #define USE_MY_MEMMOVE 1
22764 EOF
22765
22766         fi
22767
22768 fi
22769
22770 tty >/dev/null 2>&1 || {
22771 for ac_func in posix_openpt
22772 do
22773 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22774 echo "$as_me:22774: checking for $ac_func" >&5
22775 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22776 if eval "test \"\${$as_ac_var+set}\" = set"; then
22777   echo $ECHO_N "(cached) $ECHO_C" >&6
22778 else
22779   cat >"conftest.$ac_ext" <<_ACEOF
22780 #line 22780 "configure"
22781 #include "confdefs.h"
22782 #define $ac_func autoconf_temporary
22783 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22784 #undef $ac_func
22785
22786 #ifdef __cplusplus
22787 extern "C"
22788 #endif
22789
22790 /* We use char because int might match the return type of a gcc2
22791    builtin and then its argument prototype would still apply.  */
22792 char $ac_func (void);
22793
22794 int
22795 main (void)
22796 {
22797
22798 /* The GNU C library defines stubs for functions which it implements
22799     to always fail with ENOSYS.  Some functions are actually named
22800     something starting with __ and the normal name is an alias.  */
22801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22802 #error found stub for $ac_func
22803 #endif
22804
22805         return $ac_func ();
22806   ;
22807   return 0;
22808 }
22809 _ACEOF
22810 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22811 if { (eval echo "$as_me:22811: \"$ac_link\"") >&5
22812   (eval $ac_link) 2>&5
22813   ac_status=$?
22814   echo "$as_me:22814: \$? = $ac_status" >&5
22815   (exit "$ac_status"); } &&
22816          { ac_try='test -s "conftest$ac_exeext"'
22817   { (eval echo "$as_me:22817: \"$ac_try\"") >&5
22818   (eval $ac_try) 2>&5
22819   ac_status=$?
22820   echo "$as_me:22820: \$? = $ac_status" >&5
22821   (exit "$ac_status"); }; }; then
22822   eval "$as_ac_var=yes"
22823 else
22824   echo "$as_me: failed program was:" >&5
22825 cat "conftest.$ac_ext" >&5
22826 eval "$as_ac_var=no"
22827 fi
22828 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22829 fi
22830 echo "$as_me:22830: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22831 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22832 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22833   cat >>confdefs.h <<EOF
22834 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22835 EOF
22836
22837 fi
22838 done
22839  }
22840 echo "$as_me:22840: checking if poll really works" >&5
22841 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22842 if test "${cf_cv_working_poll+set}" = set; then
22843   echo $ECHO_N "(cached) $ECHO_C" >&6
22844 else
22845
22846 if test "$cross_compiling" = yes; then
22847   cf_cv_working_poll=unknown
22848 else
22849   cat >"conftest.$ac_ext" <<_ACEOF
22850 #line 22850 "configure"
22851 #include "confdefs.h"
22852
22853 #include <stdlib.h>
22854 #include <stdio.h>
22855 #include <unistd.h>
22856 #include <fcntl.h>
22857 #ifdef HAVE_POLL_H
22858 #include <poll.h>
22859 #else
22860 #include <sys/poll.h>
22861 #endif
22862 int main(void) {
22863         struct pollfd myfds;
22864         int ret;
22865
22866         /* check for Darwin bug with respect to "devices" */
22867         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22868         if (myfds.fd < 0)
22869                 myfds.fd = 0;
22870         myfds.events = POLLIN;
22871         myfds.revents = 0;
22872
22873         ret = poll(&myfds, 1, 100);
22874
22875         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22876                 ret = -1;
22877         } else {
22878                 int fd = 0;
22879                 if (!isatty(fd)) {
22880                         fd = open("/dev/tty", 2);       /* O_RDWR */
22881                 }
22882 #ifdef HAVE_POSIX_OPENPT
22883                 if (fd < 0) {
22884                         fd = posix_openpt(O_RDWR);
22885                 }
22886 #endif
22887
22888                 if (fd >= 0) {
22889                         /* also check with standard input */
22890                         myfds.fd = fd;
22891                         myfds.events = POLLIN;
22892                         myfds.revents = 0;
22893                         ret = poll(&myfds, 1, 100);
22894                 } else {
22895                         ret = -1;
22896                 }
22897         }
22898         ${cf_cv_main_return:-return}(ret < 0);
22899 }
22900 _ACEOF
22901 rm -f "conftest$ac_exeext"
22902 if { (eval echo "$as_me:22902: \"$ac_link\"") >&5
22903   (eval $ac_link) 2>&5
22904   ac_status=$?
22905   echo "$as_me:22905: \$? = $ac_status" >&5
22906   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22907   { (eval echo "$as_me:22907: \"$ac_try\"") >&5
22908   (eval $ac_try) 2>&5
22909   ac_status=$?
22910   echo "$as_me:22910: \$? = $ac_status" >&5
22911   (exit "$ac_status"); }; }; then
22912   cf_cv_working_poll=yes
22913 else
22914   echo "$as_me: program exited with status $ac_status" >&5
22915 echo "$as_me: failed program was:" >&5
22916 cat "conftest.$ac_ext" >&5
22917 cf_cv_working_poll=no
22918 fi
22919 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22920 fi
22921 fi
22922 echo "$as_me:22922: result: $cf_cv_working_poll" >&5
22923 echo "${ECHO_T}$cf_cv_working_poll" >&6
22924 test "$cf_cv_working_poll" = "yes" &&
22925 cat >>confdefs.h <<\EOF
22926 #define HAVE_WORKING_POLL 1
22927 EOF
22928
22929 echo "$as_me:22929: checking for va_copy" >&5
22930 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22931 if test "${cf_cv_have_va_copy+set}" = set; then
22932   echo $ECHO_N "(cached) $ECHO_C" >&6
22933 else
22934
22935 cat >"conftest.$ac_ext" <<_ACEOF
22936 #line 22936 "configure"
22937 #include "confdefs.h"
22938
22939 #include <stdarg.h>
22940
22941 int
22942 main (void)
22943 {
22944
22945         static va_list dst;
22946         static va_list src;
22947         va_copy(dst, src)
22948   ;
22949   return 0;
22950 }
22951 _ACEOF
22952 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22953 if { (eval echo "$as_me:22953: \"$ac_link\"") >&5
22954   (eval $ac_link) 2>&5
22955   ac_status=$?
22956   echo "$as_me:22956: \$? = $ac_status" >&5
22957   (exit "$ac_status"); } &&
22958          { ac_try='test -s "conftest$ac_exeext"'
22959   { (eval echo "$as_me:22959: \"$ac_try\"") >&5
22960   (eval $ac_try) 2>&5
22961   ac_status=$?
22962   echo "$as_me:22962: \$? = $ac_status" >&5
22963   (exit "$ac_status"); }; }; then
22964   cf_cv_have_va_copy=yes
22965 else
22966   echo "$as_me: failed program was:" >&5
22967 cat "conftest.$ac_ext" >&5
22968 cf_cv_have_va_copy=no
22969 fi
22970 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22971 fi
22972 echo "$as_me:22972: result: $cf_cv_have_va_copy" >&5
22973 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22974
22975 if test "$cf_cv_have_va_copy" = yes;
22976 then
22977
22978 cat >>confdefs.h <<\EOF
22979 #define HAVE_VA_COPY 1
22980 EOF
22981
22982 else # !cf_cv_have_va_copy
22983
22984 echo "$as_me:22984: checking for __va_copy" >&5
22985 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22986 if test "${cf_cv_have___va_copy+set}" = set; then
22987   echo $ECHO_N "(cached) $ECHO_C" >&6
22988 else
22989
22990 cat >"conftest.$ac_ext" <<_ACEOF
22991 #line 22991 "configure"
22992 #include "confdefs.h"
22993
22994 #include <stdarg.h>
22995
22996 int
22997 main (void)
22998 {
22999
23000         static va_list dst;
23001         static va_list src;
23002         __va_copy(dst, src)
23003   ;
23004   return 0;
23005 }
23006 _ACEOF
23007 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23008 if { (eval echo "$as_me:23008: \"$ac_link\"") >&5
23009   (eval $ac_link) 2>&5
23010   ac_status=$?
23011   echo "$as_me:23011: \$? = $ac_status" >&5
23012   (exit "$ac_status"); } &&
23013          { ac_try='test -s "conftest$ac_exeext"'
23014   { (eval echo "$as_me:23014: \"$ac_try\"") >&5
23015   (eval $ac_try) 2>&5
23016   ac_status=$?
23017   echo "$as_me:23017: \$? = $ac_status" >&5
23018   (exit "$ac_status"); }; }; then
23019   cf_cv_have___va_copy=yes
23020 else
23021   echo "$as_me: failed program was:" >&5
23022 cat "conftest.$ac_ext" >&5
23023 cf_cv_have___va_copy=no
23024 fi
23025 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23026 fi
23027 echo "$as_me:23027: result: $cf_cv_have___va_copy" >&5
23028 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23029
23030 if test "$cf_cv_have___va_copy" = yes
23031 then
23032
23033 cat >>confdefs.h <<\EOF
23034 #define HAVE___VA_COPY 1
23035 EOF
23036
23037 else # !cf_cv_have___va_copy
23038
23039 echo "$as_me:23039: checking for __builtin_va_copy" >&5
23040 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23041 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23042   echo $ECHO_N "(cached) $ECHO_C" >&6
23043 else
23044
23045 cat >"conftest.$ac_ext" <<_ACEOF
23046 #line 23046 "configure"
23047 #include "confdefs.h"
23048
23049 #include <stdarg.h>
23050
23051 int
23052 main (void)
23053 {
23054
23055         static va_list dst;
23056         static va_list src;
23057         __builtin_va_copy(dst, src)
23058   ;
23059   return 0;
23060 }
23061 _ACEOF
23062 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23063 if { (eval echo "$as_me:23063: \"$ac_link\"") >&5
23064   (eval $ac_link) 2>&5
23065   ac_status=$?
23066   echo "$as_me:23066: \$? = $ac_status" >&5
23067   (exit "$ac_status"); } &&
23068          { ac_try='test -s "conftest$ac_exeext"'
23069   { (eval echo "$as_me:23069: \"$ac_try\"") >&5
23070   (eval $ac_try) 2>&5
23071   ac_status=$?
23072   echo "$as_me:23072: \$? = $ac_status" >&5
23073   (exit "$ac_status"); }; }; then
23074   cf_cv_have___builtin_va_copy=yes
23075 else
23076   echo "$as_me: failed program was:" >&5
23077 cat "conftest.$ac_ext" >&5
23078 cf_cv_have___builtin_va_copy=no
23079 fi
23080 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23081 fi
23082 echo "$as_me:23082: result: $cf_cv_have___builtin_va_copy" >&5
23083 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23084
23085 test "$cf_cv_have___builtin_va_copy" = yes &&
23086
23087 cat >>confdefs.h <<\EOF
23088 #define HAVE___BUILTIN_VA_COPY 1
23089 EOF
23090
23091 fi # cf_cv_have___va_copy
23092
23093 fi # cf_cv_have_va_copy
23094
23095 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23096 (*yes*)
23097         ;;
23098
23099 (*)
23100         echo "$as_me:23100: checking if we can simply copy va_list" >&5
23101 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23102 if test "${cf_cv_pointer_va_list+set}" = set; then
23103   echo $ECHO_N "(cached) $ECHO_C" >&6
23104 else
23105
23106 cat >"conftest.$ac_ext" <<_ACEOF
23107 #line 23107 "configure"
23108 #include "confdefs.h"
23109
23110 #include <stdarg.h>
23111
23112 int
23113 main (void)
23114 {
23115
23116         va_list dst;
23117         va_list src;
23118         dst = src
23119   ;
23120   return 0;
23121 }
23122 _ACEOF
23123 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23124 if { (eval echo "$as_me:23124: \"$ac_link\"") >&5
23125   (eval $ac_link) 2>&5
23126   ac_status=$?
23127   echo "$as_me:23127: \$? = $ac_status" >&5
23128   (exit "$ac_status"); } &&
23129          { ac_try='test -s "conftest$ac_exeext"'
23130   { (eval echo "$as_me:23130: \"$ac_try\"") >&5
23131   (eval $ac_try) 2>&5
23132   ac_status=$?
23133   echo "$as_me:23133: \$? = $ac_status" >&5
23134   (exit "$ac_status"); }; }; then
23135   cf_cv_pointer_va_list=yes
23136 else
23137   echo "$as_me: failed program was:" >&5
23138 cat "conftest.$ac_ext" >&5
23139 cf_cv_pointer_va_list=no
23140 fi
23141 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23142 fi
23143 echo "$as_me:23143: result: $cf_cv_pointer_va_list" >&5
23144 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23145
23146         if test "$cf_cv_pointer_va_list" = no
23147         then
23148                 echo "$as_me:23148: checking if we can copy va_list indirectly" >&5
23149 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23150 if test "${cf_cv_array_va_list+set}" = set; then
23151   echo $ECHO_N "(cached) $ECHO_C" >&6
23152 else
23153
23154 cat >"conftest.$ac_ext" <<_ACEOF
23155 #line 23155 "configure"
23156 #include "confdefs.h"
23157
23158 #include <stdarg.h>
23159
23160 int
23161 main (void)
23162 {
23163
23164         va_list dst;
23165         va_list src;
23166         *dst = *src
23167   ;
23168   return 0;
23169 }
23170 _ACEOF
23171 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23172 if { (eval echo "$as_me:23172: \"$ac_link\"") >&5
23173   (eval $ac_link) 2>&5
23174   ac_status=$?
23175   echo "$as_me:23175: \$? = $ac_status" >&5
23176   (exit "$ac_status"); } &&
23177          { ac_try='test -s "conftest$ac_exeext"'
23178   { (eval echo "$as_me:23178: \"$ac_try\"") >&5
23179   (eval $ac_try) 2>&5
23180   ac_status=$?
23181   echo "$as_me:23181: \$? = $ac_status" >&5
23182   (exit "$ac_status"); }; }; then
23183   cf_cv_array_va_list=yes
23184 else
23185   echo "$as_me: failed program was:" >&5
23186 cat "conftest.$ac_ext" >&5
23187 cf_cv_array_va_list=no
23188 fi
23189 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23190 fi
23191 echo "$as_me:23191: result: $cf_cv_array_va_list" >&5
23192 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23193                 test "$cf_cv_array_va_list" = yes &&
23194 cat >>confdefs.h <<\EOF
23195 #define ARRAY_VA_LIST 1
23196 EOF
23197
23198         fi
23199         ;;
23200 esac
23201
23202 echo "$as_me:23202: checking for pid_t" >&5
23203 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23204 if test "${ac_cv_type_pid_t+set}" = set; then
23205   echo $ECHO_N "(cached) $ECHO_C" >&6
23206 else
23207   cat >"conftest.$ac_ext" <<_ACEOF
23208 #line 23208 "configure"
23209 #include "confdefs.h"
23210 $ac_includes_default
23211 int
23212 main (void)
23213 {
23214 if ((pid_t *) 0)
23215   return 0;
23216 if (sizeof (pid_t))
23217   return 0;
23218   ;
23219   return 0;
23220 }
23221 _ACEOF
23222 rm -f "conftest.$ac_objext"
23223 if { (eval echo "$as_me:23223: \"$ac_compile\"") >&5
23224   (eval $ac_compile) 2>&5
23225   ac_status=$?
23226   echo "$as_me:23226: \$? = $ac_status" >&5
23227   (exit "$ac_status"); } &&
23228          { ac_try='test -s "conftest.$ac_objext"'
23229   { (eval echo "$as_me:23229: \"$ac_try\"") >&5
23230   (eval $ac_try) 2>&5
23231   ac_status=$?
23232   echo "$as_me:23232: \$? = $ac_status" >&5
23233   (exit "$ac_status"); }; }; then
23234   ac_cv_type_pid_t=yes
23235 else
23236   echo "$as_me: failed program was:" >&5
23237 cat "conftest.$ac_ext" >&5
23238 ac_cv_type_pid_t=no
23239 fi
23240 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23241 fi
23242 echo "$as_me:23242: result: $ac_cv_type_pid_t" >&5
23243 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23244 if test "$ac_cv_type_pid_t" = yes; then
23245   :
23246 else
23247
23248 cat >>confdefs.h <<EOF
23249 #define pid_t int
23250 EOF
23251
23252 fi
23253
23254 for ac_header in unistd.h vfork.h
23255 do
23256 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23257 echo "$as_me:23257: checking for $ac_header" >&5
23258 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23259 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23260   echo $ECHO_N "(cached) $ECHO_C" >&6
23261 else
23262   cat >"conftest.$ac_ext" <<_ACEOF
23263 #line 23263 "configure"
23264 #include "confdefs.h"
23265 #include <$ac_header>
23266 _ACEOF
23267 if { (eval echo "$as_me:23267: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23268   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23269   ac_status=$?
23270   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23271   rm -f conftest.er1
23272   cat conftest.err >&5
23273   echo "$as_me:23273: \$? = $ac_status" >&5
23274   (exit "$ac_status"); } >/dev/null; then
23275   if test -s conftest.err; then
23276     ac_cpp_err=$ac_c_preproc_warn_flag
23277   else
23278     ac_cpp_err=
23279   fi
23280 else
23281   ac_cpp_err=yes
23282 fi
23283 if test -z "$ac_cpp_err"; then
23284   eval "$as_ac_Header=yes"
23285 else
23286   echo "$as_me: failed program was:" >&5
23287   cat "conftest.$ac_ext" >&5
23288   eval "$as_ac_Header=no"
23289 fi
23290 rm -f conftest.err "conftest.$ac_ext"
23291 fi
23292 echo "$as_me:23292: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23293 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23294 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23295   cat >>confdefs.h <<EOF
23296 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23297 EOF
23298
23299 fi
23300 done
23301
23302 for ac_func in fork vfork
23303 do
23304 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23305 echo "$as_me:23305: checking for $ac_func" >&5
23306 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23307 if eval "test \"\${$as_ac_var+set}\" = set"; then
23308   echo $ECHO_N "(cached) $ECHO_C" >&6
23309 else
23310   cat >"conftest.$ac_ext" <<_ACEOF
23311 #line 23311 "configure"
23312 #include "confdefs.h"
23313 #define $ac_func autoconf_temporary
23314 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23315 #undef $ac_func
23316
23317 #ifdef __cplusplus
23318 extern "C"
23319 #endif
23320
23321 /* We use char because int might match the return type of a gcc2
23322    builtin and then its argument prototype would still apply.  */
23323 char $ac_func (void);
23324
23325 int
23326 main (void)
23327 {
23328
23329 /* The GNU C library defines stubs for functions which it implements
23330     to always fail with ENOSYS.  Some functions are actually named
23331     something starting with __ and the normal name is an alias.  */
23332 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23333 #error found stub for $ac_func
23334 #endif
23335
23336         return $ac_func ();
23337   ;
23338   return 0;
23339 }
23340 _ACEOF
23341 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23342 if { (eval echo "$as_me:23342: \"$ac_link\"") >&5
23343   (eval $ac_link) 2>&5
23344   ac_status=$?
23345   echo "$as_me:23345: \$? = $ac_status" >&5
23346   (exit "$ac_status"); } &&
23347          { ac_try='test -s "conftest$ac_exeext"'
23348   { (eval echo "$as_me:23348: \"$ac_try\"") >&5
23349   (eval $ac_try) 2>&5
23350   ac_status=$?
23351   echo "$as_me:23351: \$? = $ac_status" >&5
23352   (exit "$ac_status"); }; }; then
23353   eval "$as_ac_var=yes"
23354 else
23355   echo "$as_me: failed program was:" >&5
23356 cat "conftest.$ac_ext" >&5
23357 eval "$as_ac_var=no"
23358 fi
23359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23360 fi
23361 echo "$as_me:23361: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23362 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23363 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23364   cat >>confdefs.h <<EOF
23365 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23366 EOF
23367
23368 fi
23369 done
23370
23371 ac_cv_func_fork_works=$ac_cv_func_fork
23372 if test "x$ac_cv_func_fork" = xyes; then
23373   echo "$as_me:23373: checking for working fork" >&5
23374 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23375 if test "${ac_cv_func_fork_works+set}" = set; then
23376   echo $ECHO_N "(cached) $ECHO_C" >&6
23377 else
23378   if test "$cross_compiling" = yes; then
23379   ac_cv_func_fork_works=cross
23380 else
23381   cat >"conftest.$ac_ext" <<_ACEOF
23382 /* By Rüdiger Kuhlmann. */
23383       #include <sys/types.h>
23384       #if HAVE_UNISTD_H
23385       # include <unistd.h>
23386       #endif
23387       /* Some systems only have a dummy stub for fork() */
23388       int main (void)
23389       {
23390         if (fork() < 0)
23391           $ac_main_return (1);
23392         $ac_main_return (0);
23393       }
23394 _ACEOF
23395 rm -f "conftest$ac_exeext"
23396 if { (eval echo "$as_me:23396: \"$ac_link\"") >&5
23397   (eval $ac_link) 2>&5
23398   ac_status=$?
23399   echo "$as_me:23399: \$? = $ac_status" >&5
23400   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23401   { (eval echo "$as_me:23401: \"$ac_try\"") >&5
23402   (eval $ac_try) 2>&5
23403   ac_status=$?
23404   echo "$as_me:23404: \$? = $ac_status" >&5
23405   (exit "$ac_status"); }; }; then
23406   ac_cv_func_fork_works=yes
23407 else
23408   echo "$as_me: program exited with status $ac_status" >&5
23409 echo "$as_me: failed program was:" >&5
23410 cat "conftest.$ac_ext" >&5
23411 ac_cv_func_fork_works=no
23412 fi
23413 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23414 fi
23415 fi
23416 echo "$as_me:23416: result: $ac_cv_func_fork_works" >&5
23417 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23418
23419 fi
23420 if test "x$ac_cv_func_fork_works" = xcross; then
23421   case $host in
23422     *-*-amigaos* | *-*-msdosdjgpp*)
23423       # Override, as these systems have only a dummy fork() stub
23424       ac_cv_func_fork_works=no
23425       ;;
23426     *)
23427       ac_cv_func_fork_works=yes
23428       ;;
23429   esac
23430   { echo "$as_me:23430: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23431 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23432 fi
23433 ac_cv_func_vfork_works=$ac_cv_func_vfork
23434 if test "x$ac_cv_func_vfork" = xyes; then
23435   echo "$as_me:23435: checking for working vfork" >&5
23436 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23437 if test "${ac_cv_func_vfork_works+set}" = set; then
23438   echo $ECHO_N "(cached) $ECHO_C" >&6
23439 else
23440   if test "$cross_compiling" = yes; then
23441   ac_cv_func_vfork_works=cross
23442 else
23443   cat >"conftest.$ac_ext" <<_ACEOF
23444 #line 23444 "configure"
23445 #include "confdefs.h"
23446 /* Thanks to Paul Eggert for this test.  */
23447 #include <stdio.h>
23448 #include <sys/types.h>
23449 #include <sys/stat.h>
23450 #if HAVE_UNISTD_H
23451 # include <unistd.h>
23452 #endif
23453 #if HAVE_VFORK_H
23454 # include <vfork.h>
23455 #endif
23456 /* On some sparc systems, changes by the child to local and incoming
23457    argument registers are propagated back to the parent.  The compiler
23458    is told about this with #include <vfork.h>, but some compilers
23459    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23460    static variable whose address is put into a register that is
23461    clobbered by the vfork.  */
23462 static
23463 #ifdef __cplusplus
23464 sparc_address_test (int arg)
23465 # else
23466 sparc_address_test (arg) int arg;
23467 #endif
23468 {
23469   static pid_t child;
23470   if (!child) {
23471     child = vfork ();
23472     if (child < 0) {
23473       perror ("vfork");
23474       _exit(2);
23475     }
23476     if (!child) {
23477       arg = getpid();
23478       write(-1, "", 0);
23479       _exit (arg);
23480     }
23481   }
23482 }
23483
23484 int
23485 main (void)
23486 {
23487   pid_t parent = getpid ();
23488   pid_t child;
23489
23490   sparc_address_test ();
23491
23492   child = vfork ();
23493
23494   if (child == 0) {
23495     /* Here is another test for sparc vfork register problems.  This
23496        test uses lots of local variables, at least as many local
23497        variables as main has allocated so far including compiler
23498        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23499        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23500        reuse the register of parent for one of the local variables,
23501        since it will think that parent can't possibly be used any more
23502        in this routine.  Assigning to the local variable will thus
23503        munge parent in the parent process.  */
23504     pid_t
23505       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23506       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23507     /* Convince the compiler that p..p7 are live; otherwise, it might
23508        use the same hardware register for all 8 local variables.  */
23509     if (p != p1 || p != p2 || p != p3 || p != p4
23510         || p != p5 || p != p6 || p != p7)
23511       _exit(1);
23512
23513     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23514        from child file descriptors.  If the child closes a descriptor
23515        before it execs or exits, this munges the parent's descriptor
23516        as well.  Test for this by closing stdout in the child.  */
23517     _exit(close(fileno(stdout)) != 0);
23518   } else {
23519     int status;
23520     struct stat st;
23521
23522     while (wait(&status) != child)
23523       ;
23524     $ac_main_return(
23525          /* Was there some problem with vforking?  */
23526          child < 0
23527
23528          /* Did the child fail?  (This shouldn't happen.)  */
23529          || status
23530
23531          /* Did the vfork/compiler bug occur?  */
23532          || parent != getpid()
23533
23534          /* Did the file descriptor bug occur?  */
23535          || fstat(fileno(stdout), &st) != 0
23536          );
23537   }
23538 }
23539 _ACEOF
23540 rm -f "conftest$ac_exeext"
23541 if { (eval echo "$as_me:23541: \"$ac_link\"") >&5
23542   (eval $ac_link) 2>&5
23543   ac_status=$?
23544   echo "$as_me:23544: \$? = $ac_status" >&5
23545   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23546   { (eval echo "$as_me:23546: \"$ac_try\"") >&5
23547   (eval $ac_try) 2>&5
23548   ac_status=$?
23549   echo "$as_me:23549: \$? = $ac_status" >&5
23550   (exit "$ac_status"); }; }; then
23551   ac_cv_func_vfork_works=yes
23552 else
23553   echo "$as_me: program exited with status $ac_status" >&5
23554 echo "$as_me: failed program was:" >&5
23555 cat "conftest.$ac_ext" >&5
23556 ac_cv_func_vfork_works=no
23557 fi
23558 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23559 fi
23560 fi
23561 echo "$as_me:23561: result: $ac_cv_func_vfork_works" >&5
23562 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23563
23564 fi;
23565 if test "x$ac_cv_func_fork_works" = xcross; then
23566   ac_cv_func_vfork_works=ac_cv_func_vfork
23567   { echo "$as_me:23567: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23568 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23569 fi
23570
23571 if test "x$ac_cv_func_vfork_works" = xyes; then
23572
23573 cat >>confdefs.h <<\EOF
23574 #define HAVE_WORKING_VFORK 1
23575 EOF
23576
23577 else
23578
23579 cat >>confdefs.h <<\EOF
23580 #define vfork fork
23581 EOF
23582
23583 fi
23584 if test "x$ac_cv_func_fork_works" = xyes; then
23585
23586 cat >>confdefs.h <<\EOF
23587 #define HAVE_WORKING_FORK 1
23588 EOF
23589
23590 fi
23591
23592 echo "$as_me:23592: checking if fopen accepts explicit binary mode" >&5
23593 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23594 if test "${cf_cv_fopen_bin_r+set}" = set; then
23595   echo $ECHO_N "(cached) $ECHO_C" >&6
23596 else
23597
23598         if test "$cross_compiling" = yes; then
23599   cf_cv_fopen_bin_r=unknown
23600 else
23601   cat >"conftest.$ac_ext" <<_ACEOF
23602 #line 23602 "configure"
23603 #include "confdefs.h"
23604
23605 #include <stdio.h>
23606 int main(void) {
23607         FILE *fp = fopen("conftest.tmp", "wb");
23608         int rc = 0;
23609         if (fp != 0) {
23610                 int p, q;
23611                 for (p = 0; p < 256; ++p) {
23612                         fputc(p, fp);
23613                 }
23614                 fclose(fp);
23615                 fp = fopen("conftest.tmp", "rb");
23616                 if (fp != 0) {
23617                         for (p = 0; p < 256; ++p) {
23618                                 q = fgetc(fp);
23619                                 if (q != p) {
23620                                         rc = 1;
23621                                         break;
23622                                 }
23623                         }
23624                 } else {
23625                         rc = 1;
23626                 }
23627         } else {
23628                 rc = 1;
23629         }
23630         ${cf_cv_main_return:-return} (rc);
23631 }
23632
23633 _ACEOF
23634 rm -f "conftest$ac_exeext"
23635 if { (eval echo "$as_me:23635: \"$ac_link\"") >&5
23636   (eval $ac_link) 2>&5
23637   ac_status=$?
23638   echo "$as_me:23638: \$? = $ac_status" >&5
23639   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23640   { (eval echo "$as_me:23640: \"$ac_try\"") >&5
23641   (eval $ac_try) 2>&5
23642   ac_status=$?
23643   echo "$as_me:23643: \$? = $ac_status" >&5
23644   (exit "$ac_status"); }; }; then
23645   cf_cv_fopen_bin_r=yes
23646 else
23647   echo "$as_me: program exited with status $ac_status" >&5
23648 echo "$as_me: failed program was:" >&5
23649 cat "conftest.$ac_ext" >&5
23650 cf_cv_fopen_bin_r=no
23651 fi
23652 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23653 fi
23654
23655 fi
23656 echo "$as_me:23656: result: $cf_cv_fopen_bin_r" >&5
23657 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23658 test "x$cf_cv_fopen_bin_r" != xno &&
23659 cat >>confdefs.h <<\EOF
23660 #define USE_FOPEN_BIN_R 1
23661 EOF
23662
23663 # special check for test/ditto.c
23664
23665 echo "$as_me:23665: checking for openpty in -lutil" >&5
23666 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23667 if test "${ac_cv_lib_util_openpty+set}" = set; then
23668   echo $ECHO_N "(cached) $ECHO_C" >&6
23669 else
23670   ac_check_lib_save_LIBS=$LIBS
23671 LIBS="-lutil  $LIBS"
23672 cat >"conftest.$ac_ext" <<_ACEOF
23673 #line 23673 "configure"
23674 #include "confdefs.h"
23675
23676 /* Override any gcc2 internal prototype to avoid an error.  */
23677 #ifdef __cplusplus
23678 extern "C"
23679 #endif
23680 /* We use char because int might match the return type of a gcc2
23681    builtin and then its argument prototype would still apply.  */
23682 char openpty ();
23683 int
23684 main (void)
23685 {
23686 openpty ();
23687   ;
23688   return 0;
23689 }
23690 _ACEOF
23691 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23692 if { (eval echo "$as_me:23692: \"$ac_link\"") >&5
23693   (eval $ac_link) 2>&5
23694   ac_status=$?
23695   echo "$as_me:23695: \$? = $ac_status" >&5
23696   (exit "$ac_status"); } &&
23697          { ac_try='test -s "conftest$ac_exeext"'
23698   { (eval echo "$as_me:23698: \"$ac_try\"") >&5
23699   (eval $ac_try) 2>&5
23700   ac_status=$?
23701   echo "$as_me:23701: \$? = $ac_status" >&5
23702   (exit "$ac_status"); }; }; then
23703   ac_cv_lib_util_openpty=yes
23704 else
23705   echo "$as_me: failed program was:" >&5
23706 cat "conftest.$ac_ext" >&5
23707 ac_cv_lib_util_openpty=no
23708 fi
23709 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23710 LIBS=$ac_check_lib_save_LIBS
23711 fi
23712 echo "$as_me:23712: result: $ac_cv_lib_util_openpty" >&5
23713 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23714 if test "$ac_cv_lib_util_openpty" = yes; then
23715   cf_cv_lib_util=yes
23716 else
23717   cf_cv_lib_util=no
23718 fi
23719
23720 echo "$as_me:23720: checking for openpty header" >&5
23721 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23722 if test "${cf_cv_func_openpty+set}" = set; then
23723   echo $ECHO_N "(cached) $ECHO_C" >&6
23724 else
23725
23726         cf_save_LIBS="$LIBS"
23727         test "$cf_cv_lib_util" = yes && {
23728 cf_add_libs="$LIBS"
23729 # reverse order
23730 cf_add_0lib=
23731 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23732 # filter duplicates
23733 for cf_add_1lib in $cf_add_0lib; do
23734         for cf_add_2lib in $cf_add_libs; do
23735                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23736                         cf_add_1lib=
23737                         break
23738                 fi
23739         done
23740         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23741 done
23742 LIBS="$cf_add_libs"
23743  }
23744         for cf_header in pty.h libutil.h util.h
23745         do
23746         cat >"conftest.$ac_ext" <<_ACEOF
23747 #line 23747 "configure"
23748 #include "confdefs.h"
23749
23750 #include <$cf_header>
23751
23752 int
23753 main (void)
23754 {
23755
23756         int x = openpty((int *)0, (int *)0, (char *)0,
23757                                    (struct termios *)0, (struct winsize *)0);
23758
23759   ;
23760   return 0;
23761 }
23762 _ACEOF
23763 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23764 if { (eval echo "$as_me:23764: \"$ac_link\"") >&5
23765   (eval $ac_link) 2>&5
23766   ac_status=$?
23767   echo "$as_me:23767: \$? = $ac_status" >&5
23768   (exit "$ac_status"); } &&
23769          { ac_try='test -s "conftest$ac_exeext"'
23770   { (eval echo "$as_me:23770: \"$ac_try\"") >&5
23771   (eval $ac_try) 2>&5
23772   ac_status=$?
23773   echo "$as_me:23773: \$? = $ac_status" >&5
23774   (exit "$ac_status"); }; }; then
23775
23776                 cf_cv_func_openpty=$cf_header
23777                 break
23778
23779 else
23780   echo "$as_me: failed program was:" >&5
23781 cat "conftest.$ac_ext" >&5
23782
23783                 cf_cv_func_openpty=no
23784
23785 fi
23786 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23787         done
23788         LIBS="$cf_save_LIBS"
23789
23790 fi
23791 echo "$as_me:23791: result: $cf_cv_func_openpty" >&5
23792 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23793
23794 if test "$cf_cv_func_openpty" != no ; then
23795
23796 cat >>confdefs.h <<EOF
23797 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23798 EOF
23799
23800 cat >>confdefs.h <<\EOF
23801 #define USE_XTERM_PTY 1
23802 EOF
23803
23804         if test "x$cf_cv_lib_util" = xyes ; then
23805
23806 cf_add_libs="$TEST_LIBS"
23807 # reverse order
23808 cf_add_0lib=
23809 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23810 # filter duplicates
23811 for cf_add_1lib in $cf_add_0lib; do
23812         for cf_add_2lib in $cf_add_libs; do
23813                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23814                         cf_add_1lib=
23815                         break
23816                 fi
23817         done
23818         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23819 done
23820 TEST_LIBS="$cf_add_libs"
23821
23822         fi
23823 fi
23824
23825 if test "$with_hashed_db" != no ; then
23826
23827 cat >>confdefs.h <<\EOF
23828 #define USE_HASHED_DB 1
23829 EOF
23830
23831 case $with_hashed_db in
23832 (yes|*able*)
23833         ;;
23834 (*)
23835         if test -d "$with_hashed_db" ; then
23836
23837 if test -n "$with_hashed_db/include" ; then
23838   for cf_add_incdir in $with_hashed_db/include
23839   do
23840         while test "$cf_add_incdir" != /usr/include
23841         do
23842           if test -d "$cf_add_incdir"
23843           then
23844                 cf_have_incdir=no
23845                 if test -n "$CFLAGS$CPPFLAGS" ; then
23846                   # a loop is needed to ensure we can add subdirs of existing dirs
23847                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23848                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23849                           cf_have_incdir=yes; break
23850                         fi
23851                   done
23852                 fi
23853
23854                 if test "$cf_have_incdir" = no ; then
23855                   if test "$cf_add_incdir" = /usr/local/include ; then
23856                         if test "$GCC" = yes
23857                         then
23858                           cf_save_CPPFLAGS=$CPPFLAGS
23859
23860         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23861         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23862
23863                           cat >"conftest.$ac_ext" <<_ACEOF
23864 #line 23864 "configure"
23865 #include "confdefs.h"
23866 #include <stdio.h>
23867 int
23868 main (void)
23869 {
23870 printf("Hello")
23871   ;
23872   return 0;
23873 }
23874 _ACEOF
23875 rm -f "conftest.$ac_objext"
23876 if { (eval echo "$as_me:23876: \"$ac_compile\"") >&5
23877   (eval $ac_compile) 2>&5
23878   ac_status=$?
23879   echo "$as_me:23879: \$? = $ac_status" >&5
23880   (exit "$ac_status"); } &&
23881          { ac_try='test -s "conftest.$ac_objext"'
23882   { (eval echo "$as_me:23882: \"$ac_try\"") >&5
23883   (eval $ac_try) 2>&5
23884   ac_status=$?
23885   echo "$as_me:23885: \$? = $ac_status" >&5
23886   (exit "$ac_status"); }; }; then
23887   :
23888 else
23889   echo "$as_me: failed program was:" >&5
23890 cat "conftest.$ac_ext" >&5
23891 cf_have_incdir=yes
23892 fi
23893 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23894                           CPPFLAGS=$cf_save_CPPFLAGS
23895                         fi
23896                   fi
23897                 fi
23898
23899                 if test "$cf_have_incdir" = no ; then
23900                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23901
23902 echo "${as_me:-configure}:23902: testing adding $cf_add_incdir to include-path ..." 1>&5
23903
23904                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23905
23906                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23907                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23908                   cf_add_incdir="$cf_top_incdir"
23909                 else
23910                   break
23911                 fi
23912           else
23913                 break
23914           fi
23915         done
23916   done
23917 fi
23918
23919 if test -n "$with_hashed_db/lib" ; then
23920         for cf_add_libdir in $with_hashed_db/lib
23921         do
23922                 if test "$cf_add_libdir" = /usr/lib ; then
23923                         :
23924                 elif test -d "$cf_add_libdir"
23925                 then
23926                         cf_have_libdir=no
23927                         if test -n "$LDFLAGS$LIBS" ; then
23928                                 # a loop is needed to ensure we can add subdirs of existing dirs
23929                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23930                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23931                                                 cf_have_libdir=yes; break
23932                                         fi
23933                                 done
23934                         fi
23935                         if test "$cf_have_libdir" = no ; then
23936                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23937
23938 echo "${as_me:-configure}:23938: testing adding $cf_add_libdir to library-path ..." 1>&5
23939
23940                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23941                         fi
23942                 fi
23943         done
23944 fi
23945
23946         else
23947                 case "$with_hashed_db" in
23948                 (./*|../*|/*)
23949                         { echo "$as_me:23949: WARNING: no such directory $with_hashed_db" >&5
23950 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23951                         ;;
23952                 (*)
23953
23954 cf_search=
23955
23956 test "x$prefix" != "xNONE" && \
23957 test -d "$prefix" && \
23958  {
23959         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23960         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23961         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23962         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23963         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23964         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23965 }
23966
23967 for cf_subdir_prefix in \
23968         /usr \
23969         /usr/local \
23970         /usr/pkg \
23971         /opt \
23972         /opt/local \
23973         $HOME
23974 do
23975
23976 test "x$cf_subdir_prefix" != "x$prefix" && \
23977 test -d "$cf_subdir_prefix" && \
23978 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23979         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23980         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23981         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23982         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23983         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23984         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"
23985 }
23986
23987 done
23988
23989         for cf_item in $cf_search
23990         do
23991                 case "$cf_item" in
23992                 (*/$with_hashed_db)
23993
23994 if test -n "$cf_item" ; then
23995   for cf_add_incdir in $cf_item
23996   do
23997         while test "$cf_add_incdir" != /usr/include
23998         do
23999           if test -d "$cf_add_incdir"
24000           then
24001                 cf_have_incdir=no
24002                 if test -n "$CFLAGS$CPPFLAGS" ; then
24003                   # a loop is needed to ensure we can add subdirs of existing dirs
24004                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24005                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24006                           cf_have_incdir=yes; break
24007                         fi
24008                   done
24009                 fi
24010
24011                 if test "$cf_have_incdir" = no ; then
24012                   if test "$cf_add_incdir" = /usr/local/include ; then
24013                         if test "$GCC" = yes
24014                         then
24015                           cf_save_CPPFLAGS=$CPPFLAGS
24016
24017         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24018         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24019
24020                           cat >"conftest.$ac_ext" <<_ACEOF
24021 #line 24021 "configure"
24022 #include "confdefs.h"
24023 #include <stdio.h>
24024 int
24025 main (void)
24026 {
24027 printf("Hello")
24028   ;
24029   return 0;
24030 }
24031 _ACEOF
24032 rm -f "conftest.$ac_objext"
24033 if { (eval echo "$as_me:24033: \"$ac_compile\"") >&5
24034   (eval $ac_compile) 2>&5
24035   ac_status=$?
24036   echo "$as_me:24036: \$? = $ac_status" >&5
24037   (exit "$ac_status"); } &&
24038          { ac_try='test -s "conftest.$ac_objext"'
24039   { (eval echo "$as_me:24039: \"$ac_try\"") >&5
24040   (eval $ac_try) 2>&5
24041   ac_status=$?
24042   echo "$as_me:24042: \$? = $ac_status" >&5
24043   (exit "$ac_status"); }; }; then
24044   :
24045 else
24046   echo "$as_me: failed program was:" >&5
24047 cat "conftest.$ac_ext" >&5
24048 cf_have_incdir=yes
24049 fi
24050 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24051                           CPPFLAGS=$cf_save_CPPFLAGS
24052                         fi
24053                   fi
24054                 fi
24055
24056                 if test "$cf_have_incdir" = no ; then
24057                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24058
24059 echo "${as_me:-configure}:24059: testing adding $cf_add_incdir to include-path ..." 1>&5
24060
24061                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24062
24063                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24064                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24065                   cf_add_incdir="$cf_top_incdir"
24066                 else
24067                   break
24068                 fi
24069           else
24070                 break
24071           fi
24072         done
24073   done
24074 fi
24075
24076                         ;;
24077                 esac
24078         done
24079
24080 cf_search=
24081
24082 test "x$prefix" != "xNONE" && \
24083 test -d "$prefix" && \
24084  {
24085         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24086         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24087         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24088         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24089         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24090         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24091 }
24092
24093 for cf_subdir_prefix in \
24094         /usr \
24095         /usr/local \
24096         /usr/pkg \
24097         /opt \
24098         /opt/local \
24099         $HOME
24100 do
24101
24102 test "x$cf_subdir_prefix" != "x$prefix" && \
24103 test -d "$cf_subdir_prefix" && \
24104 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24105         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24106         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24107         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24108         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24109         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24110         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"
24111 }
24112
24113 done
24114
24115         for cf_item in $cf_search
24116         do
24117                 case "$cf_item" in
24118                 (*/$with_hashed_db)
24119
24120 if test -n "$cf_item" ; then
24121         for cf_add_libdir in $cf_item
24122         do
24123                 if test "$cf_add_libdir" = /usr/lib ; then
24124                         :
24125                 elif test -d "$cf_add_libdir"
24126                 then
24127                         cf_have_libdir=no
24128                         if test -n "$LDFLAGS$LIBS" ; then
24129                                 # a loop is needed to ensure we can add subdirs of existing dirs
24130                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24131                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24132                                                 cf_have_libdir=yes; break
24133                                         fi
24134                                 done
24135                         fi
24136                         if test "$cf_have_libdir" = no ; then
24137                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24138
24139 echo "${as_me:-configure}:24139: testing adding $cf_add_libdir to library-path ..." 1>&5
24140
24141                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24142                         fi
24143                 fi
24144         done
24145 fi
24146
24147                         ;;
24148                 esac
24149         done
24150
24151                         ;;
24152                 esac
24153         fi
24154 esac
24155
24156 echo "$as_me:24156: checking for db.h" >&5
24157 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24158 if test "${ac_cv_header_db_h+set}" = set; then
24159   echo $ECHO_N "(cached) $ECHO_C" >&6
24160 else
24161   cat >"conftest.$ac_ext" <<_ACEOF
24162 #line 24162 "configure"
24163 #include "confdefs.h"
24164 #include <db.h>
24165 _ACEOF
24166 if { (eval echo "$as_me:24166: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24167   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24168   ac_status=$?
24169   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24170   rm -f conftest.er1
24171   cat conftest.err >&5
24172   echo "$as_me:24172: \$? = $ac_status" >&5
24173   (exit "$ac_status"); } >/dev/null; then
24174   if test -s conftest.err; then
24175     ac_cpp_err=$ac_c_preproc_warn_flag
24176   else
24177     ac_cpp_err=
24178   fi
24179 else
24180   ac_cpp_err=yes
24181 fi
24182 if test -z "$ac_cpp_err"; then
24183   ac_cv_header_db_h=yes
24184 else
24185   echo "$as_me: failed program was:" >&5
24186   cat "conftest.$ac_ext" >&5
24187   ac_cv_header_db_h=no
24188 fi
24189 rm -f conftest.err "conftest.$ac_ext"
24190 fi
24191 echo "$as_me:24191: result: $ac_cv_header_db_h" >&5
24192 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24193 if test "$ac_cv_header_db_h" = yes; then
24194
24195 echo "$as_me:24195: checking for version of db" >&5
24196 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24197 if test "${cf_cv_hashed_db_version+set}" = set; then
24198   echo $ECHO_N "(cached) $ECHO_C" >&6
24199 else
24200
24201 cf_cv_hashed_db_version=unknown
24202
24203 for cf_db_version in 1 2 3 4 5 6
24204 do
24205
24206 echo "${as_me:-configure}:24206: testing checking for db version $cf_db_version ..." 1>&5
24207
24208         cat >"conftest.$ac_ext" <<_ACEOF
24209 #line 24209 "configure"
24210 #include "confdefs.h"
24211
24212 $ac_includes_default
24213 #include <db.h>
24214
24215 #ifdef DB_VERSION_MAJOR
24216         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24217 #if $cf_db_version == DB_VERSION_MAJOR
24218         /* ok */
24219 #else
24220         make an error
24221 #endif
24222 #else
24223 #if $cf_db_version == 1
24224         /* ok: assuming this is DB 1.8.5 */
24225 #else
24226         make an error
24227 #endif
24228 #endif
24229
24230 int
24231 main (void)
24232 {
24233 DBT *foo = 0
24234   ;
24235   return 0;
24236 }
24237 _ACEOF
24238 rm -f "conftest.$ac_objext"
24239 if { (eval echo "$as_me:24239: \"$ac_compile\"") >&5
24240   (eval $ac_compile) 2>&5
24241   ac_status=$?
24242   echo "$as_me:24242: \$? = $ac_status" >&5
24243   (exit "$ac_status"); } &&
24244          { ac_try='test -s "conftest.$ac_objext"'
24245   { (eval echo "$as_me:24245: \"$ac_try\"") >&5
24246   (eval $ac_try) 2>&5
24247   ac_status=$?
24248   echo "$as_me:24248: \$? = $ac_status" >&5
24249   (exit "$ac_status"); }; }; then
24250
24251         cf_cv_hashed_db_version=$cf_db_version
24252         break
24253
24254 else
24255   echo "$as_me: failed program was:" >&5
24256 cat "conftest.$ac_ext" >&5
24257 fi
24258 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24259 done
24260
24261 fi
24262 echo "$as_me:24262: result: $cf_cv_hashed_db_version" >&5
24263 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24264
24265 if test "$cf_cv_hashed_db_version" = unknown ; then
24266         { { echo "$as_me:24266: error: Cannot determine version of db" >&5
24267 echo "$as_me: error: Cannot determine version of db" >&2;}
24268    { (exit 1); exit 1; }; }
24269 else
24270
24271 echo "$as_me:24271: checking for db libraries" >&5
24272 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24273 if test "${cf_cv_hashed_db_libs+set}" = set; then
24274   echo $ECHO_N "(cached) $ECHO_C" >&6
24275 else
24276
24277 cf_cv_hashed_db_libs=unknown
24278 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24279 do
24280         cf_save_libs="$LIBS"
24281         if test -n "$cf_db_libs"; then
24282
24283 cf_add_libs="$LIBS"
24284 # reverse order
24285 cf_add_0lib=
24286 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24287 # filter duplicates
24288 for cf_add_1lib in $cf_add_0lib; do
24289         for cf_add_2lib in $cf_add_libs; do
24290                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24291                         cf_add_1lib=
24292                         break
24293                 fi
24294         done
24295         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24296 done
24297 LIBS="$cf_add_libs"
24298
24299         fi
24300
24301 echo "${as_me:-configure}:24301: testing checking for library $cf_db_libs ..." 1>&5
24302
24303         cat >"conftest.$ac_ext" <<_ACEOF
24304 #line 24304 "configure"
24305 #include "confdefs.h"
24306
24307 $ac_includes_default
24308 #include <db.h>
24309
24310 int
24311 main (void)
24312 {
24313
24314         char *path = "/tmp/foo";
24315 #ifdef DB_VERSION_MAJOR
24316 #if DB_VERSION_MAJOR >= 4
24317         DB *result = 0;
24318         db_create(&result, NULL, 0);
24319         result->open(result,
24320                 NULL,
24321                 path,
24322                 path,
24323                 DB_HASH,
24324                 DB_CREATE,
24325                 0644);
24326 #elif DB_VERSION_MAJOR >= 3
24327         DB *result = 0;
24328         db_create(&result, NULL, 0);
24329         result->open(result,
24330                 path,
24331                 path,
24332                 DB_HASH,
24333                 DB_CREATE,
24334                 0644);
24335 #elif DB_VERSION_MAJOR >= 2
24336         DB *result = 0;
24337         db_open(path,
24338                 DB_HASH,
24339                 DB_CREATE,
24340                 0644,
24341                 (DB_ENV *) 0,
24342                 (DB_INFO *) 0,
24343                 &result);
24344 #endif /* DB_VERSION_MAJOR */
24345 #else
24346         DB *result = dbopen(path,
24347                      2,
24348                      0644,
24349                      DB_HASH,
24350                      0);
24351 #endif
24352         ${cf_cv_main_return:-return}(result != 0)
24353
24354   ;
24355   return 0;
24356 }
24357 _ACEOF
24358 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24359 if { (eval echo "$as_me:24359: \"$ac_link\"") >&5
24360   (eval $ac_link) 2>&5
24361   ac_status=$?
24362   echo "$as_me:24362: \$? = $ac_status" >&5
24363   (exit "$ac_status"); } &&
24364          { ac_try='test -s "conftest$ac_exeext"'
24365   { (eval echo "$as_me:24365: \"$ac_try\"") >&5
24366   (eval $ac_try) 2>&5
24367   ac_status=$?
24368   echo "$as_me:24368: \$? = $ac_status" >&5
24369   (exit "$ac_status"); }; }; then
24370
24371         if test -n "$cf_db_libs" ; then
24372                 cf_cv_hashed_db_libs=$cf_db_libs
24373         else
24374                 cf_cv_hashed_db_libs=default
24375         fi
24376         LIBS="$cf_save_libs"
24377         break
24378
24379 else
24380   echo "$as_me: failed program was:" >&5
24381 cat "conftest.$ac_ext" >&5
24382 fi
24383 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24384         LIBS="$cf_save_libs"
24385 done
24386
24387 fi
24388 echo "$as_me:24388: result: $cf_cv_hashed_db_libs" >&5
24389 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24390
24391         if test "$cf_cv_hashed_db_libs" = unknown ; then
24392                 { { echo "$as_me:24392: error: Cannot determine library for db" >&5
24393 echo "$as_me: error: Cannot determine library for db" >&2;}
24394    { (exit 1); exit 1; }; }
24395         elif test "$cf_cv_hashed_db_libs" != default ; then
24396
24397 cf_add_libs="$LIBS"
24398 # reverse order
24399 cf_add_0lib=
24400 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24401 # filter duplicates
24402 for cf_add_1lib in $cf_add_0lib; do
24403         for cf_add_2lib in $cf_add_libs; do
24404                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24405                         cf_add_1lib=
24406                         break
24407                 fi
24408         done
24409         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24410 done
24411 LIBS="$cf_add_libs"
24412
24413         fi
24414 fi
24415
24416 else
24417
24418         { { echo "$as_me:24418: error: Cannot find db.h" >&5
24419 echo "$as_me: error: Cannot find db.h" >&2;}
24420    { (exit 1); exit 1; }; }
24421
24422 fi
24423
24424 fi
24425
24426 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24427         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24428         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24429 fi
24430
24431 # Just in case, check if the C compiler has a bool type.
24432
24433 echo "$as_me:24433: checking if we should include stdbool.h" >&5
24434 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24435
24436 if test "${cf_cv_header_stdbool_h+set}" = set; then
24437   echo $ECHO_N "(cached) $ECHO_C" >&6
24438 else
24439
24440         cat >"conftest.$ac_ext" <<_ACEOF
24441 #line 24441 "configure"
24442 #include "confdefs.h"
24443
24444 int
24445 main (void)
24446 {
24447 bool foo = false
24448   ;
24449   return 0;
24450 }
24451 _ACEOF
24452 rm -f "conftest.$ac_objext"
24453 if { (eval echo "$as_me:24453: \"$ac_compile\"") >&5
24454   (eval $ac_compile) 2>&5
24455   ac_status=$?
24456   echo "$as_me:24456: \$? = $ac_status" >&5
24457   (exit "$ac_status"); } &&
24458          { ac_try='test -s "conftest.$ac_objext"'
24459   { (eval echo "$as_me:24459: \"$ac_try\"") >&5
24460   (eval $ac_try) 2>&5
24461   ac_status=$?
24462   echo "$as_me:24462: \$? = $ac_status" >&5
24463   (exit "$ac_status"); }; }; then
24464   cf_cv_header_stdbool_h=0
24465 else
24466   echo "$as_me: failed program was:" >&5
24467 cat "conftest.$ac_ext" >&5
24468 cat >"conftest.$ac_ext" <<_ACEOF
24469 #line 24469 "configure"
24470 #include "confdefs.h"
24471
24472 #ifndef __BEOS__
24473 #include <stdbool.h>
24474 #endif
24475
24476 int
24477 main (void)
24478 {
24479 bool foo = false
24480   ;
24481   return 0;
24482 }
24483 _ACEOF
24484 rm -f "conftest.$ac_objext"
24485 if { (eval echo "$as_me:24485: \"$ac_compile\"") >&5
24486   (eval $ac_compile) 2>&5
24487   ac_status=$?
24488   echo "$as_me:24488: \$? = $ac_status" >&5
24489   (exit "$ac_status"); } &&
24490          { ac_try='test -s "conftest.$ac_objext"'
24491   { (eval echo "$as_me:24491: \"$ac_try\"") >&5
24492   (eval $ac_try) 2>&5
24493   ac_status=$?
24494   echo "$as_me:24494: \$? = $ac_status" >&5
24495   (exit "$ac_status"); }; }; then
24496   cf_cv_header_stdbool_h=1
24497 else
24498   echo "$as_me: failed program was:" >&5
24499 cat "conftest.$ac_ext" >&5
24500 cf_cv_header_stdbool_h=0
24501 fi
24502 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24503 fi
24504 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24505 fi
24506
24507 if test "$cf_cv_header_stdbool_h" = 1
24508 then    echo "$as_me:24508: result: yes" >&5
24509 echo "${ECHO_T}yes" >&6
24510 else    echo "$as_me:24510: result: no" >&5
24511 echo "${ECHO_T}no" >&6
24512 fi
24513
24514 echo "$as_me:24514: checking for builtin bool type" >&5
24515 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24516
24517 if test "${cf_cv_cc_bool_type+set}" = set; then
24518   echo $ECHO_N "(cached) $ECHO_C" >&6
24519 else
24520
24521         cat >"conftest.$ac_ext" <<_ACEOF
24522 #line 24522 "configure"
24523 #include "confdefs.h"
24524
24525 #include <stdio.h>
24526 #include <sys/types.h>
24527
24528 int
24529 main (void)
24530 {
24531 bool x = false
24532   ;
24533   return 0;
24534 }
24535 _ACEOF
24536 rm -f "conftest.$ac_objext"
24537 if { (eval echo "$as_me:24537: \"$ac_compile\"") >&5
24538   (eval $ac_compile) 2>&5
24539   ac_status=$?
24540   echo "$as_me:24540: \$? = $ac_status" >&5
24541   (exit "$ac_status"); } &&
24542          { ac_try='test -s "conftest.$ac_objext"'
24543   { (eval echo "$as_me:24543: \"$ac_try\"") >&5
24544   (eval $ac_try) 2>&5
24545   ac_status=$?
24546   echo "$as_me:24546: \$? = $ac_status" >&5
24547   (exit "$ac_status"); }; }; then
24548   cf_cv_cc_bool_type=1
24549 else
24550   echo "$as_me: failed program was:" >&5
24551 cat "conftest.$ac_ext" >&5
24552 cf_cv_cc_bool_type=0
24553 fi
24554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24555
24556 fi
24557
24558 if test "$cf_cv_cc_bool_type" = 1
24559 then    echo "$as_me:24559: result: yes" >&5
24560 echo "${ECHO_T}yes" >&6
24561 else    echo "$as_me:24561: result: no" >&5
24562 echo "${ECHO_T}no" >&6
24563 fi
24564
24565 # Check for C++ compiler characteristics (and ensure that it's there!)
24566 if test -n "$CXX" ; then
24567         ac_ext=cc
24568 ac_cpp='$CXXCPP $CPPFLAGS'
24569 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24570 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24571 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24572 ac_main_return="return"
24573
24574 if test -n "$GXX" ; then
24575
24576         cf_save="$LIBS"
24577         LIBS="$LIBS $CXXLIBS"
24578         echo "$as_me:24578: checking if we already have C++ library" >&5
24579 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24580         cat >"conftest.$ac_ext" <<_ACEOF
24581 #line 24581 "configure"
24582 #include "confdefs.h"
24583
24584                         #include <iostream>
24585 int
24586 main (void)
24587 {
24588
24589                         std::cout << "Hello World!" << std::endl;
24590   ;
24591   return 0;
24592 }
24593 _ACEOF
24594 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24595 if { (eval echo "$as_me:24595: \"$ac_link\"") >&5
24596   (eval $ac_link) 2>&5
24597   ac_status=$?
24598   echo "$as_me:24598: \$? = $ac_status" >&5
24599   (exit "$ac_status"); } &&
24600          { ac_try='test -s "conftest$ac_exeext"'
24601   { (eval echo "$as_me:24601: \"$ac_try\"") >&5
24602   (eval $ac_try) 2>&5
24603   ac_status=$?
24604   echo "$as_me:24604: \$? = $ac_status" >&5
24605   (exit "$ac_status"); }; }; then
24606   cf_have_libstdcpp=yes
24607 else
24608   echo "$as_me: failed program was:" >&5
24609 cat "conftest.$ac_ext" >&5
24610 cf_have_libstdcpp=no
24611 fi
24612 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24613         echo "$as_me:24613: result: $cf_have_libstdcpp" >&5
24614 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24615         LIBS="$cf_save"
24616
24617         if test "$cf_have_libstdcpp" != yes
24618         then
24619                 case "$cf_cv_system_name" in
24620                 (os2*)
24621                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24622                                 cf_stdcpp_libname=stdcpp
24623                         else
24624                                 cf_stdcpp_libname=stdc++
24625                         fi
24626                         ;;
24627                 (*)
24628                         cf_stdcpp_libname=stdc++
24629                         ;;
24630                 esac
24631
24632                 echo "$as_me:24632: checking for library $cf_stdcpp_libname" >&5
24633 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24634 if test "${cf_cv_libstdcpp+set}" = set; then
24635   echo $ECHO_N "(cached) $ECHO_C" >&6
24636 else
24637
24638                         cf_save="$LIBS"
24639                         LIBS="$LIBS $CXXLIBS"
24640
24641 cf_add_libs="$LIBS"
24642 # reverse order
24643 cf_add_0lib=
24644 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24645 # filter duplicates
24646 for cf_add_1lib in $cf_add_0lib; do
24647         for cf_add_2lib in $cf_add_libs; do
24648                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24649                         cf_add_1lib=
24650                         break
24651                 fi
24652         done
24653         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24654 done
24655 LIBS="$cf_add_libs"
24656
24657                 cat >"conftest.$ac_ext" <<_ACEOF
24658 #line 24658 "configure"
24659 #include "confdefs.h"
24660
24661                                 #include <iostream>
24662 int
24663 main (void)
24664 {
24665
24666                                 std::cout << "Hello World!" << std::endl;
24667   ;
24668   return 0;
24669 }
24670 _ACEOF
24671 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24672 if { (eval echo "$as_me:24672: \"$ac_link\"") >&5
24673   (eval $ac_link) 2>&5
24674   ac_status=$?
24675   echo "$as_me:24675: \$? = $ac_status" >&5
24676   (exit "$ac_status"); } &&
24677          { ac_try='test -s "conftest$ac_exeext"'
24678   { (eval echo "$as_me:24678: \"$ac_try\"") >&5
24679   (eval $ac_try) 2>&5
24680   ac_status=$?
24681   echo "$as_me:24681: \$? = $ac_status" >&5
24682   (exit "$ac_status"); }; }; then
24683   cf_cv_libstdcpp=yes
24684 else
24685   echo "$as_me: failed program was:" >&5
24686 cat "conftest.$ac_ext" >&5
24687 cf_cv_libstdcpp=no
24688 fi
24689 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24690                         LIBS="$cf_save"
24691
24692 fi
24693 echo "$as_me:24693: result: $cf_cv_libstdcpp" >&5
24694 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24695                 test "$cf_cv_libstdcpp" = yes && {
24696 cf_add_libs="$CXXLIBS"
24697 # reverse order
24698 cf_add_0lib=
24699 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24700 # filter duplicates
24701 for cf_add_1lib in $cf_add_0lib; do
24702         for cf_add_2lib in $cf_add_libs; do
24703                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24704                         cf_add_1lib=
24705                         break
24706                 fi
24707         done
24708         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24709 done
24710 CXXLIBS="$cf_add_libs"
24711  }
24712         fi
24713 fi
24714
24715         echo "$as_me:24715: checking whether $CXX understands -c and -o together" >&5
24716 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24717 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24718   echo $ECHO_N "(cached) $ECHO_C" >&6
24719 else
24720
24721 cat > conftest.$ac_ext <<CF_EOF
24722 int main(void)
24723 {
24724         ${cf_cv_main_return:-return}(0);
24725 }
24726 CF_EOF
24727 # We do the test twice because some compilers refuse to overwrite an
24728 # existing .o file with -o, though they will create one.
24729 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24730 if { (eval echo "$as_me:24730: \"$ac_try\"") >&5
24731   (eval $ac_try) 2>&5
24732   ac_status=$?
24733   echo "$as_me:24733: \$? = $ac_status" >&5
24734   (exit "$ac_status"); } &&
24735   test -f conftest2.$ac_objext && { (eval echo "$as_me:24735: \"$ac_try\"") >&5
24736   (eval $ac_try) 2>&5
24737   ac_status=$?
24738   echo "$as_me:24738: \$? = $ac_status" >&5
24739   (exit "$ac_status"); };
24740 then
24741   eval cf_cv_prog_CXX_c_o=yes
24742 else
24743   eval cf_cv_prog_CXX_c_o=no
24744 fi
24745 rm -rf ./conftest*
24746
24747 fi
24748 if test "$cf_cv_prog_CXX_c_o" = yes; then
24749   echo "$as_me:24749: result: yes" >&5
24750 echo "${ECHO_T}yes" >&6
24751 else
24752   echo "$as_me:24752: result: no" >&5
24753 echo "${ECHO_T}no" >&6
24754 fi
24755
24756         case "$GXX_VERSION" in
24757         (1.*|2.[0-6]*|[1-9][0-9].*)
24758                 cf_cxx_library=yes
24759                 ;;
24760         (*-2.7*|2.7*)
24761
24762 cf_cxx_library=unknown
24763 case "$cf_cv_system_name" in
24764 (os2*)
24765         cf_gpp_libname=gpp
24766         ;;
24767 (*)
24768         cf_gpp_libname=g++
24769         ;;
24770 esac
24771 if test "$GXX" = yes; then
24772         echo "$as_me:24772: checking for lib$cf_gpp_libname" >&5
24773 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24774         cf_save="$LIBS"
24775
24776 cf_add_libs="$LIBS"
24777 # reverse order
24778 cf_add_0lib=
24779 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24780 # filter duplicates
24781 for cf_add_1lib in $cf_add_0lib; do
24782         for cf_add_2lib in $cf_add_libs; do
24783                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24784                         cf_add_1lib=
24785                         break
24786                 fi
24787         done
24788         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24789 done
24790 LIBS="$cf_add_libs"
24791
24792         cat >"conftest.$ac_ext" <<_ACEOF
24793 #line 24793 "configure"
24794 #include "confdefs.h"
24795
24796 #include <$cf_gpp_libname/builtin.h>
24797
24798 int
24799 main (void)
24800 {
24801 two_arg_error_handler_t foo2 = lib_error_handler
24802   ;
24803   return 0;
24804 }
24805 _ACEOF
24806 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24807 if { (eval echo "$as_me:24807: \"$ac_link\"") >&5
24808   (eval $ac_link) 2>&5
24809   ac_status=$?
24810   echo "$as_me:24810: \$? = $ac_status" >&5
24811   (exit "$ac_status"); } &&
24812          { ac_try='test -s "conftest$ac_exeext"'
24813   { (eval echo "$as_me:24813: \"$ac_try\"") >&5
24814   (eval $ac_try) 2>&5
24815   ac_status=$?
24816   echo "$as_me:24816: \$? = $ac_status" >&5
24817   (exit "$ac_status"); }; }; then
24818   cf_cxx_library=yes
24819
24820 cf_add_libs="$CXXLIBS"
24821 # reverse order
24822 cf_add_0lib=
24823 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24824 # filter duplicates
24825 for cf_add_1lib in $cf_add_0lib; do
24826         for cf_add_2lib in $cf_add_libs; do
24827                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24828                         cf_add_1lib=
24829                         break
24830                 fi
24831         done
24832         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24833 done
24834 CXXLIBS="$cf_add_libs"
24835
24836          if test "$cf_gpp_libname" = cpp ; then
24837
24838 cat >>confdefs.h <<\EOF
24839 #define HAVE_GPP_BUILTIN_H 1
24840 EOF
24841
24842          else
24843
24844 cat >>confdefs.h <<\EOF
24845 #define HAVE_GXX_BUILTIN_H 1
24846 EOF
24847
24848          fi
24849 else
24850   echo "$as_me: failed program was:" >&5
24851 cat "conftest.$ac_ext" >&5
24852 cat >"conftest.$ac_ext" <<_ACEOF
24853 #line 24853 "configure"
24854 #include "confdefs.h"
24855
24856 #include <builtin.h>
24857
24858 int
24859 main (void)
24860 {
24861 two_arg_error_handler_t foo2 = lib_error_handler
24862   ;
24863   return 0;
24864 }
24865 _ACEOF
24866 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24867 if { (eval echo "$as_me:24867: \"$ac_link\"") >&5
24868   (eval $ac_link) 2>&5
24869   ac_status=$?
24870   echo "$as_me:24870: \$? = $ac_status" >&5
24871   (exit "$ac_status"); } &&
24872          { ac_try='test -s "conftest$ac_exeext"'
24873   { (eval echo "$as_me:24873: \"$ac_try\"") >&5
24874   (eval $ac_try) 2>&5
24875   ac_status=$?
24876   echo "$as_me:24876: \$? = $ac_status" >&5
24877   (exit "$ac_status"); }; }; then
24878   cf_cxx_library=yes
24879
24880 cf_add_libs="$CXXLIBS"
24881 # reverse order
24882 cf_add_0lib=
24883 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24884 # filter duplicates
24885 for cf_add_1lib in $cf_add_0lib; do
24886         for cf_add_2lib in $cf_add_libs; do
24887                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24888                         cf_add_1lib=
24889                         break
24890                 fi
24891         done
24892         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24893 done
24894 CXXLIBS="$cf_add_libs"
24895
24896 cat >>confdefs.h <<\EOF
24897 #define HAVE_BUILTIN_H 1
24898 EOF
24899
24900 else
24901   echo "$as_me: failed program was:" >&5
24902 cat "conftest.$ac_ext" >&5
24903 cf_cxx_library=no
24904 fi
24905 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24906 fi
24907 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24908         LIBS="$cf_save"
24909         echo "$as_me:24909: result: $cf_cxx_library" >&5
24910 echo "${ECHO_T}$cf_cxx_library" >&6
24911 fi
24912
24913                 ;;
24914         (*)
24915                 cf_cxx_library=no
24916                 ;;
24917         esac
24918
24919         ac_ext=cc
24920 ac_cpp='$CXXCPP $CPPFLAGS'
24921 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24922 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24923 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24924 ac_main_return="return"
24925 echo "$as_me:24925: checking how to run the C++ preprocessor" >&5
24926 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24927 if test -z "$CXXCPP"; then
24928   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24929   echo $ECHO_N "(cached) $ECHO_C" >&6
24930 else
24931       # Double quotes because CXXCPP needs to be expanded
24932     for CXXCPP in "$CXX -E" "/lib/cpp"
24933     do
24934       ac_preproc_ok=false
24935 for ac_cxx_preproc_warn_flag in '' yes
24936 do
24937   # Use a header file that comes with gcc, so configuring glibc
24938   # with a fresh cross-compiler works.
24939   # On the NeXT, cc -E runs the code through the compiler's parser,
24940   # not just through cpp. "Syntax error" is here to catch this case.
24941   cat >"conftest.$ac_ext" <<_ACEOF
24942 #line 24942 "configure"
24943 #include "confdefs.h"
24944 #include <assert.h>
24945                      Syntax error
24946 _ACEOF
24947 if { (eval echo "$as_me:24947: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24948   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24949   ac_status=$?
24950   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24951   rm -f conftest.er1
24952   cat conftest.err >&5
24953   echo "$as_me:24953: \$? = $ac_status" >&5
24954   (exit "$ac_status"); } >/dev/null; then
24955   if test -s conftest.err; then
24956     ac_cpp_err=$ac_cxx_preproc_warn_flag
24957   else
24958     ac_cpp_err=
24959   fi
24960 else
24961   ac_cpp_err=yes
24962 fi
24963 if test -z "$ac_cpp_err"; then
24964   :
24965 else
24966   echo "$as_me: failed program was:" >&5
24967   cat "conftest.$ac_ext" >&5
24968   # Broken: fails on valid input.
24969 continue
24970 fi
24971 rm -f conftest.err "conftest.$ac_ext"
24972
24973   # OK, works on sane cases.  Now check whether non-existent headers
24974   # can be detected and how.
24975   cat >"conftest.$ac_ext" <<_ACEOF
24976 #line 24976 "configure"
24977 #include "confdefs.h"
24978 #include <ac_nonexistent.h>
24979 _ACEOF
24980 if { (eval echo "$as_me:24980: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24981   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24982   ac_status=$?
24983   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24984   rm -f conftest.er1
24985   cat conftest.err >&5
24986   echo "$as_me:24986: \$? = $ac_status" >&5
24987   (exit "$ac_status"); } >/dev/null; then
24988   if test -s conftest.err; then
24989     ac_cpp_err=$ac_cxx_preproc_warn_flag
24990   else
24991     ac_cpp_err=
24992   fi
24993 else
24994   ac_cpp_err=yes
24995 fi
24996 if test -z "$ac_cpp_err"; then
24997   # Broken: success on invalid input.
24998 continue
24999 else
25000   echo "$as_me: failed program was:" >&5
25001   cat "conftest.$ac_ext" >&5
25002   # Passes both tests.
25003 ac_preproc_ok=:
25004 break
25005 fi
25006 rm -f conftest.err "conftest.$ac_ext"
25007
25008 done
25009 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25010 rm -f conftest.err "conftest.$ac_ext"
25011 if $ac_preproc_ok; then
25012   break
25013 fi
25014
25015     done
25016     ac_cv_prog_CXXCPP=$CXXCPP
25017
25018 fi
25019   CXXCPP=$ac_cv_prog_CXXCPP
25020 else
25021   ac_cv_prog_CXXCPP=$CXXCPP
25022 fi
25023 echo "$as_me:25023: result: $CXXCPP" >&5
25024 echo "${ECHO_T}$CXXCPP" >&6
25025 ac_preproc_ok=false
25026 for ac_cxx_preproc_warn_flag in '' yes
25027 do
25028   # Use a header file that comes with gcc, so configuring glibc
25029   # with a fresh cross-compiler works.
25030   # On the NeXT, cc -E runs the code through the compiler's parser,
25031   # not just through cpp. "Syntax error" is here to catch this case.
25032   cat >"conftest.$ac_ext" <<_ACEOF
25033 #line 25033 "configure"
25034 #include "confdefs.h"
25035 #include <assert.h>
25036                      Syntax error
25037 _ACEOF
25038 if { (eval echo "$as_me:25038: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25039   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25040   ac_status=$?
25041   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25042   rm -f conftest.er1
25043   cat conftest.err >&5
25044   echo "$as_me:25044: \$? = $ac_status" >&5
25045   (exit "$ac_status"); } >/dev/null; then
25046   if test -s conftest.err; then
25047     ac_cpp_err=$ac_cxx_preproc_warn_flag
25048   else
25049     ac_cpp_err=
25050   fi
25051 else
25052   ac_cpp_err=yes
25053 fi
25054 if test -z "$ac_cpp_err"; then
25055   :
25056 else
25057   echo "$as_me: failed program was:" >&5
25058   cat "conftest.$ac_ext" >&5
25059   # Broken: fails on valid input.
25060 continue
25061 fi
25062 rm -f conftest.err "conftest.$ac_ext"
25063
25064   # OK, works on sane cases.  Now check whether non-existent headers
25065   # can be detected and how.
25066   cat >"conftest.$ac_ext" <<_ACEOF
25067 #line 25067 "configure"
25068 #include "confdefs.h"
25069 #include <ac_nonexistent.h>
25070 _ACEOF
25071 if { (eval echo "$as_me:25071: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25072   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25073   ac_status=$?
25074   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25075   rm -f conftest.er1
25076   cat conftest.err >&5
25077   echo "$as_me:25077: \$? = $ac_status" >&5
25078   (exit "$ac_status"); } >/dev/null; then
25079   if test -s conftest.err; then
25080     ac_cpp_err=$ac_cxx_preproc_warn_flag
25081   else
25082     ac_cpp_err=
25083   fi
25084 else
25085   ac_cpp_err=yes
25086 fi
25087 if test -z "$ac_cpp_err"; then
25088   # Broken: success on invalid input.
25089 continue
25090 else
25091   echo "$as_me: failed program was:" >&5
25092   cat "conftest.$ac_ext" >&5
25093   # Passes both tests.
25094 ac_preproc_ok=:
25095 break
25096 fi
25097 rm -f conftest.err "conftest.$ac_ext"
25098
25099 done
25100 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25101 rm -f conftest.err "conftest.$ac_ext"
25102 if $ac_preproc_ok; then
25103   :
25104 else
25105   { { echo "$as_me:25105: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25106 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25107    { (exit 1); exit 1; }; }
25108 fi
25109
25110 ac_ext=cc
25111 ac_cpp='$CXXCPP $CPPFLAGS'
25112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25113 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25115 ac_main_return="return"
25116
25117 for ac_header in typeinfo
25118 do
25119 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25120 echo "$as_me:25120: checking for $ac_header" >&5
25121 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25122 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25123   echo $ECHO_N "(cached) $ECHO_C" >&6
25124 else
25125   cat >"conftest.$ac_ext" <<_ACEOF
25126 #line 25126 "configure"
25127 #include "confdefs.h"
25128 #include <$ac_header>
25129 _ACEOF
25130 if { (eval echo "$as_me:25130: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25131   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25132   ac_status=$?
25133   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25134   rm -f conftest.er1
25135   cat conftest.err >&5
25136   echo "$as_me:25136: \$? = $ac_status" >&5
25137   (exit "$ac_status"); } >/dev/null; then
25138   if test -s conftest.err; then
25139     ac_cpp_err=$ac_cxx_preproc_warn_flag
25140   else
25141     ac_cpp_err=
25142   fi
25143 else
25144   ac_cpp_err=yes
25145 fi
25146 if test -z "$ac_cpp_err"; then
25147   eval "$as_ac_Header=yes"
25148 else
25149   echo "$as_me: failed program was:" >&5
25150   cat "conftest.$ac_ext" >&5
25151   eval "$as_ac_Header=no"
25152 fi
25153 rm -f conftest.err "conftest.$ac_ext"
25154 fi
25155 echo "$as_me:25155: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25156 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25157 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25158   cat >>confdefs.h <<EOF
25159 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25160 EOF
25161
25162 fi
25163 done
25164
25165 for ac_header in iostream
25166 do
25167 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25168 echo "$as_me:25168: checking for $ac_header" >&5
25169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25171   echo $ECHO_N "(cached) $ECHO_C" >&6
25172 else
25173   cat >"conftest.$ac_ext" <<_ACEOF
25174 #line 25174 "configure"
25175 #include "confdefs.h"
25176 #include <$ac_header>
25177 _ACEOF
25178 if { (eval echo "$as_me:25178: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25179   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25180   ac_status=$?
25181   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25182   rm -f conftest.er1
25183   cat conftest.err >&5
25184   echo "$as_me:25184: \$? = $ac_status" >&5
25185   (exit "$ac_status"); } >/dev/null; then
25186   if test -s conftest.err; then
25187     ac_cpp_err=$ac_cxx_preproc_warn_flag
25188   else
25189     ac_cpp_err=
25190   fi
25191 else
25192   ac_cpp_err=yes
25193 fi
25194 if test -z "$ac_cpp_err"; then
25195   eval "$as_ac_Header=yes"
25196 else
25197   echo "$as_me: failed program was:" >&5
25198   cat "conftest.$ac_ext" >&5
25199   eval "$as_ac_Header=no"
25200 fi
25201 rm -f conftest.err "conftest.$ac_ext"
25202 fi
25203 echo "$as_me:25203: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25204 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25205 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25206   cat >>confdefs.h <<EOF
25207 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25208 EOF
25209
25210 fi
25211 done
25212
25213 if test x"$ac_cv_header_iostream" = xyes ; then
25214         echo "$as_me:25214: checking if iostream uses std-namespace" >&5
25215 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25216         cat >"conftest.$ac_ext" <<_ACEOF
25217 #line 25217 "configure"
25218 #include "confdefs.h"
25219
25220 #include <iostream>
25221 using std::endl;
25222 using std::cerr;
25223 int
25224 main (void)
25225 {
25226
25227 cerr << "testing" << endl;
25228
25229   ;
25230   return 0;
25231 }
25232 _ACEOF
25233 rm -f "conftest.$ac_objext"
25234 if { (eval echo "$as_me:25234: \"$ac_compile\"") >&5
25235   (eval $ac_compile) 2>&5
25236   ac_status=$?
25237   echo "$as_me:25237: \$? = $ac_status" >&5
25238   (exit "$ac_status"); } &&
25239          { ac_try='test -s "conftest.$ac_objext"'
25240   { (eval echo "$as_me:25240: \"$ac_try\"") >&5
25241   (eval $ac_try) 2>&5
25242   ac_status=$?
25243   echo "$as_me:25243: \$? = $ac_status" >&5
25244   (exit "$ac_status"); }; }; then
25245   cf_iostream_namespace=yes
25246 else
25247   echo "$as_me: failed program was:" >&5
25248 cat "conftest.$ac_ext" >&5
25249 cf_iostream_namespace=no
25250 fi
25251 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25252         echo "$as_me:25252: result: $cf_iostream_namespace" >&5
25253 echo "${ECHO_T}$cf_iostream_namespace" >&6
25254         if test "$cf_iostream_namespace" = yes ; then
25255
25256 cat >>confdefs.h <<\EOF
25257 #define IOSTREAM_NAMESPACE 1
25258 EOF
25259
25260         fi
25261 fi
25262
25263 echo "$as_me:25263: checking if we should include stdbool.h" >&5
25264 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25265
25266 if test "${cf_cv_header_stdbool_h+set}" = set; then
25267   echo $ECHO_N "(cached) $ECHO_C" >&6
25268 else
25269
25270         cat >"conftest.$ac_ext" <<_ACEOF
25271 #line 25271 "configure"
25272 #include "confdefs.h"
25273
25274 int
25275 main (void)
25276 {
25277 bool foo = false
25278   ;
25279   return 0;
25280 }
25281 _ACEOF
25282 rm -f "conftest.$ac_objext"
25283 if { (eval echo "$as_me:25283: \"$ac_compile\"") >&5
25284   (eval $ac_compile) 2>&5
25285   ac_status=$?
25286   echo "$as_me:25286: \$? = $ac_status" >&5
25287   (exit "$ac_status"); } &&
25288          { ac_try='test -s "conftest.$ac_objext"'
25289   { (eval echo "$as_me:25289: \"$ac_try\"") >&5
25290   (eval $ac_try) 2>&5
25291   ac_status=$?
25292   echo "$as_me:25292: \$? = $ac_status" >&5
25293   (exit "$ac_status"); }; }; then
25294   cf_cv_header_stdbool_h=0
25295 else
25296   echo "$as_me: failed program was:" >&5
25297 cat "conftest.$ac_ext" >&5
25298 cat >"conftest.$ac_ext" <<_ACEOF
25299 #line 25299 "configure"
25300 #include "confdefs.h"
25301
25302 #ifndef __BEOS__
25303 #include <stdbool.h>
25304 #endif
25305
25306 int
25307 main (void)
25308 {
25309 bool foo = false
25310   ;
25311   return 0;
25312 }
25313 _ACEOF
25314 rm -f "conftest.$ac_objext"
25315 if { (eval echo "$as_me:25315: \"$ac_compile\"") >&5
25316   (eval $ac_compile) 2>&5
25317   ac_status=$?
25318   echo "$as_me:25318: \$? = $ac_status" >&5
25319   (exit "$ac_status"); } &&
25320          { ac_try='test -s "conftest.$ac_objext"'
25321   { (eval echo "$as_me:25321: \"$ac_try\"") >&5
25322   (eval $ac_try) 2>&5
25323   ac_status=$?
25324   echo "$as_me:25324: \$? = $ac_status" >&5
25325   (exit "$ac_status"); }; }; then
25326   cf_cv_header_stdbool_h=1
25327 else
25328   echo "$as_me: failed program was:" >&5
25329 cat "conftest.$ac_ext" >&5
25330 cf_cv_header_stdbool_h=0
25331 fi
25332 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25333 fi
25334 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25335 fi
25336
25337 if test "$cf_cv_header_stdbool_h" = 1
25338 then    echo "$as_me:25338: result: yes" >&5
25339 echo "${ECHO_T}yes" >&6
25340 else    echo "$as_me:25340: result: no" >&5
25341 echo "${ECHO_T}no" >&6
25342 fi
25343
25344 echo "$as_me:25344: checking for builtin bool type" >&5
25345 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25346
25347 if test "${cf_cv_builtin_bool+set}" = set; then
25348   echo $ECHO_N "(cached) $ECHO_C" >&6
25349 else
25350
25351         cat >"conftest.$ac_ext" <<_ACEOF
25352 #line 25352 "configure"
25353 #include "confdefs.h"
25354
25355 #include <stdio.h>
25356 #include <sys/types.h>
25357
25358 int
25359 main (void)
25360 {
25361 bool x = false
25362   ;
25363   return 0;
25364 }
25365 _ACEOF
25366 rm -f "conftest.$ac_objext"
25367 if { (eval echo "$as_me:25367: \"$ac_compile\"") >&5
25368   (eval $ac_compile) 2>&5
25369   ac_status=$?
25370   echo "$as_me:25370: \$? = $ac_status" >&5
25371   (exit "$ac_status"); } &&
25372          { ac_try='test -s "conftest.$ac_objext"'
25373   { (eval echo "$as_me:25373: \"$ac_try\"") >&5
25374   (eval $ac_try) 2>&5
25375   ac_status=$?
25376   echo "$as_me:25376: \$? = $ac_status" >&5
25377   (exit "$ac_status"); }; }; then
25378   cf_cv_builtin_bool=1
25379 else
25380   echo "$as_me: failed program was:" >&5
25381 cat "conftest.$ac_ext" >&5
25382 cf_cv_builtin_bool=0
25383 fi
25384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25385
25386 fi
25387
25388 if test "$cf_cv_builtin_bool" = 1
25389 then    echo "$as_me:25389: result: yes" >&5
25390 echo "${ECHO_T}yes" >&6
25391 else    echo "$as_me:25391: result: no" >&5
25392 echo "${ECHO_T}no" >&6
25393 fi
25394
25395 echo "$as_me:25395: checking for bool" >&5
25396 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25397 if test "${ac_cv_type_bool+set}" = set; then
25398   echo $ECHO_N "(cached) $ECHO_C" >&6
25399 else
25400   cat >"conftest.$ac_ext" <<_ACEOF
25401 #line 25401 "configure"
25402 #include "confdefs.h"
25403
25404 #include <stdlib.h>
25405 #include <stdio.h>
25406
25407 #if defined(__cplusplus)
25408
25409 #ifdef HAVE_GXX_BUILTIN_H
25410 #include <g++/builtin.h>
25411 #elif HAVE_GPP_BUILTIN_H
25412 #include <gpp/builtin.h>
25413 #elif HAVE_BUILTIN_H
25414 #include <builtin.h>
25415 #endif
25416
25417 #else
25418
25419 #if $cf_cv_header_stdbool_h
25420 #include <stdbool.h>
25421 #endif
25422
25423 #endif
25424
25425 int
25426 main (void)
25427 {
25428 if ((bool *) 0)
25429   return 0;
25430 if (sizeof (bool))
25431   return 0;
25432   ;
25433   return 0;
25434 }
25435 _ACEOF
25436 rm -f "conftest.$ac_objext"
25437 if { (eval echo "$as_me:25437: \"$ac_compile\"") >&5
25438   (eval $ac_compile) 2>&5
25439   ac_status=$?
25440   echo "$as_me:25440: \$? = $ac_status" >&5
25441   (exit "$ac_status"); } &&
25442          { ac_try='test -s "conftest.$ac_objext"'
25443   { (eval echo "$as_me:25443: \"$ac_try\"") >&5
25444   (eval $ac_try) 2>&5
25445   ac_status=$?
25446   echo "$as_me:25446: \$? = $ac_status" >&5
25447   (exit "$ac_status"); }; }; then
25448   ac_cv_type_bool=yes
25449 else
25450   echo "$as_me: failed program was:" >&5
25451 cat "conftest.$ac_ext" >&5
25452 ac_cv_type_bool=no
25453 fi
25454 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25455 fi
25456 echo "$as_me:25456: result: $ac_cv_type_bool" >&5
25457 echo "${ECHO_T}$ac_cv_type_bool" >&6
25458
25459 echo "$as_me:25459: checking size of bool" >&5
25460 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25461 if test "${ac_cv_sizeof_bool+set}" = set; then
25462   echo $ECHO_N "(cached) $ECHO_C" >&6
25463 else
25464   if test "$ac_cv_type_bool" = yes; then
25465   if test "$cross_compiling" = yes; then
25466   # Depending upon the size, compute the lo and hi bounds.
25467 cat >"conftest.$ac_ext" <<_ACEOF
25468 #line 25468 "configure"
25469 #include "confdefs.h"
25470
25471 #include <stdlib.h>
25472 #include <stdio.h>
25473
25474 #if defined(__cplusplus)
25475
25476 #ifdef HAVE_GXX_BUILTIN_H
25477 #include <g++/builtin.h>
25478 #elif HAVE_GPP_BUILTIN_H
25479 #include <gpp/builtin.h>
25480 #elif HAVE_BUILTIN_H
25481 #include <builtin.h>
25482 #endif
25483
25484 #else
25485
25486 #if $cf_cv_header_stdbool_h
25487 #include <stdbool.h>
25488 #endif
25489
25490 #endif
25491
25492 int
25493 main (void)
25494 {
25495 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25496   ;
25497   return 0;
25498 }
25499 _ACEOF
25500 rm -f "conftest.$ac_objext"
25501 if { (eval echo "$as_me:25501: \"$ac_compile\"") >&5
25502   (eval $ac_compile) 2>&5
25503   ac_status=$?
25504   echo "$as_me:25504: \$? = $ac_status" >&5
25505   (exit "$ac_status"); } &&
25506          { ac_try='test -s "conftest.$ac_objext"'
25507   { (eval echo "$as_me:25507: \"$ac_try\"") >&5
25508   (eval $ac_try) 2>&5
25509   ac_status=$?
25510   echo "$as_me:25510: \$? = $ac_status" >&5
25511   (exit "$ac_status"); }; }; then
25512   ac_lo=0 ac_mid=0
25513   while :; do
25514     cat >"conftest.$ac_ext" <<_ACEOF
25515 #line 25515 "configure"
25516 #include "confdefs.h"
25517
25518 #include <stdlib.h>
25519 #include <stdio.h>
25520
25521 #if defined(__cplusplus)
25522
25523 #ifdef HAVE_GXX_BUILTIN_H
25524 #include <g++/builtin.h>
25525 #elif HAVE_GPP_BUILTIN_H
25526 #include <gpp/builtin.h>
25527 #elif HAVE_BUILTIN_H
25528 #include <builtin.h>
25529 #endif
25530
25531 #else
25532
25533 #if $cf_cv_header_stdbool_h
25534 #include <stdbool.h>
25535 #endif
25536
25537 #endif
25538
25539 int
25540 main (void)
25541 {
25542 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25543   ;
25544   return 0;
25545 }
25546 _ACEOF
25547 rm -f "conftest.$ac_objext"
25548 if { (eval echo "$as_me:25548: \"$ac_compile\"") >&5
25549   (eval $ac_compile) 2>&5
25550   ac_status=$?
25551   echo "$as_me:25551: \$? = $ac_status" >&5
25552   (exit "$ac_status"); } &&
25553          { ac_try='test -s "conftest.$ac_objext"'
25554   { (eval echo "$as_me:25554: \"$ac_try\"") >&5
25555   (eval $ac_try) 2>&5
25556   ac_status=$?
25557   echo "$as_me:25557: \$? = $ac_status" >&5
25558   (exit "$ac_status"); }; }; then
25559   ac_hi=$ac_mid; break
25560 else
25561   echo "$as_me: failed program was:" >&5
25562 cat "conftest.$ac_ext" >&5
25563 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25564 fi
25565 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25566   done
25567 else
25568   echo "$as_me: failed program was:" >&5
25569 cat "conftest.$ac_ext" >&5
25570 ac_hi=-1 ac_mid=-1
25571   while :; do
25572     cat >"conftest.$ac_ext" <<_ACEOF
25573 #line 25573 "configure"
25574 #include "confdefs.h"
25575
25576 #include <stdlib.h>
25577 #include <stdio.h>
25578
25579 #if defined(__cplusplus)
25580
25581 #ifdef HAVE_GXX_BUILTIN_H
25582 #include <g++/builtin.h>
25583 #elif HAVE_GPP_BUILTIN_H
25584 #include <gpp/builtin.h>
25585 #elif HAVE_BUILTIN_H
25586 #include <builtin.h>
25587 #endif
25588
25589 #else
25590
25591 #if $cf_cv_header_stdbool_h
25592 #include <stdbool.h>
25593 #endif
25594
25595 #endif
25596
25597 int
25598 main (void)
25599 {
25600 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25601   ;
25602   return 0;
25603 }
25604 _ACEOF
25605 rm -f "conftest.$ac_objext"
25606 if { (eval echo "$as_me:25606: \"$ac_compile\"") >&5
25607   (eval $ac_compile) 2>&5
25608   ac_status=$?
25609   echo "$as_me:25609: \$? = $ac_status" >&5
25610   (exit "$ac_status"); } &&
25611          { ac_try='test -s "conftest.$ac_objext"'
25612   { (eval echo "$as_me:25612: \"$ac_try\"") >&5
25613   (eval $ac_try) 2>&5
25614   ac_status=$?
25615   echo "$as_me:25615: \$? = $ac_status" >&5
25616   (exit "$ac_status"); }; }; then
25617   ac_lo=$ac_mid; break
25618 else
25619   echo "$as_me: failed program was:" >&5
25620 cat "conftest.$ac_ext" >&5
25621 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25622 fi
25623 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25624   done
25625 fi
25626 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25627 # Binary search between lo and hi bounds.
25628 while test "x$ac_lo" != "x$ac_hi"; do
25629   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25630   cat >"conftest.$ac_ext" <<_ACEOF
25631 #line 25631 "configure"
25632 #include "confdefs.h"
25633
25634 #include <stdlib.h>
25635 #include <stdio.h>
25636
25637 #if defined(__cplusplus)
25638
25639 #ifdef HAVE_GXX_BUILTIN_H
25640 #include <g++/builtin.h>
25641 #elif HAVE_GPP_BUILTIN_H
25642 #include <gpp/builtin.h>
25643 #elif HAVE_BUILTIN_H
25644 #include <builtin.h>
25645 #endif
25646
25647 #else
25648
25649 #if $cf_cv_header_stdbool_h
25650 #include <stdbool.h>
25651 #endif
25652
25653 #endif
25654
25655 int
25656 main (void)
25657 {
25658 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25659   ;
25660   return 0;
25661 }
25662 _ACEOF
25663 rm -f "conftest.$ac_objext"
25664 if { (eval echo "$as_me:25664: \"$ac_compile\"") >&5
25665   (eval $ac_compile) 2>&5
25666   ac_status=$?
25667   echo "$as_me:25667: \$? = $ac_status" >&5
25668   (exit "$ac_status"); } &&
25669          { ac_try='test -s "conftest.$ac_objext"'
25670   { (eval echo "$as_me:25670: \"$ac_try\"") >&5
25671   (eval $ac_try) 2>&5
25672   ac_status=$?
25673   echo "$as_me:25673: \$? = $ac_status" >&5
25674   (exit "$ac_status"); }; }; then
25675   ac_hi=$ac_mid
25676 else
25677   echo "$as_me: failed program was:" >&5
25678 cat "conftest.$ac_ext" >&5
25679 ac_lo=`expr "$ac_mid" + 1`
25680 fi
25681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25682 done
25683 ac_cv_sizeof_bool=$ac_lo
25684 else
25685   if test "$cross_compiling" = yes; then
25686   { { echo "$as_me:25686: error: cannot run test program while cross compiling" >&5
25687 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25688    { (exit 1); exit 1; }; }
25689 else
25690   cat >"conftest.$ac_ext" <<_ACEOF
25691 #line 25691 "configure"
25692 #include "confdefs.h"
25693
25694 #include <stdlib.h>
25695 #include <stdio.h>
25696
25697 #if defined(__cplusplus)
25698
25699 #ifdef HAVE_GXX_BUILTIN_H
25700 #include <g++/builtin.h>
25701 #elif HAVE_GPP_BUILTIN_H
25702 #include <gpp/builtin.h>
25703 #elif HAVE_BUILTIN_H
25704 #include <builtin.h>
25705 #endif
25706
25707 #else
25708
25709 #if $cf_cv_header_stdbool_h
25710 #include <stdbool.h>
25711 #endif
25712
25713 #endif
25714
25715 int
25716 main (void)
25717 {
25718 FILE *f = fopen ("conftest.val", "w");
25719 if (!f)
25720   $ac_main_return (1);
25721 fprintf (f, "%ld", (long)(sizeof (bool)));
25722 fclose (f);
25723   ;
25724   return 0;
25725 }
25726 _ACEOF
25727 rm -f "conftest$ac_exeext"
25728 if { (eval echo "$as_me:25728: \"$ac_link\"") >&5
25729   (eval $ac_link) 2>&5
25730   ac_status=$?
25731   echo "$as_me:25731: \$? = $ac_status" >&5
25732   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25733   { (eval echo "$as_me:25733: \"$ac_try\"") >&5
25734   (eval $ac_try) 2>&5
25735   ac_status=$?
25736   echo "$as_me:25736: \$? = $ac_status" >&5
25737   (exit "$ac_status"); }; }; then
25738   ac_cv_sizeof_bool=`cat conftest.val`
25739 else
25740   echo "$as_me: program exited with status $ac_status" >&5
25741 echo "$as_me: failed program was:" >&5
25742 cat "conftest.$ac_ext" >&5
25743 fi
25744 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25745 fi
25746 fi
25747 rm -f conftest.val
25748 else
25749   ac_cv_sizeof_bool=0
25750 fi
25751 fi
25752 echo "$as_me:25752: result: $ac_cv_sizeof_bool" >&5
25753 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25754 cat >>confdefs.h <<EOF
25755 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25756 EOF
25757
25758 echo "$as_me:25758: checking for type of bool" >&5
25759 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25760 if test "${cf_cv_type_of_bool+set}" = set; then
25761   echo $ECHO_N "(cached) $ECHO_C" >&6
25762 else
25763
25764         rm -f cf_test.out
25765         if test "$cross_compiling" = yes; then
25766
25767                 case x$ac_cv_sizeof_bool in
25768                 (x1) cf_cv_type_of_bool="unsigned char";;
25769                 (x2) cf_cv_type_of_bool="unsigned short";;
25770                 (x4) cf_cv_type_of_bool="unsigned int";;
25771                 (x8) cf_cv_type_of_bool="unsigned long";;
25772                 (*)  cf_cv_type_of_bool=unknown;;
25773                 esac
25774
25775 else
25776   cat >"conftest.$ac_ext" <<_ACEOF
25777 #line 25777 "configure"
25778 #include "confdefs.h"
25779
25780 #include <stdlib.h>
25781 #include <stdio.h>
25782
25783 #if defined(__cplusplus)
25784
25785 #ifdef HAVE_GXX_BUILTIN_H
25786 #include <g++/builtin.h>
25787 #elif HAVE_GPP_BUILTIN_H
25788 #include <gpp/builtin.h>
25789 #elif HAVE_BUILTIN_H
25790 #include <builtin.h>
25791 #endif
25792
25793 #else
25794
25795 #if $cf_cv_header_stdbool_h
25796 #include <stdbool.h>
25797 #endif
25798
25799 #endif
25800
25801 int main(void)
25802 {
25803         FILE *fp = fopen("cf_test.out", "w");
25804         if (fp != 0) {
25805                 bool x = true;
25806                 if ((bool)(-x) >= 0)
25807                         fputs("unsigned ", fp);
25808                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25809                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25810                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25811                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25812                 fclose(fp);
25813         }
25814         ${cf_cv_main_return:-return}(0);
25815 }
25816
25817 _ACEOF
25818 rm -f "conftest$ac_exeext"
25819 if { (eval echo "$as_me:25819: \"$ac_link\"") >&5
25820   (eval $ac_link) 2>&5
25821   ac_status=$?
25822   echo "$as_me:25822: \$? = $ac_status" >&5
25823   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25824   { (eval echo "$as_me:25824: \"$ac_try\"") >&5
25825   (eval $ac_try) 2>&5
25826   ac_status=$?
25827   echo "$as_me:25827: \$? = $ac_status" >&5
25828   (exit "$ac_status"); }; }; then
25829   cf_cv_type_of_bool=`cat cf_test.out`
25830                  if test -z "$cf_cv_type_of_bool"; then
25831                    cf_cv_type_of_bool=unknown
25832                  fi
25833 else
25834   echo "$as_me: program exited with status $ac_status" >&5
25835 echo "$as_me: failed program was:" >&5
25836 cat "conftest.$ac_ext" >&5
25837 cf_cv_type_of_bool=unknown
25838 fi
25839 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25840 fi
25841         rm -f cf_test.out
25842
25843 fi
25844 echo "$as_me:25844: result: $cf_cv_type_of_bool" >&5
25845 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25846
25847 if test "$cf_cv_type_of_bool" = unknown ; then
25848         case .$NCURSES_BOOL in
25849         (.auto|.) NCURSES_BOOL=unsigned;;
25850         esac
25851         { echo "$as_me:25851: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25852 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25853         cf_cv_type_of_bool=$NCURSES_BOOL
25854 fi
25855
25856 echo "$as_me:25856: checking for special defines needed for etip.h" >&5
25857 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25858 cf_save_CXXFLAGS="$CXXFLAGS"
25859 cf_result="none"
25860
25861 # etip.h includes ncurses.h which includes ncurses_dll.h
25862 # But ncurses_dll.h is generated - fix here.
25863 test -d include || mkdir include
25864 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
25865
25866 for cf_math in "" MATH_H
25867 do
25868 for cf_excp in "" MATH_EXCEPTION
25869 do
25870         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25871         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25872         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25873 cat >"conftest.$ac_ext" <<_ACEOF
25874 #line 25874 "configure"
25875 #include "confdefs.h"
25876
25877 #include <etip.h.in>
25878
25879 int
25880 main (void)
25881 {
25882
25883   ;
25884   return 0;
25885 }
25886 _ACEOF
25887 rm -f "conftest.$ac_objext"
25888 if { (eval echo "$as_me:25888: \"$ac_compile\"") >&5
25889   (eval $ac_compile) 2>&5
25890   ac_status=$?
25891   echo "$as_me:25891: \$? = $ac_status" >&5
25892   (exit "$ac_status"); } &&
25893          { ac_try='test -s "conftest.$ac_objext"'
25894   { (eval echo "$as_me:25894: \"$ac_try\"") >&5
25895   (eval $ac_try) 2>&5
25896   ac_status=$?
25897   echo "$as_me:25897: \$? = $ac_status" >&5
25898   (exit "$ac_status"); }; }; then
25899
25900         test -n "$cf_math" && cat >>confdefs.h <<EOF
25901 #define ETIP_NEEDS_${cf_math} 1
25902 EOF
25903
25904         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25905 #define ETIP_NEEDS_${cf_excp} 1
25906 EOF
25907
25908         cf_result="$cf_math $cf_excp"
25909         break 2
25910
25911 else
25912   echo "$as_me: failed program was:" >&5
25913 cat "conftest.$ac_ext" >&5
25914 fi
25915 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25916 done
25917 done
25918 echo "$as_me:25918: result: $cf_result" >&5
25919 echo "${ECHO_T}$cf_result" >&6
25920 CXXFLAGS="$cf_save_CXXFLAGS"
25921
25922 if test -n "$CXX"; then
25923 echo "$as_me:25923: checking if $CXX accepts parameter initialization" >&5
25924 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25925 if test "${cf_cv_cpp_param_init+set}" = set; then
25926   echo $ECHO_N "(cached) $ECHO_C" >&6
25927 else
25928
25929         ac_ext=cc
25930 ac_cpp='$CXXCPP $CPPFLAGS'
25931 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25932 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25933 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25934 ac_main_return="return"
25935
25936         if test "$cross_compiling" = yes; then
25937   cf_cv_cpp_param_init=unknown
25938 else
25939   cat >"conftest.$ac_ext" <<_ACEOF
25940 #line 25940 "configure"
25941 #include "confdefs.h"
25942
25943 class TEST {
25944 private:
25945         int value;
25946 public:
25947         TEST(int x = 1);
25948         ~TEST();
25949 };
25950
25951 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25952 {
25953         value = x;
25954 }
25955 int main(void) { }
25956
25957 _ACEOF
25958 rm -f "conftest$ac_exeext"
25959 if { (eval echo "$as_me:25959: \"$ac_link\"") >&5
25960   (eval $ac_link) 2>&5
25961   ac_status=$?
25962   echo "$as_me:25962: \$? = $ac_status" >&5
25963   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25964   { (eval echo "$as_me:25964: \"$ac_try\"") >&5
25965   (eval $ac_try) 2>&5
25966   ac_status=$?
25967   echo "$as_me:25967: \$? = $ac_status" >&5
25968   (exit "$ac_status"); }; }; then
25969   cf_cv_cpp_param_init=yes
25970 else
25971   echo "$as_me: program exited with status $ac_status" >&5
25972 echo "$as_me: failed program was:" >&5
25973 cat "conftest.$ac_ext" >&5
25974 cf_cv_cpp_param_init=no
25975 fi
25976 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25977 fi
25978         ac_ext=cc
25979 ac_cpp='$CXXCPP $CPPFLAGS'
25980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25981 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25983 ac_main_return="return"
25984
25985 fi
25986 echo "$as_me:25986: result: $cf_cv_cpp_param_init" >&5
25987 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25988 fi
25989 test "$cf_cv_cpp_param_init" = yes &&
25990 cat >>confdefs.h <<\EOF
25991 #define CPP_HAS_PARAM_INIT 1
25992 EOF
25993
25994 if test -n "$CXX"; then
25995
25996 echo "$as_me:25996: checking if $CXX accepts static_cast" >&5
25997 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25998 if test "${cf_cv_cpp_static_cast+set}" = set; then
25999   echo $ECHO_N "(cached) $ECHO_C" >&6
26000 else
26001
26002         ac_ext=cc
26003 ac_cpp='$CXXCPP $CPPFLAGS'
26004 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26005 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26006 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26007 ac_main_return="return"
26008
26009         cat >"conftest.$ac_ext" <<_ACEOF
26010 #line 26010 "configure"
26011 #include "confdefs.h"
26012
26013 class NCursesPanel
26014 {
26015 public:
26016   NCursesPanel(int nlines,
26017                int ncols,
26018                int begin_y = 0,
26019                int begin_x = 0)
26020   {
26021   }
26022   NCursesPanel();
26023   ~NCursesPanel();
26024 };
26025
26026 template<class T> class NCursesUserPanel : public NCursesPanel
26027 {
26028 public:
26029   NCursesUserPanel (int nlines,
26030                     int ncols,
26031                     int begin_y = 0,
26032                     int begin_x = 0,
26033                     const T* p_UserData = static_cast<T*>(0))
26034     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26035   {
26036   };
26037   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26038   {
26039   };
26040
26041   virtual ~NCursesUserPanel() {};
26042 };
26043
26044 int
26045 main (void)
26046 {
26047
26048         const char* p_UserData = static_cast<char*>(0)
26049   ;
26050   return 0;
26051 }
26052 _ACEOF
26053 rm -f "conftest.$ac_objext"
26054 if { (eval echo "$as_me:26054: \"$ac_compile\"") >&5
26055   (eval $ac_compile) 2>&5
26056   ac_status=$?
26057   echo "$as_me:26057: \$? = $ac_status" >&5
26058   (exit "$ac_status"); } &&
26059          { ac_try='test -s "conftest.$ac_objext"'
26060   { (eval echo "$as_me:26060: \"$ac_try\"") >&5
26061   (eval $ac_try) 2>&5
26062   ac_status=$?
26063   echo "$as_me:26063: \$? = $ac_status" >&5
26064   (exit "$ac_status"); }; }; then
26065   cf_cv_cpp_static_cast=yes
26066 else
26067   echo "$as_me: failed program was:" >&5
26068 cat "conftest.$ac_ext" >&5
26069 cf_cv_cpp_static_cast=no
26070 fi
26071 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26072
26073         ac_ext=cc
26074 ac_cpp='$CXXCPP $CPPFLAGS'
26075 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26076 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26077 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26078 ac_main_return="return"
26079
26080 fi
26081 echo "$as_me:26081: result: $cf_cv_cpp_static_cast" >&5
26082 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26083
26084 fi
26085
26086 test "$cf_cv_cpp_static_cast" = yes &&
26087 cat >>confdefs.h <<\EOF
26088 #define CPP_HAS_STATIC_CAST 1
26089 EOF
26090
26091         CXX_AR='$(AR)'
26092         CXX_ARFLAGS='$(ARFLAGS)'
26093         case "$cf_cv_system_name" in
26094         (irix*)
26095             if test "$GXX" != yes ; then
26096                 CXX_AR='$(CXX)'
26097                 CXX_ARFLAGS='-ar -o'
26098             fi
26099             ;;
26100         (sco3.2v5*)
26101             CXXLDFLAGS="-u main"
26102             ;;
26103         (solaris2*)
26104             if test "$GXX" != yes ; then
26105                 CXX_AR='$(CXX)'
26106                 CXX_ARFLAGS='-xar -o'
26107             fi
26108             ;;
26109         esac
26110
26111 else
26112         cf_cxx_library=no
26113         cf_cv_builtin_bool=1
26114
26115         # Just because we are not configuring against C++ right now does not
26116         # mean that a user will not want to use C++.  Some distributors disable
26117         # the C++ portion of this configuration as a shortcut (or just to avoid
26118         # compiling the demo in the c++ directory).  So we need a reasonable
26119         # default for the 'bool' type.
26120         #
26121         # Caveat: since the storage of the bool type is not standardized, it
26122         # may change.
26123
26124         if test "$NCURSES_BOOL" != auto ; then
26125                 cf_cv_type_of_bool=$NCURSES_BOOL
26126                 cf_cv_header_stdbool_h=0
26127         else
26128                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26129
26130 echo "$as_me:26130: checking for bool" >&5
26131 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26132 if test "${ac_cv_type_bool+set}" = set; then
26133   echo $ECHO_N "(cached) $ECHO_C" >&6
26134 else
26135   cat >"conftest.$ac_ext" <<_ACEOF
26136 #line 26136 "configure"
26137 #include "confdefs.h"
26138
26139 #include <stdlib.h>
26140 #include <stdio.h>
26141
26142 #if defined(__cplusplus)
26143
26144 #ifdef HAVE_GXX_BUILTIN_H
26145 #include <g++/builtin.h>
26146 #elif HAVE_GPP_BUILTIN_H
26147 #include <gpp/builtin.h>
26148 #elif HAVE_BUILTIN_H
26149 #include <builtin.h>
26150 #endif
26151
26152 #else
26153
26154 #if $cf_cv_header_stdbool_h
26155 #include <stdbool.h>
26156 #endif
26157
26158 #endif
26159
26160 int
26161 main (void)
26162 {
26163 if ((bool *) 0)
26164   return 0;
26165 if (sizeof (bool))
26166   return 0;
26167   ;
26168   return 0;
26169 }
26170 _ACEOF
26171 rm -f "conftest.$ac_objext"
26172 if { (eval echo "$as_me:26172: \"$ac_compile\"") >&5
26173   (eval $ac_compile) 2>&5
26174   ac_status=$?
26175   echo "$as_me:26175: \$? = $ac_status" >&5
26176   (exit "$ac_status"); } &&
26177          { ac_try='test -s "conftest.$ac_objext"'
26178   { (eval echo "$as_me:26178: \"$ac_try\"") >&5
26179   (eval $ac_try) 2>&5
26180   ac_status=$?
26181   echo "$as_me:26181: \$? = $ac_status" >&5
26182   (exit "$ac_status"); }; }; then
26183   ac_cv_type_bool=yes
26184 else
26185   echo "$as_me: failed program was:" >&5
26186 cat "conftest.$ac_ext" >&5
26187 ac_cv_type_bool=no
26188 fi
26189 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26190 fi
26191 echo "$as_me:26191: result: $ac_cv_type_bool" >&5
26192 echo "${ECHO_T}$ac_cv_type_bool" >&6
26193
26194 echo "$as_me:26194: checking size of bool" >&5
26195 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26196 if test "${ac_cv_sizeof_bool+set}" = set; then
26197   echo $ECHO_N "(cached) $ECHO_C" >&6
26198 else
26199   if test "$ac_cv_type_bool" = yes; then
26200   if test "$cross_compiling" = yes; then
26201   # Depending upon the size, compute the lo and hi bounds.
26202 cat >"conftest.$ac_ext" <<_ACEOF
26203 #line 26203 "configure"
26204 #include "confdefs.h"
26205
26206 #include <stdlib.h>
26207 #include <stdio.h>
26208
26209 #if defined(__cplusplus)
26210
26211 #ifdef HAVE_GXX_BUILTIN_H
26212 #include <g++/builtin.h>
26213 #elif HAVE_GPP_BUILTIN_H
26214 #include <gpp/builtin.h>
26215 #elif HAVE_BUILTIN_H
26216 #include <builtin.h>
26217 #endif
26218
26219 #else
26220
26221 #if $cf_cv_header_stdbool_h
26222 #include <stdbool.h>
26223 #endif
26224
26225 #endif
26226
26227 int
26228 main (void)
26229 {
26230 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26231   ;
26232   return 0;
26233 }
26234 _ACEOF
26235 rm -f "conftest.$ac_objext"
26236 if { (eval echo "$as_me:26236: \"$ac_compile\"") >&5
26237   (eval $ac_compile) 2>&5
26238   ac_status=$?
26239   echo "$as_me:26239: \$? = $ac_status" >&5
26240   (exit "$ac_status"); } &&
26241          { ac_try='test -s "conftest.$ac_objext"'
26242   { (eval echo "$as_me:26242: \"$ac_try\"") >&5
26243   (eval $ac_try) 2>&5
26244   ac_status=$?
26245   echo "$as_me:26245: \$? = $ac_status" >&5
26246   (exit "$ac_status"); }; }; then
26247   ac_lo=0 ac_mid=0
26248   while :; do
26249     cat >"conftest.$ac_ext" <<_ACEOF
26250 #line 26250 "configure"
26251 #include "confdefs.h"
26252
26253 #include <stdlib.h>
26254 #include <stdio.h>
26255
26256 #if defined(__cplusplus)
26257
26258 #ifdef HAVE_GXX_BUILTIN_H
26259 #include <g++/builtin.h>
26260 #elif HAVE_GPP_BUILTIN_H
26261 #include <gpp/builtin.h>
26262 #elif HAVE_BUILTIN_H
26263 #include <builtin.h>
26264 #endif
26265
26266 #else
26267
26268 #if $cf_cv_header_stdbool_h
26269 #include <stdbool.h>
26270 #endif
26271
26272 #endif
26273
26274 int
26275 main (void)
26276 {
26277 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26278   ;
26279   return 0;
26280 }
26281 _ACEOF
26282 rm -f "conftest.$ac_objext"
26283 if { (eval echo "$as_me:26283: \"$ac_compile\"") >&5
26284   (eval $ac_compile) 2>&5
26285   ac_status=$?
26286   echo "$as_me:26286: \$? = $ac_status" >&5
26287   (exit "$ac_status"); } &&
26288          { ac_try='test -s "conftest.$ac_objext"'
26289   { (eval echo "$as_me:26289: \"$ac_try\"") >&5
26290   (eval $ac_try) 2>&5
26291   ac_status=$?
26292   echo "$as_me:26292: \$? = $ac_status" >&5
26293   (exit "$ac_status"); }; }; then
26294   ac_hi=$ac_mid; break
26295 else
26296   echo "$as_me: failed program was:" >&5
26297 cat "conftest.$ac_ext" >&5
26298 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26299 fi
26300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26301   done
26302 else
26303   echo "$as_me: failed program was:" >&5
26304 cat "conftest.$ac_ext" >&5
26305 ac_hi=-1 ac_mid=-1
26306   while :; do
26307     cat >"conftest.$ac_ext" <<_ACEOF
26308 #line 26308 "configure"
26309 #include "confdefs.h"
26310
26311 #include <stdlib.h>
26312 #include <stdio.h>
26313
26314 #if defined(__cplusplus)
26315
26316 #ifdef HAVE_GXX_BUILTIN_H
26317 #include <g++/builtin.h>
26318 #elif HAVE_GPP_BUILTIN_H
26319 #include <gpp/builtin.h>
26320 #elif HAVE_BUILTIN_H
26321 #include <builtin.h>
26322 #endif
26323
26324 #else
26325
26326 #if $cf_cv_header_stdbool_h
26327 #include <stdbool.h>
26328 #endif
26329
26330 #endif
26331
26332 int
26333 main (void)
26334 {
26335 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26336   ;
26337   return 0;
26338 }
26339 _ACEOF
26340 rm -f "conftest.$ac_objext"
26341 if { (eval echo "$as_me:26341: \"$ac_compile\"") >&5
26342   (eval $ac_compile) 2>&5
26343   ac_status=$?
26344   echo "$as_me:26344: \$? = $ac_status" >&5
26345   (exit "$ac_status"); } &&
26346          { ac_try='test -s "conftest.$ac_objext"'
26347   { (eval echo "$as_me:26347: \"$ac_try\"") >&5
26348   (eval $ac_try) 2>&5
26349   ac_status=$?
26350   echo "$as_me:26350: \$? = $ac_status" >&5
26351   (exit "$ac_status"); }; }; then
26352   ac_lo=$ac_mid; break
26353 else
26354   echo "$as_me: failed program was:" >&5
26355 cat "conftest.$ac_ext" >&5
26356 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26357 fi
26358 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26359   done
26360 fi
26361 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26362 # Binary search between lo and hi bounds.
26363 while test "x$ac_lo" != "x$ac_hi"; do
26364   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26365   cat >"conftest.$ac_ext" <<_ACEOF
26366 #line 26366 "configure"
26367 #include "confdefs.h"
26368
26369 #include <stdlib.h>
26370 #include <stdio.h>
26371
26372 #if defined(__cplusplus)
26373
26374 #ifdef HAVE_GXX_BUILTIN_H
26375 #include <g++/builtin.h>
26376 #elif HAVE_GPP_BUILTIN_H
26377 #include <gpp/builtin.h>
26378 #elif HAVE_BUILTIN_H
26379 #include <builtin.h>
26380 #endif
26381
26382 #else
26383
26384 #if $cf_cv_header_stdbool_h
26385 #include <stdbool.h>
26386 #endif
26387
26388 #endif
26389
26390 int
26391 main (void)
26392 {
26393 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26394   ;
26395   return 0;
26396 }
26397 _ACEOF
26398 rm -f "conftest.$ac_objext"
26399 if { (eval echo "$as_me:26399: \"$ac_compile\"") >&5
26400   (eval $ac_compile) 2>&5
26401   ac_status=$?
26402   echo "$as_me:26402: \$? = $ac_status" >&5
26403   (exit "$ac_status"); } &&
26404          { ac_try='test -s "conftest.$ac_objext"'
26405   { (eval echo "$as_me:26405: \"$ac_try\"") >&5
26406   (eval $ac_try) 2>&5
26407   ac_status=$?
26408   echo "$as_me:26408: \$? = $ac_status" >&5
26409   (exit "$ac_status"); }; }; then
26410   ac_hi=$ac_mid
26411 else
26412   echo "$as_me: failed program was:" >&5
26413 cat "conftest.$ac_ext" >&5
26414 ac_lo=`expr "$ac_mid" + 1`
26415 fi
26416 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26417 done
26418 ac_cv_sizeof_bool=$ac_lo
26419 else
26420   if test "$cross_compiling" = yes; then
26421   { { echo "$as_me:26421: error: cannot run test program while cross compiling" >&5
26422 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26423    { (exit 1); exit 1; }; }
26424 else
26425   cat >"conftest.$ac_ext" <<_ACEOF
26426 #line 26426 "configure"
26427 #include "confdefs.h"
26428
26429 #include <stdlib.h>
26430 #include <stdio.h>
26431
26432 #if defined(__cplusplus)
26433
26434 #ifdef HAVE_GXX_BUILTIN_H
26435 #include <g++/builtin.h>
26436 #elif HAVE_GPP_BUILTIN_H
26437 #include <gpp/builtin.h>
26438 #elif HAVE_BUILTIN_H
26439 #include <builtin.h>
26440 #endif
26441
26442 #else
26443
26444 #if $cf_cv_header_stdbool_h
26445 #include <stdbool.h>
26446 #endif
26447
26448 #endif
26449
26450 int
26451 main (void)
26452 {
26453 FILE *f = fopen ("conftest.val", "w");
26454 if (!f)
26455   $ac_main_return (1);
26456 fprintf (f, "%ld", (long)(sizeof (bool)));
26457 fclose (f);
26458   ;
26459   return 0;
26460 }
26461 _ACEOF
26462 rm -f "conftest$ac_exeext"
26463 if { (eval echo "$as_me:26463: \"$ac_link\"") >&5
26464   (eval $ac_link) 2>&5
26465   ac_status=$?
26466   echo "$as_me:26466: \$? = $ac_status" >&5
26467   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26468   { (eval echo "$as_me:26468: \"$ac_try\"") >&5
26469   (eval $ac_try) 2>&5
26470   ac_status=$?
26471   echo "$as_me:26471: \$? = $ac_status" >&5
26472   (exit "$ac_status"); }; }; then
26473   ac_cv_sizeof_bool=`cat conftest.val`
26474 else
26475   echo "$as_me: program exited with status $ac_status" >&5
26476 echo "$as_me: failed program was:" >&5
26477 cat "conftest.$ac_ext" >&5
26478 fi
26479 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26480 fi
26481 fi
26482 rm -f conftest.val
26483 else
26484   ac_cv_sizeof_bool=0
26485 fi
26486 fi
26487 echo "$as_me:26487: result: $ac_cv_sizeof_bool" >&5
26488 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26489 cat >>confdefs.h <<EOF
26490 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26491 EOF
26492
26493 echo "$as_me:26493: checking for type of bool" >&5
26494 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26495 if test "${cf_cv_type_of_bool+set}" = set; then
26496   echo $ECHO_N "(cached) $ECHO_C" >&6
26497 else
26498
26499         rm -f cf_test.out
26500         if test "$cross_compiling" = yes; then
26501
26502                 case x$ac_cv_sizeof_bool in
26503                 (x1) cf_cv_type_of_bool="unsigned char";;
26504                 (x2) cf_cv_type_of_bool="unsigned short";;
26505                 (x4) cf_cv_type_of_bool="unsigned int";;
26506                 (x8) cf_cv_type_of_bool="unsigned long";;
26507                 (*)  cf_cv_type_of_bool=unknown;;
26508                 esac
26509
26510 else
26511   cat >"conftest.$ac_ext" <<_ACEOF
26512 #line 26512 "configure"
26513 #include "confdefs.h"
26514
26515 #include <stdlib.h>
26516 #include <stdio.h>
26517
26518 #if defined(__cplusplus)
26519
26520 #ifdef HAVE_GXX_BUILTIN_H
26521 #include <g++/builtin.h>
26522 #elif HAVE_GPP_BUILTIN_H
26523 #include <gpp/builtin.h>
26524 #elif HAVE_BUILTIN_H
26525 #include <builtin.h>
26526 #endif
26527
26528 #else
26529
26530 #if $cf_cv_header_stdbool_h
26531 #include <stdbool.h>
26532 #endif
26533
26534 #endif
26535
26536 int main(void)
26537 {
26538         FILE *fp = fopen("cf_test.out", "w");
26539         if (fp != 0) {
26540                 bool x = true;
26541                 if ((bool)(-x) >= 0)
26542                         fputs("unsigned ", fp);
26543                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26544                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26545                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26546                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26547                 fclose(fp);
26548         }
26549         ${cf_cv_main_return:-return}(0);
26550 }
26551
26552 _ACEOF
26553 rm -f "conftest$ac_exeext"
26554 if { (eval echo "$as_me:26554: \"$ac_link\"") >&5
26555   (eval $ac_link) 2>&5
26556   ac_status=$?
26557   echo "$as_me:26557: \$? = $ac_status" >&5
26558   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26559   { (eval echo "$as_me:26559: \"$ac_try\"") >&5
26560   (eval $ac_try) 2>&5
26561   ac_status=$?
26562   echo "$as_me:26562: \$? = $ac_status" >&5
26563   (exit "$ac_status"); }; }; then
26564   cf_cv_type_of_bool=`cat cf_test.out`
26565                  if test -z "$cf_cv_type_of_bool"; then
26566                    cf_cv_type_of_bool=unknown
26567                  fi
26568 else
26569   echo "$as_me: program exited with status $ac_status" >&5
26570 echo "$as_me: failed program was:" >&5
26571 cat "conftest.$ac_ext" >&5
26572 cf_cv_type_of_bool=unknown
26573 fi
26574 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26575 fi
26576         rm -f cf_test.out
26577
26578 fi
26579 echo "$as_me:26579: result: $cf_cv_type_of_bool" >&5
26580 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26581
26582 if test "$cf_cv_type_of_bool" = unknown ; then
26583         case .$NCURSES_BOOL in
26584         (.auto|.) NCURSES_BOOL=unsigned;;
26585         esac
26586         { echo "$as_me:26586: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26587 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26588         cf_cv_type_of_bool=$NCURSES_BOOL
26589 fi
26590
26591                 else
26592                         echo "$as_me:26592: checking for fallback type of bool" >&5
26593 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26594                         case "$host_cpu" in
26595                         (i?86)  cf_cv_type_of_bool=char ;;
26596                         (*)     cf_cv_type_of_bool=int  ;;
26597                         esac
26598                         echo "$as_me:26598: result: $cf_cv_type_of_bool" >&5
26599 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26600                 fi
26601         fi
26602 fi
26603
26604 # If the C compiler did not declare bool, and we did not determine that the C++
26605 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26606 # ncurses library use the same type as C++ bool.  Note that this allows one to
26607 # specify the type of bool in a configure-script option and postpone
26608 # integration with the C++ compiler provided that the types are compatible.
26609 USE_CXX_BOOL=1
26610 if test "$cf_cv_cc_bool_type" = 1
26611 then
26612         # oops: C has a bool.  Unlikely, but C++ could differ.
26613         USE_CXX_BOOL=0
26614 elif test "$cf_cv_builtin_bool" = 0
26615 then
26616         # C++ has no bool
26617         USE_CXX_BOOL=0
26618 else
26619         # this is the normal case
26620         USE_CXX_BOOL='defined(__cplusplus)'
26621 fi
26622
26623 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26624
26625         if test "$cf_with_ada" != "no" ; then
26626                 if test "$with_libtool" != "no"; then
26627                         { echo "$as_me:26627: WARNING: libtool does not support Ada - disabling feature" >&5
26628 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26629                         cf_with_ada=no
26630                 fi
26631         fi
26632
26633         if test "$cf_with_ada" != "no" ; then
26634
26635 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26636 do
26637
26638 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26639
26640         unset ac_cv_path_cf_TEMP_gnat
26641         unset cf_TEMP_gnat
26642         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26643 set dummy $cf_prog_gnat; ac_word=$2
26644 echo "$as_me:26644: checking for $ac_word" >&5
26645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26646 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26647   echo $ECHO_N "(cached) $ECHO_C" >&6
26648 else
26649   case $cf_TEMP_gnat in
26650   [\\/]* | ?:[\\/]*)
26651   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26652   ;;
26653   *)
26654   ac_save_IFS=$IFS; IFS=$ac_path_separator
26655 ac_dummy="$PATH"
26656 for ac_dir in $ac_dummy; do
26657   IFS=$ac_save_IFS
26658   test -z "$ac_dir" && ac_dir=.
26659   if $as_executable_p "$ac_dir/$ac_word"; then
26660    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26661    echo "$as_me:26661: found $ac_dir/$ac_word" >&5
26662    break
26663 fi
26664 done
26665
26666   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26667   ;;
26668 esac
26669 fi
26670 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26671
26672 if test -n "$cf_TEMP_gnat"; then
26673   echo "$as_me:26673: result: $cf_TEMP_gnat" >&5
26674 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26675 else
26676   echo "$as_me:26676: result: no" >&5
26677 echo "${ECHO_T}no" >&6
26678 fi
26679
26680         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26681
26682         if test "x$cf_TEMP_gnat" != xno; then
26683                 unset cf_cv_gnat_version
26684                 unset cf_TEMP_gnat
26685
26686 echo "$as_me:26686: checking for $cf_prog_gnat version" >&5
26687 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26688 if test "${cf_cv_gnat_version+set}" = set; then
26689   echo $ECHO_N "(cached) $ECHO_C" >&6
26690 else
26691
26692 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26693         grep '[0-9].[0-9][0-9]*' |\
26694         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26695
26696 fi
26697 echo "$as_me:26697: result: $cf_cv_gnat_version" >&5
26698 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26699 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26700 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26701
26702         fi
26703         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26704
26705         unset cf_TEMP_gnat
26706         unset cf_cv_gnat_version
26707         unset ac_cv_path_cf_TEMP_gnat
26708 done
26709
26710 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26711         cf_ada_make=
26712         cf_cv_prog_gnat_correct=no
26713 else
26714         cf_ada_make=gnatmake
26715         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26716                 # gprconfig is newer than gnatmake; we can continue...
26717                 cf_ada_config="##"
26718         else
26719                 rm -rf ./conftest* ./*~conftest*
26720                 if mkdir conftest.src
26721                 then
26722                         cf_ada_config=""
26723                         cd conftest.src
26724                         for cf_gprconfig in Ada C
26725                         do
26726                                 echo "$as_me:26726: checking for gprconfig name for $cf_gprconfig" >&5
26727 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26728                                 if test "$cf_gprconfig" = C
26729                                 then
26730                                         for cf_gprconfig_param in \
26731                                                 "$cf_gprconfig,,,,GNATGCC" \
26732                                                 "$cf_gprconfig,,,,GCC" \
26733                                                 "$cf_gprconfig"
26734                                         do
26735                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26736                                                 test -n "$cf_gprconfig_value" && break
26737                                         done
26738                                 else
26739                                         cf_gprconfig_param=$cf_gprconfig
26740                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26741                                 fi
26742                                 if test -n "$cf_gprconfig_value"
26743                                 then
26744                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26745                                         echo "$as_me:26745: result: $cf_gprconfig_value" >&5
26746 echo "${ECHO_T}$cf_gprconfig_value" >&6
26747                                 else
26748                                         echo "$as_me:26748: result: missing" >&5
26749 echo "${ECHO_T}missing" >&6
26750                                         cf_ada_config="#"
26751                                         break
26752                                 fi
26753                         done
26754                         cd ..
26755                         rm -rf ./conftest* ./*~conftest*
26756                 fi
26757         fi
26758         if test "x$cf_ada_config" != "x#"
26759         then
26760
26761 echo "$as_me:26761: checking for gnat version" >&5
26762 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26763 if test "${cf_cv_gnat_version+set}" = set; then
26764   echo $ECHO_N "(cached) $ECHO_C" >&6
26765 else
26766
26767 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26768         grep '[0-9].[0-9][0-9]*' |\
26769         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26770
26771 fi
26772 echo "$as_me:26772: result: $cf_cv_gnat_version" >&5
26773 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26774 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26775
26776 case "$cf_cv_gnat_version" in
26777 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26778         cf_cv_prog_gnat_correct=yes
26779         ;;
26780 (*)
26781         { echo "$as_me:26781: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26782 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26783         cf_cv_prog_gnat_correct=no
26784         ;;
26785 esac
26786
26787                 # Extract the first word of "m4", so it can be a program name with args.
26788 set dummy m4; ac_word=$2
26789 echo "$as_me:26789: checking for $ac_word" >&5
26790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26791 if test "${ac_cv_prog_M4_exists+set}" = set; then
26792   echo $ECHO_N "(cached) $ECHO_C" >&6
26793 else
26794   if test -n "$M4_exists"; then
26795   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26796 else
26797   ac_save_IFS=$IFS; IFS=$ac_path_separator
26798 ac_dummy="$PATH"
26799 for ac_dir in $ac_dummy; do
26800   IFS=$ac_save_IFS
26801   test -z "$ac_dir" && ac_dir=.
26802   $as_executable_p "$ac_dir/$ac_word" || continue
26803 ac_cv_prog_M4_exists="yes"
26804 echo "$as_me:26804: found $ac_dir/$ac_word" >&5
26805 break
26806 done
26807
26808   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26809 fi
26810 fi
26811 M4_exists=$ac_cv_prog_M4_exists
26812 if test -n "$M4_exists"; then
26813   echo "$as_me:26813: result: $M4_exists" >&5
26814 echo "${ECHO_T}$M4_exists" >&6
26815 else
26816   echo "$as_me:26816: result: no" >&5
26817 echo "${ECHO_T}no" >&6
26818 fi
26819
26820                 if test "$ac_cv_prog_M4_exists" = no; then
26821                         cf_cv_prog_gnat_correct=no
26822                         { echo "$as_me:26822: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26823 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26824                 fi
26825                 if test "$cf_cv_prog_gnat_correct" = yes; then
26826                         echo "$as_me:26826: checking if GNAT works" >&5
26827 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26828
26829 rm -rf ./conftest* ./*~conftest*
26830 cat >>conftest.ads <<CF_EOF
26831 procedure conftest;
26832 CF_EOF
26833 cat >>conftest.adb <<CF_EOF
26834 with Text_IO;
26835 with GNAT.OS_Lib;
26836 procedure conftest is
26837 begin
26838    Text_IO.Put ("Hello World");
26839    Text_IO.New_Line;
26840    GNAT.OS_Lib.OS_Exit (0);
26841 end conftest;
26842 CF_EOF
26843 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26844    if ( ./conftest 1>&5 2>&1 ) ; then
26845       cf_cv_prog_gnat_correct=yes
26846    else
26847       cf_cv_prog_gnat_correct=no
26848    fi
26849 else
26850    cf_cv_prog_gnat_correct=no
26851 fi
26852 rm -rf ./conftest* ./*~conftest*
26853
26854                         echo "$as_me:26854: result: $cf_cv_prog_gnat_correct" >&5
26855 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26856                 fi
26857         else
26858                 cf_cv_prog_gnat_correct=no
26859         fi
26860 fi
26861
26862                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26863
26864         ADAFLAGS="$ADAFLAGS -gnatpn"
26865
26866         echo "$as_me:26866: checking optimization options for ADAFLAGS" >&5
26867 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26868         case "$CFLAGS" in
26869         (*-g*)
26870
26871         ADAFLAGS="$ADAFLAGS -g"
26872
26873                 ;;
26874         esac
26875         case "$CFLAGS" in
26876         (*-O*)
26877                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26878
26879         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26880
26881                 ;;
26882         esac
26883         echo "$as_me:26883: result: $ADAFLAGS" >&5
26884 echo "${ECHO_T}$ADAFLAGS" >&6
26885
26886 echo "$as_me:26886: checking if GNATPREP supports -T option" >&5
26887 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26888 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26889   echo $ECHO_N "(cached) $ECHO_C" >&6
26890 else
26891
26892 cf_cv_gnatprep_opt_t=no
26893 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26894
26895 fi
26896 echo "$as_me:26896: result: $cf_cv_gnatprep_opt_t" >&5
26897 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26898 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26899
26900 echo "$as_me:26900: checking if GNAT supports generics" >&5
26901 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26902 case "$cf_cv_gnat_version" in
26903 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26904         cf_gnat_generics=yes
26905         ;;
26906 (*)
26907         cf_gnat_generics=no
26908         ;;
26909 esac
26910 echo "$as_me:26910: result: $cf_gnat_generics" >&5
26911 echo "${ECHO_T}$cf_gnat_generics" >&6
26912
26913 if test "$cf_gnat_generics" = yes
26914 then
26915         cf_compile_generics=generics
26916         cf_generic_objects="\${GENOBJS}"
26917 else
26918         cf_compile_generics=
26919         cf_generic_objects=
26920 fi
26921
26922 echo "$as_me:26922: checking if GNAT supports SIGINT" >&5
26923 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26924 if test "${cf_cv_gnat_sigint+set}" = set; then
26925   echo $ECHO_N "(cached) $ECHO_C" >&6
26926 else
26927
26928 rm -rf ./conftest* ./*~conftest*
26929 cat >>conftest.ads <<CF_EOF
26930 with Ada.Interrupts.Names;
26931
26932 package ConfTest is
26933
26934    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26935    pragma Unreserve_All_Interrupts;
26936    pragma Warnings (On);
26937
26938    protected Process is
26939       procedure Stop;
26940       function Continue return Boolean;
26941       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26942    private
26943       Done : Boolean := False;
26944    end Process;
26945
26946 end ConfTest;
26947 CF_EOF
26948 cat >>conftest.adb <<CF_EOF
26949 package body ConfTest is
26950    protected body Process is
26951       procedure Stop is
26952       begin
26953          Done := True;
26954       end Stop;
26955       function Continue return Boolean is
26956       begin
26957          return not Done;
26958       end Continue;
26959    end Process;
26960 end ConfTest;
26961 CF_EOF
26962 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26963       cf_cv_gnat_sigint=yes
26964 else
26965    cf_cv_gnat_sigint=no
26966 fi
26967 rm -rf ./conftest* ./*~conftest*
26968
26969 fi
26970 echo "$as_me:26970: result: $cf_cv_gnat_sigint" >&5
26971 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26972
26973 if test "$cf_cv_gnat_sigint" = yes ; then
26974         USE_GNAT_SIGINT=""
26975 else
26976         USE_GNAT_SIGINT="#"
26977 fi
26978
26979 cf_gnat_libraries=no
26980 cf_gnat_projects=no
26981
26982 if test "$enable_gnat_projects" != no ; then
26983 echo "$as_me:26983: checking if GNAT supports project files" >&5
26984 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26985 case "$cf_cv_gnat_version" in
26986 (3.[0-9]*)
26987         ;;
26988 (*)
26989         case "$cf_cv_system_name" in
26990         (cygwin*|msys*)
26991                 ;;
26992         (*)
26993                 rm -rf ./conftest* ./*~conftest*
26994                 if mkdir conftest.src conftest.bin conftest.lib
26995                 then
26996                         cd conftest.src
26997                         rm -rf ./conftest* ./*~conftest*
26998                         cat >>library.gpr <<CF_EOF
26999 project Library is
27000   Kind := External ("LIB_KIND");
27001   for Library_Name use "ConfTest";
27002   for Object_Dir use ".";
27003   for Library_ALI_Dir use External("LIBRARY_DIR");
27004   for Library_Version use External ("SONAME");
27005   for Library_Kind use Kind;
27006   for Library_Dir use External("BUILD_DIR");
27007   Source_Dir := External ("SOURCE_DIR");
27008   for Source_Dirs use (Source_Dir);
27009 end Library;
27010 CF_EOF
27011                         cat >>confpackage.ads <<CF_EOF
27012 package ConfPackage is
27013    procedure conftest;
27014 end ConfPackage;
27015 CF_EOF
27016                         cat >>confpackage.adb <<CF_EOF
27017 with Text_IO;
27018 package body ConfPackage is
27019    procedure conftest is
27020    begin
27021       Text_IO.Put ("Hello World");
27022       Text_IO.New_Line;
27023    end conftest;
27024 end ConfPackage;
27025 CF_EOF
27026                         if ( "$cf_ada_make" $ADAFLAGS \
27027                                         -Plibrary.gpr \
27028                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27029                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27030                                         -XSOURCE_DIR="`pwd`" \
27031                                         -XSONAME=libConfTest.so.1 \
27032                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27033                                 cf_gnat_projects=yes
27034                         fi
27035                         cd ..
27036                 fi
27037                 if test -f conftest.lib/confpackage.ali
27038                 then
27039                         cf_gnat_libraries=yes
27040                 fi
27041                 rm -rf ./conftest* ./*~conftest*
27042                 ;;
27043         esac
27044         ;;
27045 esac
27046 echo "$as_me:27046: result: $cf_gnat_projects" >&5
27047 echo "${ECHO_T}$cf_gnat_projects" >&6
27048 fi # enable_gnat_projects
27049
27050 if test "$cf_gnat_projects" = yes
27051 then
27052         echo "$as_me:27052: checking if GNAT supports libraries" >&5
27053 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27054         echo "$as_me:27054: result: $cf_gnat_libraries" >&5
27055 echo "${ECHO_T}$cf_gnat_libraries" >&6
27056 fi
27057
27058 USE_OLD_MAKERULES=""
27059 USE_GNAT_PROJECTS="#"
27060 USE_GNAT_MAKE_GPR="#"
27061 USE_GNAT_GPRBUILD="#"
27062
27063 if test "$cf_gnat_projects" = yes
27064 then
27065         USE_OLD_MAKERULES="#"
27066         USE_GNAT_PROJECTS=""
27067         if test "$cf_cv_VERSION_GPRBUILD" != no
27068         then
27069                 USE_GNAT_GPRBUILD=""
27070         elif test "$cf_cv_VERSION_GNATMAKE" != no
27071         then
27072                 USE_GNAT_MAKE_GPR=""
27073         else
27074                 { echo "$as_me:27074: WARNING: use old makefile rules since tools are missing" >&5
27075 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27076         fi
27077 fi
27078
27079 if test "$cf_gnat_libraries" = yes
27080 then
27081         USE_GNAT_LIBRARIES=""
27082 else
27083         USE_GNAT_LIBRARIES="#"
27084 fi
27085
27086 echo "$as_me:27086: checking for ada-compiler" >&5
27087 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27088
27089 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27090 if test "${with_ada_compiler+set}" = set; then
27091   withval="$with_ada_compiler"
27092   cf_ada_compiler=$withval
27093 else
27094   cf_ada_compiler=gnatmake
27095 fi;
27096
27097 echo "$as_me:27097: result: $cf_ada_compiler" >&5
27098 echo "${ECHO_T}$cf_ada_compiler" >&6
27099
27100                         cf_ada_package=terminal_interface
27101
27102 echo "$as_me:27102: checking for ada-include" >&5
27103 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27104
27105 # Check whether --with-ada-include or --without-ada-include was given.
27106 if test "${with_ada_include+set}" = set; then
27107   withval="$with_ada_include"
27108
27109 else
27110   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27111 fi; if test -n "$prefix/share/ada/adainclude" ; then
27112
27113 if test "x$prefix" != xNONE; then
27114         cf_path_syntax="$prefix"
27115 else
27116         cf_path_syntax="$ac_default_prefix"
27117 fi
27118
27119 case ".$withval" in
27120 (.\$\(*\)*|.\'*\'*)
27121         ;;
27122 (..|./*|.\\*)
27123         ;;
27124 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27125         ;;
27126 (.\$\{*prefix\}*|.\$\{*dir\}*)
27127         eval withval="$withval"
27128         case ".$withval" in
27129         (.NONE/*)
27130                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27131                 ;;
27132         esac
27133         ;;
27134 (.no|.NONE/*)
27135         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27136         ;;
27137 (*)
27138         { { echo "$as_me:27138: error: expected a pathname, not \"$withval\"" >&5
27139 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27140    { (exit 1); exit 1; }; }
27141         ;;
27142 esac
27143
27144 fi
27145 eval ADA_INCLUDE="$withval"
27146
27147 echo "$as_me:27147: result: $ADA_INCLUDE" >&5
27148 echo "${ECHO_T}$ADA_INCLUDE" >&6
27149
27150 echo "$as_me:27150: checking for ada-objects" >&5
27151 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27152
27153 # Check whether --with-ada-objects or --without-ada-objects was given.
27154 if test "${with_ada_objects+set}" = set; then
27155   withval="$with_ada_objects"
27156
27157 else
27158   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27159 fi; if test -n "$prefix/lib/ada/adalib" ; then
27160
27161 if test "x$prefix" != xNONE; then
27162         cf_path_syntax="$prefix"
27163 else
27164         cf_path_syntax="$ac_default_prefix"
27165 fi
27166
27167 case ".$withval" in
27168 (.\$\(*\)*|.\'*\'*)
27169         ;;
27170 (..|./*|.\\*)
27171         ;;
27172 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27173         ;;
27174 (.\$\{*prefix\}*|.\$\{*dir\}*)
27175         eval withval="$withval"
27176         case ".$withval" in
27177         (.NONE/*)
27178                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27179                 ;;
27180         esac
27181         ;;
27182 (.no|.NONE/*)
27183         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27184         ;;
27185 (*)
27186         { { echo "$as_me:27186: error: expected a pathname, not \"$withval\"" >&5
27187 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27188    { (exit 1); exit 1; }; }
27189         ;;
27190 esac
27191
27192 fi
27193 eval ADA_OBJECTS="$withval"
27194
27195 echo "$as_me:27195: result: $ADA_OBJECTS" >&5
27196 echo "${ECHO_T}$ADA_OBJECTS" >&6
27197
27198 echo "$as_me:27198: checking if an Ada95 shared-library should be built" >&5
27199 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27200
27201 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27202 if test "${with_ada_sharedlib+set}" = set; then
27203   withval="$with_ada_sharedlib"
27204   with_ada_sharedlib=$withval
27205 else
27206   with_ada_sharedlib=no
27207 fi;
27208 echo "$as_me:27208: result: $with_ada_sharedlib" >&5
27209 echo "${ECHO_T}$with_ada_sharedlib" >&6
27210
27211 if test "x$with_ada_sharedlib" != xno
27212 then
27213         if test "x$cf_gnat_projects" != xyes
27214         then
27215                 { echo "$as_me:27215: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27216 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27217                 with_ada_sharedlib=no
27218         fi
27219 fi
27220
27221 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27222 MAKE_ADA_SHAREDLIB="#"
27223
27224 if test "x$with_ada_sharedlib" != xno
27225 then
27226         MAKE_ADA_SHAREDLIB=
27227         if test "x$with_ada_sharedlib" != xyes
27228         then
27229                 ADA_SHAREDLIB="$with_ada_sharedlib"
27230         fi
27231 fi
27232
27233                         # allow the Ada binding to be renamed
27234
27235 echo "$as_me:27235: checking for ada-libname" >&5
27236 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27237
27238 # Check whether --with-ada-libname or --without-ada-libname was given.
27239 if test "${with_ada_libname+set}" = set; then
27240   withval="$with_ada_libname"
27241   ADA_LIBNAME=$withval
27242 else
27243   ADA_LIBNAME=AdaCurses
27244 fi;
27245 case "x$ADA_LIBNAME" in
27246 (x|xyes|xno)
27247         ADA_LIBNAME=AdaCurses
27248         ;;
27249 esac
27250
27251 echo "$as_me:27251: result: $ADA_LIBNAME" >&5
27252 echo "${ECHO_T}$ADA_LIBNAME" >&6
27253
27254                 fi
27255         fi
27256 else
27257         cf_with_ada=no
27258 fi
27259
27260 # do this "late" to avoid conflict with header-checks
27261 if test "x$with_widec" = xyes ; then
27262         echo "$as_me:27262: checking for wchar_t" >&5
27263 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27264 if test "${ac_cv_type_wchar_t+set}" = set; then
27265   echo $ECHO_N "(cached) $ECHO_C" >&6
27266 else
27267   cat >"conftest.$ac_ext" <<_ACEOF
27268 #line 27268 "configure"
27269 #include "confdefs.h"
27270 $ac_includes_default
27271 int
27272 main (void)
27273 {
27274 if ((wchar_t *) 0)
27275   return 0;
27276 if (sizeof (wchar_t))
27277   return 0;
27278   ;
27279   return 0;
27280 }
27281 _ACEOF
27282 rm -f "conftest.$ac_objext"
27283 if { (eval echo "$as_me:27283: \"$ac_compile\"") >&5
27284   (eval $ac_compile) 2>&5
27285   ac_status=$?
27286   echo "$as_me:27286: \$? = $ac_status" >&5
27287   (exit "$ac_status"); } &&
27288          { ac_try='test -s "conftest.$ac_objext"'
27289   { (eval echo "$as_me:27289: \"$ac_try\"") >&5
27290   (eval $ac_try) 2>&5
27291   ac_status=$?
27292   echo "$as_me:27292: \$? = $ac_status" >&5
27293   (exit "$ac_status"); }; }; then
27294   ac_cv_type_wchar_t=yes
27295 else
27296   echo "$as_me: failed program was:" >&5
27297 cat "conftest.$ac_ext" >&5
27298 ac_cv_type_wchar_t=no
27299 fi
27300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27301 fi
27302 echo "$as_me:27302: result: $ac_cv_type_wchar_t" >&5
27303 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27304
27305 echo "$as_me:27305: checking size of wchar_t" >&5
27306 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27307 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27308   echo $ECHO_N "(cached) $ECHO_C" >&6
27309 else
27310   if test "$ac_cv_type_wchar_t" = yes; then
27311   if test "$cross_compiling" = yes; then
27312   # Depending upon the size, compute the lo and hi bounds.
27313 cat >"conftest.$ac_ext" <<_ACEOF
27314 #line 27314 "configure"
27315 #include "confdefs.h"
27316 $ac_includes_default
27317 int
27318 main (void)
27319 {
27320 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27321   ;
27322   return 0;
27323 }
27324 _ACEOF
27325 rm -f "conftest.$ac_objext"
27326 if { (eval echo "$as_me:27326: \"$ac_compile\"") >&5
27327   (eval $ac_compile) 2>&5
27328   ac_status=$?
27329   echo "$as_me:27329: \$? = $ac_status" >&5
27330   (exit "$ac_status"); } &&
27331          { ac_try='test -s "conftest.$ac_objext"'
27332   { (eval echo "$as_me:27332: \"$ac_try\"") >&5
27333   (eval $ac_try) 2>&5
27334   ac_status=$?
27335   echo "$as_me:27335: \$? = $ac_status" >&5
27336   (exit "$ac_status"); }; }; then
27337   ac_lo=0 ac_mid=0
27338   while :; do
27339     cat >"conftest.$ac_ext" <<_ACEOF
27340 #line 27340 "configure"
27341 #include "confdefs.h"
27342 $ac_includes_default
27343 int
27344 main (void)
27345 {
27346 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27347   ;
27348   return 0;
27349 }
27350 _ACEOF
27351 rm -f "conftest.$ac_objext"
27352 if { (eval echo "$as_me:27352: \"$ac_compile\"") >&5
27353   (eval $ac_compile) 2>&5
27354   ac_status=$?
27355   echo "$as_me:27355: \$? = $ac_status" >&5
27356   (exit "$ac_status"); } &&
27357          { ac_try='test -s "conftest.$ac_objext"'
27358   { (eval echo "$as_me:27358: \"$ac_try\"") >&5
27359   (eval $ac_try) 2>&5
27360   ac_status=$?
27361   echo "$as_me:27361: \$? = $ac_status" >&5
27362   (exit "$ac_status"); }; }; then
27363   ac_hi=$ac_mid; break
27364 else
27365   echo "$as_me: failed program was:" >&5
27366 cat "conftest.$ac_ext" >&5
27367 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27368 fi
27369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27370   done
27371 else
27372   echo "$as_me: failed program was:" >&5
27373 cat "conftest.$ac_ext" >&5
27374 ac_hi=-1 ac_mid=-1
27375   while :; do
27376     cat >"conftest.$ac_ext" <<_ACEOF
27377 #line 27377 "configure"
27378 #include "confdefs.h"
27379 $ac_includes_default
27380 int
27381 main (void)
27382 {
27383 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27384   ;
27385   return 0;
27386 }
27387 _ACEOF
27388 rm -f "conftest.$ac_objext"
27389 if { (eval echo "$as_me:27389: \"$ac_compile\"") >&5
27390   (eval $ac_compile) 2>&5
27391   ac_status=$?
27392   echo "$as_me:27392: \$? = $ac_status" >&5
27393   (exit "$ac_status"); } &&
27394          { ac_try='test -s "conftest.$ac_objext"'
27395   { (eval echo "$as_me:27395: \"$ac_try\"") >&5
27396   (eval $ac_try) 2>&5
27397   ac_status=$?
27398   echo "$as_me:27398: \$? = $ac_status" >&5
27399   (exit "$ac_status"); }; }; then
27400   ac_lo=$ac_mid; break
27401 else
27402   echo "$as_me: failed program was:" >&5
27403 cat "conftest.$ac_ext" >&5
27404 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27405 fi
27406 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27407   done
27408 fi
27409 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27410 # Binary search between lo and hi bounds.
27411 while test "x$ac_lo" != "x$ac_hi"; do
27412   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27413   cat >"conftest.$ac_ext" <<_ACEOF
27414 #line 27414 "configure"
27415 #include "confdefs.h"
27416 $ac_includes_default
27417 int
27418 main (void)
27419 {
27420 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27421   ;
27422   return 0;
27423 }
27424 _ACEOF
27425 rm -f "conftest.$ac_objext"
27426 if { (eval echo "$as_me:27426: \"$ac_compile\"") >&5
27427   (eval $ac_compile) 2>&5
27428   ac_status=$?
27429   echo "$as_me:27429: \$? = $ac_status" >&5
27430   (exit "$ac_status"); } &&
27431          { ac_try='test -s "conftest.$ac_objext"'
27432   { (eval echo "$as_me:27432: \"$ac_try\"") >&5
27433   (eval $ac_try) 2>&5
27434   ac_status=$?
27435   echo "$as_me:27435: \$? = $ac_status" >&5
27436   (exit "$ac_status"); }; }; then
27437   ac_hi=$ac_mid
27438 else
27439   echo "$as_me: failed program was:" >&5
27440 cat "conftest.$ac_ext" >&5
27441 ac_lo=`expr "$ac_mid" + 1`
27442 fi
27443 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27444 done
27445 ac_cv_sizeof_wchar_t=$ac_lo
27446 else
27447   if test "$cross_compiling" = yes; then
27448   { { echo "$as_me:27448: error: cannot run test program while cross compiling" >&5
27449 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27450    { (exit 1); exit 1; }; }
27451 else
27452   cat >"conftest.$ac_ext" <<_ACEOF
27453 #line 27453 "configure"
27454 #include "confdefs.h"
27455 $ac_includes_default
27456 int
27457 main (void)
27458 {
27459 FILE *f = fopen ("conftest.val", "w");
27460 if (!f)
27461   $ac_main_return (1);
27462 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27463 fclose (f);
27464   ;
27465   return 0;
27466 }
27467 _ACEOF
27468 rm -f "conftest$ac_exeext"
27469 if { (eval echo "$as_me:27469: \"$ac_link\"") >&5
27470   (eval $ac_link) 2>&5
27471   ac_status=$?
27472   echo "$as_me:27472: \$? = $ac_status" >&5
27473   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27474   { (eval echo "$as_me:27474: \"$ac_try\"") >&5
27475   (eval $ac_try) 2>&5
27476   ac_status=$?
27477   echo "$as_me:27477: \$? = $ac_status" >&5
27478   (exit "$ac_status"); }; }; then
27479   ac_cv_sizeof_wchar_t=`cat conftest.val`
27480 else
27481   echo "$as_me: program exited with status $ac_status" >&5
27482 echo "$as_me: failed program was:" >&5
27483 cat "conftest.$ac_ext" >&5
27484 fi
27485 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27486 fi
27487 fi
27488 rm -f conftest.val
27489 else
27490   ac_cv_sizeof_wchar_t=0
27491 fi
27492 fi
27493 echo "$as_me:27493: result: $ac_cv_sizeof_wchar_t" >&5
27494 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27495 cat >>confdefs.h <<EOF
27496 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27497 EOF
27498
27499         # cross-compiling to mingw can run into the problem that attempting to
27500         # link with the regex library fails, causing the test to not set this to
27501         # a number.  "recent" autoconf does not address this problem either -TD
27502         if test -z "$ac_cv_sizeof_wchar_t"
27503         then
27504                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27505
27506 echo "${as_me:-configure}:27506: testing test failed (assume 2) ..." 1>&5
27507
27508                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27509                 mv confdefs.tmp confdefs.h
27510                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27511         fi
27512 fi
27513
27514 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27515 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27516 ###
27517 ### ticlib modules may be a separate library, otherwise contained in termlib.
27518 ### termlib modules may be a separate library, otherwise contained in ncurses.
27519 ###
27520 ### The of "+" or " " between the tokens controls the way the script
27521 ### chooses to split module lists into libraries.
27522 ###
27523 ### (see CF_LIB_RULES).
27524 echo "$as_me:27524: checking for library subsets" >&5
27525 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27526 LIB_SUBSETS=
27527
27528 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27529         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27530         if test "$with_ticlib" != no ; then
27531                 LIB_SUBSETS="${LIB_SUBSETS} "
27532         else
27533                 LIB_SUBSETS="${LIB_SUBSETS}+"
27534         fi
27535 fi
27536
27537 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27538 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27539
27540 if test "$with_termlib" != no ; then
27541         LIB_SUBSETS="${LIB_SUBSETS} "
27542 else
27543         LIB_SUBSETS="${LIB_SUBSETS}+"
27544 fi
27545
27546 LIB_SUBSETS="${LIB_SUBSETS}base"
27547
27548 # Most term-driver calls are to tinfo, but some like init_pair are to the
27549 # base library (so it resides in base).
27550 if test "$with_term_driver" != no ; then
27551         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27552         case "$cf_cv_system_name" in
27553         (*mingw32*|*mingw64*)
27554                 if test "x$with_exp_win32" = xyes ; then
27555                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27556                 else
27557                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27558                 fi
27559                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27560                 ;;
27561         (*)
27562                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27563                 ;;
27564         esac
27565 elif test "x$with_exp_win32" = xyes ; then
27566         case "$cf_cv_system_name" in
27567         (*mingw32*|*mingw64*)
27568                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27569                 ;;
27570         (*)
27571                 ;;
27572         esac
27573 fi
27574
27575 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27576 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27577
27578 echo "$as_me:27578: result: $LIB_SUBSETS" >&5
27579 echo "${ECHO_T}$LIB_SUBSETS" >&6
27580
27581 ### Construct the list of include-directories to be generated
27582
27583 if test "$srcdir" != "."; then
27584         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27585 fi
27586 CPPFLAGS="-I../include $CPPFLAGS"
27587 if test "$srcdir" != "."; then
27588         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27589 fi
27590 CPPFLAGS="-I. $CPPFLAGS"
27591
27592 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27593 if test "$srcdir" != "."; then
27594         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27595 fi
27596 if test "$GCC" != yes; then
27597         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27598 elif test "$includedir" != "/usr/include"; then
27599         if test "$includedir" = '${prefix}/include' ; then
27600                 if test x$prefix != x/usr ; then
27601                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27602                 fi
27603         else
27604                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27605         fi
27606 fi
27607
27608 ### Build up pieces for makefile rules
27609 echo "$as_me:27609: checking default library suffix" >&5
27610 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27611
27612         case $DFT_LWR_MODEL in
27613         (libtool) DFT_ARG_SUFFIX=''   ;;
27614         (normal)  DFT_ARG_SUFFIX=''   ;;
27615         (debug)   DFT_ARG_SUFFIX='_g' ;;
27616         (profile) DFT_ARG_SUFFIX='_p' ;;
27617         (shared)  DFT_ARG_SUFFIX=''   ;;
27618         esac
27619         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27620 echo "$as_me:27620: result: $DFT_ARG_SUFFIX" >&5
27621 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27622
27623 echo "$as_me:27623: checking default library-dependency suffix" >&5
27624 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27625
27626         case X$DFT_LWR_MODEL in
27627         (Xlibtool)
27628                 DFT_LIB_SUFFIX='.la'
27629                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27630                 ;;
27631         (Xdebug)
27632                 case "$cf_cv_system_name" in
27633                 (*-msvc*)
27634                         DFT_LIB_SUFFIX='_g.lib'
27635                         ;;
27636                 (*)
27637                         DFT_LIB_SUFFIX='_g.a'
27638                         ;;
27639                 esac
27640                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27641                 ;;
27642         (Xprofile)
27643                 case "$cf_cv_system_name" in
27644                 (*-msvc*)
27645                         DFT_LIB_SUFFIX='_p.lib'
27646                         ;;
27647                 (*)
27648                         DFT_LIB_SUFFIX='_p.a'
27649                         ;;
27650                 esac
27651                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27652                 ;;
27653         (Xshared)
27654                 case "$cf_cv_system_name" in
27655                 (aix[5-7]*)
27656                         DFT_LIB_SUFFIX='.so'
27657                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27658                         ;;
27659                 (*-msvc*)
27660                         DFT_LIB_SUFFIX='.dll'
27661                         DFT_DEP_SUFFIX='.dll.lib'
27662                         ;;
27663                 (cygwin*|msys*|mingw*)
27664                         DFT_LIB_SUFFIX='.dll'
27665                         DFT_DEP_SUFFIX='.dll.a'
27666                         ;;
27667                 (darwin*)
27668                         DFT_LIB_SUFFIX='.dylib'
27669                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27670                         ;;
27671                 (hpux*)
27672                         case "$target" in
27673                         (ia64*)
27674                                 DFT_LIB_SUFFIX='.so'
27675                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27676                                 ;;
27677                         (*)
27678                                 DFT_LIB_SUFFIX='.sl'
27679                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27680                                 ;;
27681                         esac
27682                         ;;
27683                 (*)
27684                         DFT_LIB_SUFFIX='.so'
27685                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27686                         ;;
27687                 esac
27688                 ;;
27689         (*)
27690                 case "$target" in
27691                 (*-msvc*)
27692                         DFT_LIB_SUFFIX='.lib'
27693                         ;;
27694                 (*)
27695                         DFT_LIB_SUFFIX='.a'
27696                         ;;
27697                 esac
27698                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27699                 ;;
27700         esac
27701         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27702         then
27703                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27704                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27705         fi
27706 echo "$as_me:27706: result: $DFT_DEP_SUFFIX" >&5
27707 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27708
27709 echo "$as_me:27709: checking default object directory" >&5
27710 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27711
27712         case $DFT_LWR_MODEL in
27713         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27714         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27715         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27716         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27717         (shared)
27718                 case "$cf_cv_system_name" in
27719                 (cygwin|msys)
27720                         DFT_OBJ_SUBDIR='objects' ;;
27721                 (*)
27722                         DFT_OBJ_SUBDIR='obj_s' ;;
27723                 esac
27724         esac
27725 echo "$as_me:27725: result: $DFT_OBJ_SUBDIR" >&5
27726 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27727
27728 if test "x$cf_with_cxx" = xyes ; then
27729 echo "$as_me:27729: checking c++ library-dependency suffix" >&5
27730 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27731 if test "$with_libtool" != "no"; then
27732         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27733         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27734 elif test "$with_shared_cxx" != "no"; then
27735         # also for g++ users...
27736         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27737 else
27738         # we normally make a static library because C/C++ library rules differ
27739
27740         case Xnormal in
27741         (Xlibtool)
27742                 CXX_LIB_SUFFIX='.la'
27743                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27744                 ;;
27745         (Xdebug)
27746                 case "$cf_cv_system_name" in
27747                 (*-msvc*)
27748                         CXX_LIB_SUFFIX='_g.lib'
27749                         ;;
27750                 (*)
27751                         CXX_LIB_SUFFIX='_g.a'
27752                         ;;
27753                 esac
27754                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27755                 ;;
27756         (Xprofile)
27757                 case "$cf_cv_system_name" in
27758                 (*-msvc*)
27759                         CXX_LIB_SUFFIX='_p.lib'
27760                         ;;
27761                 (*)
27762                         CXX_LIB_SUFFIX='_p.a'
27763                         ;;
27764                 esac
27765                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27766                 ;;
27767         (Xshared)
27768                 case "$cf_cv_system_name" in
27769                 (aix[5-7]*)
27770                         CXX_LIB_SUFFIX='.so'
27771                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27772                         ;;
27773                 (*-msvc*)
27774                         CXX_LIB_SUFFIX='.dll'
27775                         CXX_DEP_SUFFIX='.dll.lib'
27776                         ;;
27777                 (cygwin*|msys*|mingw*)
27778                         CXX_LIB_SUFFIX='.dll'
27779                         CXX_DEP_SUFFIX='.dll.a'
27780                         ;;
27781                 (darwin*)
27782                         CXX_LIB_SUFFIX='.dylib'
27783                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27784                         ;;
27785                 (hpux*)
27786                         case "$target" in
27787                         (ia64*)
27788                                 CXX_LIB_SUFFIX='.so'
27789                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27790                                 ;;
27791                         (*)
27792                                 CXX_LIB_SUFFIX='.sl'
27793                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27794                                 ;;
27795                         esac
27796                         ;;
27797                 (*)
27798                         CXX_LIB_SUFFIX='.so'
27799                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27800                         ;;
27801                 esac
27802                 ;;
27803         (*)
27804                 case "$target" in
27805                 (*-msvc*)
27806                         CXX_LIB_SUFFIX='.lib'
27807                         ;;
27808                 (*)
27809                         CXX_LIB_SUFFIX='.a'
27810                         ;;
27811                 esac
27812                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27813                 ;;
27814         esac
27815         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27816         then
27817                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27818                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27819         fi
27820
27821 fi
27822 echo "$as_me:27822: result: $CXX_LIB_SUFFIX" >&5
27823 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27824
27825 fi
27826
27827 # do not want -ldl in build except as needed for -lncurses dependency
27828 if test "x$with_dlsym" = xyes ; then
27829 if test "$DFT_LWR_MODEL" = shared || \
27830    test "$DFT_LWR_MODEL" = libtool ; then
27831
27832 # remove dl library from $LIBS
27833 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27834
27835 fi
27836 fi
27837 ### Set up low-level terminfo dependencies for makefiles.
27838
27839 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27840 # do not need libdl
27841 TICS_LIST=
27842 if test "x$with_dlsym" = xyes ; then
27843
27844 # remove dl library from $SHLIB_LIST
27845 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27846
27847 fi
27848
27849 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27850 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27851 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27852 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27853 then
27854         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27855 fi
27856
27857 if test "$with_ticlib" != no ; then
27858
27859         if test "x$with_ticlib" != xyes ; then
27860                 TICS_NAME=$with_ticlib
27861                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27862                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27863                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27864                 TICS_LIB_SUFFIX="${with_ticlib}"
27865         else
27866                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27867                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27868                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27869                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27870         fi
27871         TICS_LDFLAGS="-L${LIB_DIR}"
27872         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27873 else
27874         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27875         TICS_LDFLAGS="-L${LIB_DIR}"
27876         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27877 fi
27878
27879 if test "$with_termlib" != no ; then
27880
27881         if test "x$with_termlib" != xyes ; then
27882                 TINFO_NAME=$with_termlib
27883                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27884                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27885                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27886                 TINFO_LIB_SUFFIX="${with_termlib}"
27887         else
27888                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27889                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27890                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27891                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27892         fi
27893
27894         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27895         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27896         if test "$DFT_LWR_MODEL" = "libtool"; then
27897                 TEST_ARGS="${TEST_DEPS}"
27898                 TEST_ARG2="${TEST_DEP2}"
27899                 TINFO_LDFLAGS="-L${LIB_DIR}"
27900                 TINFO_LIBS="$TEST_ARGS"
27901                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27902                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27903         else
27904                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27905                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27906                 if test "x$with_term_driver" != xno ; then
27907                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27908                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27909                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27910                 else
27911                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27912                         TINFO_LIBS="$TEST_ARGS"
27913                 fi
27914                 TINFO_LDFLAGS="-L${LIB_DIR}"
27915                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27916         fi
27917 else
27918         # the next lines are needed for linking libtic over libncurses
27919         TINFO_NAME=${LIB_NAME}
27920         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27921         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27922         if test "x$with_tic_depends" = xyes ; then
27923                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27924         else
27925                 TICS_LIST="$SHLIB_LIST"
27926         fi
27927
27928         TINFO_LDFLAGS="-L${LIB_DIR}"
27929         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27930 fi
27931
27932 if test "$DFT_LWR_MODEL" = shared ; then
27933         case "$cf_cv_system_name" in
27934         (cygwin*|msys*)
27935                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27936                 TINFO_SUFFIX=.dll
27937                 ;;
27938         esac
27939 fi
27940
27941 if test "x$with_dlsym" = xyes ; then
27942
27943 # remove dl library from $TICS_LIST
27944 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27945
27946 fi
27947
27948 if test "$DFT_LWR_MODEL" = "libtool"; then
27949         OBJEXT=lo
27950 fi
27951
27952 # needed for Ada95
27953 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27954
27955 case "$DFT_LWR_MODEL" in
27956 (normal|debug|profile)
27957
27958 if test "$GCC" = yes ; then
27959         case "$cf_cv_system_name" in
27960         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27961                 LDFLAGS_STATIC=
27962                 LDFLAGS_SHARED=
27963                 ;;
27964         (*)     # normally, except when broken
27965                 LDFLAGS_STATIC=-static
27966                 LDFLAGS_SHARED=-dynamic
27967                 ;;
27968         esac
27969 else
27970         case "$cf_cv_system_name" in
27971         (aix[4-7]*)     # from ld manpage
27972                 LDFLAGS_STATIC=-bstatic
27973                 LDFLAGS_SHARED=-bdynamic
27974                 ;;
27975         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27976                 # We could also use just "archive" and "shared".
27977                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27978                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27979                 ;;
27980         (irix*)         # from ld manpage IRIX64
27981                 LDFLAGS_STATIC=-Bstatic
27982                 LDFLAGS_SHARED=-Bdynamic
27983                 ;;
27984         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27985                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27986                 LDFLAGS_STATIC=-noso
27987                 LDFLAGS_SHARED=-so_archive
27988                 ;;
27989         (solaris2*)
27990                 LDFLAGS_STATIC=-Bstatic
27991                 LDFLAGS_SHARED=-Bdynamic
27992                 ;;
27993         esac
27994 fi
27995
27996 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27997 then
27998         echo "$as_me:27998: checking if linker supports switching between static/dynamic" >&5
27999 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28000
28001         rm -f libconftest.a
28002         cat >conftest.$ac_ext <<EOF
28003 #line 28003 "configure"
28004 #include <stdio.h>
28005 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28006 EOF
28007         if { (eval echo "$as_me:28007: \"$ac_compile\"") >&5
28008   (eval $ac_compile) 2>&5
28009   ac_status=$?
28010   echo "$as_me:28010: \$? = $ac_status" >&5
28011   (exit "$ac_status"); } ; then
28012                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28013                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28014         fi
28015         rm -f conftest.*
28016
28017         cf_save_LIBS="$LIBS"
28018
28019         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28020         cat >"conftest.$ac_ext" <<_ACEOF
28021 #line 28021 "configure"
28022 #include "confdefs.h"
28023
28024 #line 28024 "configure"
28025 #include <stdio.h>
28026 int cf_ldflags_static(FILE *fp);
28027
28028 int
28029 main (void)
28030 {
28031
28032         return cf_ldflags_static(stdin);
28033
28034   ;
28035   return 0;
28036 }
28037 _ACEOF
28038 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28039 if { (eval echo "$as_me:28039: \"$ac_link\"") >&5
28040   (eval $ac_link) 2>&5
28041   ac_status=$?
28042   echo "$as_me:28042: \$? = $ac_status" >&5
28043   (exit "$ac_status"); } &&
28044          { ac_try='test -s "conftest$ac_exeext"'
28045   { (eval echo "$as_me:28045: \"$ac_try\"") >&5
28046   (eval $ac_try) 2>&5
28047   ac_status=$?
28048   echo "$as_me:28048: \$? = $ac_status" >&5
28049   (exit "$ac_status"); }; }; then
28050
28051         # some linkers simply ignore the -dynamic
28052         case x`file "conftest$ac_exeext" 2>/dev/null` in
28053         (*static*)
28054                 cf_ldflags_static=no
28055                 ;;
28056         (*)
28057                 cf_ldflags_static=yes
28058                 ;;
28059         esac
28060
28061 else
28062   echo "$as_me: failed program was:" >&5
28063 cat "conftest.$ac_ext" >&5
28064 cf_ldflags_static=no
28065 fi
28066 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28067
28068         rm -f libconftest.*
28069         LIBS="$cf_save_LIBS"
28070
28071         echo "$as_me:28071: result: $cf_ldflags_static" >&5
28072 echo "${ECHO_T}$cf_ldflags_static" >&6
28073
28074         if test "$cf_ldflags_static" != yes
28075         then
28076                 LDFLAGS_STATIC=
28077                 LDFLAGS_SHARED=
28078         fi
28079 else
28080         LDFLAGS_STATIC=
28081         LDFLAGS_SHARED=
28082 fi
28083
28084         ;;
28085 esac
28086
28087 echo "$as_me:28087: checking where we will install curses.h" >&5
28088 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28089
28090 includesubdir=
28091 if test "$with_overwrite" = no && \
28092  { test "x$includedir" = 'x${prefix}/include' || \
28093    test "x$includedir" = "x${prefix}/include"; }
28094 then
28095         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28096 fi
28097 echo "$as_me:28097: result: ${includedir}${includesubdir}" >&5
28098 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28099
28100 ### Resolve a conflict between normal and wide-curses by forcing applications
28101 ### that will need libutf8 to add it to their configure script.
28102 if test "$with_overwrite" != no ; then
28103 if test "$NCURSES_LIBUTF8" = 1 ; then
28104         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28105         { echo "$as_me:28105: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28106 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28107 fi
28108 fi
28109 WITH_OVERWRITE=$with_overwrite
28110
28111 ### At least on MinGW a shared library build without libtool
28112 ### requires adding the additional libs to the link list.
28113 case "$cf_cv_system_name" in
28114 (*mingw32*|*mingw64*)
28115         if test "$DFT_LWR_MODEL" != "libtool"; then
28116            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28117         fi
28118         ;;
28119 *)      ;;
28120 esac
28121
28122 # used to separate tack out of the tree
28123 NCURSES_TREE=
28124
28125 ### predefined stuff for the test programs
28126
28127 cat >>confdefs.h <<\EOF
28128 #define HAVE_SLK_COLOR 1
28129 EOF
28130
28131 # pkgsrc uses these
28132
28133 echo "$as_me:28133: checking for desired basename for form library" >&5
28134 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28135
28136 # Check whether --with-form-libname or --without-form-libname was given.
28137 if test "${with_form_libname+set}" = set; then
28138   withval="$with_form_libname"
28139   with_lib_basename=$withval
28140 else
28141   with_lib_basename=form
28142 fi;
28143 FORM_NAME="$with_lib_basename"
28144
28145 case "x$FORM_NAME" in
28146 (x|xno|xnone|xyes)
28147         FORM_NAME=form
28148         ;;
28149 (*)
28150         ;;
28151 esac
28152
28153 echo "$as_me:28153: result: $FORM_NAME" >&5
28154 echo "${ECHO_T}$FORM_NAME" >&6
28155
28156 echo "$as_me:28156: checking for desired basename for menu library" >&5
28157 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28158
28159 # Check whether --with-menu-libname or --without-menu-libname was given.
28160 if test "${with_menu_libname+set}" = set; then
28161   withval="$with_menu_libname"
28162   with_lib_basename=$withval
28163 else
28164   with_lib_basename=menu
28165 fi;
28166 MENU_NAME="$with_lib_basename"
28167
28168 case "x$MENU_NAME" in
28169 (x|xno|xnone|xyes)
28170         MENU_NAME=menu
28171         ;;
28172 (*)
28173         ;;
28174 esac
28175
28176 echo "$as_me:28176: result: $MENU_NAME" >&5
28177 echo "${ECHO_T}$MENU_NAME" >&6
28178
28179 echo "$as_me:28179: checking for desired basename for panel library" >&5
28180 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28181
28182 # Check whether --with-panel-libname or --without-panel-libname was given.
28183 if test "${with_panel_libname+set}" = set; then
28184   withval="$with_panel_libname"
28185   with_lib_basename=$withval
28186 else
28187   with_lib_basename=panel
28188 fi;
28189 PANEL_NAME="$with_lib_basename"
28190
28191 case "x$PANEL_NAME" in
28192 (x|xno|xnone|xyes)
28193         PANEL_NAME=panel
28194         ;;
28195 (*)
28196         ;;
28197 esac
28198
28199 echo "$as_me:28199: result: $PANEL_NAME" >&5
28200 echo "${ECHO_T}$PANEL_NAME" >&6
28201
28202 echo "$as_me:28202: checking for desired basename for cxx library" >&5
28203 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28204
28205 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28206 if test "${with_cxx_libname+set}" = set; then
28207   withval="$with_cxx_libname"
28208   with_lib_basename=$withval
28209 else
28210   with_lib_basename=ncurses++
28211 fi;
28212 CXX_NAME="$with_lib_basename"
28213
28214 case "x$CXX_NAME" in
28215 (x|xno|xnone|xyes)
28216         CXX_NAME=ncurses++
28217         ;;
28218 (*)
28219         ;;
28220 esac
28221
28222 echo "$as_me:28222: result: $CXX_NAME" >&5
28223 echo "${ECHO_T}$CXX_NAME" >&6
28224
28225 ### Construct the list of subdirectories for which we'll customize makefiles
28226 ### with the appropriate compile-rules.
28227
28228 echo "$as_me:28228: checking for src modules" >&5
28229 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28230
28231 # dependencies and linker-arguments for test-programs
28232 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28233 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28234 if test "$DFT_LWR_MODEL" = "libtool"; then
28235         TEST_ARGS="${TEST_DEPS}"
28236         TEST_ARG2="${TEST_DEP2}"
28237 else
28238         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28239         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28240 fi
28241
28242 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28243 cf_cv_src_modules=
28244 for cf_dir in $modules_to_build
28245 do
28246         if test -f "$srcdir/$cf_dir/modules" ; then
28247
28248                 # We may/may not have tack in the distribution, though the
28249                 # makefile is.
28250                 if test "$cf_dir" = tack ; then
28251                         if test "x$cf_with_tack" != "xyes"; then
28252                                 continue
28253                         fi
28254                 fi
28255
28256                 if test -z "$cf_cv_src_modules"; then
28257                         cf_cv_src_modules=$cf_dir
28258                 else
28259                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28260                 fi
28261
28262                 # Make the ncurses_cfg.h file record the library interface files as
28263                 # well.  These are header files that are the same name as their
28264                 # directory.  Ncurses is the only library that does not follow
28265                 # that pattern.
28266                 if test "$cf_dir" = tack ; then
28267                         continue
28268                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28269
28270 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28271
28272                         cat >>confdefs.h <<EOF
28273 #define HAVE_${cf_have_include}_H 1
28274 EOF
28275
28276                         cat >>confdefs.h <<EOF
28277 #define HAVE_LIB${cf_have_include} 1
28278 EOF
28279
28280 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28281
28282 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28283
28284                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28285                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28286                         if test "$DFT_LWR_MODEL" = "libtool"; then
28287                                 TEST_ARGS="${TEST_DEPS}"
28288                                 TEST_ARG2="${TEST_DEP2}"
28289                         else
28290                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28291                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28292                         fi
28293                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28294                 fi
28295         fi
28296 done
28297 echo "$as_me:28297: result: $cf_cv_src_modules" >&5
28298 echo "${ECHO_T}$cf_cv_src_modules" >&6
28299
28300 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28301 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28302
28303 SRC_SUBDIRS=
28304 if test "x$cf_with_manpages" != xno ; then
28305         SRC_SUBDIRS="$SRC_SUBDIRS man"
28306 fi
28307 SRC_SUBDIRS="$SRC_SUBDIRS include"
28308 for cf_dir in $cf_cv_src_modules
28309 do
28310         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28311 done
28312 if test "x$cf_with_tests" != "xno" ; then
28313         SRC_SUBDIRS="$SRC_SUBDIRS test"
28314 fi
28315 # always make this, to install the ncurses-config script
28316 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28317 if test "$cf_with_cxx_binding" != no; then
28318         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28319         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28320 fi
28321
28322 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28323 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28324
28325 ADA_SUBDIRS=
28326 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28327         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28328         ADA_SUBDIRS="gen src"
28329         if test "x$cf_with_tests" != "xno" ; then
28330                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28331         fi
28332 fi
28333
28334 SUB_MAKEFILES=
28335 for cf_dir in $SRC_SUBDIRS
28336 do
28337         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28338 done
28339
28340 if test -n "$ADA_SUBDIRS"; then
28341         for cf_dir in $ADA_SUBDIRS
28342         do
28343                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28344         done
28345
28346 fi
28347
28348 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28349    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28350    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28351    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28352 fi
28353
28354 DIRS_TO_MAKE="lib"
28355 for cf_item in $cf_list_models
28356 do
28357
28358         case $cf_item in
28359         (libtool) cf_subdir='obj_lo'  ;;
28360         (normal)  cf_subdir='objects' ;;
28361         (debug)   cf_subdir='obj_g' ;;
28362         (profile) cf_subdir='obj_p' ;;
28363         (shared)
28364                 case "$cf_cv_system_name" in
28365                 (cygwin|msys)
28366                         cf_subdir='objects' ;;
28367                 (*)
28368                         cf_subdir='obj_s' ;;
28369                 esac
28370         esac
28371
28372         for cf_item2 in $DIRS_TO_MAKE
28373         do
28374                 test "$cf_item2" = "$cf_subdir" && break
28375         done
28376         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28377 done
28378 for cf_dir in $DIRS_TO_MAKE
28379 do
28380         test ! -d "$cf_dir" && mkdir "$cf_dir"
28381 done
28382
28383 # symbols that differ when compiling Ada95 by itself.
28384 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28385
28386 # values to use as strings
28387
28388 cat >>confdefs.h <<EOF
28389 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28390 EOF
28391
28392 cat >>confdefs.h <<EOF
28393 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28394 EOF
28395
28396 ### Define substitutions for header files to avoid name-pollution
28397
28398 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28399         HAVE_TCGETATTR=1
28400 else
28401         HAVE_TCGETATTR=0
28402 fi
28403
28404 if test "x$ac_cv_header_stdint_h" = xyes ; then
28405         HAVE_STDINT_H=1
28406 else
28407         HAVE_STDINT_H=0
28408 fi
28409
28410 if test "x$ac_cv_header_termio_h" = xyes ; then
28411         HAVE_TERMIO_H=1
28412 else
28413         HAVE_TERMIO_H=0
28414 fi
28415
28416 if test "x$ac_cv_header_termios_h" = xyes ; then
28417         HAVE_TERMIOS_H=1
28418 else
28419         HAVE_TERMIOS_H=0
28420 fi
28421
28422 ################################################################################
28423 test "x$use_database" = xyes && \
28424 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28425
28426 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28427 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28428
28429 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28430 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28431 fi
28432
28433 if test "x$cf_with_tests" != xno ; then
28434         MAKE_TESTS=
28435 else
28436         MAKE_TESTS="#"
28437 fi
28438
28439 ADAHTML_DIR=../../doc/html/ada
28440
28441 # workaround for OS/2 (20151017)
28442 case "$cf_cv_system_name" in
28443 (os2*)
28444         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28445         ;;
28446 (*)
28447         LIBTOOL_OPTS_CXX=
28448         ;;
28449 esac
28450
28451 # workaround for g++ versus Solaris (20131116)
28452 case "$cf_cv_system_name" in
28453 (solaris2*)
28454         case "x$CPPFLAGS" in
28455         (*-D_XOPEN_SOURCE_EXTENDED*)
28456                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28457
28458 echo "${as_me:-configure}:28458: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28459
28460                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28461                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28462                 ;;
28463         esac
28464         ;;
28465 esac
28466
28467 # Help to automatically enable the extended curses features when using either
28468 # the *-config or the ".pc" files by adding defines.
28469 echo "$as_me:28469: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28470 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28471 PKG_CFLAGS=
28472 for cf_loop1 in $CPPFLAGS_after_XOPEN
28473 do
28474         cf_found=no
28475         for cf_loop2 in $CPPFLAGS_before_XOPEN
28476         do
28477                 if test "x$cf_loop1" = "x$cf_loop2"
28478                 then
28479                         cf_found=yes
28480                         break
28481                 fi
28482         done
28483         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28484 done
28485 echo "$as_me:28485: result: $PKG_CFLAGS" >&5
28486 echo "${ECHO_T}$PKG_CFLAGS" >&6
28487
28488 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28489 case "x$NCURSES_OSPEED" in
28490 (*short*)
28491         cf_compatible=1
28492         ;;
28493 (*)
28494         cf_compatible=0
28495         ;;
28496 esac
28497
28498 cat >>confdefs.h <<EOF
28499 #define NCURSES_OSPEED_COMPAT $cf_compatible
28500 EOF
28501
28502 case "x$cf_cv_typeof_chtype" in
28503 (xshort|xint|xlong)
28504         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28505         ;;
28506 esac
28507
28508 case "x$cf_cv_typeof_mmask_t" in
28509 (xshort|xint|xlong)
28510         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28511         ;;
28512 esac
28513
28514 # substitute into misc/Makefile to suppress
28515 # (un)install.data from the
28516 # (un)install rules.
28517 if test "x$cf_with_db_install" = "xno"; then
28518         MISC_INSTALL_DATA=
28519         MISC_UNINSTALL_DATA=
28520 else
28521         MISC_INSTALL_DATA=install.data
28522         MISC_UNINSTALL_DATA=uninstall.data
28523 fi
28524
28525 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28526         MAKE_DATABASE="#"
28527 else
28528         MAKE_DATABASE="$MAKE_TERMINFO"
28529 fi
28530
28531 if test -n "$PACKAGE"
28532 then
28533         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28534         export PACKAGE
28535         echo "package: $PACKAGE"
28536 fi
28537
28538 UNALTERED_SYMS=
28539 cf_filter_syms=no
28540
28541 if test -n "$RESULTING_SYMS"
28542 then
28543         cf_filter_syms=$cf_dft_filter_syms
28544         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28545
28546 echo "${as_me:-configure}:28546: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28547
28548 fi
28549
28550 if test "x$WILDCARD_SYMS" = xno
28551 then
28552         cf_filter_syms=yes
28553 fi
28554
28555 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28556
28557 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28558 if test "$cf_filter_syms" = yes
28559 then
28560         RESULTING_SYMS=resulting.map
28561 fi
28562
28563 if test "x$cross_compiling" = xyes ; then
28564         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28565         CHECK_BUILD="#"
28566 else
28567         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28568         CHECK_BUILD=
28569 fi
28570
28571 # This is used for the *-config script and *.pc data files.
28572
28573 echo "$as_me:28573: checking for linker search path" >&5
28574 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28575 if test "${cf_cv_ld_searchpath+set}" = set; then
28576   echo $ECHO_N "(cached) $ECHO_C" >&6
28577 else
28578
28579 if test "$cross_compiling" != yes ; then
28580
28581 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28582 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28583
28584 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28585 # update the cache, which makes it run faster.
28586 test -z "$cf_pathlist" && \
28587         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28588
28589 test -z "$cf_pathlist" &&
28590         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28591
28592 # This works with OpenBSD 6.5, which lists only filenames
28593 test -z "$cf_pathlist" &&
28594         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28595
28596 if test -z "$cf_pathlist"
28597 then
28598         # dyld default path with MacOS
28599         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28600         then
28601                 # do this to bypass check
28602                 cf_cv_ld_searchpath='$HOME/lib'
28603                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28604         fi
28605 fi
28606
28607 if test -z "$cf_pathlist"
28608 then
28609         # Solaris is "SunOS"
28610         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28611         then
28612                 case x`(isainfo -b)` in
28613                 (x64)
28614                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28615                         ;;
28616                 (x32)
28617                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28618                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28619                         ;;
28620                 (*)
28621                         { echo "$as_me:28621: WARNING: problem with Solaris architecture" >&5
28622 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28623                         ;;
28624                 esac
28625         fi
28626 fi
28627
28628 if test -z "$cf_pathlist"
28629 then
28630         # HP-UX
28631         if test x"`uname -s`" = xHP-UX
28632         then
28633                 case x`getconf LONG_BIT` in
28634                 (x64)
28635                         cf_pathlist="/usr/lib/hpux64"
28636                         ;;
28637                 (x*)
28638                         cf_pathlist="/usr/lib/hpux32"
28639                         ;;
28640                 esac
28641         fi
28642 fi
28643
28644 fi
28645
28646 # If nothing else, assume it is conventional
28647 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28648
28649 # Finally, check that this is only directories
28650 for cf_path in $0 $cf_pathlist
28651 do
28652         if test -d "$cf_path"; then
28653                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28654                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28655         fi
28656 done
28657
28658 # Ensure that it is nonempty
28659 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28660
28661 fi
28662 echo "$as_me:28662: result: $cf_cv_ld_searchpath" >&5
28663 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28664
28665 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28666
28667 cat >>confdefs.h <<\EOF
28668 #define HAVE_CURSES_DATA_BOOLNAMES 1
28669 EOF
28670
28671 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"
28672 ac_config_commands="$ac_config_commands default"
28673 cat >confcache <<\_ACEOF
28674 # This file is a shell script that caches the results of configure
28675 # tests run on this system so they can be shared between configure
28676 # scripts and configure runs, see configure's option --config-cache.
28677 # It is not useful on other systems.  If it contains results you don't
28678 # want to keep, you may remove or edit it.
28679 #
28680 # config.status only pays attention to the cache file if you give it
28681 # the --recheck option to rerun configure.
28682 #
28683 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28684 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28685 # following values.
28686
28687 _ACEOF
28688
28689 # The following way of writing the cache mishandles newlines in values,
28690 # but we know of no workaround that is simple, portable, and efficient.
28691 # So, don't put newlines in cache variables' values.
28692 # Ultrix sh set writes to stderr and can't be redirected directly,
28693 # and sets the high bit in the cache file unless we assign to the vars.
28694 {
28695   (set) 2>&1 |
28696     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28697     *ac_space=\ *)
28698       # `set' does not quote correctly, so add quotes (double-quote
28699       # substitution turns \\\\ into \\, and sed turns \\ into \).
28700       sed -n \
28701         "s/'/'\\\\''/g;
28702           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28703       ;;
28704     *)
28705       # `set' quotes correctly as required by POSIX, so do not add quotes.
28706       sed -n \
28707         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28708       ;;
28709     esac;
28710 } |
28711   sed '
28712      t clear
28713      : clear
28714      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28715      t end
28716      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28717      : end' >>confcache
28718 if cmp -s $cache_file confcache; then :; else
28719   if test -w $cache_file; then
28720     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28721     cat confcache >$cache_file
28722   else
28723     echo "not updating unwritable cache $cache_file"
28724   fi
28725 fi
28726 rm -f confcache
28727
28728 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28729 # Let make expand exec_prefix.
28730 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28731
28732 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28733 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28734 # trailing colons and then remove the whole line if VPATH becomes empty
28735 # (actually we leave an empty line to preserve line numbers).
28736 if test "x$srcdir" = x.; then
28737   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28738 s/:*\$(srcdir):*/:/;
28739 s/:*\${srcdir}:*/:/;
28740 s/:*@srcdir@:*/:/;
28741 s/^\([^=]*=[    ]*\):*/\1/;
28742 s/:*$//;
28743 s/^[^=]*=[      ]*$//;
28744 }'
28745 fi
28746
28747 DEFS=-DHAVE_CONFIG_H
28748
28749 : "${CONFIG_STATUS=./config.status}"
28750 ac_clean_files_save=$ac_clean_files
28751 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28752 { echo "$as_me:28752: creating $CONFIG_STATUS" >&5
28753 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28754 cat >"$CONFIG_STATUS" <<_ACEOF
28755 #! $SHELL
28756 # Generated automatically by configure.
28757 # Run this file to recreate the current configuration.
28758 # Compiler output produced by configure, useful for debugging
28759 # configure, is in config.log if it exists.
28760
28761 debug=false
28762 SHELL=\${CONFIG_SHELL-$SHELL}
28763 ac_cs_invocation="\$0 \$@"
28764
28765 CLICOLOR_FORCE= GREP_OPTIONS=
28766 unset CLICOLOR_FORCE GREP_OPTIONS
28767 _ACEOF
28768
28769 cat >>"$CONFIG_STATUS" <<\_ACEOF
28770 # Be Bourne compatible
28771 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28772   emulate sh
28773   NULLCMD=:
28774 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28775   set -o posix
28776 fi
28777
28778 # Name of the executable.
28779 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28780
28781 if expr a : '\(a\)' >/dev/null 2>&1; then
28782   as_expr=expr
28783 else
28784   as_expr=false
28785 fi
28786
28787 rm -f conf$$ conf$$.exe conf$$.file
28788 echo >conf$$.file
28789 if ln -s conf$$.file conf$$ 2>/dev/null; then
28790   # We could just check for DJGPP; but this test a) works b) is more generic
28791   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28792   if test -f conf$$.exe; then
28793     # Don't use ln at all; we don't have any links
28794     as_ln_s='cp -p'
28795   else
28796     as_ln_s='ln -s'
28797   fi
28798 elif ln conf$$.file conf$$ 2>/dev/null; then
28799   as_ln_s=ln
28800 else
28801   as_ln_s='cp -p'
28802 fi
28803 rm -f conf$$ conf$$.exe conf$$.file
28804
28805 as_executable_p="test -f"
28806
28807 # Support unset when possible.
28808 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28809   as_unset="unset"
28810 else
28811   as_unset="false"
28812 fi
28813
28814 # NLS nuisances.
28815 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28816 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28817 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28818 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28819 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28820 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28821 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28822 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28823
28824 # IFS
28825 # We need space, tab and new line, in precisely that order.
28826 as_nl='
28827 '
28828 IFS="   $as_nl"
28829
28830 # CDPATH.
28831 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28832
28833 exec 6>&1
28834
28835 _ACEOF
28836
28837 # Files that config.status was made for.
28838 if test -n "$ac_config_files"; then
28839   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28840 fi
28841
28842 if test -n "$ac_config_headers"; then
28843   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28844 fi
28845
28846 if test -n "$ac_config_links"; then
28847   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28848 fi
28849
28850 if test -n "$ac_config_commands"; then
28851   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28852 fi
28853
28854 cat >>"$CONFIG_STATUS" <<\EOF
28855
28856 ac_cs_usage="\
28857 \`$as_me' instantiates files from templates according to the
28858 current configuration.
28859
28860 Usage: $0 [OPTIONS] [FILE]...
28861
28862   -h, --help       print this help, then exit
28863   -V, --version    print version number, then exit
28864   -d, --debug      don't remove temporary files
28865       --recheck    update $as_me by reconfiguring in the same conditions
28866   --file=FILE[:TEMPLATE]
28867                    instantiate the configuration file FILE
28868   --header=FILE[:TEMPLATE]
28869                    instantiate the configuration header FILE
28870
28871 Configuration files:
28872 $config_files
28873
28874 Configuration headers:
28875 $config_headers
28876
28877 Configuration commands:
28878 $config_commands
28879
28880 Report bugs to <dickey@invisible-island.net>."
28881 EOF
28882
28883 cat >>"$CONFIG_STATUS" <<EOF
28884 ac_cs_version="\\
28885 config.status
28886 configured by $0, generated by GNU Autoconf 2.52.20210509,
28887   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28888
28889 Copyright 2003-2020,2021        Thomas E. Dickey
28890 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28891 Free Software Foundation, Inc.
28892 This config.status script is free software; the Free Software Foundation
28893 gives unlimited permission to copy, distribute and modify it."
28894 srcdir="$srcdir"
28895 INSTALL="$INSTALL"
28896 EOF
28897
28898 cat >>"$CONFIG_STATUS" <<\EOF
28899 # If no file are specified by the user, then we need to provide default
28900 # value.  By we need to know if files were specified by the user.
28901 ac_need_defaults=:
28902 while test $# != 0
28903 do
28904   case $1 in
28905   --*=*)
28906     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28907     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28908     shift
28909     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28910     shift
28911     ;;
28912   -*);;
28913   *) # This is not an option, so the user has probably given explicit
28914      # arguments.
28915      ac_need_defaults=false;;
28916   esac
28917
28918   case $1 in
28919   # Handling of the options.
28920 EOF
28921 cat >>"$CONFIG_STATUS" <<EOF
28922   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28923     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28924     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28925 EOF
28926 cat >>"$CONFIG_STATUS" <<\EOF
28927   --version | --vers* | -V )
28928     echo "$ac_cs_version"; exit 0 ;;
28929   --he | --h)
28930     # Conflict between --help and --header
28931     { { echo "$as_me:28931: error: ambiguous option: $1
28932 Try \`$0 --help' for more information." >&5
28933 echo "$as_me: error: ambiguous option: $1
28934 Try \`$0 --help' for more information." >&2;}
28935    { (exit 1); exit 1; }; };;
28936   --help | --hel | -h )
28937     echo "$ac_cs_usage"; exit 0 ;;
28938   --debug | --d* | -d )
28939     debug=: ;;
28940   --file | --fil | --fi | --f )
28941     shift
28942     CONFIG_FILES="$CONFIG_FILES $1"
28943     ac_need_defaults=false;;
28944   --header | --heade | --head | --hea )
28945     shift
28946     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28947     ac_need_defaults=false;;
28948
28949   # This is an error.
28950   -*) { { echo "$as_me:28950: error: unrecognized option: $1
28951 Try \`$0 --help' for more information." >&5
28952 echo "$as_me: error: unrecognized option: $1
28953 Try \`$0 --help' for more information." >&2;}
28954    { (exit 1); exit 1; }; } ;;
28955
28956   *) ac_config_targets="$ac_config_targets $1" ;;
28957
28958   esac
28959   shift
28960 done
28961
28962 exec 5>>config.log
28963 cat >&5 << _ACEOF
28964
28965 ## ----------------------- ##
28966 ## Running config.status.  ##
28967 ## ----------------------- ##
28968
28969 This file was extended by $as_me 2.52.20210509, executed with
28970   CONFIG_FILES    = $CONFIG_FILES
28971   CONFIG_HEADERS  = $CONFIG_HEADERS
28972   CONFIG_LINKS    = $CONFIG_LINKS
28973   CONFIG_COMMANDS = $CONFIG_COMMANDS
28974   > "$ac_cs_invocation"
28975 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28976
28977 _ACEOF
28978 EOF
28979
28980 cat >>"$CONFIG_STATUS" <<EOF
28981 #
28982 # INIT-COMMANDS section.
28983 #
28984
28985 ### Special initialization commands, used to pass information from the
28986 ### configuration-run into config.status
28987
28988 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28989 AWK="$AWK"
28990 CXX_NAME="$CXX_NAME"
28991 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28992 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28993 ECHO_LD="$ECHO_LD"
28994 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28995 FORM_NAME="$FORM_NAME"
28996 LDCONFIG="$LDCONFIG"
28997 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28998 LIB_NAME="$LIB_NAME"
28999 LIB_PREFIX="$LIB_PREFIX"
29000 LIB_SUBSETS="$LIB_SUBSETS"
29001 LIB_SUFFIX="$LIB_SUFFIX"
29002 LIB_TRACING="$LIB_TRACING"
29003 LN_S="$LN_S"
29004 MAKE_TERMINFO="$MAKE_TERMINFO"
29005 MENU_NAME="$MENU_NAME"
29006 NCURSES_MAJOR="$NCURSES_MAJOR"
29007 NCURSES_MINOR="$NCURSES_MINOR"
29008 NCURSES_OSPEED="$NCURSES_OSPEED"
29009 NCURSES_PATCH="$NCURSES_PATCH"
29010 PANEL_NAME="$PANEL_NAME"
29011 SRC_SUBDIRS="$SRC_SUBDIRS"
29012 TERMINFO="$TERMINFO"
29013 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29014 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29015 TICS_NAME="$TICS_NAME"
29016 TICS_SUFFIX="$TICS_SUFFIX"
29017 TIC_PATH="$TIC_PATH"
29018 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29019 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29020 TINFO_NAME="$TINFO_NAME"
29021 TINFO_SUFFIX="$TINFO_SUFFIX"
29022 UNALTERED_SYMS="$UNALTERED_SYMS"
29023 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29024 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29025 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29026 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29027 WILDCARD_SYMS="$WILDCARD_SYMS"
29028 WITH_CURSES_H="$with_curses_h"
29029 WITH_ECHO="${enable_echo:=yes}"
29030 WITH_OVERWRITE="$with_overwrite"
29031 cf_LIST_MODELS="$cf_list_models"
29032 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29033 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29034 cf_cv_abi_version="$cf_cv_abi_version"
29035 cf_cv_do_relink="$cf_cv_do_relink"
29036 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29037 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29038 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29039 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29040 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29041 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29042 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29043 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29044 cf_cv_rel_version="$cf_cv_rel_version"
29045 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29046 cf_cv_shared_soname='$cf_cv_shared_soname'
29047 cf_cv_shlib_version="$cf_cv_shlib_version"
29048 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29049 cf_cv_system_name="$cf_cv_system_name"
29050 cf_cv_term_driver="$with_term_driver"
29051 cf_with_ada="$cf_with_ada"
29052 cf_with_cxx_binding="$cf_with_cxx_binding"
29053 cf_with_db_install="$cf_with_db_install"
29054 cf_with_manpages="$cf_with_manpages"
29055 cf_with_tests="$cf_with_tests"
29056 host="$host"
29057 target="$target"
29058 with_shared_cxx="$with_shared_cxx"
29059
29060 EOF
29061
29062 cat >>"$CONFIG_STATUS" <<\EOF
29063 for ac_config_target in $ac_config_targets
29064 do
29065   case "$ac_config_target" in
29066   # Handling of arguments.
29067   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29068   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29069   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29070   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29071   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29072   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29073   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29074   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29075   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29076   *) { { echo "$as_me:29076: error: invalid argument: $ac_config_target" >&5
29077 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29078    { (exit 1); exit 1; }; };;
29079   esac
29080 done
29081
29082 # If the user did not use the arguments to specify the items to instantiate,
29083 # then the envvar interface is used.  Set only those that are not.
29084 # We use the long form for the default assignment because of an extremely
29085 # bizarre bug on SunOS 4.1.3.
29086 if "$ac_need_defaults"; then
29087   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29088   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29089   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29090 fi
29091
29092 # Create a temporary directory, and hook for its removal unless debugging.
29093 $debug ||
29094 {
29095   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29096   trap '{ (exit 1); exit 1; }' 1 2 13 15
29097 }
29098
29099 # Create a (secure) tmp directory for tmp files.
29100 : ${TMPDIR=/tmp}
29101 {
29102   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29103   test -n "$tmp" && test -d "$tmp"
29104 }  ||
29105 {
29106   tmp=$TMPDIR/cs$$-$RANDOM
29107   (umask 077 && mkdir $tmp)
29108 } ||
29109 {
29110    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29111    { (exit 1); exit 1; }
29112 }
29113
29114 EOF
29115
29116 cat >>"$CONFIG_STATUS" <<EOF
29117
29118 #
29119 # CONFIG_FILES section.
29120 #
29121
29122 # No need to generate the scripts if there are no CONFIG_FILES.
29123 # This happens for instance when ./config.status config.h
29124 if test -n "\$CONFIG_FILES"; then
29125   # Protect against being on the right side of a sed subst in config.status.
29126   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29127    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29128 s,@SHELL@,$SHELL,;t t
29129 s,@exec_prefix@,$exec_prefix,;t t
29130 s,@prefix@,$prefix,;t t
29131 s,@program_transform_name@,$program_transform_name,;t t
29132 s,@bindir@,$bindir,;t t
29133 s,@sbindir@,$sbindir,;t t
29134 s,@libexecdir@,$libexecdir,;t t
29135 s,@datarootdir@,$datarootdir,;t t
29136 s,@datadir@,$datadir,;t t
29137 s,@sysconfdir@,$sysconfdir,;t t
29138 s,@sharedstatedir@,$sharedstatedir,;t t
29139 s,@localstatedir@,$localstatedir,;t t
29140 s,@runstatedir@,$runstatedir,;t t
29141 s,@libdir@,$libdir,;t t
29142 s,@includedir@,$includedir,;t t
29143 s,@oldincludedir@,$oldincludedir,;t t
29144 s,@infodir@,$infodir,;t t
29145 s,@mandir@,$mandir,;t t
29146 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29147 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29148 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29149 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29150 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29151 s,@build_alias@,$build_alias,;t t
29152 s,@host_alias@,$host_alias,;t t
29153 s,@target_alias@,$target_alias,;t t
29154 s,@ECHO_C@,$ECHO_C,;t t
29155 s,@ECHO_N@,$ECHO_N,;t t
29156 s,@ECHO_T@,$ECHO_T,;t t
29157 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29158 s,@DEFS@,$DEFS,;t t
29159 s,@LIBS@,$LIBS,;t t
29160 s,@top_builddir@,$top_builddir,;t t
29161 s,@GREP@,$GREP,;t t
29162 s,@EGREP@,$EGREP,;t t
29163 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29164 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29165 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29166 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29167 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29168 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29169 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29170 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29171 s,@VERSION@,$VERSION,;t t
29172 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29173 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29174 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29175 s,@PACKAGE@,$PACKAGE,;t t
29176 s,@build@,$build,;t t
29177 s,@build_cpu@,$build_cpu,;t t
29178 s,@build_vendor@,$build_vendor,;t t
29179 s,@build_os@,$build_os,;t t
29180 s,@host@,$host,;t t
29181 s,@host_cpu@,$host_cpu,;t t
29182 s,@host_vendor@,$host_vendor,;t t
29183 s,@host_os@,$host_os,;t t
29184 s,@target@,$target,;t t
29185 s,@target_cpu@,$target_cpu,;t t
29186 s,@target_vendor@,$target_vendor,;t t
29187 s,@target_os@,$target_os,;t t
29188 s,@FGREP@,$FGREP,;t t
29189 s,@CC@,$CC,;t t
29190 s,@CFLAGS@,$CFLAGS,;t t
29191 s,@LDFLAGS@,$LDFLAGS,;t t
29192 s,@CPPFLAGS@,$CPPFLAGS,;t t
29193 s,@ac_ct_CC@,$ac_ct_CC,;t t
29194 s,@EXEEXT@,$EXEEXT,;t t
29195 s,@OBJEXT@,$OBJEXT,;t t
29196 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29197 s,@CPP@,$CPP,;t t
29198 s,@LDCONFIG@,$LDCONFIG,;t t
29199 s,@CXX@,$CXX,;t t
29200 s,@CXXFLAGS@,$CXXFLAGS,;t t
29201 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29202 s,@AWK@,$AWK,;t t
29203 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29204 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29205 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29206 s,@LINT@,$LINT,;t t
29207 s,@LINT_OPTS@,$LINT_OPTS,;t t
29208 s,@LN_S@,$LN_S,;t t
29209 s,@cf_config_suffix@,$cf_config_suffix,;t t
29210 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29211 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29212 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29213 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29214 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29215 s,@SET_MAKE@,$SET_MAKE,;t t
29216 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29217 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29218 s,@CTAGS@,$CTAGS,;t t
29219 s,@ETAGS@,$ETAGS,;t t
29220 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29221 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29222 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29223 s,@RANLIB@,$RANLIB,;t t
29224 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29225 s,@LD@,$LD,;t t
29226 s,@ac_ct_LD@,$ac_ct_LD,;t t
29227 s,@AR@,$AR,;t t
29228 s,@ac_ct_AR@,$ac_ct_AR,;t t
29229 s,@NM@,$NM,;t t
29230 s,@ac_ct_NM@,$ac_ct_NM,;t t
29231 s,@ARFLAGS@,$ARFLAGS,;t t
29232 s,@DESTDIR@,$DESTDIR,;t t
29233 s,@BUILD_CC@,$BUILD_CC,;t t
29234 s,@BUILD_CPP@,$BUILD_CPP,;t t
29235 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29236 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29237 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29238 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29239 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29240 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29241 s,@cf_list_models@,$cf_list_models,;t t
29242 s,@ABI_VERSION@,$ABI_VERSION,;t t
29243 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29244 s,@LIBTOOL@,$LIBTOOL,;t t
29245 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29246 s,@LT_UNDEF@,$LT_UNDEF,;t t
29247 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29248 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29249 s,@LIB_CREATE@,$LIB_CREATE,;t t
29250 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29251 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29252 s,@LIB_PREP@,$LIB_PREP,;t t
29253 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29254 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29255 s,@LIB_LINK@,$LIB_LINK,;t t
29256 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29257 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29258 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29259 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29260 s,@TICS_NAME@,$TICS_NAME,;t t
29261 s,@TINFO_NAME@,$TINFO_NAME,;t t
29262 s,@LIB_NAME@,$LIB_NAME,;t t
29263 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29264 s,@CC_G_OPT@,$CC_G_OPT,;t t
29265 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29266 s,@LD_MODEL@,$LD_MODEL,;t t
29267 s,@shlibdir@,$shlibdir,;t t
29268 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29269 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29270 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29271 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29272 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29273 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29274 s,@LINK_PROGS@,$LINK_PROGS,;t t
29275 s,@LINK_TESTS@,$LINK_TESTS,;t t
29276 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29277 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29278 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29279 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29280 s,@RPATH_LIST@,$RPATH_LIST,;t t
29281 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29282 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29283 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29284 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29285 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29286 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29287 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29288 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29289 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29290 s,@TIC@,$TIC,;t t
29291 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29292 s,@INFOCMP@,$INFOCMP,;t t
29293 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29294 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29295 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29296 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29297 s,@XTERM_KBS@,$XTERM_KBS,;t t
29298 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29299 s,@TERMINFO@,$TERMINFO,;t t
29300 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29301 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29302 s,@TERMPATH@,$TERMPATH,;t t
29303 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29304 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29305 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29306 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29307 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29308 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29309 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29310 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29311 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29312 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29313 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29314 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29315 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29316 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29317 s,@RGB_PATH@,$RGB_PATH,;t t
29318 s,@no_x11_rgb@,$no_x11_rgb,;t t
29319 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29320 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29321 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29322 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29323 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29324 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29325 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29326 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29327 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29328 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29329 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29330 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29331 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29332 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29333 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29334 s,@PTHREAD@,$PTHREAD,;t t
29335 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29336 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29337 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29338 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29339 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29340 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29341 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29342 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29343 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29344 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29345 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29346 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29347 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29348 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29349 s,@ECHO_LT@,$ECHO_LT,;t t
29350 s,@ECHO_LD@,$ECHO_LD,;t t
29351 s,@RULE_CC@,$RULE_CC,;t t
29352 s,@SHOW_CC@,$SHOW_CC,;t t
29353 s,@ECHO_CC@,$ECHO_CC,;t t
29354 s,@ECHO_LINK@,$ECHO_LINK,;t t
29355 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29356 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29357 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29358 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29359 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29360 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29361 s,@ADAFLAGS@,$ADAFLAGS,;t t
29362 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29363 s,@ADA_TRACE@,$ADA_TRACE,;t t
29364 s,@MATH_LIB@,$MATH_LIB,;t t
29365 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29366 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29367 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29368 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29369 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29370 s,@TEST_LIBS@,$TEST_LIBS,;t t
29371 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29372 s,@CXXCPP@,$CXXCPP,;t t
29373 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29374 s,@CXX_AR@,$CXX_AR,;t t
29375 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29376 s,@CXXLIBS@,$CXXLIBS,;t t
29377 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29378 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29379 s,@M4_exists@,$M4_exists,;t t
29380 s,@cf_ada_make@,$cf_ada_make,;t t
29381 s,@cf_ada_config@,$cf_ada_config,;t t
29382 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29383 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29384 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29385 s,@cf_compile_generics@,$cf_compile_generics,;t t
29386 s,@cf_generic_objects@,$cf_generic_objects,;t t
29387 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29388 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29389 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29390 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29391 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29392 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29393 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29394 s,@cf_ada_package@,$cf_ada_package,;t t
29395 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29396 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29397 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29398 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29399 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29400 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29401 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29402 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29403 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29404 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29405 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29406 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29407 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29408 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29409 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29410 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29411 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29412 s,@TICS_LIBS@,$TICS_LIBS,;t t
29413 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29414 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29415 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29416 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29417 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29418 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29419 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29420 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29421 s,@includesubdir@,$includesubdir,;t t
29422 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29423 s,@TICS_LIST@,$TICS_LIST,;t t
29424 s,@TINFO_LIST@,$TINFO_LIST,;t t
29425 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29426 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29427 s,@FORM_NAME@,$FORM_NAME,;t t
29428 s,@MENU_NAME@,$MENU_NAME,;t t
29429 s,@PANEL_NAME@,$PANEL_NAME,;t t
29430 s,@CXX_NAME@,$CXX_NAME,;t t
29431 s,@TEST_ARGS@,$TEST_ARGS,;t t
29432 s,@TEST_DEPS@,$TEST_DEPS,;t t
29433 s,@TEST_ARG2@,$TEST_ARG2,;t t
29434 s,@TEST_DEP2@,$TEST_DEP2,;t t
29435 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29436 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29437 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29438 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29439 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29440 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29441 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29442 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29443 s,@cross_compiling@,$cross_compiling,;t t
29444 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29445 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29446 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29447 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29448 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29449 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29450 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29451 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29452 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29453 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29454 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29455 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29456 CEOF
29457
29458 EOF
29459
29460   cat >>"$CONFIG_STATUS" <<\EOF
29461   # Split the substitutions into bite-sized pieces for seds with
29462   # small command number limits, like on Digital OSF/1 and HP-UX.
29463   ac_max_sed_lines=48
29464   ac_sed_frag=1 # Number of current file.
29465   ac_beg=1 # First line for current file.
29466   ac_end=$ac_max_sed_lines # Line after last line for current file.
29467   ac_more_lines=:
29468   ac_sed_cmds=
29469   while "$ac_more_lines"; do
29470     if test "$ac_beg" -gt 1; then
29471       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29472     else
29473       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29474     fi
29475     if test ! -s $tmp/subs.frag; then
29476       ac_more_lines=false
29477     else
29478       # The purpose of the label and of the branching condition is to
29479       # speed up the sed processing (if there are no `@' at all, there
29480       # is no need to browse any of the substitutions).
29481       # These are the two extra sed commands mentioned above.
29482       (echo ':t
29483   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29484       # It is possible to make a multiline substitution using escaped newlines.
29485       # Ensure that we do not split the substitution between script fragments.
29486       ac_BEG=$ac_end
29487       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29488       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29489       if test -s $tmp/subs.next; then
29490         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29491         if test ! -s $tmp/subs.edit; then
29492           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29493           if test ! -s $tmp/subs.edit; then
29494             if test "$ac_beg" -gt 1; then
29495               ac_end=`expr "$ac_end" - 1`
29496               continue
29497             fi
29498           fi
29499         fi
29500       fi
29501
29502       if test -z "$ac_sed_cmds"; then
29503         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29504       else
29505         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29506       fi
29507       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29508       ac_beg=$ac_end
29509       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29510     fi
29511   done
29512   if test -z "$ac_sed_cmds"; then
29513     ac_sed_cmds=cat
29514   fi
29515 fi # test -n "$CONFIG_FILES"
29516
29517 EOF
29518 cat >>"$CONFIG_STATUS" <<\EOF
29519 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29520   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29521   case "$ac_file" in
29522   - | *:- | *:-:* ) # input from stdin
29523         cat >$tmp/stdin
29524         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29525         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29526   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29527         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29528   * )   ac_file_in=$ac_file.in ;;
29529   esac
29530
29531   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29532   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29533          X"$ac_file" : 'X\(//\)[^/]' \| \
29534          X"$ac_file" : 'X\(//\)$' \| \
29535          X"$ac_file" : 'X\(/\)' \| \
29536          .     : '\(.\)' 2>/dev/null ||
29537 echo X"$ac_file" |
29538     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29539           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29540           /^X\(\/\/\)$/{ s//\1/; q; }
29541           /^X\(\/\).*/{ s//\1/; q; }
29542           s/.*/./; q'`
29543   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29544     { case "$ac_dir" in
29545   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29546   *)                      as_incr_dir=.;;
29547 esac
29548 as_dummy="$ac_dir"
29549 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29550   case $as_mkdir_dir in
29551     # Skip DOS drivespec
29552     ?:) as_incr_dir=$as_mkdir_dir ;;
29553     *)
29554       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29555       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29556     ;;
29557   esac
29558 done; }
29559
29560     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29561     # A "../" for each directory in $ac_dir_suffix.
29562     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29563   else
29564     ac_dir_suffix= ac_dots=
29565   fi
29566
29567   case "$srcdir" in
29568   .)  ac_srcdir=.
29569       if test -z "$ac_dots"; then
29570          ac_top_srcdir=.
29571       else
29572          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29573       fi ;;
29574   [\\/]* | ?:[\\/]* )
29575       ac_srcdir="$srcdir$ac_dir_suffix";
29576       ac_top_srcdir="$srcdir" ;;
29577   *) # Relative path.
29578     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29579     ac_top_srcdir="$ac_dots$srcdir" ;;
29580   esac
29581
29582   case $INSTALL in
29583   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29584   *) ac_INSTALL=$ac_dots$INSTALL ;;
29585   esac
29586
29587   if test x"$ac_file" != x-; then
29588     { echo "$as_me:29588: creating $ac_file" >&5
29589 echo "$as_me: creating $ac_file" >&6;}
29590     rm -f "$ac_file"
29591   fi
29592   # Let's still pretend it is `configure' which instantiates (i.e., don't
29593   # use $as_me), people would be surprised to read:
29594   #    /* config.h.  Generated automatically by config.status.  */
29595   configure_input="Generated automatically from `echo $ac_file_in |
29596                                                  sed 's,.*/,,'` by configure."
29597
29598   # First look for the input files in the build tree, otherwise in the
29599   # src tree.
29600   ac_file_inputs=`IFS=:
29601     for f in $ac_file_in; do
29602       case $f in
29603       -) echo $tmp/stdin ;;
29604       [\\/$]*)
29605          # Absolute (can't be DOS-style, as IFS=:)
29606          test -f "$f" || { { echo "$as_me:29606: error: cannot find input file: $f" >&5
29607 echo "$as_me: error: cannot find input file: $f" >&2;}
29608    { (exit 1); exit 1; }; }
29609          echo $f;;
29610       *) # Relative
29611          if test -f "$f"; then
29612            # Build tree
29613            echo $f
29614          elif test -f "$srcdir/$f"; then
29615            # Source tree
29616            echo "$srcdir/$f"
29617          else
29618            # /dev/null tree
29619            { { echo "$as_me:29619: error: cannot find input file: $f" >&5
29620 echo "$as_me: error: cannot find input file: $f" >&2;}
29621    { (exit 1); exit 1; }; }
29622          fi;;
29623       esac
29624     done` || { (exit 1); exit 1; }
29625 EOF
29626 cat >>"$CONFIG_STATUS" <<\EOF
29627   ac_warn_datarootdir=no
29628   if test x"$ac_file" != x-; then
29629     for ac_item in $ac_file_inputs
29630     do
29631       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29632       if test -n "$ac_seen"; then
29633         ac_used=`grep '@datarootdir@' "$ac_item"`
29634         if test -z "$ac_used"; then
29635           { echo "$as_me:29635: WARNING: datarootdir was used implicitly but not set:
29636 $ac_seen" >&5
29637 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29638 $ac_seen" >&2;}
29639           ac_warn_datarootdir=yes
29640         fi
29641       fi
29642       ac_seen=`grep '${datarootdir}' "$ac_item"`
29643       if test -n "$ac_seen"; then
29644         { echo "$as_me:29644: WARNING: datarootdir was used explicitly but not set:
29645 $ac_seen" >&5
29646 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29647 $ac_seen" >&2;}
29648         ac_warn_datarootdir=yes
29649       fi
29650     done
29651   fi
29652
29653 if test "x$ac_warn_datarootdir" = xyes; then
29654   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29655 fi
29656
29657 EOF
29658 cat >>"$CONFIG_STATUS" <<EOF
29659   sed "$ac_vpsub
29660 $extrasub
29661 EOF
29662 cat >>"$CONFIG_STATUS" <<\EOF
29663 :t
29664 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29665 s,@configure_input@,$configure_input,;t t
29666 s,@srcdir@,$ac_srcdir,;t t
29667 s,@top_srcdir@,$ac_top_srcdir,;t t
29668 s,@INSTALL@,$ac_INSTALL,;t t
29669 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29670   rm -f $tmp/stdin
29671   if test x"$ac_file" != x-; then
29672     cp "$tmp/out" "$ac_file"
29673
29674     for ac_name in prefix exec_prefix datarootdir
29675     do
29676         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29677         if test -n "$ac_seen"; then
29678             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29679             if test -z "$ac_init"; then
29680               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29681               { echo "$as_me:29681: WARNING: Variable $ac_name is used but was not set:
29682 $ac_seen" >&5
29683 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29684 $ac_seen" >&2;}
29685             fi
29686         fi
29687     done
29688     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29689     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29690     if test -s $tmp/out; then
29691       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29692       { echo "$as_me:29692: WARNING: Some variables may not be substituted:
29693 $ac_seen" >&5
29694 echo "$as_me: WARNING: Some variables may not be substituted:
29695 $ac_seen" >&2;}
29696     fi
29697   else
29698     cat $tmp/out
29699   fi
29700   rm -f $tmp/out
29701
29702 done
29703 EOF
29704 cat >>"$CONFIG_STATUS" <<\EOF
29705
29706 #
29707 # CONFIG_HEADER section.
29708 #
29709
29710 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29711 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29712 #
29713 # ac_d sets the value in "#define NAME VALUE" lines.
29714 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29715 ac_dB='[        ].*$,\1#\2'
29716 ac_dC=' '
29717 ac_dD=',;t'
29718 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29719 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29720 ac_iB='\([      ]\),\1#\2define\3'
29721 ac_iC=' '
29722 ac_iD='\4,;t'
29723 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29724 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29725 ac_uB='$,\1#\2define\3'
29726 ac_uC=' '
29727 ac_uD=',;t'
29728
29729 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29730   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29731   case "$ac_file" in
29732   - | *:- | *:-:* ) # input from stdin
29733         cat >$tmp/stdin
29734         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29735         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29736   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29737         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29738   * )   ac_file_in=$ac_file.in ;;
29739   esac
29740
29741   test x"$ac_file" != x- && { echo "$as_me:29741: creating $ac_file" >&5
29742 echo "$as_me: creating $ac_file" >&6;}
29743
29744   # First look for the input files in the build tree, otherwise in the
29745   # src tree.
29746   ac_file_inputs=`IFS=:
29747     for f in $ac_file_in; do
29748       case $f in
29749       -) echo $tmp/stdin ;;
29750       [\\/$]*)
29751          # Absolute (can't be DOS-style, as IFS=:)
29752          test -f "$f" || { { echo "$as_me:29752: error: cannot find input file: $f" >&5
29753 echo "$as_me: error: cannot find input file: $f" >&2;}
29754    { (exit 1); exit 1; }; }
29755          echo $f;;
29756       *) # Relative
29757          if test -f "$f"; then
29758            # Build tree
29759            echo $f
29760          elif test -f "$srcdir/$f"; then
29761            # Source tree
29762            echo "$srcdir/$f"
29763          else
29764            # /dev/null tree
29765            { { echo "$as_me:29765: error: cannot find input file: $f" >&5
29766 echo "$as_me: error: cannot find input file: $f" >&2;}
29767    { (exit 1); exit 1; }; }
29768          fi;;
29769       esac
29770     done` || { (exit 1); exit 1; }
29771   # Remove the trailing spaces.
29772   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29773
29774 EOF
29775
29776 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29777 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29778 # be either 'cat' or 'sort'.
29779 cat confdefs.h | uniq >conftest.vals
29780
29781 # Break up conftest.vals because some shells have a limit on
29782 # the size of here documents, and old seds have small limits too.
29783
29784 rm -f conftest.tail
29785 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29786 while grep . conftest.vals >/dev/null
29787 do
29788   # Write chunks of a limited-size here document to conftest.frag.
29789   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29790   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29791   echo 'CEOF' >> "$CONFIG_STATUS"
29792   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29793   rm -f conftest.vals
29794   mv conftest.tail conftest.vals
29795 done
29796 rm -f conftest.vals
29797
29798 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29799 # marker @DEFS@.
29800 echo '  cat >> conftest.edit <<CEOF
29801 /@DEFS@/r conftest.frag
29802 /@DEFS@/d
29803 CEOF
29804 sed -f conftest.edit $tmp/in > $tmp/out
29805 rm -f $tmp/in
29806 mv $tmp/out $tmp/in
29807 rm -f conftest.edit conftest.frag
29808 ' >> "$CONFIG_STATUS"
29809
29810 cat >>"$CONFIG_STATUS" <<\EOF
29811   # Let's still pretend it is `configure' which instantiates (i.e., don't
29812   # use $as_me), people would be surprised to read:
29813   #    /* config.h.  Generated automatically by config.status.  */
29814   if test x"$ac_file" = x-; then
29815     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29816   else
29817     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29818   fi
29819   cat $tmp/in >>$tmp/config.h
29820   rm -f $tmp/in
29821   if test x"$ac_file" != x-; then
29822     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29823       { echo "$as_me:29823: $ac_file is unchanged" >&5
29824 echo "$as_me: $ac_file is unchanged" >&6;}
29825     else
29826       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29827          X"$ac_file" : 'X\(//\)[^/]' \| \
29828          X"$ac_file" : 'X\(//\)$' \| \
29829          X"$ac_file" : 'X\(/\)' \| \
29830          .     : '\(.\)' 2>/dev/null ||
29831 echo X"$ac_file" |
29832     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29833           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29834           /^X\(\/\/\)$/{ s//\1/; q; }
29835           /^X\(\/\).*/{ s//\1/; q; }
29836           s/.*/./; q'`
29837       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29838         { case "$ac_dir" in
29839   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29840   *)                      as_incr_dir=.;;
29841 esac
29842 as_dummy="$ac_dir"
29843 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29844   case $as_mkdir_dir in
29845     # Skip DOS drivespec
29846     ?:) as_incr_dir=$as_mkdir_dir ;;
29847     *)
29848       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29849       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29850     ;;
29851   esac
29852 done; }
29853
29854       fi
29855       rm -f "$ac_file"
29856       mv "$tmp/config.h" "$ac_file"
29857     fi
29858   else
29859     cat $tmp/config.h
29860     rm -f $tmp/config.h
29861   fi
29862 done
29863 EOF
29864 cat >>"$CONFIG_STATUS" <<\EOF
29865 #
29866 # CONFIG_COMMANDS section.
29867 #
29868 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29869   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29870   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29871
29872   case "$ac_dest" in
29873     default )
29874 if test "x$cf_with_tests" != xno ; then
29875
29876 for cf_dir in test
29877 do
29878         if test ! -d "$srcdir/$cf_dir" ; then
29879                 continue
29880         elif test -f "$srcdir/$cf_dir/programs" ; then
29881                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29882         fi
29883 done
29884
29885 fi
29886
29887 cf_prefix=$LIB_PREFIX
29888
29889 case "$cf_cv_shlib_version" in
29890 (cygdll|msysdll|mingw|msvcdll)
29891         TINFO_NAME=$TINFO_ARG_SUFFIX
29892         TINFO_SUFFIX=.dll
29893         ;;
29894 esac
29895
29896 if test -n "$TINFO_SUFFIX" ; then
29897         case "$TINFO_SUFFIX" in
29898         (tw*)
29899                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29900                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29901                 ;;
29902         (t*)
29903                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29904                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29905                 ;;
29906         (w*)
29907                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29908                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29909                 ;;
29910         esac
29911 fi
29912
29913 for cf_dir in $SRC_SUBDIRS
29914 do
29915         if test ! -d "$srcdir/$cf_dir" ; then
29916                 continue
29917         elif test -f "$srcdir/$cf_dir/modules" ; then
29918
29919                 SHARED_LIB=
29920                 Libs_To_Make=
29921                 cf_awk_program=
29922                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29923                 then
29924                         cf_awk_program="$cf_awk_program\
29925 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29926 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29927 "
29928                 fi
29929
29930                 if test "x$WILDCARD_SYMS" = xno
29931                 then
29932                         cf_awk_program="$cf_awk_program\
29933 /[      ]_\\*;/ { skip=1; next; }\
29934 "
29935                 fi
29936
29937                 if test "x$cf_awk_program" != "x"
29938                 then
29939                         cat >>$cf_dir/Makefile <<CF_EOF
29940
29941 # Generated by CF_LIB_RULES
29942 resulting.map: $UNALTERED_SYMS
29943         $AWK 'BEGIN { skip = 1; last=""; } \
29944 $cf_awk_program \
29945 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29946  skip = 0; last = \$\$0; } \
29947 END { print last; }' < "$UNALTERED_SYMS" >\$@
29948
29949 distclean::
29950         rm -f resulting.map
29951 CF_EOF
29952                 fi
29953
29954                 for cf_item in $cf_LIST_MODELS
29955                 do
29956
29957         case X$cf_item in
29958         (Xlibtool)
29959                 cf_suffix='.la'
29960                 cf_depsuf=$cf_suffix
29961                 ;;
29962         (Xdebug)
29963                 case "$cf_cv_system_name" in
29964                 (*-msvc*)
29965                         cf_suffix='_g.lib'
29966                         ;;
29967                 (*)
29968                         cf_suffix='_g.a'
29969                         ;;
29970                 esac
29971                 cf_depsuf=$cf_suffix
29972                 ;;
29973         (Xprofile)
29974                 case "$cf_cv_system_name" in
29975                 (*-msvc*)
29976                         cf_suffix='_p.lib'
29977                         ;;
29978                 (*)
29979                         cf_suffix='_p.a'
29980                         ;;
29981                 esac
29982                 cf_depsuf=$cf_suffix
29983                 ;;
29984         (Xshared)
29985                 case "$cf_cv_system_name" in
29986                 (aix[5-7]*)
29987                         cf_suffix='.so'
29988                         cf_depsuf=$cf_suffix
29989                         ;;
29990                 (*-msvc*)
29991                         cf_suffix='.dll'
29992                         cf_depsuf='.dll.lib'
29993                         ;;
29994                 (cygwin*|msys*|mingw*)
29995                         cf_suffix='.dll'
29996                         cf_depsuf='.dll.a'
29997                         ;;
29998                 (darwin*)
29999                         cf_suffix='.dylib'
30000                         cf_depsuf=$cf_suffix
30001                         ;;
30002                 (hpux*)
30003                         case "$target" in
30004                         (ia64*)
30005                                 cf_suffix='.so'
30006                                 cf_depsuf=$cf_suffix
30007                                 ;;
30008                         (*)
30009                                 cf_suffix='.sl'
30010                                 cf_depsuf=$cf_suffix
30011                                 ;;
30012                         esac
30013                         ;;
30014                 (*)
30015                         cf_suffix='.so'
30016                         cf_depsuf=$cf_suffix
30017                         ;;
30018                 esac
30019                 ;;
30020         (*)
30021                 case "$target" in
30022                 (*-msvc*)
30023                         cf_suffix='.lib'
30024                         ;;
30025                 (*)
30026                         cf_suffix='.a'
30027                         ;;
30028                 esac
30029                 cf_depsuf=$cf_suffix
30030                 ;;
30031         esac
30032         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30033         then
30034                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30035                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30036         fi
30037
30038                         if test "$cf_dir" = "c++"
30039                         then
30040
30041 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30042
30043 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30044
30045                         else
30046
30047 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30048
30049 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30050
30051                         fi
30052                         test -z "$cf_libname" && cf_libname="$cf_dir"
30053                         if test "$cf_item" = shared ; then
30054                                 if test -n "${LIB_SUFFIX}"
30055                                 then
30056                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30057                                 else
30058                                         cf_shared_suffix="$cf_suffix"
30059                                 fi
30060                                 if test "$cf_cv_do_symlinks" = yes ; then
30061                                         cf_version_name=
30062
30063                                         case "$cf_cv_shlib_version" in
30064                                         (rel)
30065                                                 cf_version_name=REL_VERSION
30066                                                 ;;
30067                                         (abi)
30068                                                 cf_version_name=ABI_VERSION
30069                                                 ;;
30070                                         esac
30071
30072                                         if test -n "$cf_version_name"
30073                                         then
30074                                                 case "$cf_cv_system_name" in
30075                                                 (darwin*)
30076                                                         # "w", etc?
30077                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30078                                                         ;;
30079                                                 (*)
30080                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30081                                                         ;;
30082                                                 esac
30083                                         fi
30084                                         if test -n "${USE_LIB_SUFFIX}"
30085                                         then
30086                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30087                                         else
30088                                                 cf_shared_suffix="$cf_suffix"
30089                                         fi
30090                                 fi
30091                                 # cygwin needs import library, and has unique naming convention
30092                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30093                                 # use 'cyg' prefix for shared lib.
30094                                 case "$cf_cv_shlib_version" in
30095                                 (cygdll)
30096                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30097                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30098                                         ;;
30099                                 (msysdll)
30100                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30101                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30102                                         ;;
30103                                 (mingw)
30104                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30105                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30106                                         ;;
30107                                 (msvcdll)
30108                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30109                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30110                                         ;;
30111                                 (*)
30112                                         cf_add_lib=
30113                                         ;;
30114                                 esac
30115                                 if test -n "$cf_add_lib"
30116                                 then
30117                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30118                                         continue
30119                                 fi
30120                         fi
30121                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30122                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30123                 done
30124
30125                 if test "$cf_dir" = ncurses ; then
30126                         cf_subsets="$LIB_SUBSETS"
30127                         cf_r_parts="$cf_subsets"
30128                         cf_liblist="$Libs_To_Make"
30129
30130                         while test -n "$cf_r_parts"
30131                         do
30132                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30133                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30134                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30135                                         cf_add_lib=
30136                                         case "$cf_l_parts" in
30137                                         (*termlib*)
30138                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30139                                                 ;;
30140                                         (*ticlib*)
30141                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30142                                                 ;;
30143                                         (*)
30144                                                 break
30145                                                 ;;
30146                                         esac
30147                                         if test -n "$cf_add_lib"; then
30148                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30149                                         fi
30150                                 else
30151                                         break
30152                                 fi
30153                         done
30154                 else
30155                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30156                 fi
30157
30158                 if test "$cf_dir" = c++; then
30159                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30160                                 cf_list=
30161                                 for cf_item in $Libs_To_Make
30162                                 do
30163                                         case "$cf_item" in
30164                                         (*.a)
30165                                                 ;;
30166                                         (*)
30167                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30168                                                 ;;
30169                                         esac
30170                                         for cf_test in $cf_list
30171                                         do
30172                                                 if test "$cf_test" = "$cf_item"
30173                                                 then
30174                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30175                                                         cf_item=
30176                                                         break
30177                                                 fi
30178                                         done
30179                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30180                                 done
30181                                 Libs_To_Make="$cf_list"
30182                         fi
30183                 fi
30184
30185                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30186                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30187                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30188                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30189
30190                 $AWK -f "$srcdir/mk-0th.awk" \
30191                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30192                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30193
30194                 for cf_subset in $cf_subsets
30195                 do
30196                         cf_subdirs=
30197                         for cf_item in $cf_LIST_MODELS
30198                         do
30199
30200                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30201
30202 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30203
30204                         CXX_MODEL=$cf_ITEM
30205                         if test "$CXX_MODEL" = SHARED; then
30206                                 case "$cf_cv_shlib_version" in
30207                                 (cygdll|msysdll|mingw|msvcdll)
30208                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30209
30210 echo "${as_me:-configure}:30210: testing overriding CXX_MODEL to SHARED ..." 1>&5
30211
30212                                         with_shared_cxx=yes
30213                                         ;;
30214                                 (*)
30215                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30216                                         ;;
30217                                 esac
30218                         fi
30219
30220         case X$cf_item in
30221         (Xlibtool)
30222                 cf_suffix='.la'
30223                 cf_depsuf=$cf_suffix
30224                 ;;
30225         (Xdebug)
30226                 case "$cf_cv_system_name" in
30227                 (*-msvc*)
30228                         cf_suffix='_g.lib'
30229                         ;;
30230                 (*)
30231                         cf_suffix='_g.a'
30232                         ;;
30233                 esac
30234                 cf_depsuf=$cf_suffix
30235                 ;;
30236         (Xprofile)
30237                 case "$cf_cv_system_name" in
30238                 (*-msvc*)
30239                         cf_suffix='_p.lib'
30240                         ;;
30241                 (*)
30242                         cf_suffix='_p.a'
30243                         ;;
30244                 esac
30245                 cf_depsuf=$cf_suffix
30246                 ;;
30247         (Xshared)
30248                 case "$cf_cv_system_name" in
30249                 (aix[5-7]*)
30250                         cf_suffix='.so'
30251                         cf_depsuf=$cf_suffix
30252                         ;;
30253                 (*-msvc*)
30254                         cf_suffix='.dll'
30255                         cf_depsuf='.dll.lib'
30256                         ;;
30257                 (cygwin*|msys*|mingw*)
30258                         cf_suffix='.dll'
30259                         cf_depsuf='.dll.a'
30260                         ;;
30261                 (darwin*)
30262                         cf_suffix='.dylib'
30263                         cf_depsuf=$cf_suffix
30264                         ;;
30265                 (hpux*)
30266                         case "$target" in
30267                         (ia64*)
30268                                 cf_suffix='.so'
30269                                 cf_depsuf=$cf_suffix
30270                                 ;;
30271                         (*)
30272                                 cf_suffix='.sl'
30273                                 cf_depsuf=$cf_suffix
30274                                 ;;
30275                         esac
30276                         ;;
30277                 (*)
30278                         cf_suffix='.so'
30279                         cf_depsuf=$cf_suffix
30280                         ;;
30281                 esac
30282                 ;;
30283         (*)
30284                 case "$target" in
30285                 (*-msvc*)
30286                         cf_suffix='.lib'
30287                         ;;
30288                 (*)
30289                         cf_suffix='.a'
30290                         ;;
30291                 esac
30292                 cf_depsuf=$cf_suffix
30293                 ;;
30294         esac
30295         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30296         then
30297                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30298                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30299         fi
30300
30301         case $cf_item in
30302         (libtool) cf_subdir='obj_lo'  ;;
30303         (normal)  cf_subdir='objects' ;;
30304         (debug)   cf_subdir='obj_g' ;;
30305         (profile) cf_subdir='obj_p' ;;
30306         (shared)
30307                 case "$cf_cv_system_name" in
30308                 (cygwin|msys)
30309                         cf_subdir='objects' ;;
30310                 (*)
30311                         cf_subdir='obj_s' ;;
30312                 esac
30313         esac
30314
30315                         # Test for case where we build libtinfo with a different name.
30316                         cf_libname=$cf_dir
30317                         if test "$cf_dir" = ncurses ; then
30318                                 case "$cf_subset" in
30319                                 (*base*)
30320                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30321                                         ;;
30322                                 (*termlib*)
30323                                         cf_libname=$TINFO_LIB_SUFFIX
30324                                         ;;
30325                                 (ticlib*)
30326                                         cf_libname=$TICS_LIB_SUFFIX
30327                                         ;;
30328                                 esac
30329                         elif test "$cf_dir" = c++ ; then
30330
30331 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30332
30333 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30334
30335                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30336                         else
30337
30338 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30339
30340 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30341
30342                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30343                         fi
30344                         if test -n "${USE_ARG_SUFFIX}" ; then
30345                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30346                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30347                         fi
30348
30349                         # These dependencies really are for development, not
30350                         # builds, but they are useful in porting, too.
30351                         cf_depend="../include/ncurses_cfg.h"
30352                         if test "$srcdir" = "."; then
30353                                 cf_reldir="."
30354                         else
30355                                 cf_reldir="\${srcdir}"
30356                         fi
30357
30358                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30359                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30360                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30361                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30362                         fi
30363
30364                         cf_dir_suffix=
30365                         old_cf_suffix="$cf_suffix"
30366                         if test "$cf_cv_shlib_version_infix" = yes ; then
30367                         if test -n "$USE_LIB_SUFFIX" ; then
30368                                 case "$USE_LIB_SUFFIX" in
30369                                 (tw*)
30370                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30371                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30372                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30373                                         ;;
30374                                 (t*)
30375                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30376                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30377                                         cf_dir_suffix=t$EXTRA_SUFFIX
30378                                         ;;
30379                                 (w*)
30380                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30381                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30382                                         cf_dir_suffix=w$EXTRA_SUFFIX
30383                                         ;;
30384                                 (*)
30385                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30386                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30387                                         cf_dir_suffix=$EXTRA_SUFFIX
30388                                         ;;
30389                                 esac
30390                         fi
30391                         fi
30392
30393                         $AWK -f "$srcdir/mk-1st.awk" \
30394                                 name=${cf_libname}${cf_dir_suffix} \
30395                                 traces=$LIB_TRACING \
30396                                 MODEL=$cf_ITEM \
30397                                 CXX_MODEL=$CXX_MODEL \
30398                                 LIB_SUFFIX=$LIB_SUFFIX \
30399                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30400                                 make_phony="${cf_cv_make_PHONY:-no}" \
30401                                 model=$cf_subdir \
30402                                 prefix=$cf_prefix \
30403                                 suffix=$cf_suffix \
30404                                 subset=$cf_subset \
30405                                 driver=$cf_cv_term_driver \
30406                                 SymLink="$LN_S" \
30407                                 TermlibRoot=$TINFO_NAME \
30408                                 TermlibSuffix=$TINFO_SUFFIX \
30409                                 ShlibVer=$cf_cv_shlib_version \
30410                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30411                                 ReLink=${cf_cv_do_relink:-no} \
30412                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30413                                 DoLinks=$cf_cv_do_symlinks \
30414                                 rmSoLocs=$cf_cv_rm_so_locs \
30415                                 ldconfig="$LDCONFIG" \
30416                                 overwrite=$WITH_OVERWRITE \
30417                                 depend="$cf_depend" \
30418                                 host="$host" \
30419                                 libtool_version="$LIBTOOL_VERSION" \
30420                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30421
30422                         cf_suffix="$old_cf_suffix"
30423
30424                         for cf_subdir2 in $cf_subdirs lib
30425                         do
30426                                 test "$cf_subdir" = "$cf_subdir2" && break
30427                         done
30428                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30429                         $AWK -f "$srcdir/mk-2nd.awk" \
30430                                 name=$cf_dir \
30431                                 traces=$LIB_TRACING \
30432                                 MODEL=$cf_ITEM \
30433                                 model=$cf_subdir \
30434                                 subset=$cf_subset \
30435                                 srcdir=$srcdir \
30436                                 echo=$WITH_ECHO \
30437                                 crenames=$cf_cv_prog_CC_c_o \
30438                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30439                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30440                         cf_subdirs="$cf_subdirs $cf_subdir"
30441                         done
30442                 done
30443         fi
30444
30445         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30446 done
30447
30448 echo >> Makefile
30449 echo '# generated by CF_LIB_RULES' >> Makefile
30450
30451 if test "x$cf_cv_make_PHONY" = xyes ; then
30452         cat >> Makefile <<-CF_EOF
30453
30454         .PHONY :        libs
30455         .PHONY :        lintlib
30456         .PHONY :        install.includes
30457         .PHONY :        uninstall.includes
30458         .PHONY :        install.libs
30459         .PHONY :        uninstall.libs
30460 CF_EOF
30461 fi
30462
30463 for cf_dir in $SRC_SUBDIRS
30464 do
30465         if test ! -d "$srcdir/$cf_dir" ; then
30466                 continue
30467         fi
30468
30469         if test -f "$cf_dir/Makefile" ; then
30470                 case "$cf_dir" in
30471                 (Ada95)
30472                         echo 'libs \' >> Makefile
30473                         echo 'install.libs \' >> Makefile
30474                         echo 'uninstall.libs ::' >> Makefile
30475                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30476                         ;;
30477                 esac
30478         fi
30479
30480         if test -f "$srcdir/$cf_dir/modules" ; then
30481
30482                 if test "x$cf_cv_make_PHONY" = xyes ; then
30483                         cat >> Makefile <<-CF_EOF
30484
30485                         .PHONY :        install.$cf_dir
30486                         .PHONY :        uninstall.$cf_dir
30487 CF_EOF
30488                 fi
30489
30490                 echo >> Makefile
30491                 if test -f "$srcdir/$cf_dir/headers" ; then
30492 cat >> Makefile <<CF_EOF
30493 install.includes \\
30494 uninstall.includes \\
30495 CF_EOF
30496                 fi
30497
30498 cat >> Makefile <<CF_EOF
30499 lint \\
30500 libs \\
30501 lintlib \\
30502 install.libs \\
30503 uninstall.libs \\
30504 install.$cf_dir \\
30505 uninstall.$cf_dir ::
30506         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30507 CF_EOF
30508         elif test -f "$srcdir/$cf_dir/headers" ; then
30509 cat >> Makefile <<CF_EOF
30510
30511 libs \\
30512 install.libs \\
30513 uninstall.libs \\
30514 install.includes \\
30515 uninstall.includes ::
30516         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30517 CF_EOF
30518 fi
30519 done
30520
30521 if test "x$cf_cv_make_PHONY" = xyes ; then
30522         cat >> Makefile <<-CF_EOF
30523
30524         .PHONY :        install.data
30525         .PHONY :        uninstall.data
30526 CF_EOF
30527 fi
30528
30529 if test "x$cf_with_db_install" = xyes; then
30530 cat >> Makefile <<CF_EOF
30531
30532 install.libs uninstall.libs \\
30533 install.data uninstall.data ::
30534 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30535 CF_EOF
30536 else
30537 cat >> Makefile <<CF_EOF
30538
30539 install.libs uninstall.libs ::
30540         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30541 CF_EOF
30542 fi
30543
30544 if test "x$cf_with_manpages" = xyes; then
30545
30546 if test "x$cf_cv_make_PHONY" = xyes ; then
30547         cat >> Makefile <<-CF_EOF
30548
30549         .PHONY :        install.man
30550         .PHONY :        uninstall.man
30551 CF_EOF
30552 fi
30553
30554 cat >> Makefile <<CF_EOF
30555
30556 install.man \\
30557 uninstall.man ::
30558         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30559 CF_EOF
30560 fi
30561
30562 cat >> Makefile <<CF_EOF
30563
30564 distclean ::
30565         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30566         rm -f headers.sh headers.sed mk_shared_lib.sh
30567         rm -f edit_man.* man_alias.*
30568         rm -rf \${DIRS_TO_MAKE}
30569 CF_EOF
30570
30571 # Special case: tack's manpage lives in its own directory.
30572 if test "x$cf_with_manpages" = xyes; then
30573 if test "x$cf_with_tack" = "xyes"; then
30574 cat >> Makefile <<CF_EOF
30575
30576 install.man \\
30577 uninstall.man ::
30578         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30579 CF_EOF
30580 fi
30581 fi
30582
30583 rm -f headers.sed headers.sh
30584
30585 echo creating headers.sh
30586 cat >headers.sh <<CF_EOF
30587 #! $SHELL
30588 # This shell script is generated by the 'configure' script.  It is invoked in a
30589 # subdirectory of the build tree.  It generates a sed-script in the parent
30590 # directory that is used to adjust includes for header files that reside in a
30591 # subdirectory of /usr/include, etc.
30592 PRG=""
30593 while test \$# != 3
30594 do
30595 PRG="\$PRG \$1"; shift
30596 done
30597 DST=\$1
30598 REF=\$2
30599 SRC=\$3
30600 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30601 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30602 echo installing \$SRC in \$DST
30603 CF_EOF
30604
30605 if test "$WITH_CURSES_H" = yes; then
30606         cat >>headers.sh <<CF_EOF
30607 case \$DST in
30608 (/*/include/*)
30609         END=\`basename \$DST\`
30610         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30611         do
30612                 NAME=\`basename \$i\`
30613                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30614         done
30615         ;;
30616 (*)
30617         echo "" >> \$TMPSED
30618         ;;
30619 esac
30620 CF_EOF
30621
30622 else
30623         cat >>headers.sh <<CF_EOF
30624 case \$DST in
30625 (/*/include/*)
30626         END=\`basename \$DST\`
30627         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30628         do
30629                 NAME=\`basename \$i\`
30630                 if test "\$NAME" = "curses.h"
30631                 then
30632                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30633                         NAME=ncurses.h
30634                 fi
30635                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30636         done
30637         ;;
30638 (*)
30639         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30640         ;;
30641 esac
30642 CF_EOF
30643 fi
30644 cat >>headers.sh <<CF_EOF
30645 rm -f \$TMPSRC
30646 sed -f \$TMPSED \$SRC > \$TMPSRC
30647 NAME=\`basename \$SRC\`
30648 CF_EOF
30649 if test "$WITH_CURSES_H" != yes; then
30650         cat >>headers.sh <<CF_EOF
30651 test "\$NAME" = "curses.h" && NAME=ncurses.h
30652 CF_EOF
30653 fi
30654 cat >>headers.sh <<CF_EOF
30655 # Just in case someone gzip'd manpages, remove the conflicting copy.
30656 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30657
30658 eval \$PRG \$TMPSRC \$DST/\$NAME
30659 rm -f \$TMPSRC \$TMPSED
30660 CF_EOF
30661
30662 chmod 0755 headers.sh
30663
30664 for cf_dir in $SRC_SUBDIRS
30665 do
30666         if test ! -d "$srcdir/$cf_dir" ; then
30667                 continue
30668         fi
30669
30670         if test -f "$srcdir/$cf_dir/headers" ; then
30671                 $AWK -f "$srcdir/mk-hdr.awk" \
30672                         subset="$LIB_SUBSETS" \
30673                         compat="$WITH_CURSES_H" \
30674                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30675         fi
30676
30677         if test -f "$srcdir/$cf_dir/modules" ; then
30678                 if test "$cf_dir" != "c++" ; then
30679                         if test "x$cf_cv_make_PHONY" = xyes ; then
30680                                 cat >> $cf_dir/Makefile <<-CF_EOF
30681
30682                                 .PHONY :        depend
30683 CF_EOF
30684                         fi
30685
30686                         cat >>$cf_dir/Makefile <<"CF_EOF"
30687 depend : ${AUTO_SRC}
30688         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30689
30690 # DO NOT DELETE THIS LINE -- make depend depends on it.
30691 CF_EOF
30692                 fi
30693         fi
30694 done
30695
30696 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30697 if test -z "$USE_OLD_MAKERULES" ; then
30698         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30699 fi
30700 fi
30701  ;;
30702   esac
30703 done
30704 EOF
30705
30706 cat >>"$CONFIG_STATUS" <<\EOF
30707
30708 { (exit 0); exit 0; }
30709 EOF
30710 chmod +x "$CONFIG_STATUS"
30711 ac_clean_files=$ac_clean_files_save
30712
30713 # configure is writing to config.log, and then calls config.status.
30714 # config.status does its own redirection, appending to config.log.
30715 # Unfortunately, on DOS this fails, as config.log is still kept open
30716 # by configure, so config.status won't be able to write to it; its
30717 # output is simply discarded.  So we exec the FD to /dev/null,
30718 # effectively closing config.log, so it can be properly (re)opened and
30719 # appended to by config.status.  When coming back to configure, we
30720 # need to make the FD available again.
30721 if test "$no_create" != yes; then
30722   ac_cs_success=:
30723   exec 5>/dev/null
30724   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30725   exec 5>>config.log
30726   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30727   # would make configure fail if this is the last instruction.
30728   "$ac_cs_success" || { (exit 1); exit 1; }
30729 fi
30730 ${MAKE:-make} preinstall