]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20170218
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.636 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20150926.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --with-extra-suffix=X   append extra suffix to header/library paths
751   --disable-overwrite     put headers in subdir, omit link to -lcurses
752   --disable-database      do not use terminfo, only fallbacks/termcap
753   --with-database=XXX     specify terminfo source to install
754   --with-hashed-db        specify hashed-database library
755   --with-fallbacks=XXX    specify list of fallback terminal descriptions
756   --without-xterm-new     specify if xterm terminfo should be old version
757   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
758   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
759   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
760   --disable-big-core      assume machine has little memory
761   --disable-big-strings   assume compiler has only standard-size strings
762   --enable-termcap        compile in termcap fallback support
763   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
764   --enable-getcap         fast termcap load, no xrefs to terminfo
765   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
766   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
767   --disable-root-environ  restrict environment when running as root
768   --enable-symlinks       make tic use symbolic links not hard links
769   --enable-broken_linker  compile with broken-linker support code
770   --enable-bsdpad         recognize BSD-style prefix padding
771   --enable-widec          compile with wide-char/UTF-8 code
772   --disable-lp64          allow chtype to be long (ignore _LP64)
773   --disable-largefile     omit support for large files
774   --disable-tparm-varargs compile tparm() without varargs interface
775   --disable-tic-depends   link tic library without explicit dependency on ncurses library
776   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
777   --with-bool=TYPE        override fallback type of bool variable
778   --with-caps=alt         compile with alternate Caps file
779   --with-chtype=TYPE      override type of chtype
780   --with-ospeed=TYPE      override type of ospeed variable
781   --with-mmask-t=TYPE     override type of mmask_t
782   --with-ccharw-max=XXX   override size CCHARW_MAX
783   --with-tparm-arg=TYPE   override parameter type of tparm
784   --with-rcs-ids          compile-in RCS identifiers
785 Options to Specify How Manpages are Installed:
786   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
787                           optionally formatted/catonly, e.g., gzip,formatted
788   --with-manpage-renames  specify manpage-renaming
789   --with-manpage-aliases  specify manpage-aliases using .so
790   --with-manpage-symlinks specify manpage-aliases using symlinks
791   --with-manpage-tbl      specify manpage processing with tbl
792 Extensions:
793   --disable-ext-funcs     disable function-extensions
794   --enable-sp-funcs       enable SCREEN-extensions
795   --enable-term-driver    enable terminal-driver
796   --enable-const          compile with extra/non-standard const
797   --enable-ext-colors     compile for 256-color support
798   --enable-ext-mouse      compile for extended mouse-encoding
799   --enable-ext-putwin     compile with extended putwin/screendump
800   --enable-no-padding     compile with $NCURSES_NO_PADDING code
801   --enable-signed-char    compile using signed Boolean's in term.h
802   --enable-sigwinch       compile with SIGWINCH handler
803   --enable-tcap-names     compile with user-definable terminal capabilities
804   --with-pthread          use POSIX thread library
805   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
806   --enable-weak-symbols   enable weak-symbols for pthreads
807   --enable-reentrant      compile with reentrant code
808   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
809   --enable-opaque-form    make form-library structures "opaque"
810   --enable-opaque-menu    make menu-library structures "opaque"
811   --enable-opaque-panel   make panel-library structures "opaque"
812   --with-wrap-prefix=XXX  override prefix used for public variables
813 Development Code:
814   --without-develop       disable development options
815   --enable-hard-tabs      compile with hard-tabs code
816   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
817 Experimental Code:
818   --disable-assumed-color do not assume anything about default-colors
819   --disable-hashmap       compile without hashmap scrolling-optimization
820   --enable-colorfgbg      compile-in experimental $COLORFGBG code
821   --enable-interop        compile-in interop bindings
822   --enable-safe-sprintf   compile with experimental safe-sprintf code
823   --disable-scroll-hints  compile without scroll-hints code
824   --enable-wgetch-events  compile with wgetch-events code
825 Testing/development Options:
826   --disable-echo          do not display "compiling" commands
827   --enable-warnings       build: turn on GCC compiler warnings
828   --enable-string-hacks   work around bogus compiler/loader warnings
829   --enable-assertions     test: turn on generation of assertion code
830   --with-dmalloc          test: use Gray Watson's dmalloc library
831   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
832   --with-valgrind         test: use valgrind
833   --disable-leaks         test: free permanent memory, analyze leaks
834   --enable-expanded       test: generate functions for certain macros
835   --disable-macros        test: use functions rather than macros
836   --with-trace            test: add trace() function to all models of ncurses
837   --disable-gnat-projects test: disable GNAT projects even if usable
838 Ada95 Binding Options:
839   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
840   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
841   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
842   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
843
844 Some influential environment variables:
845   CC          C compiler command
846   CFLAGS      C compiler flags
847   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
848               nonstandard directory <lib dir>
849   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
850               headers in a nonstandard directory <include dir>
851   CPP         C preprocessor
852   CXX         C++ compiler command
853   CXXFLAGS    C++ compiler flags
854   CXXCPP      C++ preprocessor
855
856 Use these variables to override the choices made by `configure' or to help
857 it to find libraries and programs with nonstandard names/locations.
858
859 EOF
860 fi
861
862 if test "$ac_init_help" = "recursive"; then
863   # If there are subdirs, report their specific --help.
864   ac_popdir=`pwd`
865   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
866     cd $ac_subdir
867     # A "../" for each directory in /$ac_subdir.
868     ac_dots=`echo $ac_subdir |
869              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
870
871     case $srcdir in
872     .) # No --srcdir option.  We are building in place.
873       ac_sub_srcdir=$srcdir ;;
874     [\\/]* | ?:[\\/]* ) # Absolute path.
875       ac_sub_srcdir=$srcdir/$ac_subdir ;;
876     *) # Relative path.
877       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
878     esac
879
880     # Check for guested configure; otherwise get Cygnus style configure.
881     if test -f $ac_sub_srcdir/configure.gnu; then
882       echo
883       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
884     elif test -f $ac_sub_srcdir/configure; then
885       echo
886       $SHELL $ac_sub_srcdir/configure  --help=recursive
887     elif test -f $ac_sub_srcdir/configure.ac ||
888            test -f $ac_sub_srcdir/configure.in; then
889       echo
890       $ac_configure --help
891     else
892       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
893     fi
894     cd $ac_popdir
895   done
896 fi
897
898 test -n "$ac_init_help" && exit 0
899 if $ac_init_version; then
900   cat <<\EOF
901
902 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
903 Free Software Foundation, Inc.
904 This configure script is free software; the Free Software Foundation
905 gives unlimited permission to copy, distribute and modify it.
906 EOF
907   exit 0
908 fi
909 exec 5>config.log
910 cat >&5 <<EOF
911 This file contains any messages produced by compilers while
912 running configure, to aid debugging if configure makes a mistake.
913
914 It was created by $as_me, which was
915 generated by GNU Autoconf 2.52.20150926.  Invocation command line was
916
917   $ $0 $@
918
919 EOF
920 {
921 cat <<_ASUNAME
922 ## ---------- ##
923 ## Platform.  ##
924 ## ---------- ##
925
926 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
927 uname -m = `(uname -m) 2>/dev/null || echo unknown`
928 uname -r = `(uname -r) 2>/dev/null || echo unknown`
929 uname -s = `(uname -s) 2>/dev/null || echo unknown`
930 uname -v = `(uname -v) 2>/dev/null || echo unknown`
931
932 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
933 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
934
935 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
936 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
937 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
938 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
939 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
940 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
941 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
942
943 PATH = $PATH
944
945 _ASUNAME
946 } >&5
947
948 cat >&5 <<EOF
949 ## ------------ ##
950 ## Core tests.  ##
951 ## ------------ ##
952
953 EOF
954
955 # Keep a trace of the command line.
956 # Strip out --no-create and --no-recursion so they do not pile up.
957 # Also quote any args containing shell meta-characters.
958 ac_configure_args=
959 ac_sep=
960 for ac_arg
961 do
962   case $ac_arg in
963   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
964   | --no-cr | --no-c) ;;
965   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
966   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
967   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
968     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
969     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
970     ac_sep=" " ;;
971   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
972      ac_sep=" " ;;
973   esac
974   # Get rid of the leading space.
975 done
976
977 # When interrupted or exit'd, cleanup temporary files, and complete
978 # config.log.  We remove comments because anyway the quotes in there
979 # would cause problems or look ugly.
980 trap 'exit_status=$?
981   # Save into config.log some information that might help in debugging.
982   echo >&5
983   echo "## ----------------- ##" >&5
984   echo "## Cache variables.  ##" >&5
985   echo "## ----------------- ##" >&5
986   echo >&5
987   # The following way of writing the cache mishandles newlines in values,
988 {
989   (set) 2>&1 |
990     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
991     *ac_space=\ *)
992       sed -n \
993         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
994           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
995       ;;
996     *)
997       sed -n \
998         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
999       ;;
1000     esac;
1001 } >&5
1002   sed "/^$/d" confdefs.h >conftest.log
1003   if test -s conftest.log; then
1004     echo >&5
1005     echo "## ------------ ##" >&5
1006     echo "## confdefs.h.  ##" >&5
1007     echo "## ------------ ##" >&5
1008     echo >&5
1009     cat conftest.log >&5
1010   fi
1011   (echo; echo) >&5
1012   test "$ac_signal" != 0 &&
1013     echo "$as_me: caught signal $ac_signal" >&5
1014   echo "$as_me: exit $exit_status" >&5
1015   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1016     exit $exit_status
1017      ' 0
1018 for ac_signal in 1 2 13 15; do
1019   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1020 done
1021 ac_signal=0
1022
1023 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1024 rm -rf conftest* confdefs.h
1025 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1026 echo >confdefs.h
1027
1028 # Let the site file select an alternate cache file if it wants to.
1029 # Prefer explicitly selected file to automatically selected ones.
1030 if test -z "$CONFIG_SITE"; then
1031   if test "x$prefix" != xNONE; then
1032     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1033   else
1034     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1035   fi
1036 fi
1037 for ac_site_file in $CONFIG_SITE; do
1038   if test -r "$ac_site_file"; then
1039     { echo "$as_me:1039: loading site script $ac_site_file" >&5
1040 echo "$as_me: loading site script $ac_site_file" >&6;}
1041     cat "$ac_site_file" >&5
1042     . "$ac_site_file"
1043   fi
1044 done
1045
1046 if test -r "$cache_file"; then
1047   # Some versions of bash will fail to source /dev/null (special
1048   # files actually), so we avoid doing that.
1049   if test -f "$cache_file"; then
1050     { echo "$as_me:1050: loading cache $cache_file" >&5
1051 echo "$as_me: loading cache $cache_file" >&6;}
1052     case $cache_file in
1053       [\\/]* | ?:[\\/]* ) . $cache_file;;
1054       *)                      . ./$cache_file;;
1055     esac
1056   fi
1057 else
1058   { echo "$as_me:1058: creating cache $cache_file" >&5
1059 echo "$as_me: creating cache $cache_file" >&6;}
1060   >$cache_file
1061 fi
1062
1063 # Check that the precious variables saved in the cache have kept the same
1064 # value.
1065 ac_cache_corrupted=false
1066 for ac_var in `(set) 2>&1 |
1067                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1068   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1069   eval ac_new_set=\$ac_env_${ac_var}_set
1070   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1071   eval ac_new_val="\$ac_env_${ac_var}_value"
1072   case $ac_old_set,$ac_new_set in
1073     set,)
1074       { echo "$as_me:1074: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1075 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1076       ac_cache_corrupted=: ;;
1077     ,set)
1078       { echo "$as_me:1078: error: \`$ac_var' was not set in the previous run" >&5
1079 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1080       ac_cache_corrupted=: ;;
1081     ,);;
1082     *)
1083       if test "x$ac_old_val" != "x$ac_new_val"; then
1084         { echo "$as_me:1084: error: \`$ac_var' has changed since the previous run:" >&5
1085 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1086         { echo "$as_me:1086:   former value:  $ac_old_val" >&5
1087 echo "$as_me:   former value:  $ac_old_val" >&2;}
1088         { echo "$as_me:1088:   current value: $ac_new_val" >&5
1089 echo "$as_me:   current value: $ac_new_val" >&2;}
1090         ac_cache_corrupted=:
1091       fi;;
1092   esac
1093   # Pass precious variables to config.status.  It doesn't matter if
1094   # we pass some twice (in addition to the command line arguments).
1095   if test "$ac_new_set" = set; then
1096     case $ac_new_val in
1097     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1098       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1099       ac_configure_args="$ac_configure_args '$ac_arg'"
1100       ;;
1101     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1102        ;;
1103     esac
1104   fi
1105 done
1106 if $ac_cache_corrupted; then
1107   { echo "$as_me:1107: error: changes in the environment can compromise the build" >&5
1108 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1109   { { echo "$as_me:1109: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1110 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1111    { (exit 1); exit 1; }; }
1112 fi
1113
1114 ac_ext=c
1115 ac_cpp='$CPP $CPPFLAGS'
1116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1119 ac_main_return=return
1120
1121 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1122   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1123                    ECHO_T='     ' ;;
1124   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1125   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1126 esac
1127 echo "#! $SHELL" >conftest.sh
1128 echo  "exit 0"   >>conftest.sh
1129 chmod +x conftest.sh
1130 if { (echo "$as_me:1130: PATH=\".;.\"; conftest.sh") >&5
1131   (PATH=".;."; conftest.sh) 2>&5
1132   ac_status=$?
1133   echo "$as_me:1133: \$? = $ac_status" >&5
1134   (exit $ac_status); }; then
1135   ac_path_separator=';'
1136 else
1137   ac_path_separator=:
1138 fi
1139 PATH_SEPARATOR="$ac_path_separator"
1140 rm -f conftest.sh
1141
1142 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1143
1144 top_builddir=`pwd`
1145
1146 echo "$as_me:1146: checking for egrep" >&5
1147 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1148 if test "${ac_cv_prog_egrep+set}" = set; then
1149   echo $ECHO_N "(cached) $ECHO_C" >&6
1150 else
1151   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1152                 then ac_cv_prog_egrep='grep -E'
1153                 else ac_cv_prog_egrep='egrep'
1154         fi
1155 fi
1156 echo "$as_me:1156: result: $ac_cv_prog_egrep" >&5
1157 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1158         EGREP=$ac_cv_prog_egrep
1159
1160         test -z "$EGREP" && { { echo "$as_me:1160: error: No egrep program found" >&5
1161 echo "$as_me: error: No egrep program found" >&2;}
1162    { (exit 1); exit 1; }; }
1163
1164 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1165 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1166 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1167 cf_cv_abi_version=${NCURSES_MAJOR}
1168 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1169 cf_cv_timestamp=`date`
1170 echo "$as_me:1170: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1171 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1172
1173 if test -f $srcdir/VERSION ; then
1174         echo "$as_me:1174: checking for package version" >&5
1175 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1176
1177         # if there are not enough fields, cut returns the last one...
1178         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1179         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1180         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1181
1182         # this is how CF_BUNDLED_INTL uses $VERSION:
1183         VERSION="$cf_field1"
1184
1185         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1186         test -z "$VERSION_MAJOR" && { { echo "$as_me:1186: error: missing major-version" >&5
1187 echo "$as_me: error: missing major-version" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1191         test -z "$VERSION_MINOR" && { { echo "$as_me:1191: error: missing minor-version" >&5
1192 echo "$as_me: error: missing minor-version" >&2;}
1193    { (exit 1); exit 1; }; }
1194
1195         echo "$as_me:1195: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1196 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1197
1198         echo "$as_me:1198: checking for package patch date" >&5
1199 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1200         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1201         case .$VERSION_PATCH in
1202         (.)
1203                 { { echo "$as_me:1203: error: missing patch-date $VERSION_PATCH" >&5
1204 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1205    { (exit 1); exit 1; }; }
1206                 ;;
1207         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1208                 ;;
1209         (*)
1210                 { { echo "$as_me:1210: error: illegal patch-date $VERSION_PATCH" >&5
1211 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1212    { (exit 1); exit 1; }; }
1213                 ;;
1214         esac
1215         echo "$as_me:1215: result: $VERSION_PATCH" >&5
1216 echo "${ECHO_T}$VERSION_PATCH" >&6
1217 else
1218         { { echo "$as_me:1218: error: did not find $srcdir/VERSION" >&5
1219 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1220    { (exit 1); exit 1; }; }
1221 fi
1222
1223 # show the actual data that we have for versions:
1224 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1225
1226 echo "${as_me:-configure}:1226: testing ABI VERSION $VERSION ..." 1>&5
1227
1228 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1229
1230 echo "${as_me:-configure}:1230: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1231
1232 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1233
1234 echo "${as_me:-configure}:1234: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1235
1236 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1237
1238 echo "${as_me:-configure}:1238: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1239
1240         cf_PACKAGE=NCURSES
1241         PACKAGE=ncurses
1242
1243 cat >>confdefs.h <<EOF
1244 #define PACKAGE "$PACKAGE"
1245 EOF
1246
1247 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1248
1249         cat >>confdefs.h <<EOF
1250 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1251 EOF
1252
1253         cat >>confdefs.h <<EOF
1254 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1255 EOF
1256
1257 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1258
1259 # Check whether --with-rel-version or --without-rel-version was given.
1260 if test "${with_rel_version+set}" = set; then
1261   withval="$with_rel_version"
1262   { echo "$as_me:1262: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1263 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1264  cf_cv_rel_version=$withval
1265 fi;
1266
1267  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1268  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1269
1270 if test -n "$NCURSES_MAJOR" ; then
1271   case $NCURSES_MAJOR in
1272   ([0-9]*)
1273         ;;
1274   (*)
1275         { { echo "$as_me:1275: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1276 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1277    { (exit 1); exit 1; }; }
1278         ;;
1279   esac
1280 else
1281   { { echo "$as_me:1281: error: Release major-version value is empty" >&5
1282 echo "$as_me: error: Release major-version value is empty" >&2;}
1283    { (exit 1); exit 1; }; }
1284 fi
1285
1286 if test -n "$NCURSES_MINOR" ; then
1287   case $NCURSES_MINOR in
1288   ([0-9]*)
1289         ;;
1290   (*)
1291         { { echo "$as_me:1291: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1292 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1293    { (exit 1); exit 1; }; }
1294         ;;
1295   esac
1296 else
1297   { { echo "$as_me:1297: error: Release minor-version value is empty" >&5
1298 echo "$as_me: error: Release minor-version value is empty" >&2;}
1299    { (exit 1); exit 1; }; }
1300 fi
1301
1302 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1303
1304 # Check whether --with-abi-version or --without-abi-version was given.
1305 if test "${with_abi_version+set}" = set; then
1306   withval="$with_abi_version"
1307
1308         if test "x$cf_cv_abi_version" != "x$withval"
1309         then
1310                 { echo "$as_me:1310: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1311 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1312                 case $cf_cv_rel_version in
1313                 (5.*)
1314                         cf_cv_rel_version=$withval.0
1315                         ;;
1316                 (6.*)
1317                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1318                         ;;
1319                 esac
1320         fi
1321         cf_cv_abi_version=$withval
1322 fi;
1323
1324 if test -n "$cf_cv_abi_version" ; then
1325   case $cf_cv_abi_version in
1326   ([0-9]*)
1327         ;;
1328   (*)
1329         { { echo "$as_me:1329: error: ABI version is not a number: $cf_cv_abi_version" >&5
1330 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1331    { (exit 1); exit 1; }; }
1332         ;;
1333   esac
1334 else
1335   { { echo "$as_me:1335: error: ABI version value is empty" >&5
1336 echo "$as_me: error: ABI version value is empty" >&2;}
1337    { (exit 1); exit 1; }; }
1338 fi
1339
1340 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1341 then
1342         case $cf_cv_rel_version in
1343         (5.*)
1344                 cf_cv_rel_version=$with_abi_version.0
1345                 ;;
1346         esac
1347 fi
1348
1349 ac_aux_dir=
1350 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1351   if test -f $ac_dir/install-sh; then
1352     ac_aux_dir=$ac_dir
1353     ac_install_sh="$ac_aux_dir/install-sh -c"
1354     break
1355   elif test -f $ac_dir/install.sh; then
1356     ac_aux_dir=$ac_dir
1357     ac_install_sh="$ac_aux_dir/install.sh -c"
1358     break
1359   elif test -f $ac_dir/shtool; then
1360     ac_aux_dir=$ac_dir
1361     ac_install_sh="$ac_aux_dir/shtool install -c"
1362     break
1363   fi
1364 done
1365 if test -z "$ac_aux_dir"; then
1366   { { echo "$as_me:1366: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1367 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1368    { (exit 1); exit 1; }; }
1369 fi
1370 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1371 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1372 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1373
1374 # Make sure we can run config.sub.
1375 $ac_config_sub sun4 >/dev/null 2>&1 ||
1376   { { echo "$as_me:1376: error: cannot run $ac_config_sub" >&5
1377 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1378    { (exit 1); exit 1; }; }
1379
1380 echo "$as_me:1380: checking build system type" >&5
1381 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1382 if test "${ac_cv_build+set}" = set; then
1383   echo $ECHO_N "(cached) $ECHO_C" >&6
1384 else
1385   ac_cv_build_alias=$build_alias
1386 test -z "$ac_cv_build_alias" &&
1387   ac_cv_build_alias=`$ac_config_guess`
1388 test -z "$ac_cv_build_alias" &&
1389   { { echo "$as_me:1389: error: cannot guess build type; you must specify one" >&5
1390 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1391    { (exit 1); exit 1; }; }
1392 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1393   { { echo "$as_me:1393: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1394 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1395    { (exit 1); exit 1; }; }
1396
1397 fi
1398 echo "$as_me:1398: result: $ac_cv_build" >&5
1399 echo "${ECHO_T}$ac_cv_build" >&6
1400 build=$ac_cv_build
1401 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1402 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1403 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1404
1405 echo "$as_me:1405: checking host system type" >&5
1406 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1407 if test "${ac_cv_host+set}" = set; then
1408   echo $ECHO_N "(cached) $ECHO_C" >&6
1409 else
1410   ac_cv_host_alias=$host_alias
1411 test -z "$ac_cv_host_alias" &&
1412   ac_cv_host_alias=$ac_cv_build_alias
1413 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1414   { { echo "$as_me:1414: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1415 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1416    { (exit 1); exit 1; }; }
1417
1418 fi
1419 echo "$as_me:1419: result: $ac_cv_host" >&5
1420 echo "${ECHO_T}$ac_cv_host" >&6
1421 host=$ac_cv_host
1422 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1423 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1424 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1425
1426 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1427         echo "$as_me:1427: checking target system type" >&5
1428 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1429 if test "${ac_cv_target+set}" = set; then
1430   echo $ECHO_N "(cached) $ECHO_C" >&6
1431 else
1432   ac_cv_target_alias=$target_alias
1433 test "x$ac_cv_target_alias" = "x" &&
1434   ac_cv_target_alias=$ac_cv_host_alias
1435 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1436   { { echo "$as_me:1436: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1437 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1438    { (exit 1); exit 1; }; }
1439
1440 fi
1441 echo "$as_me:1441: result: $ac_cv_target" >&5
1442 echo "${ECHO_T}$ac_cv_target" >&6
1443 target=$ac_cv_target
1444 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1445 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1446 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1447
1448 # The aliases save the names the user supplied, while $host etc.
1449 # will get canonicalized.
1450 test -n "$target_alias" &&
1451   test "$program_prefix$program_suffix$program_transform_name" = \
1452     NONENONEs,x,x, &&
1453   program_prefix=${target_alias}-
1454         system_name="$host_os"
1455 else
1456         system_name="`(uname -s -r) 2>/dev/null`"
1457         if test -z "$system_name" ; then
1458                 system_name="`(hostname) 2>/dev/null`"
1459         fi
1460 fi
1461 test -n "$system_name" &&
1462 cat >>confdefs.h <<EOF
1463 #define SYSTEM_NAME "$system_name"
1464 EOF
1465
1466 if test "${cf_cv_system_name+set}" = set; then
1467   echo $ECHO_N "(cached) $ECHO_C" >&6
1468 else
1469   cf_cv_system_name="$system_name"
1470 fi
1471
1472 test -z "$system_name" && system_name="$cf_cv_system_name"
1473 test -n "$cf_cv_system_name" && echo "$as_me:1473: result: Configuring for $cf_cv_system_name" >&5
1474 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1475
1476 if test ".$system_name" != ".$cf_cv_system_name" ; then
1477         echo "$as_me:1477: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1478 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1479         { { echo "$as_me:1479: error: \"Please remove config.cache and try again.\"" >&5
1480 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1481    { (exit 1); exit 1; }; }
1482 fi
1483
1484 # Check whether --with-system-type or --without-system-type was given.
1485 if test "${with_system_type+set}" = set; then
1486   withval="$with_system_type"
1487   { echo "$as_me:1487: WARNING: overriding system type to $withval" >&5
1488 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1489         cf_cv_system_name=$withval
1490         host_os=$withval
1491
1492 fi;
1493
1494 ###     Save the given $CFLAGS to allow user-override.
1495 cf_user_CFLAGS="$CFLAGS"
1496
1497 ###     Default install-location
1498
1499 echo "$as_me:1499: checking for prefix" >&5
1500 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1501 if test "x$prefix" = "xNONE" ; then
1502         case "$cf_cv_system_name" in
1503                 # non-vendor systems don't have a conflict
1504         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1505                 prefix=/usr
1506                 ;;
1507         (*)     prefix=$ac_default_prefix
1508                 ;;
1509         esac
1510 fi
1511 echo "$as_me:1511: result: $prefix" >&5
1512 echo "${ECHO_T}$prefix" >&6
1513
1514 if test "x$prefix" = "xNONE" ; then
1515 echo "$as_me:1515: checking for default include-directory" >&5
1516 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1517 test -n "$verbose" && echo 1>&6
1518 for cf_symbol in \
1519         $includedir \
1520         $includedir/ncurses \
1521         $prefix/include \
1522         $prefix/include/ncurses \
1523         /usr/local/include \
1524         /usr/local/include/ncurses \
1525         /usr/include \
1526         /usr/include/ncurses
1527 do
1528         cf_dir=`eval echo $cf_symbol`
1529         if test -f $cf_dir/curses.h ; then
1530         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1531                 includedir="$cf_symbol"
1532                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1533                 break
1534         fi
1535         fi
1536         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1537 done
1538 echo "$as_me:1538: result: $includedir" >&5
1539 echo "${ECHO_T}$includedir" >&6
1540 fi
1541
1542 ### Defaults for ncurses ABI
1543
1544 case x$cf_cv_abi_version in
1545 (x[6789])
1546         cf_dft_ext_colors=yes
1547         cf_dft_ext_const=yes
1548         cf_dft_ext_mouse=yes
1549         cf_dft_ext_putwin=yes
1550         cf_dft_ext_spfuncs=yes
1551         cf_dft_filter_syms=yes
1552         cf_dft_chtype=uint32_t
1553         cf_dft_mmask_t=uint32_t
1554         cf_dft_interop=yes
1555         cf_dft_tparm_arg=intptr_t
1556         cf_dft_with_lp64=yes
1557         ;;
1558 (*)
1559         cf_dft_ext_colors=no
1560         cf_dft_ext_const=no
1561         cf_dft_ext_mouse=no
1562         cf_dft_ext_putwin=no
1563         cf_dft_ext_spfuncs=no
1564         cf_dft_filter_syms=no
1565         cf_dft_chtype=auto
1566         cf_dft_mmask_t=auto
1567         cf_dft_interop=no
1568         cf_dft_tparm_arg=long
1569         cf_dft_with_lp64=no
1570         ;;
1571 esac
1572
1573 ###     Checks for programs.
1574
1575 # Check whether --with-ada or --without-ada was given.
1576 if test "${with_ada+set}" = set; then
1577   withval="$with_ada"
1578   cf_with_ada=$withval
1579 else
1580   cf_with_ada=yes
1581 fi;
1582 if test "x$cf_with_ada" = xyes
1583 then
1584         cf_PROG_CC="gnatgcc gcc cc"
1585 else
1586         cf_PROG_CC="gcc cc"
1587 fi
1588
1589 ac_ext=c
1590 ac_cpp='$CPP $CPPFLAGS'
1591 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1592 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1593 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1594 ac_main_return=return
1595 if test -n "$ac_tool_prefix"; then
1596   for ac_prog in $cf_PROG_CC
1597   do
1598     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1599 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1600 echo "$as_me:1600: checking for $ac_word" >&5
1601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1602 if test "${ac_cv_prog_CC+set}" = set; then
1603   echo $ECHO_N "(cached) $ECHO_C" >&6
1604 else
1605   if test -n "$CC"; then
1606   ac_cv_prog_CC="$CC" # Let the user override the test.
1607 else
1608   ac_save_IFS=$IFS; IFS=$ac_path_separator
1609 ac_dummy="$PATH"
1610 for ac_dir in $ac_dummy; do
1611   IFS=$ac_save_IFS
1612   test -z "$ac_dir" && ac_dir=.
1613   $as_executable_p "$ac_dir/$ac_word" || continue
1614 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1615 echo "$as_me:1615: found $ac_dir/$ac_word" >&5
1616 break
1617 done
1618
1619 fi
1620 fi
1621 CC=$ac_cv_prog_CC
1622 if test -n "$CC"; then
1623   echo "$as_me:1623: result: $CC" >&5
1624 echo "${ECHO_T}$CC" >&6
1625 else
1626   echo "$as_me:1626: result: no" >&5
1627 echo "${ECHO_T}no" >&6
1628 fi
1629
1630     test -n "$CC" && break
1631   done
1632 fi
1633 if test -z "$CC"; then
1634   ac_ct_CC=$CC
1635   for ac_prog in $cf_PROG_CC
1636 do
1637   # Extract the first word of "$ac_prog", so it can be a program name with args.
1638 set dummy $ac_prog; ac_word=$2
1639 echo "$as_me:1639: checking for $ac_word" >&5
1640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1642   echo $ECHO_N "(cached) $ECHO_C" >&6
1643 else
1644   if test -n "$ac_ct_CC"; then
1645   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1646 else
1647   ac_save_IFS=$IFS; IFS=$ac_path_separator
1648 ac_dummy="$PATH"
1649 for ac_dir in $ac_dummy; do
1650   IFS=$ac_save_IFS
1651   test -z "$ac_dir" && ac_dir=.
1652   $as_executable_p "$ac_dir/$ac_word" || continue
1653 ac_cv_prog_ac_ct_CC="$ac_prog"
1654 echo "$as_me:1654: found $ac_dir/$ac_word" >&5
1655 break
1656 done
1657
1658 fi
1659 fi
1660 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1661 if test -n "$ac_ct_CC"; then
1662   echo "$as_me:1662: result: $ac_ct_CC" >&5
1663 echo "${ECHO_T}$ac_ct_CC" >&6
1664 else
1665   echo "$as_me:1665: result: no" >&5
1666 echo "${ECHO_T}no" >&6
1667 fi
1668
1669   test -n "$ac_ct_CC" && break
1670 done
1671
1672   CC=$ac_ct_CC
1673 fi
1674
1675 test -z "$CC" && { { echo "$as_me:1675: error: no acceptable cc found in \$PATH" >&5
1676 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1677    { (exit 1); exit 1; }; }
1678
1679 # Provide some information about the compiler.
1680 echo "$as_me:1680:" \
1681      "checking for C compiler version" >&5
1682 ac_compiler=`set X $ac_compile; echo $2`
1683 { (eval echo "$as_me:1683: \"$ac_compiler --version </dev/null >&5\"") >&5
1684   (eval $ac_compiler --version </dev/null >&5) 2>&5
1685   ac_status=$?
1686   echo "$as_me:1686: \$? = $ac_status" >&5
1687   (exit $ac_status); }
1688 { (eval echo "$as_me:1688: \"$ac_compiler -v </dev/null >&5\"") >&5
1689   (eval $ac_compiler -v </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693 { (eval echo "$as_me:1693: \"$ac_compiler -V </dev/null >&5\"") >&5
1694   (eval $ac_compiler -V </dev/null >&5) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }
1698
1699 cat >conftest.$ac_ext <<_ACEOF
1700 #line 1700 "configure"
1701 #include "confdefs.h"
1702
1703 int
1704 main ()
1705 {
1706
1707   ;
1708   return 0;
1709 }
1710 _ACEOF
1711 ac_clean_files_save=$ac_clean_files
1712 ac_clean_files="$ac_clean_files a.out a.exe"
1713 # Try to create an executable without -o first, disregard a.out.
1714 # It will help us diagnose broken compilers, and finding out an intuition
1715 # of exeext.
1716 echo "$as_me:1716: checking for C compiler default output" >&5
1717 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1718 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1719 if { (eval echo "$as_me:1719: \"$ac_link_default\"") >&5
1720   (eval $ac_link_default) 2>&5
1721   ac_status=$?
1722   echo "$as_me:1722: \$? = $ac_status" >&5
1723   (exit $ac_status); }; then
1724   # Find the output, starting from the most likely.  This scheme is
1725 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1726 # resort.
1727 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1728                 ls a.out conftest 2>/dev/null;
1729                 ls a.* conftest.* 2>/dev/null`; do
1730   case $ac_file in
1731     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1732     a.out ) # We found the default executable, but exeext='' is most
1733             # certainly right.
1734             break;;
1735     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1736           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1737           export ac_cv_exeext
1738           break;;
1739     * ) break;;
1740   esac
1741 done
1742 else
1743   echo "$as_me: failed program was:" >&5
1744 cat conftest.$ac_ext >&5
1745 { { echo "$as_me:1745: error: C compiler cannot create executables" >&5
1746 echo "$as_me: error: C compiler cannot create executables" >&2;}
1747    { (exit 77); exit 77; }; }
1748 fi
1749
1750 ac_exeext=$ac_cv_exeext
1751 echo "$as_me:1751: result: $ac_file" >&5
1752 echo "${ECHO_T}$ac_file" >&6
1753
1754 # Check the compiler produces executables we can run.  If not, either
1755 # the compiler is broken, or we cross compile.
1756 echo "$as_me:1756: checking whether the C compiler works" >&5
1757 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1758 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1759 # If not cross compiling, check that we can run a simple program.
1760 if test "$cross_compiling" != yes; then
1761   if { ac_try='./$ac_file'
1762   { (eval echo "$as_me:1762: \"$ac_try\"") >&5
1763   (eval $ac_try) 2>&5
1764   ac_status=$?
1765   echo "$as_me:1765: \$? = $ac_status" >&5
1766   (exit $ac_status); }; }; then
1767     cross_compiling=no
1768   else
1769     if test "$cross_compiling" = maybe; then
1770         cross_compiling=yes
1771     else
1772         { { echo "$as_me:1772: error: cannot run C compiled programs.
1773 If you meant to cross compile, use \`--host'." >&5
1774 echo "$as_me: error: cannot run C compiled programs.
1775 If you meant to cross compile, use \`--host'." >&2;}
1776    { (exit 1); exit 1; }; }
1777     fi
1778   fi
1779 fi
1780 echo "$as_me:1780: result: yes" >&5
1781 echo "${ECHO_T}yes" >&6
1782
1783 rm -f a.out a.exe conftest$ac_cv_exeext
1784 ac_clean_files=$ac_clean_files_save
1785 # Check the compiler produces executables we can run.  If not, either
1786 # the compiler is broken, or we cross compile.
1787 echo "$as_me:1787: checking whether we are cross compiling" >&5
1788 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1789 echo "$as_me:1789: result: $cross_compiling" >&5
1790 echo "${ECHO_T}$cross_compiling" >&6
1791
1792 echo "$as_me:1792: checking for executable suffix" >&5
1793 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1794 if { (eval echo "$as_me:1794: \"$ac_link\"") >&5
1795   (eval $ac_link) 2>&5
1796   ac_status=$?
1797   echo "$as_me:1797: \$? = $ac_status" >&5
1798   (exit $ac_status); }; then
1799   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1800 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1801 # work properly (i.e., refer to `conftest.exe'), while it won't with
1802 # `rm'.
1803 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1804   case $ac_file in
1805     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1806     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1807           export ac_cv_exeext
1808           break;;
1809     * ) break;;
1810   esac
1811 done
1812 else
1813   { { echo "$as_me:1813: error: cannot compute EXEEXT: cannot compile and link" >&5
1814 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1815    { (exit 1); exit 1; }; }
1816 fi
1817
1818 rm -f conftest$ac_cv_exeext
1819 echo "$as_me:1819: result: $ac_cv_exeext" >&5
1820 echo "${ECHO_T}$ac_cv_exeext" >&6
1821
1822 rm -f conftest.$ac_ext
1823 EXEEXT=$ac_cv_exeext
1824 ac_exeext=$EXEEXT
1825 echo "$as_me:1825: checking for object suffix" >&5
1826 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1827 if test "${ac_cv_objext+set}" = set; then
1828   echo $ECHO_N "(cached) $ECHO_C" >&6
1829 else
1830   cat >conftest.$ac_ext <<_ACEOF
1831 #line 1831 "configure"
1832 #include "confdefs.h"
1833
1834 int
1835 main ()
1836 {
1837
1838   ;
1839   return 0;
1840 }
1841 _ACEOF
1842 rm -f conftest.o conftest.obj
1843 if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5
1844   (eval $ac_compile) 2>&5
1845   ac_status=$?
1846   echo "$as_me:1846: \$? = $ac_status" >&5
1847   (exit $ac_status); }; then
1848   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1849   case $ac_file in
1850     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1851     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1852        break;;
1853   esac
1854 done
1855 else
1856   echo "$as_me: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1858 { { echo "$as_me:1858: error: cannot compute OBJEXT: cannot compile" >&5
1859 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1860    { (exit 1); exit 1; }; }
1861 fi
1862
1863 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1864 fi
1865 echo "$as_me:1865: result: $ac_cv_objext" >&5
1866 echo "${ECHO_T}$ac_cv_objext" >&6
1867 OBJEXT=$ac_cv_objext
1868 ac_objext=$OBJEXT
1869 echo "$as_me:1869: checking whether we are using the GNU C compiler" >&5
1870 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1871 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1872   echo $ECHO_N "(cached) $ECHO_C" >&6
1873 else
1874   cat >conftest.$ac_ext <<_ACEOF
1875 #line 1875 "configure"
1876 #include "confdefs.h"
1877
1878 int
1879 main ()
1880 {
1881 #ifndef __GNUC__
1882        choke me
1883 #endif
1884
1885   ;
1886   return 0;
1887 }
1888 _ACEOF
1889 rm -f conftest.$ac_objext
1890 if { (eval echo "$as_me:1890: \"$ac_compile\"") >&5
1891   (eval $ac_compile) 2>&5
1892   ac_status=$?
1893   echo "$as_me:1893: \$? = $ac_status" >&5
1894   (exit $ac_status); } &&
1895          { ac_try='test -s conftest.$ac_objext'
1896   { (eval echo "$as_me:1896: \"$ac_try\"") >&5
1897   (eval $ac_try) 2>&5
1898   ac_status=$?
1899   echo "$as_me:1899: \$? = $ac_status" >&5
1900   (exit $ac_status); }; }; then
1901   ac_compiler_gnu=yes
1902 else
1903   echo "$as_me: failed program was:" >&5
1904 cat conftest.$ac_ext >&5
1905 ac_compiler_gnu=no
1906 fi
1907 rm -f conftest.$ac_objext conftest.$ac_ext
1908 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1909
1910 fi
1911 echo "$as_me:1911: result: $ac_cv_c_compiler_gnu" >&5
1912 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1913 GCC=`test $ac_compiler_gnu = yes && echo yes`
1914 ac_test_CFLAGS=${CFLAGS+set}
1915 ac_save_CFLAGS=$CFLAGS
1916 CFLAGS="-g"
1917 echo "$as_me:1917: checking whether $CC accepts -g" >&5
1918 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1919 if test "${ac_cv_prog_cc_g+set}" = set; then
1920   echo $ECHO_N "(cached) $ECHO_C" >&6
1921 else
1922   cat >conftest.$ac_ext <<_ACEOF
1923 #line 1923 "configure"
1924 #include "confdefs.h"
1925
1926 int
1927 main ()
1928 {
1929
1930   ;
1931   return 0;
1932 }
1933 _ACEOF
1934 rm -f conftest.$ac_objext
1935 if { (eval echo "$as_me:1935: \"$ac_compile\"") >&5
1936   (eval $ac_compile) 2>&5
1937   ac_status=$?
1938   echo "$as_me:1938: \$? = $ac_status" >&5
1939   (exit $ac_status); } &&
1940          { ac_try='test -s conftest.$ac_objext'
1941   { (eval echo "$as_me:1941: \"$ac_try\"") >&5
1942   (eval $ac_try) 2>&5
1943   ac_status=$?
1944   echo "$as_me:1944: \$? = $ac_status" >&5
1945   (exit $ac_status); }; }; then
1946   ac_cv_prog_cc_g=yes
1947 else
1948   echo "$as_me: failed program was:" >&5
1949 cat conftest.$ac_ext >&5
1950 ac_cv_prog_cc_g=no
1951 fi
1952 rm -f conftest.$ac_objext conftest.$ac_ext
1953 fi
1954 echo "$as_me:1954: result: $ac_cv_prog_cc_g" >&5
1955 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1956 if test "$ac_test_CFLAGS" = set; then
1957   CFLAGS=$ac_save_CFLAGS
1958 elif test $ac_cv_prog_cc_g = yes; then
1959   if test "$GCC" = yes; then
1960     CFLAGS="-g -O2"
1961   else
1962     CFLAGS="-g"
1963   fi
1964 else
1965   if test "$GCC" = yes; then
1966     CFLAGS="-O2"
1967   else
1968     CFLAGS=
1969   fi
1970 fi
1971 # Some people use a C++ compiler to compile C.  Since we use `exit',
1972 # in C++ we need to declare it.  In case someone uses the same compiler
1973 # for both compiling C and C++ we need to have the C++ compiler decide
1974 # the declaration of exit, since it's the most demanding environment.
1975 cat >conftest.$ac_ext <<_ACEOF
1976 #ifndef __cplusplus
1977   choke me
1978 #endif
1979 _ACEOF
1980 rm -f conftest.$ac_objext
1981 if { (eval echo "$as_me:1981: \"$ac_compile\"") >&5
1982   (eval $ac_compile) 2>&5
1983   ac_status=$?
1984   echo "$as_me:1984: \$? = $ac_status" >&5
1985   (exit $ac_status); } &&
1986          { ac_try='test -s conftest.$ac_objext'
1987   { (eval echo "$as_me:1987: \"$ac_try\"") >&5
1988   (eval $ac_try) 2>&5
1989   ac_status=$?
1990   echo "$as_me:1990: \$? = $ac_status" >&5
1991   (exit $ac_status); }; }; then
1992   for ac_declaration in \
1993    ''\
1994    '#include <stdlib.h>' \
1995    'extern "C" void std::exit (int) throw (); using std::exit;' \
1996    'extern "C" void std::exit (int); using std::exit;' \
1997    'extern "C" void exit (int) throw ();' \
1998    'extern "C" void exit (int);' \
1999    'void exit (int);'
2000 do
2001   cat >conftest.$ac_ext <<_ACEOF
2002 #line 2002 "configure"
2003 #include "confdefs.h"
2004 #include <stdlib.h>
2005 $ac_declaration
2006 int
2007 main ()
2008 {
2009 exit (42);
2010   ;
2011   return 0;
2012 }
2013 _ACEOF
2014 rm -f conftest.$ac_objext
2015 if { (eval echo "$as_me:2015: \"$ac_compile\"") >&5
2016   (eval $ac_compile) 2>&5
2017   ac_status=$?
2018   echo "$as_me:2018: \$? = $ac_status" >&5
2019   (exit $ac_status); } &&
2020          { ac_try='test -s conftest.$ac_objext'
2021   { (eval echo "$as_me:2021: \"$ac_try\"") >&5
2022   (eval $ac_try) 2>&5
2023   ac_status=$?
2024   echo "$as_me:2024: \$? = $ac_status" >&5
2025   (exit $ac_status); }; }; then
2026   :
2027 else
2028   echo "$as_me: failed program was:" >&5
2029 cat conftest.$ac_ext >&5
2030 continue
2031 fi
2032 rm -f conftest.$ac_objext conftest.$ac_ext
2033   cat >conftest.$ac_ext <<_ACEOF
2034 #line 2034 "configure"
2035 #include "confdefs.h"
2036 $ac_declaration
2037 int
2038 main ()
2039 {
2040 exit (42);
2041   ;
2042   return 0;
2043 }
2044 _ACEOF
2045 rm -f conftest.$ac_objext
2046 if { (eval echo "$as_me:2046: \"$ac_compile\"") >&5
2047   (eval $ac_compile) 2>&5
2048   ac_status=$?
2049   echo "$as_me:2049: \$? = $ac_status" >&5
2050   (exit $ac_status); } &&
2051          { ac_try='test -s conftest.$ac_objext'
2052   { (eval echo "$as_me:2052: \"$ac_try\"") >&5
2053   (eval $ac_try) 2>&5
2054   ac_status=$?
2055   echo "$as_me:2055: \$? = $ac_status" >&5
2056   (exit $ac_status); }; }; then
2057   break
2058 else
2059   echo "$as_me: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 fi
2062 rm -f conftest.$ac_objext conftest.$ac_ext
2063 done
2064 rm -rf conftest*
2065 if test -n "$ac_declaration"; then
2066   echo '#ifdef __cplusplus' >>confdefs.h
2067   echo $ac_declaration      >>confdefs.h
2068   echo '#endif'             >>confdefs.h
2069 fi
2070
2071 else
2072   echo "$as_me: failed program was:" >&5
2073 cat conftest.$ac_ext >&5
2074 fi
2075 rm -f conftest.$ac_objext conftest.$ac_ext
2076 ac_ext=c
2077 ac_cpp='$CPP $CPPFLAGS'
2078 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2079 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2080 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2081 ac_main_return=return
2082
2083 GCC_VERSION=none
2084 if test "$GCC" = yes ; then
2085         echo "$as_me:2085: checking version of $CC" >&5
2086 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2087         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.].*//'`"
2088         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2089         echo "$as_me:2089: result: $GCC_VERSION" >&5
2090 echo "${ECHO_T}$GCC_VERSION" >&6
2091 fi
2092
2093 echo "$as_me:2093: checking for $CC option to accept ANSI C" >&5
2094 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2095 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2096   echo $ECHO_N "(cached) $ECHO_C" >&6
2097 else
2098   ac_cv_prog_cc_stdc=no
2099 ac_save_CC=$CC
2100 cat >conftest.$ac_ext <<_ACEOF
2101 #line 2101 "configure"
2102 #include "confdefs.h"
2103 #include <stdarg.h>
2104 #include <stdio.h>
2105 #include <sys/types.h>
2106 #include <sys/stat.h>
2107 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2108 struct buf { int x; };
2109 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2110 static char *e (p, i)
2111      char **p;
2112      int i;
2113 {
2114   return p[i];
2115 }
2116 static char *f (char * (*g) (char **, int), char **p, ...)
2117 {
2118   char *s;
2119   va_list v;
2120   va_start (v,p);
2121   s = g (p, va_arg (v,int));
2122   va_end (v);
2123   return s;
2124 }
2125 int test (int i, double x);
2126 struct s1 {int (*f) (int a);};
2127 struct s2 {int (*f) (double a);};
2128 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2129 int argc;
2130 char **argv;
2131 int
2132 main ()
2133 {
2134 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2135   ;
2136   return 0;
2137 }
2138 _ACEOF
2139 # Don't try gcc -ansi; that turns off useful extensions and
2140 # breaks some systems' header files.
2141 # AIX                   -qlanglvl=ansi
2142 # Ultrix and OSF/1      -std1
2143 # HP-UX 10.20 and later -Ae
2144 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2145 # SVR4                  -Xc -D__EXTENSIONS__
2146 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2147 do
2148   CC="$ac_save_CC $ac_arg"
2149   rm -f conftest.$ac_objext
2150 if { (eval echo "$as_me:2150: \"$ac_compile\"") >&5
2151   (eval $ac_compile) 2>&5
2152   ac_status=$?
2153   echo "$as_me:2153: \$? = $ac_status" >&5
2154   (exit $ac_status); } &&
2155          { ac_try='test -s conftest.$ac_objext'
2156   { (eval echo "$as_me:2156: \"$ac_try\"") >&5
2157   (eval $ac_try) 2>&5
2158   ac_status=$?
2159   echo "$as_me:2159: \$? = $ac_status" >&5
2160   (exit $ac_status); }; }; then
2161   ac_cv_prog_cc_stdc=$ac_arg
2162 break
2163 else
2164   echo "$as_me: failed program was:" >&5
2165 cat conftest.$ac_ext >&5
2166 fi
2167 rm -f conftest.$ac_objext
2168 done
2169 rm -f conftest.$ac_ext conftest.$ac_objext
2170 CC=$ac_save_CC
2171
2172 fi
2173
2174 case "x$ac_cv_prog_cc_stdc" in
2175   x|xno)
2176     echo "$as_me:2176: result: none needed" >&5
2177 echo "${ECHO_T}none needed" >&6 ;;
2178   *)
2179     echo "$as_me:2179: result: $ac_cv_prog_cc_stdc" >&5
2180 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2181     CC="$CC $ac_cv_prog_cc_stdc" ;;
2182 esac
2183
2184 # This should have been defined by AC_PROG_CC
2185 : ${CC:=cc}
2186
2187 echo "$as_me:2187: checking \$CC variable" >&5
2188 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2189 case "$CC" in
2190 (*[\ \  ]-*)
2191         echo "$as_me:2191: result: broken" >&5
2192 echo "${ECHO_T}broken" >&6
2193         { echo "$as_me:2193: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2194 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2195         # humor him...
2196         cf_flags=`echo "$CC" | sed -e 's/^.*[   ]\(-[^  ]\)/\1/'`
2197         CC=`echo "$CC " | sed -e 's/[   ]-[^    ].*$//' -e 's/[         ]*$//'`
2198         for cf_arg in $cf_flags
2199         do
2200                 case "x$cf_arg" in
2201                 (x-[IUDfgOW]*)
2202
2203 cf_fix_cppflags=no
2204 cf_new_cflags=
2205 cf_new_cppflags=
2206 cf_new_extra_cppflags=
2207
2208 for cf_add_cflags in $cf_flags
2209 do
2210 case $cf_fix_cppflags in
2211 (no)
2212         case $cf_add_cflags in
2213         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2214                 case $cf_add_cflags in
2215                 (-D*)
2216                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2217
2218                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2219                                 && test -z "${cf_tst_cflags}" \
2220                                 && cf_fix_cppflags=yes
2221
2222                         if test $cf_fix_cppflags = yes ; then
2223                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2224                                 continue
2225                         elif test "${cf_tst_cflags}" = "\"'" ; then
2226                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2227                                 continue
2228                         fi
2229                         ;;
2230                 esac
2231                 case "$CPPFLAGS" in
2232                 (*$cf_add_cflags)
2233                         ;;
2234                 (*)
2235                         case $cf_add_cflags in
2236                         (-D*)
2237                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2238
2239 CPPFLAGS=`echo "$CPPFLAGS" | \
2240         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2241                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2242
2243                                 ;;
2244                         esac
2245                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2246                         ;;
2247                 esac
2248                 ;;
2249         (*)
2250                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2251                 ;;
2252         esac
2253         ;;
2254 (yes)
2255         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2256
2257         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2258
2259         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2260                 && test -z "${cf_tst_cflags}" \
2261                 && cf_fix_cppflags=no
2262         ;;
2263 esac
2264 done
2265
2266 if test -n "$cf_new_cflags" ; then
2267
2268         CFLAGS="$CFLAGS $cf_new_cflags"
2269 fi
2270
2271 if test -n "$cf_new_cppflags" ; then
2272
2273         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2274 fi
2275
2276 if test -n "$cf_new_extra_cppflags" ; then
2277
2278         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2279 fi
2280
2281                         ;;
2282                 (*)
2283                         CC="$CC $cf_arg"
2284                         ;;
2285                 esac
2286         done
2287         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2288
2289 echo "${as_me:-configure}:2289: testing resulting CC: '$CC' ..." 1>&5
2290
2291         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2292
2293 echo "${as_me:-configure}:2293: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2294
2295         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2296
2297 echo "${as_me:-configure}:2297: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2298
2299         ;;
2300 (*)
2301         echo "$as_me:2301: result: ok" >&5
2302 echo "${ECHO_T}ok" >&6
2303         ;;
2304 esac
2305
2306 ac_ext=c
2307 ac_cpp='$CPP $CPPFLAGS'
2308 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2309 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2310 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2311 ac_main_return=return
2312 echo "$as_me:2312: checking how to run the C preprocessor" >&5
2313 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2314 # On Suns, sometimes $CPP names a directory.
2315 if test -n "$CPP" && test -d "$CPP"; then
2316   CPP=
2317 fi
2318 if test -z "$CPP"; then
2319   if test "${ac_cv_prog_CPP+set}" = set; then
2320   echo $ECHO_N "(cached) $ECHO_C" >&6
2321 else
2322       # Double quotes because CPP needs to be expanded
2323     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2324     do
2325       ac_preproc_ok=false
2326 for ac_c_preproc_warn_flag in '' yes
2327 do
2328   # Use a header file that comes with gcc, so configuring glibc
2329   # with a fresh cross-compiler works.
2330   # On the NeXT, cc -E runs the code through the compiler's parser,
2331   # not just through cpp. "Syntax error" is here to catch this case.
2332   cat >conftest.$ac_ext <<_ACEOF
2333 #line 2333 "configure"
2334 #include "confdefs.h"
2335 #include <assert.h>
2336                      Syntax error
2337 _ACEOF
2338 if { (eval echo "$as_me:2338: \"$ac_cpp conftest.$ac_ext\"") >&5
2339   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2340   ac_status=$?
2341   egrep -v '^ *\+' conftest.er1 >conftest.err
2342   rm -f conftest.er1
2343   cat conftest.err >&5
2344   echo "$as_me:2344: \$? = $ac_status" >&5
2345   (exit $ac_status); } >/dev/null; then
2346   if test -s conftest.err; then
2347     ac_cpp_err=$ac_c_preproc_warn_flag
2348   else
2349     ac_cpp_err=
2350   fi
2351 else
2352   ac_cpp_err=yes
2353 fi
2354 if test -z "$ac_cpp_err"; then
2355   :
2356 else
2357   echo "$as_me: failed program was:" >&5
2358   cat conftest.$ac_ext >&5
2359   # Broken: fails on valid input.
2360 continue
2361 fi
2362 rm -f conftest.err conftest.$ac_ext
2363
2364   # OK, works on sane cases.  Now check whether non-existent headers
2365   # can be detected and how.
2366   cat >conftest.$ac_ext <<_ACEOF
2367 #line 2367 "configure"
2368 #include "confdefs.h"
2369 #include <ac_nonexistent.h>
2370 _ACEOF
2371 if { (eval echo "$as_me:2371: \"$ac_cpp conftest.$ac_ext\"") >&5
2372   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2373   ac_status=$?
2374   egrep -v '^ *\+' conftest.er1 >conftest.err
2375   rm -f conftest.er1
2376   cat conftest.err >&5
2377   echo "$as_me:2377: \$? = $ac_status" >&5
2378   (exit $ac_status); } >/dev/null; then
2379   if test -s conftest.err; then
2380     ac_cpp_err=$ac_c_preproc_warn_flag
2381   else
2382     ac_cpp_err=
2383   fi
2384 else
2385   ac_cpp_err=yes
2386 fi
2387 if test -z "$ac_cpp_err"; then
2388   # Broken: success on invalid input.
2389 continue
2390 else
2391   echo "$as_me: failed program was:" >&5
2392   cat conftest.$ac_ext >&5
2393   # Passes both tests.
2394 ac_preproc_ok=:
2395 break
2396 fi
2397 rm -f conftest.err conftest.$ac_ext
2398
2399 done
2400 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2401 rm -f conftest.err conftest.$ac_ext
2402 if $ac_preproc_ok; then
2403   break
2404 fi
2405
2406     done
2407     ac_cv_prog_CPP=$CPP
2408
2409 fi
2410   CPP=$ac_cv_prog_CPP
2411 else
2412   ac_cv_prog_CPP=$CPP
2413 fi
2414 echo "$as_me:2414: result: $CPP" >&5
2415 echo "${ECHO_T}$CPP" >&6
2416 ac_preproc_ok=false
2417 for ac_c_preproc_warn_flag in '' yes
2418 do
2419   # Use a header file that comes with gcc, so configuring glibc
2420   # with a fresh cross-compiler works.
2421   # On the NeXT, cc -E runs the code through the compiler's parser,
2422   # not just through cpp. "Syntax error" is here to catch this case.
2423   cat >conftest.$ac_ext <<_ACEOF
2424 #line 2424 "configure"
2425 #include "confdefs.h"
2426 #include <assert.h>
2427                      Syntax error
2428 _ACEOF
2429 if { (eval echo "$as_me:2429: \"$ac_cpp conftest.$ac_ext\"") >&5
2430   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2431   ac_status=$?
2432   egrep -v '^ *\+' conftest.er1 >conftest.err
2433   rm -f conftest.er1
2434   cat conftest.err >&5
2435   echo "$as_me:2435: \$? = $ac_status" >&5
2436   (exit $ac_status); } >/dev/null; then
2437   if test -s conftest.err; then
2438     ac_cpp_err=$ac_c_preproc_warn_flag
2439   else
2440     ac_cpp_err=
2441   fi
2442 else
2443   ac_cpp_err=yes
2444 fi
2445 if test -z "$ac_cpp_err"; then
2446   :
2447 else
2448   echo "$as_me: failed program was:" >&5
2449   cat conftest.$ac_ext >&5
2450   # Broken: fails on valid input.
2451 continue
2452 fi
2453 rm -f conftest.err conftest.$ac_ext
2454
2455   # OK, works on sane cases.  Now check whether non-existent headers
2456   # can be detected and how.
2457   cat >conftest.$ac_ext <<_ACEOF
2458 #line 2458 "configure"
2459 #include "confdefs.h"
2460 #include <ac_nonexistent.h>
2461 _ACEOF
2462 if { (eval echo "$as_me:2462: \"$ac_cpp conftest.$ac_ext\"") >&5
2463   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2464   ac_status=$?
2465   egrep -v '^ *\+' conftest.er1 >conftest.err
2466   rm -f conftest.er1
2467   cat conftest.err >&5
2468   echo "$as_me:2468: \$? = $ac_status" >&5
2469   (exit $ac_status); } >/dev/null; then
2470   if test -s conftest.err; then
2471     ac_cpp_err=$ac_c_preproc_warn_flag
2472   else
2473     ac_cpp_err=
2474   fi
2475 else
2476   ac_cpp_err=yes
2477 fi
2478 if test -z "$ac_cpp_err"; then
2479   # Broken: success on invalid input.
2480 continue
2481 else
2482   echo "$as_me: failed program was:" >&5
2483   cat conftest.$ac_ext >&5
2484   # Passes both tests.
2485 ac_preproc_ok=:
2486 break
2487 fi
2488 rm -f conftest.err conftest.$ac_ext
2489
2490 done
2491 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2492 rm -f conftest.err conftest.$ac_ext
2493 if $ac_preproc_ok; then
2494   :
2495 else
2496   { { echo "$as_me:2496: error: C preprocessor \"$CPP\" fails sanity check" >&5
2497 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2498    { (exit 1); exit 1; }; }
2499 fi
2500
2501 ac_ext=c
2502 ac_cpp='$CPP $CPPFLAGS'
2503 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2504 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2505 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2506 ac_main_return=return
2507
2508 if test $ac_cv_c_compiler_gnu = yes; then
2509     echo "$as_me:2509: checking whether $CC needs -traditional" >&5
2510 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2511 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2512   echo $ECHO_N "(cached) $ECHO_C" >&6
2513 else
2514     ac_pattern="Autoconf.*'x'"
2515   cat >conftest.$ac_ext <<_ACEOF
2516 #line 2516 "configure"
2517 #include "confdefs.h"
2518 #include <sgtty.h>
2519 int Autoconf = TIOCGETP;
2520 _ACEOF
2521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2522   egrep "$ac_pattern" >/dev/null 2>&1; then
2523   ac_cv_prog_gcc_traditional=yes
2524 else
2525   ac_cv_prog_gcc_traditional=no
2526 fi
2527 rm -rf conftest*
2528
2529   if test $ac_cv_prog_gcc_traditional = no; then
2530     cat >conftest.$ac_ext <<_ACEOF
2531 #line 2531 "configure"
2532 #include "confdefs.h"
2533 #include <termio.h>
2534 int Autoconf = TCGETA;
2535 _ACEOF
2536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2537   egrep "$ac_pattern" >/dev/null 2>&1; then
2538   ac_cv_prog_gcc_traditional=yes
2539 fi
2540 rm -rf conftest*
2541
2542   fi
2543 fi
2544 echo "$as_me:2544: result: $ac_cv_prog_gcc_traditional" >&5
2545 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2546   if test $ac_cv_prog_gcc_traditional = yes; then
2547     CC="$CC -traditional"
2548   fi
2549 fi
2550
2551 echo "$as_me:2551: checking whether $CC understands -c and -o together" >&5
2552 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2553 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2554   echo $ECHO_N "(cached) $ECHO_C" >&6
2555 else
2556
2557 cat > conftest.$ac_ext <<CF_EOF
2558 int main(void)
2559 {
2560         ${cf_cv_main_return:-return}(0);
2561 }
2562 CF_EOF
2563 # We do the test twice because some compilers refuse to overwrite an
2564 # existing .o file with -o, though they will create one.
2565 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2566 if { (eval echo "$as_me:2566: \"$ac_try\"") >&5
2567   (eval $ac_try) 2>&5
2568   ac_status=$?
2569   echo "$as_me:2569: \$? = $ac_status" >&5
2570   (exit $ac_status); } &&
2571   test -f conftest2.$ac_objext && { (eval echo "$as_me:2571: \"$ac_try\"") >&5
2572   (eval $ac_try) 2>&5
2573   ac_status=$?
2574   echo "$as_me:2574: \$? = $ac_status" >&5
2575   (exit $ac_status); };
2576 then
2577   eval cf_cv_prog_CC_c_o=yes
2578 else
2579   eval cf_cv_prog_CC_c_o=no
2580 fi
2581 rm -rf conftest*
2582
2583 fi
2584 if test $cf_cv_prog_CC_c_o = yes; then
2585   echo "$as_me:2585: result: yes" >&5
2586 echo "${ECHO_T}yes" >&6
2587 else
2588   echo "$as_me:2588: result: no" >&5
2589 echo "${ECHO_T}no" >&6
2590 fi
2591
2592 if test "$cross_compiling" = yes ; then
2593         LDCONFIG=:
2594 else
2595         case "$cf_cv_system_name" in
2596         (dragonfly*|mirbsd*|freebsd*)
2597                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2598                 ;;
2599         (*) LDPATH=$PATH:/sbin:/usr/sbin
2600                 # Extract the first word of "ldconfig", so it can be a program name with args.
2601 set dummy ldconfig; ac_word=$2
2602 echo "$as_me:2602: checking for $ac_word" >&5
2603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2604 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2605   echo $ECHO_N "(cached) $ECHO_C" >&6
2606 else
2607   case $LDCONFIG in
2608   [\\/]* | ?:[\\/]*)
2609   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2610   ;;
2611   *)
2612   ac_save_IFS=$IFS; IFS=$ac_path_separator
2613 ac_dummy="$LDPATH"
2614 for ac_dir in $ac_dummy; do
2615   IFS=$ac_save_IFS
2616   test -z "$ac_dir" && ac_dir=.
2617   if $as_executable_p "$ac_dir/$ac_word"; then
2618    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2619    echo "$as_me:2619: found $ac_dir/$ac_word" >&5
2620    break
2621 fi
2622 done
2623
2624   ;;
2625 esac
2626 fi
2627 LDCONFIG=$ac_cv_path_LDCONFIG
2628
2629 if test -n "$LDCONFIG"; then
2630   echo "$as_me:2630: result: $LDCONFIG" >&5
2631 echo "${ECHO_T}$LDCONFIG" >&6
2632 else
2633   echo "$as_me:2633: result: no" >&5
2634 echo "${ECHO_T}no" >&6
2635 fi
2636
2637                 ;;
2638         esac
2639 fi
2640
2641 echo "$as_me:2641: checking if you want to ensure bool is consistent with C++" >&5
2642 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2643
2644 # Check whether --with-cxx or --without-cxx was given.
2645 if test "${with_cxx+set}" = set; then
2646   withval="$with_cxx"
2647   cf_with_cxx=$withval
2648 else
2649   cf_with_cxx=yes
2650 fi;
2651 echo "$as_me:2651: result: $cf_with_cxx" >&5
2652 echo "${ECHO_T}$cf_with_cxx" >&6
2653 if test "X$cf_with_cxx" = Xno ; then
2654         CXX=""
2655         GXX=""
2656 else
2657         # with autoconf 2.13, we can change the error to a warning:
2658                 ac_ext=cc
2659 ac_cpp='$CXXCPP $CPPFLAGS'
2660 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2661 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2662 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2663 ac_main_return=return
2664 if test -n "$ac_tool_prefix"; then
2665   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2666   do
2667     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2668 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2669 echo "$as_me:2669: checking for $ac_word" >&5
2670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2671 if test "${ac_cv_prog_CXX+set}" = set; then
2672   echo $ECHO_N "(cached) $ECHO_C" >&6
2673 else
2674   if test -n "$CXX"; then
2675   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2676 else
2677   ac_save_IFS=$IFS; IFS=$ac_path_separator
2678 ac_dummy="$PATH"
2679 for ac_dir in $ac_dummy; do
2680   IFS=$ac_save_IFS
2681   test -z "$ac_dir" && ac_dir=.
2682   $as_executable_p "$ac_dir/$ac_word" || continue
2683 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2684 echo "$as_me:2684: found $ac_dir/$ac_word" >&5
2685 break
2686 done
2687
2688 fi
2689 fi
2690 CXX=$ac_cv_prog_CXX
2691 if test -n "$CXX"; then
2692   echo "$as_me:2692: result: $CXX" >&5
2693 echo "${ECHO_T}$CXX" >&6
2694 else
2695   echo "$as_me:2695: result: no" >&5
2696 echo "${ECHO_T}no" >&6
2697 fi
2698
2699     test -n "$CXX" && break
2700   done
2701 fi
2702 if test -z "$CXX"; then
2703   ac_ct_CXX=$CXX
2704   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2705 do
2706   # Extract the first word of "$ac_prog", so it can be a program name with args.
2707 set dummy $ac_prog; ac_word=$2
2708 echo "$as_me:2708: checking for $ac_word" >&5
2709 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2710 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2711   echo $ECHO_N "(cached) $ECHO_C" >&6
2712 else
2713   if test -n "$ac_ct_CXX"; then
2714   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2715 else
2716   ac_save_IFS=$IFS; IFS=$ac_path_separator
2717 ac_dummy="$PATH"
2718 for ac_dir in $ac_dummy; do
2719   IFS=$ac_save_IFS
2720   test -z "$ac_dir" && ac_dir=.
2721   $as_executable_p "$ac_dir/$ac_word" || continue
2722 ac_cv_prog_ac_ct_CXX="$ac_prog"
2723 echo "$as_me:2723: found $ac_dir/$ac_word" >&5
2724 break
2725 done
2726
2727 fi
2728 fi
2729 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2730 if test -n "$ac_ct_CXX"; then
2731   echo "$as_me:2731: result: $ac_ct_CXX" >&5
2732 echo "${ECHO_T}$ac_ct_CXX" >&6
2733 else
2734   echo "$as_me:2734: result: no" >&5
2735 echo "${ECHO_T}no" >&6
2736 fi
2737
2738   test -n "$ac_ct_CXX" && break
2739 done
2740 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2741
2742   CXX=$ac_ct_CXX
2743 fi
2744
2745 # Provide some information about the compiler.
2746 echo "$as_me:2746:" \
2747      "checking for C++ compiler version" >&5
2748 ac_compiler=`set X $ac_compile; echo $2`
2749 { (eval echo "$as_me:2749: \"$ac_compiler --version </dev/null >&5\"") >&5
2750   (eval $ac_compiler --version </dev/null >&5) 2>&5
2751   ac_status=$?
2752   echo "$as_me:2752: \$? = $ac_status" >&5
2753   (exit $ac_status); }
2754 { (eval echo "$as_me:2754: \"$ac_compiler -v </dev/null >&5\"") >&5
2755   (eval $ac_compiler -v </dev/null >&5) 2>&5
2756   ac_status=$?
2757   echo "$as_me:2757: \$? = $ac_status" >&5
2758   (exit $ac_status); }
2759 { (eval echo "$as_me:2759: \"$ac_compiler -V </dev/null >&5\"") >&5
2760   (eval $ac_compiler -V </dev/null >&5) 2>&5
2761   ac_status=$?
2762   echo "$as_me:2762: \$? = $ac_status" >&5
2763   (exit $ac_status); }
2764
2765 echo "$as_me:2765: checking whether we are using the GNU C++ compiler" >&5
2766 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2767 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2768   echo $ECHO_N "(cached) $ECHO_C" >&6
2769 else
2770   cat >conftest.$ac_ext <<_ACEOF
2771 #line 2771 "configure"
2772 #include "confdefs.h"
2773
2774 int
2775 main ()
2776 {
2777 #ifndef __GNUC__
2778        choke me
2779 #endif
2780
2781   ;
2782   return 0;
2783 }
2784 _ACEOF
2785 rm -f conftest.$ac_objext
2786 if { (eval echo "$as_me:2786: \"$ac_compile\"") >&5
2787   (eval $ac_compile) 2>&5
2788   ac_status=$?
2789   echo "$as_me:2789: \$? = $ac_status" >&5
2790   (exit $ac_status); } &&
2791          { ac_try='test -s conftest.$ac_objext'
2792   { (eval echo "$as_me:2792: \"$ac_try\"") >&5
2793   (eval $ac_try) 2>&5
2794   ac_status=$?
2795   echo "$as_me:2795: \$? = $ac_status" >&5
2796   (exit $ac_status); }; }; then
2797   ac_compiler_gnu=yes
2798 else
2799   echo "$as_me: failed program was:" >&5
2800 cat conftest.$ac_ext >&5
2801 ac_compiler_gnu=no
2802 fi
2803 rm -f conftest.$ac_objext conftest.$ac_ext
2804 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2805
2806 fi
2807 echo "$as_me:2807: result: $ac_cv_cxx_compiler_gnu" >&5
2808 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2809 GXX=`test $ac_compiler_gnu = yes && echo yes`
2810 ac_test_CXXFLAGS=${CXXFLAGS+set}
2811 ac_save_CXXFLAGS=$CXXFLAGS
2812 CXXFLAGS="-g"
2813 echo "$as_me:2813: checking whether $CXX accepts -g" >&5
2814 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2815 if test "${ac_cv_prog_cxx_g+set}" = set; then
2816   echo $ECHO_N "(cached) $ECHO_C" >&6
2817 else
2818   cat >conftest.$ac_ext <<_ACEOF
2819 #line 2819 "configure"
2820 #include "confdefs.h"
2821
2822 int
2823 main ()
2824 {
2825
2826   ;
2827   return 0;
2828 }
2829 _ACEOF
2830 rm -f conftest.$ac_objext
2831 if { (eval echo "$as_me:2831: \"$ac_compile\"") >&5
2832   (eval $ac_compile) 2>&5
2833   ac_status=$?
2834   echo "$as_me:2834: \$? = $ac_status" >&5
2835   (exit $ac_status); } &&
2836          { ac_try='test -s conftest.$ac_objext'
2837   { (eval echo "$as_me:2837: \"$ac_try\"") >&5
2838   (eval $ac_try) 2>&5
2839   ac_status=$?
2840   echo "$as_me:2840: \$? = $ac_status" >&5
2841   (exit $ac_status); }; }; then
2842   ac_cv_prog_cxx_g=yes
2843 else
2844   echo "$as_me: failed program was:" >&5
2845 cat conftest.$ac_ext >&5
2846 ac_cv_prog_cxx_g=no
2847 fi
2848 rm -f conftest.$ac_objext conftest.$ac_ext
2849 fi
2850 echo "$as_me:2850: result: $ac_cv_prog_cxx_g" >&5
2851 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2852 if test "$ac_test_CXXFLAGS" = set; then
2853   CXXFLAGS=$ac_save_CXXFLAGS
2854 elif test $ac_cv_prog_cxx_g = yes; then
2855   if test "$GXX" = yes; then
2856     CXXFLAGS="-g -O2"
2857   else
2858     CXXFLAGS="-g"
2859   fi
2860 else
2861   if test "$GXX" = yes; then
2862     CXXFLAGS="-O2"
2863   else
2864     CXXFLAGS=
2865   fi
2866 fi
2867 for ac_declaration in \
2868    ''\
2869    '#include <stdlib.h>' \
2870    'extern "C" void std::exit (int) throw (); using std::exit;' \
2871    'extern "C" void std::exit (int); using std::exit;' \
2872    'extern "C" void exit (int) throw ();' \
2873    'extern "C" void exit (int);' \
2874    'void exit (int);'
2875 do
2876   cat >conftest.$ac_ext <<_ACEOF
2877 #line 2877 "configure"
2878 #include "confdefs.h"
2879 #include <stdlib.h>
2880 $ac_declaration
2881 int
2882 main ()
2883 {
2884 exit (42);
2885   ;
2886   return 0;
2887 }
2888 _ACEOF
2889 rm -f conftest.$ac_objext
2890 if { (eval echo "$as_me:2890: \"$ac_compile\"") >&5
2891   (eval $ac_compile) 2>&5
2892   ac_status=$?
2893   echo "$as_me:2893: \$? = $ac_status" >&5
2894   (exit $ac_status); } &&
2895          { ac_try='test -s conftest.$ac_objext'
2896   { (eval echo "$as_me:2896: \"$ac_try\"") >&5
2897   (eval $ac_try) 2>&5
2898   ac_status=$?
2899   echo "$as_me:2899: \$? = $ac_status" >&5
2900   (exit $ac_status); }; }; then
2901   :
2902 else
2903   echo "$as_me: failed program was:" >&5
2904 cat conftest.$ac_ext >&5
2905 continue
2906 fi
2907 rm -f conftest.$ac_objext conftest.$ac_ext
2908   cat >conftest.$ac_ext <<_ACEOF
2909 #line 2909 "configure"
2910 #include "confdefs.h"
2911 $ac_declaration
2912 int
2913 main ()
2914 {
2915 exit (42);
2916   ;
2917   return 0;
2918 }
2919 _ACEOF
2920 rm -f conftest.$ac_objext
2921 if { (eval echo "$as_me:2921: \"$ac_compile\"") >&5
2922   (eval $ac_compile) 2>&5
2923   ac_status=$?
2924   echo "$as_me:2924: \$? = $ac_status" >&5
2925   (exit $ac_status); } &&
2926          { ac_try='test -s conftest.$ac_objext'
2927   { (eval echo "$as_me:2927: \"$ac_try\"") >&5
2928   (eval $ac_try) 2>&5
2929   ac_status=$?
2930   echo "$as_me:2930: \$? = $ac_status" >&5
2931   (exit $ac_status); }; }; then
2932   break
2933 else
2934   echo "$as_me: failed program was:" >&5
2935 cat conftest.$ac_ext >&5
2936 fi
2937 rm -f conftest.$ac_objext conftest.$ac_ext
2938 done
2939 rm -rf conftest*
2940 if test -n "$ac_declaration"; then
2941   echo '#ifdef __cplusplus' >>confdefs.h
2942   echo $ac_declaration      >>confdefs.h
2943   echo '#endif'             >>confdefs.h
2944 fi
2945
2946 ac_ext=c
2947 ac_cpp='$CPP $CPPFLAGS'
2948 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2949 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2950 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2951 ac_main_return=return
2952
2953         ac_ext=cc
2954 ac_cpp='$CXXCPP $CPPFLAGS'
2955 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2956 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2957 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2958 ac_main_return=return
2959
2960         if test "x$cf_with_cxx" != xno
2961         then
2962                 # Several of the C++ configurations do not work, particularly when
2963                 # cross-compiling (20140913 -TD)
2964                 echo "$as_me:2964: checking if $CXX works" >&5
2965 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2966
2967                 save_CPPFLAGS="$CPPFLAGS"
2968                 eval cf_includedir=${includedir}
2969                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2970
2971 cat >conftest.$ac_ext <<_ACEOF
2972 #line 2972 "configure"
2973 #include "confdefs.h"
2974
2975 #include <stdlib.h>
2976 #include <stdio.h>
2977
2978 int
2979 main ()
2980 {
2981
2982                 printf("Hello world!\n")
2983
2984   ;
2985   return 0;
2986 }
2987 _ACEOF
2988 rm -f conftest.$ac_objext
2989 if { (eval echo "$as_me:2989: \"$ac_compile\"") >&5
2990   (eval $ac_compile) 2>&5
2991   ac_status=$?
2992   echo "$as_me:2992: \$? = $ac_status" >&5
2993   (exit $ac_status); } &&
2994          { ac_try='test -s conftest.$ac_objext'
2995   { (eval echo "$as_me:2995: \"$ac_try\"") >&5
2996   (eval $ac_try) 2>&5
2997   ac_status=$?
2998   echo "$as_me:2998: \$? = $ac_status" >&5
2999   (exit $ac_status); }; }; then
3000   cf_cxx_works=yes
3001 else
3002   echo "$as_me: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 cf_cxx_works=no
3005 fi
3006 rm -f conftest.$ac_objext conftest.$ac_ext
3007                 CPPFLAGS="$save_CPPFLAGS"
3008
3009                 echo "$as_me:3009: result: $cf_cxx_works" >&5
3010 echo "${ECHO_T}$cf_cxx_works" >&6
3011                 if test "x$cf_cxx_works" = xno
3012                 then
3013                         { echo "$as_me:3013: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3014 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3015                         cf_with_cxx=no; CXX=""; GXX="";
3016                 fi
3017         fi
3018         ac_ext=c
3019 ac_cpp='$CPP $CPPFLAGS'
3020 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3021 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3022 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3023 ac_main_return=return
3024
3025         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3026         if test "$CXX" = "g++" ; then
3027                 # Extract the first word of "g++", so it can be a program name with args.
3028 set dummy g++; ac_word=$2
3029 echo "$as_me:3029: checking for $ac_word" >&5
3030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3031 if test "${ac_cv_path_CXX+set}" = set; then
3032   echo $ECHO_N "(cached) $ECHO_C" >&6
3033 else
3034   case $CXX in
3035   [\\/]* | ?:[\\/]*)
3036   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3037   ;;
3038   *)
3039   ac_save_IFS=$IFS; IFS=$ac_path_separator
3040 ac_dummy="$PATH"
3041 for ac_dir in $ac_dummy; do
3042   IFS=$ac_save_IFS
3043   test -z "$ac_dir" && ac_dir=.
3044   if $as_executable_p "$ac_dir/$ac_word"; then
3045    ac_cv_path_CXX="$ac_dir/$ac_word"
3046    echo "$as_me:3046: found $ac_dir/$ac_word" >&5
3047    break
3048 fi
3049 done
3050
3051   ;;
3052 esac
3053 fi
3054 CXX=$ac_cv_path_CXX
3055
3056 if test -n "$CXX"; then
3057   echo "$as_me:3057: result: $CXX" >&5
3058 echo "${ECHO_T}$CXX" >&6
3059 else
3060   echo "$as_me:3060: result: no" >&5
3061 echo "${ECHO_T}no" >&6
3062 fi
3063
3064         fi
3065         case "x$CXX" in
3066         (x|xg++)
3067                 { echo "$as_me:3067: WARNING: You don't have any C++ compiler, too bad" >&5
3068 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3069                 cf_with_cxx=no; CXX=""; GXX="";
3070                 ;;
3071         esac
3072 fi
3073
3074 GXX_VERSION=none
3075 if test "$GXX" = yes; then
3076         echo "$as_me:3076: checking version of ${CXX:-g++}" >&5
3077 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3078         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3079         if test -z "$GXX_VERSION"
3080         then
3081                 GXX_VERSION=unknown
3082                 GXX=no
3083         fi
3084         echo "$as_me:3084: result: $GXX_VERSION" >&5
3085 echo "${ECHO_T}$GXX_VERSION" >&6
3086 fi
3087
3088 case $GXX_VERSION in
3089 (1*|2.[0-6]*)
3090         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3091         # cf_cxx_library=no
3092         { echo "$as_me:3092: WARNING: templates do not work" >&5
3093 echo "$as_me: WARNING: templates do not work" >&2;}
3094         ;;
3095 esac
3096
3097 echo "$as_me:3097: checking if you want to build C++ binding and demo" >&5
3098 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3099
3100 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3101 if test "${with_cxx_binding+set}" = set; then
3102   withval="$with_cxx_binding"
3103   cf_with_cxx_binding=$withval
3104 else
3105   cf_with_cxx_binding=$cf_with_cxx
3106 fi;
3107 echo "$as_me:3107: result: $cf_with_cxx_binding" >&5
3108 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3109
3110 echo "$as_me:3110: checking if you want to build with Ada95" >&5
3111 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3112 echo "$as_me:3112: result: $cf_with_ada" >&5
3113 echo "${ECHO_T}$cf_with_ada" >&6
3114
3115 echo "$as_me:3115: checking if you want to install terminal database" >&5
3116 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3117
3118 # Check whether --enable-db-install or --disable-db-install was given.
3119 if test "${enable_db_install+set}" = set; then
3120   enableval="$enable_db_install"
3121   cf_with_db_install=$enableval
3122 else
3123   cf_with_db_install=yes
3124 fi;
3125 echo "$as_me:3125: result: $cf_with_db_install" >&5
3126 echo "${ECHO_T}$cf_with_db_install" >&6
3127
3128 echo "$as_me:3128: checking if you want to install manpages" >&5
3129 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3130
3131 # Check whether --with-manpages or --without-manpages was given.
3132 if test "${with_manpages+set}" = set; then
3133   withval="$with_manpages"
3134   cf_with_manpages=$withval
3135 else
3136   cf_with_manpages=yes
3137 fi;
3138 echo "$as_me:3138: result: $cf_with_manpages" >&5
3139 echo "${ECHO_T}$cf_with_manpages" >&6
3140
3141 echo "$as_me:3141: checking if you want to build programs such as tic" >&5
3142 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3143
3144 # Check whether --with-progs or --without-progs was given.
3145 if test "${with_progs+set}" = set; then
3146   withval="$with_progs"
3147   cf_with_progs=$withval
3148 else
3149   cf_with_progs=yes
3150 fi;
3151 echo "$as_me:3151: result: $cf_with_progs" >&5
3152 echo "${ECHO_T}$cf_with_progs" >&6
3153
3154 echo "$as_me:3154: checking if you want to build test-programs" >&5
3155 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3156
3157 # Check whether --with-tests or --without-tests was given.
3158 if test "${with_tests+set}" = set; then
3159   withval="$with_tests"
3160   cf_with_tests=$withval
3161 else
3162   cf_with_tests=yes
3163 fi;
3164 echo "$as_me:3164: result: $cf_with_tests" >&5
3165 echo "${ECHO_T}$cf_with_tests" >&6
3166
3167 echo "$as_me:3167: checking if you wish to install curses.h" >&5
3168 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3169
3170 # Check whether --with-curses-h or --without-curses-h was given.
3171 if test "${with_curses_h+set}" = set; then
3172   withval="$with_curses_h"
3173   with_curses_h=$withval
3174 else
3175   with_curses_h=yes
3176 fi;
3177 echo "$as_me:3177: result: $with_curses_h" >&5
3178 echo "${ECHO_T}$with_curses_h" >&6
3179
3180 modules_to_build="ncurses"
3181 if test "X$cf_with_progs" != Xno ; then
3182 modules_to_build="$modules_to_build progs tack"
3183 fi
3184 modules_to_build="$modules_to_build panel menu form"
3185
3186 test "$program_prefix" != NONE &&
3187   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3188 # Use a double $ so make ignores it.
3189 test "$program_suffix" != NONE &&
3190   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3191 # Double any \ or $.  echo might interpret backslashes.
3192 # By default was `s,x,x', remove it if useless.
3193 cat <<\_ACEOF >conftest.sed
3194 s/[\\$]/&&/g;s/;s,x,x,$//
3195 _ACEOF
3196 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3197 rm conftest.sed
3198
3199 for ac_prog in mawk gawk nawk awk
3200 do
3201   # Extract the first word of "$ac_prog", so it can be a program name with args.
3202 set dummy $ac_prog; ac_word=$2
3203 echo "$as_me:3203: checking for $ac_word" >&5
3204 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3205 if test "${ac_cv_prog_AWK+set}" = set; then
3206   echo $ECHO_N "(cached) $ECHO_C" >&6
3207 else
3208   if test -n "$AWK"; then
3209   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3210 else
3211   ac_save_IFS=$IFS; IFS=$ac_path_separator
3212 ac_dummy="$PATH"
3213 for ac_dir in $ac_dummy; do
3214   IFS=$ac_save_IFS
3215   test -z "$ac_dir" && ac_dir=.
3216   $as_executable_p "$ac_dir/$ac_word" || continue
3217 ac_cv_prog_AWK="$ac_prog"
3218 echo "$as_me:3218: found $ac_dir/$ac_word" >&5
3219 break
3220 done
3221
3222 fi
3223 fi
3224 AWK=$ac_cv_prog_AWK
3225 if test -n "$AWK"; then
3226   echo "$as_me:3226: result: $AWK" >&5
3227 echo "${ECHO_T}$AWK" >&6
3228 else
3229   echo "$as_me:3229: result: no" >&5
3230 echo "${ECHO_T}no" >&6
3231 fi
3232
3233   test -n "$AWK" && break
3234 done
3235
3236 test -z "$AWK" && { { echo "$as_me:3236: error: No awk program found" >&5
3237 echo "$as_me: error: No awk program found" >&2;}
3238    { (exit 1); exit 1; }; }
3239
3240 echo "$as_me:3240: checking for egrep" >&5
3241 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3242 if test "${ac_cv_prog_egrep+set}" = set; then
3243   echo $ECHO_N "(cached) $ECHO_C" >&6
3244 else
3245   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3246                 then ac_cv_prog_egrep='grep -E'
3247                 else ac_cv_prog_egrep='egrep'
3248         fi
3249 fi
3250 echo "$as_me:3250: result: $ac_cv_prog_egrep" >&5
3251 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3252         EGREP=$ac_cv_prog_egrep
3253
3254         test -z "$EGREP" && { { echo "$as_me:3254: error: No egrep program found" >&5
3255 echo "$as_me: error: No egrep program found" >&2;}
3256    { (exit 1); exit 1; }; }
3257
3258 # Find a good install program.  We prefer a C program (faster),
3259 # so one script is as good as another.  But avoid the broken or
3260 # incompatible versions:
3261 # SysV /etc/install, /usr/sbin/install
3262 # SunOS /usr/etc/install
3263 # IRIX /sbin/install
3264 # AIX /bin/install
3265 # AmigaOS /C/install, which installs bootblocks on floppy discs
3266 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3267 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3268 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3269 # ./install, which can be erroneously created by make from ./install.sh.
3270 echo "$as_me:3270: checking for a BSD compatible install" >&5
3271 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3272 if test -z "$INSTALL"; then
3273 if test "${ac_cv_path_install+set}" = set; then
3274   echo $ECHO_N "(cached) $ECHO_C" >&6
3275 else
3276     ac_save_IFS=$IFS; IFS=$ac_path_separator
3277   for ac_dir in $PATH; do
3278     IFS=$ac_save_IFS
3279     # Account for people who put trailing slashes in PATH elements.
3280     case $ac_dir/ in
3281     / | ./ | .// | /cC/* \
3282     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3283     | /usr/ucb/* ) ;;
3284     *)
3285       # OSF1 and SCO ODT 3.0 have their own names for install.
3286       # Don't use installbsd from OSF since it installs stuff as root
3287       # by default.
3288       for ac_prog in ginstall scoinst install; do
3289         if $as_executable_p "$ac_dir/$ac_prog"; then
3290           if test $ac_prog = install &&
3291             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3292             # AIX install.  It has an incompatible calling convention.
3293             :
3294           elif test $ac_prog = install &&
3295             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3296             # program-specific install script used by HP pwplus--don't use.
3297             :
3298           else
3299             ac_cv_path_install="$ac_dir/$ac_prog -c"
3300             break 2
3301           fi
3302         fi
3303       done
3304       ;;
3305     esac
3306   done
3307
3308 fi
3309   if test "${ac_cv_path_install+set}" = set; then
3310     INSTALL=$ac_cv_path_install
3311   else
3312     # As a last resort, use the slow shell script.  We don't cache a
3313     # path for INSTALL within a source directory, because that will
3314     # break other packages using the cache if that directory is
3315     # removed, or if the path is relative.
3316     INSTALL=$ac_install_sh
3317   fi
3318 fi
3319 echo "$as_me:3319: result: $INSTALL" >&5
3320 echo "${ECHO_T}$INSTALL" >&6
3321
3322 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3323 # It thinks the first close brace ends the variable substitution.
3324 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3325
3326 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3327
3328 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3329
3330 case $INSTALL in
3331 (/*)
3332         ;;
3333 (*)
3334         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3335         test -z "$cf_dir" && cf_dir=.
3336         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3337         ;;
3338 esac
3339
3340 for ac_prog in lint cppcheck splint
3341 do
3342   # Extract the first word of "$ac_prog", so it can be a program name with args.
3343 set dummy $ac_prog; ac_word=$2
3344 echo "$as_me:3344: checking for $ac_word" >&5
3345 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3346 if test "${ac_cv_prog_LINT+set}" = set; then
3347   echo $ECHO_N "(cached) $ECHO_C" >&6
3348 else
3349   if test -n "$LINT"; then
3350   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3351 else
3352   ac_save_IFS=$IFS; IFS=$ac_path_separator
3353 ac_dummy="$PATH"
3354 for ac_dir in $ac_dummy; do
3355   IFS=$ac_save_IFS
3356   test -z "$ac_dir" && ac_dir=.
3357   $as_executable_p "$ac_dir/$ac_word" || continue
3358 ac_cv_prog_LINT="$ac_prog"
3359 echo "$as_me:3359: found $ac_dir/$ac_word" >&5
3360 break
3361 done
3362
3363 fi
3364 fi
3365 LINT=$ac_cv_prog_LINT
3366 if test -n "$LINT"; then
3367   echo "$as_me:3367: result: $LINT" >&5
3368 echo "${ECHO_T}$LINT" >&6
3369 else
3370   echo "$as_me:3370: result: no" >&5
3371 echo "${ECHO_T}no" >&6
3372 fi
3373
3374   test -n "$LINT" && break
3375 done
3376
3377 echo "$as_me:3377: checking whether ln -s works" >&5
3378 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3379 LN_S=$as_ln_s
3380 if test "$LN_S" = "ln -s"; then
3381   echo "$as_me:3381: result: yes" >&5
3382 echo "${ECHO_T}yes" >&6
3383 else
3384   echo "$as_me:3384: result: no, using $LN_S" >&5
3385 echo "${ECHO_T}no, using $LN_S" >&6
3386 fi
3387
3388 echo "$as_me:3388: checking if $LN_S -f options work" >&5
3389 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3390
3391 rm -f conf$$.src conf$$dst
3392 echo >conf$$.dst
3393 echo first >conf$$.src
3394 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3395         cf_prog_ln_sf=yes
3396 else
3397         cf_prog_ln_sf=no
3398 fi
3399 rm -f conf$$.dst conf$$src
3400 echo "$as_me:3400: result: $cf_prog_ln_sf" >&5
3401 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3402
3403 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3404
3405 echo "$as_me:3405: checking for long file names" >&5
3406 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3407 if test "${ac_cv_sys_long_file_names+set}" = set; then
3408   echo $ECHO_N "(cached) $ECHO_C" >&6
3409 else
3410   ac_cv_sys_long_file_names=yes
3411 # Test for long file names in all the places we know might matter:
3412 #      .                the current directory, where building will happen
3413 #      $prefix/lib      where we will be installing things
3414 #      $exec_prefix/lib likewise
3415 # eval it to expand exec_prefix.
3416 #      $TMPDIR          if set, where it might want to write temporary files
3417 # if $TMPDIR is not set:
3418 #      /tmp             where it might want to write temporary files
3419 #      /var/tmp         likewise
3420 #      /usr/tmp         likewise
3421 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3422   ac_tmpdirs=$TMPDIR
3423 else
3424   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3425 fi
3426 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3427   test -d $ac_dir || continue
3428   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3429   ac_xdir=$ac_dir/cf$$
3430   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3431   ac_tf1=$ac_xdir/conftest9012345
3432   ac_tf2=$ac_xdir/conftest9012346
3433   (echo 1 >$ac_tf1) 2>/dev/null
3434   (echo 2 >$ac_tf2) 2>/dev/null
3435   ac_val=`cat $ac_tf1 2>/dev/null`
3436   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3437     ac_cv_sys_long_file_names=no
3438     rm -rf $ac_xdir 2>/dev/null
3439     break
3440   fi
3441   rm -rf $ac_xdir 2>/dev/null
3442 done
3443 fi
3444 echo "$as_me:3444: result: $ac_cv_sys_long_file_names" >&5
3445 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3446 if test $ac_cv_sys_long_file_names = yes; then
3447
3448 cat >>confdefs.h <<\EOF
3449 #define HAVE_LONG_FILE_NAMES 1
3450 EOF
3451
3452 fi
3453
3454 # if we find pkg-config, check if we should install the ".pc" files.
3455
3456 echo "$as_me:3456: checking if you want to use pkg-config" >&5
3457 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3458
3459 # Check whether --with-pkg-config or --without-pkg-config was given.
3460 if test "${with_pkg_config+set}" = set; then
3461   withval="$with_pkg_config"
3462   cf_pkg_config=$withval
3463 else
3464   cf_pkg_config=yes
3465 fi;
3466 echo "$as_me:3466: result: $cf_pkg_config" >&5
3467 echo "${ECHO_T}$cf_pkg_config" >&6
3468
3469 case $cf_pkg_config in
3470 (no)
3471         PKG_CONFIG=none
3472         ;;
3473 (yes)
3474
3475 if test -n "$ac_tool_prefix"; then
3476   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3477 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3478 echo "$as_me:3478: checking for $ac_word" >&5
3479 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3480 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3481   echo $ECHO_N "(cached) $ECHO_C" >&6
3482 else
3483   case $PKG_CONFIG in
3484   [\\/]* | ?:[\\/]*)
3485   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3486   ;;
3487   *)
3488   ac_save_IFS=$IFS; IFS=$ac_path_separator
3489 ac_dummy="$PATH"
3490 for ac_dir in $ac_dummy; do
3491   IFS=$ac_save_IFS
3492   test -z "$ac_dir" && ac_dir=.
3493   if $as_executable_p "$ac_dir/$ac_word"; then
3494    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3495    echo "$as_me:3495: found $ac_dir/$ac_word" >&5
3496    break
3497 fi
3498 done
3499
3500   ;;
3501 esac
3502 fi
3503 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3504
3505 if test -n "$PKG_CONFIG"; then
3506   echo "$as_me:3506: result: $PKG_CONFIG" >&5
3507 echo "${ECHO_T}$PKG_CONFIG" >&6
3508 else
3509   echo "$as_me:3509: result: no" >&5
3510 echo "${ECHO_T}no" >&6
3511 fi
3512
3513 fi
3514 if test -z "$ac_cv_path_PKG_CONFIG"; then
3515   ac_pt_PKG_CONFIG=$PKG_CONFIG
3516   # Extract the first word of "pkg-config", so it can be a program name with args.
3517 set dummy pkg-config; ac_word=$2
3518 echo "$as_me:3518: checking for $ac_word" >&5
3519 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3520 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3521   echo $ECHO_N "(cached) $ECHO_C" >&6
3522 else
3523   case $ac_pt_PKG_CONFIG in
3524   [\\/]* | ?:[\\/]*)
3525   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3526   ;;
3527   *)
3528   ac_save_IFS=$IFS; IFS=$ac_path_separator
3529 ac_dummy="$PATH"
3530 for ac_dir in $ac_dummy; do
3531   IFS=$ac_save_IFS
3532   test -z "$ac_dir" && ac_dir=.
3533   if $as_executable_p "$ac_dir/$ac_word"; then
3534    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3535    echo "$as_me:3535: found $ac_dir/$ac_word" >&5
3536    break
3537 fi
3538 done
3539
3540   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3541   ;;
3542 esac
3543 fi
3544 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3545
3546 if test -n "$ac_pt_PKG_CONFIG"; then
3547   echo "$as_me:3547: result: $ac_pt_PKG_CONFIG" >&5
3548 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3549 else
3550   echo "$as_me:3550: result: no" >&5
3551 echo "${ECHO_T}no" >&6
3552 fi
3553
3554   PKG_CONFIG=$ac_pt_PKG_CONFIG
3555 else
3556   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3557 fi
3558
3559         ;;
3560 (*)
3561         PKG_CONFIG=$withval
3562         ;;
3563 esac
3564
3565 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3566 if test "$PKG_CONFIG" != none ; then
3567
3568 if test "x$prefix" != xNONE; then
3569         cf_path_syntax="$prefix"
3570 else
3571         cf_path_syntax="$ac_default_prefix"
3572 fi
3573
3574 case ".$PKG_CONFIG" in
3575 (.\$\(*\)*|.\'*\'*)
3576         ;;
3577 (..|./*|.\\*)
3578         ;;
3579 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3580         ;;
3581 (.\${*prefix}*|.\${*dir}*)
3582         eval PKG_CONFIG="$PKG_CONFIG"
3583         case ".$PKG_CONFIG" in
3584         (.NONE/*)
3585                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3586                 ;;
3587         esac
3588         ;;
3589 (.no|.NONE/*)
3590         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3591         ;;
3592 (*)
3593         { { echo "$as_me:3593: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3594 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3595    { (exit 1); exit 1; }; }
3596         ;;
3597 esac
3598
3599 elif test "x$cf_pkg_config" != xno ; then
3600         { echo "$as_me:3600: WARNING: pkg-config is not installed" >&5
3601 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3602 fi
3603
3604 case $PKG_CONFIG in
3605 (no|none|yes)
3606         echo "$as_me:3606: checking for pkg-config library directory" >&5
3607 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3608         ;;
3609 (*)
3610         echo "$as_me:3610: checking for $PKG_CONFIG library directory" >&5
3611 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3612         ;;
3613 esac
3614
3615 PKG_CONFIG_LIBDIR=no
3616
3617 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3618 if test "${with_pkg_config_libdir+set}" = set; then
3619   withval="$with_pkg_config_libdir"
3620   PKG_CONFIG_LIBDIR=$withval
3621 else
3622   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3623 fi;
3624
3625 case x$PKG_CONFIG_LIBDIR in
3626 (x/*)
3627         ;;
3628 (xyes)
3629         # Look for the library directory using the same prefix as the executable
3630         if test "x$PKG_CONFIG" = xnone
3631         then
3632                 cf_path=$prefix
3633         else
3634                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3635         fi
3636
3637         # If you don't like using the default architecture, you have to specify the
3638         # intended library directory and corresponding compiler/linker options.
3639         #
3640         # This case allows for Debian's 2014-flavor of multiarch, along with the
3641         # most common variations before that point.  Some other variants spell the
3642         # directory differently, e.g., "pkg-config", and put it in unusual places.
3643         # pkg-config has always been poorly standardized, which is ironic...
3644         case x`(arch) 2>/dev/null` in
3645         (*64)
3646                 cf_search_path="\
3647                         $cf_path/lib/*64-linux-gnu \
3648                         $cf_path/share \
3649                         $cf_path/lib64 \
3650                         $cf_path/lib32 \
3651                         $cf_path/lib"
3652                 ;;
3653         (*)
3654                 cf_search_path="\
3655                         $cf_path/lib/*-linux-gnu \
3656                         $cf_path/share \
3657                         $cf_path/lib32 \
3658                         $cf_path/lib \
3659                         $cf_path/libdata"
3660                 ;;
3661         esac
3662
3663         test -n "$verbose" && echo "    list..." 1>&6
3664
3665 echo "${as_me:-configure}:3665: testing list... ..." 1>&5
3666
3667         for cf_config in $cf_search_path
3668         do
3669                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3670
3671 echo "${as_me:-configure}:3671: testing checking $cf_config/pkgconfig ..." 1>&5
3672
3673                 if test -d $cf_config/pkgconfig
3674                 then
3675                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3676                         echo "$as_me:3676: checking done" >&5
3677 echo $ECHO_N "checking done... $ECHO_C" >&6
3678                         break
3679                 fi
3680         done
3681         ;;
3682 (*)
3683         ;;
3684 esac
3685
3686 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3687         echo "$as_me:3687: result: $PKG_CONFIG_LIBDIR" >&5
3688 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3689 fi
3690
3691 if test "x$PKG_CONFIG" != xnone
3692 then
3693         echo "$as_me:3693: checking if we should install .pc files for $PKG_CONFIG" >&5
3694 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3695 else
3696         echo "$as_me:3696: checking if we should install .pc files" >&5
3697 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3698 fi
3699
3700 # Check whether --enable-pc-files or --disable-pc-files was given.
3701 if test "${enable_pc_files+set}" = set; then
3702   enableval="$enable_pc_files"
3703   enable_pc_files=$enableval
3704 else
3705   enable_pc_files=no
3706 fi;
3707 echo "$as_me:3707: result: $enable_pc_files" >&5
3708 echo "${ECHO_T}$enable_pc_files" >&6
3709
3710 if test "x$enable_pc_files" != xno
3711 then
3712         MAKE_PC_FILES=
3713         case "x$PKG_CONFIG_LIBDIR" in
3714         (xno|xyes)
3715                 { echo "$as_me:3715: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3716 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3717                 ;;
3718         (*)
3719
3720 if test "x$prefix" != xNONE; then
3721         cf_path_syntax="$prefix"
3722 else
3723         cf_path_syntax="$ac_default_prefix"
3724 fi
3725
3726 case ".$PKG_CONFIG_LIBDIR" in
3727 (.\$\(*\)*|.\'*\'*)
3728         ;;
3729 (..|./*|.\\*)
3730         ;;
3731 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3732         ;;
3733 (.\${*prefix}*|.\${*dir}*)
3734         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3735         case ".$PKG_CONFIG_LIBDIR" in
3736         (.NONE/*)
3737                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3738                 ;;
3739         esac
3740         ;;
3741 (.no|.NONE/*)
3742         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3743         ;;
3744 (*)
3745         { { echo "$as_me:3745: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3746 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3747    { (exit 1); exit 1; }; }
3748         ;;
3749 esac
3750
3751                 ;;
3752         esac
3753 else
3754         MAKE_PC_FILES="#"
3755 fi
3756
3757 if test -z "$MAKE_PC_FILES"
3758 then
3759         echo "$as_me:3759: checking for suffix to add to pc-files" >&5
3760 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3761
3762 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3763 if test "${with_pc_suffix+set}" = set; then
3764   withval="$with_pc_suffix"
3765   case "x$withval" in
3766         (xyes|xno)
3767                 PC_MODULE_SUFFIX=
3768                 ;;
3769         (*)     PC_MODULE_SUFFIX="$withval"
3770                 ;;
3771         esac
3772 fi;
3773         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3774         echo "$as_me:3774: result: $PC_MODULE_SUFFIX" >&5
3775 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3776         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3777
3778 fi
3779
3780 echo "$as_me:3780: checking if we should assume mixed-case filenames" >&5
3781 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3782
3783 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3784 if test "${enable_mixed_case+set}" = set; then
3785   enableval="$enable_mixed_case"
3786   enable_mixedcase=$enableval
3787 else
3788   enable_mixedcase=auto
3789 fi;
3790 echo "$as_me:3790: result: $enable_mixedcase" >&5
3791 echo "${ECHO_T}$enable_mixedcase" >&6
3792 if test "$enable_mixedcase" = "auto" ; then
3793
3794 echo "$as_me:3794: checking if filesystem supports mixed-case filenames" >&5
3795 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3796 if test "${cf_cv_mixedcase+set}" = set; then
3797   echo $ECHO_N "(cached) $ECHO_C" >&6
3798 else
3799
3800 if test "$cross_compiling" = yes ; then
3801         case $target_alias in
3802         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3803                 cf_cv_mixedcase=no
3804                 ;;
3805         (*)
3806                 cf_cv_mixedcase=yes
3807                 ;;
3808         esac
3809 else
3810         rm -f conftest CONFTEST
3811         echo test >conftest
3812         if test -f CONFTEST ; then
3813                 cf_cv_mixedcase=no
3814         else
3815                 cf_cv_mixedcase=yes
3816         fi
3817         rm -f conftest CONFTEST
3818 fi
3819
3820 fi
3821 echo "$as_me:3821: result: $cf_cv_mixedcase" >&5
3822 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3823 test "$cf_cv_mixedcase" = yes &&
3824 cat >>confdefs.h <<\EOF
3825 #define MIXEDCASE_FILENAMES 1
3826 EOF
3827
3828 else
3829         cf_cv_mixedcase=$enable_mixedcase
3830         if test "x$enable_mixedcase" = "xyes" ; then
3831
3832 cat >>confdefs.h <<\EOF
3833 #define MIXEDCASE_FILENAMES 1
3834 EOF
3835
3836         fi
3837 fi
3838
3839 # do this after mixed-case option (tags/TAGS is not as important as tic).
3840 echo "$as_me:3840: checking whether ${MAKE-make} sets \${MAKE}" >&5
3841 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3842 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3843 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3844   echo $ECHO_N "(cached) $ECHO_C" >&6
3845 else
3846   cat >conftest.make <<\EOF
3847 all:
3848         @echo 'ac_maketemp="${MAKE}"'
3849 EOF
3850 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3851 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3852 if test -n "$ac_maketemp"; then
3853   eval ac_cv_prog_make_${ac_make}_set=yes
3854 else
3855   eval ac_cv_prog_make_${ac_make}_set=no
3856 fi
3857 rm -f conftest.make
3858 fi
3859 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3860   echo "$as_me:3860: result: yes" >&5
3861 echo "${ECHO_T}yes" >&6
3862   SET_MAKE=
3863 else
3864   echo "$as_me:3864: result: no" >&5
3865 echo "${ECHO_T}no" >&6
3866   SET_MAKE="MAKE=${MAKE-make}"
3867 fi
3868
3869 for ac_prog in exctags ctags
3870 do
3871   # Extract the first word of "$ac_prog", so it can be a program name with args.
3872 set dummy $ac_prog; ac_word=$2
3873 echo "$as_me:3873: checking for $ac_word" >&5
3874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3875 if test "${ac_cv_prog_CTAGS+set}" = set; then
3876   echo $ECHO_N "(cached) $ECHO_C" >&6
3877 else
3878   if test -n "$CTAGS"; then
3879   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3880 else
3881   ac_save_IFS=$IFS; IFS=$ac_path_separator
3882 ac_dummy="$PATH"
3883 for ac_dir in $ac_dummy; do
3884   IFS=$ac_save_IFS
3885   test -z "$ac_dir" && ac_dir=.
3886   $as_executable_p "$ac_dir/$ac_word" || continue
3887 ac_cv_prog_CTAGS="$ac_prog"
3888 echo "$as_me:3888: found $ac_dir/$ac_word" >&5
3889 break
3890 done
3891
3892 fi
3893 fi
3894 CTAGS=$ac_cv_prog_CTAGS
3895 if test -n "$CTAGS"; then
3896   echo "$as_me:3896: result: $CTAGS" >&5
3897 echo "${ECHO_T}$CTAGS" >&6
3898 else
3899   echo "$as_me:3899: result: no" >&5
3900 echo "${ECHO_T}no" >&6
3901 fi
3902
3903   test -n "$CTAGS" && break
3904 done
3905
3906 for ac_prog in exetags etags
3907 do
3908   # Extract the first word of "$ac_prog", so it can be a program name with args.
3909 set dummy $ac_prog; ac_word=$2
3910 echo "$as_me:3910: checking for $ac_word" >&5
3911 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3912 if test "${ac_cv_prog_ETAGS+set}" = set; then
3913   echo $ECHO_N "(cached) $ECHO_C" >&6
3914 else
3915   if test -n "$ETAGS"; then
3916   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3917 else
3918   ac_save_IFS=$IFS; IFS=$ac_path_separator
3919 ac_dummy="$PATH"
3920 for ac_dir in $ac_dummy; do
3921   IFS=$ac_save_IFS
3922   test -z "$ac_dir" && ac_dir=.
3923   $as_executable_p "$ac_dir/$ac_word" || continue
3924 ac_cv_prog_ETAGS="$ac_prog"
3925 echo "$as_me:3925: found $ac_dir/$ac_word" >&5
3926 break
3927 done
3928
3929 fi
3930 fi
3931 ETAGS=$ac_cv_prog_ETAGS
3932 if test -n "$ETAGS"; then
3933   echo "$as_me:3933: result: $ETAGS" >&5
3934 echo "${ECHO_T}$ETAGS" >&6
3935 else
3936   echo "$as_me:3936: result: no" >&5
3937 echo "${ECHO_T}no" >&6
3938 fi
3939
3940   test -n "$ETAGS" && break
3941 done
3942
3943 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3944 set dummy ${CTAGS:-ctags}; ac_word=$2
3945 echo "$as_me:3945: checking for $ac_word" >&5
3946 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3947 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3948   echo $ECHO_N "(cached) $ECHO_C" >&6
3949 else
3950   if test -n "$MAKE_LOWER_TAGS"; then
3951   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3952 else
3953   ac_save_IFS=$IFS; IFS=$ac_path_separator
3954 ac_dummy="$PATH"
3955 for ac_dir in $ac_dummy; do
3956   IFS=$ac_save_IFS
3957   test -z "$ac_dir" && ac_dir=.
3958   $as_executable_p "$ac_dir/$ac_word" || continue
3959 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3960 echo "$as_me:3960: found $ac_dir/$ac_word" >&5
3961 break
3962 done
3963
3964   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3965 fi
3966 fi
3967 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3968 if test -n "$MAKE_LOWER_TAGS"; then
3969   echo "$as_me:3969: result: $MAKE_LOWER_TAGS" >&5
3970 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3971 else
3972   echo "$as_me:3972: result: no" >&5
3973 echo "${ECHO_T}no" >&6
3974 fi
3975
3976 if test "$cf_cv_mixedcase" = yes ; then
3977         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3978 set dummy ${ETAGS:-etags}; ac_word=$2
3979 echo "$as_me:3979: checking for $ac_word" >&5
3980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3981 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3982   echo $ECHO_N "(cached) $ECHO_C" >&6
3983 else
3984   if test -n "$MAKE_UPPER_TAGS"; then
3985   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3986 else
3987   ac_save_IFS=$IFS; IFS=$ac_path_separator
3988 ac_dummy="$PATH"
3989 for ac_dir in $ac_dummy; do
3990   IFS=$ac_save_IFS
3991   test -z "$ac_dir" && ac_dir=.
3992   $as_executable_p "$ac_dir/$ac_word" || continue
3993 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3994 echo "$as_me:3994: found $ac_dir/$ac_word" >&5
3995 break
3996 done
3997
3998   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3999 fi
4000 fi
4001 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4002 if test -n "$MAKE_UPPER_TAGS"; then
4003   echo "$as_me:4003: result: $MAKE_UPPER_TAGS" >&5
4004 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4005 else
4006   echo "$as_me:4006: result: no" >&5
4007 echo "${ECHO_T}no" >&6
4008 fi
4009
4010 else
4011         MAKE_UPPER_TAGS=no
4012 fi
4013
4014 if test "$MAKE_UPPER_TAGS" = yes ; then
4015         MAKE_UPPER_TAGS=
4016 else
4017         MAKE_UPPER_TAGS="#"
4018 fi
4019
4020 if test "$MAKE_LOWER_TAGS" = yes ; then
4021         MAKE_LOWER_TAGS=
4022 else
4023         MAKE_LOWER_TAGS="#"
4024 fi
4025
4026 echo "$as_me:4026: checking for makeflags variable" >&5
4027 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4028 if test "${cf_cv_makeflags+set}" = set; then
4029   echo $ECHO_N "(cached) $ECHO_C" >&6
4030 else
4031
4032         cf_cv_makeflags=''
4033         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4034         do
4035                 cat >cf_makeflags.tmp <<CF_EOF
4036 SHELL = $SHELL
4037 all :
4038         @ echo '.$cf_option'
4039 CF_EOF
4040                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4041                 case "$cf_result" in
4042                 (.*k|.*kw)
4043                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4044                         case "$cf_result" in
4045                         (.*CC=*)        cf_cv_makeflags=
4046                                 ;;
4047                         (*)     cf_cv_makeflags=$cf_option
4048                                 ;;
4049                         esac
4050                         break
4051                         ;;
4052                 (.-)    ;;
4053                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4054                         ;;
4055                 esac
4056         done
4057         rm -f cf_makeflags.tmp
4058
4059 fi
4060 echo "$as_me:4060: result: $cf_cv_makeflags" >&5
4061 echo "${ECHO_T}$cf_cv_makeflags" >&6
4062
4063 if test -n "$ac_tool_prefix"; then
4064   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4065 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4066 echo "$as_me:4066: checking for $ac_word" >&5
4067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4068 if test "${ac_cv_prog_RANLIB+set}" = set; then
4069   echo $ECHO_N "(cached) $ECHO_C" >&6
4070 else
4071   if test -n "$RANLIB"; then
4072   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4073 else
4074   ac_save_IFS=$IFS; IFS=$ac_path_separator
4075 ac_dummy="$PATH"
4076 for ac_dir in $ac_dummy; do
4077   IFS=$ac_save_IFS
4078   test -z "$ac_dir" && ac_dir=.
4079   $as_executable_p "$ac_dir/$ac_word" || continue
4080 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4081 echo "$as_me:4081: found $ac_dir/$ac_word" >&5
4082 break
4083 done
4084
4085 fi
4086 fi
4087 RANLIB=$ac_cv_prog_RANLIB
4088 if test -n "$RANLIB"; then
4089   echo "$as_me:4089: result: $RANLIB" >&5
4090 echo "${ECHO_T}$RANLIB" >&6
4091 else
4092   echo "$as_me:4092: result: no" >&5
4093 echo "${ECHO_T}no" >&6
4094 fi
4095
4096 fi
4097 if test -z "$ac_cv_prog_RANLIB"; then
4098   ac_ct_RANLIB=$RANLIB
4099   # Extract the first word of "ranlib", so it can be a program name with args.
4100 set dummy ranlib; ac_word=$2
4101 echo "$as_me:4101: checking for $ac_word" >&5
4102 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4103 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4104   echo $ECHO_N "(cached) $ECHO_C" >&6
4105 else
4106   if test -n "$ac_ct_RANLIB"; then
4107   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4108 else
4109   ac_save_IFS=$IFS; IFS=$ac_path_separator
4110 ac_dummy="$PATH"
4111 for ac_dir in $ac_dummy; do
4112   IFS=$ac_save_IFS
4113   test -z "$ac_dir" && ac_dir=.
4114   $as_executable_p "$ac_dir/$ac_word" || continue
4115 ac_cv_prog_ac_ct_RANLIB="ranlib"
4116 echo "$as_me:4116: found $ac_dir/$ac_word" >&5
4117 break
4118 done
4119
4120   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4121 fi
4122 fi
4123 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4124 if test -n "$ac_ct_RANLIB"; then
4125   echo "$as_me:4125: result: $ac_ct_RANLIB" >&5
4126 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4127 else
4128   echo "$as_me:4128: result: no" >&5
4129 echo "${ECHO_T}no" >&6
4130 fi
4131
4132   RANLIB=$ac_ct_RANLIB
4133 else
4134   RANLIB="$ac_cv_prog_RANLIB"
4135 fi
4136
4137 if test -n "$ac_tool_prefix"; then
4138   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4139 set dummy ${ac_tool_prefix}ld; ac_word=$2
4140 echo "$as_me:4140: checking for $ac_word" >&5
4141 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4142 if test "${ac_cv_prog_LD+set}" = set; then
4143   echo $ECHO_N "(cached) $ECHO_C" >&6
4144 else
4145   if test -n "$LD"; then
4146   ac_cv_prog_LD="$LD" # Let the user override the test.
4147 else
4148   ac_save_IFS=$IFS; IFS=$ac_path_separator
4149 ac_dummy="$PATH"
4150 for ac_dir in $ac_dummy; do
4151   IFS=$ac_save_IFS
4152   test -z "$ac_dir" && ac_dir=.
4153   $as_executable_p "$ac_dir/$ac_word" || continue
4154 ac_cv_prog_LD="${ac_tool_prefix}ld"
4155 echo "$as_me:4155: found $ac_dir/$ac_word" >&5
4156 break
4157 done
4158
4159 fi
4160 fi
4161 LD=$ac_cv_prog_LD
4162 if test -n "$LD"; then
4163   echo "$as_me:4163: result: $LD" >&5
4164 echo "${ECHO_T}$LD" >&6
4165 else
4166   echo "$as_me:4166: result: no" >&5
4167 echo "${ECHO_T}no" >&6
4168 fi
4169
4170 fi
4171 if test -z "$ac_cv_prog_LD"; then
4172   ac_ct_LD=$LD
4173   # Extract the first word of "ld", so it can be a program name with args.
4174 set dummy ld; ac_word=$2
4175 echo "$as_me:4175: checking for $ac_word" >&5
4176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4177 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4178   echo $ECHO_N "(cached) $ECHO_C" >&6
4179 else
4180   if test -n "$ac_ct_LD"; then
4181   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4182 else
4183   ac_save_IFS=$IFS; IFS=$ac_path_separator
4184 ac_dummy="$PATH"
4185 for ac_dir in $ac_dummy; do
4186   IFS=$ac_save_IFS
4187   test -z "$ac_dir" && ac_dir=.
4188   $as_executable_p "$ac_dir/$ac_word" || continue
4189 ac_cv_prog_ac_ct_LD="ld"
4190 echo "$as_me:4190: found $ac_dir/$ac_word" >&5
4191 break
4192 done
4193
4194   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4195 fi
4196 fi
4197 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4198 if test -n "$ac_ct_LD"; then
4199   echo "$as_me:4199: result: $ac_ct_LD" >&5
4200 echo "${ECHO_T}$ac_ct_LD" >&6
4201 else
4202   echo "$as_me:4202: result: no" >&5
4203 echo "${ECHO_T}no" >&6
4204 fi
4205
4206   LD=$ac_ct_LD
4207 else
4208   LD="$ac_cv_prog_LD"
4209 fi
4210
4211 if test -n "$ac_tool_prefix"; then
4212   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4213 set dummy ${ac_tool_prefix}ar; ac_word=$2
4214 echo "$as_me:4214: checking for $ac_word" >&5
4215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4216 if test "${ac_cv_prog_AR+set}" = set; then
4217   echo $ECHO_N "(cached) $ECHO_C" >&6
4218 else
4219   if test -n "$AR"; then
4220   ac_cv_prog_AR="$AR" # Let the user override the test.
4221 else
4222   ac_save_IFS=$IFS; IFS=$ac_path_separator
4223 ac_dummy="$PATH"
4224 for ac_dir in $ac_dummy; do
4225   IFS=$ac_save_IFS
4226   test -z "$ac_dir" && ac_dir=.
4227   $as_executable_p "$ac_dir/$ac_word" || continue
4228 ac_cv_prog_AR="${ac_tool_prefix}ar"
4229 echo "$as_me:4229: found $ac_dir/$ac_word" >&5
4230 break
4231 done
4232
4233 fi
4234 fi
4235 AR=$ac_cv_prog_AR
4236 if test -n "$AR"; then
4237   echo "$as_me:4237: result: $AR" >&5
4238 echo "${ECHO_T}$AR" >&6
4239 else
4240   echo "$as_me:4240: result: no" >&5
4241 echo "${ECHO_T}no" >&6
4242 fi
4243
4244 fi
4245 if test -z "$ac_cv_prog_AR"; then
4246   ac_ct_AR=$AR
4247   # Extract the first word of "ar", so it can be a program name with args.
4248 set dummy ar; ac_word=$2
4249 echo "$as_me:4249: checking for $ac_word" >&5
4250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4251 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4252   echo $ECHO_N "(cached) $ECHO_C" >&6
4253 else
4254   if test -n "$ac_ct_AR"; then
4255   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4256 else
4257   ac_save_IFS=$IFS; IFS=$ac_path_separator
4258 ac_dummy="$PATH"
4259 for ac_dir in $ac_dummy; do
4260   IFS=$ac_save_IFS
4261   test -z "$ac_dir" && ac_dir=.
4262   $as_executable_p "$ac_dir/$ac_word" || continue
4263 ac_cv_prog_ac_ct_AR="ar"
4264 echo "$as_me:4264: found $ac_dir/$ac_word" >&5
4265 break
4266 done
4267
4268   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4269 fi
4270 fi
4271 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4272 if test -n "$ac_ct_AR"; then
4273   echo "$as_me:4273: result: $ac_ct_AR" >&5
4274 echo "${ECHO_T}$ac_ct_AR" >&6
4275 else
4276   echo "$as_me:4276: result: no" >&5
4277 echo "${ECHO_T}no" >&6
4278 fi
4279
4280   AR=$ac_ct_AR
4281 else
4282   AR="$ac_cv_prog_AR"
4283 fi
4284
4285 if test -n "$ac_tool_prefix"; then
4286   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4287 set dummy ${ac_tool_prefix}nm; ac_word=$2
4288 echo "$as_me:4288: checking for $ac_word" >&5
4289 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4290 if test "${ac_cv_prog_NM+set}" = set; then
4291   echo $ECHO_N "(cached) $ECHO_C" >&6
4292 else
4293   if test -n "$NM"; then
4294   ac_cv_prog_NM="$NM" # Let the user override the test.
4295 else
4296   ac_save_IFS=$IFS; IFS=$ac_path_separator
4297 ac_dummy="$PATH"
4298 for ac_dir in $ac_dummy; do
4299   IFS=$ac_save_IFS
4300   test -z "$ac_dir" && ac_dir=.
4301   $as_executable_p "$ac_dir/$ac_word" || continue
4302 ac_cv_prog_NM="${ac_tool_prefix}nm"
4303 echo "$as_me:4303: found $ac_dir/$ac_word" >&5
4304 break
4305 done
4306
4307 fi
4308 fi
4309 NM=$ac_cv_prog_NM
4310 if test -n "$NM"; then
4311   echo "$as_me:4311: result: $NM" >&5
4312 echo "${ECHO_T}$NM" >&6
4313 else
4314   echo "$as_me:4314: result: no" >&5
4315 echo "${ECHO_T}no" >&6
4316 fi
4317
4318 fi
4319 if test -z "$ac_cv_prog_NM"; then
4320   ac_ct_NM=$NM
4321   # Extract the first word of "nm", so it can be a program name with args.
4322 set dummy nm; ac_word=$2
4323 echo "$as_me:4323: checking for $ac_word" >&5
4324 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4325 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4326   echo $ECHO_N "(cached) $ECHO_C" >&6
4327 else
4328   if test -n "$ac_ct_NM"; then
4329   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4330 else
4331   ac_save_IFS=$IFS; IFS=$ac_path_separator
4332 ac_dummy="$PATH"
4333 for ac_dir in $ac_dummy; do
4334   IFS=$ac_save_IFS
4335   test -z "$ac_dir" && ac_dir=.
4336   $as_executable_p "$ac_dir/$ac_word" || continue
4337 ac_cv_prog_ac_ct_NM="nm"
4338 echo "$as_me:4338: found $ac_dir/$ac_word" >&5
4339 break
4340 done
4341
4342   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4343 fi
4344 fi
4345 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4346 if test -n "$ac_ct_NM"; then
4347   echo "$as_me:4347: result: $ac_ct_NM" >&5
4348 echo "${ECHO_T}$ac_ct_NM" >&6
4349 else
4350   echo "$as_me:4350: result: no" >&5
4351 echo "${ECHO_T}no" >&6
4352 fi
4353
4354   NM=$ac_ct_NM
4355 else
4356   NM="$ac_cv_prog_NM"
4357 fi
4358
4359 if test -n "$ac_tool_prefix"; then
4360   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4361 set dummy ${ac_tool_prefix}ar; ac_word=$2
4362 echo "$as_me:4362: checking for $ac_word" >&5
4363 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4364 if test "${ac_cv_prog_AR+set}" = set; then
4365   echo $ECHO_N "(cached) $ECHO_C" >&6
4366 else
4367   if test -n "$AR"; then
4368   ac_cv_prog_AR="$AR" # Let the user override the test.
4369 else
4370   ac_save_IFS=$IFS; IFS=$ac_path_separator
4371 ac_dummy="$PATH"
4372 for ac_dir in $ac_dummy; do
4373   IFS=$ac_save_IFS
4374   test -z "$ac_dir" && ac_dir=.
4375   $as_executable_p "$ac_dir/$ac_word" || continue
4376 ac_cv_prog_AR="${ac_tool_prefix}ar"
4377 echo "$as_me:4377: found $ac_dir/$ac_word" >&5
4378 break
4379 done
4380
4381 fi
4382 fi
4383 AR=$ac_cv_prog_AR
4384 if test -n "$AR"; then
4385   echo "$as_me:4385: result: $AR" >&5
4386 echo "${ECHO_T}$AR" >&6
4387 else
4388   echo "$as_me:4388: result: no" >&5
4389 echo "${ECHO_T}no" >&6
4390 fi
4391
4392 fi
4393 if test -z "$ac_cv_prog_AR"; then
4394   ac_ct_AR=$AR
4395   # Extract the first word of "ar", so it can be a program name with args.
4396 set dummy ar; ac_word=$2
4397 echo "$as_me:4397: checking for $ac_word" >&5
4398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4399 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4400   echo $ECHO_N "(cached) $ECHO_C" >&6
4401 else
4402   if test -n "$ac_ct_AR"; then
4403   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4404 else
4405   ac_save_IFS=$IFS; IFS=$ac_path_separator
4406 ac_dummy="$PATH"
4407 for ac_dir in $ac_dummy; do
4408   IFS=$ac_save_IFS
4409   test -z "$ac_dir" && ac_dir=.
4410   $as_executable_p "$ac_dir/$ac_word" || continue
4411 ac_cv_prog_ac_ct_AR="ar"
4412 echo "$as_me:4412: found $ac_dir/$ac_word" >&5
4413 break
4414 done
4415
4416   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4417 fi
4418 fi
4419 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4420 if test -n "$ac_ct_AR"; then
4421   echo "$as_me:4421: result: $ac_ct_AR" >&5
4422 echo "${ECHO_T}$ac_ct_AR" >&6
4423 else
4424   echo "$as_me:4424: result: no" >&5
4425 echo "${ECHO_T}no" >&6
4426 fi
4427
4428   AR=$ac_ct_AR
4429 else
4430   AR="$ac_cv_prog_AR"
4431 fi
4432
4433 echo "$as_me:4433: checking for options to update archives" >&5
4434 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4435 if test "${cf_cv_ar_flags+set}" = set; then
4436   echo $ECHO_N "(cached) $ECHO_C" >&6
4437 else
4438
4439         cf_cv_ar_flags=unknown
4440         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4441         do
4442
4443                 # check if $ARFLAGS already contains this choice
4444                 if test "x$ARFLAGS" != "x" ; then
4445                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4446                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4447                                 cf_cv_ar_flags=
4448                                 break
4449                         fi
4450                 fi
4451
4452                 rm -f conftest.$ac_cv_objext
4453                 rm -f conftest.a
4454
4455                 cat >conftest.$ac_ext <<EOF
4456 #line 4456 "configure"
4457 int     testdata[3] = { 123, 456, 789 };
4458 EOF
4459                 if { (eval echo "$as_me:4459: \"$ac_compile\"") >&5
4460   (eval $ac_compile) 2>&5
4461   ac_status=$?
4462   echo "$as_me:4462: \$? = $ac_status" >&5
4463   (exit $ac_status); } ; then
4464                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4465                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4466                         if test -f conftest.a ; then
4467                                 cf_cv_ar_flags=$cf_ar_flags
4468                                 break
4469                         fi
4470                 else
4471                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4472
4473 echo "${as_me:-configure}:4473: testing cannot compile test-program ..." 1>&5
4474
4475                         break
4476                 fi
4477         done
4478         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4479
4480 fi
4481 echo "$as_me:4481: result: $cf_cv_ar_flags" >&5
4482 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4483
4484 if test -n "$ARFLAGS" ; then
4485         if test -n "$cf_cv_ar_flags" ; then
4486                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4487         fi
4488 else
4489         ARFLAGS=$cf_cv_ar_flags
4490 fi
4491
4492 echo "$as_me:4492: checking if you have specified an install-prefix" >&5
4493 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4494
4495 # Check whether --with-install-prefix or --without-install-prefix was given.
4496 if test "${with_install_prefix+set}" = set; then
4497   withval="$with_install_prefix"
4498   case "x$withval" in
4499         (xyes|xno)
4500                 ;;
4501         (*)     DESTDIR="$withval"
4502                 ;;
4503         esac
4504 fi;
4505 echo "$as_me:4505: result: $DESTDIR" >&5
4506 echo "${ECHO_T}$DESTDIR" >&6
4507
4508 ###############################################################################
4509
4510 # If we're cross-compiling, allow the user to override the tools and their
4511 # options.  The configure script is oriented toward identifying the host
4512 # compiler, etc., but we need a build compiler to generate parts of the source.
4513
4514 if test "$cross_compiling" = yes ; then
4515
4516         # defaults that we might want to override
4517         : ${BUILD_CFLAGS:=''}
4518         : ${BUILD_CPPFLAGS:=''}
4519         : ${BUILD_LDFLAGS:=''}
4520         : ${BUILD_LIBS:=''}
4521         : ${BUILD_EXEEXT:='$x'}
4522         : ${BUILD_OBJEXT:='o'}
4523
4524 # Check whether --with-build-cc or --without-build-cc was given.
4525 if test "${with_build_cc+set}" = set; then
4526   withval="$with_build_cc"
4527   BUILD_CC="$withval"
4528 else
4529   for ac_prog in gcc cc cl
4530 do
4531   # Extract the first word of "$ac_prog", so it can be a program name with args.
4532 set dummy $ac_prog; ac_word=$2
4533 echo "$as_me:4533: checking for $ac_word" >&5
4534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4535 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4536   echo $ECHO_N "(cached) $ECHO_C" >&6
4537 else
4538   if test -n "$BUILD_CC"; then
4539   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4540 else
4541   ac_save_IFS=$IFS; IFS=$ac_path_separator
4542 ac_dummy="$PATH"
4543 for ac_dir in $ac_dummy; do
4544   IFS=$ac_save_IFS
4545   test -z "$ac_dir" && ac_dir=.
4546   $as_executable_p "$ac_dir/$ac_word" || continue
4547 ac_cv_prog_BUILD_CC="$ac_prog"
4548 echo "$as_me:4548: found $ac_dir/$ac_word" >&5
4549 break
4550 done
4551
4552 fi
4553 fi
4554 BUILD_CC=$ac_cv_prog_BUILD_CC
4555 if test -n "$BUILD_CC"; then
4556   echo "$as_me:4556: result: $BUILD_CC" >&5
4557 echo "${ECHO_T}$BUILD_CC" >&6
4558 else
4559   echo "$as_me:4559: result: no" >&5
4560 echo "${ECHO_T}no" >&6
4561 fi
4562
4563   test -n "$BUILD_CC" && break
4564 done
4565
4566 fi;
4567         echo "$as_me:4567: checking for native build C compiler" >&5
4568 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4569         echo "$as_me:4569: result: $BUILD_CC" >&5
4570 echo "${ECHO_T}$BUILD_CC" >&6
4571
4572         echo "$as_me:4572: checking for native build C preprocessor" >&5
4573 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4574
4575 # Check whether --with-build-cpp or --without-build-cpp was given.
4576 if test "${with_build_cpp+set}" = set; then
4577   withval="$with_build_cpp"
4578   BUILD_CPP="$withval"
4579 else
4580   BUILD_CPP='${BUILD_CC} -E'
4581 fi;
4582         echo "$as_me:4582: result: $BUILD_CPP" >&5
4583 echo "${ECHO_T}$BUILD_CPP" >&6
4584
4585         echo "$as_me:4585: checking for native build C flags" >&5
4586 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4587
4588 # Check whether --with-build-cflags or --without-build-cflags was given.
4589 if test "${with_build_cflags+set}" = set; then
4590   withval="$with_build_cflags"
4591   BUILD_CFLAGS="$withval"
4592 fi;
4593         echo "$as_me:4593: result: $BUILD_CFLAGS" >&5
4594 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4595
4596         echo "$as_me:4596: checking for native build C preprocessor-flags" >&5
4597 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4598
4599 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4600 if test "${with_build_cppflags+set}" = set; then
4601   withval="$with_build_cppflags"
4602   BUILD_CPPFLAGS="$withval"
4603 fi;
4604         echo "$as_me:4604: result: $BUILD_CPPFLAGS" >&5
4605 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4606
4607         echo "$as_me:4607: checking for native build linker-flags" >&5
4608 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4609
4610 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4611 if test "${with_build_ldflags+set}" = set; then
4612   withval="$with_build_ldflags"
4613   BUILD_LDFLAGS="$withval"
4614 fi;
4615         echo "$as_me:4615: result: $BUILD_LDFLAGS" >&5
4616 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4617
4618         echo "$as_me:4618: checking for native build linker-libraries" >&5
4619 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4620
4621 # Check whether --with-build-libs or --without-build-libs was given.
4622 if test "${with_build_libs+set}" = set; then
4623   withval="$with_build_libs"
4624   BUILD_LIBS="$withval"
4625 fi;
4626         echo "$as_me:4626: result: $BUILD_LIBS" >&5
4627 echo "${ECHO_T}$BUILD_LIBS" >&6
4628
4629         # this assumes we're on Unix.
4630         BUILD_EXEEXT=
4631         BUILD_OBJEXT=o
4632
4633         : ${BUILD_CC:='${CC}'}
4634
4635         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4636                 { { echo "$as_me:4636: error: Cross-build requires two compilers.
4637 Use --with-build-cc to specify the native compiler." >&5
4638 echo "$as_me: error: Cross-build requires two compilers.
4639 Use --with-build-cc to specify the native compiler." >&2;}
4640    { (exit 1); exit 1; }; }
4641         fi
4642
4643 else
4644         : ${BUILD_CC:='${CC}'}
4645         : ${BUILD_CPP:='${CPP}'}
4646         : ${BUILD_CFLAGS:='${CFLAGS}'}
4647         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4648         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4649         : ${BUILD_LIBS:='${LIBS}'}
4650         : ${BUILD_EXEEXT:='$x'}
4651         : ${BUILD_OBJEXT:='o'}
4652 fi
4653
4654 ###############################################################################
4655
4656 ### Options to allow the user to specify the set of libraries which are used.
4657 ### Use "--without-normal --with-shared" to allow the default model to be
4658 ### shared, for example.
4659 cf_list_models=""
4660
4661 echo "$as_me:4661: checking if libtool -version-number should be used" >&5
4662 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4663
4664 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4665 if test "${enable_libtool_version+set}" = set; then
4666   enableval="$enable_libtool_version"
4667   test "$enableval" != no && enableval=yes
4668         if test "$enableval" != "yes" ; then
4669     cf_libtool_version=no
4670         else
4671                 cf_libtool_version=yes
4672         fi
4673 else
4674   enableval=yes
4675         cf_libtool_version=yes
4676
4677 fi;
4678 echo "$as_me:4678: result: $cf_libtool_version" >&5
4679 echo "${ECHO_T}$cf_libtool_version" >&6
4680
4681 if test "$cf_libtool_version" = yes ; then
4682         LIBTOOL_VERSION="-version-number"
4683 else
4684         LIBTOOL_VERSION="-version-info"
4685         case "x$VERSION" in
4686         (x)
4687                 { echo "$as_me:4687: WARNING: VERSION was not set" >&5
4688 echo "$as_me: WARNING: VERSION was not set" >&2;}
4689                 ;;
4690         (x*.*.*)
4691                 ABI_VERSION="$VERSION"
4692                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4693
4694 echo "${as_me:-configure}:4694: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4695
4696                 ;;
4697         (x*:*:*)
4698                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4699                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4700
4701 echo "${as_me:-configure}:4701: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4702
4703                 ;;
4704         (*)
4705                 { echo "$as_me:4705: WARNING: unexpected VERSION value: $VERSION" >&5
4706 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4707                 ;;
4708         esac
4709 fi
4710
4711 LIBTOOL=
4712
4713 # common library maintenance symbols that are convenient for libtool scripts:
4714 LIB_CREATE='${AR} -cr'
4715 LIB_OBJECT='${OBJECTS}'
4716 LIB_SUFFIX=.a
4717 LIB_PREP="$RANLIB"
4718
4719 # symbols used to prop libtool up to enable it to determine what it should be
4720 # doing:
4721 LIB_CLEAN=
4722 LIB_COMPILE=
4723 LIB_LINK='${CC}'
4724 LIB_INSTALL=
4725 LIB_UNINSTALL=
4726
4727 echo "$as_me:4727: checking if you want to build libraries with libtool" >&5
4728 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4729
4730 # Check whether --with-libtool or --without-libtool was given.
4731 if test "${with_libtool+set}" = set; then
4732   withval="$with_libtool"
4733   with_libtool=$withval
4734 else
4735   with_libtool=no
4736 fi;
4737 echo "$as_me:4737: result: $with_libtool" >&5
4738 echo "${ECHO_T}$with_libtool" >&6
4739 if test "$with_libtool" != "no"; then
4740
4741         if test "$with_libtool" != "yes" ; then
4742
4743 if test "x$prefix" != xNONE; then
4744         cf_path_syntax="$prefix"
4745 else
4746         cf_path_syntax="$ac_default_prefix"
4747 fi
4748
4749 case ".$with_libtool" in
4750 (.\$\(*\)*|.\'*\'*)
4751         ;;
4752 (..|./*|.\\*)
4753         ;;
4754 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4755         ;;
4756 (.\${*prefix}*|.\${*dir}*)
4757         eval with_libtool="$with_libtool"
4758         case ".$with_libtool" in
4759         (.NONE/*)
4760                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4761                 ;;
4762         esac
4763         ;;
4764 (.no|.NONE/*)
4765         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4766         ;;
4767 (*)
4768         { { echo "$as_me:4768: error: expected a pathname, not \"$with_libtool\"" >&5
4769 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4770    { (exit 1); exit 1; }; }
4771         ;;
4772 esac
4773
4774                 LIBTOOL=$with_libtool
4775         else
4776                 if test -n "$ac_tool_prefix"; then
4777   for ac_prog in libtool glibtool
4778   do
4779     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4780 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4781 echo "$as_me:4781: checking for $ac_word" >&5
4782 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4783 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4784   echo $ECHO_N "(cached) $ECHO_C" >&6
4785 else
4786   if test -n "$LIBTOOL"; then
4787   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4788 else
4789   ac_save_IFS=$IFS; IFS=$ac_path_separator
4790 ac_dummy="$PATH"
4791 for ac_dir in $ac_dummy; do
4792   IFS=$ac_save_IFS
4793   test -z "$ac_dir" && ac_dir=.
4794   $as_executable_p "$ac_dir/$ac_word" || continue
4795 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4796 echo "$as_me:4796: found $ac_dir/$ac_word" >&5
4797 break
4798 done
4799
4800 fi
4801 fi
4802 LIBTOOL=$ac_cv_prog_LIBTOOL
4803 if test -n "$LIBTOOL"; then
4804   echo "$as_me:4804: result: $LIBTOOL" >&5
4805 echo "${ECHO_T}$LIBTOOL" >&6
4806 else
4807   echo "$as_me:4807: result: no" >&5
4808 echo "${ECHO_T}no" >&6
4809 fi
4810
4811     test -n "$LIBTOOL" && break
4812   done
4813 fi
4814 if test -z "$LIBTOOL"; then
4815   ac_ct_LIBTOOL=$LIBTOOL
4816   for ac_prog in libtool glibtool
4817 do
4818   # Extract the first word of "$ac_prog", so it can be a program name with args.
4819 set dummy $ac_prog; ac_word=$2
4820 echo "$as_me:4820: checking for $ac_word" >&5
4821 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4822 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4823   echo $ECHO_N "(cached) $ECHO_C" >&6
4824 else
4825   if test -n "$ac_ct_LIBTOOL"; then
4826   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4827 else
4828   ac_save_IFS=$IFS; IFS=$ac_path_separator
4829 ac_dummy="$PATH"
4830 for ac_dir in $ac_dummy; do
4831   IFS=$ac_save_IFS
4832   test -z "$ac_dir" && ac_dir=.
4833   $as_executable_p "$ac_dir/$ac_word" || continue
4834 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4835 echo "$as_me:4835: found $ac_dir/$ac_word" >&5
4836 break
4837 done
4838
4839 fi
4840 fi
4841 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4842 if test -n "$ac_ct_LIBTOOL"; then
4843   echo "$as_me:4843: result: $ac_ct_LIBTOOL" >&5
4844 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4845 else
4846   echo "$as_me:4846: result: no" >&5
4847 echo "${ECHO_T}no" >&6
4848 fi
4849
4850   test -n "$ac_ct_LIBTOOL" && break
4851 done
4852 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4853
4854   LIBTOOL=$ac_ct_LIBTOOL
4855 fi
4856
4857 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4858 then
4859         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.].*//'`
4860 else
4861         cf_cv_libtool_version=
4862 fi
4863 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4864
4865                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4866                 then
4867
4868 unset ac_cv_prog_ac_ct_LIBTOOL
4869 unset ac_ct_LIBTOOL
4870 unset LIBTOOL
4871
4872                         if test -n "$ac_tool_prefix"; then
4873   for ac_prog in glibtool
4874   do
4875     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4876 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4877 echo "$as_me:4877: checking for $ac_word" >&5
4878 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4879 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4880   echo $ECHO_N "(cached) $ECHO_C" >&6
4881 else
4882   if test -n "$LIBTOOL"; then
4883   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4884 else
4885   ac_save_IFS=$IFS; IFS=$ac_path_separator
4886 ac_dummy="$PATH"
4887 for ac_dir in $ac_dummy; do
4888   IFS=$ac_save_IFS
4889   test -z "$ac_dir" && ac_dir=.
4890   $as_executable_p "$ac_dir/$ac_word" || continue
4891 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4892 echo "$as_me:4892: found $ac_dir/$ac_word" >&5
4893 break
4894 done
4895
4896 fi
4897 fi
4898 LIBTOOL=$ac_cv_prog_LIBTOOL
4899 if test -n "$LIBTOOL"; then
4900   echo "$as_me:4900: result: $LIBTOOL" >&5
4901 echo "${ECHO_T}$LIBTOOL" >&6
4902 else
4903   echo "$as_me:4903: result: no" >&5
4904 echo "${ECHO_T}no" >&6
4905 fi
4906
4907     test -n "$LIBTOOL" && break
4908   done
4909 fi
4910 if test -z "$LIBTOOL"; then
4911   ac_ct_LIBTOOL=$LIBTOOL
4912   for ac_prog in glibtool
4913 do
4914   # Extract the first word of "$ac_prog", so it can be a program name with args.
4915 set dummy $ac_prog; ac_word=$2
4916 echo "$as_me:4916: checking for $ac_word" >&5
4917 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4918 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4919   echo $ECHO_N "(cached) $ECHO_C" >&6
4920 else
4921   if test -n "$ac_ct_LIBTOOL"; then
4922   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4923 else
4924   ac_save_IFS=$IFS; IFS=$ac_path_separator
4925 ac_dummy="$PATH"
4926 for ac_dir in $ac_dummy; do
4927   IFS=$ac_save_IFS
4928   test -z "$ac_dir" && ac_dir=.
4929   $as_executable_p "$ac_dir/$ac_word" || continue
4930 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4931 echo "$as_me:4931: found $ac_dir/$ac_word" >&5
4932 break
4933 done
4934
4935 fi
4936 fi
4937 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4938 if test -n "$ac_ct_LIBTOOL"; then
4939   echo "$as_me:4939: result: $ac_ct_LIBTOOL" >&5
4940 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4941 else
4942   echo "$as_me:4942: result: no" >&5
4943 echo "${ECHO_T}no" >&6
4944 fi
4945
4946   test -n "$ac_ct_LIBTOOL" && break
4947 done
4948 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4949
4950   LIBTOOL=$ac_ct_LIBTOOL
4951 fi
4952
4953 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4954 then
4955         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.].*//'`
4956 else
4957         cf_cv_libtool_version=
4958 fi
4959 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4960
4961                 fi
4962         fi
4963         if test -z "$LIBTOOL" ; then
4964                 { { echo "$as_me:4964: error: Cannot find libtool" >&5
4965 echo "$as_me: error: Cannot find libtool" >&2;}
4966    { (exit 1); exit 1; }; }
4967         fi
4968         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4969         LIB_OBJECT='${OBJECTS:.o=.lo}'
4970         LIB_SUFFIX=.la
4971         LIB_CLEAN='${LIBTOOL} --mode=clean'
4972         LIB_COMPILE='${LIBTOOL} --mode=compile'
4973         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4974         LIB_INSTALL='${LIBTOOL} --mode=install'
4975         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4976         LIB_PREP=:
4977
4978 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4979 then
4980         echo "$as_me:4980: checking version of $LIBTOOL" >&5
4981 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4982
4983 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4984 then
4985         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.].*//'`
4986 else
4987         cf_cv_libtool_version=
4988 fi
4989 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4990
4991         echo "$as_me:4991: result: $cf_cv_libtool_version" >&5
4992 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4993         if test -z "$cf_cv_libtool_version" ; then
4994                 { { echo "$as_me:4994: error: This is not GNU libtool" >&5
4995 echo "$as_me: error: This is not GNU libtool" >&2;}
4996    { (exit 1); exit 1; }; }
4997         fi
4998 else
4999         { { echo "$as_me:4999: error: GNU libtool has not been found" >&5
5000 echo "$as_me: error: GNU libtool has not been found" >&2;}
5001    { (exit 1); exit 1; }; }
5002 fi
5003
5004         # special hack to add -no-undefined (which libtool should do for itself)
5005         LT_UNDEF=
5006         case "$cf_cv_system_name" in
5007         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5008                 LT_UNDEF=-no-undefined
5009                 ;;
5010         esac
5011
5012         # special hack to add --tag option for C++ compiler
5013         case $cf_cv_libtool_version in
5014         (1.[5-9]*|[2-9].[0-9.a-z]*)
5015                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5016                 LIBTOOL="$LIBTOOL --tag=CC"
5017                 ;;
5018         (*)
5019                 LIBTOOL_CXX="$LIBTOOL"
5020                 ;;
5021         esac
5022 else
5023         LIBTOOL=""
5024         LIBTOOL_CXX=""
5025 fi
5026
5027 test -z "$LIBTOOL" && ECHO_LT=
5028
5029 if test "$with_libtool" != "no" ; then
5030
5031 cf_list_models="$cf_list_models libtool"
5032
5033 else
5034
5035 echo "$as_me:5035: checking if you want to build shared libraries" >&5
5036 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5037
5038 # Check whether --with-shared or --without-shared was given.
5039 if test "${with_shared+set}" = set; then
5040   withval="$with_shared"
5041   with_shared=$withval
5042 else
5043   with_shared=no
5044 fi;
5045 echo "$as_me:5045: result: $with_shared" >&5
5046 echo "${ECHO_T}$with_shared" >&6
5047 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5048
5049 echo "$as_me:5049: checking if you want to build static libraries" >&5
5050 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5051
5052 # Check whether --with-normal or --without-normal was given.
5053 if test "${with_normal+set}" = set; then
5054   withval="$with_normal"
5055   with_normal=$withval
5056 else
5057   with_normal=yes
5058 fi;
5059 echo "$as_me:5059: result: $with_normal" >&5
5060 echo "${ECHO_T}$with_normal" >&6
5061 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5062
5063 echo "$as_me:5063: checking if you want to build debug libraries" >&5
5064 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5065
5066 # Check whether --with-debug or --without-debug was given.
5067 if test "${with_debug+set}" = set; then
5068   withval="$with_debug"
5069   with_debug=$withval
5070 else
5071   with_debug=yes
5072 fi;
5073 echo "$as_me:5073: result: $with_debug" >&5
5074 echo "${ECHO_T}$with_debug" >&6
5075 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5076
5077 echo "$as_me:5077: checking if you want to build profiling libraries" >&5
5078 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5079
5080 # Check whether --with-profile or --without-profile was given.
5081 if test "${with_profile+set}" = set; then
5082   withval="$with_profile"
5083   with_profile=$withval
5084 else
5085   with_profile=no
5086 fi;
5087 echo "$as_me:5087: result: $with_profile" >&5
5088 echo "${ECHO_T}$with_profile" >&6
5089 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5090
5091 fi
5092
5093 if test "X$cf_with_cxx_binding" != Xno; then
5094 if test "x$with_shared" = "xyes"; then
5095 echo "$as_me:5095: checking if you want to build C++ shared libraries" >&5
5096 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5097
5098 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5099 if test "${with_cxx_shared+set}" = set; then
5100   withval="$with_cxx_shared"
5101   with_shared_cxx=$withval
5102 else
5103   with_shared_cxx=no
5104 fi;
5105 echo "$as_me:5105: result: $with_shared_cxx" >&5
5106 echo "${ECHO_T}$with_shared_cxx" >&6
5107 fi
5108 fi
5109
5110 ###############################################################################
5111
5112 echo "$as_me:5112: checking for specified models" >&5
5113 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5114 test -z "$cf_list_models" && cf_list_models=normal
5115 test "$with_libtool" != "no" && cf_list_models=libtool
5116 echo "$as_me:5116: result: $cf_list_models" >&5
5117 echo "${ECHO_T}$cf_list_models" >&6
5118
5119 ### Use the first model as the default, and save its suffix for use in building
5120 ### up test-applications.
5121 echo "$as_me:5121: checking for default model" >&5
5122 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5123 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5124 echo "$as_me:5124: result: $DFT_LWR_MODEL" >&5
5125 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5126
5127 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5128
5129 TICS_NAME=tic
5130
5131 TINFO_NAME=tinfo
5132
5133 LIB_NAME=ncurses
5134
5135 LIB_DIR=../lib
5136 LIB_2ND=../../lib
5137
5138 echo "$as_me:5138: checking if you want to have a library-prefix" >&5
5139 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5140
5141 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5142 if test "${with_lib_prefix+set}" = set; then
5143   withval="$with_lib_prefix"
5144   with_lib_prefix=$withval
5145 else
5146   with_lib_prefix=auto
5147 fi;
5148 echo "$as_me:5148: result: $with_lib_prefix" >&5
5149 echo "${ECHO_T}$with_lib_prefix" >&6
5150
5151 if test $with_lib_prefix = auto
5152 then
5153
5154         case $cf_cv_system_name in
5155         (OS/2*|os2*)
5156                 if test "$DFT_LWR_MODEL" = libtool; then
5157                         LIB_PREFIX='lib'
5158                 else
5159                         LIB_PREFIX=''
5160                 fi
5161                 ;;
5162         (*)     LIB_PREFIX='lib'
5163                 ;;
5164         esac
5165 cf_prefix=$LIB_PREFIX
5166
5167 elif test $with_lib_prefix = no
5168 then
5169         LIB_PREFIX=
5170 else
5171         LIB_PREFIX=$with_lib_prefix
5172 fi
5173
5174 LIB_SUFFIX=
5175
5176         echo "$as_me:5176: checking for PATH separator" >&5
5177 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5178         case $cf_cv_system_name in
5179         (os2*)  PATH_SEPARATOR=';'  ;;
5180         (*)     ${PATH_SEPARATOR:=':'}  ;;
5181         esac
5182
5183         echo "$as_me:5183: result: $PATH_SEPARATOR" >&5
5184 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5185
5186 ###############################################################################
5187
5188 echo "$as_me:5188: checking if you want to build a separate terminfo library" >&5
5189 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5190
5191 # Check whether --with-termlib or --without-termlib was given.
5192 if test "${with_termlib+set}" = set; then
5193   withval="$with_termlib"
5194   with_termlib=$withval
5195 else
5196   with_termlib=no
5197 fi;
5198 echo "$as_me:5198: result: $with_termlib" >&5
5199 echo "${ECHO_T}$with_termlib" >&6
5200
5201 echo "$as_me:5201: checking if you want to build a separate tic library" >&5
5202 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5203
5204 # Check whether --with-ticlib or --without-ticlib was given.
5205 if test "${with_ticlib+set}" = set; then
5206   withval="$with_ticlib"
5207   with_ticlib=$withval
5208 else
5209   with_ticlib=no
5210 fi;
5211 echo "$as_me:5211: result: $with_ticlib" >&5
5212 echo "${ECHO_T}$with_ticlib" >&6
5213
5214 ### Checks for special libraries, must be done up-front.
5215 SHLIB_LIST=""
5216
5217 echo "$as_me:5217: checking if you want to link with the GPM mouse library" >&5
5218 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5219
5220 # Check whether --with-gpm or --without-gpm was given.
5221 if test "${with_gpm+set}" = set; then
5222   withval="$with_gpm"
5223   with_gpm=$withval
5224 else
5225   with_gpm=maybe
5226 fi;
5227 echo "$as_me:5227: result: $with_gpm" >&5
5228 echo "${ECHO_T}$with_gpm" >&6
5229
5230 if test "$with_gpm" != no ; then
5231         echo "$as_me:5231: checking for gpm.h" >&5
5232 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5233 if test "${ac_cv_header_gpm_h+set}" = set; then
5234   echo $ECHO_N "(cached) $ECHO_C" >&6
5235 else
5236   cat >conftest.$ac_ext <<_ACEOF
5237 #line 5237 "configure"
5238 #include "confdefs.h"
5239 #include <gpm.h>
5240 _ACEOF
5241 if { (eval echo "$as_me:5241: \"$ac_cpp conftest.$ac_ext\"") >&5
5242   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5243   ac_status=$?
5244   egrep -v '^ *\+' conftest.er1 >conftest.err
5245   rm -f conftest.er1
5246   cat conftest.err >&5
5247   echo "$as_me:5247: \$? = $ac_status" >&5
5248   (exit $ac_status); } >/dev/null; then
5249   if test -s conftest.err; then
5250     ac_cpp_err=$ac_c_preproc_warn_flag
5251   else
5252     ac_cpp_err=
5253   fi
5254 else
5255   ac_cpp_err=yes
5256 fi
5257 if test -z "$ac_cpp_err"; then
5258   ac_cv_header_gpm_h=yes
5259 else
5260   echo "$as_me: failed program was:" >&5
5261   cat conftest.$ac_ext >&5
5262   ac_cv_header_gpm_h=no
5263 fi
5264 rm -f conftest.err conftest.$ac_ext
5265 fi
5266 echo "$as_me:5266: result: $ac_cv_header_gpm_h" >&5
5267 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5268 if test $ac_cv_header_gpm_h = yes; then
5269
5270 cat >>confdefs.h <<\EOF
5271 #define HAVE_GPM_H 1
5272 EOF
5273
5274                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5275                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5276
5277 echo "${as_me:-configure}:5277: testing assuming we really have GPM library ..." 1>&5
5278
5279 cat >>confdefs.h <<\EOF
5280 #define HAVE_LIBGPM 1
5281 EOF
5282
5283                         with_gpm=yes
5284                 else
5285                         echo "$as_me:5285: checking for Gpm_Open in -lgpm" >&5
5286 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5287 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5288   echo $ECHO_N "(cached) $ECHO_C" >&6
5289 else
5290   ac_check_lib_save_LIBS=$LIBS
5291 LIBS="-lgpm  $LIBS"
5292 cat >conftest.$ac_ext <<_ACEOF
5293 #line 5293 "configure"
5294 #include "confdefs.h"
5295
5296 /* Override any gcc2 internal prototype to avoid an error.  */
5297 #ifdef __cplusplus
5298 extern "C"
5299 #endif
5300 /* We use char because int might match the return type of a gcc2
5301    builtin and then its argument prototype would still apply.  */
5302 char Gpm_Open ();
5303 int
5304 main ()
5305 {
5306 Gpm_Open ();
5307   ;
5308   return 0;
5309 }
5310 _ACEOF
5311 rm -f conftest.$ac_objext conftest$ac_exeext
5312 if { (eval echo "$as_me:5312: \"$ac_link\"") >&5
5313   (eval $ac_link) 2>&5
5314   ac_status=$?
5315   echo "$as_me:5315: \$? = $ac_status" >&5
5316   (exit $ac_status); } &&
5317          { ac_try='test -s conftest$ac_exeext'
5318   { (eval echo "$as_me:5318: \"$ac_try\"") >&5
5319   (eval $ac_try) 2>&5
5320   ac_status=$?
5321   echo "$as_me:5321: \$? = $ac_status" >&5
5322   (exit $ac_status); }; }; then
5323   ac_cv_lib_gpm_Gpm_Open=yes
5324 else
5325   echo "$as_me: failed program was:" >&5
5326 cat conftest.$ac_ext >&5
5327 ac_cv_lib_gpm_Gpm_Open=no
5328 fi
5329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5330 LIBS=$ac_check_lib_save_LIBS
5331 fi
5332 echo "$as_me:5332: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5333 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5334 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5335   :
5336 else
5337
5338                                 if test "$with_gpm" = maybe; then
5339                                         { echo "$as_me:5339: WARNING: Cannot link with GPM library" >&5
5340 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5341                                         with_gpm=no
5342                                 else
5343                                         { { echo "$as_me:5343: error: Cannot link with GPM library" >&5
5344 echo "$as_me: error: Cannot link with GPM library" >&2;}
5345    { (exit 1); exit 1; }; }
5346                                 fi
5347
5348 fi
5349
5350                 fi
5351
5352 else
5353
5354                 test "$with_gpm" != maybe && { echo "$as_me:5354: WARNING: Cannot find GPM header" >&5
5355 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5356                 with_gpm=no
5357
5358 fi
5359
5360 fi
5361
5362 if test "$with_gpm" != no ; then
5363         echo "$as_me:5363: checking if you want to load GPM dynamically" >&5
5364 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5365
5366 # Check whether --with-dlsym or --without-dlsym was given.
5367 if test "${with_dlsym+set}" = set; then
5368   withval="$with_dlsym"
5369   with_dlsym=$withval
5370 else
5371   with_dlsym=yes
5372 fi;
5373         echo "$as_me:5373: result: $with_dlsym" >&5
5374 echo "${ECHO_T}$with_dlsym" >&6
5375         if test "x$with_dlsym" = xyes ; then
5376
5377 cf_have_dlsym=no
5378 echo "$as_me:5378: checking for dlsym" >&5
5379 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5380 if test "${ac_cv_func_dlsym+set}" = set; then
5381   echo $ECHO_N "(cached) $ECHO_C" >&6
5382 else
5383   cat >conftest.$ac_ext <<_ACEOF
5384 #line 5384 "configure"
5385 #include "confdefs.h"
5386 /* System header to define __stub macros and hopefully few prototypes,
5387     which can conflict with char dlsym (); below.  */
5388 #include <assert.h>
5389 /* Override any gcc2 internal prototype to avoid an error.  */
5390 #ifdef __cplusplus
5391 extern "C"
5392 #endif
5393 /* We use char because int might match the return type of a gcc2
5394    builtin and then its argument prototype would still apply.  */
5395 char dlsym ();
5396 char (*f) ();
5397
5398 int
5399 main ()
5400 {
5401 /* The GNU C library defines this for functions which it implements
5402     to always fail with ENOSYS.  Some functions are actually named
5403     something starting with __ and the normal name is an alias.  */
5404 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5405 choke me
5406 #else
5407 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5408 #endif
5409
5410   ;
5411   return 0;
5412 }
5413 _ACEOF
5414 rm -f conftest.$ac_objext conftest$ac_exeext
5415 if { (eval echo "$as_me:5415: \"$ac_link\"") >&5
5416   (eval $ac_link) 2>&5
5417   ac_status=$?
5418   echo "$as_me:5418: \$? = $ac_status" >&5
5419   (exit $ac_status); } &&
5420          { ac_try='test -s conftest$ac_exeext'
5421   { (eval echo "$as_me:5421: \"$ac_try\"") >&5
5422   (eval $ac_try) 2>&5
5423   ac_status=$?
5424   echo "$as_me:5424: \$? = $ac_status" >&5
5425   (exit $ac_status); }; }; then
5426   ac_cv_func_dlsym=yes
5427 else
5428   echo "$as_me: failed program was:" >&5
5429 cat conftest.$ac_ext >&5
5430 ac_cv_func_dlsym=no
5431 fi
5432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5433 fi
5434 echo "$as_me:5434: result: $ac_cv_func_dlsym" >&5
5435 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5436 if test $ac_cv_func_dlsym = yes; then
5437   cf_have_dlsym=yes
5438 else
5439
5440 cf_have_libdl=no
5441 echo "$as_me:5441: checking for dlsym in -ldl" >&5
5442 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5443 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5444   echo $ECHO_N "(cached) $ECHO_C" >&6
5445 else
5446   ac_check_lib_save_LIBS=$LIBS
5447 LIBS="-ldl  $LIBS"
5448 cat >conftest.$ac_ext <<_ACEOF
5449 #line 5449 "configure"
5450 #include "confdefs.h"
5451
5452 /* Override any gcc2 internal prototype to avoid an error.  */
5453 #ifdef __cplusplus
5454 extern "C"
5455 #endif
5456 /* We use char because int might match the return type of a gcc2
5457    builtin and then its argument prototype would still apply.  */
5458 char dlsym ();
5459 int
5460 main ()
5461 {
5462 dlsym ();
5463   ;
5464   return 0;
5465 }
5466 _ACEOF
5467 rm -f conftest.$ac_objext conftest$ac_exeext
5468 if { (eval echo "$as_me:5468: \"$ac_link\"") >&5
5469   (eval $ac_link) 2>&5
5470   ac_status=$?
5471   echo "$as_me:5471: \$? = $ac_status" >&5
5472   (exit $ac_status); } &&
5473          { ac_try='test -s conftest$ac_exeext'
5474   { (eval echo "$as_me:5474: \"$ac_try\"") >&5
5475   (eval $ac_try) 2>&5
5476   ac_status=$?
5477   echo "$as_me:5477: \$? = $ac_status" >&5
5478   (exit $ac_status); }; }; then
5479   ac_cv_lib_dl_dlsym=yes
5480 else
5481   echo "$as_me: failed program was:" >&5
5482 cat conftest.$ac_ext >&5
5483 ac_cv_lib_dl_dlsym=no
5484 fi
5485 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5486 LIBS=$ac_check_lib_save_LIBS
5487 fi
5488 echo "$as_me:5488: result: $ac_cv_lib_dl_dlsym" >&5
5489 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5490 if test $ac_cv_lib_dl_dlsym = yes; then
5491
5492         cf_have_dlsym=yes
5493         cf_have_libdl=yes
5494 fi
5495
5496 fi
5497
5498 if test "$cf_have_dlsym" = yes ; then
5499         test "$cf_have_libdl" = yes && {
5500 cf_add_libs="-ldl"
5501 # Filter out duplicates - this happens with badly-designed ".pc" files...
5502 for cf_add_1lib in $LIBS
5503 do
5504         for cf_add_2lib in $cf_add_libs
5505         do
5506                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5507                 then
5508                         cf_add_1lib=
5509                         break
5510                 fi
5511         done
5512         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5513 done
5514 LIBS="$cf_add_libs"
5515  }
5516
5517         echo "$as_me:5517: checking whether able to link to dl*() functions" >&5
5518 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5519         cat >conftest.$ac_ext <<_ACEOF
5520 #line 5520 "configure"
5521 #include "confdefs.h"
5522 #include <dlfcn.h>
5523 int
5524 main ()
5525 {
5526
5527                 void *obj;
5528                 if ((obj = dlopen("filename", 0)) != 0) {
5529                         if (dlsym(obj, "symbolname") == 0) {
5530                         dlclose(obj);
5531                         }
5532                 }
5533   ;
5534   return 0;
5535 }
5536 _ACEOF
5537 rm -f conftest.$ac_objext conftest$ac_exeext
5538 if { (eval echo "$as_me:5538: \"$ac_link\"") >&5
5539   (eval $ac_link) 2>&5
5540   ac_status=$?
5541   echo "$as_me:5541: \$? = $ac_status" >&5
5542   (exit $ac_status); } &&
5543          { ac_try='test -s conftest$ac_exeext'
5544   { (eval echo "$as_me:5544: \"$ac_try\"") >&5
5545   (eval $ac_try) 2>&5
5546   ac_status=$?
5547   echo "$as_me:5547: \$? = $ac_status" >&5
5548   (exit $ac_status); }; }; then
5549
5550 cat >>confdefs.h <<\EOF
5551 #define HAVE_LIBDL 1
5552 EOF
5553
5554 else
5555   echo "$as_me: failed program was:" >&5
5556 cat conftest.$ac_ext >&5
5557
5558                 { { echo "$as_me:5558: error: Cannot link test program for libdl" >&5
5559 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5560    { (exit 1); exit 1; }; }
5561 fi
5562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5563         echo "$as_me:5563: result: ok" >&5
5564 echo "${ECHO_T}ok" >&6
5565 else
5566         { { echo "$as_me:5566: error: Cannot find dlsym function" >&5
5567 echo "$as_me: error: Cannot find dlsym function" >&2;}
5568    { (exit 1); exit 1; }; }
5569 fi
5570
5571                 if test "x$with_gpm" != xyes ; then
5572                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5573
5574 echo "${as_me:-configure}:5574: testing assuming soname for gpm is $with_gpm ..." 1>&5
5575
5576                         cf_cv_gpm_soname="$with_gpm"
5577                 else
5578
5579 echo "$as_me:5579: checking for soname of gpm library" >&5
5580 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5581 if test "${cf_cv_gpm_soname+set}" = set; then
5582   echo $ECHO_N "(cached) $ECHO_C" >&6
5583 else
5584
5585 cf_cv_gpm_soname=unknown
5586 if test "$cross_compiling" != yes ; then
5587 cat >conftest.$ac_ext <<CF_EOF
5588 #include <gpm.h>
5589 int main(void)
5590 {
5591 if (Gpm_Open(0,0)) Gpm_Close();
5592         ${cf_cv_main_return:-return}(0);
5593 }
5594 CF_EOF
5595 cf_save_LIBS="$LIBS"
5596
5597 cf_add_libs="-lgpm"
5598 # Filter out duplicates - this happens with badly-designed ".pc" files...
5599 for cf_add_1lib in $LIBS
5600 do
5601         for cf_add_2lib in $cf_add_libs
5602         do
5603                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5604                 then
5605                         cf_add_1lib=
5606                         break
5607                 fi
5608         done
5609         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5610 done
5611 LIBS="$cf_add_libs"
5612
5613         if { (eval echo "$as_me:5613: \"$ac_compile\"") >&5
5614   (eval $ac_compile) 2>&5
5615   ac_status=$?
5616   echo "$as_me:5616: \$? = $ac_status" >&5
5617   (exit $ac_status); } ; then
5618                 if { (eval echo "$as_me:5618: \"$ac_link\"") >&5
5619   (eval $ac_link) 2>&5
5620   ac_status=$?
5621   echo "$as_me:5621: \$? = $ac_status" >&5
5622   (exit $ac_status); } ; then
5623                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5624                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5625                 fi
5626         fi
5627 rm -rf conftest*
5628 LIBS="$cf_save_LIBS"
5629 fi
5630
5631 fi
5632 echo "$as_me:5632: result: $cf_cv_gpm_soname" >&5
5633 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5634
5635                 fi
5636                 test "$cf_cv_gpm_soname" != "unknown" &&
5637 cat >>confdefs.h <<EOF
5638 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5639 EOF
5640
5641                 SHLIB_LIST="-ldl $SHLIB_LIST"
5642         else
5643                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5644
5645 cf_add_libs="-lgpm"
5646 # Filter out duplicates - this happens with badly-designed ".pc" files...
5647 for cf_add_1lib in $TEST_LIBS
5648 do
5649         for cf_add_2lib in $cf_add_libs
5650         do
5651                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5652                 then
5653                         cf_add_1lib=
5654                         break
5655                 fi
5656         done
5657         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5658 done
5659 TEST_LIBS="$cf_add_libs"
5660
5661         fi
5662
5663 cat >>confdefs.h <<\EOF
5664 #define HAVE_LIBGPM 1
5665 EOF
5666
5667 echo "$as_me:5667: checking for Gpm_Wgetch in -lgpm" >&5
5668 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5669 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5670   echo $ECHO_N "(cached) $ECHO_C" >&6
5671 else
5672   ac_check_lib_save_LIBS=$LIBS
5673 LIBS="-lgpm  $LIBS"
5674 cat >conftest.$ac_ext <<_ACEOF
5675 #line 5675 "configure"
5676 #include "confdefs.h"
5677
5678 /* Override any gcc2 internal prototype to avoid an error.  */
5679 #ifdef __cplusplus
5680 extern "C"
5681 #endif
5682 /* We use char because int might match the return type of a gcc2
5683    builtin and then its argument prototype would still apply.  */
5684 char Gpm_Wgetch ();
5685 int
5686 main ()
5687 {
5688 Gpm_Wgetch ();
5689   ;
5690   return 0;
5691 }
5692 _ACEOF
5693 rm -f conftest.$ac_objext conftest$ac_exeext
5694 if { (eval echo "$as_me:5694: \"$ac_link\"") >&5
5695   (eval $ac_link) 2>&5
5696   ac_status=$?
5697   echo "$as_me:5697: \$? = $ac_status" >&5
5698   (exit $ac_status); } &&
5699          { ac_try='test -s conftest$ac_exeext'
5700   { (eval echo "$as_me:5700: \"$ac_try\"") >&5
5701   (eval $ac_try) 2>&5
5702   ac_status=$?
5703   echo "$as_me:5703: \$? = $ac_status" >&5
5704   (exit $ac_status); }; }; then
5705   ac_cv_lib_gpm_Gpm_Wgetch=yes
5706 else
5707   echo "$as_me: failed program was:" >&5
5708 cat conftest.$ac_ext >&5
5709 ac_cv_lib_gpm_Gpm_Wgetch=no
5710 fi
5711 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5712 LIBS=$ac_check_lib_save_LIBS
5713 fi
5714 echo "$as_me:5714: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5715 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5716 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5717
5718 echo "$as_me:5718: checking if GPM is weakly bound to curses library" >&5
5719 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5720 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5721   echo $ECHO_N "(cached) $ECHO_C" >&6
5722 else
5723
5724 cf_cv_check_gpm_wgetch=unknown
5725 if test "$cross_compiling" != yes ; then
5726
5727 cat >conftest.$ac_ext <<CF_EOF
5728 #include <gpm.h>
5729 int main(void)
5730 {
5731         Gpm_Wgetch();
5732         ${cf_cv_main_return:-return}(0);
5733 }
5734 CF_EOF
5735
5736         cf_save_LIBS="$LIBS"
5737         # This only works if we can look at the symbol table.  If a shared
5738         # library is stripped for install, we cannot use that.  So we're forced
5739         # to rely on the static library, noting that some packagers may not
5740         # include it.
5741         LIBS="-static -lgpm -dynamic $LIBS"
5742         if { (eval echo "$as_me:5742: \"$ac_compile\"") >&5
5743   (eval $ac_compile) 2>&5
5744   ac_status=$?
5745   echo "$as_me:5745: \$? = $ac_status" >&5
5746   (exit $ac_status); } ; then
5747                 if { (eval echo "$as_me:5747: \"$ac_link\"") >&5
5748   (eval $ac_link) 2>&5
5749   ac_status=$?
5750   echo "$as_me:5750: \$? = $ac_status" >&5
5751   (exit $ac_status); } ; then
5752                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5753                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5754                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5755                 fi
5756         fi
5757         rm -rf conftest*
5758         LIBS="$cf_save_LIBS"
5759 fi
5760
5761 fi
5762 echo "$as_me:5762: result: $cf_cv_check_gpm_wgetch" >&5
5763 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5764
5765 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5766         { echo "$as_me:5766: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5767 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5768 fi
5769
5770 fi
5771
5772 fi
5773
5774 # not everyone has "test -c"
5775 if test -c /dev/sysmouse 2>/dev/null ; then
5776 echo "$as_me:5776: checking if you want to use sysmouse" >&5
5777 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5778
5779 # Check whether --with-sysmouse or --without-sysmouse was given.
5780 if test "${with_sysmouse+set}" = set; then
5781   withval="$with_sysmouse"
5782   cf_with_sysmouse=$withval
5783 else
5784   cf_with_sysmouse=maybe
5785 fi;
5786         if test "$cf_with_sysmouse" != no ; then
5787         cat >conftest.$ac_ext <<_ACEOF
5788 #line 5788 "configure"
5789 #include "confdefs.h"
5790
5791 #include <osreldate.h>
5792 #if (__FreeBSD_version >= 400017)
5793 #include <sys/consio.h>
5794 #include <sys/fbio.h>
5795 #else
5796 #include <machine/console.h>
5797 #endif
5798
5799 int
5800 main ()
5801 {
5802
5803         struct mouse_info the_mouse;
5804         ioctl(0, CONS_MOUSECTL, &the_mouse);
5805
5806   ;
5807   return 0;
5808 }
5809 _ACEOF
5810 rm -f conftest.$ac_objext
5811 if { (eval echo "$as_me:5811: \"$ac_compile\"") >&5
5812   (eval $ac_compile) 2>&5
5813   ac_status=$?
5814   echo "$as_me:5814: \$? = $ac_status" >&5
5815   (exit $ac_status); } &&
5816          { ac_try='test -s conftest.$ac_objext'
5817   { (eval echo "$as_me:5817: \"$ac_try\"") >&5
5818   (eval $ac_try) 2>&5
5819   ac_status=$?
5820   echo "$as_me:5820: \$? = $ac_status" >&5
5821   (exit $ac_status); }; }; then
5822   cf_with_sysmouse=yes
5823 else
5824   echo "$as_me: failed program was:" >&5
5825 cat conftest.$ac_ext >&5
5826 cf_with_sysmouse=no
5827 fi
5828 rm -f conftest.$ac_objext conftest.$ac_ext
5829         fi
5830 echo "$as_me:5830: result: $cf_with_sysmouse" >&5
5831 echo "${ECHO_T}$cf_with_sysmouse" >&6
5832 test "$cf_with_sysmouse" = yes &&
5833 cat >>confdefs.h <<\EOF
5834 #define USE_SYSMOUSE 1
5835 EOF
5836
5837 fi
5838
5839 if test X"$CC_G_OPT" = X"" ; then
5840         CC_G_OPT='-g'
5841         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5842 fi
5843
5844 if test X"$CXX_G_OPT" = X"" ; then
5845         CXX_G_OPT='-g'
5846         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5847 fi
5848
5849 echo "$as_me:5849: checking for default loader flags" >&5
5850 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5851 case $DFT_LWR_MODEL in
5852 (libtool) LD_MODEL=''   ;;
5853 (normal)  LD_MODEL=''   ;;
5854 (debug)   LD_MODEL=$CC_G_OPT ;;
5855 (profile) LD_MODEL='-pg';;
5856 (shared)  LD_MODEL=''   ;;
5857 esac
5858 echo "$as_me:5858: result: $LD_MODEL" >&5
5859 echo "${ECHO_T}$LD_MODEL" >&6
5860
5861 case $DFT_LWR_MODEL in
5862 (shared)
5863
5864 echo "$as_me:5864: checking if rpath option should be used" >&5
5865 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5866
5867 # Check whether --enable-rpath or --disable-rpath was given.
5868 if test "${enable_rpath+set}" = set; then
5869   enableval="$enable_rpath"
5870   cf_cv_enable_rpath=$enableval
5871 else
5872   cf_cv_enable_rpath=no
5873 fi;
5874 echo "$as_me:5874: result: $cf_cv_enable_rpath" >&5
5875 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5876
5877 echo "$as_me:5877: checking if shared libraries should be relinked during install" >&5
5878 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5879
5880 # Check whether --enable-relink or --disable-relink was given.
5881 if test "${enable_relink+set}" = set; then
5882   enableval="$enable_relink"
5883   cf_cv_do_relink=$enableval
5884 else
5885   cf_cv_do_relink=yes
5886 fi;
5887 echo "$as_me:5887: result: $cf_cv_do_relink" >&5
5888 echo "${ECHO_T}$cf_cv_do_relink" >&6
5889         ;;
5890 esac
5891
5892 # we will build libraries one-level down.
5893 rel_builddir=..
5894
5895 LD_RPATH_OPT=
5896 echo "$as_me:5896: checking for an rpath option" >&5
5897 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5898 case $cf_cv_system_name in
5899 (irix*)
5900         if test "$GCC" = yes; then
5901                 LD_RPATH_OPT="-Wl,-rpath,"
5902         else
5903                 LD_RPATH_OPT="-rpath "
5904         fi
5905         ;;
5906 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5907         LD_RPATH_OPT="-Wl,-rpath,"
5908         ;;
5909 (openbsd[2-9].*|mirbsd*)
5910         LD_RPATH_OPT="-Wl,-rpath,"
5911         ;;
5912 (dragonfly*)
5913         LD_RPATH_OPT="-rpath "
5914         ;;
5915 (netbsd*)
5916         LD_RPATH_OPT="-Wl,-rpath,"
5917         ;;
5918 (osf*|mls+*)
5919         LD_RPATH_OPT="-rpath "
5920         ;;
5921 (solaris2*)
5922         LD_RPATH_OPT="-R"
5923         ;;
5924 (*)
5925         ;;
5926 esac
5927 echo "$as_me:5927: result: $LD_RPATH_OPT" >&5
5928 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5929
5930 case "x$LD_RPATH_OPT" in
5931 (x-R*)
5932         echo "$as_me:5932: checking if we need a space after rpath option" >&5
5933 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5934         cf_save_LIBS="$LIBS"
5935
5936 cf_add_libs="${LD_RPATH_OPT}$libdir"
5937 # Filter out duplicates - this happens with badly-designed ".pc" files...
5938 for cf_add_1lib in $LIBS
5939 do
5940         for cf_add_2lib in $cf_add_libs
5941         do
5942                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5943                 then
5944                         cf_add_1lib=
5945                         break
5946                 fi
5947         done
5948         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5949 done
5950 LIBS="$cf_add_libs"
5951
5952         cat >conftest.$ac_ext <<_ACEOF
5953 #line 5953 "configure"
5954 #include "confdefs.h"
5955
5956 int
5957 main ()
5958 {
5959
5960   ;
5961   return 0;
5962 }
5963 _ACEOF
5964 rm -f conftest.$ac_objext conftest$ac_exeext
5965 if { (eval echo "$as_me:5965: \"$ac_link\"") >&5
5966   (eval $ac_link) 2>&5
5967   ac_status=$?
5968   echo "$as_me:5968: \$? = $ac_status" >&5
5969   (exit $ac_status); } &&
5970          { ac_try='test -s conftest$ac_exeext'
5971   { (eval echo "$as_me:5971: \"$ac_try\"") >&5
5972   (eval $ac_try) 2>&5
5973   ac_status=$?
5974   echo "$as_me:5974: \$? = $ac_status" >&5
5975   (exit $ac_status); }; }; then
5976   cf_rpath_space=no
5977 else
5978   echo "$as_me: failed program was:" >&5
5979 cat conftest.$ac_ext >&5
5980 cf_rpath_space=yes
5981 fi
5982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5983         LIBS="$cf_save_LIBS"
5984         echo "$as_me:5984: result: $cf_rpath_space" >&5
5985 echo "${ECHO_T}$cf_rpath_space" >&6
5986         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5987         ;;
5988 esac
5989
5990         RM_SHARED_OPTS=
5991         LOCAL_LDFLAGS=
5992         LOCAL_LDFLAGS2=
5993         LD_SHARED_OPTS=
5994         INSTALL_LIB="-m 644"
5995         : ${rel_builddir:=.}
5996
5997         shlibdir=$libdir
5998
5999         MAKE_DLLS="#"
6000
6001         cf_cv_do_symlinks=no
6002         cf_ld_rpath_opt=
6003         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6004
6005         echo "$as_me:6005: checking if release/abi version should be used for shared libs" >&5
6006 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6007
6008 # Check whether --with-shlib-version or --without-shlib-version was given.
6009 if test "${with_shlib_version+set}" = set; then
6010   withval="$with_shlib_version"
6011   test -z "$withval" && withval=auto
6012         case $withval in
6013         (yes)
6014                 cf_cv_shlib_version=auto
6015                 ;;
6016         (rel|abi|auto)
6017                 cf_cv_shlib_version=$withval
6018                 ;;
6019         (*)
6020                 echo "$as_me:6020: result: $withval" >&5
6021 echo "${ECHO_T}$withval" >&6
6022                 { { echo "$as_me:6022: error: option value must be one of: rel, abi, or auto" >&5
6023 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6024    { (exit 1); exit 1; }; }
6025                 ;;
6026         esac
6027
6028 else
6029   cf_cv_shlib_version=auto
6030 fi;
6031         echo "$as_me:6031: result: $cf_cv_shlib_version" >&5
6032 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6033
6034         cf_cv_rm_so_locs=no
6035         cf_try_cflags=
6036
6037         # Some less-capable ports of gcc support only -fpic
6038         CC_SHARED_OPTS=
6039
6040         cf_try_fPIC=no
6041         if test "$GCC" = yes
6042         then
6043                 cf_try_fPIC=yes
6044         else
6045                 case $cf_cv_system_name in
6046                 (*linux*)       # e.g., PGI compiler
6047                         cf_try_fPIC=yes
6048                         ;;
6049                 esac
6050         fi
6051
6052         if test "$cf_try_fPIC" = yes
6053         then
6054                 echo "$as_me:6054: checking which $CC option to use" >&5
6055 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6056                 cf_save_CFLAGS="$CFLAGS"
6057                 for CC_SHARED_OPTS in -fPIC -fpic ''
6058                 do
6059                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6060                         cat >conftest.$ac_ext <<_ACEOF
6061 #line 6061 "configure"
6062 #include "confdefs.h"
6063 #include <stdio.h>
6064 int
6065 main ()
6066 {
6067 int x = 1
6068   ;
6069   return 0;
6070 }
6071 _ACEOF
6072 rm -f conftest.$ac_objext
6073 if { (eval echo "$as_me:6073: \"$ac_compile\"") >&5
6074   (eval $ac_compile) 2>&5
6075   ac_status=$?
6076   echo "$as_me:6076: \$? = $ac_status" >&5
6077   (exit $ac_status); } &&
6078          { ac_try='test -s conftest.$ac_objext'
6079   { (eval echo "$as_me:6079: \"$ac_try\"") >&5
6080   (eval $ac_try) 2>&5
6081   ac_status=$?
6082   echo "$as_me:6082: \$? = $ac_status" >&5
6083   (exit $ac_status); }; }; then
6084   break
6085 else
6086   echo "$as_me: failed program was:" >&5
6087 cat conftest.$ac_ext >&5
6088 fi
6089 rm -f conftest.$ac_objext conftest.$ac_ext
6090                 done
6091                 echo "$as_me:6091: result: $CC_SHARED_OPTS" >&5
6092 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6093                 CFLAGS="$cf_save_CFLAGS"
6094         fi
6095
6096         cf_cv_shlib_version_infix=no
6097
6098         case $cf_cv_system_name in
6099         (aix4.3-9*|aix[5-7]*)
6100                 if test "$GCC" = yes; then
6101                         CC_SHARED_OPTS='-Wl,-brtl'
6102                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6103                 else
6104                         CC_SHARED_OPTS='-brtl'
6105                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6106                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6107                 fi
6108                 ;;
6109         (beos*)
6110                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6111                 ;;
6112         (cygwin*)
6113                 CC_SHARED_OPTS=
6114                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6115                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6116                 cf_cv_shlib_version=cygdll
6117                 cf_cv_shlib_version_infix=cygdll
6118                 shlibdir=$bindir
6119                 MAKE_DLLS=
6120                 cat >mk_shared_lib.sh <<-CF_EOF
6121                 #!$SHELL
6122                 SHARED_LIB=\$1
6123                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6124                 shift
6125                 cat <<-EOF
6126                 Linking shared library
6127                 ** SHARED_LIB \$SHARED_LIB
6128                 ** IMPORT_LIB \$IMPORT_LIB
6129 EOF
6130                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6131 CF_EOF
6132                 chmod +x mk_shared_lib.sh
6133                 ;;
6134         (msys*)
6135                 CC_SHARED_OPTS=
6136                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6137                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6138                 cf_cv_shlib_version=msysdll
6139                 cf_cv_shlib_version_infix=msysdll
6140                 shlibdir=$bindir
6141                 MAKE_DLLS=
6142                 cat >mk_shared_lib.sh <<-CF_EOF
6143                 #!$SHELL
6144                 SHARED_LIB=\$1
6145                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6146                 shift
6147                 cat <<-EOF
6148                 Linking shared library
6149                 ** SHARED_LIB \$SHARED_LIB
6150                 ** IMPORT_LIB \$IMPORT_LIB
6151 EOF
6152                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6153 CF_EOF
6154                 chmod +x mk_shared_lib.sh
6155                 ;;
6156         (darwin*)
6157                 cf_try_cflags="no-cpp-precomp"
6158                 CC_SHARED_OPTS="-dynamic"
6159                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6160                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6161                 cf_cv_shlib_version_infix=yes
6162                 echo "$as_me:6162: checking if ld -search_paths_first works" >&5
6163 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6164 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6165   echo $ECHO_N "(cached) $ECHO_C" >&6
6166 else
6167
6168                         cf_save_LDFLAGS=$LDFLAGS
6169                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6170                         cat >conftest.$ac_ext <<_ACEOF
6171 #line 6171 "configure"
6172 #include "confdefs.h"
6173
6174 int
6175 main ()
6176 {
6177 int i;
6178   ;
6179   return 0;
6180 }
6181 _ACEOF
6182 rm -f conftest.$ac_objext conftest$ac_exeext
6183 if { (eval echo "$as_me:6183: \"$ac_link\"") >&5
6184   (eval $ac_link) 2>&5
6185   ac_status=$?
6186   echo "$as_me:6186: \$? = $ac_status" >&5
6187   (exit $ac_status); } &&
6188          { ac_try='test -s conftest$ac_exeext'
6189   { (eval echo "$as_me:6189: \"$ac_try\"") >&5
6190   (eval $ac_try) 2>&5
6191   ac_status=$?
6192   echo "$as_me:6192: \$? = $ac_status" >&5
6193   (exit $ac_status); }; }; then
6194   cf_cv_ldflags_search_paths_first=yes
6195 else
6196   echo "$as_me: failed program was:" >&5
6197 cat conftest.$ac_ext >&5
6198 cf_cv_ldflags_search_paths_first=no
6199 fi
6200 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6201                                 LDFLAGS=$cf_save_LDFLAGS
6202 fi
6203 echo "$as_me:6203: result: $cf_cv_ldflags_search_paths_first" >&5
6204 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6205                 if test $cf_cv_ldflags_search_paths_first = yes; then
6206                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6207                 fi
6208                 ;;
6209         (hpux[7-8]*)
6210                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6211                 if test "$GCC" != yes; then
6212                         CC_SHARED_OPTS='+Z'
6213                 fi
6214                 MK_SHARED_LIB='${LD} -b -o $@'
6215                 INSTALL_LIB="-m 555"
6216                 ;;
6217         (hpux*)
6218                 # (tested with gcc 2.7.2 -- I don't have c89)
6219                 if test "$GCC" = yes; then
6220                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6221                 else
6222                         CC_SHARED_OPTS='+Z'
6223                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6224                 fi
6225                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6226                 # HP-UX shared libraries must be executable, and should be
6227                 # readonly to exploit a quirk in the memory manager.
6228                 INSTALL_LIB="-m 555"
6229                 ;;
6230         (interix*)
6231                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6232                 if test "$cf_cv_shlib_version" = rel; then
6233                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6234                 else
6235                         cf_shared_soname='`basename `'
6236                 fi
6237                 CC_SHARED_OPTS=
6238                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6239                 ;;
6240         (irix*)
6241                 if test "$cf_cv_enable_rpath" = yes ; then
6242                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6243                 fi
6244                 # tested with IRIX 5.2 and 'cc'.
6245                 if test "$GCC" != yes; then
6246                         CC_SHARED_OPTS='-KPIC'
6247                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6248                 else
6249                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6250                 fi
6251                 cf_cv_rm_so_locs=yes
6252                 ;;
6253         (linux*|gnu*|k*bsd*-gnu)
6254                 if test "$DFT_LWR_MODEL" = "shared" ; then
6255                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6256                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6257                 fi
6258                 if test "$cf_cv_enable_rpath" = yes ; then
6259                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6260                 fi
6261
6262         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6263         if test "$cf_cv_shlib_version" = rel; then
6264                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6265         else
6266                 cf_cv_shared_soname='`basename $@`'
6267         fi
6268
6269                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6270                 ;;
6271         (mingw*)
6272                 cf_cv_shlib_version=mingw
6273                 cf_cv_shlib_version_infix=mingw
6274                 shlibdir=$bindir
6275                 MAKE_DLLS=
6276                 if test "$DFT_LWR_MODEL" = "shared" ; then
6277                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6278                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6279                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6280                 fi
6281                 CC_SHARED_OPTS=
6282                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6283                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6284                 cat >mk_shared_lib.sh <<-CF_EOF
6285                 #!$SHELL
6286                 SHARED_LIB=\$1
6287                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6288                 shift
6289                 cat <<-EOF
6290                 Linking shared library
6291                 ** SHARED_LIB \$SHARED_LIB
6292                 ** IMPORT_LIB \$IMPORT_LIB
6293 EOF
6294                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6295 CF_EOF
6296                 chmod +x mk_shared_lib.sh
6297                 ;;
6298         (openbsd[2-9].*|mirbsd*)
6299                 if test "$DFT_LWR_MODEL" = "shared" ; then
6300                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6301                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6302                 fi
6303                 if test "$cf_cv_enable_rpath" = yes ; then
6304                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6305                 fi
6306                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6307
6308         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6309         if test "$cf_cv_shlib_version" = rel; then
6310                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6311         else
6312                 cf_cv_shared_soname='`basename $@`'
6313         fi
6314
6315                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6316                 ;;
6317         (nto-qnx*|openbsd*|freebsd[12].*)
6318                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6319                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6320                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6321                 ;;
6322         (dragonfly*|freebsd*)
6323                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6324                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6325                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6326                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6327                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6328                 fi
6329
6330         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6331         if test "$cf_cv_shlib_version" = rel; then
6332                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6333         else
6334                 cf_cv_shared_soname='`basename $@`'
6335         fi
6336
6337                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6338                 ;;
6339         (netbsd*)
6340                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6341                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6342                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6343                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6344                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6345                         if test "$cf_cv_shlib_version" = auto; then
6346                         if test -f /usr/libexec/ld.elf_so; then
6347                                 cf_cv_shlib_version=abi
6348                         else
6349                                 cf_cv_shlib_version=rel
6350                         fi
6351                         fi
6352
6353         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6354         if test "$cf_cv_shlib_version" = rel; then
6355                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6356         else
6357                 cf_cv_shared_soname='`basename $@`'
6358         fi
6359
6360                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6361                 else
6362                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6363                 fi
6364                 ;;
6365         (osf*|mls+*)
6366                 # tested with OSF/1 V3.2 and 'cc'
6367                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6368                 # link with shared libs).
6369                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6370                 case $host_os in
6371                 (osf4*)
6372                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6373                         ;;
6374                 esac
6375                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6376                 if test "$DFT_LWR_MODEL" = "shared" ; then
6377                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6378                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6379                 fi
6380                 cf_cv_rm_so_locs=yes
6381                 ;;
6382         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6383                 # tested with osr5.0.5
6384                 if test "$GCC" != yes; then
6385                         CC_SHARED_OPTS='-belf -KPIC'
6386                 fi
6387                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6388                 if test "$cf_cv_enable_rpath" = yes ; then
6389                         # only way is to set LD_RUN_PATH but no switch for it
6390                         RUN_PATH=$libdir
6391                 fi
6392                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6393                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6394                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6395                 ;;
6396         (sunos4*)
6397                 # tested with SunOS 4.1.1 and gcc 2.7.0
6398                 if test "$GCC" != yes; then
6399                         CC_SHARED_OPTS='-KPIC'
6400                 fi
6401                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6402                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6403                 ;;
6404         (solaris2*)
6405                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6406                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6407                 if test "$DFT_LWR_MODEL" = "shared" ; then
6408                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6409                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6410                 fi
6411                 if test "$cf_cv_enable_rpath" = yes ; then
6412                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6413                 fi
6414
6415         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6416         if test "$cf_cv_shlib_version" = rel; then
6417                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6418         else
6419                 cf_cv_shared_soname='`basename $@`'
6420         fi
6421
6422                 if test "$GCC" != yes; then
6423                         cf_save_CFLAGS="$CFLAGS"
6424                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6425                         do
6426                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6427                                 cat >conftest.$ac_ext <<_ACEOF
6428 #line 6428 "configure"
6429 #include "confdefs.h"
6430 #include <stdio.h>
6431 int
6432 main ()
6433 {
6434 printf("Hello\n");
6435   ;
6436   return 0;
6437 }
6438 _ACEOF
6439 rm -f conftest.$ac_objext
6440 if { (eval echo "$as_me:6440: \"$ac_compile\"") >&5
6441   (eval $ac_compile) 2>&5
6442   ac_status=$?
6443   echo "$as_me:6443: \$? = $ac_status" >&5
6444   (exit $ac_status); } &&
6445          { ac_try='test -s conftest.$ac_objext'
6446   { (eval echo "$as_me:6446: \"$ac_try\"") >&5
6447   (eval $ac_try) 2>&5
6448   ac_status=$?
6449   echo "$as_me:6449: \$? = $ac_status" >&5
6450   (exit $ac_status); }; }; then
6451   break
6452 else
6453   echo "$as_me: failed program was:" >&5
6454 cat conftest.$ac_ext >&5
6455 fi
6456 rm -f conftest.$ac_objext conftest.$ac_ext
6457                         done
6458                         CFLAGS="$cf_save_CFLAGS"
6459                         CC_SHARED_OPTS=$cf_shared_opts
6460                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6461                 else
6462                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6463                 fi
6464                 ;;
6465         (sysv5uw7*|unix_sv*)
6466                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6467                 if test "$GCC" != yes; then
6468                         CC_SHARED_OPTS='-KPIC'
6469                 fi
6470                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6471                 ;;
6472         (*)
6473                 CC_SHARED_OPTS='unknown'
6474                 MK_SHARED_LIB='echo unknown'
6475                 ;;
6476         esac
6477
6478         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6479         case "$cf_cv_shlib_version" in
6480         (rel|abi)
6481                 case "$MK_SHARED_LIB" in
6482                 (*'-o $@')
6483                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6484                         ;;
6485                 (*)
6486                         { echo "$as_me:6486: WARNING: ignored --with-shlib-version" >&5
6487 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6488                         ;;
6489                 esac
6490                 ;;
6491         esac
6492
6493         if test -n "$cf_try_cflags"
6494         then
6495 cat > conftest.$ac_ext <<EOF
6496 #line 6496 "${as_me:-configure}"
6497 #include <stdio.h>
6498 int main(int argc, char *argv[])
6499 {
6500         printf("hello\n");
6501         return (argv[argc-1] == 0) ;
6502 }
6503 EOF
6504                 cf_save_CFLAGS="$CFLAGS"
6505                 for cf_opt in $cf_try_cflags
6506                 do
6507                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6508                         echo "$as_me:6508: checking if CFLAGS option -$cf_opt works" >&5
6509 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6510                         if { (eval echo "$as_me:6510: \"$ac_compile\"") >&5
6511   (eval $ac_compile) 2>&5
6512   ac_status=$?
6513   echo "$as_me:6513: \$? = $ac_status" >&5
6514   (exit $ac_status); }; then
6515                                 echo "$as_me:6515: result: yes" >&5
6516 echo "${ECHO_T}yes" >&6
6517                                 cf_save_CFLAGS="$CFLAGS"
6518                         else
6519                                 echo "$as_me:6519: result: no" >&5
6520 echo "${ECHO_T}no" >&6
6521                         fi
6522                 done
6523                 CFLAGS="$cf_save_CFLAGS"
6524         fi
6525
6526         # RPATH_LIST is a colon-separated list of directories
6527         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6528         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6529
6530         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6531
6532         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6533
6534 echo "${as_me:-configure}:6534: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6535
6536         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6537
6538 echo "${as_me:-configure}:6538: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6539
6540 for model in $cf_list_models; do
6541         case $model in
6542         (libtool)
6543
6544 echo "$as_me:6544: checking for additional libtool options" >&5
6545 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6546
6547 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6548 if test "${with_libtool_opts+set}" = set; then
6549   withval="$with_libtool_opts"
6550   with_libtool_opts=$withval
6551 else
6552   with_libtool_opts=no
6553 fi;
6554 echo "$as_me:6554: result: $with_libtool_opts" >&5
6555 echo "${ECHO_T}$with_libtool_opts" >&6
6556
6557 case .$with_libtool_opts in
6558 (.yes|.no|.)
6559         ;;
6560 (*)
6561         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6562         ;;
6563 esac
6564
6565 echo "$as_me:6565: checking if exported-symbols file should be used" >&5
6566 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6567
6568 # Check whether --with-export-syms or --without-export-syms was given.
6569 if test "${with_export_syms+set}" = set; then
6570   withval="$with_export_syms"
6571   with_export_syms=$withval
6572 else
6573   with_export_syms=no
6574 fi;
6575 if test "x$with_export_syms" = xyes
6576 then
6577         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6578
6579 fi
6580 echo "$as_me:6580: result: $with_export_syms" >&5
6581 echo "${ECHO_T}$with_export_syms" >&6
6582 if test "x$with_export_syms" != xno
6583 then
6584         EXPORT_SYMS="-export-symbols $with_export_syms"
6585
6586 fi
6587
6588                 ;;
6589         (shared)
6590                 if test "$CC_SHARED_OPTS" = "unknown"; then
6591                         { { echo "$as_me:6591: error: Shared libraries are not supported in this version" >&5
6592 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6593    { (exit 1); exit 1; }; }
6594                 fi
6595                 # workaround for inept transition to PIE vs PIC...
6596                 echo "$as_me:6596: checking if current CFLAGS link properly" >&5
6597 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6598                 cat >conftest.$ac_ext <<_ACEOF
6599 #line 6599 "configure"
6600 #include "confdefs.h"
6601 #include <stdio.h>
6602 int
6603 main ()
6604 {
6605 printf("Hello work\n");
6606   ;
6607   return 0;
6608 }
6609 _ACEOF
6610 rm -f conftest.$ac_objext conftest$ac_exeext
6611 if { (eval echo "$as_me:6611: \"$ac_link\"") >&5
6612   (eval $ac_link) 2>&5
6613   ac_status=$?
6614   echo "$as_me:6614: \$? = $ac_status" >&5
6615   (exit $ac_status); } &&
6616          { ac_try='test -s conftest$ac_exeext'
6617   { (eval echo "$as_me:6617: \"$ac_try\"") >&5
6618   (eval $ac_try) 2>&5
6619   ac_status=$?
6620   echo "$as_me:6620: \$? = $ac_status" >&5
6621   (exit $ac_status); }; }; then
6622   cf_cflags_work=yes
6623 else
6624   echo "$as_me: failed program was:" >&5
6625 cat conftest.$ac_ext >&5
6626 cf_cflags_work=no
6627 fi
6628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6629                 echo "$as_me:6629: result: $cf_cflags_work" >&5
6630 echo "${ECHO_T}$cf_cflags_work" >&6
6631                 if test "$cf_cflags_work" = no
6632                 then
6633                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6634
6635 echo "${as_me:-configure}:6635: testing try to work around by appending shared-options ..." 1>&5
6636
6637                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6638                 fi
6639
6640 echo "$as_me:6640: checking if versioned-symbols file should be used" >&5
6641 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6642
6643 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6644 if test "${with_versioned_syms+set}" = set; then
6645   withval="$with_versioned_syms"
6646   with_versioned_syms=$withval
6647 else
6648   with_versioned_syms=no
6649 fi;
6650 if test "x$with_versioned_syms" = xyes
6651 then
6652         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6653
6654 fi
6655 echo "$as_me:6655: result: $with_versioned_syms" >&5
6656 echo "${ECHO_T}$with_versioned_syms" >&6
6657
6658 RESULTING_SYMS=
6659 VERSIONED_SYMS=
6660 WILDCARD_SYMS=
6661
6662 if test "x$with_versioned_syms" != xno
6663 then
6664         RESULTING_SYMS=$with_versioned_syms
6665         case "x$MK_SHARED_LIB" in
6666         (*-Wl,*)
6667                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6668                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6669                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6670
6671 echo "${as_me:-configure}:6671: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6672
6673                 ;;
6674         (*-dy\ *)
6675                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6676                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6677                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6678
6679 echo "${as_me:-configure}:6679: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6680
6681                 ;;
6682         (*)
6683                 { echo "$as_me:6683: WARNING: this system does not support versioned-symbols" >&5
6684 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6685                 ;;
6686         esac
6687
6688         # Linux ld can selectively override scope, e.g., of symbols beginning with
6689         # "_" by first declaring some as global, and then using a wildcard to
6690         # declare the others as local.  Some other loaders cannot do this.  Check
6691         # by constructing a (very) simple shared library and inspecting its
6692         # symbols.
6693         if test "x$VERSIONED_SYMS" != "x"
6694         then
6695                 echo "$as_me:6695: checking if wildcards can be used to selectively omit symbols" >&5
6696 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6697                 WILDCARD_SYMS=no
6698
6699                 # make sources
6700                 rm -f conftest.*
6701
6702                 cat >conftest.ver <<EOF
6703 module_1.0 {
6704 global:
6705         globalf1;
6706 local:
6707         localf1;
6708 };
6709 module_2.0 {
6710 global:
6711         globalf2;
6712 local:
6713         localf2;
6714         _*;
6715 } module_1.0;
6716 submodule_1.0 {
6717 global:
6718         subglobalf1;
6719         _ismissing;
6720 local:
6721         sublocalf1;
6722 };
6723 submodule_2.0 {
6724 global:
6725         subglobalf2;
6726 local:
6727         sublocalf2;
6728         _*;
6729 } submodule_1.0;
6730 EOF
6731                 cat >conftest.$ac_ext <<EOF
6732 #line 6732 "configure"
6733 int     _ismissing(void) { return 1; }
6734 int     _localf1(void) { return 1; }
6735 int     _localf2(void) { return 2; }
6736 int     globalf1(void) { return 1; }
6737 int     globalf2(void) { return 2; }
6738 int     _sublocalf1(void) { return 1; }
6739 int     _sublocalf2(void) { return 2; }
6740 int     subglobalf1(void) { return 1; }
6741 int     subglobalf2(void) { return 2; }
6742 EOF
6743                 cat >conftest.mk <<EOF
6744 CC=${CC}
6745 CFLAGS=${CFLAGS}
6746 CPPFLAGS=${CPPFLAGS}
6747 LDFLAGS=${LDFLAGS}
6748 LIBS=${LIBS}
6749 VERSIONED_SYMS=${VERSIONED_SYMS}
6750 RESULTING_SYMS=conftest.ver
6751 MK_SHARED_LIB=${MK_SHARED_LIB}
6752 conftest.so: conftest.$ac_cv_objext
6753                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6754 EOF
6755
6756                 # compile source, make library
6757                 if make -f conftest.mk 2>&5 >/dev/null
6758                 then
6759                         # test for missing symbol in either Data or Text section
6760                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6761                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6762                 fi
6763                 echo "$as_me:6763: result: $WILDCARD_SYMS" >&5
6764 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6765                 rm -f conftest.*
6766         fi
6767 fi
6768
6769                 ;;
6770         esac
6771 done
6772
6773 # pretend that ncurses==ncursesw==ncursest
6774 echo "$as_me:6774: checking if you want to disable library suffixes" >&5
6775 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6776
6777 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6778 if test "${enable_lib_suffixes+set}" = set; then
6779   enableval="$enable_lib_suffixes"
6780   test "$enableval" != no && enableval=yes
6781         if test "$enableval" != "yes" ; then
6782     disable_lib_suffixes=yes
6783         else
6784                 disable_lib_suffixes=no
6785         fi
6786 else
6787   enableval=yes
6788         disable_lib_suffixes=no
6789
6790 fi;
6791 echo "$as_me:6791: result: $disable_lib_suffixes" >&5
6792 echo "${ECHO_T}$disable_lib_suffixes" >&6
6793
6794 ### If we're building with rpath, try to link non-standard libs that way too.
6795 if test "$DFT_LWR_MODEL" = "shared"; then
6796
6797 echo "$as_me:6797: checking if rpath-hack should be disabled" >&5
6798 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6799
6800 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6801 if test "${enable_rpath_hack+set}" = set; then
6802   enableval="$enable_rpath_hack"
6803   test "$enableval" != no && enableval=yes
6804         if test "$enableval" != "yes" ; then
6805     cf_disable_rpath_hack=yes
6806         else
6807                 cf_disable_rpath_hack=no
6808         fi
6809 else
6810   enableval=yes
6811         cf_disable_rpath_hack=no
6812
6813 fi;
6814 echo "$as_me:6814: result: $cf_disable_rpath_hack" >&5
6815 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6816 if test "$cf_disable_rpath_hack" = no ; then
6817
6818 echo "$as_me:6818: checking for updated LDFLAGS" >&5
6819 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6820 if test -n "$LD_RPATH_OPT" ; then
6821         echo "$as_me:6821: result: maybe" >&5
6822 echo "${ECHO_T}maybe" >&6
6823
6824         for ac_prog in ldd
6825 do
6826   # Extract the first word of "$ac_prog", so it can be a program name with args.
6827 set dummy $ac_prog; ac_word=$2
6828 echo "$as_me:6828: checking for $ac_word" >&5
6829 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6830 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6831   echo $ECHO_N "(cached) $ECHO_C" >&6
6832 else
6833   if test -n "$cf_ldd_prog"; then
6834   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6835 else
6836   ac_save_IFS=$IFS; IFS=$ac_path_separator
6837 ac_dummy="$PATH"
6838 for ac_dir in $ac_dummy; do
6839   IFS=$ac_save_IFS
6840   test -z "$ac_dir" && ac_dir=.
6841   $as_executable_p "$ac_dir/$ac_word" || continue
6842 ac_cv_prog_cf_ldd_prog="$ac_prog"
6843 echo "$as_me:6843: found $ac_dir/$ac_word" >&5
6844 break
6845 done
6846
6847 fi
6848 fi
6849 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6850 if test -n "$cf_ldd_prog"; then
6851   echo "$as_me:6851: result: $cf_ldd_prog" >&5
6852 echo "${ECHO_T}$cf_ldd_prog" >&6
6853 else
6854   echo "$as_me:6854: result: no" >&5
6855 echo "${ECHO_T}no" >&6
6856 fi
6857
6858   test -n "$cf_ldd_prog" && break
6859 done
6860 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6861
6862         cf_rpath_list="/usr/lib /lib"
6863         if test "$cf_ldd_prog" != no
6864         then
6865                 cf_rpath_oops=
6866
6867 cat >conftest.$ac_ext <<_ACEOF
6868 #line 6868 "configure"
6869 #include "confdefs.h"
6870 #include <stdio.h>
6871 int
6872 main ()
6873 {
6874 printf("Hello");
6875   ;
6876   return 0;
6877 }
6878 _ACEOF
6879 rm -f conftest.$ac_objext conftest$ac_exeext
6880 if { (eval echo "$as_me:6880: \"$ac_link\"") >&5
6881   (eval $ac_link) 2>&5
6882   ac_status=$?
6883   echo "$as_me:6883: \$? = $ac_status" >&5
6884   (exit $ac_status); } &&
6885          { ac_try='test -s conftest$ac_exeext'
6886   { (eval echo "$as_me:6886: \"$ac_try\"") >&5
6887   (eval $ac_try) 2>&5
6888   ac_status=$?
6889   echo "$as_me:6889: \$? = $ac_status" >&5
6890   (exit $ac_status); }; }; then
6891   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6892                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6893 else
6894   echo "$as_me: failed program was:" >&5
6895 cat conftest.$ac_ext >&5
6896 fi
6897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6898
6899                 # If we passed the link-test, but get a "not found" on a given library,
6900                 # this could be due to inept reconfiguration of gcc to make it only
6901                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6902                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6903                 # /usr/local libraries.
6904                 if test -n "$cf_rpath_oops"
6905                 then
6906                         for cf_rpath_src in $cf_rpath_oops
6907                         do
6908                                 for cf_rpath_dir in \
6909                                         /usr/local \
6910                                         /usr/pkg \
6911                                         /opt/sfw
6912                                 do
6913                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6914                                         then
6915                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6916
6917 echo "${as_me:-configure}:6917: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6918
6919                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6920                                                 break
6921                                         fi
6922                                 done
6923                         done
6924                 fi
6925         fi
6926
6927         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6928
6929 echo "${as_me:-configure}:6929: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6930
6931 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6932
6933 echo "${as_me:-configure}:6933: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6934
6935 cf_rpath_dst=
6936 for cf_rpath_src in $LDFLAGS
6937 do
6938         case $cf_rpath_src in
6939         (-L*)
6940
6941                 # check if this refers to a directory which we will ignore
6942                 cf_rpath_skip=no
6943                 if test -n "$cf_rpath_list"
6944                 then
6945                         for cf_rpath_item in $cf_rpath_list
6946                         do
6947                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6948                                 then
6949                                         cf_rpath_skip=yes
6950                                         break
6951                                 fi
6952                         done
6953                 fi
6954
6955                 if test "$cf_rpath_skip" = no
6956                 then
6957                         # transform the option
6958                         if test "$LD_RPATH_OPT" = "-R " ; then
6959                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6960                         else
6961                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6962                         fi
6963
6964                         # if we have not already added this, add it now
6965                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6966                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6967                         then
6968                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6969
6970 echo "${as_me:-configure}:6970: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6971
6972                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6973                         fi
6974                 fi
6975                 ;;
6976         esac
6977         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6978 done
6979 LDFLAGS=$cf_rpath_dst
6980
6981 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6982
6983 echo "${as_me:-configure}:6983: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6984
6985 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6986
6987 echo "${as_me:-configure}:6987: testing ...checking LIBS $LIBS ..." 1>&5
6988
6989 cf_rpath_dst=
6990 for cf_rpath_src in $LIBS
6991 do
6992         case $cf_rpath_src in
6993         (-L*)
6994
6995                 # check if this refers to a directory which we will ignore
6996                 cf_rpath_skip=no
6997                 if test -n "$cf_rpath_list"
6998                 then
6999                         for cf_rpath_item in $cf_rpath_list
7000                         do
7001                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7002                                 then
7003                                         cf_rpath_skip=yes
7004                                         break
7005                                 fi
7006                         done
7007                 fi
7008
7009                 if test "$cf_rpath_skip" = no
7010                 then
7011                         # transform the option
7012                         if test "$LD_RPATH_OPT" = "-R " ; then
7013                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7014                         else
7015                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7016                         fi
7017
7018                         # if we have not already added this, add it now
7019                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7020                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7021                         then
7022                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7023
7024 echo "${as_me:-configure}:7024: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7025
7026                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7027                         fi
7028                 fi
7029                 ;;
7030         esac
7031         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7032 done
7033 LIBS=$cf_rpath_dst
7034
7035 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7036
7037 echo "${as_me:-configure}:7037: testing ...checked LIBS $LIBS ..." 1>&5
7038
7039         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7040
7041 echo "${as_me:-configure}:7041: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7042
7043 else
7044         echo "$as_me:7044: result: no" >&5
7045 echo "${ECHO_T}no" >&6
7046 fi
7047
7048 fi
7049
7050 fi
7051
7052 ###############################################################################
7053
7054 ###     use option --with-extra-suffix to append suffix to headers and libraries
7055 echo "$as_me:7055: checking if you wish to append extra suffix to header/library paths" >&5
7056 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7057 EXTRA_SUFFIX=
7058
7059 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7060 if test "${with_extra_suffix+set}" = set; then
7061   withval="$with_extra_suffix"
7062   case x$withval in
7063         (no)
7064                 ;;
7065         (xyes|x)
7066                 EXTRA_SUFFIX=$cf_cv_abi_version
7067                 ;;
7068         (*)
7069                 EXTRA_SUFFIX=$withval
7070                 ;;
7071         esac
7072
7073 fi;
7074 echo "$as_me:7074: result: $EXTRA_SUFFIX" >&5
7075 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7076
7077 ###     use option --disable-overwrite to leave out the link to -lcurses
7078 echo "$as_me:7078: checking if you wish to install ncurses overwriting curses" >&5
7079 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7080
7081 # Check whether --enable-overwrite or --disable-overwrite was given.
7082 if test "${enable_overwrite+set}" = set; then
7083   enableval="$enable_overwrite"
7084   with_overwrite=$enableval
7085 else
7086   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7087 fi;
7088 echo "$as_me:7088: result: $with_overwrite" >&5
7089 echo "${ECHO_T}$with_overwrite" >&6
7090
7091 echo "$as_me:7091: checking if external terminfo-database is used" >&5
7092 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7093
7094 # Check whether --enable-database or --disable-database was given.
7095 if test "${enable_database+set}" = set; then
7096   enableval="$enable_database"
7097   use_database=$enableval
7098 else
7099   use_database=yes
7100 fi;
7101 echo "$as_me:7101: result: $use_database" >&5
7102 echo "${ECHO_T}$use_database" >&6
7103
7104 case $host_os in
7105 (os2*)
7106         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7107         ;;
7108 (*)
7109         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7110         ;;
7111 esac
7112
7113 NCURSES_USE_DATABASE=0
7114 if test "$use_database" != no ; then
7115         NCURSES_USE_DATABASE=1
7116
7117         echo "$as_me:7117: checking which terminfo source-file will be installed" >&5
7118 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7119
7120 # Check whether --with-database or --without-database was given.
7121 if test "${with_database+set}" = set; then
7122   withval="$with_database"
7123   TERMINFO_SRC=$withval
7124 fi;
7125         echo "$as_me:7125: result: $TERMINFO_SRC" >&5
7126 echo "${ECHO_T}$TERMINFO_SRC" >&6
7127
7128         echo "$as_me:7128: checking whether to use hashed database instead of directory/tree" >&5
7129 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7130
7131 # Check whether --with-hashed-db or --without-hashed-db was given.
7132 if test "${with_hashed_db+set}" = set; then
7133   withval="$with_hashed_db"
7134
7135 else
7136   with_hashed_db=no
7137 fi;
7138         echo "$as_me:7138: result: $with_hashed_db" >&5
7139 echo "${ECHO_T}$with_hashed_db" >&6
7140 else
7141         with_hashed_db=no
7142 fi
7143
7144 echo "$as_me:7144: checking for list of fallback descriptions" >&5
7145 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7146
7147 # Check whether --with-fallbacks or --without-fallbacks was given.
7148 if test "${with_fallbacks+set}" = set; then
7149   withval="$with_fallbacks"
7150   with_fallback=$withval
7151 else
7152   with_fallback=
7153 fi;
7154 echo "$as_me:7154: result: $with_fallback" >&5
7155 echo "${ECHO_T}$with_fallback" >&6
7156 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7157
7158 echo "$as_me:7158: checking if you want modern xterm or antique" >&5
7159 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7160
7161 # Check whether --with-xterm-new or --without-xterm-new was given.
7162 if test "${with_xterm_new+set}" = set; then
7163   withval="$with_xterm_new"
7164   with_xterm_new=$withval
7165 else
7166   with_xterm_new=yes
7167 fi;
7168 case $with_xterm_new in
7169 (no) with_xterm_new=xterm-old;;
7170 (*)      with_xterm_new=xterm-new;;
7171 esac
7172 echo "$as_me:7172: result: $with_xterm_new" >&5
7173 echo "${ECHO_T}$with_xterm_new" >&6
7174 WHICH_XTERM=$with_xterm_new
7175
7176 echo "$as_me:7176: checking if xterm backspace sends BS or DEL" >&5
7177 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7178
7179 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7180 if test "${with_xterm_kbs+set}" = set; then
7181   withval="$with_xterm_kbs"
7182   with_xterm_kbs=$withval
7183 else
7184   with_xterm_kbs=BS
7185 fi;
7186 case x$with_xterm_kbs in
7187 (xyes|xno|xBS|xbs|x8)
7188         with_xterm_kbs=BS
7189         ;;
7190 (xDEL|xdel|x127)
7191         with_xterm_kbs=DEL
7192         ;;
7193 (*)
7194         with_xterm_kbs=$withval
7195         ;;
7196 esac
7197 echo "$as_me:7197: result: $with_xterm_kbs" >&5
7198 echo "${ECHO_T}$with_xterm_kbs" >&6
7199 XTERM_KBS=$with_xterm_kbs
7200
7201 MAKE_TERMINFO=
7202 if test "$use_database" = no ; then
7203         TERMINFO="${datadir}/terminfo"
7204         MAKE_TERMINFO="#"
7205 else
7206
7207 echo "$as_me:7207: checking for list of terminfo directories" >&5
7208 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7209
7210 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7211 if test "${with_terminfo_dirs+set}" = set; then
7212   withval="$with_terminfo_dirs"
7213
7214 else
7215   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7216 fi;
7217 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7218 cf_dst_path=
7219 for cf_src_path in $withval
7220 do
7221
7222 if test "x$prefix" != xNONE; then
7223         cf_path_syntax="$prefix"
7224 else
7225         cf_path_syntax="$ac_default_prefix"
7226 fi
7227
7228 case ".$cf_src_path" in
7229 (.\$\(*\)*|.\'*\'*)
7230         ;;
7231 (..|./*|.\\*)
7232         ;;
7233 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7234         ;;
7235 (.\${*prefix}*|.\${*dir}*)
7236         eval cf_src_path="$cf_src_path"
7237         case ".$cf_src_path" in
7238         (.NONE/*)
7239                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7240                 ;;
7241         esac
7242         ;;
7243 (.no|.NONE/*)
7244         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7245         ;;
7246 (*)
7247         { { echo "$as_me:7247: error: expected a pathname, not \"$cf_src_path\"" >&5
7248 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7249    { (exit 1); exit 1; }; }
7250         ;;
7251 esac
7252
7253   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7254   cf_dst_path="${cf_dst_path}${cf_src_path}"
7255 done
7256 IFS="$ac_save_ifs"
7257
7258 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7259 # so we have to check/work around.  We do prefer the result of "eval"...
7260 eval cf_dst_eval="$cf_dst_path"
7261 case "x$cf_dst_eval" in
7262 (xNONE*)
7263         TERMINFO_DIRS=$cf_dst_path
7264         ;;
7265 (*)
7266         TERMINFO_DIRS="$cf_dst_eval"
7267         ;;
7268 esac
7269
7270 echo "$as_me:7270: result: $TERMINFO_DIRS" >&5
7271 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7272 test -n "$TERMINFO_DIRS" &&
7273 cat >>confdefs.h <<EOF
7274 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7275 EOF
7276
7277 echo "$as_me:7277: checking for default terminfo directory" >&5
7278 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7279
7280 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7281 if test "${with_default_terminfo_dir+set}" = set; then
7282   withval="$with_default_terminfo_dir"
7283
7284 else
7285   withval="${TERMINFO:-${datadir}/terminfo}"
7286 fi; if test -n "${datadir}/terminfo" ; then
7287
7288 if test "x$prefix" != xNONE; then
7289         cf_path_syntax="$prefix"
7290 else
7291         cf_path_syntax="$ac_default_prefix"
7292 fi
7293
7294 case ".$withval" in
7295 (.\$\(*\)*|.\'*\'*)
7296         ;;
7297 (..|./*|.\\*)
7298         ;;
7299 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7300         ;;
7301 (.\${*prefix}*|.\${*dir}*)
7302         eval withval="$withval"
7303         case ".$withval" in
7304         (.NONE/*)
7305                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7306                 ;;
7307         esac
7308         ;;
7309 (.no|.NONE/*)
7310         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7311         ;;
7312 (*)
7313         { { echo "$as_me:7313: error: expected a pathname, not \"$withval\"" >&5
7314 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7315    { (exit 1); exit 1; }; }
7316         ;;
7317 esac
7318
7319 fi
7320 eval TERMINFO="$withval"
7321
7322 echo "$as_me:7322: result: $TERMINFO" >&5
7323 echo "${ECHO_T}$TERMINFO" >&6
7324
7325 cat >>confdefs.h <<EOF
7326 #define TERMINFO "$TERMINFO"
7327 EOF
7328
7329 fi
7330
7331 ###     use option --disable-big-core to make tic run on small machines
7332 ###     We need 4Mb, check if we can allocate 50% more than that.
7333 echo "$as_me:7333: checking if big-core option selected" >&5
7334 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7335
7336 # Check whether --enable-big-core or --disable-big-core was given.
7337 if test "${enable_big_core+set}" = set; then
7338   enableval="$enable_big_core"
7339   with_big_core=$enableval
7340 else
7341   if test "$cross_compiling" = yes; then
7342   with_big_core=no
7343 else
7344   cat >conftest.$ac_ext <<_ACEOF
7345 #line 7345 "configure"
7346 #include "confdefs.h"
7347
7348 #include <stdlib.h>
7349 #include <string.h>
7350 int main() {
7351         unsigned long n = 6000000L;
7352         char *s = malloc(n);
7353         if (s != 0)
7354                 s[0] = s[n-1] = 0;
7355         ${cf_cv_main_return:-return}(s == 0);
7356 }
7357 _ACEOF
7358 rm -f conftest$ac_exeext
7359 if { (eval echo "$as_me:7359: \"$ac_link\"") >&5
7360   (eval $ac_link) 2>&5
7361   ac_status=$?
7362   echo "$as_me:7362: \$? = $ac_status" >&5
7363   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7364   { (eval echo "$as_me:7364: \"$ac_try\"") >&5
7365   (eval $ac_try) 2>&5
7366   ac_status=$?
7367   echo "$as_me:7367: \$? = $ac_status" >&5
7368   (exit $ac_status); }; }; then
7369   with_big_core=yes
7370 else
7371   echo "$as_me: program exited with status $ac_status" >&5
7372 echo "$as_me: failed program was:" >&5
7373 cat conftest.$ac_ext >&5
7374 with_big_core=no
7375 fi
7376 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7377 fi
7378 fi;
7379 echo "$as_me:7379: result: $with_big_core" >&5
7380 echo "${ECHO_T}$with_big_core" >&6
7381 test "x$with_big_core" = "xyes" &&
7382 cat >>confdefs.h <<\EOF
7383 #define HAVE_BIG_CORE 1
7384 EOF
7385
7386 ### ISO C only guarantees 512-char strings, we have tables which load faster
7387 ### when constructed using "big" strings.  More than the C compiler, the awk
7388 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7389 echo "$as_me:7389: checking if big-strings option selected" >&5
7390 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7391
7392 # Check whether --enable-big-strings or --disable-big-strings was given.
7393 if test "${enable_big_strings+set}" = set; then
7394   enableval="$enable_big_strings"
7395   with_big_strings=$enableval
7396 else
7397
7398         case x$AWK in
7399         (x)
7400                 eval with_big_strings=no
7401                 ;;
7402         (*)
7403                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7404                         | $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
7405                         eval with_big_strings=yes
7406                 else
7407                         eval with_big_strings=no
7408                 fi
7409                 ;;
7410         esac
7411
7412 fi;
7413 echo "$as_me:7413: result: $with_big_strings" >&5
7414 echo "${ECHO_T}$with_big_strings" >&6
7415
7416 USE_BIG_STRINGS=0
7417 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7418
7419 ###     use option --enable-termcap to compile in the termcap fallback support
7420 echo "$as_me:7420: checking if you want termcap-fallback support" >&5
7421 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7422
7423 # Check whether --enable-termcap or --disable-termcap was given.
7424 if test "${enable_termcap+set}" = set; then
7425   enableval="$enable_termcap"
7426   with_termcap=$enableval
7427 else
7428   with_termcap=no
7429 fi;
7430 echo "$as_me:7430: result: $with_termcap" >&5
7431 echo "${ECHO_T}$with_termcap" >&6
7432
7433 NCURSES_USE_TERMCAP=0
7434 if test "x$with_termcap" != "xyes" ; then
7435         if test "$use_database" = no ; then
7436                 if test -z "$with_fallback" ; then
7437                         { { echo "$as_me:7437: error: You have disabled the database w/o specifying fallbacks" >&5
7438 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7439    { (exit 1); exit 1; }; }
7440                 fi
7441         fi
7442
7443 cat >>confdefs.h <<\EOF
7444 #define PURE_TERMINFO 1
7445 EOF
7446
7447 else
7448
7449         if test "$with_ticlib" != no ; then
7450                 { { echo "$as_me:7450: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7451 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7452    { (exit 1); exit 1; }; }
7453         fi
7454
7455         NCURSES_USE_TERMCAP=1
7456         echo "$as_me:7456: checking for list of termcap files" >&5
7457 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7458
7459 # Check whether --with-termpath or --without-termpath was given.
7460 if test "${with_termpath+set}" = set; then
7461   withval="$with_termpath"
7462
7463 else
7464   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7465 fi;
7466 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7467 cf_dst_path=
7468 for cf_src_path in $withval
7469 do
7470
7471 if test "x$prefix" != xNONE; then
7472         cf_path_syntax="$prefix"
7473 else
7474         cf_path_syntax="$ac_default_prefix"
7475 fi
7476
7477 case ".$cf_src_path" in
7478 (.\$\(*\)*|.\'*\'*)
7479         ;;
7480 (..|./*|.\\*)
7481         ;;
7482 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7483         ;;
7484 (.\${*prefix}*|.\${*dir}*)
7485         eval cf_src_path="$cf_src_path"
7486         case ".$cf_src_path" in
7487         (.NONE/*)
7488                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7489                 ;;
7490         esac
7491         ;;
7492 (.no|.NONE/*)
7493         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7494         ;;
7495 (*)
7496         { { echo "$as_me:7496: error: expected a pathname, not \"$cf_src_path\"" >&5
7497 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7498    { (exit 1); exit 1; }; }
7499         ;;
7500 esac
7501
7502   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7503   cf_dst_path="${cf_dst_path}${cf_src_path}"
7504 done
7505 IFS="$ac_save_ifs"
7506
7507 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7508 # so we have to check/work around.  We do prefer the result of "eval"...
7509 eval cf_dst_eval="$cf_dst_path"
7510 case "x$cf_dst_eval" in
7511 (xNONE*)
7512         TERMPATH=$cf_dst_path
7513         ;;
7514 (*)
7515         TERMPATH="$cf_dst_eval"
7516         ;;
7517 esac
7518
7519         echo "$as_me:7519: result: $TERMPATH" >&5
7520 echo "${ECHO_T}$TERMPATH" >&6
7521         test -n "$TERMPATH" &&
7522 cat >>confdefs.h <<EOF
7523 #define TERMPATH "$TERMPATH"
7524 EOF
7525
7526         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7527         echo "$as_me:7527: checking if fast termcap-loader is needed" >&5
7528 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7529
7530 # Check whether --enable-getcap or --disable-getcap was given.
7531 if test "${enable_getcap+set}" = set; then
7532   enableval="$enable_getcap"
7533   with_getcap=$enableval
7534 else
7535   with_getcap=no
7536 fi;
7537         echo "$as_me:7537: result: $with_getcap" >&5
7538 echo "${ECHO_T}$with_getcap" >&6
7539         test "x$with_getcap" = "xyes" &&
7540 cat >>confdefs.h <<\EOF
7541 #define USE_GETCAP 1
7542 EOF
7543
7544         echo "$as_me:7544: checking if translated termcaps will be cached in ~/.terminfo" >&5
7545 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7546
7547 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7548 if test "${enable_getcap_cache+set}" = set; then
7549   enableval="$enable_getcap_cache"
7550   with_getcap_cache=$enableval
7551 else
7552   with_getcap_cache=no
7553 fi;
7554         echo "$as_me:7554: result: $with_getcap_cache" >&5
7555 echo "${ECHO_T}$with_getcap_cache" >&6
7556         test "x$with_getcap_cache" = "xyes" &&
7557 cat >>confdefs.h <<\EOF
7558 #define USE_GETCAP_CACHE 1
7559 EOF
7560
7561 fi
7562
7563 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7564 echo "$as_me:7564: checking if ~/.terminfo is wanted" >&5
7565 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7566
7567 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7568 if test "${enable_home_terminfo+set}" = set; then
7569   enableval="$enable_home_terminfo"
7570   with_home_terminfo=$enableval
7571 else
7572   with_home_terminfo=yes
7573 fi;
7574 echo "$as_me:7574: result: $with_home_terminfo" >&5
7575 echo "${ECHO_T}$with_home_terminfo" >&6
7576 test "x$with_home_terminfo" = "xyes" &&
7577 cat >>confdefs.h <<\EOF
7578 #define USE_HOME_TERMINFO 1
7579 EOF
7580
7581 echo "$as_me:7581: checking if you want to use restricted environment when running as root" >&5
7582 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7583
7584 # Check whether --enable-root-environ or --disable-root-environ was given.
7585 if test "${enable_root_environ+set}" = set; then
7586   enableval="$enable_root_environ"
7587   with_root_environ=$enableval
7588 else
7589   with_root_environ=yes
7590 fi;
7591 echo "$as_me:7591: result: $with_root_environ" >&5
7592 echo "${ECHO_T}$with_root_environ" >&6
7593 test "x$with_root_environ" = xyes &&
7594 cat >>confdefs.h <<\EOF
7595 #define USE_ROOT_ENVIRON 1
7596 EOF
7597
7598 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7599 ###   to reduce storage requirements for the terminfo database.
7600
7601 for ac_header in \
7602 unistd.h \
7603
7604 do
7605 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7606 echo "$as_me:7606: checking for $ac_header" >&5
7607 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7608 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7609   echo $ECHO_N "(cached) $ECHO_C" >&6
7610 else
7611   cat >conftest.$ac_ext <<_ACEOF
7612 #line 7612 "configure"
7613 #include "confdefs.h"
7614 #include <$ac_header>
7615 _ACEOF
7616 if { (eval echo "$as_me:7616: \"$ac_cpp conftest.$ac_ext\"") >&5
7617   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7618   ac_status=$?
7619   egrep -v '^ *\+' conftest.er1 >conftest.err
7620   rm -f conftest.er1
7621   cat conftest.err >&5
7622   echo "$as_me:7622: \$? = $ac_status" >&5
7623   (exit $ac_status); } >/dev/null; then
7624   if test -s conftest.err; then
7625     ac_cpp_err=$ac_c_preproc_warn_flag
7626   else
7627     ac_cpp_err=
7628   fi
7629 else
7630   ac_cpp_err=yes
7631 fi
7632 if test -z "$ac_cpp_err"; then
7633   eval "$as_ac_Header=yes"
7634 else
7635   echo "$as_me: failed program was:" >&5
7636   cat conftest.$ac_ext >&5
7637   eval "$as_ac_Header=no"
7638 fi
7639 rm -f conftest.err conftest.$ac_ext
7640 fi
7641 echo "$as_me:7641: result: `eval echo '${'$as_ac_Header'}'`" >&5
7642 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7643 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7644   cat >>confdefs.h <<EOF
7645 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7646 EOF
7647
7648 fi
7649 done
7650
7651 for ac_func in \
7652         remove \
7653         unlink
7654 do
7655 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7656 echo "$as_me:7656: checking for $ac_func" >&5
7657 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7658 if eval "test \"\${$as_ac_var+set}\" = set"; then
7659   echo $ECHO_N "(cached) $ECHO_C" >&6
7660 else
7661   cat >conftest.$ac_ext <<_ACEOF
7662 #line 7662 "configure"
7663 #include "confdefs.h"
7664 /* System header to define __stub macros and hopefully few prototypes,
7665     which can conflict with char $ac_func (); below.  */
7666 #include <assert.h>
7667 /* Override any gcc2 internal prototype to avoid an error.  */
7668 #ifdef __cplusplus
7669 extern "C"
7670 #endif
7671 /* We use char because int might match the return type of a gcc2
7672    builtin and then its argument prototype would still apply.  */
7673 char $ac_func ();
7674 char (*f) ();
7675
7676 int
7677 main ()
7678 {
7679 /* The GNU C library defines this for functions which it implements
7680     to always fail with ENOSYS.  Some functions are actually named
7681     something starting with __ and the normal name is an alias.  */
7682 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7683 choke me
7684 #else
7685 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7686 #endif
7687
7688   ;
7689   return 0;
7690 }
7691 _ACEOF
7692 rm -f conftest.$ac_objext conftest$ac_exeext
7693 if { (eval echo "$as_me:7693: \"$ac_link\"") >&5
7694   (eval $ac_link) 2>&5
7695   ac_status=$?
7696   echo "$as_me:7696: \$? = $ac_status" >&5
7697   (exit $ac_status); } &&
7698          { ac_try='test -s conftest$ac_exeext'
7699   { (eval echo "$as_me:7699: \"$ac_try\"") >&5
7700   (eval $ac_try) 2>&5
7701   ac_status=$?
7702   echo "$as_me:7702: \$? = $ac_status" >&5
7703   (exit $ac_status); }; }; then
7704   eval "$as_ac_var=yes"
7705 else
7706   echo "$as_me: failed program was:" >&5
7707 cat conftest.$ac_ext >&5
7708 eval "$as_ac_var=no"
7709 fi
7710 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7711 fi
7712 echo "$as_me:7712: result: `eval echo '${'$as_ac_var'}'`" >&5
7713 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7714 if test `eval echo '${'$as_ac_var'}'` = yes; then
7715   cat >>confdefs.h <<EOF
7716 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7717 EOF
7718
7719 fi
7720 done
7721
7722 if test "$cross_compiling" = yes ; then
7723
7724 for ac_func in \
7725                 link \
7726                 symlink
7727 do
7728 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7729 echo "$as_me:7729: checking for $ac_func" >&5
7730 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7731 if eval "test \"\${$as_ac_var+set}\" = set"; then
7732   echo $ECHO_N "(cached) $ECHO_C" >&6
7733 else
7734   cat >conftest.$ac_ext <<_ACEOF
7735 #line 7735 "configure"
7736 #include "confdefs.h"
7737 /* System header to define __stub macros and hopefully few prototypes,
7738     which can conflict with char $ac_func (); below.  */
7739 #include <assert.h>
7740 /* Override any gcc2 internal prototype to avoid an error.  */
7741 #ifdef __cplusplus
7742 extern "C"
7743 #endif
7744 /* We use char because int might match the return type of a gcc2
7745    builtin and then its argument prototype would still apply.  */
7746 char $ac_func ();
7747 char (*f) ();
7748
7749 int
7750 main ()
7751 {
7752 /* The GNU C library defines this for functions which it implements
7753     to always fail with ENOSYS.  Some functions are actually named
7754     something starting with __ and the normal name is an alias.  */
7755 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7756 choke me
7757 #else
7758 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7759 #endif
7760
7761   ;
7762   return 0;
7763 }
7764 _ACEOF
7765 rm -f conftest.$ac_objext conftest$ac_exeext
7766 if { (eval echo "$as_me:7766: \"$ac_link\"") >&5
7767   (eval $ac_link) 2>&5
7768   ac_status=$?
7769   echo "$as_me:7769: \$? = $ac_status" >&5
7770   (exit $ac_status); } &&
7771          { ac_try='test -s conftest$ac_exeext'
7772   { (eval echo "$as_me:7772: \"$ac_try\"") >&5
7773   (eval $ac_try) 2>&5
7774   ac_status=$?
7775   echo "$as_me:7775: \$? = $ac_status" >&5
7776   (exit $ac_status); }; }; then
7777   eval "$as_ac_var=yes"
7778 else
7779   echo "$as_me: failed program was:" >&5
7780 cat conftest.$ac_ext >&5
7781 eval "$as_ac_var=no"
7782 fi
7783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7784 fi
7785 echo "$as_me:7785: result: `eval echo '${'$as_ac_var'}'`" >&5
7786 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7787 if test `eval echo '${'$as_ac_var'}'` = yes; then
7788   cat >>confdefs.h <<EOF
7789 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7790 EOF
7791
7792 fi
7793 done
7794
7795 else
7796         echo "$as_me:7796: checking if link/symlink functions work" >&5
7797 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7798 if test "${cf_cv_link_funcs+set}" = set; then
7799   echo $ECHO_N "(cached) $ECHO_C" >&6
7800 else
7801
7802                 cf_cv_link_funcs=
7803                 for cf_func in link symlink ; do
7804                         if test "$cross_compiling" = yes; then
7805
7806                         eval 'ac_cv_func_'$cf_func'=error'
7807 else
7808   cat >conftest.$ac_ext <<_ACEOF
7809 #line 7809 "configure"
7810 #include "confdefs.h"
7811
7812 #include <sys/types.h>
7813 #include <sys/stat.h>
7814 #ifdef HAVE_UNISTD_H
7815 #include <unistd.h>
7816 #endif
7817 int main(void)
7818 {
7819         int fail = 0;
7820         char *src = "config.log";
7821         char *dst = "conftest.chk";
7822         struct stat src_sb;
7823         struct stat dst_sb;
7824
7825         stat(src, &src_sb);
7826         fail = ($cf_func("config.log", "conftest.chk") < 0)
7827             || (stat(dst, &dst_sb) < 0)
7828             || (dst_sb.st_mtime != src_sb.st_mtime);
7829 #ifdef HAVE_UNLINK
7830         unlink(dst);
7831 #else
7832         remove(dst);
7833 #endif
7834         ${cf_cv_main_return:-return} (fail);
7835 }
7836
7837 _ACEOF
7838 rm -f conftest$ac_exeext
7839 if { (eval echo "$as_me:7839: \"$ac_link\"") >&5
7840   (eval $ac_link) 2>&5
7841   ac_status=$?
7842   echo "$as_me:7842: \$? = $ac_status" >&5
7843   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7844   { (eval echo "$as_me:7844: \"$ac_try\"") >&5
7845   (eval $ac_try) 2>&5
7846   ac_status=$?
7847   echo "$as_me:7847: \$? = $ac_status" >&5
7848   (exit $ac_status); }; }; then
7849
7850                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7851                         eval 'ac_cv_func_'$cf_func'=yes'
7852 else
7853   echo "$as_me: program exited with status $ac_status" >&5
7854 echo "$as_me: failed program was:" >&5
7855 cat conftest.$ac_ext >&5
7856
7857                         eval 'ac_cv_func_'$cf_func'=no'
7858 fi
7859 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7860 fi
7861                 done
7862                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7863
7864 fi
7865 echo "$as_me:7865: result: $cf_cv_link_funcs" >&5
7866 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7867         test "$ac_cv_func_link"    = yes &&
7868 cat >>confdefs.h <<\EOF
7869 #define HAVE_LINK 1
7870 EOF
7871
7872         test "$ac_cv_func_symlink" = yes &&
7873 cat >>confdefs.h <<\EOF
7874 #define HAVE_SYMLINK 1
7875 EOF
7876
7877 fi
7878
7879 with_links=no
7880 with_symlinks=no
7881
7882 # soft links (symbolic links) are useful for some systems where hard links do
7883 # not work, or to make it simpler to copy terminfo trees around.
7884 if test "x$ac_cv_func_symlink" = xyes ; then
7885         echo "$as_me:7885: checking if tic should use symbolic links" >&5
7886 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7887
7888 # Check whether --enable-symlinks or --disable-symlinks was given.
7889 if test "${enable_symlinks+set}" = set; then
7890   enableval="$enable_symlinks"
7891   with_symlinks=$enableval
7892 else
7893   with_symlinks=no
7894 fi;
7895         echo "$as_me:7895: result: $with_symlinks" >&5
7896 echo "${ECHO_T}$with_symlinks" >&6
7897 fi
7898
7899 # If we have hard links and did not choose to use soft links instead, there is
7900 # no reason to make this choice optional - use the hard links.
7901 if test "$with_symlinks" = no ; then
7902         echo "$as_me:7902: checking if tic should use hard links" >&5
7903 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7904         if test "x$ac_cv_func_link" = xyes ; then
7905                 with_links=yes
7906         else
7907                 with_links=no
7908         fi
7909         echo "$as_me:7909: result: $with_links" >&5
7910 echo "${ECHO_T}$with_links" >&6
7911 fi
7912
7913 test "x$with_links" = xyes &&
7914 cat >>confdefs.h <<\EOF
7915 #define USE_LINKS 1
7916 EOF
7917
7918 test "x$with_symlinks" = xyes &&
7919 cat >>confdefs.h <<\EOF
7920 #define USE_SYMLINKS 1
7921 EOF
7922
7923 ###   use option --enable-broken-linker to force on use of broken-linker support
7924 echo "$as_me:7924: checking if you want broken-linker support code" >&5
7925 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7926
7927 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7928 if test "${enable_broken_linker+set}" = set; then
7929   enableval="$enable_broken_linker"
7930   with_broken_linker=$enableval
7931 else
7932   with_broken_linker=${BROKEN_LINKER:-no}
7933 fi;
7934 echo "$as_me:7934: result: $with_broken_linker" >&5
7935 echo "${ECHO_T}$with_broken_linker" >&6
7936
7937 BROKEN_LINKER=0
7938 if test "x$with_broken_linker" = xyes ; then
7939
7940 cat >>confdefs.h <<\EOF
7941 #define BROKEN_LINKER 1
7942 EOF
7943
7944         BROKEN_LINKER=1
7945 elif test "$DFT_LWR_MODEL" = shared ; then
7946         case $cf_cv_system_name in
7947         (cygwin*)
7948
7949 cat >>confdefs.h <<\EOF
7950 #define BROKEN_LINKER 1
7951 EOF
7952
7953                 BROKEN_LINKER=1
7954                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7955
7956 echo "${as_me:-configure}:7956: testing cygwin linker is broken anyway ..." 1>&5
7957
7958                 ;;
7959         esac
7960 fi
7961
7962 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7963 echo "$as_me:7963: checking if tputs should process BSD-style prefix padding" >&5
7964 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7965
7966 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7967 if test "${enable_bsdpad+set}" = set; then
7968   enableval="$enable_bsdpad"
7969   with_bsdpad=$enableval
7970 else
7971   with_bsdpad=no
7972 fi;
7973 echo "$as_me:7973: result: $with_bsdpad" >&5
7974 echo "${ECHO_T}$with_bsdpad" >&6
7975 test "x$with_bsdpad" = xyes &&
7976 cat >>confdefs.h <<\EOF
7977 #define BSD_TPUTS 1
7978 EOF
7979
7980 ###   use option --enable-widec to turn on use of wide-character support
7981 NCURSES_CH_T=chtype
7982 NCURSES_LIBUTF8=0
7983
7984 NEED_WCHAR_H=0
7985 NCURSES_MBSTATE_T=0
7986 NCURSES_WCHAR_T=0
7987 NCURSES_WINT_T=0
7988
7989 # Check to define _XOPEN_SOURCE "automatically"
7990 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7991
7992 cf_XOPEN_SOURCE=500
7993 cf_POSIX_C_SOURCE=199506L
7994 cf_xopen_source=
7995
7996 case $host_os in
7997 (aix[4-7]*)
7998         cf_xopen_source="-D_ALL_SOURCE"
7999         ;;
8000 (msys)
8001         cf_XOPEN_SOURCE=600
8002         ;;
8003 (darwin[0-8].*)
8004         cf_xopen_source="-D_APPLE_C_SOURCE"
8005         ;;
8006 (darwin*)
8007         cf_xopen_source="-D_DARWIN_C_SOURCE"
8008         cf_XOPEN_SOURCE=
8009         ;;
8010 (freebsd*|dragonfly*)
8011         # 5.x headers associate
8012         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8013         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8014         cf_POSIX_C_SOURCE=200112L
8015         cf_XOPEN_SOURCE=600
8016         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8017         ;;
8018 (hpux11*)
8019         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8020         ;;
8021 (hpux*)
8022         cf_xopen_source="-D_HPUX_SOURCE"
8023         ;;
8024 (irix[56].*)
8025         cf_xopen_source="-D_SGI_SOURCE"
8026         cf_XOPEN_SOURCE=
8027         ;;
8028 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8029
8030 echo "$as_me:8030: checking if we must define _GNU_SOURCE" >&5
8031 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8032 if test "${cf_cv_gnu_source+set}" = set; then
8033   echo $ECHO_N "(cached) $ECHO_C" >&6
8034 else
8035
8036 cat >conftest.$ac_ext <<_ACEOF
8037 #line 8037 "configure"
8038 #include "confdefs.h"
8039 #include <sys/types.h>
8040 int
8041 main ()
8042 {
8043
8044 #ifndef _XOPEN_SOURCE
8045 make an error
8046 #endif
8047   ;
8048   return 0;
8049 }
8050 _ACEOF
8051 rm -f conftest.$ac_objext
8052 if { (eval echo "$as_me:8052: \"$ac_compile\"") >&5
8053   (eval $ac_compile) 2>&5
8054   ac_status=$?
8055   echo "$as_me:8055: \$? = $ac_status" >&5
8056   (exit $ac_status); } &&
8057          { ac_try='test -s conftest.$ac_objext'
8058   { (eval echo "$as_me:8058: \"$ac_try\"") >&5
8059   (eval $ac_try) 2>&5
8060   ac_status=$?
8061   echo "$as_me:8061: \$? = $ac_status" >&5
8062   (exit $ac_status); }; }; then
8063   cf_cv_gnu_source=no
8064 else
8065   echo "$as_me: failed program was:" >&5
8066 cat conftest.$ac_ext >&5
8067 cf_save="$CPPFLAGS"
8068          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8069          cat >conftest.$ac_ext <<_ACEOF
8070 #line 8070 "configure"
8071 #include "confdefs.h"
8072 #include <sys/types.h>
8073 int
8074 main ()
8075 {
8076
8077 #ifdef _XOPEN_SOURCE
8078 make an error
8079 #endif
8080   ;
8081   return 0;
8082 }
8083 _ACEOF
8084 rm -f conftest.$ac_objext
8085 if { (eval echo "$as_me:8085: \"$ac_compile\"") >&5
8086   (eval $ac_compile) 2>&5
8087   ac_status=$?
8088   echo "$as_me:8088: \$? = $ac_status" >&5
8089   (exit $ac_status); } &&
8090          { ac_try='test -s conftest.$ac_objext'
8091   { (eval echo "$as_me:8091: \"$ac_try\"") >&5
8092   (eval $ac_try) 2>&5
8093   ac_status=$?
8094   echo "$as_me:8094: \$? = $ac_status" >&5
8095   (exit $ac_status); }; }; then
8096   cf_cv_gnu_source=no
8097 else
8098   echo "$as_me: failed program was:" >&5
8099 cat conftest.$ac_ext >&5
8100 cf_cv_gnu_source=yes
8101 fi
8102 rm -f conftest.$ac_objext conftest.$ac_ext
8103         CPPFLAGS="$cf_save"
8104
8105 fi
8106 rm -f conftest.$ac_objext conftest.$ac_ext
8107
8108 fi
8109 echo "$as_me:8109: result: $cf_cv_gnu_source" >&5
8110 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8111
8112 if test "$cf_cv_gnu_source" = yes
8113 then
8114 echo "$as_me:8114: checking if we should also define _DEFAULT_SOURCE" >&5
8115 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8116 if test "${cf_cv_default_source+set}" = set; then
8117   echo $ECHO_N "(cached) $ECHO_C" >&6
8118 else
8119
8120 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8121         cat >conftest.$ac_ext <<_ACEOF
8122 #line 8122 "configure"
8123 #include "confdefs.h"
8124 #include <sys/types.h>
8125 int
8126 main ()
8127 {
8128
8129 #ifdef _DEFAULT_SOURCE
8130 make an error
8131 #endif
8132   ;
8133   return 0;
8134 }
8135 _ACEOF
8136 rm -f conftest.$ac_objext
8137 if { (eval echo "$as_me:8137: \"$ac_compile\"") >&5
8138   (eval $ac_compile) 2>&5
8139   ac_status=$?
8140   echo "$as_me:8140: \$? = $ac_status" >&5
8141   (exit $ac_status); } &&
8142          { ac_try='test -s conftest.$ac_objext'
8143   { (eval echo "$as_me:8143: \"$ac_try\"") >&5
8144   (eval $ac_try) 2>&5
8145   ac_status=$?
8146   echo "$as_me:8146: \$? = $ac_status" >&5
8147   (exit $ac_status); }; }; then
8148   cf_cv_default_source=no
8149 else
8150   echo "$as_me: failed program was:" >&5
8151 cat conftest.$ac_ext >&5
8152 cf_cv_default_source=yes
8153 fi
8154 rm -f conftest.$ac_objext conftest.$ac_ext
8155
8156 fi
8157 echo "$as_me:8157: result: $cf_cv_default_source" >&5
8158 echo "${ECHO_T}$cf_cv_default_source" >&6
8159 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8160 fi
8161
8162         ;;
8163 (minix*)
8164         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8165         ;;
8166 (mirbsd*)
8167         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8168         cf_XOPEN_SOURCE=
8169
8170 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8171
8172 cf_save_CFLAGS="$CFLAGS"
8173 cf_save_CPPFLAGS="$CPPFLAGS"
8174
8175 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8176         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8177                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8178
8179 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8180         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8181                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8182
8183 echo "$as_me:8183: checking if we should define _POSIX_C_SOURCE" >&5
8184 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8185 if test "${cf_cv_posix_c_source+set}" = set; then
8186   echo $ECHO_N "(cached) $ECHO_C" >&6
8187 else
8188
8189 echo "${as_me:-configure}:8189: testing if the symbol is already defined go no further ..." 1>&5
8190
8191         cat >conftest.$ac_ext <<_ACEOF
8192 #line 8192 "configure"
8193 #include "confdefs.h"
8194 #include <sys/types.h>
8195 int
8196 main ()
8197 {
8198
8199 #ifndef _POSIX_C_SOURCE
8200 make an error
8201 #endif
8202   ;
8203   return 0;
8204 }
8205 _ACEOF
8206 rm -f conftest.$ac_objext
8207 if { (eval echo "$as_me:8207: \"$ac_compile\"") >&5
8208   (eval $ac_compile) 2>&5
8209   ac_status=$?
8210   echo "$as_me:8210: \$? = $ac_status" >&5
8211   (exit $ac_status); } &&
8212          { ac_try='test -s conftest.$ac_objext'
8213   { (eval echo "$as_me:8213: \"$ac_try\"") >&5
8214   (eval $ac_try) 2>&5
8215   ac_status=$?
8216   echo "$as_me:8216: \$? = $ac_status" >&5
8217   (exit $ac_status); }; }; then
8218   cf_cv_posix_c_source=no
8219 else
8220   echo "$as_me: failed program was:" >&5
8221 cat conftest.$ac_ext >&5
8222 cf_want_posix_source=no
8223          case .$cf_POSIX_C_SOURCE in
8224          (.[12]??*)
8225                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8226                 ;;
8227          (.2)
8228                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8229                 cf_want_posix_source=yes
8230                 ;;
8231          (.*)
8232                 cf_want_posix_source=yes
8233                 ;;
8234          esac
8235          if test "$cf_want_posix_source" = yes ; then
8236                 cat >conftest.$ac_ext <<_ACEOF
8237 #line 8237 "configure"
8238 #include "confdefs.h"
8239 #include <sys/types.h>
8240 int
8241 main ()
8242 {
8243
8244 #ifdef _POSIX_SOURCE
8245 make an error
8246 #endif
8247   ;
8248   return 0;
8249 }
8250 _ACEOF
8251 rm -f conftest.$ac_objext
8252 if { (eval echo "$as_me:8252: \"$ac_compile\"") >&5
8253   (eval $ac_compile) 2>&5
8254   ac_status=$?
8255   echo "$as_me:8255: \$? = $ac_status" >&5
8256   (exit $ac_status); } &&
8257          { ac_try='test -s conftest.$ac_objext'
8258   { (eval echo "$as_me:8258: \"$ac_try\"") >&5
8259   (eval $ac_try) 2>&5
8260   ac_status=$?
8261   echo "$as_me:8261: \$? = $ac_status" >&5
8262   (exit $ac_status); }; }; then
8263   :
8264 else
8265   echo "$as_me: failed program was:" >&5
8266 cat conftest.$ac_ext >&5
8267 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8268 fi
8269 rm -f conftest.$ac_objext conftest.$ac_ext
8270          fi
8271
8272 echo "${as_me:-configure}:8272: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8273
8274          CFLAGS="$cf_trim_CFLAGS"
8275          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8276
8277 echo "${as_me:-configure}:8277: testing if the second compile does not leave our definition intact error ..." 1>&5
8278
8279          cat >conftest.$ac_ext <<_ACEOF
8280 #line 8280 "configure"
8281 #include "confdefs.h"
8282 #include <sys/types.h>
8283 int
8284 main ()
8285 {
8286
8287 #ifndef _POSIX_C_SOURCE
8288 make an error
8289 #endif
8290   ;
8291   return 0;
8292 }
8293 _ACEOF
8294 rm -f conftest.$ac_objext
8295 if { (eval echo "$as_me:8295: \"$ac_compile\"") >&5
8296   (eval $ac_compile) 2>&5
8297   ac_status=$?
8298   echo "$as_me:8298: \$? = $ac_status" >&5
8299   (exit $ac_status); } &&
8300          { ac_try='test -s conftest.$ac_objext'
8301   { (eval echo "$as_me:8301: \"$ac_try\"") >&5
8302   (eval $ac_try) 2>&5
8303   ac_status=$?
8304   echo "$as_me:8304: \$? = $ac_status" >&5
8305   (exit $ac_status); }; }; then
8306   :
8307 else
8308   echo "$as_me: failed program was:" >&5
8309 cat conftest.$ac_ext >&5
8310 cf_cv_posix_c_source=no
8311 fi
8312 rm -f conftest.$ac_objext conftest.$ac_ext
8313          CFLAGS="$cf_save_CFLAGS"
8314          CPPFLAGS="$cf_save_CPPFLAGS"
8315
8316 fi
8317 rm -f conftest.$ac_objext conftest.$ac_ext
8318
8319 fi
8320 echo "$as_me:8320: result: $cf_cv_posix_c_source" >&5
8321 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8322
8323 if test "$cf_cv_posix_c_source" != no ; then
8324         CFLAGS="$cf_trim_CFLAGS"
8325         CPPFLAGS="$cf_trim_CPPFLAGS"
8326
8327 cf_fix_cppflags=no
8328 cf_new_cflags=
8329 cf_new_cppflags=
8330 cf_new_extra_cppflags=
8331
8332 for cf_add_cflags in $cf_cv_posix_c_source
8333 do
8334 case $cf_fix_cppflags in
8335 (no)
8336         case $cf_add_cflags in
8337         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8338                 case $cf_add_cflags in
8339                 (-D*)
8340                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8341
8342                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8343                                 && test -z "${cf_tst_cflags}" \
8344                                 && cf_fix_cppflags=yes
8345
8346                         if test $cf_fix_cppflags = yes ; then
8347                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8348                                 continue
8349                         elif test "${cf_tst_cflags}" = "\"'" ; then
8350                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8351                                 continue
8352                         fi
8353                         ;;
8354                 esac
8355                 case "$CPPFLAGS" in
8356                 (*$cf_add_cflags)
8357                         ;;
8358                 (*)
8359                         case $cf_add_cflags in
8360                         (-D*)
8361                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8362
8363 CPPFLAGS=`echo "$CPPFLAGS" | \
8364         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8365                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8366
8367                                 ;;
8368                         esac
8369                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8370                         ;;
8371                 esac
8372                 ;;
8373         (*)
8374                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8375                 ;;
8376         esac
8377         ;;
8378 (yes)
8379         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8380
8381         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8382
8383         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8384                 && test -z "${cf_tst_cflags}" \
8385                 && cf_fix_cppflags=no
8386         ;;
8387 esac
8388 done
8389
8390 if test -n "$cf_new_cflags" ; then
8391
8392         CFLAGS="$CFLAGS $cf_new_cflags"
8393 fi
8394
8395 if test -n "$cf_new_cppflags" ; then
8396
8397         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8398 fi
8399
8400 if test -n "$cf_new_extra_cppflags" ; then
8401
8402         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8403 fi
8404
8405 fi
8406
8407         ;;
8408 (netbsd*)
8409         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8410         ;;
8411 (openbsd[4-9]*)
8412         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8413         cf_xopen_source="-D_BSD_SOURCE"
8414         cf_XOPEN_SOURCE=600
8415         ;;
8416 (openbsd*)
8417         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8418         ;;
8419 (osf[45]*)
8420         cf_xopen_source="-D_OSF_SOURCE"
8421         ;;
8422 (nto-qnx*)
8423         cf_xopen_source="-D_QNX_SOURCE"
8424         ;;
8425 (sco*)
8426         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8427         ;;
8428 (solaris2.*)
8429         cf_xopen_source="-D__EXTENSIONS__"
8430         cf_cv_xopen_source=broken
8431         ;;
8432 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8433         cf_XOPEN_SOURCE=
8434         cf_POSIX_C_SOURCE=
8435         ;;
8436 (*)
8437
8438 echo "$as_me:8438: checking if we should define _XOPEN_SOURCE" >&5
8439 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8440 if test "${cf_cv_xopen_source+set}" = set; then
8441   echo $ECHO_N "(cached) $ECHO_C" >&6
8442 else
8443
8444         cat >conftest.$ac_ext <<_ACEOF
8445 #line 8445 "configure"
8446 #include "confdefs.h"
8447
8448 #include <stdlib.h>
8449 #include <string.h>
8450 #include <sys/types.h>
8451
8452 int
8453 main ()
8454 {
8455
8456 #ifndef _XOPEN_SOURCE
8457 make an error
8458 #endif
8459   ;
8460   return 0;
8461 }
8462 _ACEOF
8463 rm -f conftest.$ac_objext
8464 if { (eval echo "$as_me:8464: \"$ac_compile\"") >&5
8465   (eval $ac_compile) 2>&5
8466   ac_status=$?
8467   echo "$as_me:8467: \$? = $ac_status" >&5
8468   (exit $ac_status); } &&
8469          { ac_try='test -s conftest.$ac_objext'
8470   { (eval echo "$as_me:8470: \"$ac_try\"") >&5
8471   (eval $ac_try) 2>&5
8472   ac_status=$?
8473   echo "$as_me:8473: \$? = $ac_status" >&5
8474   (exit $ac_status); }; }; then
8475   cf_cv_xopen_source=no
8476 else
8477   echo "$as_me: failed program was:" >&5
8478 cat conftest.$ac_ext >&5
8479 cf_save="$CPPFLAGS"
8480          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8481          cat >conftest.$ac_ext <<_ACEOF
8482 #line 8482 "configure"
8483 #include "confdefs.h"
8484
8485 #include <stdlib.h>
8486 #include <string.h>
8487 #include <sys/types.h>
8488
8489 int
8490 main ()
8491 {
8492
8493 #ifdef _XOPEN_SOURCE
8494 make an error
8495 #endif
8496   ;
8497   return 0;
8498 }
8499 _ACEOF
8500 rm -f conftest.$ac_objext
8501 if { (eval echo "$as_me:8501: \"$ac_compile\"") >&5
8502   (eval $ac_compile) 2>&5
8503   ac_status=$?
8504   echo "$as_me:8504: \$? = $ac_status" >&5
8505   (exit $ac_status); } &&
8506          { ac_try='test -s conftest.$ac_objext'
8507   { (eval echo "$as_me:8507: \"$ac_try\"") >&5
8508   (eval $ac_try) 2>&5
8509   ac_status=$?
8510   echo "$as_me:8510: \$? = $ac_status" >&5
8511   (exit $ac_status); }; }; then
8512   cf_cv_xopen_source=no
8513 else
8514   echo "$as_me: failed program was:" >&5
8515 cat conftest.$ac_ext >&5
8516 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8517 fi
8518 rm -f conftest.$ac_objext conftest.$ac_ext
8519         CPPFLAGS="$cf_save"
8520
8521 fi
8522 rm -f conftest.$ac_objext conftest.$ac_ext
8523
8524 fi
8525 echo "$as_me:8525: result: $cf_cv_xopen_source" >&5
8526 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8527
8528 if test "$cf_cv_xopen_source" != no ; then
8529
8530 CFLAGS=`echo "$CFLAGS" | \
8531         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8532                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8533
8534 CPPFLAGS=`echo "$CPPFLAGS" | \
8535         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8536                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8537
8538         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8539
8540 cf_fix_cppflags=no
8541 cf_new_cflags=
8542 cf_new_cppflags=
8543 cf_new_extra_cppflags=
8544
8545 for cf_add_cflags in $cf_temp_xopen_source
8546 do
8547 case $cf_fix_cppflags in
8548 (no)
8549         case $cf_add_cflags in
8550         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8551                 case $cf_add_cflags in
8552                 (-D*)
8553                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8554
8555                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8556                                 && test -z "${cf_tst_cflags}" \
8557                                 && cf_fix_cppflags=yes
8558
8559                         if test $cf_fix_cppflags = yes ; then
8560                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8561                                 continue
8562                         elif test "${cf_tst_cflags}" = "\"'" ; then
8563                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8564                                 continue
8565                         fi
8566                         ;;
8567                 esac
8568                 case "$CPPFLAGS" in
8569                 (*$cf_add_cflags)
8570                         ;;
8571                 (*)
8572                         case $cf_add_cflags in
8573                         (-D*)
8574                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8575
8576 CPPFLAGS=`echo "$CPPFLAGS" | \
8577         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8578                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8579
8580                                 ;;
8581                         esac
8582                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8583                         ;;
8584                 esac
8585                 ;;
8586         (*)
8587                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8588                 ;;
8589         esac
8590         ;;
8591 (yes)
8592         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8593
8594         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8595
8596         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8597                 && test -z "${cf_tst_cflags}" \
8598                 && cf_fix_cppflags=no
8599         ;;
8600 esac
8601 done
8602
8603 if test -n "$cf_new_cflags" ; then
8604
8605         CFLAGS="$CFLAGS $cf_new_cflags"
8606 fi
8607
8608 if test -n "$cf_new_cppflags" ; then
8609
8610         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8611 fi
8612
8613 if test -n "$cf_new_extra_cppflags" ; then
8614
8615         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8616 fi
8617
8618 fi
8619
8620 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8621
8622 cf_save_CFLAGS="$CFLAGS"
8623 cf_save_CPPFLAGS="$CPPFLAGS"
8624
8625 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8626         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8627                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8628
8629 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8630         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8631                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8632
8633 echo "$as_me:8633: checking if we should define _POSIX_C_SOURCE" >&5
8634 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8635 if test "${cf_cv_posix_c_source+set}" = set; then
8636   echo $ECHO_N "(cached) $ECHO_C" >&6
8637 else
8638
8639 echo "${as_me:-configure}:8639: testing if the symbol is already defined go no further ..." 1>&5
8640
8641         cat >conftest.$ac_ext <<_ACEOF
8642 #line 8642 "configure"
8643 #include "confdefs.h"
8644 #include <sys/types.h>
8645 int
8646 main ()
8647 {
8648
8649 #ifndef _POSIX_C_SOURCE
8650 make an error
8651 #endif
8652   ;
8653   return 0;
8654 }
8655 _ACEOF
8656 rm -f conftest.$ac_objext
8657 if { (eval echo "$as_me:8657: \"$ac_compile\"") >&5
8658   (eval $ac_compile) 2>&5
8659   ac_status=$?
8660   echo "$as_me:8660: \$? = $ac_status" >&5
8661   (exit $ac_status); } &&
8662          { ac_try='test -s conftest.$ac_objext'
8663   { (eval echo "$as_me:8663: \"$ac_try\"") >&5
8664   (eval $ac_try) 2>&5
8665   ac_status=$?
8666   echo "$as_me:8666: \$? = $ac_status" >&5
8667   (exit $ac_status); }; }; then
8668   cf_cv_posix_c_source=no
8669 else
8670   echo "$as_me: failed program was:" >&5
8671 cat conftest.$ac_ext >&5
8672 cf_want_posix_source=no
8673          case .$cf_POSIX_C_SOURCE in
8674          (.[12]??*)
8675                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8676                 ;;
8677          (.2)
8678                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8679                 cf_want_posix_source=yes
8680                 ;;
8681          (.*)
8682                 cf_want_posix_source=yes
8683                 ;;
8684          esac
8685          if test "$cf_want_posix_source" = yes ; then
8686                 cat >conftest.$ac_ext <<_ACEOF
8687 #line 8687 "configure"
8688 #include "confdefs.h"
8689 #include <sys/types.h>
8690 int
8691 main ()
8692 {
8693
8694 #ifdef _POSIX_SOURCE
8695 make an error
8696 #endif
8697   ;
8698   return 0;
8699 }
8700 _ACEOF
8701 rm -f conftest.$ac_objext
8702 if { (eval echo "$as_me:8702: \"$ac_compile\"") >&5
8703   (eval $ac_compile) 2>&5
8704   ac_status=$?
8705   echo "$as_me:8705: \$? = $ac_status" >&5
8706   (exit $ac_status); } &&
8707          { ac_try='test -s conftest.$ac_objext'
8708   { (eval echo "$as_me:8708: \"$ac_try\"") >&5
8709   (eval $ac_try) 2>&5
8710   ac_status=$?
8711   echo "$as_me:8711: \$? = $ac_status" >&5
8712   (exit $ac_status); }; }; then
8713   :
8714 else
8715   echo "$as_me: failed program was:" >&5
8716 cat conftest.$ac_ext >&5
8717 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8718 fi
8719 rm -f conftest.$ac_objext conftest.$ac_ext
8720          fi
8721
8722 echo "${as_me:-configure}:8722: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8723
8724          CFLAGS="$cf_trim_CFLAGS"
8725          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8726
8727 echo "${as_me:-configure}:8727: testing if the second compile does not leave our definition intact error ..." 1>&5
8728
8729          cat >conftest.$ac_ext <<_ACEOF
8730 #line 8730 "configure"
8731 #include "confdefs.h"
8732 #include <sys/types.h>
8733 int
8734 main ()
8735 {
8736
8737 #ifndef _POSIX_C_SOURCE
8738 make an error
8739 #endif
8740   ;
8741   return 0;
8742 }
8743 _ACEOF
8744 rm -f conftest.$ac_objext
8745 if { (eval echo "$as_me:8745: \"$ac_compile\"") >&5
8746   (eval $ac_compile) 2>&5
8747   ac_status=$?
8748   echo "$as_me:8748: \$? = $ac_status" >&5
8749   (exit $ac_status); } &&
8750          { ac_try='test -s conftest.$ac_objext'
8751   { (eval echo "$as_me:8751: \"$ac_try\"") >&5
8752   (eval $ac_try) 2>&5
8753   ac_status=$?
8754   echo "$as_me:8754: \$? = $ac_status" >&5
8755   (exit $ac_status); }; }; then
8756   :
8757 else
8758   echo "$as_me: failed program was:" >&5
8759 cat conftest.$ac_ext >&5
8760 cf_cv_posix_c_source=no
8761 fi
8762 rm -f conftest.$ac_objext conftest.$ac_ext
8763          CFLAGS="$cf_save_CFLAGS"
8764          CPPFLAGS="$cf_save_CPPFLAGS"
8765
8766 fi
8767 rm -f conftest.$ac_objext conftest.$ac_ext
8768
8769 fi
8770 echo "$as_me:8770: result: $cf_cv_posix_c_source" >&5
8771 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8772
8773 if test "$cf_cv_posix_c_source" != no ; then
8774         CFLAGS="$cf_trim_CFLAGS"
8775         CPPFLAGS="$cf_trim_CPPFLAGS"
8776
8777 cf_fix_cppflags=no
8778 cf_new_cflags=
8779 cf_new_cppflags=
8780 cf_new_extra_cppflags=
8781
8782 for cf_add_cflags in $cf_cv_posix_c_source
8783 do
8784 case $cf_fix_cppflags in
8785 (no)
8786         case $cf_add_cflags in
8787         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8788                 case $cf_add_cflags in
8789                 (-D*)
8790                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8791
8792                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8793                                 && test -z "${cf_tst_cflags}" \
8794                                 && cf_fix_cppflags=yes
8795
8796                         if test $cf_fix_cppflags = yes ; then
8797                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8798                                 continue
8799                         elif test "${cf_tst_cflags}" = "\"'" ; then
8800                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8801                                 continue
8802                         fi
8803                         ;;
8804                 esac
8805                 case "$CPPFLAGS" in
8806                 (*$cf_add_cflags)
8807                         ;;
8808                 (*)
8809                         case $cf_add_cflags in
8810                         (-D*)
8811                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8812
8813 CPPFLAGS=`echo "$CPPFLAGS" | \
8814         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8815                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8816
8817                                 ;;
8818                         esac
8819                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8820                         ;;
8821                 esac
8822                 ;;
8823         (*)
8824                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8825                 ;;
8826         esac
8827         ;;
8828 (yes)
8829         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8830
8831         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8832
8833         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8834                 && test -z "${cf_tst_cflags}" \
8835                 && cf_fix_cppflags=no
8836         ;;
8837 esac
8838 done
8839
8840 if test -n "$cf_new_cflags" ; then
8841
8842         CFLAGS="$CFLAGS $cf_new_cflags"
8843 fi
8844
8845 if test -n "$cf_new_cppflags" ; then
8846
8847         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8848 fi
8849
8850 if test -n "$cf_new_extra_cppflags" ; then
8851
8852         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8853 fi
8854
8855 fi
8856
8857         ;;
8858 esac
8859
8860 if test -n "$cf_xopen_source" ; then
8861
8862 cf_fix_cppflags=no
8863 cf_new_cflags=
8864 cf_new_cppflags=
8865 cf_new_extra_cppflags=
8866
8867 for cf_add_cflags in $cf_xopen_source
8868 do
8869 case $cf_fix_cppflags in
8870 (no)
8871         case $cf_add_cflags in
8872         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8873                 case $cf_add_cflags in
8874                 (-D*)
8875                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8876
8877                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8878                                 && test -z "${cf_tst_cflags}" \
8879                                 && cf_fix_cppflags=yes
8880
8881                         if test $cf_fix_cppflags = yes ; then
8882                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8883                                 continue
8884                         elif test "${cf_tst_cflags}" = "\"'" ; then
8885                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8886                                 continue
8887                         fi
8888                         ;;
8889                 esac
8890                 case "$CPPFLAGS" in
8891                 (*$cf_add_cflags)
8892                         ;;
8893                 (*)
8894                         case $cf_add_cflags in
8895                         (-D*)
8896                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8897
8898 CPPFLAGS=`echo "$CPPFLAGS" | \
8899         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8900                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8901
8902                                 ;;
8903                         esac
8904                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8905                         ;;
8906                 esac
8907                 ;;
8908         (*)
8909                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8910                 ;;
8911         esac
8912         ;;
8913 (yes)
8914         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8915
8916         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8917
8918         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8919                 && test -z "${cf_tst_cflags}" \
8920                 && cf_fix_cppflags=no
8921         ;;
8922 esac
8923 done
8924
8925 if test -n "$cf_new_cflags" ; then
8926         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8927
8928 echo "${as_me:-configure}:8928: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8929
8930         CFLAGS="$CFLAGS $cf_new_cflags"
8931 fi
8932
8933 if test -n "$cf_new_cppflags" ; then
8934         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8935
8936 echo "${as_me:-configure}:8936: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8937
8938         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8939 fi
8940
8941 if test -n "$cf_new_extra_cppflags" ; then
8942         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8943
8944 echo "${as_me:-configure}:8944: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8945
8946         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8947 fi
8948
8949 fi
8950
8951 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8952         echo "$as_me:8952: checking if _XOPEN_SOURCE really is set" >&5
8953 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8954         cat >conftest.$ac_ext <<_ACEOF
8955 #line 8955 "configure"
8956 #include "confdefs.h"
8957 #include <stdlib.h>
8958 int
8959 main ()
8960 {
8961
8962 #ifndef _XOPEN_SOURCE
8963 make an error
8964 #endif
8965   ;
8966   return 0;
8967 }
8968 _ACEOF
8969 rm -f conftest.$ac_objext
8970 if { (eval echo "$as_me:8970: \"$ac_compile\"") >&5
8971   (eval $ac_compile) 2>&5
8972   ac_status=$?
8973   echo "$as_me:8973: \$? = $ac_status" >&5
8974   (exit $ac_status); } &&
8975          { ac_try='test -s conftest.$ac_objext'
8976   { (eval echo "$as_me:8976: \"$ac_try\"") >&5
8977   (eval $ac_try) 2>&5
8978   ac_status=$?
8979   echo "$as_me:8979: \$? = $ac_status" >&5
8980   (exit $ac_status); }; }; then
8981   cf_XOPEN_SOURCE_set=yes
8982 else
8983   echo "$as_me: failed program was:" >&5
8984 cat conftest.$ac_ext >&5
8985 cf_XOPEN_SOURCE_set=no
8986 fi
8987 rm -f conftest.$ac_objext conftest.$ac_ext
8988         echo "$as_me:8988: result: $cf_XOPEN_SOURCE_set" >&5
8989 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8990         if test $cf_XOPEN_SOURCE_set = yes
8991         then
8992                 cat >conftest.$ac_ext <<_ACEOF
8993 #line 8993 "configure"
8994 #include "confdefs.h"
8995 #include <stdlib.h>
8996 int
8997 main ()
8998 {
8999
9000 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9001 make an error
9002 #endif
9003   ;
9004   return 0;
9005 }
9006 _ACEOF
9007 rm -f conftest.$ac_objext
9008 if { (eval echo "$as_me:9008: \"$ac_compile\"") >&5
9009   (eval $ac_compile) 2>&5
9010   ac_status=$?
9011   echo "$as_me:9011: \$? = $ac_status" >&5
9012   (exit $ac_status); } &&
9013          { ac_try='test -s conftest.$ac_objext'
9014   { (eval echo "$as_me:9014: \"$ac_try\"") >&5
9015   (eval $ac_try) 2>&5
9016   ac_status=$?
9017   echo "$as_me:9017: \$? = $ac_status" >&5
9018   (exit $ac_status); }; }; then
9019   cf_XOPEN_SOURCE_set_ok=yes
9020 else
9021   echo "$as_me: failed program was:" >&5
9022 cat conftest.$ac_ext >&5
9023 cf_XOPEN_SOURCE_set_ok=no
9024 fi
9025 rm -f conftest.$ac_objext conftest.$ac_ext
9026                 if test $cf_XOPEN_SOURCE_set_ok = no
9027                 then
9028                         { echo "$as_me:9028: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9029 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9030                 fi
9031         else
9032
9033 echo "$as_me:9033: checking if we should define _XOPEN_SOURCE" >&5
9034 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9035 if test "${cf_cv_xopen_source+set}" = set; then
9036   echo $ECHO_N "(cached) $ECHO_C" >&6
9037 else
9038
9039         cat >conftest.$ac_ext <<_ACEOF
9040 #line 9040 "configure"
9041 #include "confdefs.h"
9042
9043 #include <stdlib.h>
9044 #include <string.h>
9045 #include <sys/types.h>
9046
9047 int
9048 main ()
9049 {
9050
9051 #ifndef _XOPEN_SOURCE
9052 make an error
9053 #endif
9054   ;
9055   return 0;
9056 }
9057 _ACEOF
9058 rm -f conftest.$ac_objext
9059 if { (eval echo "$as_me:9059: \"$ac_compile\"") >&5
9060   (eval $ac_compile) 2>&5
9061   ac_status=$?
9062   echo "$as_me:9062: \$? = $ac_status" >&5
9063   (exit $ac_status); } &&
9064          { ac_try='test -s conftest.$ac_objext'
9065   { (eval echo "$as_me:9065: \"$ac_try\"") >&5
9066   (eval $ac_try) 2>&5
9067   ac_status=$?
9068   echo "$as_me:9068: \$? = $ac_status" >&5
9069   (exit $ac_status); }; }; then
9070   cf_cv_xopen_source=no
9071 else
9072   echo "$as_me: failed program was:" >&5
9073 cat conftest.$ac_ext >&5
9074 cf_save="$CPPFLAGS"
9075          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9076          cat >conftest.$ac_ext <<_ACEOF
9077 #line 9077 "configure"
9078 #include "confdefs.h"
9079
9080 #include <stdlib.h>
9081 #include <string.h>
9082 #include <sys/types.h>
9083
9084 int
9085 main ()
9086 {
9087
9088 #ifdef _XOPEN_SOURCE
9089 make an error
9090 #endif
9091   ;
9092   return 0;
9093 }
9094 _ACEOF
9095 rm -f conftest.$ac_objext
9096 if { (eval echo "$as_me:9096: \"$ac_compile\"") >&5
9097   (eval $ac_compile) 2>&5
9098   ac_status=$?
9099   echo "$as_me:9099: \$? = $ac_status" >&5
9100   (exit $ac_status); } &&
9101          { ac_try='test -s conftest.$ac_objext'
9102   { (eval echo "$as_me:9102: \"$ac_try\"") >&5
9103   (eval $ac_try) 2>&5
9104   ac_status=$?
9105   echo "$as_me:9105: \$? = $ac_status" >&5
9106   (exit $ac_status); }; }; then
9107   cf_cv_xopen_source=no
9108 else
9109   echo "$as_me: failed program was:" >&5
9110 cat conftest.$ac_ext >&5
9111 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9112 fi
9113 rm -f conftest.$ac_objext conftest.$ac_ext
9114         CPPFLAGS="$cf_save"
9115
9116 fi
9117 rm -f conftest.$ac_objext conftest.$ac_ext
9118
9119 fi
9120 echo "$as_me:9120: result: $cf_cv_xopen_source" >&5
9121 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9122
9123 if test "$cf_cv_xopen_source" != no ; then
9124
9125 CFLAGS=`echo "$CFLAGS" | \
9126         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9127                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9128
9129 CPPFLAGS=`echo "$CPPFLAGS" | \
9130         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9131                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9132
9133         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9134
9135 cf_fix_cppflags=no
9136 cf_new_cflags=
9137 cf_new_cppflags=
9138 cf_new_extra_cppflags=
9139
9140 for cf_add_cflags in $cf_temp_xopen_source
9141 do
9142 case $cf_fix_cppflags in
9143 (no)
9144         case $cf_add_cflags in
9145         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9146                 case $cf_add_cflags in
9147                 (-D*)
9148                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9149
9150                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9151                                 && test -z "${cf_tst_cflags}" \
9152                                 && cf_fix_cppflags=yes
9153
9154                         if test $cf_fix_cppflags = yes ; then
9155                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9156                                 continue
9157                         elif test "${cf_tst_cflags}" = "\"'" ; then
9158                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9159                                 continue
9160                         fi
9161                         ;;
9162                 esac
9163                 case "$CPPFLAGS" in
9164                 (*$cf_add_cflags)
9165                         ;;
9166                 (*)
9167                         case $cf_add_cflags in
9168                         (-D*)
9169                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9170
9171 CPPFLAGS=`echo "$CPPFLAGS" | \
9172         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9173                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9174
9175                                 ;;
9176                         esac
9177                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9178                         ;;
9179                 esac
9180                 ;;
9181         (*)
9182                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9183                 ;;
9184         esac
9185         ;;
9186 (yes)
9187         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9188
9189         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9190
9191         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9192                 && test -z "${cf_tst_cflags}" \
9193                 && cf_fix_cppflags=no
9194         ;;
9195 esac
9196 done
9197
9198 if test -n "$cf_new_cflags" ; then
9199
9200         CFLAGS="$CFLAGS $cf_new_cflags"
9201 fi
9202
9203 if test -n "$cf_new_cppflags" ; then
9204
9205         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9206 fi
9207
9208 if test -n "$cf_new_extra_cppflags" ; then
9209
9210         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9211 fi
9212
9213 fi
9214
9215         fi
9216 fi
9217
9218 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9219
9220 # Work around breakage on OS X
9221
9222 echo "$as_me:9222: checking if SIGWINCH is defined" >&5
9223 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9224 if test "${cf_cv_define_sigwinch+set}" = set; then
9225   echo $ECHO_N "(cached) $ECHO_C" >&6
9226 else
9227
9228         cat >conftest.$ac_ext <<_ACEOF
9229 #line 9229 "configure"
9230 #include "confdefs.h"
9231
9232 #include <sys/types.h>
9233 #include <sys/signal.h>
9234
9235 int
9236 main ()
9237 {
9238 int x = SIGWINCH
9239   ;
9240   return 0;
9241 }
9242 _ACEOF
9243 rm -f conftest.$ac_objext
9244 if { (eval echo "$as_me:9244: \"$ac_compile\"") >&5
9245   (eval $ac_compile) 2>&5
9246   ac_status=$?
9247   echo "$as_me:9247: \$? = $ac_status" >&5
9248   (exit $ac_status); } &&
9249          { ac_try='test -s conftest.$ac_objext'
9250   { (eval echo "$as_me:9250: \"$ac_try\"") >&5
9251   (eval $ac_try) 2>&5
9252   ac_status=$?
9253   echo "$as_me:9253: \$? = $ac_status" >&5
9254   (exit $ac_status); }; }; then
9255   cf_cv_define_sigwinch=yes
9256 else
9257   echo "$as_me: failed program was:" >&5
9258 cat conftest.$ac_ext >&5
9259 cat >conftest.$ac_ext <<_ACEOF
9260 #line 9260 "configure"
9261 #include "confdefs.h"
9262
9263 #undef _XOPEN_SOURCE
9264 #undef _POSIX_SOURCE
9265 #undef _POSIX_C_SOURCE
9266 #include <sys/types.h>
9267 #include <sys/signal.h>
9268
9269 int
9270 main ()
9271 {
9272 int x = SIGWINCH
9273   ;
9274   return 0;
9275 }
9276 _ACEOF
9277 rm -f conftest.$ac_objext
9278 if { (eval echo "$as_me:9278: \"$ac_compile\"") >&5
9279   (eval $ac_compile) 2>&5
9280   ac_status=$?
9281   echo "$as_me:9281: \$? = $ac_status" >&5
9282   (exit $ac_status); } &&
9283          { ac_try='test -s conftest.$ac_objext'
9284   { (eval echo "$as_me:9284: \"$ac_try\"") >&5
9285   (eval $ac_try) 2>&5
9286   ac_status=$?
9287   echo "$as_me:9287: \$? = $ac_status" >&5
9288   (exit $ac_status); }; }; then
9289   cf_cv_define_sigwinch=maybe
9290 else
9291   echo "$as_me: failed program was:" >&5
9292 cat conftest.$ac_ext >&5
9293 cf_cv_define_sigwinch=no
9294 fi
9295 rm -f conftest.$ac_objext conftest.$ac_ext
9296
9297 fi
9298 rm -f conftest.$ac_objext conftest.$ac_ext
9299
9300 fi
9301 echo "$as_me:9301: result: $cf_cv_define_sigwinch" >&5
9302 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9303
9304 if test "$cf_cv_define_sigwinch" = maybe ; then
9305 echo "$as_me:9305: checking for actual SIGWINCH definition" >&5
9306 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9307 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9308   echo $ECHO_N "(cached) $ECHO_C" >&6
9309 else
9310
9311 cf_cv_fixup_sigwinch=unknown
9312 cf_sigwinch=32
9313 while test $cf_sigwinch != 1
9314 do
9315         cat >conftest.$ac_ext <<_ACEOF
9316 #line 9316 "configure"
9317 #include "confdefs.h"
9318
9319 #undef _XOPEN_SOURCE
9320 #undef _POSIX_SOURCE
9321 #undef _POSIX_C_SOURCE
9322 #include <sys/types.h>
9323 #include <sys/signal.h>
9324
9325 int
9326 main ()
9327 {
9328
9329 #if SIGWINCH != $cf_sigwinch
9330 make an error
9331 #endif
9332 int x = SIGWINCH
9333   ;
9334   return 0;
9335 }
9336 _ACEOF
9337 rm -f conftest.$ac_objext
9338 if { (eval echo "$as_me:9338: \"$ac_compile\"") >&5
9339   (eval $ac_compile) 2>&5
9340   ac_status=$?
9341   echo "$as_me:9341: \$? = $ac_status" >&5
9342   (exit $ac_status); } &&
9343          { ac_try='test -s conftest.$ac_objext'
9344   { (eval echo "$as_me:9344: \"$ac_try\"") >&5
9345   (eval $ac_try) 2>&5
9346   ac_status=$?
9347   echo "$as_me:9347: \$? = $ac_status" >&5
9348   (exit $ac_status); }; }; then
9349   cf_cv_fixup_sigwinch=$cf_sigwinch
9350          break
9351 else
9352   echo "$as_me: failed program was:" >&5
9353 cat conftest.$ac_ext >&5
9354 fi
9355 rm -f conftest.$ac_objext conftest.$ac_ext
9356
9357 cf_sigwinch=`expr $cf_sigwinch - 1`
9358 done
9359
9360 fi
9361 echo "$as_me:9361: result: $cf_cv_fixup_sigwinch" >&5
9362 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9363
9364         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9365                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9366         fi
9367 fi
9368
9369 # Checks for CODESET support.
9370
9371 echo "$as_me:9371: checking for nl_langinfo and CODESET" >&5
9372 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9373 if test "${am_cv_langinfo_codeset+set}" = set; then
9374   echo $ECHO_N "(cached) $ECHO_C" >&6
9375 else
9376   cat >conftest.$ac_ext <<_ACEOF
9377 #line 9377 "configure"
9378 #include "confdefs.h"
9379 #include <langinfo.h>
9380 int
9381 main ()
9382 {
9383 char* cs = nl_langinfo(CODESET);
9384   ;
9385   return 0;
9386 }
9387 _ACEOF
9388 rm -f conftest.$ac_objext conftest$ac_exeext
9389 if { (eval echo "$as_me:9389: \"$ac_link\"") >&5
9390   (eval $ac_link) 2>&5
9391   ac_status=$?
9392   echo "$as_me:9392: \$? = $ac_status" >&5
9393   (exit $ac_status); } &&
9394          { ac_try='test -s conftest$ac_exeext'
9395   { (eval echo "$as_me:9395: \"$ac_try\"") >&5
9396   (eval $ac_try) 2>&5
9397   ac_status=$?
9398   echo "$as_me:9398: \$? = $ac_status" >&5
9399   (exit $ac_status); }; }; then
9400   am_cv_langinfo_codeset=yes
9401 else
9402   echo "$as_me: failed program was:" >&5
9403 cat conftest.$ac_ext >&5
9404 am_cv_langinfo_codeset=no
9405 fi
9406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9407
9408 fi
9409 echo "$as_me:9409: result: $am_cv_langinfo_codeset" >&5
9410 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9411         if test $am_cv_langinfo_codeset = yes; then
9412
9413 cat >>confdefs.h <<\EOF
9414 #define HAVE_LANGINFO_CODESET 1
9415 EOF
9416
9417         fi
9418
9419 # use these variables to work around a defect in gcc's fixincludes.
9420 NCURSES_OK_WCHAR_T=
9421 NCURSES_OK_WINT_T=
9422
9423 echo "$as_me:9423: checking if you want wide-character code" >&5
9424 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9425
9426 # Check whether --enable-widec or --disable-widec was given.
9427 if test "${enable_widec+set}" = set; then
9428   enableval="$enable_widec"
9429   with_widec=$enableval
9430 else
9431   with_widec=no
9432 fi;
9433 echo "$as_me:9433: result: $with_widec" >&5
9434 echo "${ECHO_T}$with_widec" >&6
9435
9436 NCURSES_WCWIDTH_GRAPHICS=1
9437
9438 if test "x$with_widec" = xyes ; then
9439         if test "x$disable_lib_suffixes" = xno ; then
9440                 LIB_SUFFIX="w${LIB_SUFFIX}"
9441         fi
9442
9443 cat >>confdefs.h <<\EOF
9444 #define USE_WIDEC_SUPPORT 1
9445 EOF
9446
9447 cat >>confdefs.h <<\EOF
9448 #define NCURSES_WIDECHAR 1
9449 EOF
9450
9451 for ac_header in \
9452 wchar.h \
9453 wctype.h \
9454
9455 do
9456 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9457 echo "$as_me:9457: checking for $ac_header" >&5
9458 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9459 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9460   echo $ECHO_N "(cached) $ECHO_C" >&6
9461 else
9462   cat >conftest.$ac_ext <<_ACEOF
9463 #line 9463 "configure"
9464 #include "confdefs.h"
9465 #include <$ac_header>
9466 _ACEOF
9467 if { (eval echo "$as_me:9467: \"$ac_cpp conftest.$ac_ext\"") >&5
9468   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9469   ac_status=$?
9470   egrep -v '^ *\+' conftest.er1 >conftest.err
9471   rm -f conftest.er1
9472   cat conftest.err >&5
9473   echo "$as_me:9473: \$? = $ac_status" >&5
9474   (exit $ac_status); } >/dev/null; then
9475   if test -s conftest.err; then
9476     ac_cpp_err=$ac_c_preproc_warn_flag
9477   else
9478     ac_cpp_err=
9479   fi
9480 else
9481   ac_cpp_err=yes
9482 fi
9483 if test -z "$ac_cpp_err"; then
9484   eval "$as_ac_Header=yes"
9485 else
9486   echo "$as_me: failed program was:" >&5
9487   cat conftest.$ac_ext >&5
9488   eval "$as_ac_Header=no"
9489 fi
9490 rm -f conftest.err conftest.$ac_ext
9491 fi
9492 echo "$as_me:9492: result: `eval echo '${'$as_ac_Header'}'`" >&5
9493 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9494 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9495   cat >>confdefs.h <<EOF
9496 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9497 EOF
9498
9499 fi
9500 done
9501
9502 echo "$as_me:9502: checking if wchar.h can be used as is" >&5
9503 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9504 if test "${cf_cv_wchar_h_okay+set}" = set; then
9505   echo $ECHO_N "(cached) $ECHO_C" >&6
9506 else
9507
9508 cat >conftest.$ac_ext <<_ACEOF
9509 #line 9509 "configure"
9510 #include "confdefs.h"
9511
9512 #include <stdlib.h>
9513 #ifdef HAVE_WCHAR_H
9514 #include <wchar.h>
9515 #endif
9516 #ifdef HAVE_WCTYPE_H
9517 #include <wctype.h>
9518 #endif
9519
9520 int
9521 main ()
9522 {
9523
9524         wint_t foo = 0;
9525         int bar = iswpunct(foo)
9526   ;
9527   return 0;
9528 }
9529 _ACEOF
9530 rm -f conftest.$ac_objext
9531 if { (eval echo "$as_me:9531: \"$ac_compile\"") >&5
9532   (eval $ac_compile) 2>&5
9533   ac_status=$?
9534   echo "$as_me:9534: \$? = $ac_status" >&5
9535   (exit $ac_status); } &&
9536          { ac_try='test -s conftest.$ac_objext'
9537   { (eval echo "$as_me:9537: \"$ac_try\"") >&5
9538   (eval $ac_try) 2>&5
9539   ac_status=$?
9540   echo "$as_me:9540: \$? = $ac_status" >&5
9541   (exit $ac_status); }; }; then
9542   cf_cv_wchar_h_okay=yes
9543 else
9544   echo "$as_me: failed program was:" >&5
9545 cat conftest.$ac_ext >&5
9546 cf_cv_wchar_h_okay=no
9547 fi
9548 rm -f conftest.$ac_objext conftest.$ac_ext
9549 fi
9550 echo "$as_me:9550: result: $cf_cv_wchar_h_okay" >&5
9551 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9552
9553 if test $cf_cv_wchar_h_okay = no
9554 then
9555
9556 echo "$as_me:9556: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9557 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9558 cat >conftest.$ac_ext <<_ACEOF
9559 #line 9559 "configure"
9560 #include "confdefs.h"
9561 #include <sys/types.h>
9562
9563 int
9564 main ()
9565 {
9566
9567 #ifndef _XOPEN_SOURCE_EXTENDED
9568 make an error
9569 #endif
9570   ;
9571   return 0;
9572 }
9573 _ACEOF
9574 rm -f conftest.$ac_objext
9575 if { (eval echo "$as_me:9575: \"$ac_compile\"") >&5
9576   (eval $ac_compile) 2>&5
9577   ac_status=$?
9578   echo "$as_me:9578: \$? = $ac_status" >&5
9579   (exit $ac_status); } &&
9580          { ac_try='test -s conftest.$ac_objext'
9581   { (eval echo "$as_me:9581: \"$ac_try\"") >&5
9582   (eval $ac_try) 2>&5
9583   ac_status=$?
9584   echo "$as_me:9584: \$? = $ac_status" >&5
9585   (exit $ac_status); }; }; then
9586   cf_result=no
9587 else
9588   echo "$as_me: failed program was:" >&5
9589 cat conftest.$ac_ext >&5
9590 cf_result=yes
9591 fi
9592 rm -f conftest.$ac_objext conftest.$ac_ext
9593 echo "$as_me:9593: result: $cf_result" >&5
9594 echo "${ECHO_T}$cf_result" >&6
9595
9596 if test "$cf_result" = yes ; then
9597         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9598 elif test "x" != "x" ; then
9599         echo "$as_me:9599: checking checking for compatible value versus " >&5
9600 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9601         cat >conftest.$ac_ext <<_ACEOF
9602 #line 9602 "configure"
9603 #include "confdefs.h"
9604 #include <sys/types.h>
9605
9606 int
9607 main ()
9608 {
9609
9610 #if _XOPEN_SOURCE_EXTENDED- < 0
9611 make an error
9612 #endif
9613   ;
9614   return 0;
9615 }
9616 _ACEOF
9617 rm -f conftest.$ac_objext
9618 if { (eval echo "$as_me:9618: \"$ac_compile\"") >&5
9619   (eval $ac_compile) 2>&5
9620   ac_status=$?
9621   echo "$as_me:9621: \$? = $ac_status" >&5
9622   (exit $ac_status); } &&
9623          { ac_try='test -s conftest.$ac_objext'
9624   { (eval echo "$as_me:9624: \"$ac_try\"") >&5
9625   (eval $ac_try) 2>&5
9626   ac_status=$?
9627   echo "$as_me:9627: \$? = $ac_status" >&5
9628   (exit $ac_status); }; }; then
9629   cf_result=yes
9630 else
9631   echo "$as_me: failed program was:" >&5
9632 cat conftest.$ac_ext >&5
9633 cf_result=no
9634 fi
9635 rm -f conftest.$ac_objext conftest.$ac_ext
9636         echo "$as_me:9636: result: $cf_result" >&5
9637 echo "${ECHO_T}$cf_result" >&6
9638         if test "$cf_result" = no ; then
9639                 # perhaps we can override it - try...
9640                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9641         fi
9642 fi
9643
9644 fi
9645
9646 echo "$as_me:9646: checking if wcwidth agrees graphics are single-width" >&5
9647 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9648 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9649   echo $ECHO_N "(cached) $ECHO_C" >&6
9650 else
9651
9652 cat >conftest.in <<CF_EOF
9653 -       VT100 symbols
9654 0x250c  upper left corner
9655 0x2514  lower left corner
9656 0x2510  upper right corner
9657 0x2518  lower right corner
9658 0x251c  tee pointing left
9659 0x2524  tee pointing right
9660 0x2534  tee pointing up
9661 0x252c  tee pointing down
9662 0x2500  horizontal line
9663 0x2502  vertical line
9664 0x253c  large plus or crossover
9665 0x23ba  scan line 1
9666 0x23bd  scan line 9
9667 0x25c6  diamond
9668 0x2592  checker board (stipple)
9669 0x00b0  degree symbol
9670 0x00b1  plus/minus
9671 0x00b7  bullet
9672 -       Teletype 5410v1 symbols
9673 0x2190  arrow pointing left
9674 0x2192  arrow pointing right
9675 0x2193  arrow pointing down
9676 0x2191  arrow pointing up
9677 0x2592  board of squares
9678 0x2603  lantern symbol
9679 0x25ae  solid square block
9680 -       these defaults were invented for ncurses
9681 0x23bb  scan line 3
9682 0x23bc  scan line 7
9683 0x2264  less-than-or-equal-to
9684 0x2265  greater-than-or-equal-to
9685 0x03c0  greek pi
9686 0x2260  not-equal
9687 0x00a3  pound-sterling symbol
9688 -       thick-line-drawing
9689 0x250f  upper left corner
9690 0x2517  lower left corner
9691 0x2513  upper right corner
9692 0x251b  lower right corner
9693 0x2523  tee pointing left
9694 0x252b  tee pointing right
9695 0x253b  tee pointing up
9696 0x2533  tee pointing down
9697 0x2501  horizontal line
9698 0x2503  vertical line
9699 0x254b  large plus or crossover
9700 -       double-line-drawing
9701 0x2554  upper left corner
9702 0x255a  lower left corner
9703 0x2557  upper right corner
9704 0x255d  lower right corner
9705 0x2563  tee pointing left
9706 0x2560  tee pointing right
9707 0x2569  tee pointing up
9708 0x2566  tee pointing down
9709 0x2550  horizontal line
9710 0x2551  vertical line
9711 0x256c  large plus or crossover
9712 CF_EOF
9713 if test "$cross_compiling" = yes; then
9714   cf_cv_wcwidth_graphics=unknown
9715 else
9716   cat >conftest.$ac_ext <<_ACEOF
9717 #line 9717 "configure"
9718 #include "confdefs.h"
9719
9720 #include <locale.h>
9721 #include <stdio.h>
9722 #include <wchar.h>
9723
9724 #define MY_LEN 80
9725
9726 int
9727 main(void)
9728 {
9729         FILE *fp;
9730         int value;
9731         char buffer[MY_LEN + 1];
9732         char notes[MY_LEN + 1];
9733         int totals = 0;
9734         int passed = 0;
9735
9736         if (setlocale(LC_ALL, "en_US.UTF8") ||
9737                 setlocale(LC_ALL, "en_US.UTF-8") ||
9738                 setlocale(LC_ALL, "en_US.utf8") ||
9739                 setlocale(LC_ALL, "en_US.utf-8")) {
9740                 if ((fp = fopen("conftest.in", "r")) != 0) {
9741                         while (fgets(buffer, MY_LEN, fp) != 0) {
9742                                 if (*buffer == '-') {
9743                                         fprintf(stderr, "\t%s", buffer);
9744                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9745                                         ++totals;
9746                                         if (wcwidth(value) == 1)
9747                                                 ++passed;
9748                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9749                                 } else {
9750                                         fprintf(stderr, "?\t%s", buffer);
9751                                 }
9752                         }
9753                 }
9754         }
9755         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9756         return (totals == passed) ? 0 : 1;
9757 }
9758
9759 _ACEOF
9760 rm -f conftest$ac_exeext
9761 if { (eval echo "$as_me:9761: \"$ac_link\"") >&5
9762   (eval $ac_link) 2>&5
9763   ac_status=$?
9764   echo "$as_me:9764: \$? = $ac_status" >&5
9765   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9766   { (eval echo "$as_me:9766: \"$ac_try\"") >&5
9767   (eval $ac_try) 2>&5
9768   ac_status=$?
9769   echo "$as_me:9769: \$? = $ac_status" >&5
9770   (exit $ac_status); }; }; then
9771   cf_cv_wcwidth_graphics=yes
9772 else
9773   echo "$as_me: program exited with status $ac_status" >&5
9774 echo "$as_me: failed program was:" >&5
9775 cat conftest.$ac_ext >&5
9776 cf_cv_wcwidth_graphics=no
9777 fi
9778 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9779 fi
9780
9781 fi
9782 echo "$as_me:9782: result: $cf_cv_wcwidth_graphics" >&5
9783 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9784
9785         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9786
9787         # with_overwrite=no
9788         NCURSES_CH_T=cchar_t
9789
9790 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9791 do
9792 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9793 echo "$as_me:9793: checking for $ac_func" >&5
9794 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9795 if eval "test \"\${$as_ac_var+set}\" = set"; then
9796   echo $ECHO_N "(cached) $ECHO_C" >&6
9797 else
9798   cat >conftest.$ac_ext <<_ACEOF
9799 #line 9799 "configure"
9800 #include "confdefs.h"
9801 /* System header to define __stub macros and hopefully few prototypes,
9802     which can conflict with char $ac_func (); below.  */
9803 #include <assert.h>
9804 /* Override any gcc2 internal prototype to avoid an error.  */
9805 #ifdef __cplusplus
9806 extern "C"
9807 #endif
9808 /* We use char because int might match the return type of a gcc2
9809    builtin and then its argument prototype would still apply.  */
9810 char $ac_func ();
9811 char (*f) ();
9812
9813 int
9814 main ()
9815 {
9816 /* The GNU C library defines this for functions which it implements
9817     to always fail with ENOSYS.  Some functions are actually named
9818     something starting with __ and the normal name is an alias.  */
9819 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9820 choke me
9821 #else
9822 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9823 #endif
9824
9825   ;
9826   return 0;
9827 }
9828 _ACEOF
9829 rm -f conftest.$ac_objext conftest$ac_exeext
9830 if { (eval echo "$as_me:9830: \"$ac_link\"") >&5
9831   (eval $ac_link) 2>&5
9832   ac_status=$?
9833   echo "$as_me:9833: \$? = $ac_status" >&5
9834   (exit $ac_status); } &&
9835          { ac_try='test -s conftest$ac_exeext'
9836   { (eval echo "$as_me:9836: \"$ac_try\"") >&5
9837   (eval $ac_try) 2>&5
9838   ac_status=$?
9839   echo "$as_me:9839: \$? = $ac_status" >&5
9840   (exit $ac_status); }; }; then
9841   eval "$as_ac_var=yes"
9842 else
9843   echo "$as_me: failed program was:" >&5
9844 cat conftest.$ac_ext >&5
9845 eval "$as_ac_var=no"
9846 fi
9847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9848 fi
9849 echo "$as_me:9849: result: `eval echo '${'$as_ac_var'}'`" >&5
9850 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9851 if test `eval echo '${'$as_ac_var'}'` = yes; then
9852   cat >>confdefs.h <<EOF
9853 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9854 EOF
9855
9856 fi
9857 done
9858
9859         if test "x$ac_cv_func_putwc" != xyes ; then
9860
9861 echo "$as_me:9861: checking for multibyte character support" >&5
9862 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9863 if test "${cf_cv_utf8_lib+set}" = set; then
9864   echo $ECHO_N "(cached) $ECHO_C" >&6
9865 else
9866
9867         cf_save_LIBS="$LIBS"
9868         cat >conftest.$ac_ext <<_ACEOF
9869 #line 9869 "configure"
9870 #include "confdefs.h"
9871
9872 #include <stdlib.h>
9873 int
9874 main ()
9875 {
9876 putwc(0,0);
9877   ;
9878   return 0;
9879 }
9880 _ACEOF
9881 rm -f conftest.$ac_objext conftest$ac_exeext
9882 if { (eval echo "$as_me:9882: \"$ac_link\"") >&5
9883   (eval $ac_link) 2>&5
9884   ac_status=$?
9885   echo "$as_me:9885: \$? = $ac_status" >&5
9886   (exit $ac_status); } &&
9887          { ac_try='test -s conftest$ac_exeext'
9888   { (eval echo "$as_me:9888: \"$ac_try\"") >&5
9889   (eval $ac_try) 2>&5
9890   ac_status=$?
9891   echo "$as_me:9891: \$? = $ac_status" >&5
9892   (exit $ac_status); }; }; then
9893   cf_cv_utf8_lib=yes
9894 else
9895   echo "$as_me: failed program was:" >&5
9896 cat conftest.$ac_ext >&5
9897
9898 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9899 # will be set on completion of the AC_TRY_LINK below.
9900 cf_cv_header_path_utf8=
9901 cf_cv_library_path_utf8=
9902
9903 echo "${as_me:-configure}:9903: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9904
9905 cf_save_LIBS="$LIBS"
9906
9907 cat >conftest.$ac_ext <<_ACEOF
9908 #line 9908 "configure"
9909 #include "confdefs.h"
9910
9911 #include <libutf8.h>
9912 int
9913 main ()
9914 {
9915 putwc(0,0);
9916   ;
9917   return 0;
9918 }
9919 _ACEOF
9920 rm -f conftest.$ac_objext conftest$ac_exeext
9921 if { (eval echo "$as_me:9921: \"$ac_link\"") >&5
9922   (eval $ac_link) 2>&5
9923   ac_status=$?
9924   echo "$as_me:9924: \$? = $ac_status" >&5
9925   (exit $ac_status); } &&
9926          { ac_try='test -s conftest$ac_exeext'
9927   { (eval echo "$as_me:9927: \"$ac_try\"") >&5
9928   (eval $ac_try) 2>&5
9929   ac_status=$?
9930   echo "$as_me:9930: \$? = $ac_status" >&5
9931   (exit $ac_status); }; }; then
9932
9933         cf_cv_find_linkage_utf8=yes
9934         cf_cv_header_path_utf8=/usr/include
9935         cf_cv_library_path_utf8=/usr/lib
9936
9937 else
9938   echo "$as_me: failed program was:" >&5
9939 cat conftest.$ac_ext >&5
9940
9941 LIBS="-lutf8  $cf_save_LIBS"
9942
9943 cat >conftest.$ac_ext <<_ACEOF
9944 #line 9944 "configure"
9945 #include "confdefs.h"
9946
9947 #include <libutf8.h>
9948 int
9949 main ()
9950 {
9951 putwc(0,0);
9952   ;
9953   return 0;
9954 }
9955 _ACEOF
9956 rm -f conftest.$ac_objext conftest$ac_exeext
9957 if { (eval echo "$as_me:9957: \"$ac_link\"") >&5
9958   (eval $ac_link) 2>&5
9959   ac_status=$?
9960   echo "$as_me:9960: \$? = $ac_status" >&5
9961   (exit $ac_status); } &&
9962          { ac_try='test -s conftest$ac_exeext'
9963   { (eval echo "$as_me:9963: \"$ac_try\"") >&5
9964   (eval $ac_try) 2>&5
9965   ac_status=$?
9966   echo "$as_me:9966: \$? = $ac_status" >&5
9967   (exit $ac_status); }; }; then
9968
9969         cf_cv_find_linkage_utf8=yes
9970         cf_cv_header_path_utf8=/usr/include
9971         cf_cv_library_path_utf8=/usr/lib
9972         cf_cv_library_file_utf8="-lutf8"
9973
9974 else
9975   echo "$as_me: failed program was:" >&5
9976 cat conftest.$ac_ext >&5
9977
9978         cf_cv_find_linkage_utf8=no
9979         LIBS="$cf_save_LIBS"
9980
9981         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9982
9983 echo "${as_me:-configure}:9983: testing find linkage for utf8 library ..." 1>&5
9984
9985 echo "${as_me:-configure}:9985: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9986
9987         cf_save_CPPFLAGS="$CPPFLAGS"
9988         cf_test_CPPFLAGS="$CPPFLAGS"
9989
9990 cf_search=
9991
9992 # collect the current set of include-directories from compiler flags
9993 cf_header_path_list=""
9994 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9995         for cf_header_path in $CPPFLAGS $CFLAGS
9996         do
9997                 case $cf_header_path in
9998                 (-I*)
9999                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10000
10001 test "x$cf_header_path" != "xNONE" && \
10002 test -d "$cf_header_path" && \
10003  {
10004         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10005         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10006         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10007         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10008         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10009         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10010 }
10011
10012                         cf_header_path_list="$cf_header_path_list $cf_search"
10013                         ;;
10014                 esac
10015         done
10016 fi
10017
10018 # add the variations for the package we are looking for
10019
10020 cf_search=
10021
10022 test "x$prefix" != "xNONE" && \
10023 test -d "$prefix" && \
10024  {
10025         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10026         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10027         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10028         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10029         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10030         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10031 }
10032
10033 for cf_subdir_prefix in \
10034         /usr \
10035         /usr/local \
10036         /usr/pkg \
10037         /opt \
10038         /opt/local \
10039         $HOME
10040 do
10041
10042 test "x$cf_subdir_prefix" != "x$prefix" && \
10043 test -d "$cf_subdir_prefix" && \
10044 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10045         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10046         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10047         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10048         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10049         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10050         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10051 }
10052
10053 done
10054
10055 test "$includedir" != NONE && \
10056 test "$includedir" != "/usr/include" && \
10057 test -d "$includedir" && {
10058         test -d $includedir &&    cf_search="$cf_search $includedir"
10059         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10060 }
10061
10062 test "$oldincludedir" != NONE && \
10063 test "$oldincludedir" != "/usr/include" && \
10064 test -d "$oldincludedir" && {
10065         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10066         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10067 }
10068
10069 cf_search="$cf_search $cf_header_path_list"
10070
10071         for cf_cv_header_path_utf8 in $cf_search
10072         do
10073                 if test -d $cf_cv_header_path_utf8 ; then
10074                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10075
10076 echo "${as_me:-configure}:10076: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10077
10078                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10079                         cat >conftest.$ac_ext <<_ACEOF
10080 #line 10080 "configure"
10081 #include "confdefs.h"
10082
10083 #include <libutf8.h>
10084 int
10085 main ()
10086 {
10087 putwc(0,0);
10088   ;
10089   return 0;
10090 }
10091 _ACEOF
10092 rm -f conftest.$ac_objext
10093 if { (eval echo "$as_me:10093: \"$ac_compile\"") >&5
10094   (eval $ac_compile) 2>&5
10095   ac_status=$?
10096   echo "$as_me:10096: \$? = $ac_status" >&5
10097   (exit $ac_status); } &&
10098          { ac_try='test -s conftest.$ac_objext'
10099   { (eval echo "$as_me:10099: \"$ac_try\"") >&5
10100   (eval $ac_try) 2>&5
10101   ac_status=$?
10102   echo "$as_me:10102: \$? = $ac_status" >&5
10103   (exit $ac_status); }; }; then
10104
10105                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10106
10107 echo "${as_me:-configure}:10107: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10108
10109                                 cf_cv_find_linkage_utf8=maybe
10110                                 cf_test_CPPFLAGS="$CPPFLAGS"
10111                                 break
10112 else
10113   echo "$as_me: failed program was:" >&5
10114 cat conftest.$ac_ext >&5
10115
10116                                 CPPFLAGS="$cf_save_CPPFLAGS"
10117
10118 fi
10119 rm -f conftest.$ac_objext conftest.$ac_ext
10120                 fi
10121         done
10122
10123         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10124
10125 echo "${as_me:-configure}:10125: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10126
10127                 cf_save_LIBS="$LIBS"
10128                 cf_save_LDFLAGS="$LDFLAGS"
10129
10130                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10131
10132 cf_search=
10133 cf_library_path_list=""
10134 if test -n "${LDFLAGS}${LIBS}" ; then
10135         for cf_library_path in $LDFLAGS $LIBS
10136         do
10137                 case $cf_library_path in
10138                 (-L*)
10139                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10140
10141 test "x$cf_library_path" != "xNONE" && \
10142 test -d "$cf_library_path" && \
10143  {
10144         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10145         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10146         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10147         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10148         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10149         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10150 }
10151
10152                         cf_library_path_list="$cf_library_path_list $cf_search"
10153                         ;;
10154                 esac
10155         done
10156 fi
10157
10158 cf_search=
10159
10160 test "x$prefix" != "xNONE" && \
10161 test -d "$prefix" && \
10162  {
10163         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10164         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10165         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10166         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10167         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10168         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10169 }
10170
10171 for cf_subdir_prefix in \
10172         /usr \
10173         /usr/local \
10174         /usr/pkg \
10175         /opt \
10176         /opt/local \
10177         $HOME
10178 do
10179
10180 test "x$cf_subdir_prefix" != "x$prefix" && \
10181 test -d "$cf_subdir_prefix" && \
10182 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10183         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10184         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10185         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10186         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10187         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10188         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10189 }
10190
10191 done
10192
10193 cf_search="$cf_library_path_list $cf_search"
10194
10195                         for cf_cv_library_path_utf8 in $cf_search
10196                         do
10197                                 if test -d $cf_cv_library_path_utf8 ; then
10198                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10199
10200 echo "${as_me:-configure}:10200: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10201
10202                                         CPPFLAGS="$cf_test_CPPFLAGS"
10203                                         LIBS="-lutf8  $cf_save_LIBS"
10204                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10205                                         cat >conftest.$ac_ext <<_ACEOF
10206 #line 10206 "configure"
10207 #include "confdefs.h"
10208
10209 #include <libutf8.h>
10210 int
10211 main ()
10212 {
10213 putwc(0,0);
10214   ;
10215   return 0;
10216 }
10217 _ACEOF
10218 rm -f conftest.$ac_objext conftest$ac_exeext
10219 if { (eval echo "$as_me:10219: \"$ac_link\"") >&5
10220   (eval $ac_link) 2>&5
10221   ac_status=$?
10222   echo "$as_me:10222: \$? = $ac_status" >&5
10223   (exit $ac_status); } &&
10224          { ac_try='test -s conftest$ac_exeext'
10225   { (eval echo "$as_me:10225: \"$ac_try\"") >&5
10226   (eval $ac_try) 2>&5
10227   ac_status=$?
10228   echo "$as_me:10228: \$? = $ac_status" >&5
10229   (exit $ac_status); }; }; then
10230
10231                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10232
10233 echo "${as_me:-configure}:10233: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10234
10235                                         cf_cv_find_linkage_utf8=yes
10236                                         cf_cv_library_file_utf8="-lutf8"
10237                                         break
10238 else
10239   echo "$as_me: failed program was:" >&5
10240 cat conftest.$ac_ext >&5
10241
10242                                         CPPFLAGS="$cf_save_CPPFLAGS"
10243                                         LIBS="$cf_save_LIBS"
10244                                         LDFLAGS="$cf_save_LDFLAGS"
10245
10246 fi
10247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10248                                 fi
10249                         done
10250                         CPPFLAGS="$cf_save_CPPFLAGS"
10251                         LDFLAGS="$cf_save_LDFLAGS"
10252                 fi
10253
10254         else
10255                 cf_cv_find_linkage_utf8=no
10256         fi
10257
10258 fi
10259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10260
10261 fi
10262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10263
10264 LIBS="$cf_save_LIBS"
10265
10266 if test "$cf_cv_find_linkage_utf8" = yes ; then
10267 cf_cv_utf8_lib=add-on
10268 else
10269 cf_cv_utf8_lib=no
10270 fi
10271
10272 fi
10273 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10274 fi
10275 echo "$as_me:10275: result: $cf_cv_utf8_lib" >&5
10276 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10277
10278 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10279 # ncurses/ncursesw:
10280 if test "$cf_cv_utf8_lib" = "add-on" ; then
10281
10282 cat >>confdefs.h <<\EOF
10283 #define HAVE_LIBUTF8_H 1
10284 EOF
10285
10286 if test -n "$cf_cv_header_path_utf8" ; then
10287   for cf_add_incdir in $cf_cv_header_path_utf8
10288   do
10289         while test $cf_add_incdir != /usr/include
10290         do
10291           if test -d $cf_add_incdir
10292           then
10293                 cf_have_incdir=no
10294                 if test -n "$CFLAGS$CPPFLAGS" ; then
10295                   # a loop is needed to ensure we can add subdirs of existing dirs
10296                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10297                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10298                           cf_have_incdir=yes; break
10299                         fi
10300                   done
10301                 fi
10302
10303                 if test "$cf_have_incdir" = no ; then
10304                   if test "$cf_add_incdir" = /usr/local/include ; then
10305                         if test "$GCC" = yes
10306                         then
10307                           cf_save_CPPFLAGS=$CPPFLAGS
10308                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10309                           cat >conftest.$ac_ext <<_ACEOF
10310 #line 10310 "configure"
10311 #include "confdefs.h"
10312 #include <stdio.h>
10313 int
10314 main ()
10315 {
10316 printf("Hello")
10317   ;
10318   return 0;
10319 }
10320 _ACEOF
10321 rm -f conftest.$ac_objext
10322 if { (eval echo "$as_me:10322: \"$ac_compile\"") >&5
10323   (eval $ac_compile) 2>&5
10324   ac_status=$?
10325   echo "$as_me:10325: \$? = $ac_status" >&5
10326   (exit $ac_status); } &&
10327          { ac_try='test -s conftest.$ac_objext'
10328   { (eval echo "$as_me:10328: \"$ac_try\"") >&5
10329   (eval $ac_try) 2>&5
10330   ac_status=$?
10331   echo "$as_me:10331: \$? = $ac_status" >&5
10332   (exit $ac_status); }; }; then
10333   :
10334 else
10335   echo "$as_me: failed program was:" >&5
10336 cat conftest.$ac_ext >&5
10337 cf_have_incdir=yes
10338 fi
10339 rm -f conftest.$ac_objext conftest.$ac_ext
10340                           CPPFLAGS=$cf_save_CPPFLAGS
10341                         fi
10342                   fi
10343                 fi
10344
10345                 if test "$cf_have_incdir" = no ; then
10346                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10347
10348 echo "${as_me:-configure}:10348: testing adding $cf_add_incdir to include-path ..." 1>&5
10349
10350                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10351
10352                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10353                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10354                   cf_add_incdir="$cf_top_incdir"
10355                 else
10356                   break
10357                 fi
10358           else
10359                 break
10360           fi
10361         done
10362   done
10363 fi
10364
10365 if test -n "$cf_cv_library_path_utf8" ; then
10366         for cf_add_libdir in $cf_cv_library_path_utf8
10367         do
10368                 if test $cf_add_libdir = /usr/lib ; then
10369                         :
10370                 elif test -d $cf_add_libdir
10371                 then
10372                         cf_have_libdir=no
10373                         if test -n "$LDFLAGS$LIBS" ; then
10374                                 # a loop is needed to ensure we can add subdirs of existing dirs
10375                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10376                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10377                                                 cf_have_libdir=yes; break
10378                                         fi
10379                                 done
10380                         fi
10381                         if test "$cf_have_libdir" = no ; then
10382                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10383
10384 echo "${as_me:-configure}:10384: testing adding $cf_add_libdir to library-path ..." 1>&5
10385
10386                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10387                         fi
10388                 fi
10389         done
10390 fi
10391
10392 cf_add_libs="$cf_cv_library_file_utf8"
10393 # Filter out duplicates - this happens with badly-designed ".pc" files...
10394 for cf_add_1lib in $LIBS
10395 do
10396         for cf_add_2lib in $cf_add_libs
10397         do
10398                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10399                 then
10400                         cf_add_1lib=
10401                         break
10402                 fi
10403         done
10404         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10405 done
10406 LIBS="$cf_add_libs"
10407
10408 fi
10409
10410                 if test "$cf_cv_utf8_lib" != no ; then
10411                         NCURSES_LIBUTF8=1
10412                 fi
10413         fi
10414
10415 # This is needed on Tru64 5.0 to declare mbstate_t
10416 echo "$as_me:10416: checking if we must include wchar.h to declare mbstate_t" >&5
10417 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10418 if test "${cf_cv_mbstate_t+set}" = set; then
10419   echo $ECHO_N "(cached) $ECHO_C" >&6
10420 else
10421
10422 cat >conftest.$ac_ext <<_ACEOF
10423 #line 10423 "configure"
10424 #include "confdefs.h"
10425
10426 #include <stdlib.h>
10427 #include <stdarg.h>
10428 #include <stdio.h>
10429 #ifdef HAVE_LIBUTF8_H
10430 #include <libutf8.h>
10431 #endif
10432 int
10433 main ()
10434 {
10435 mbstate_t state
10436   ;
10437   return 0;
10438 }
10439 _ACEOF
10440 rm -f conftest.$ac_objext
10441 if { (eval echo "$as_me:10441: \"$ac_compile\"") >&5
10442   (eval $ac_compile) 2>&5
10443   ac_status=$?
10444   echo "$as_me:10444: \$? = $ac_status" >&5
10445   (exit $ac_status); } &&
10446          { ac_try='test -s conftest.$ac_objext'
10447   { (eval echo "$as_me:10447: \"$ac_try\"") >&5
10448   (eval $ac_try) 2>&5
10449   ac_status=$?
10450   echo "$as_me:10450: \$? = $ac_status" >&5
10451   (exit $ac_status); }; }; then
10452   cf_cv_mbstate_t=no
10453 else
10454   echo "$as_me: failed program was:" >&5
10455 cat conftest.$ac_ext >&5
10456 cat >conftest.$ac_ext <<_ACEOF
10457 #line 10457 "configure"
10458 #include "confdefs.h"
10459
10460 #include <stdlib.h>
10461 #include <stdarg.h>
10462 #include <stdio.h>
10463 #include <wchar.h>
10464 #ifdef HAVE_LIBUTF8_H
10465 #include <libutf8.h>
10466 #endif
10467 int
10468 main ()
10469 {
10470 mbstate_t value
10471   ;
10472   return 0;
10473 }
10474 _ACEOF
10475 rm -f conftest.$ac_objext
10476 if { (eval echo "$as_me:10476: \"$ac_compile\"") >&5
10477   (eval $ac_compile) 2>&5
10478   ac_status=$?
10479   echo "$as_me:10479: \$? = $ac_status" >&5
10480   (exit $ac_status); } &&
10481          { ac_try='test -s conftest.$ac_objext'
10482   { (eval echo "$as_me:10482: \"$ac_try\"") >&5
10483   (eval $ac_try) 2>&5
10484   ac_status=$?
10485   echo "$as_me:10485: \$? = $ac_status" >&5
10486   (exit $ac_status); }; }; then
10487   cf_cv_mbstate_t=yes
10488 else
10489   echo "$as_me: failed program was:" >&5
10490 cat conftest.$ac_ext >&5
10491 cf_cv_mbstate_t=unknown
10492 fi
10493 rm -f conftest.$ac_objext conftest.$ac_ext
10494 fi
10495 rm -f conftest.$ac_objext conftest.$ac_ext
10496 fi
10497 echo "$as_me:10497: result: $cf_cv_mbstate_t" >&5
10498 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10499
10500 if test "$cf_cv_mbstate_t" = yes ; then
10501
10502 cat >>confdefs.h <<\EOF
10503 #define NEED_WCHAR_H 1
10504 EOF
10505
10506         NEED_WCHAR_H=1
10507 fi
10508
10509 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10510 if test "$cf_cv_mbstate_t" = unknown ; then
10511         NCURSES_MBSTATE_T=1
10512 fi
10513
10514 # This is needed on Tru64 5.0 to declare wchar_t
10515 echo "$as_me:10515: checking if we must include wchar.h to declare wchar_t" >&5
10516 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10517 if test "${cf_cv_wchar_t+set}" = set; then
10518   echo $ECHO_N "(cached) $ECHO_C" >&6
10519 else
10520
10521 cat >conftest.$ac_ext <<_ACEOF
10522 #line 10522 "configure"
10523 #include "confdefs.h"
10524
10525 #include <stdlib.h>
10526 #include <stdarg.h>
10527 #include <stdio.h>
10528 #ifdef HAVE_LIBUTF8_H
10529 #include <libutf8.h>
10530 #endif
10531 int
10532 main ()
10533 {
10534 wchar_t state
10535   ;
10536   return 0;
10537 }
10538 _ACEOF
10539 rm -f conftest.$ac_objext
10540 if { (eval echo "$as_me:10540: \"$ac_compile\"") >&5
10541   (eval $ac_compile) 2>&5
10542   ac_status=$?
10543   echo "$as_me:10543: \$? = $ac_status" >&5
10544   (exit $ac_status); } &&
10545          { ac_try='test -s conftest.$ac_objext'
10546   { (eval echo "$as_me:10546: \"$ac_try\"") >&5
10547   (eval $ac_try) 2>&5
10548   ac_status=$?
10549   echo "$as_me:10549: \$? = $ac_status" >&5
10550   (exit $ac_status); }; }; then
10551   cf_cv_wchar_t=no
10552 else
10553   echo "$as_me: failed program was:" >&5
10554 cat conftest.$ac_ext >&5
10555 cat >conftest.$ac_ext <<_ACEOF
10556 #line 10556 "configure"
10557 #include "confdefs.h"
10558
10559 #include <stdlib.h>
10560 #include <stdarg.h>
10561 #include <stdio.h>
10562 #include <wchar.h>
10563 #ifdef HAVE_LIBUTF8_H
10564 #include <libutf8.h>
10565 #endif
10566 int
10567 main ()
10568 {
10569 wchar_t value
10570   ;
10571   return 0;
10572 }
10573 _ACEOF
10574 rm -f conftest.$ac_objext
10575 if { (eval echo "$as_me:10575: \"$ac_compile\"") >&5
10576   (eval $ac_compile) 2>&5
10577   ac_status=$?
10578   echo "$as_me:10578: \$? = $ac_status" >&5
10579   (exit $ac_status); } &&
10580          { ac_try='test -s conftest.$ac_objext'
10581   { (eval echo "$as_me:10581: \"$ac_try\"") >&5
10582   (eval $ac_try) 2>&5
10583   ac_status=$?
10584   echo "$as_me:10584: \$? = $ac_status" >&5
10585   (exit $ac_status); }; }; then
10586   cf_cv_wchar_t=yes
10587 else
10588   echo "$as_me: failed program was:" >&5
10589 cat conftest.$ac_ext >&5
10590 cf_cv_wchar_t=unknown
10591 fi
10592 rm -f conftest.$ac_objext conftest.$ac_ext
10593 fi
10594 rm -f conftest.$ac_objext conftest.$ac_ext
10595 fi
10596 echo "$as_me:10596: result: $cf_cv_wchar_t" >&5
10597 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10598
10599 if test "$cf_cv_wchar_t" = yes ; then
10600
10601 cat >>confdefs.h <<\EOF
10602 #define NEED_WCHAR_H 1
10603 EOF
10604
10605         NEED_WCHAR_H=1
10606 fi
10607
10608 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10609 if test "$cf_cv_wchar_t" = unknown ; then
10610         NCURSES_WCHAR_T=1
10611 fi
10612
10613 # if we find wchar_t in either place, use substitution to provide a fallback.
10614 if test "$cf_cv_wchar_t" != unknown ; then
10615         NCURSES_OK_WCHAR_T=1
10616 fi
10617
10618 # This is needed on Tru64 5.0 to declare wint_t
10619 echo "$as_me:10619: checking if we must include wchar.h to declare wint_t" >&5
10620 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10621 if test "${cf_cv_wint_t+set}" = set; then
10622   echo $ECHO_N "(cached) $ECHO_C" >&6
10623 else
10624
10625 cat >conftest.$ac_ext <<_ACEOF
10626 #line 10626 "configure"
10627 #include "confdefs.h"
10628
10629 #include <stdlib.h>
10630 #include <stdarg.h>
10631 #include <stdio.h>
10632 #ifdef HAVE_LIBUTF8_H
10633 #include <libutf8.h>
10634 #endif
10635 int
10636 main ()
10637 {
10638 wint_t state
10639   ;
10640   return 0;
10641 }
10642 _ACEOF
10643 rm -f conftest.$ac_objext
10644 if { (eval echo "$as_me:10644: \"$ac_compile\"") >&5
10645   (eval $ac_compile) 2>&5
10646   ac_status=$?
10647   echo "$as_me:10647: \$? = $ac_status" >&5
10648   (exit $ac_status); } &&
10649          { ac_try='test -s conftest.$ac_objext'
10650   { (eval echo "$as_me:10650: \"$ac_try\"") >&5
10651   (eval $ac_try) 2>&5
10652   ac_status=$?
10653   echo "$as_me:10653: \$? = $ac_status" >&5
10654   (exit $ac_status); }; }; then
10655   cf_cv_wint_t=no
10656 else
10657   echo "$as_me: failed program was:" >&5
10658 cat conftest.$ac_ext >&5
10659 cat >conftest.$ac_ext <<_ACEOF
10660 #line 10660 "configure"
10661 #include "confdefs.h"
10662
10663 #include <stdlib.h>
10664 #include <stdarg.h>
10665 #include <stdio.h>
10666 #include <wchar.h>
10667 #ifdef HAVE_LIBUTF8_H
10668 #include <libutf8.h>
10669 #endif
10670 int
10671 main ()
10672 {
10673 wint_t value
10674   ;
10675   return 0;
10676 }
10677 _ACEOF
10678 rm -f conftest.$ac_objext
10679 if { (eval echo "$as_me:10679: \"$ac_compile\"") >&5
10680   (eval $ac_compile) 2>&5
10681   ac_status=$?
10682   echo "$as_me:10682: \$? = $ac_status" >&5
10683   (exit $ac_status); } &&
10684          { ac_try='test -s conftest.$ac_objext'
10685   { (eval echo "$as_me:10685: \"$ac_try\"") >&5
10686   (eval $ac_try) 2>&5
10687   ac_status=$?
10688   echo "$as_me:10688: \$? = $ac_status" >&5
10689   (exit $ac_status); }; }; then
10690   cf_cv_wint_t=yes
10691 else
10692   echo "$as_me: failed program was:" >&5
10693 cat conftest.$ac_ext >&5
10694 cf_cv_wint_t=unknown
10695 fi
10696 rm -f conftest.$ac_objext conftest.$ac_ext
10697 fi
10698 rm -f conftest.$ac_objext conftest.$ac_ext
10699 fi
10700 echo "$as_me:10700: result: $cf_cv_wint_t" >&5
10701 echo "${ECHO_T}$cf_cv_wint_t" >&6
10702
10703 if test "$cf_cv_wint_t" = yes ; then
10704
10705 cat >>confdefs.h <<\EOF
10706 #define NEED_WCHAR_H 1
10707 EOF
10708
10709         NEED_WCHAR_H=1
10710 fi
10711
10712 # if we do not find wint_t in either place, use substitution to provide a fallback.
10713 if test "$cf_cv_wint_t" = unknown ; then
10714         NCURSES_WINT_T=1
10715 fi
10716
10717 # if we find wint_t in either place, use substitution to provide a fallback.
10718 if test "$cf_cv_wint_t" != unknown ; then
10719         NCURSES_OK_WINT_T=1
10720 fi
10721
10722         if test "$NCURSES_MBSTATE_T" != 0; then
10723
10724 cat >>confdefs.h <<\EOF
10725 #define NEED_MBSTATE_T_DEF 1
10726 EOF
10727
10728         fi
10729 fi
10730
10731 ###   use option --disable-lp64 to allow long chtype
10732 echo "$as_me:10732: checking whether to enable _LP64 definition in curses.h" >&5
10733 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10734
10735 # Check whether --enable-lp64 or --disable-lp64 was given.
10736 if test "${enable_lp64+set}" = set; then
10737   enableval="$enable_lp64"
10738   with_lp64=$enableval
10739 else
10740   with_lp64=$cf_dft_with_lp64
10741 fi;
10742 echo "$as_me:10742: result: $with_lp64" >&5
10743 echo "${ECHO_T}$with_lp64" >&6
10744
10745 if test "x$with_lp64" = xyes ; then
10746         cf_cv_enable_lp64=1
10747 else
10748         cf_cv_enable_lp64=0
10749 fi
10750
10751 # Check whether --enable-largefile or --disable-largefile was given.
10752 if test "${enable_largefile+set}" = set; then
10753   enableval="$enable_largefile"
10754
10755 fi;
10756 if test "$enable_largefile" != no; then
10757
10758   echo "$as_me:10758: checking for special C compiler options needed for large files" >&5
10759 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10760 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10761   echo $ECHO_N "(cached) $ECHO_C" >&6
10762 else
10763   ac_cv_sys_largefile_CC=no
10764      if test "$GCC" != yes; then
10765        ac_save_CC=$CC
10766        while :; do
10767          # IRIX 6.2 and later do not support large files by default,
10768          # so use the C compiler's -n32 option if that helps.
10769          cat >conftest.$ac_ext <<_ACEOF
10770 #line 10770 "configure"
10771 #include "confdefs.h"
10772 #include <sys/types.h>
10773  /* Check that off_t can represent 2**63 - 1 correctly.
10774     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10775     since some C++ compilers masquerading as C compilers
10776     incorrectly reject 9223372036854775807.  */
10777 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10778   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10779                        && LARGE_OFF_T % 2147483647 == 1)
10780                       ? 1 : -1];
10781 int
10782 main ()
10783 {
10784
10785   ;
10786   return 0;
10787 }
10788 _ACEOF
10789          rm -f conftest.$ac_objext
10790 if { (eval echo "$as_me:10790: \"$ac_compile\"") >&5
10791   (eval $ac_compile) 2>&5
10792   ac_status=$?
10793   echo "$as_me:10793: \$? = $ac_status" >&5
10794   (exit $ac_status); } &&
10795          { ac_try='test -s conftest.$ac_objext'
10796   { (eval echo "$as_me:10796: \"$ac_try\"") >&5
10797   (eval $ac_try) 2>&5
10798   ac_status=$?
10799   echo "$as_me:10799: \$? = $ac_status" >&5
10800   (exit $ac_status); }; }; then
10801   break
10802 else
10803   echo "$as_me: failed program was:" >&5
10804 cat conftest.$ac_ext >&5
10805 fi
10806 rm -f conftest.$ac_objext
10807          CC="$CC -n32"
10808          rm -f conftest.$ac_objext
10809 if { (eval echo "$as_me:10809: \"$ac_compile\"") >&5
10810   (eval $ac_compile) 2>&5
10811   ac_status=$?
10812   echo "$as_me:10812: \$? = $ac_status" >&5
10813   (exit $ac_status); } &&
10814          { ac_try='test -s conftest.$ac_objext'
10815   { (eval echo "$as_me:10815: \"$ac_try\"") >&5
10816   (eval $ac_try) 2>&5
10817   ac_status=$?
10818   echo "$as_me:10818: \$? = $ac_status" >&5
10819   (exit $ac_status); }; }; then
10820   ac_cv_sys_largefile_CC=' -n32'; break
10821 else
10822   echo "$as_me: failed program was:" >&5
10823 cat conftest.$ac_ext >&5
10824 fi
10825 rm -f conftest.$ac_objext
10826          break
10827        done
10828        CC=$ac_save_CC
10829        rm -f conftest.$ac_ext
10830     fi
10831 fi
10832 echo "$as_me:10832: result: $ac_cv_sys_largefile_CC" >&5
10833 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10834   if test "$ac_cv_sys_largefile_CC" != no; then
10835     CC=$CC$ac_cv_sys_largefile_CC
10836   fi
10837
10838   echo "$as_me:10838: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10839 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10840 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10841   echo $ECHO_N "(cached) $ECHO_C" >&6
10842 else
10843   while :; do
10844   ac_cv_sys_file_offset_bits=no
10845   cat >conftest.$ac_ext <<_ACEOF
10846 #line 10846 "configure"
10847 #include "confdefs.h"
10848 #include <sys/types.h>
10849  /* Check that off_t can represent 2**63 - 1 correctly.
10850     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10851     since some C++ compilers masquerading as C compilers
10852     incorrectly reject 9223372036854775807.  */
10853 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10854   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10855                        && LARGE_OFF_T % 2147483647 == 1)
10856                       ? 1 : -1];
10857 int
10858 main ()
10859 {
10860
10861   ;
10862   return 0;
10863 }
10864 _ACEOF
10865 rm -f conftest.$ac_objext
10866 if { (eval echo "$as_me:10866: \"$ac_compile\"") >&5
10867   (eval $ac_compile) 2>&5
10868   ac_status=$?
10869   echo "$as_me:10869: \$? = $ac_status" >&5
10870   (exit $ac_status); } &&
10871          { ac_try='test -s conftest.$ac_objext'
10872   { (eval echo "$as_me:10872: \"$ac_try\"") >&5
10873   (eval $ac_try) 2>&5
10874   ac_status=$?
10875   echo "$as_me:10875: \$? = $ac_status" >&5
10876   (exit $ac_status); }; }; then
10877   break
10878 else
10879   echo "$as_me: failed program was:" >&5
10880 cat conftest.$ac_ext >&5
10881 fi
10882 rm -f conftest.$ac_objext conftest.$ac_ext
10883   cat >conftest.$ac_ext <<_ACEOF
10884 #line 10884 "configure"
10885 #include "confdefs.h"
10886 #define _FILE_OFFSET_BITS 64
10887 #include <sys/types.h>
10888  /* Check that off_t can represent 2**63 - 1 correctly.
10889     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10890     since some C++ compilers masquerading as C compilers
10891     incorrectly reject 9223372036854775807.  */
10892 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10893   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10894                        && LARGE_OFF_T % 2147483647 == 1)
10895                       ? 1 : -1];
10896 int
10897 main ()
10898 {
10899
10900   ;
10901   return 0;
10902 }
10903 _ACEOF
10904 rm -f conftest.$ac_objext
10905 if { (eval echo "$as_me:10905: \"$ac_compile\"") >&5
10906   (eval $ac_compile) 2>&5
10907   ac_status=$?
10908   echo "$as_me:10908: \$? = $ac_status" >&5
10909   (exit $ac_status); } &&
10910          { ac_try='test -s conftest.$ac_objext'
10911   { (eval echo "$as_me:10911: \"$ac_try\"") >&5
10912   (eval $ac_try) 2>&5
10913   ac_status=$?
10914   echo "$as_me:10914: \$? = $ac_status" >&5
10915   (exit $ac_status); }; }; then
10916   ac_cv_sys_file_offset_bits=64; break
10917 else
10918   echo "$as_me: failed program was:" >&5
10919 cat conftest.$ac_ext >&5
10920 fi
10921 rm -f conftest.$ac_objext conftest.$ac_ext
10922   break
10923 done
10924 fi
10925 echo "$as_me:10925: result: $ac_cv_sys_file_offset_bits" >&5
10926 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10927 if test "$ac_cv_sys_file_offset_bits" != no; then
10928
10929 cat >>confdefs.h <<EOF
10930 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10931 EOF
10932
10933 fi
10934 rm -rf conftest*
10935   echo "$as_me:10935: checking for _LARGE_FILES value needed for large files" >&5
10936 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10937 if test "${ac_cv_sys_large_files+set}" = set; then
10938   echo $ECHO_N "(cached) $ECHO_C" >&6
10939 else
10940   while :; do
10941   ac_cv_sys_large_files=no
10942   cat >conftest.$ac_ext <<_ACEOF
10943 #line 10943 "configure"
10944 #include "confdefs.h"
10945 #include <sys/types.h>
10946  /* Check that off_t can represent 2**63 - 1 correctly.
10947     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10948     since some C++ compilers masquerading as C compilers
10949     incorrectly reject 9223372036854775807.  */
10950 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10951   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10952                        && LARGE_OFF_T % 2147483647 == 1)
10953                       ? 1 : -1];
10954 int
10955 main ()
10956 {
10957
10958   ;
10959   return 0;
10960 }
10961 _ACEOF
10962 rm -f conftest.$ac_objext
10963 if { (eval echo "$as_me:10963: \"$ac_compile\"") >&5
10964   (eval $ac_compile) 2>&5
10965   ac_status=$?
10966   echo "$as_me:10966: \$? = $ac_status" >&5
10967   (exit $ac_status); } &&
10968          { ac_try='test -s conftest.$ac_objext'
10969   { (eval echo "$as_me:10969: \"$ac_try\"") >&5
10970   (eval $ac_try) 2>&5
10971   ac_status=$?
10972   echo "$as_me:10972: \$? = $ac_status" >&5
10973   (exit $ac_status); }; }; then
10974   break
10975 else
10976   echo "$as_me: failed program was:" >&5
10977 cat conftest.$ac_ext >&5
10978 fi
10979 rm -f conftest.$ac_objext conftest.$ac_ext
10980   cat >conftest.$ac_ext <<_ACEOF
10981 #line 10981 "configure"
10982 #include "confdefs.h"
10983 #define _LARGE_FILES 1
10984 #include <sys/types.h>
10985  /* Check that off_t can represent 2**63 - 1 correctly.
10986     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10987     since some C++ compilers masquerading as C compilers
10988     incorrectly reject 9223372036854775807.  */
10989 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10990   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10991                        && LARGE_OFF_T % 2147483647 == 1)
10992                       ? 1 : -1];
10993 int
10994 main ()
10995 {
10996
10997   ;
10998   return 0;
10999 }
11000 _ACEOF
11001 rm -f conftest.$ac_objext
11002 if { (eval echo "$as_me:11002: \"$ac_compile\"") >&5
11003   (eval $ac_compile) 2>&5
11004   ac_status=$?
11005   echo "$as_me:11005: \$? = $ac_status" >&5
11006   (exit $ac_status); } &&
11007          { ac_try='test -s conftest.$ac_objext'
11008   { (eval echo "$as_me:11008: \"$ac_try\"") >&5
11009   (eval $ac_try) 2>&5
11010   ac_status=$?
11011   echo "$as_me:11011: \$? = $ac_status" >&5
11012   (exit $ac_status); }; }; then
11013   ac_cv_sys_large_files=1; break
11014 else
11015   echo "$as_me: failed program was:" >&5
11016 cat conftest.$ac_ext >&5
11017 fi
11018 rm -f conftest.$ac_objext conftest.$ac_ext
11019   break
11020 done
11021 fi
11022 echo "$as_me:11022: result: $ac_cv_sys_large_files" >&5
11023 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11024 if test "$ac_cv_sys_large_files" != no; then
11025
11026 cat >>confdefs.h <<EOF
11027 #define _LARGE_FILES $ac_cv_sys_large_files
11028 EOF
11029
11030 fi
11031 rm -rf conftest*
11032 fi
11033
11034         if test "$enable_largefile" != no ; then
11035         echo "$as_me:11035: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11036 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11037 if test "${ac_cv_sys_largefile_source+set}" = set; then
11038   echo $ECHO_N "(cached) $ECHO_C" >&6
11039 else
11040   while :; do
11041   ac_cv_sys_largefile_source=no
11042   cat >conftest.$ac_ext <<_ACEOF
11043 #line 11043 "configure"
11044 #include "confdefs.h"
11045 #include <stdio.h>
11046 int
11047 main ()
11048 {
11049 return !fseeko;
11050   ;
11051   return 0;
11052 }
11053 _ACEOF
11054 rm -f conftest.$ac_objext
11055 if { (eval echo "$as_me:11055: \"$ac_compile\"") >&5
11056   (eval $ac_compile) 2>&5
11057   ac_status=$?
11058   echo "$as_me:11058: \$? = $ac_status" >&5
11059   (exit $ac_status); } &&
11060          { ac_try='test -s conftest.$ac_objext'
11061   { (eval echo "$as_me:11061: \"$ac_try\"") >&5
11062   (eval $ac_try) 2>&5
11063   ac_status=$?
11064   echo "$as_me:11064: \$? = $ac_status" >&5
11065   (exit $ac_status); }; }; then
11066   break
11067 else
11068   echo "$as_me: failed program was:" >&5
11069 cat conftest.$ac_ext >&5
11070 fi
11071 rm -f conftest.$ac_objext conftest.$ac_ext
11072   cat >conftest.$ac_ext <<_ACEOF
11073 #line 11073 "configure"
11074 #include "confdefs.h"
11075 #define _LARGEFILE_SOURCE 1
11076 #include <stdio.h>
11077 int
11078 main ()
11079 {
11080 return !fseeko;
11081   ;
11082   return 0;
11083 }
11084 _ACEOF
11085 rm -f conftest.$ac_objext
11086 if { (eval echo "$as_me:11086: \"$ac_compile\"") >&5
11087   (eval $ac_compile) 2>&5
11088   ac_status=$?
11089   echo "$as_me:11089: \$? = $ac_status" >&5
11090   (exit $ac_status); } &&
11091          { ac_try='test -s conftest.$ac_objext'
11092   { (eval echo "$as_me:11092: \"$ac_try\"") >&5
11093   (eval $ac_try) 2>&5
11094   ac_status=$?
11095   echo "$as_me:11095: \$? = $ac_status" >&5
11096   (exit $ac_status); }; }; then
11097   ac_cv_sys_largefile_source=1; break
11098 else
11099   echo "$as_me: failed program was:" >&5
11100 cat conftest.$ac_ext >&5
11101 fi
11102 rm -f conftest.$ac_objext conftest.$ac_ext
11103   break
11104 done
11105 fi
11106 echo "$as_me:11106: result: $ac_cv_sys_largefile_source" >&5
11107 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11108 if test "$ac_cv_sys_largefile_source" != no; then
11109
11110 cat >>confdefs.h <<EOF
11111 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11112 EOF
11113
11114 fi
11115 rm -rf conftest*
11116
11117 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11118 # in glibc 2.1.3, but that breaks too many other things.
11119 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11120 echo "$as_me:11120: checking for fseeko" >&5
11121 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11122 if test "${ac_cv_func_fseeko+set}" = set; then
11123   echo $ECHO_N "(cached) $ECHO_C" >&6
11124 else
11125   cat >conftest.$ac_ext <<_ACEOF
11126 #line 11126 "configure"
11127 #include "confdefs.h"
11128 #include <stdio.h>
11129 int
11130 main ()
11131 {
11132 return fseeko && fseeko (stdin, 0, 0);
11133   ;
11134   return 0;
11135 }
11136 _ACEOF
11137 rm -f conftest.$ac_objext conftest$ac_exeext
11138 if { (eval echo "$as_me:11138: \"$ac_link\"") >&5
11139   (eval $ac_link) 2>&5
11140   ac_status=$?
11141   echo "$as_me:11141: \$? = $ac_status" >&5
11142   (exit $ac_status); } &&
11143          { ac_try='test -s conftest$ac_exeext'
11144   { (eval echo "$as_me:11144: \"$ac_try\"") >&5
11145   (eval $ac_try) 2>&5
11146   ac_status=$?
11147   echo "$as_me:11147: \$? = $ac_status" >&5
11148   (exit $ac_status); }; }; then
11149   ac_cv_func_fseeko=yes
11150 else
11151   echo "$as_me: failed program was:" >&5
11152 cat conftest.$ac_ext >&5
11153 ac_cv_func_fseeko=no
11154 fi
11155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11156 fi
11157 echo "$as_me:11157: result: $ac_cv_func_fseeko" >&5
11158 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11159 if test $ac_cv_func_fseeko = yes; then
11160
11161 cat >>confdefs.h <<\EOF
11162 #define HAVE_FSEEKO 1
11163 EOF
11164
11165 fi
11166
11167         # Normally we would collect these definitions in the config.h,
11168         # but (like _XOPEN_SOURCE), some environments rely on having these
11169         # defined before any of the system headers are included.  Another
11170         # case comes up with C++, e.g., on AIX the compiler compiles the
11171         # header files by themselves before looking at the body files it is
11172         # told to compile.  For ncurses, those header files do not include
11173         # the config.h
11174         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11175         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11176         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11177
11178         echo "$as_me:11178: checking whether to use struct dirent64" >&5
11179 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11180 if test "${cf_cv_struct_dirent64+set}" = set; then
11181   echo $ECHO_N "(cached) $ECHO_C" >&6
11182 else
11183
11184                 cat >conftest.$ac_ext <<_ACEOF
11185 #line 11185 "configure"
11186 #include "confdefs.h"
11187
11188 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11189 #include <sys/types.h>
11190 #include <dirent.h>
11191
11192 int
11193 main ()
11194 {
11195
11196                 /* if transitional largefile support is setup, this is true */
11197                 extern struct dirent64 * readdir(DIR *);
11198                 struct dirent64 *x = readdir((DIR *)0);
11199                 struct dirent *y = readdir((DIR *)0);
11200                 int z = x - y;
11201
11202   ;
11203   return 0;
11204 }
11205 _ACEOF
11206 rm -f conftest.$ac_objext
11207 if { (eval echo "$as_me:11207: \"$ac_compile\"") >&5
11208   (eval $ac_compile) 2>&5
11209   ac_status=$?
11210   echo "$as_me:11210: \$? = $ac_status" >&5
11211   (exit $ac_status); } &&
11212          { ac_try='test -s conftest.$ac_objext'
11213   { (eval echo "$as_me:11213: \"$ac_try\"") >&5
11214   (eval $ac_try) 2>&5
11215   ac_status=$?
11216   echo "$as_me:11216: \$? = $ac_status" >&5
11217   (exit $ac_status); }; }; then
11218   cf_cv_struct_dirent64=yes
11219 else
11220   echo "$as_me: failed program was:" >&5
11221 cat conftest.$ac_ext >&5
11222 cf_cv_struct_dirent64=no
11223 fi
11224 rm -f conftest.$ac_objext conftest.$ac_ext
11225
11226 fi
11227 echo "$as_me:11227: result: $cf_cv_struct_dirent64" >&5
11228 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11229         test "$cf_cv_struct_dirent64" = yes &&
11230 cat >>confdefs.h <<\EOF
11231 #define HAVE_STRUCT_DIRENT64 1
11232 EOF
11233
11234         fi
11235
11236 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11237 echo "$as_me:11237: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11238 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11239
11240 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11241 if test "${enable_tparm_varargs+set}" = set; then
11242   enableval="$enable_tparm_varargs"
11243   with_tparm_varargs=$enableval
11244 else
11245   with_tparm_varargs=yes
11246 fi;
11247 echo "$as_me:11247: result: $with_tparm_varargs" >&5
11248 echo "${ECHO_T}$with_tparm_varargs" >&6
11249 NCURSES_TPARM_VARARGS=0
11250 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11251
11252 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11253 if test "$with_ticlib" != no ; then
11254 echo "$as_me:11254: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11255 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11256
11257 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11258 if test "${enable_tic_depends+set}" = set; then
11259   enableval="$enable_tic_depends"
11260   with_tic_depends=$enableval
11261 else
11262   with_tic_depends=yes
11263 fi;
11264 echo "$as_me:11264: result: $with_tic_depends" >&5
11265 echo "${ECHO_T}$with_tic_depends" >&6
11266 else
11267         with_tic_depends=no
11268 fi
11269
11270 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11271 echo "$as_me:11271: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11272 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11273
11274 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11275 if test "${enable_wattr_macros+set}" = set; then
11276   enableval="$enable_wattr_macros"
11277   with_wattr_macros=$enableval
11278 else
11279   with_wattr_macros=yes
11280 fi;
11281 if [ "x$with_wattr_macros" != xyes ]; then
11282         NCURSES_WATTR_MACROS=0
11283         echo "$as_me:11283: result: yes" >&5
11284 echo "${ECHO_T}yes" >&6
11285 else
11286         NCURSES_WATTR_MACROS=1
11287         echo "$as_me:11287: result: no" >&5
11288 echo "${ECHO_T}no" >&6
11289 fi
11290
11291 ###   use option --with-bool to override bool's type
11292 echo "$as_me:11292: checking for type of bool" >&5
11293 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11294
11295 # Check whether --with-bool or --without-bool was given.
11296 if test "${with_bool+set}" = set; then
11297   withval="$with_bool"
11298   NCURSES_BOOL="$withval"
11299 else
11300   NCURSES_BOOL=auto
11301 fi;
11302 echo "$as_me:11302: result: $NCURSES_BOOL" >&5
11303 echo "${ECHO_T}$NCURSES_BOOL" >&6
11304
11305 echo "$as_me:11305: checking for alternate terminal capabilities file" >&5
11306 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11307
11308 # Check whether --with-caps or --without-caps was given.
11309 if test "${with_caps+set}" = set; then
11310   withval="$with_caps"
11311   TERMINFO_CAPS=Caps.$withval
11312 else
11313   TERMINFO_CAPS=Caps
11314 fi;
11315 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11316 echo "$as_me:11316: result: $TERMINFO_CAPS" >&5
11317 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11318
11319 ###   use option --with-chtype to override chtype's type
11320 echo "$as_me:11320: checking for type of chtype" >&5
11321 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11322
11323 # Check whether --with-chtype or --without-chtype was given.
11324 if test "${with_chtype+set}" = set; then
11325   withval="$with_chtype"
11326   NCURSES_CHTYPE="$withval"
11327 else
11328   NCURSES_CHTYPE=$cf_dft_chtype
11329 fi;
11330 echo "$as_me:11330: result: $NCURSES_CHTYPE" >&5
11331 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11332
11333 ###   use option --with-ospeed to override ospeed's type
11334 echo "$as_me:11334: checking for type of ospeed" >&5
11335 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11336
11337 # Check whether --with-ospeed or --without-ospeed was given.
11338 if test "${with_ospeed+set}" = set; then
11339   withval="$with_ospeed"
11340   NCURSES_OSPEED="$withval"
11341 else
11342   NCURSES_OSPEED=short
11343 fi;
11344 echo "$as_me:11344: result: $NCURSES_OSPEED" >&5
11345 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11346
11347 ###   use option --with-mmask-t to override mmask_t's type
11348 echo "$as_me:11348: checking for type of mmask_t" >&5
11349 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11350
11351 # Check whether --with-mmask-t or --without-mmask-t was given.
11352 if test "${with_mmask_t+set}" = set; then
11353   withval="$with_mmask_t"
11354   NCURSES_MMASK_T="$withval"
11355 else
11356   NCURSES_MMASK_T=$cf_dft_mmask_t
11357 fi;
11358 echo "$as_me:11358: result: $NCURSES_MMASK_T" >&5
11359 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11360
11361 ###   use option --with-ccharw-max to override CCHARW_MAX size
11362 echo "$as_me:11362: checking for size CCHARW_MAX" >&5
11363 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11364
11365 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11366 if test "${with_ccharw_max+set}" = set; then
11367   withval="$with_ccharw_max"
11368   NCURSES_CCHARW_MAX="$withval"
11369 else
11370   NCURSES_CCHARW_MAX=5
11371 fi;
11372 echo "$as_me:11372: result: $NCURSES_CCHARW_MAX" >&5
11373 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11374
11375 ###   use option --with-tparm-arg to override tparm's argument type
11376 echo "$as_me:11376: checking for type of tparm args" >&5
11377 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11378
11379 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11380 if test "${with_tparm_arg+set}" = set; then
11381   withval="$with_tparm_arg"
11382   NCURSES_TPARM_ARG="$withval"
11383 else
11384   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11385 fi;
11386 echo "$as_me:11386: result: $NCURSES_TPARM_ARG" >&5
11387 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11388
11389 ### Enable compiling-in rcs id's
11390 echo "$as_me:11390: checking if RCS identifiers should be compiled-in" >&5
11391 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11392
11393 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11394 if test "${with_rcs_ids+set}" = set; then
11395   withval="$with_rcs_ids"
11396   with_rcs_ids=$withval
11397 else
11398   with_rcs_ids=no
11399 fi;
11400 echo "$as_me:11400: result: $with_rcs_ids" >&5
11401 echo "${ECHO_T}$with_rcs_ids" >&6
11402 test "x$with_rcs_ids" = xyes &&
11403 cat >>confdefs.h <<\EOF
11404 #define USE_RCS_IDS 1
11405 EOF
11406
11407 ###############################################################################
11408
11409 echo "$as_me:11409: checking format of man-pages" >&5
11410 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11411
11412 # Check whether --with-manpage-format or --without-manpage-format was given.
11413 if test "${with_manpage_format+set}" = set; then
11414   withval="$with_manpage_format"
11415   MANPAGE_FORMAT=$withval
11416 else
11417   MANPAGE_FORMAT=unknown
11418 fi;
11419
11420 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11421 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11422
11423 cf_unknown=
11424
11425 case $MANPAGE_FORMAT in
11426 (unknown)
11427         if test -z "$MANPATH" ; then
11428                 MANPATH="/usr/man:/usr/share/man"
11429         fi
11430
11431         # look for the 'date' man-page (it's most likely to be installed!)
11432         MANPAGE_FORMAT=
11433         cf_preform=no
11434         cf_catonly=yes
11435         cf_example=date
11436
11437         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11438         for cf_dir in $MANPATH; do
11439                 test -z "$cf_dir" && cf_dir=/usr/man
11440                 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
11441                 do
11442                         cf_test=`echo $cf_name | sed -e 's/*//'`
11443                         if test "x$cf_test" = "x$cf_name" ; then
11444
11445                                 case "$cf_name" in
11446                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11447                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11448                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11449                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11450                                 esac
11451
11452                                 case "$cf_name" in
11453                                 ($cf_dir/man*)
11454                                         cf_catonly=no
11455                                         ;;
11456                                 ($cf_dir/cat*)
11457                                         cf_preform=yes
11458                                         ;;
11459                                 esac
11460                                 break
11461                         fi
11462
11463                         # if we found a match in either man* or cat*, stop looking
11464                         if test -n "$MANPAGE_FORMAT" ; then
11465                                 cf_found=no
11466                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11467                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11468                                 case "$cf_name" in
11469                                 ($cf_dir/cat*)
11470                                         cf_found=yes
11471                                         ;;
11472                                 esac
11473                                 test $cf_found=yes && break
11474                         fi
11475                 done
11476                 # only check the first directory in $MANPATH where we find manpages
11477                 if test -n "$MANPAGE_FORMAT" ; then
11478                         break
11479                 fi
11480         done
11481         # if we did not find the example, just assume it is normal
11482         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11483         IFS="$ac_save_ifs"
11484         ;;
11485 (*)
11486         for cf_option in $MANPAGE_FORMAT; do
11487         case $cf_option in
11488         (gzip|compress|BSDI|normal|formatted|catonly)
11489                 ;;
11490         (*)
11491                 cf_unknown="$cf_unknown $cf_option"
11492                 ;;
11493         esac
11494         done
11495         ;;
11496 esac
11497
11498 echo "$as_me:11498: result: $MANPAGE_FORMAT" >&5
11499 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11500 if test -n "$cf_unknown" ; then
11501         { echo "$as_me:11501: WARNING: Unexpected manpage-format $cf_unknown" >&5
11502 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11503 fi
11504
11505 echo "$as_me:11505: checking for manpage renaming" >&5
11506 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11507
11508 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11509 if test "${with_manpage_renames+set}" = set; then
11510   withval="$with_manpage_renames"
11511   MANPAGE_RENAMES=$withval
11512 else
11513   MANPAGE_RENAMES=yes
11514 fi;
11515
11516 case ".$MANPAGE_RENAMES" in
11517 (.no)
11518         ;;
11519 (.|.yes)
11520         # Debian 'man' program?
11521         if test -f /etc/debian_version ; then
11522                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11523         else
11524                 MANPAGE_RENAMES=no
11525         fi
11526         ;;
11527 esac
11528
11529 if test "$MANPAGE_RENAMES" != no ; then
11530         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11531                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11532         elif test ! -f $MANPAGE_RENAMES ; then
11533                 { { echo "$as_me:11533: error: not a filename: $MANPAGE_RENAMES" >&5
11534 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11535    { (exit 1); exit 1; }; }
11536         fi
11537
11538         test ! -d man && mkdir man
11539
11540         # Construct a sed-script to perform renaming within man-pages
11541         if test -n "$MANPAGE_RENAMES" ; then
11542                 test ! -d man && mkdir man
11543                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11544         fi
11545 fi
11546
11547 echo "$as_me:11547: result: $MANPAGE_RENAMES" >&5
11548 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11549
11550 echo "$as_me:11550: checking if manpage aliases will be installed" >&5
11551 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11552
11553 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11554 if test "${with_manpage_aliases+set}" = set; then
11555   withval="$with_manpage_aliases"
11556   MANPAGE_ALIASES=$withval
11557 else
11558   MANPAGE_ALIASES=yes
11559 fi;
11560
11561 echo "$as_me:11561: result: $MANPAGE_ALIASES" >&5
11562 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11563
11564 case "x$LN_S" in
11565 (xln*)
11566         cf_use_symlinks=yes
11567         ;;
11568 (*)
11569         cf_use_symlinks=no
11570         ;;
11571 esac
11572
11573 MANPAGE_SYMLINKS=no
11574 if test "$MANPAGE_ALIASES" = yes ; then
11575 echo "$as_me:11575: checking if manpage symlinks should be used" >&5
11576 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11577
11578 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11579 if test "${with_manpage_symlinks+set}" = set; then
11580   withval="$with_manpage_symlinks"
11581   MANPAGE_SYMLINKS=$withval
11582 else
11583   MANPAGE_SYMLINKS=$cf_use_symlinks
11584 fi;
11585
11586 if test "$$cf_use_symlinks" = no; then
11587 if test "$MANPAGE_SYMLINKS" = yes ; then
11588         { echo "$as_me:11588: WARNING: cannot make symlinks" >&5
11589 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11590         MANPAGE_SYMLINKS=no
11591 fi
11592 fi
11593
11594 echo "$as_me:11594: result: $MANPAGE_SYMLINKS" >&5
11595 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11596 fi
11597
11598 echo "$as_me:11598: checking for manpage tbl" >&5
11599 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11600
11601 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11602 if test "${with_manpage_tbl+set}" = set; then
11603   withval="$with_manpage_tbl"
11604   MANPAGE_TBL=$withval
11605 else
11606   MANPAGE_TBL=no
11607 fi;
11608
11609 echo "$as_me:11609: result: $MANPAGE_TBL" >&5
11610 echo "${ECHO_T}$MANPAGE_TBL" >&6
11611
11612 if test "$prefix" = "NONE" ; then
11613         cf_prefix="$ac_default_prefix"
11614 else
11615         cf_prefix="$prefix"
11616 fi
11617
11618 case "$MANPAGE_FORMAT" in
11619 (*catonly*)
11620         cf_format=yes
11621         cf_inboth=no
11622         ;;
11623 (*formatted*)
11624         cf_format=yes
11625         cf_inboth=yes
11626         ;;
11627 (*)
11628         cf_format=no
11629         cf_inboth=no
11630         ;;
11631 esac
11632
11633 test ! -d man && mkdir man
11634
11635 cf_so_strip=
11636 cf_compress=
11637 case "$MANPAGE_FORMAT" in
11638 (*compress*)
11639         cf_so_strip="Z"
11640         cf_compress=compress
11641         ;;
11642 (*gzip*)
11643         cf_so_strip="gz"
11644         cf_compress=gzip
11645         ;;
11646 esac
11647
11648 cf_edit_man=./edit_man.sh
11649 cf_man_alias=`pwd`/man_alias.sed
11650
11651 cat >$cf_edit_man <<CF_EOF
11652 #! $SHELL
11653 # this script is generated by the configure-script CF_MAN_PAGES macro.
11654
11655 prefix="$cf_prefix"
11656 datarootdir="$datarootdir"
11657 datadir="$datadir"
11658
11659 NCURSES_MAJOR="$NCURSES_MAJOR"
11660 NCURSES_MINOR="$NCURSES_MINOR"
11661 NCURSES_PATCH="$NCURSES_PATCH"
11662
11663 NCURSES_OSPEED="$NCURSES_OSPEED"
11664 TERMINFO="$TERMINFO"
11665
11666 INSTALL="$INSTALL"
11667 INSTALL_DATA="$INSTALL_DATA"
11668
11669 transform="$program_transform_name"
11670
11671 TMP=\${TMPDIR:=/tmp}/man\$\$
11672 trap "rm -f \$TMP" 0 1 2 5 15
11673
11674 form=\$1
11675 shift || exit 1
11676
11677 verb=\$1
11678 shift || exit 1
11679
11680 mandir=\$1
11681 shift || exit 1
11682
11683 srcdir=\$1
11684 top_srcdir=\$srcdir/..
11685 shift || exit 1
11686
11687 if test "\$form" = normal ; then
11688         if test "$cf_format" = yes ; then
11689         if test "$cf_inboth" = no ; then
11690                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11691                 exit $?
11692         fi
11693         fi
11694         cf_subdir=\$mandir/man
11695         cf_tables=$MANPAGE_TBL
11696 else
11697         cf_subdir=\$mandir/cat
11698         cf_tables=yes
11699 fi
11700
11701 # process the list of source-files
11702 for i in \$* ; do
11703 case \$i in
11704 (*.orig|*.rej) ;;
11705 (*.[0-9]*)
11706         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11707         if test \$verb = installing ; then
11708         if test ! -d \$cf_subdir\${section} ; then
11709                 mkdir -p \$cf_subdir\$section
11710         fi
11711         fi
11712
11713         # replace variables in man page
11714         if test ! -f $cf_man_alias ; then
11715 cat >>$cf_man_alias <<-CF_EOF2
11716                 s,@DATADIR@,\$datadir,g
11717                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11718                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11719                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11720                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11721                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11722                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11723 CF_EOF
11724
11725         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11726         do
11727                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11728                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11729 cat >>$cf_edit_man <<-CF_EOF
11730                 s,@$cf_NAME@,$cf_name,g
11731 CF_EOF
11732         done
11733
11734 cat >>$cf_edit_man <<CF_EOF
11735 CF_EOF2
11736                 echo "...made $cf_man_alias"
11737         fi
11738
11739         aliases=
11740         cf_source=\`basename \$i\`
11741         inalias=\$cf_source
11742         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11743         if test ! -f \$inalias ; then
11744                 echo .. skipped \$cf_source
11745                 continue
11746         fi
11747 CF_EOF
11748
11749 if test "$MANPAGE_ALIASES" != no ; then
11750 cat >>$cf_edit_man <<CF_EOF
11751         nCurses=ignore.3x
11752         test $with_curses_h = yes && nCurses=ncurses.3x
11753         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11754 CF_EOF
11755 fi
11756
11757 if test "$MANPAGE_RENAMES" = no ; then
11758 cat >>$cf_edit_man <<CF_EOF
11759         # perform program transformations for section 1 man pages
11760         if test \$section = 1 ; then
11761                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11762         else
11763                 cf_target=\$cf_subdir\${section}/\$cf_source
11764         fi
11765 CF_EOF
11766 else
11767 cat >>$cf_edit_man <<CF_EOF
11768         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11769         if test -z "\$cf_target" ; then
11770                 echo '? missing rename for '\$cf_source
11771                 cf_target="\$cf_source"
11772         fi
11773         cf_target="\$cf_subdir\${section}/\${cf_target}"
11774
11775 CF_EOF
11776 fi
11777
11778 cat >>$cf_edit_man <<CF_EOF
11779         sed     -f $cf_man_alias \\
11780 CF_EOF
11781
11782 if test -f $MANPAGE_RENAMES ; then
11783 cat >>$cf_edit_man <<CF_EOF
11784                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11785 CF_EOF
11786 else
11787 cat >>$cf_edit_man <<CF_EOF
11788                 < \$i >\$TMP
11789 CF_EOF
11790 fi
11791
11792 cat >>$cf_edit_man <<CF_EOF
11793 if test \$cf_tables = yes ; then
11794         tbl \$TMP >\$TMP.out
11795         mv \$TMP.out \$TMP
11796 fi
11797 CF_EOF
11798
11799 if test $with_overwrite != yes ; then
11800 cat >>$cf_edit_man <<CF_EOF
11801         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11802         mv \$TMP.out \$TMP
11803 CF_EOF
11804 fi
11805
11806 if test $with_curses_h != yes ; then
11807 cat >>$cf_edit_man <<CF_EOF
11808         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11809         mv \$TMP.out \$TMP
11810 CF_EOF
11811 fi
11812
11813 cat >>$cf_edit_man <<CF_EOF
11814         if test \$form = format ; then
11815                 nroff -man \$TMP >\$TMP.out
11816                 mv \$TMP.out \$TMP
11817         fi
11818 CF_EOF
11819
11820 if test -n "$cf_compress" ; then
11821 cat >>$cf_edit_man <<CF_EOF
11822         if test \$verb = installing ; then
11823         if ( $cf_compress -f \$TMP )
11824         then
11825                 mv \$TMP.$cf_so_strip \$TMP
11826         fi
11827         fi
11828         cf_target="\$cf_target.$cf_so_strip"
11829 CF_EOF
11830 fi
11831
11832 case "$MANPAGE_FORMAT" in
11833 (*BSDI*)
11834 cat >>$cf_edit_man <<CF_EOF
11835         if test \$form = format ; then
11836                 # BSDI installs only .0 suffixes in the cat directories
11837                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11838         fi
11839 CF_EOF
11840   ;;
11841 esac
11842
11843 cat >>$cf_edit_man <<CF_EOF
11844         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11845         if test \$verb = installing ; then
11846                 echo \$verb \$cf_target
11847                 \$INSTALL_DATA \$TMP \$cf_target
11848                 test -d \$cf_subdir\${section} &&
11849                 test -n "\$aliases" && (
11850                         cd \$cf_subdir\${section} && (
11851                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11852                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11853                                 cf_target=\`basename \$cf_target\`
11854                                 for cf_alias in \$aliases
11855                                 do
11856                                         if test \$section = 1 ; then
11857                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11858                                         fi
11859
11860                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11861                                                 if test -f \$cf_alias\${suffix} ; then
11862                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11863                                                         then
11864                                                                 continue
11865                                                         fi
11866                                                 fi
11867                                                 echo .. \$verb alias \$cf_alias\${suffix}
11868 CF_EOF
11869 case "x$LN_S" in
11870 (*-f)
11871 cat >>$cf_edit_man <<CF_EOF
11872                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11873 CF_EOF
11874         ;;
11875 (*)
11876 cat >>$cf_edit_man <<CF_EOF
11877                                                 rm -f \$cf_alias\${suffix}
11878                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11879 CF_EOF
11880         ;;
11881 esac
11882 cat >>$cf_edit_man <<CF_EOF
11883                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11884                                                 echo ".so \$cf_source" >\$TMP
11885 CF_EOF
11886 if test -n "$cf_compress" ; then
11887 cat >>$cf_edit_man <<CF_EOF
11888                                                 if test -n "$cf_so_strip" ; then
11889                                                         $cf_compress -f \$TMP
11890                                                         mv \$TMP.$cf_so_strip \$TMP
11891                                                 fi
11892 CF_EOF
11893 fi
11894 cat >>$cf_edit_man <<CF_EOF
11895                                                 echo .. \$verb alias \$cf_alias\${suffix}
11896                                                 rm -f \$cf_alias\${suffix}
11897                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11898                                         fi
11899                                 done
11900                         )
11901                 )
11902         elif test \$verb = removing ; then
11903                 test -f \$cf_target && (
11904                         echo \$verb \$cf_target
11905                         rm -f \$cf_target
11906                 )
11907                 test -d \$cf_subdir\${section} &&
11908                 test -n "\$aliases" && (
11909                         cd \$cf_subdir\${section} && (
11910                                 for cf_alias in \$aliases
11911                                 do
11912                                         if test \$section = 1 ; then
11913                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11914                                         fi
11915
11916                                         echo .. \$verb alias \$cf_alias\${suffix}
11917                                         rm -f \$cf_alias\${suffix}
11918                                 done
11919                         )
11920                 )
11921         else
11922 #               echo ".hy 0"
11923                 cat \$TMP
11924         fi
11925         ;;
11926 esac
11927 done
11928
11929 if test $cf_inboth = yes ; then
11930 if test \$form != format ; then
11931         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11932 fi
11933 fi
11934
11935 exit 0
11936 CF_EOF
11937 chmod 755 $cf_edit_man
11938
11939 ###############################################################################
11940
11941 ### Note that some functions (such as const) are normally disabled anyway.
11942 echo "$as_me:11942: checking if you want to build with function extensions" >&5
11943 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11944
11945 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11946 if test "${enable_ext_funcs+set}" = set; then
11947   enableval="$enable_ext_funcs"
11948   with_ext_funcs=$enableval
11949 else
11950   with_ext_funcs=yes
11951 fi;
11952 echo "$as_me:11952: result: $with_ext_funcs" >&5
11953 echo "${ECHO_T}$with_ext_funcs" >&6
11954 if test "x$with_ext_funcs" = xyes ; then
11955         NCURSES_EXT_FUNCS=1
11956
11957 cat >>confdefs.h <<\EOF
11958 #define HAVE_ASSUME_DEFAULT_COLORS 1
11959 EOF
11960
11961 cat >>confdefs.h <<\EOF
11962 #define HAVE_CURSES_VERSION 1
11963 EOF
11964
11965 cat >>confdefs.h <<\EOF
11966 #define HAVE_HAS_KEY 1
11967 EOF
11968
11969 cat >>confdefs.h <<\EOF
11970 #define HAVE_RESIZETERM 1
11971 EOF
11972
11973 cat >>confdefs.h <<\EOF
11974 #define HAVE_RESIZE_TERM 1
11975 EOF
11976
11977 cat >>confdefs.h <<\EOF
11978 #define HAVE_TERM_ENTRY_H 1
11979 EOF
11980
11981 cat >>confdefs.h <<\EOF
11982 #define HAVE_USE_DEFAULT_COLORS 1
11983 EOF
11984
11985 cat >>confdefs.h <<\EOF
11986 #define HAVE_USE_EXTENDED_NAMES 1
11987 EOF
11988
11989 cat >>confdefs.h <<\EOF
11990 #define HAVE_USE_SCREEN 1
11991 EOF
11992
11993 cat >>confdefs.h <<\EOF
11994 #define HAVE_USE_WINDOW 1
11995 EOF
11996
11997 cat >>confdefs.h <<\EOF
11998 #define HAVE_WRESIZE 1
11999 EOF
12000
12001 cat >>confdefs.h <<\EOF
12002 #define NCURSES_EXT_FUNCS 1
12003 EOF
12004
12005         GENERATED_EXT_FUNCS=generated
12006         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
12007 else
12008         NCURSES_EXT_FUNCS=0
12009         GENERATED_EXT_FUNCS=
12010 fi
12011
12012 echo "$as_me:12012: checking if you want to build with SCREEN extensions" >&5
12013 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
12014
12015 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
12016 if test "${enable_sp_funcs+set}" = set; then
12017   enableval="$enable_sp_funcs"
12018   with_sp_funcs=$enableval
12019 else
12020   with_sp_funcs=$cf_dft_ext_spfuncs
12021 fi;
12022 echo "$as_me:12022: result: $with_sp_funcs" >&5
12023 echo "${ECHO_T}$with_sp_funcs" >&6
12024 if test "x$with_sp_funcs" = xyes ; then
12025         NCURSES_SP_FUNCS=1
12026
12027 cat >>confdefs.h <<\EOF
12028 #define NCURSES_SP_FUNCS 1
12029 EOF
12030
12031         GENERATED_SP_FUNCS=generated
12032 else
12033         NCURSES_SP_FUNCS=0
12034         GENERATED_SP_FUNCS=
12035 fi
12036
12037 echo "$as_me:12037: checking if you want to build with terminal-driver" >&5
12038 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12039
12040 # Check whether --enable-term-driver or --disable-term-driver was given.
12041 if test "${enable_term_driver+set}" = set; then
12042   enableval="$enable_term_driver"
12043   with_term_driver=$enableval
12044 else
12045   with_term_driver=no
12046 fi;
12047 echo "$as_me:12047: result: $with_term_driver" >&5
12048 echo "${ECHO_T}$with_term_driver" >&6
12049 if test "x$with_term_driver" = xyes ; then
12050
12051 cat >>confdefs.h <<\EOF
12052 #define USE_TERM_DRIVER 1
12053 EOF
12054
12055         if test "x$with_termlib" != xno ; then
12056                 { { echo "$as_me:12056: error: The term-driver option conflicts with the termlib option" >&5
12057 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12058    { (exit 1); exit 1; }; }
12059         fi
12060         if test "x$with_sp_funcs" != xyes ; then
12061                 { { echo "$as_me:12061: error: The term-driver option relies upon sp-funcs" >&5
12062 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12063    { (exit 1); exit 1; }; }
12064         fi
12065 fi
12066
12067 ###   use option --enable-const to turn on use of const beyond that in XSI.
12068 echo "$as_me:12068: checking for extended use of const keyword" >&5
12069 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12070
12071 # Check whether --enable-const or --disable-const was given.
12072 if test "${enable_const+set}" = set; then
12073   enableval="$enable_const"
12074   with_ext_const=$enableval
12075 else
12076   with_ext_const=$cf_dft_ext_const
12077 fi;
12078 echo "$as_me:12078: result: $with_ext_const" >&5
12079 echo "${ECHO_T}$with_ext_const" >&6
12080 NCURSES_CONST='/*nothing*/'
12081 if test "x$with_ext_const" = xyes ; then
12082         NCURSES_CONST=const
12083 fi
12084
12085 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12086 echo "$as_me:12086: checking if you want to use extended colors" >&5
12087 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12088
12089 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12090 if test "${enable_ext_colors+set}" = set; then
12091   enableval="$enable_ext_colors"
12092   with_ext_colors=$enableval
12093 else
12094   with_ext_colors=$cf_dft_ext_colors
12095 fi;
12096 echo "$as_me:12096: result: $with_ext_colors" >&5
12097 echo "${ECHO_T}$with_ext_colors" >&6
12098 NCURSES_EXT_COLORS=0
12099 if test "x$with_ext_colors" = xyes ; then
12100         if test "x$with_widec" != xyes ; then
12101                 { echo "$as_me:12101: WARNING: This option applies only to wide-character library" >&5
12102 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
12103         else
12104                 # cannot be ABI 5 since it changes sizeof(cchar_t)
12105
12106 if test "${with_abi_version+set}" != set; then
12107         case $cf_cv_rel_version in
12108         (5.*)
12109                 cf_cv_rel_version=6.0
12110                 cf_cv_abi_version=6
12111                 { echo "$as_me:12111: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12112 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12113                 ;;
12114         esac
12115 fi
12116
12117                 NCURSES_EXT_COLORS=1
12118
12119 cat >>confdefs.h <<\EOF
12120 #define NCURSES_EXT_COLORS 1
12121 EOF
12122
12123         fi
12124 fi
12125
12126 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
12127 echo "$as_me:12127: checking if you want to use extended mouse encoding" >&5
12128 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12129
12130 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12131 if test "${enable_ext_mouse+set}" = set; then
12132   enableval="$enable_ext_mouse"
12133   with_ext_mouse=$enableval
12134 else
12135   with_ext_mouse=$cf_dft_ext_mouse
12136 fi;
12137 echo "$as_me:12137: result: $with_ext_mouse" >&5
12138 echo "${ECHO_T}$with_ext_mouse" >&6
12139 NCURSES_MOUSE_VERSION=1
12140 if test "x$with_ext_mouse" = xyes ; then
12141         NCURSES_MOUSE_VERSION=2
12142
12143 if test "${with_abi_version+set}" != set; then
12144         case $cf_cv_rel_version in
12145         (5.*)
12146                 cf_cv_rel_version=6.0
12147                 cf_cv_abi_version=6
12148                 { echo "$as_me:12148: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12149 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12150                 ;;
12151         esac
12152 fi
12153
12154 fi
12155
12156 ###   use option --enable-ext-putwin to turn on extended screendumps
12157 echo "$as_me:12157: checking if you want to use extended putwin/screendump" >&5
12158 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12159
12160 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12161 if test "${enable_ext_putwin+set}" = set; then
12162   enableval="$enable_ext_putwin"
12163   with_ext_putwin=$enableval
12164 else
12165   with_ext_putwin=$cf_dft_ext_putwin
12166 fi;
12167 echo "$as_me:12167: result: $with_ext_putwin" >&5
12168 echo "${ECHO_T}$with_ext_putwin" >&6
12169 if test "x$with_ext_putwin" = xyes ; then
12170
12171 cat >>confdefs.h <<\EOF
12172 #define NCURSES_EXT_PUTWIN 1
12173 EOF
12174
12175 fi
12176
12177 echo "$as_me:12177: checking if you want \$NCURSES_NO_PADDING code" >&5
12178 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12179
12180 # Check whether --enable-no-padding or --disable-no-padding was given.
12181 if test "${enable_no_padding+set}" = set; then
12182   enableval="$enable_no_padding"
12183   with_no_padding=$enableval
12184 else
12185   with_no_padding=$with_ext_funcs
12186 fi;
12187 echo "$as_me:12187: result: $with_no_padding" >&5
12188 echo "${ECHO_T}$with_no_padding" >&6
12189 test "x$with_no_padding" = xyes &&
12190 cat >>confdefs.h <<\EOF
12191 #define NCURSES_NO_PADDING 1
12192 EOF
12193
12194 echo "$as_me:12194: checking for ANSI C header files" >&5
12195 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12196 if test "${ac_cv_header_stdc+set}" = set; then
12197   echo $ECHO_N "(cached) $ECHO_C" >&6
12198 else
12199   cat >conftest.$ac_ext <<_ACEOF
12200 #line 12200 "configure"
12201 #include "confdefs.h"
12202 #include <stdlib.h>
12203 #include <stdarg.h>
12204 #include <string.h>
12205 #include <float.h>
12206
12207 _ACEOF
12208 if { (eval echo "$as_me:12208: \"$ac_cpp conftest.$ac_ext\"") >&5
12209   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12210   ac_status=$?
12211   egrep -v '^ *\+' conftest.er1 >conftest.err
12212   rm -f conftest.er1
12213   cat conftest.err >&5
12214   echo "$as_me:12214: \$? = $ac_status" >&5
12215   (exit $ac_status); } >/dev/null; then
12216   if test -s conftest.err; then
12217     ac_cpp_err=$ac_c_preproc_warn_flag
12218   else
12219     ac_cpp_err=
12220   fi
12221 else
12222   ac_cpp_err=yes
12223 fi
12224 if test -z "$ac_cpp_err"; then
12225   ac_cv_header_stdc=yes
12226 else
12227   echo "$as_me: failed program was:" >&5
12228   cat conftest.$ac_ext >&5
12229   ac_cv_header_stdc=no
12230 fi
12231 rm -f conftest.err conftest.$ac_ext
12232
12233 if test $ac_cv_header_stdc = yes; then
12234   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12235   cat >conftest.$ac_ext <<_ACEOF
12236 #line 12236 "configure"
12237 #include "confdefs.h"
12238 #include <string.h>
12239
12240 _ACEOF
12241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12242   egrep "memchr" >/dev/null 2>&1; then
12243   :
12244 else
12245   ac_cv_header_stdc=no
12246 fi
12247 rm -rf conftest*
12248
12249 fi
12250
12251 if test $ac_cv_header_stdc = yes; then
12252   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12253   cat >conftest.$ac_ext <<_ACEOF
12254 #line 12254 "configure"
12255 #include "confdefs.h"
12256 #include <stdlib.h>
12257
12258 _ACEOF
12259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12260   egrep "free" >/dev/null 2>&1; then
12261   :
12262 else
12263   ac_cv_header_stdc=no
12264 fi
12265 rm -rf conftest*
12266
12267 fi
12268
12269 if test $ac_cv_header_stdc = yes; then
12270   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12271   if test "$cross_compiling" = yes; then
12272   :
12273 else
12274   cat >conftest.$ac_ext <<_ACEOF
12275 #line 12275 "configure"
12276 #include "confdefs.h"
12277 #include <ctype.h>
12278 #if ((' ' & 0x0FF) == 0x020)
12279 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12280 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12281 #else
12282 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12283                      || ('j' <= (c) && (c) <= 'r') \
12284                      || ('s' <= (c) && (c) <= 'z'))
12285 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12286 #endif
12287
12288 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12289 int
12290 main ()
12291 {
12292   int i;
12293   for (i = 0; i < 256; i++)
12294     if (XOR (islower (i), ISLOWER (i))
12295         || toupper (i) != TOUPPER (i))
12296       $ac_main_return(2);
12297   $ac_main_return (0);
12298 }
12299 _ACEOF
12300 rm -f conftest$ac_exeext
12301 if { (eval echo "$as_me:12301: \"$ac_link\"") >&5
12302   (eval $ac_link) 2>&5
12303   ac_status=$?
12304   echo "$as_me:12304: \$? = $ac_status" >&5
12305   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12306   { (eval echo "$as_me:12306: \"$ac_try\"") >&5
12307   (eval $ac_try) 2>&5
12308   ac_status=$?
12309   echo "$as_me:12309: \$? = $ac_status" >&5
12310   (exit $ac_status); }; }; then
12311   :
12312 else
12313   echo "$as_me: program exited with status $ac_status" >&5
12314 echo "$as_me: failed program was:" >&5
12315 cat conftest.$ac_ext >&5
12316 ac_cv_header_stdc=no
12317 fi
12318 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12319 fi
12320 fi
12321 fi
12322 echo "$as_me:12322: result: $ac_cv_header_stdc" >&5
12323 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12324 if test $ac_cv_header_stdc = yes; then
12325
12326 cat >>confdefs.h <<\EOF
12327 #define STDC_HEADERS 1
12328 EOF
12329
12330 fi
12331
12332 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12333
12334 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12335                   inttypes.h stdint.h unistd.h
12336 do
12337 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12338 echo "$as_me:12338: checking for $ac_header" >&5
12339 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12340 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12341   echo $ECHO_N "(cached) $ECHO_C" >&6
12342 else
12343   cat >conftest.$ac_ext <<_ACEOF
12344 #line 12344 "configure"
12345 #include "confdefs.h"
12346 $ac_includes_default
12347 #include <$ac_header>
12348 _ACEOF
12349 rm -f conftest.$ac_objext
12350 if { (eval echo "$as_me:12350: \"$ac_compile\"") >&5
12351   (eval $ac_compile) 2>&5
12352   ac_status=$?
12353   echo "$as_me:12353: \$? = $ac_status" >&5
12354   (exit $ac_status); } &&
12355          { ac_try='test -s conftest.$ac_objext'
12356   { (eval echo "$as_me:12356: \"$ac_try\"") >&5
12357   (eval $ac_try) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit $ac_status); }; }; then
12361   eval "$as_ac_Header=yes"
12362 else
12363   echo "$as_me: failed program was:" >&5
12364 cat conftest.$ac_ext >&5
12365 eval "$as_ac_Header=no"
12366 fi
12367 rm -f conftest.$ac_objext conftest.$ac_ext
12368 fi
12369 echo "$as_me:12369: result: `eval echo '${'$as_ac_Header'}'`" >&5
12370 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12371 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12372   cat >>confdefs.h <<EOF
12373 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12374 EOF
12375
12376 fi
12377 done
12378
12379 echo "$as_me:12379: checking for signed char" >&5
12380 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12381 if test "${ac_cv_type_signed_char+set}" = set; then
12382   echo $ECHO_N "(cached) $ECHO_C" >&6
12383 else
12384   cat >conftest.$ac_ext <<_ACEOF
12385 #line 12385 "configure"
12386 #include "confdefs.h"
12387 $ac_includes_default
12388 int
12389 main ()
12390 {
12391 if ((signed char *) 0)
12392   return 0;
12393 if (sizeof (signed char))
12394   return 0;
12395   ;
12396   return 0;
12397 }
12398 _ACEOF
12399 rm -f conftest.$ac_objext
12400 if { (eval echo "$as_me:12400: \"$ac_compile\"") >&5
12401   (eval $ac_compile) 2>&5
12402   ac_status=$?
12403   echo "$as_me:12403: \$? = $ac_status" >&5
12404   (exit $ac_status); } &&
12405          { ac_try='test -s conftest.$ac_objext'
12406   { (eval echo "$as_me:12406: \"$ac_try\"") >&5
12407   (eval $ac_try) 2>&5
12408   ac_status=$?
12409   echo "$as_me:12409: \$? = $ac_status" >&5
12410   (exit $ac_status); }; }; then
12411   ac_cv_type_signed_char=yes
12412 else
12413   echo "$as_me: failed program was:" >&5
12414 cat conftest.$ac_ext >&5
12415 ac_cv_type_signed_char=no
12416 fi
12417 rm -f conftest.$ac_objext conftest.$ac_ext
12418 fi
12419 echo "$as_me:12419: result: $ac_cv_type_signed_char" >&5
12420 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12421
12422 echo "$as_me:12422: checking size of signed char" >&5
12423 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12424 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12425   echo $ECHO_N "(cached) $ECHO_C" >&6
12426 else
12427   if test "$ac_cv_type_signed_char" = yes; then
12428   if test "$cross_compiling" = yes; then
12429   # Depending upon the size, compute the lo and hi bounds.
12430 cat >conftest.$ac_ext <<_ACEOF
12431 #line 12431 "configure"
12432 #include "confdefs.h"
12433 $ac_includes_default
12434 int
12435 main ()
12436 {
12437 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12438   ;
12439   return 0;
12440 }
12441 _ACEOF
12442 rm -f conftest.$ac_objext
12443 if { (eval echo "$as_me:12443: \"$ac_compile\"") >&5
12444   (eval $ac_compile) 2>&5
12445   ac_status=$?
12446   echo "$as_me:12446: \$? = $ac_status" >&5
12447   (exit $ac_status); } &&
12448          { ac_try='test -s conftest.$ac_objext'
12449   { (eval echo "$as_me:12449: \"$ac_try\"") >&5
12450   (eval $ac_try) 2>&5
12451   ac_status=$?
12452   echo "$as_me:12452: \$? = $ac_status" >&5
12453   (exit $ac_status); }; }; then
12454   ac_lo=0 ac_mid=0
12455   while :; do
12456     cat >conftest.$ac_ext <<_ACEOF
12457 #line 12457 "configure"
12458 #include "confdefs.h"
12459 $ac_includes_default
12460 int
12461 main ()
12462 {
12463 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12464   ;
12465   return 0;
12466 }
12467 _ACEOF
12468 rm -f conftest.$ac_objext
12469 if { (eval echo "$as_me:12469: \"$ac_compile\"") >&5
12470   (eval $ac_compile) 2>&5
12471   ac_status=$?
12472   echo "$as_me:12472: \$? = $ac_status" >&5
12473   (exit $ac_status); } &&
12474          { ac_try='test -s conftest.$ac_objext'
12475   { (eval echo "$as_me:12475: \"$ac_try\"") >&5
12476   (eval $ac_try) 2>&5
12477   ac_status=$?
12478   echo "$as_me:12478: \$? = $ac_status" >&5
12479   (exit $ac_status); }; }; then
12480   ac_hi=$ac_mid; break
12481 else
12482   echo "$as_me: failed program was:" >&5
12483 cat conftest.$ac_ext >&5
12484 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12485 fi
12486 rm -f conftest.$ac_objext conftest.$ac_ext
12487   done
12488 else
12489   echo "$as_me: failed program was:" >&5
12490 cat conftest.$ac_ext >&5
12491 ac_hi=-1 ac_mid=-1
12492   while :; do
12493     cat >conftest.$ac_ext <<_ACEOF
12494 #line 12494 "configure"
12495 #include "confdefs.h"
12496 $ac_includes_default
12497 int
12498 main ()
12499 {
12500 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12501   ;
12502   return 0;
12503 }
12504 _ACEOF
12505 rm -f conftest.$ac_objext
12506 if { (eval echo "$as_me:12506: \"$ac_compile\"") >&5
12507   (eval $ac_compile) 2>&5
12508   ac_status=$?
12509   echo "$as_me:12509: \$? = $ac_status" >&5
12510   (exit $ac_status); } &&
12511          { ac_try='test -s conftest.$ac_objext'
12512   { (eval echo "$as_me:12512: \"$ac_try\"") >&5
12513   (eval $ac_try) 2>&5
12514   ac_status=$?
12515   echo "$as_me:12515: \$? = $ac_status" >&5
12516   (exit $ac_status); }; }; then
12517   ac_lo=$ac_mid; break
12518 else
12519   echo "$as_me: failed program was:" >&5
12520 cat conftest.$ac_ext >&5
12521 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12522 fi
12523 rm -f conftest.$ac_objext conftest.$ac_ext
12524   done
12525 fi
12526 rm -f conftest.$ac_objext conftest.$ac_ext
12527 # Binary search between lo and hi bounds.
12528 while test "x$ac_lo" != "x$ac_hi"; do
12529   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12530   cat >conftest.$ac_ext <<_ACEOF
12531 #line 12531 "configure"
12532 #include "confdefs.h"
12533 $ac_includes_default
12534 int
12535 main ()
12536 {
12537 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12538   ;
12539   return 0;
12540 }
12541 _ACEOF
12542 rm -f conftest.$ac_objext
12543 if { (eval echo "$as_me:12543: \"$ac_compile\"") >&5
12544   (eval $ac_compile) 2>&5
12545   ac_status=$?
12546   echo "$as_me:12546: \$? = $ac_status" >&5
12547   (exit $ac_status); } &&
12548          { ac_try='test -s conftest.$ac_objext'
12549   { (eval echo "$as_me:12549: \"$ac_try\"") >&5
12550   (eval $ac_try) 2>&5
12551   ac_status=$?
12552   echo "$as_me:12552: \$? = $ac_status" >&5
12553   (exit $ac_status); }; }; then
12554   ac_hi=$ac_mid
12555 else
12556   echo "$as_me: failed program was:" >&5
12557 cat conftest.$ac_ext >&5
12558 ac_lo=`expr $ac_mid + 1`
12559 fi
12560 rm -f conftest.$ac_objext conftest.$ac_ext
12561 done
12562 ac_cv_sizeof_signed_char=$ac_lo
12563 else
12564   if test "$cross_compiling" = yes; then
12565   { { echo "$as_me:12565: error: cannot run test program while cross compiling" >&5
12566 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12567    { (exit 1); exit 1; }; }
12568 else
12569   cat >conftest.$ac_ext <<_ACEOF
12570 #line 12570 "configure"
12571 #include "confdefs.h"
12572 $ac_includes_default
12573 int
12574 main ()
12575 {
12576 FILE *f = fopen ("conftest.val", "w");
12577 if (!f)
12578   $ac_main_return (1);
12579 fprintf (f, "%d", (sizeof (signed char)));
12580 fclose (f);
12581   ;
12582   return 0;
12583 }
12584 _ACEOF
12585 rm -f conftest$ac_exeext
12586 if { (eval echo "$as_me:12586: \"$ac_link\"") >&5
12587   (eval $ac_link) 2>&5
12588   ac_status=$?
12589   echo "$as_me:12589: \$? = $ac_status" >&5
12590   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12591   { (eval echo "$as_me:12591: \"$ac_try\"") >&5
12592   (eval $ac_try) 2>&5
12593   ac_status=$?
12594   echo "$as_me:12594: \$? = $ac_status" >&5
12595   (exit $ac_status); }; }; then
12596   ac_cv_sizeof_signed_char=`cat conftest.val`
12597 else
12598   echo "$as_me: program exited with status $ac_status" >&5
12599 echo "$as_me: failed program was:" >&5
12600 cat conftest.$ac_ext >&5
12601 fi
12602 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12603 fi
12604 fi
12605 rm -f conftest.val
12606 else
12607   ac_cv_sizeof_signed_char=0
12608 fi
12609 fi
12610 echo "$as_me:12610: result: $ac_cv_sizeof_signed_char" >&5
12611 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12612 cat >>confdefs.h <<EOF
12613 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12614 EOF
12615
12616 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12617         NCURSES_SBOOL="signed char"
12618 else
12619         NCURSES_SBOOL="char"
12620 fi
12621 echo "$as_me:12621: checking if you want to use signed Boolean array in term.h" >&5
12622 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12623
12624 # Check whether --enable-signed-char or --disable-signed-char was given.
12625 if test "${enable_signed_char+set}" = set; then
12626   enableval="$enable_signed_char"
12627   with_signed_char=$enableval
12628 else
12629   with_signed_char=no
12630 fi;
12631 echo "$as_me:12631: result: $with_signed_char" >&5
12632 echo "${ECHO_T}$with_signed_char" >&6
12633 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12634
12635 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12636 echo "$as_me:12636: checking if you want SIGWINCH handler" >&5
12637 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12638
12639 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12640 if test "${enable_sigwinch+set}" = set; then
12641   enableval="$enable_sigwinch"
12642   with_sigwinch=$enableval
12643 else
12644   with_sigwinch=$with_ext_funcs
12645 fi;
12646 echo "$as_me:12646: result: $with_sigwinch" >&5
12647 echo "${ECHO_T}$with_sigwinch" >&6
12648 test "x$with_sigwinch" = xyes &&
12649 cat >>confdefs.h <<\EOF
12650 #define USE_SIGWINCH 1
12651 EOF
12652
12653 ###   use option --enable-tcap-names to allow user to define new capabilities
12654 echo "$as_me:12654: checking if you want user-definable terminal capabilities like termcap" >&5
12655 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12656
12657 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12658 if test "${enable_tcap_names+set}" = set; then
12659   enableval="$enable_tcap_names"
12660   with_tcap_names=$enableval
12661 else
12662   with_tcap_names=$with_ext_funcs
12663 fi;
12664 echo "$as_me:12664: result: $with_tcap_names" >&5
12665 echo "${ECHO_T}$with_tcap_names" >&6
12666 NCURSES_XNAMES=0
12667 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12668
12669 ##############################################################################
12670
12671 echo "$as_me:12671: checking if you want to link with the pthread library" >&5
12672 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12673
12674 # Check whether --with-pthread or --without-pthread was given.
12675 if test "${with_pthread+set}" = set; then
12676   withval="$with_pthread"
12677   with_pthread=$withval
12678 else
12679   with_pthread=no
12680 fi;
12681 echo "$as_me:12681: result: $with_pthread" >&5
12682 echo "${ECHO_T}$with_pthread" >&6
12683
12684 if test "$with_pthread" != no ; then
12685         echo "$as_me:12685: checking for pthread.h" >&5
12686 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12687 if test "${ac_cv_header_pthread_h+set}" = set; then
12688   echo $ECHO_N "(cached) $ECHO_C" >&6
12689 else
12690   cat >conftest.$ac_ext <<_ACEOF
12691 #line 12691 "configure"
12692 #include "confdefs.h"
12693 #include <pthread.h>
12694 _ACEOF
12695 if { (eval echo "$as_me:12695: \"$ac_cpp conftest.$ac_ext\"") >&5
12696   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12697   ac_status=$?
12698   egrep -v '^ *\+' conftest.er1 >conftest.err
12699   rm -f conftest.er1
12700   cat conftest.err >&5
12701   echo "$as_me:12701: \$? = $ac_status" >&5
12702   (exit $ac_status); } >/dev/null; then
12703   if test -s conftest.err; then
12704     ac_cpp_err=$ac_c_preproc_warn_flag
12705   else
12706     ac_cpp_err=
12707   fi
12708 else
12709   ac_cpp_err=yes
12710 fi
12711 if test -z "$ac_cpp_err"; then
12712   ac_cv_header_pthread_h=yes
12713 else
12714   echo "$as_me: failed program was:" >&5
12715   cat conftest.$ac_ext >&5
12716   ac_cv_header_pthread_h=no
12717 fi
12718 rm -f conftest.err conftest.$ac_ext
12719 fi
12720 echo "$as_me:12720: result: $ac_cv_header_pthread_h" >&5
12721 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12722 if test $ac_cv_header_pthread_h = yes; then
12723
12724 cat >>confdefs.h <<\EOF
12725 #define HAVE_PTHREADS_H 1
12726 EOF
12727
12728         for cf_lib_pthread in pthread c_r
12729         do
12730             echo "$as_me:12730: checking if we can link with the $cf_lib_pthread library" >&5
12731 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12732             cf_save_LIBS="$LIBS"
12733
12734 cf_add_libs="-l$cf_lib_pthread"
12735 # Filter out duplicates - this happens with badly-designed ".pc" files...
12736 for cf_add_1lib in $LIBS
12737 do
12738         for cf_add_2lib in $cf_add_libs
12739         do
12740                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12741                 then
12742                         cf_add_1lib=
12743                         break
12744                 fi
12745         done
12746         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12747 done
12748 LIBS="$cf_add_libs"
12749
12750             cat >conftest.$ac_ext <<_ACEOF
12751 #line 12751 "configure"
12752 #include "confdefs.h"
12753
12754 #include <pthread.h>
12755
12756 int
12757 main ()
12758 {
12759
12760                 int rc = pthread_create(0,0,0,0);
12761                 int r2 = pthread_mutexattr_settype(0, 0);
12762
12763   ;
12764   return 0;
12765 }
12766 _ACEOF
12767 rm -f conftest.$ac_objext conftest$ac_exeext
12768 if { (eval echo "$as_me:12768: \"$ac_link\"") >&5
12769   (eval $ac_link) 2>&5
12770   ac_status=$?
12771   echo "$as_me:12771: \$? = $ac_status" >&5
12772   (exit $ac_status); } &&
12773          { ac_try='test -s conftest$ac_exeext'
12774   { (eval echo "$as_me:12774: \"$ac_try\"") >&5
12775   (eval $ac_try) 2>&5
12776   ac_status=$?
12777   echo "$as_me:12777: \$? = $ac_status" >&5
12778   (exit $ac_status); }; }; then
12779   with_pthread=yes
12780 else
12781   echo "$as_me: failed program was:" >&5
12782 cat conftest.$ac_ext >&5
12783 with_pthread=no
12784 fi
12785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12786             LIBS="$cf_save_LIBS"
12787             echo "$as_me:12787: result: $with_pthread" >&5
12788 echo "${ECHO_T}$with_pthread" >&6
12789             test "$with_pthread" = yes && break
12790         done
12791
12792         if test "$with_pthread" = yes ; then
12793
12794 cf_add_libs="-l$cf_lib_pthread"
12795 # Filter out duplicates - this happens with badly-designed ".pc" files...
12796 for cf_add_1lib in $LIBS
12797 do
12798         for cf_add_2lib in $cf_add_libs
12799         do
12800                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12801                 then
12802                         cf_add_1lib=
12803                         break
12804                 fi
12805         done
12806         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12807 done
12808 LIBS="$cf_add_libs"
12809
12810 cat >>confdefs.h <<\EOF
12811 #define HAVE_LIBPTHREADS 1
12812 EOF
12813
12814         else
12815             { { echo "$as_me:12815: error: Cannot link with pthread library" >&5
12816 echo "$as_me: error: Cannot link with pthread library" >&2;}
12817    { (exit 1); exit 1; }; }
12818         fi
12819
12820 fi
12821
12822 fi
12823
12824 if test "x$with_pthread" != xno; then
12825         echo "$as_me:12825: checking for pthread_kill" >&5
12826 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12827 if test "${ac_cv_func_pthread_kill+set}" = set; then
12828   echo $ECHO_N "(cached) $ECHO_C" >&6
12829 else
12830   cat >conftest.$ac_ext <<_ACEOF
12831 #line 12831 "configure"
12832 #include "confdefs.h"
12833 /* System header to define __stub macros and hopefully few prototypes,
12834     which can conflict with char pthread_kill (); below.  */
12835 #include <assert.h>
12836 /* Override any gcc2 internal prototype to avoid an error.  */
12837 #ifdef __cplusplus
12838 extern "C"
12839 #endif
12840 /* We use char because int might match the return type of a gcc2
12841    builtin and then its argument prototype would still apply.  */
12842 char pthread_kill ();
12843 char (*f) ();
12844
12845 int
12846 main ()
12847 {
12848 /* The GNU C library defines this for functions which it implements
12849     to always fail with ENOSYS.  Some functions are actually named
12850     something starting with __ and the normal name is an alias.  */
12851 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12852 choke me
12853 #else
12854 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12855 #endif
12856
12857   ;
12858   return 0;
12859 }
12860 _ACEOF
12861 rm -f conftest.$ac_objext conftest$ac_exeext
12862 if { (eval echo "$as_me:12862: \"$ac_link\"") >&5
12863   (eval $ac_link) 2>&5
12864   ac_status=$?
12865   echo "$as_me:12865: \$? = $ac_status" >&5
12866   (exit $ac_status); } &&
12867          { ac_try='test -s conftest$ac_exeext'
12868   { (eval echo "$as_me:12868: \"$ac_try\"") >&5
12869   (eval $ac_try) 2>&5
12870   ac_status=$?
12871   echo "$as_me:12871: \$? = $ac_status" >&5
12872   (exit $ac_status); }; }; then
12873   ac_cv_func_pthread_kill=yes
12874 else
12875   echo "$as_me: failed program was:" >&5
12876 cat conftest.$ac_ext >&5
12877 ac_cv_func_pthread_kill=no
12878 fi
12879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12880 fi
12881 echo "$as_me:12881: result: $ac_cv_func_pthread_kill" >&5
12882 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12883 if test $ac_cv_func_pthread_kill = yes; then
12884
12885                 echo "$as_me:12885: checking if you want to allow EINTR in wgetch with pthreads" >&5
12886 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12887
12888 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12889 if test "${enable_pthreads_eintr+set}" = set; then
12890   enableval="$enable_pthreads_eintr"
12891   use_pthreads_eintr=$enableval
12892 else
12893   use_pthreads_eintr=no
12894 fi;
12895                 echo "$as_me:12895: result: $use_pthreads_eintr" >&5
12896 echo "${ECHO_T}$use_pthreads_eintr" >&6
12897                 if test "x$use_pthreads_eintr" = xyes ; then
12898
12899 cat >>confdefs.h <<\EOF
12900 #define USE_PTHREADS_EINTR 1
12901 EOF
12902
12903                 fi
12904 fi
12905
12906         echo "$as_me:12906: checking if you want to use weak-symbols for pthreads" >&5
12907 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12908
12909 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12910 if test "${enable_weak_symbols+set}" = set; then
12911   enableval="$enable_weak_symbols"
12912   use_weak_symbols=$enableval
12913 else
12914   use_weak_symbols=no
12915 fi;
12916         echo "$as_me:12916: result: $use_weak_symbols" >&5
12917 echo "${ECHO_T}$use_weak_symbols" >&6
12918         if test "x$use_weak_symbols" = xyes ; then
12919
12920 echo "$as_me:12920: checking if $CC supports weak symbols" >&5
12921 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12922 if test "${cf_cv_weak_symbols+set}" = set; then
12923   echo $ECHO_N "(cached) $ECHO_C" >&6
12924 else
12925
12926 cat >conftest.$ac_ext <<_ACEOF
12927 #line 12927 "configure"
12928 #include "confdefs.h"
12929
12930 #include <stdio.h>
12931 int
12932 main ()
12933 {
12934
12935 #if defined(__GNUC__)
12936 #  if defined __USE_ISOC99
12937 #    define _cat_pragma(exp)    _Pragma(#exp)
12938 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12939 #  else
12940 #    define _weak_pragma(exp)
12941 #  endif
12942 #  define _declare(name)        __extension__ extern __typeof__(name) name
12943 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12944 #endif
12945
12946 weak_symbol(fopen);
12947
12948   ;
12949   return 0;
12950 }
12951 _ACEOF
12952 rm -f conftest.$ac_objext
12953 if { (eval echo "$as_me:12953: \"$ac_compile\"") >&5
12954   (eval $ac_compile) 2>&5
12955   ac_status=$?
12956   echo "$as_me:12956: \$? = $ac_status" >&5
12957   (exit $ac_status); } &&
12958          { ac_try='test -s conftest.$ac_objext'
12959   { (eval echo "$as_me:12959: \"$ac_try\"") >&5
12960   (eval $ac_try) 2>&5
12961   ac_status=$?
12962   echo "$as_me:12962: \$? = $ac_status" >&5
12963   (exit $ac_status); }; }; then
12964   cf_cv_weak_symbols=yes
12965 else
12966   echo "$as_me: failed program was:" >&5
12967 cat conftest.$ac_ext >&5
12968 cf_cv_weak_symbols=no
12969 fi
12970 rm -f conftest.$ac_objext conftest.$ac_ext
12971
12972 fi
12973 echo "$as_me:12973: result: $cf_cv_weak_symbols" >&5
12974 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12975
12976         else
12977                 cf_cv_weak_symbols=no
12978         fi
12979
12980         if test "x$cf_cv_weak_symbols" = xyes ; then
12981
12982 cat >>confdefs.h <<\EOF
12983 #define USE_WEAK_SYMBOLS 1
12984 EOF
12985
12986         fi
12987 fi
12988
12989 PTHREAD=
12990 if test "x$with_pthread" = "xyes" ; then
12991
12992 cat >>confdefs.h <<\EOF
12993 #define USE_PTHREADS 1
12994 EOF
12995
12996         enable_reentrant=yes
12997         if test "x$cf_cv_weak_symbols" = xyes ; then
12998                 PTHREAD=-lpthread
12999         fi
13000 fi
13001
13002 # Reentrant code has to be opaque; there's little advantage to making ncurses
13003 # opaque outside of that, so there is no --enable-opaque option.  We can use
13004 # this option without --with-pthreads, but this will be always set for
13005 # pthreads.
13006 echo "$as_me:13006: checking if you want reentrant code" >&5
13007 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13008
13009 # Check whether --enable-reentrant or --disable-reentrant was given.
13010 if test "${enable_reentrant+set}" = set; then
13011   enableval="$enable_reentrant"
13012   with_reentrant=$enableval
13013 else
13014   with_reentrant=no
13015 fi;
13016 echo "$as_me:13016: result: $with_reentrant" >&5
13017 echo "${ECHO_T}$with_reentrant" >&6
13018 if test "x$with_reentrant" = xyes ; then
13019         cf_cv_enable_reentrant=1
13020         cf_cv_enable_opaque="NCURSES_INTERNALS"
13021         NCURSES_SIZE_T=int
13022         if test "x$cf_cv_weak_symbols" = xyes ; then
13023
13024 # remove pthread library from $LIBS
13025 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13026
13027 cf_add_libs="-lpthread"
13028 # Filter out duplicates - this happens with badly-designed ".pc" files...
13029 for cf_add_1lib in $TEST_LIBS
13030 do
13031         for cf_add_2lib in $cf_add_libs
13032         do
13033                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13034                 then
13035                         cf_add_1lib=
13036                         break
13037                 fi
13038         done
13039         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13040 done
13041 TEST_LIBS="$cf_add_libs"
13042
13043 cf_add_libs="-lpthread"
13044 # Filter out duplicates - this happens with badly-designed ".pc" files...
13045 for cf_add_1lib in $TEST_LIBS2
13046 do
13047         for cf_add_2lib in $cf_add_libs
13048         do
13049                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13050                 then
13051                         cf_add_1lib=
13052                         break
13053                 fi
13054         done
13055         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13056 done
13057 TEST_LIBS2="$cf_add_libs"
13058
13059         else
13060                 # when not using weak symbols but with_reentrant,
13061                 # add 't' to the library suffix on all platforms
13062                 # except cygwin, where we only do that if ALSO
13063                 # compiling with full thread support.
13064                 case "$host" in
13065                 (*cygwin* | *msys*)
13066                         if test "$with_pthread" = "yes" ; then
13067                                 if test "x$disable_lib_suffixes" = "xno" ; then
13068                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13069                                 fi
13070                         fi ;;
13071                 (*)
13072                         if test "x$disable_lib_suffixes" = "xno" ; then
13073                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13074                         fi
13075                         ;;
13076                 esac
13077         fi
13078
13079 cat >>confdefs.h <<\EOF
13080 #define USE_REENTRANT 1
13081 EOF
13082
13083 if test "${with_abi_version+set}" != set; then
13084         case $cf_cv_rel_version in
13085         (5.*)
13086                 cf_cv_rel_version=6.0
13087                 cf_cv_abi_version=6
13088                 { echo "$as_me:13088: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13089 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13090                 ;;
13091         esac
13092 fi
13093
13094 else
13095         cf_cv_enable_reentrant=0
13096         cf_cv_enable_opaque="NCURSES_OPAQUE"
13097         NCURSES_SIZE_T=short
13098 fi
13099
13100 echo "$as_me:13100: checking if you want opaque curses-library structures" >&5
13101 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13102
13103 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13104 if test "${enable_opaque_curses+set}" = set; then
13105   enableval="$enable_opaque_curses"
13106   test "$enableval" != yes && enableval=no
13107         if test "$enableval" != "no" ; then
13108     enable_opaque_curses=yes
13109         else
13110
13111          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13112          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13113
13114         fi
13115 else
13116   enableval=no
13117
13118          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13119          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13120
13121 fi;
13122 echo "$as_me:13122: result: $enable_opaque_curses" >&5
13123 echo "${ECHO_T}$enable_opaque_curses" >&6
13124
13125 test "$cf_cv_enable_reentrant" = 1 && \
13126 test "$enable_opaque_curses" = no && \
13127 { { echo "$as_me:13127: error: reentrant configuration requires opaque library" >&5
13128 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13129    { (exit 1); exit 1; }; }
13130
13131 echo "$as_me:13131: checking if you want opaque form-library structures" >&5
13132 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13133
13134 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13135 if test "${enable_opaque_form+set}" = set; then
13136   enableval="$enable_opaque_form"
13137   enable_opaque_form=yes
13138 else
13139   enable_opaque_form=no
13140 fi;
13141 echo "$as_me:13141: result: $enable_opaque_form" >&5
13142 echo "${ECHO_T}$enable_opaque_form" >&6
13143
13144 echo "$as_me:13144: checking if you want opaque menu-library structures" >&5
13145 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13146
13147 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13148 if test "${enable_opaque_menu+set}" = set; then
13149   enableval="$enable_opaque_menu"
13150   enable_opaque_menu=yes
13151 else
13152   enable_opaque_menu=no
13153 fi;
13154 echo "$as_me:13154: result: $enable_opaque_menu" >&5
13155 echo "${ECHO_T}$enable_opaque_menu" >&6
13156
13157 echo "$as_me:13157: checking if you want opaque panel-library structures" >&5
13158 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13159
13160 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13161 if test "${enable_opaque_panel+set}" = set; then
13162   enableval="$enable_opaque_panel"
13163   enable_opaque_panel=yes
13164 else
13165   enable_opaque_panel=no
13166 fi;
13167 echo "$as_me:13167: result: $enable_opaque_panel" >&5
13168 echo "${ECHO_T}$enable_opaque_panel" >&6
13169
13170 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13171 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13172 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13173 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13174
13175 ### Allow using a different wrap-prefix
13176 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13177         echo "$as_me:13177: checking for prefix used to wrap public variables" >&5
13178 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13179
13180 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13181 if test "${with_wrap_prefix+set}" = set; then
13182   withval="$with_wrap_prefix"
13183   NCURSES_WRAP_PREFIX=$withval
13184 else
13185   NCURSES_WRAP_PREFIX=_nc_
13186 fi;
13187         echo "$as_me:13187: result: $NCURSES_WRAP_PREFIX" >&5
13188 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13189 else
13190         NCURSES_WRAP_PREFIX=_nc_
13191 fi
13192
13193 cat >>confdefs.h <<EOF
13194 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13195 EOF
13196
13197 ###############################################################################
13198 # These options are relatively safe to experiment with.
13199
13200 echo "$as_me:13200: checking if you want all development code" >&5
13201 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13202
13203 # Check whether --with-develop or --without-develop was given.
13204 if test "${with_develop+set}" = set; then
13205   withval="$with_develop"
13206   with_develop=$withval
13207 else
13208   with_develop=no
13209 fi;
13210 echo "$as_me:13210: result: $with_develop" >&5
13211 echo "${ECHO_T}$with_develop" >&6
13212
13213 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13214 echo "$as_me:13214: checking if you want hard-tabs code" >&5
13215 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13216
13217 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13218 if test "${enable_hard_tabs+set}" = set; then
13219   enableval="$enable_hard_tabs"
13220
13221 else
13222   enable_hard_tabs=$with_develop
13223 fi;
13224 echo "$as_me:13224: result: $enable_hard_tabs" >&5
13225 echo "${ECHO_T}$enable_hard_tabs" >&6
13226 test "x$enable_hard_tabs" = xyes &&
13227 cat >>confdefs.h <<\EOF
13228 #define USE_HARD_TABS 1
13229 EOF
13230
13231 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13232 echo "$as_me:13232: checking if you want limited support for xmc" >&5
13233 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13234
13235 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13236 if test "${enable_xmc_glitch+set}" = set; then
13237   enableval="$enable_xmc_glitch"
13238
13239 else
13240   enable_xmc_glitch=$with_develop
13241 fi;
13242 echo "$as_me:13242: result: $enable_xmc_glitch" >&5
13243 echo "${ECHO_T}$enable_xmc_glitch" >&6
13244 test "x$enable_xmc_glitch" = xyes &&
13245 cat >>confdefs.h <<\EOF
13246 #define USE_XMC_SUPPORT 1
13247 EOF
13248
13249 ###############################################################################
13250 # These are just experimental, probably should not be in a package:
13251
13252 echo "$as_me:13252: checking if you do not want to assume colors are white-on-black" >&5
13253 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
13254
13255 # Check whether --enable-assumed-color or --disable-assumed-color was given.
13256 if test "${enable_assumed_color+set}" = set; then
13257   enableval="$enable_assumed_color"
13258   with_assumed_color=$enableval
13259 else
13260   with_assumed_color=yes
13261 fi;
13262 echo "$as_me:13262: result: $with_assumed_color" >&5
13263 echo "${ECHO_T}$with_assumed_color" >&6
13264 test "x$with_assumed_color" = xyes &&
13265 cat >>confdefs.h <<\EOF
13266 #define USE_ASSUMED_COLOR 1
13267 EOF
13268
13269 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
13270 echo "$as_me:13270: checking if you want hashmap scrolling-optimization code" >&5
13271 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
13272
13273 # Check whether --enable-hashmap or --disable-hashmap was given.
13274 if test "${enable_hashmap+set}" = set; then
13275   enableval="$enable_hashmap"
13276   with_hashmap=$enableval
13277 else
13278   with_hashmap=yes
13279 fi;
13280 echo "$as_me:13280: result: $with_hashmap" >&5
13281 echo "${ECHO_T}$with_hashmap" >&6
13282 test "x$with_hashmap" = xyes &&
13283 cat >>confdefs.h <<\EOF
13284 #define USE_HASHMAP 1
13285 EOF
13286
13287 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
13288 echo "$as_me:13288: checking if you want colorfgbg code" >&5
13289 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
13290
13291 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
13292 if test "${enable_colorfgbg+set}" = set; then
13293   enableval="$enable_colorfgbg"
13294   with_colorfgbg=$enableval
13295 else
13296   with_colorfgbg=no
13297 fi;
13298 echo "$as_me:13298: result: $with_colorfgbg" >&5
13299 echo "${ECHO_T}$with_colorfgbg" >&6
13300 test "x$with_colorfgbg" = xyes &&
13301 cat >>confdefs.h <<\EOF
13302 #define USE_COLORFGBG 1
13303 EOF
13304
13305 ###   use option --enable-interop to turn on use of bindings used for interop
13306 echo "$as_me:13306: checking if you want interop bindings" >&5
13307 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
13308
13309 # Check whether --enable-interop or --disable-interop was given.
13310 if test "${enable_interop+set}" = set; then
13311   enableval="$enable_interop"
13312   with_exp_interop=$enableval
13313 else
13314   with_exp_interop=$cf_dft_interop
13315 fi;
13316 echo "$as_me:13316: result: $with_exp_interop" >&5
13317 echo "${ECHO_T}$with_exp_interop" >&6
13318
13319 NCURSES_INTEROP_FUNCS=0
13320 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
13321
13322 echo "$as_me:13322: checking if you want experimental safe-sprintf code" >&5
13323 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13324
13325 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13326 if test "${enable_safe_sprintf+set}" = set; then
13327   enableval="$enable_safe_sprintf"
13328   with_safe_sprintf=$enableval
13329 else
13330   with_safe_sprintf=no
13331 fi;
13332 echo "$as_me:13332: result: $with_safe_sprintf" >&5
13333 echo "${ECHO_T}$with_safe_sprintf" >&6
13334 test "x$with_safe_sprintf" = xyes &&
13335 cat >>confdefs.h <<\EOF
13336 #define USE_SAFE_SPRINTF 1
13337 EOF
13338
13339 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13340 # when hashmap is used scroll hints are useless
13341 if test "$with_hashmap" = no ; then
13342 echo "$as_me:13342: checking if you want to experiment without scrolling-hints code" >&5
13343 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13344
13345 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13346 if test "${enable_scroll_hints+set}" = set; then
13347   enableval="$enable_scroll_hints"
13348   with_scroll_hints=$enableval
13349 else
13350   with_scroll_hints=yes
13351 fi;
13352 echo "$as_me:13352: result: $with_scroll_hints" >&5
13353 echo "${ECHO_T}$with_scroll_hints" >&6
13354 test "x$with_scroll_hints" = xyes &&
13355 cat >>confdefs.h <<\EOF
13356 #define USE_SCROLL_HINTS 1
13357 EOF
13358
13359 fi
13360
13361 echo "$as_me:13361: checking if you want wgetch-events code" >&5
13362 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13363
13364 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13365 if test "${enable_wgetch_events+set}" = set; then
13366   enableval="$enable_wgetch_events"
13367   with_wgetch_events=$enableval
13368 else
13369   with_wgetch_events=no
13370 fi;
13371 echo "$as_me:13371: result: $with_wgetch_events" >&5
13372 echo "${ECHO_T}$with_wgetch_events" >&6
13373 test "x$with_wgetch_events" = xyes &&
13374 cat >>confdefs.h <<\EOF
13375 #define NCURSES_WGETCH_EVENTS 1
13376 EOF
13377
13378 ###############################################################################
13379
13380 ###     use option --disable-echo to suppress full display compiling commands
13381
13382 echo "$as_me:13382: checking if you want to see long compiling messages" >&5
13383 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13384
13385 # Check whether --enable-echo or --disable-echo was given.
13386 if test "${enable_echo+set}" = set; then
13387   enableval="$enable_echo"
13388   test "$enableval" != no && enableval=yes
13389         if test "$enableval" != "yes" ; then
13390
13391         ECHO_LT='--silent'
13392         ECHO_LD='@echo linking $@;'
13393         RULE_CC='@echo compiling $<'
13394         SHOW_CC='@echo compiling $@'
13395         ECHO_CC='@'
13396
13397         else
13398
13399         ECHO_LT=''
13400         ECHO_LD=''
13401         RULE_CC=''
13402         SHOW_CC=''
13403         ECHO_CC=''
13404
13405         fi
13406 else
13407   enableval=yes
13408
13409         ECHO_LT=''
13410         ECHO_LD=''
13411         RULE_CC=''
13412         SHOW_CC=''
13413         ECHO_CC=''
13414
13415 fi;
13416 echo "$as_me:13416: result: $enableval" >&5
13417 echo "${ECHO_T}$enableval" >&6
13418
13419 if test "x$enable_echo" = xyes; then
13420         ECHO_LINK=
13421 else
13422         ECHO_LINK='@ echo linking $@ ... ;'
13423         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13424         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13425 fi
13426
13427 ###     use option --enable-warnings to turn on all gcc warnings
13428 echo "$as_me:13428: checking if you want to see compiler warnings" >&5
13429 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13430
13431 # Check whether --enable-warnings or --disable-warnings was given.
13432 if test "${enable_warnings+set}" = set; then
13433   enableval="$enable_warnings"
13434   with_warnings=$enableval
13435 fi;
13436 echo "$as_me:13436: result: $with_warnings" >&5
13437 echo "${ECHO_T}$with_warnings" >&6
13438
13439 if test "x$with_warnings" = "xyes"; then
13440
13441         ADAFLAGS="$ADAFLAGS -gnatg"
13442
13443 INTEL_COMPILER=no
13444
13445 if test "$GCC" = yes ; then
13446         case $host_os in
13447         (linux*|gnu*)
13448                 echo "$as_me:13448: checking if this is really Intel C compiler" >&5
13449 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13450                 cf_save_CFLAGS="$CFLAGS"
13451                 CFLAGS="$CFLAGS -no-gcc"
13452                 cat >conftest.$ac_ext <<_ACEOF
13453 #line 13453 "configure"
13454 #include "confdefs.h"
13455
13456 int
13457 main ()
13458 {
13459
13460 #ifdef __INTEL_COMPILER
13461 #else
13462 make an error
13463 #endif
13464
13465   ;
13466   return 0;
13467 }
13468 _ACEOF
13469 rm -f conftest.$ac_objext
13470 if { (eval echo "$as_me:13470: \"$ac_compile\"") >&5
13471   (eval $ac_compile) 2>&5
13472   ac_status=$?
13473   echo "$as_me:13473: \$? = $ac_status" >&5
13474   (exit $ac_status); } &&
13475          { ac_try='test -s conftest.$ac_objext'
13476   { (eval echo "$as_me:13476: \"$ac_try\"") >&5
13477   (eval $ac_try) 2>&5
13478   ac_status=$?
13479   echo "$as_me:13479: \$? = $ac_status" >&5
13480   (exit $ac_status); }; }; then
13481   INTEL_COMPILER=yes
13482 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13483
13484 else
13485   echo "$as_me: failed program was:" >&5
13486 cat conftest.$ac_ext >&5
13487 fi
13488 rm -f conftest.$ac_objext conftest.$ac_ext
13489                 CFLAGS="$cf_save_CFLAGS"
13490                 echo "$as_me:13490: result: $INTEL_COMPILER" >&5
13491 echo "${ECHO_T}$INTEL_COMPILER" >&6
13492                 ;;
13493         esac
13494 fi
13495
13496 CLANG_COMPILER=no
13497
13498 if test "$GCC" = yes ; then
13499         echo "$as_me:13499: checking if this is really Clang C compiler" >&5
13500 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13501         cf_save_CFLAGS="$CFLAGS"
13502         CFLAGS="$CFLAGS -Qunused-arguments"
13503         cat >conftest.$ac_ext <<_ACEOF
13504 #line 13504 "configure"
13505 #include "confdefs.h"
13506
13507 int
13508 main ()
13509 {
13510
13511 #ifdef __clang__
13512 #else
13513 make an error
13514 #endif
13515
13516   ;
13517   return 0;
13518 }
13519 _ACEOF
13520 rm -f conftest.$ac_objext
13521 if { (eval echo "$as_me:13521: \"$ac_compile\"") >&5
13522   (eval $ac_compile) 2>&5
13523   ac_status=$?
13524   echo "$as_me:13524: \$? = $ac_status" >&5
13525   (exit $ac_status); } &&
13526          { ac_try='test -s conftest.$ac_objext'
13527   { (eval echo "$as_me:13527: \"$ac_try\"") >&5
13528   (eval $ac_try) 2>&5
13529   ac_status=$?
13530   echo "$as_me:13530: \$? = $ac_status" >&5
13531   (exit $ac_status); }; }; then
13532   CLANG_COMPILER=yes
13533 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13534
13535 else
13536   echo "$as_me: failed program was:" >&5
13537 cat conftest.$ac_ext >&5
13538 fi
13539 rm -f conftest.$ac_objext conftest.$ac_ext
13540         CFLAGS="$cf_save_CFLAGS"
13541         echo "$as_me:13541: result: $CLANG_COMPILER" >&5
13542 echo "${ECHO_T}$CLANG_COMPILER" >&6
13543 fi
13544
13545 cat > conftest.$ac_ext <<EOF
13546 #line 13546 "${as_me:-configure}"
13547 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13548 EOF
13549
13550 if test "$INTEL_COMPILER" = yes
13551 then
13552 # The "-wdXXX" options suppress warnings:
13553 # remark #1419: external declaration in primary source file
13554 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13555 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13556 # remark #193: zero used for undefined preprocessing identifier
13557 # remark #593: variable "curs_sb_left_arrow" was set but never used
13558 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13559 # remark #869: parameter "tw" was never referenced
13560 # remark #981: operands are evaluated in unspecified order
13561 # warning #279: controlling expression is constant
13562
13563         { echo "$as_me:13563: checking for $CC warning options..." >&5
13564 echo "$as_me: checking for $CC warning options..." >&6;}
13565         cf_save_CFLAGS="$CFLAGS"
13566         EXTRA_CFLAGS="-Wall"
13567         for cf_opt in \
13568                 wd1419 \
13569                 wd1683 \
13570                 wd1684 \
13571                 wd193 \
13572                 wd593 \
13573                 wd279 \
13574                 wd810 \
13575                 wd869 \
13576                 wd981
13577         do
13578                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13579                 if { (eval echo "$as_me:13579: \"$ac_compile\"") >&5
13580   (eval $ac_compile) 2>&5
13581   ac_status=$?
13582   echo "$as_me:13582: \$? = $ac_status" >&5
13583   (exit $ac_status); }; then
13584                         test -n "$verbose" && echo "$as_me:13584: result: ... -$cf_opt" >&5
13585 echo "${ECHO_T}... -$cf_opt" >&6
13586                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13587                 fi
13588         done
13589         CFLAGS="$cf_save_CFLAGS"
13590
13591 elif test "$GCC" = yes
13592 then
13593         { echo "$as_me:13593: checking for $CC warning options..." >&5
13594 echo "$as_me: checking for $CC warning options..." >&6;}
13595         cf_save_CFLAGS="$CFLAGS"
13596         EXTRA_CFLAGS=
13597         cf_warn_CONST=""
13598         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13599         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13600         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13601         for cf_opt in W Wall \
13602                 Wbad-function-cast \
13603                 Wcast-align \
13604                 Wcast-qual \
13605                 Wdeclaration-after-statement \
13606                 Wextra \
13607                 Winline \
13608                 Wmissing-declarations \
13609                 Wmissing-prototypes \
13610                 Wnested-externs \
13611                 Wpointer-arith \
13612                 Wshadow \
13613                 Wstrict-prototypes \
13614                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13615         do
13616                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13617                 if { (eval echo "$as_me:13617: \"$ac_compile\"") >&5
13618   (eval $ac_compile) 2>&5
13619   ac_status=$?
13620   echo "$as_me:13620: \$? = $ac_status" >&5
13621   (exit $ac_status); }; then
13622                         test -n "$verbose" && echo "$as_me:13622: result: ... -$cf_opt" >&5
13623 echo "${ECHO_T}... -$cf_opt" >&6
13624                         case $cf_opt in
13625                         (Wcast-qual)
13626                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13627                                 ;;
13628                         (Winline)
13629                                 case $GCC_VERSION in
13630                                 ([34].*)
13631                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13632
13633 echo "${as_me:-configure}:13633: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13634
13635                                         continue;;
13636                                 esac
13637                                 ;;
13638                         (Wpointer-arith)
13639                                 case $GCC_VERSION in
13640                                 ([12].*)
13641                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13642
13643 echo "${as_me:-configure}:13643: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13644
13645                                         continue;;
13646                                 esac
13647                                 ;;
13648                         esac
13649                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13650                 fi
13651         done
13652         CFLAGS="$cf_save_CFLAGS"
13653 fi
13654 rm -rf conftest*
13655
13656         if test "x$cf_with_cxx" = xyes ; then
13657
13658 INTEL_CPLUSPLUS=no
13659
13660 if test "$GCC" = yes ; then
13661         case $host_os in
13662         (linux*|gnu*)
13663                 echo "$as_me:13663: checking if this is really Intel C++ compiler" >&5
13664 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13665                 cf_save_CFLAGS="$CXXFLAGS"
13666                 CXXFLAGS="$CXXFLAGS -no-gcc"
13667                 cat >conftest.$ac_ext <<_ACEOF
13668 #line 13668 "configure"
13669 #include "confdefs.h"
13670
13671 int
13672 main ()
13673 {
13674
13675 #ifdef __INTEL_COMPILER
13676 #else
13677 make an error
13678 #endif
13679
13680   ;
13681   return 0;
13682 }
13683 _ACEOF
13684 rm -f conftest.$ac_objext
13685 if { (eval echo "$as_me:13685: \"$ac_compile\"") >&5
13686   (eval $ac_compile) 2>&5
13687   ac_status=$?
13688   echo "$as_me:13688: \$? = $ac_status" >&5
13689   (exit $ac_status); } &&
13690          { ac_try='test -s conftest.$ac_objext'
13691   { (eval echo "$as_me:13691: \"$ac_try\"") >&5
13692   (eval $ac_try) 2>&5
13693   ac_status=$?
13694   echo "$as_me:13694: \$? = $ac_status" >&5
13695   (exit $ac_status); }; }; then
13696   INTEL_CPLUSPLUS=yes
13697 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13698
13699 else
13700   echo "$as_me: failed program was:" >&5
13701 cat conftest.$ac_ext >&5
13702 fi
13703 rm -f conftest.$ac_objext conftest.$ac_ext
13704                 CXXFLAGS="$cf_save_CFLAGS"
13705                 echo "$as_me:13705: result: $INTEL_CPLUSPLUS" >&5
13706 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13707                 ;;
13708         esac
13709 fi
13710
13711 CLANG_CPLUSPLUS=no
13712
13713 if test "$GCC" = yes ; then
13714         echo "$as_me:13714: checking if this is really Clang C++ compiler" >&5
13715 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13716         cf_save_CFLAGS="$CXXFLAGS"
13717         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13718         cat >conftest.$ac_ext <<_ACEOF
13719 #line 13719 "configure"
13720 #include "confdefs.h"
13721
13722 int
13723 main ()
13724 {
13725
13726 #ifdef __clang__
13727 #else
13728 make an error
13729 #endif
13730
13731   ;
13732   return 0;
13733 }
13734 _ACEOF
13735 rm -f conftest.$ac_objext
13736 if { (eval echo "$as_me:13736: \"$ac_compile\"") >&5
13737   (eval $ac_compile) 2>&5
13738   ac_status=$?
13739   echo "$as_me:13739: \$? = $ac_status" >&5
13740   (exit $ac_status); } &&
13741          { ac_try='test -s conftest.$ac_objext'
13742   { (eval echo "$as_me:13742: \"$ac_try\"") >&5
13743   (eval $ac_try) 2>&5
13744   ac_status=$?
13745   echo "$as_me:13745: \$? = $ac_status" >&5
13746   (exit $ac_status); }; }; then
13747   CLANG_CPLUSPLUS=yes
13748 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13749
13750 else
13751   echo "$as_me: failed program was:" >&5
13752 cat conftest.$ac_ext >&5
13753 fi
13754 rm -f conftest.$ac_objext conftest.$ac_ext
13755         CXXFLAGS="$cf_save_CFLAGS"
13756         echo "$as_me:13756: result: $CLANG_CPLUSPLUS" >&5
13757 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13758 fi
13759
13760 ac_ext=cc
13761 ac_cpp='$CXXCPP $CPPFLAGS'
13762 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13763 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13764 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13765 ac_main_return=return
13766
13767 cat > conftest.$ac_ext <<EOF
13768 #line 13768 "configure"
13769 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13770 EOF
13771
13772 if test "$INTEL_CPLUSPLUS" = yes
13773 then
13774 # The "-wdXXX" options suppress warnings:
13775 # remark #1419: external declaration in primary source file
13776 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13777 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13778 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13779 # remark #193: zero used for undefined preprocessing identifier
13780 # remark #593: variable "curs_sb_left_arrow" was set but never used
13781 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13782 # remark #869: parameter "tw" was never referenced
13783 # remark #981: operands are evaluated in unspecified order
13784 # warning #269: invalid format string conversion
13785
13786         { echo "$as_me:13786: checking for $CC warning options..." >&5
13787 echo "$as_me: checking for $CC warning options..." >&6;}
13788         cf_save_CXXFLAGS="$CXXFLAGS"
13789         EXTRA_CXXFLAGS="-Wall"
13790         for cf_opt in \
13791                 wd1419 \
13792                 wd1682 \
13793                 wd1683 \
13794                 wd1684 \
13795                 wd193 \
13796                 wd279 \
13797                 wd593 \
13798                 wd810 \
13799                 wd869 \
13800                 wd981
13801         do
13802                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13803                 if { (eval echo "$as_me:13803: \"$ac_compile\"") >&5
13804   (eval $ac_compile) 2>&5
13805   ac_status=$?
13806   echo "$as_me:13806: \$? = $ac_status" >&5
13807   (exit $ac_status); }; then
13808                         test -n "$verbose" && echo "$as_me:13808: result: ... -$cf_opt" >&5
13809 echo "${ECHO_T}... -$cf_opt" >&6
13810                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13811                 fi
13812         done
13813         CXXFLAGS="$cf_save_CXXFLAGS"
13814
13815 elif test "$GXX" = yes
13816 then
13817         { echo "$as_me:13817: checking for $CXX warning options..." >&5
13818 echo "$as_me: checking for $CXX warning options..." >&6;}
13819         cf_save_CXXFLAGS="$CXXFLAGS"
13820         EXTRA_CXXFLAGS="-W -Wall"
13821         cf_gxx_extra_warnings=""
13822         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13823         case "$GCC_VERSION" in
13824         ([1-2].*)
13825                 ;;
13826         (*)
13827                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13828                 ;;
13829         esac
13830         for cf_opt in \
13831                 Wabi \
13832                 fabi-version=0 \
13833                 Wextra \
13834                 Wignored-qualifiers \
13835                 Wlogical-op \
13836                 Woverloaded-virtual \
13837                 Wsign-promo \
13838                 Wsynth \
13839                 Wold-style-cast \
13840                 Wcast-align \
13841                 Wcast-qual \
13842                 Wpointer-arith \
13843                 Wshadow \
13844                 Wundef $cf_gxx_extra_warnings Wno-unused
13845         do
13846                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13847                 if { (eval echo "$as_me:13847: \"$ac_compile\"") >&5
13848   (eval $ac_compile) 2>&5
13849   ac_status=$?
13850   echo "$as_me:13850: \$? = $ac_status" >&5
13851   (exit $ac_status); }; then
13852                         test -n "$verbose" && echo "$as_me:13852: result: ... -$cf_opt" >&5
13853 echo "${ECHO_T}... -$cf_opt" >&6
13854                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13855                 else
13856                         test -n "$verbose" && echo "$as_me:13856: result: ... no -$cf_opt" >&5
13857 echo "${ECHO_T}... no -$cf_opt" >&6
13858                 fi
13859         done
13860         CXXFLAGS="$cf_save_CXXFLAGS"
13861 fi
13862
13863 rm -rf conftest*
13864 ac_ext=c
13865 ac_cpp='$CPP $CPPFLAGS'
13866 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13867 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13868 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13869 ac_main_return=return
13870
13871         fi
13872 fi
13873
13874 if test "$GCC" = yes
13875 then
13876 cat > conftest.i <<EOF
13877 #ifndef GCC_PRINTF
13878 #define GCC_PRINTF 0
13879 #endif
13880 #ifndef GCC_SCANF
13881 #define GCC_SCANF 0
13882 #endif
13883 #ifndef GCC_NORETURN
13884 #define GCC_NORETURN /* nothing */
13885 #endif
13886 #ifndef GCC_UNUSED
13887 #define GCC_UNUSED /* nothing */
13888 #endif
13889 EOF
13890 if test "$GCC" = yes
13891 then
13892         { echo "$as_me:13892: checking for $CC __attribute__ directives..." >&5
13893 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13894 cat > conftest.$ac_ext <<EOF
13895 #line 13895 "${as_me:-configure}"
13896 #include "confdefs.h"
13897 #include "conftest.h"
13898 #include "conftest.i"
13899 #if     GCC_PRINTF
13900 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13901 #else
13902 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13903 #endif
13904 #if     GCC_SCANF
13905 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13906 #else
13907 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13908 #endif
13909 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13910 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13911 extern void foo(void) GCC_NORETURN;
13912 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13913 EOF
13914         cf_printf_attribute=no
13915         cf_scanf_attribute=no
13916         for cf_attribute in scanf printf unused noreturn
13917         do
13918
13919 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13920
13921                 cf_directive="__attribute__(($cf_attribute))"
13922                 echo "checking for $CC $cf_directive" 1>&5
13923
13924                 case $cf_attribute in
13925                 (printf)
13926                         cf_printf_attribute=yes
13927                         cat >conftest.h <<EOF
13928 #define GCC_$cf_ATTRIBUTE 1
13929 EOF
13930                         ;;
13931                 (scanf)
13932                         cf_scanf_attribute=yes
13933                         cat >conftest.h <<EOF
13934 #define GCC_$cf_ATTRIBUTE 1
13935 EOF
13936                         ;;
13937                 (*)
13938                         cat >conftest.h <<EOF
13939 #define GCC_$cf_ATTRIBUTE $cf_directive
13940 EOF
13941                         ;;
13942                 esac
13943
13944                 if { (eval echo "$as_me:13944: \"$ac_compile\"") >&5
13945   (eval $ac_compile) 2>&5
13946   ac_status=$?
13947   echo "$as_me:13947: \$? = $ac_status" >&5
13948   (exit $ac_status); }; then
13949                         test -n "$verbose" && echo "$as_me:13949: result: ... $cf_attribute" >&5
13950 echo "${ECHO_T}... $cf_attribute" >&6
13951                         cat conftest.h >>confdefs.h
13952                         case $cf_attribute in
13953                         (noreturn)
13954
13955 cat >>confdefs.h <<EOF
13956 #define GCC_NORETURN $cf_directive
13957 EOF
13958
13959                                 ;;
13960                         (printf)
13961                                 cf_value='/* nothing */'
13962                                 if test "$cf_printf_attribute" != no ; then
13963                                         cf_value='__attribute__((format(printf,fmt,var)))'
13964
13965 cat >>confdefs.h <<\EOF
13966 #define GCC_PRINTF 1
13967 EOF
13968
13969                                 fi
13970
13971 cat >>confdefs.h <<EOF
13972 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13973 EOF
13974
13975                                 ;;
13976                         (scanf)
13977                                 cf_value='/* nothing */'
13978                                 if test "$cf_scanf_attribute" != no ; then
13979                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13980
13981 cat >>confdefs.h <<\EOF
13982 #define GCC_SCANF 1
13983 EOF
13984
13985                                 fi
13986
13987 cat >>confdefs.h <<EOF
13988 #define GCC_SCANFLIKE(fmt,var) $cf_value
13989 EOF
13990
13991                                 ;;
13992                         (unused)
13993
13994 cat >>confdefs.h <<EOF
13995 #define GCC_UNUSED $cf_directive
13996 EOF
13997
13998                                 ;;
13999                         esac
14000                 fi
14001         done
14002 else
14003         fgrep define conftest.i >>confdefs.h
14004 fi
14005 rm -rf conftest*
14006 fi
14007
14008 echo "$as_me:14008: checking if you want to work around bogus compiler/loader warnings" >&5
14009 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14010
14011 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14012 if test "${enable_string_hacks+set}" = set; then
14013   enableval="$enable_string_hacks"
14014   with_string_hacks=$enableval
14015 else
14016   with_string_hacks=no
14017 fi;
14018 echo "$as_me:14018: result: $with_string_hacks" >&5
14019 echo "${ECHO_T}$with_string_hacks" >&6
14020
14021 if test "x$with_string_hacks" = "xyes"; then
14022
14023 cat >>confdefs.h <<\EOF
14024 #define USE_STRING_HACKS 1
14025 EOF
14026
14027         { echo "$as_me:14027: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14028 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14029         echo "$as_me:14029: checking for strlcat" >&5
14030 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14031 if test "${ac_cv_func_strlcat+set}" = set; then
14032   echo $ECHO_N "(cached) $ECHO_C" >&6
14033 else
14034   cat >conftest.$ac_ext <<_ACEOF
14035 #line 14035 "configure"
14036 #include "confdefs.h"
14037 /* System header to define __stub macros and hopefully few prototypes,
14038     which can conflict with char strlcat (); below.  */
14039 #include <assert.h>
14040 /* Override any gcc2 internal prototype to avoid an error.  */
14041 #ifdef __cplusplus
14042 extern "C"
14043 #endif
14044 /* We use char because int might match the return type of a gcc2
14045    builtin and then its argument prototype would still apply.  */
14046 char strlcat ();
14047 char (*f) ();
14048
14049 int
14050 main ()
14051 {
14052 /* The GNU C library defines this for functions which it implements
14053     to always fail with ENOSYS.  Some functions are actually named
14054     something starting with __ and the normal name is an alias.  */
14055 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14056 choke me
14057 #else
14058 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14059 #endif
14060
14061   ;
14062   return 0;
14063 }
14064 _ACEOF
14065 rm -f conftest.$ac_objext conftest$ac_exeext
14066 if { (eval echo "$as_me:14066: \"$ac_link\"") >&5
14067   (eval $ac_link) 2>&5
14068   ac_status=$?
14069   echo "$as_me:14069: \$? = $ac_status" >&5
14070   (exit $ac_status); } &&
14071          { ac_try='test -s conftest$ac_exeext'
14072   { (eval echo "$as_me:14072: \"$ac_try\"") >&5
14073   (eval $ac_try) 2>&5
14074   ac_status=$?
14075   echo "$as_me:14075: \$? = $ac_status" >&5
14076   (exit $ac_status); }; }; then
14077   ac_cv_func_strlcat=yes
14078 else
14079   echo "$as_me: failed program was:" >&5
14080 cat conftest.$ac_ext >&5
14081 ac_cv_func_strlcat=no
14082 fi
14083 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14084 fi
14085 echo "$as_me:14085: result: $ac_cv_func_strlcat" >&5
14086 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14087 if test $ac_cv_func_strlcat = yes; then
14088
14089 cat >>confdefs.h <<\EOF
14090 #define HAVE_STRLCAT 1
14091 EOF
14092
14093 else
14094
14095                 echo "$as_me:14095: checking for strlcat in -lbsd" >&5
14096 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14097 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14098   echo $ECHO_N "(cached) $ECHO_C" >&6
14099 else
14100   ac_check_lib_save_LIBS=$LIBS
14101 LIBS="-lbsd  $LIBS"
14102 cat >conftest.$ac_ext <<_ACEOF
14103 #line 14103 "configure"
14104 #include "confdefs.h"
14105
14106 /* Override any gcc2 internal prototype to avoid an error.  */
14107 #ifdef __cplusplus
14108 extern "C"
14109 #endif
14110 /* We use char because int might match the return type of a gcc2
14111    builtin and then its argument prototype would still apply.  */
14112 char strlcat ();
14113 int
14114 main ()
14115 {
14116 strlcat ();
14117   ;
14118   return 0;
14119 }
14120 _ACEOF
14121 rm -f conftest.$ac_objext conftest$ac_exeext
14122 if { (eval echo "$as_me:14122: \"$ac_link\"") >&5
14123   (eval $ac_link) 2>&5
14124   ac_status=$?
14125   echo "$as_me:14125: \$? = $ac_status" >&5
14126   (exit $ac_status); } &&
14127          { ac_try='test -s conftest$ac_exeext'
14128   { (eval echo "$as_me:14128: \"$ac_try\"") >&5
14129   (eval $ac_try) 2>&5
14130   ac_status=$?
14131   echo "$as_me:14131: \$? = $ac_status" >&5
14132   (exit $ac_status); }; }; then
14133   ac_cv_lib_bsd_strlcat=yes
14134 else
14135   echo "$as_me: failed program was:" >&5
14136 cat conftest.$ac_ext >&5
14137 ac_cv_lib_bsd_strlcat=no
14138 fi
14139 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14140 LIBS=$ac_check_lib_save_LIBS
14141 fi
14142 echo "$as_me:14142: result: $ac_cv_lib_bsd_strlcat" >&5
14143 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14144 if test $ac_cv_lib_bsd_strlcat = yes; then
14145
14146 cf_add_libs="-lbsd"
14147 # Filter out duplicates - this happens with badly-designed ".pc" files...
14148 for cf_add_1lib in $LIBS
14149 do
14150         for cf_add_2lib in $cf_add_libs
14151         do
14152                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14153                 then
14154                         cf_add_1lib=
14155                         break
14156                 fi
14157         done
14158         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14159 done
14160 LIBS="$cf_add_libs"
14161
14162 for ac_header in bsd/string.h
14163 do
14164 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14165 echo "$as_me:14165: checking for $ac_header" >&5
14166 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14167 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14168   echo $ECHO_N "(cached) $ECHO_C" >&6
14169 else
14170   cat >conftest.$ac_ext <<_ACEOF
14171 #line 14171 "configure"
14172 #include "confdefs.h"
14173 #include <$ac_header>
14174 _ACEOF
14175 if { (eval echo "$as_me:14175: \"$ac_cpp conftest.$ac_ext\"") >&5
14176   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14177   ac_status=$?
14178   egrep -v '^ *\+' conftest.er1 >conftest.err
14179   rm -f conftest.er1
14180   cat conftest.err >&5
14181   echo "$as_me:14181: \$? = $ac_status" >&5
14182   (exit $ac_status); } >/dev/null; then
14183   if test -s conftest.err; then
14184     ac_cpp_err=$ac_c_preproc_warn_flag
14185   else
14186     ac_cpp_err=
14187   fi
14188 else
14189   ac_cpp_err=yes
14190 fi
14191 if test -z "$ac_cpp_err"; then
14192   eval "$as_ac_Header=yes"
14193 else
14194   echo "$as_me: failed program was:" >&5
14195   cat conftest.$ac_ext >&5
14196   eval "$as_ac_Header=no"
14197 fi
14198 rm -f conftest.err conftest.$ac_ext
14199 fi
14200 echo "$as_me:14200: result: `eval echo '${'$as_ac_Header'}'`" >&5
14201 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14202 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14203   cat >>confdefs.h <<EOF
14204 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14205 EOF
14206
14207 fi
14208 done
14209
14210 cat >>confdefs.h <<\EOF
14211 #define HAVE_STRLCAT 1
14212 EOF
14213
14214 fi
14215
14216 fi
14217
14218 for ac_func in strlcpy snprintf
14219 do
14220 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14221 echo "$as_me:14221: checking for $ac_func" >&5
14222 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14223 if eval "test \"\${$as_ac_var+set}\" = set"; then
14224   echo $ECHO_N "(cached) $ECHO_C" >&6
14225 else
14226   cat >conftest.$ac_ext <<_ACEOF
14227 #line 14227 "configure"
14228 #include "confdefs.h"
14229 /* System header to define __stub macros and hopefully few prototypes,
14230     which can conflict with char $ac_func (); below.  */
14231 #include <assert.h>
14232 /* Override any gcc2 internal prototype to avoid an error.  */
14233 #ifdef __cplusplus
14234 extern "C"
14235 #endif
14236 /* We use char because int might match the return type of a gcc2
14237    builtin and then its argument prototype would still apply.  */
14238 char $ac_func ();
14239 char (*f) ();
14240
14241 int
14242 main ()
14243 {
14244 /* The GNU C library defines this for functions which it implements
14245     to always fail with ENOSYS.  Some functions are actually named
14246     something starting with __ and the normal name is an alias.  */
14247 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14248 choke me
14249 #else
14250 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14251 #endif
14252
14253   ;
14254   return 0;
14255 }
14256 _ACEOF
14257 rm -f conftest.$ac_objext conftest$ac_exeext
14258 if { (eval echo "$as_me:14258: \"$ac_link\"") >&5
14259   (eval $ac_link) 2>&5
14260   ac_status=$?
14261   echo "$as_me:14261: \$? = $ac_status" >&5
14262   (exit $ac_status); } &&
14263          { ac_try='test -s conftest$ac_exeext'
14264   { (eval echo "$as_me:14264: \"$ac_try\"") >&5
14265   (eval $ac_try) 2>&5
14266   ac_status=$?
14267   echo "$as_me:14267: \$? = $ac_status" >&5
14268   (exit $ac_status); }; }; then
14269   eval "$as_ac_var=yes"
14270 else
14271   echo "$as_me: failed program was:" >&5
14272 cat conftest.$ac_ext >&5
14273 eval "$as_ac_var=no"
14274 fi
14275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14276 fi
14277 echo "$as_me:14277: result: `eval echo '${'$as_ac_var'}'`" >&5
14278 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14279 if test `eval echo '${'$as_ac_var'}'` = yes; then
14280   cat >>confdefs.h <<EOF
14281 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14282 EOF
14283
14284 fi
14285 done
14286
14287 fi
14288
14289 ###     use option --enable-assertions to turn on generation of assertion code
14290 echo "$as_me:14290: checking if you want to enable runtime assertions" >&5
14291 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14292
14293 # Check whether --enable-assertions or --disable-assertions was given.
14294 if test "${enable_assertions+set}" = set; then
14295   enableval="$enable_assertions"
14296   with_assertions=$enableval
14297 else
14298   with_assertions=no
14299 fi;
14300 echo "$as_me:14300: result: $with_assertions" >&5
14301 echo "${ECHO_T}$with_assertions" >&6
14302 if test -n "$GCC"
14303 then
14304         if test "$with_assertions" = no
14305         then
14306                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14307         else
14308
14309         ADAFLAGS="$ADAFLAGS -gnata"
14310
14311         fi
14312 fi
14313
14314 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14315
14316 echo "$as_me:14316: checking if you want to use dmalloc for testing" >&5
14317 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14318
14319 # Check whether --with-dmalloc or --without-dmalloc was given.
14320 if test "${with_dmalloc+set}" = set; then
14321   withval="$with_dmalloc"
14322
14323 cat >>confdefs.h <<EOF
14324 #define USE_DMALLOC 1
14325 EOF
14326
14327         : ${with_cflags:=-g}
14328         : ${with_no_leaks:=yes}
14329          with_dmalloc=yes
14330 else
14331   with_dmalloc=
14332 fi;
14333 echo "$as_me:14333: result: ${with_dmalloc:-no}" >&5
14334 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14335
14336 case .$with_cflags in
14337 (.*-g*)
14338         case .$CFLAGS in
14339         (.*-g*)
14340                 ;;
14341         (*)
14342
14343 cf_fix_cppflags=no
14344 cf_new_cflags=
14345 cf_new_cppflags=
14346 cf_new_extra_cppflags=
14347
14348 for cf_add_cflags in -g
14349 do
14350 case $cf_fix_cppflags in
14351 (no)
14352         case $cf_add_cflags in
14353         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14354                 case $cf_add_cflags in
14355                 (-D*)
14356                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14357
14358                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14359                                 && test -z "${cf_tst_cflags}" \
14360                                 && cf_fix_cppflags=yes
14361
14362                         if test $cf_fix_cppflags = yes ; then
14363                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14364                                 continue
14365                         elif test "${cf_tst_cflags}" = "\"'" ; then
14366                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14367                                 continue
14368                         fi
14369                         ;;
14370                 esac
14371                 case "$CPPFLAGS" in
14372                 (*$cf_add_cflags)
14373                         ;;
14374                 (*)
14375                         case $cf_add_cflags in
14376                         (-D*)
14377                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14378
14379 CPPFLAGS=`echo "$CPPFLAGS" | \
14380         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14381                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14382
14383                                 ;;
14384                         esac
14385                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14386                         ;;
14387                 esac
14388                 ;;
14389         (*)
14390                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14391                 ;;
14392         esac
14393         ;;
14394 (yes)
14395         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14396
14397         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14398
14399         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14400                 && test -z "${cf_tst_cflags}" \
14401                 && cf_fix_cppflags=no
14402         ;;
14403 esac
14404 done
14405
14406 if test -n "$cf_new_cflags" ; then
14407
14408         CFLAGS="$CFLAGS $cf_new_cflags"
14409 fi
14410
14411 if test -n "$cf_new_cppflags" ; then
14412
14413         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14414 fi
14415
14416 if test -n "$cf_new_extra_cppflags" ; then
14417
14418         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14419 fi
14420
14421                 ;;
14422         esac
14423         ;;
14424 esac
14425
14426 if test "$with_dmalloc" = yes ; then
14427         echo "$as_me:14427: checking for dmalloc.h" >&5
14428 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14429 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14430   echo $ECHO_N "(cached) $ECHO_C" >&6
14431 else
14432   cat >conftest.$ac_ext <<_ACEOF
14433 #line 14433 "configure"
14434 #include "confdefs.h"
14435 #include <dmalloc.h>
14436 _ACEOF
14437 if { (eval echo "$as_me:14437: \"$ac_cpp conftest.$ac_ext\"") >&5
14438   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14439   ac_status=$?
14440   egrep -v '^ *\+' conftest.er1 >conftest.err
14441   rm -f conftest.er1
14442   cat conftest.err >&5
14443   echo "$as_me:14443: \$? = $ac_status" >&5
14444   (exit $ac_status); } >/dev/null; then
14445   if test -s conftest.err; then
14446     ac_cpp_err=$ac_c_preproc_warn_flag
14447   else
14448     ac_cpp_err=
14449   fi
14450 else
14451   ac_cpp_err=yes
14452 fi
14453 if test -z "$ac_cpp_err"; then
14454   ac_cv_header_dmalloc_h=yes
14455 else
14456   echo "$as_me: failed program was:" >&5
14457   cat conftest.$ac_ext >&5
14458   ac_cv_header_dmalloc_h=no
14459 fi
14460 rm -f conftest.err conftest.$ac_ext
14461 fi
14462 echo "$as_me:14462: result: $ac_cv_header_dmalloc_h" >&5
14463 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14464 if test $ac_cv_header_dmalloc_h = yes; then
14465
14466 echo "$as_me:14466: checking for dmalloc_debug in -ldmalloc" >&5
14467 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14468 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14469   echo $ECHO_N "(cached) $ECHO_C" >&6
14470 else
14471   ac_check_lib_save_LIBS=$LIBS
14472 LIBS="-ldmalloc  $LIBS"
14473 cat >conftest.$ac_ext <<_ACEOF
14474 #line 14474 "configure"
14475 #include "confdefs.h"
14476
14477 /* Override any gcc2 internal prototype to avoid an error.  */
14478 #ifdef __cplusplus
14479 extern "C"
14480 #endif
14481 /* We use char because int might match the return type of a gcc2
14482    builtin and then its argument prototype would still apply.  */
14483 char dmalloc_debug ();
14484 int
14485 main ()
14486 {
14487 dmalloc_debug ();
14488   ;
14489   return 0;
14490 }
14491 _ACEOF
14492 rm -f conftest.$ac_objext conftest$ac_exeext
14493 if { (eval echo "$as_me:14493: \"$ac_link\"") >&5
14494   (eval $ac_link) 2>&5
14495   ac_status=$?
14496   echo "$as_me:14496: \$? = $ac_status" >&5
14497   (exit $ac_status); } &&
14498          { ac_try='test -s conftest$ac_exeext'
14499   { (eval echo "$as_me:14499: \"$ac_try\"") >&5
14500   (eval $ac_try) 2>&5
14501   ac_status=$?
14502   echo "$as_me:14502: \$? = $ac_status" >&5
14503   (exit $ac_status); }; }; then
14504   ac_cv_lib_dmalloc_dmalloc_debug=yes
14505 else
14506   echo "$as_me: failed program was:" >&5
14507 cat conftest.$ac_ext >&5
14508 ac_cv_lib_dmalloc_dmalloc_debug=no
14509 fi
14510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14511 LIBS=$ac_check_lib_save_LIBS
14512 fi
14513 echo "$as_me:14513: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14514 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14515 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14516   cat >>confdefs.h <<EOF
14517 #define HAVE_LIBDMALLOC 1
14518 EOF
14519
14520   LIBS="-ldmalloc $LIBS"
14521
14522 fi
14523
14524 fi
14525
14526 fi
14527
14528 echo "$as_me:14528: checking if you want to use dbmalloc for testing" >&5
14529 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14530
14531 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14532 if test "${with_dbmalloc+set}" = set; then
14533   withval="$with_dbmalloc"
14534
14535 cat >>confdefs.h <<EOF
14536 #define USE_DBMALLOC 1
14537 EOF
14538
14539         : ${with_cflags:=-g}
14540         : ${with_no_leaks:=yes}
14541          with_dbmalloc=yes
14542 else
14543   with_dbmalloc=
14544 fi;
14545 echo "$as_me:14545: result: ${with_dbmalloc:-no}" >&5
14546 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14547
14548 case .$with_cflags in
14549 (.*-g*)
14550         case .$CFLAGS in
14551         (.*-g*)
14552                 ;;
14553         (*)
14554
14555 cf_fix_cppflags=no
14556 cf_new_cflags=
14557 cf_new_cppflags=
14558 cf_new_extra_cppflags=
14559
14560 for cf_add_cflags in -g
14561 do
14562 case $cf_fix_cppflags in
14563 (no)
14564         case $cf_add_cflags in
14565         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14566                 case $cf_add_cflags in
14567                 (-D*)
14568                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14569
14570                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14571                                 && test -z "${cf_tst_cflags}" \
14572                                 && cf_fix_cppflags=yes
14573
14574                         if test $cf_fix_cppflags = yes ; then
14575                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14576                                 continue
14577                         elif test "${cf_tst_cflags}" = "\"'" ; then
14578                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14579                                 continue
14580                         fi
14581                         ;;
14582                 esac
14583                 case "$CPPFLAGS" in
14584                 (*$cf_add_cflags)
14585                         ;;
14586                 (*)
14587                         case $cf_add_cflags in
14588                         (-D*)
14589                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14590
14591 CPPFLAGS=`echo "$CPPFLAGS" | \
14592         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14593                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14594
14595                                 ;;
14596                         esac
14597                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14598                         ;;
14599                 esac
14600                 ;;
14601         (*)
14602                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14603                 ;;
14604         esac
14605         ;;
14606 (yes)
14607         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14608
14609         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14610
14611         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14612                 && test -z "${cf_tst_cflags}" \
14613                 && cf_fix_cppflags=no
14614         ;;
14615 esac
14616 done
14617
14618 if test -n "$cf_new_cflags" ; then
14619
14620         CFLAGS="$CFLAGS $cf_new_cflags"
14621 fi
14622
14623 if test -n "$cf_new_cppflags" ; then
14624
14625         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14626 fi
14627
14628 if test -n "$cf_new_extra_cppflags" ; then
14629
14630         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14631 fi
14632
14633                 ;;
14634         esac
14635         ;;
14636 esac
14637
14638 if test "$with_dbmalloc" = yes ; then
14639         echo "$as_me:14639: checking for dbmalloc.h" >&5
14640 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14641 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14642   echo $ECHO_N "(cached) $ECHO_C" >&6
14643 else
14644   cat >conftest.$ac_ext <<_ACEOF
14645 #line 14645 "configure"
14646 #include "confdefs.h"
14647 #include <dbmalloc.h>
14648 _ACEOF
14649 if { (eval echo "$as_me:14649: \"$ac_cpp conftest.$ac_ext\"") >&5
14650   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14651   ac_status=$?
14652   egrep -v '^ *\+' conftest.er1 >conftest.err
14653   rm -f conftest.er1
14654   cat conftest.err >&5
14655   echo "$as_me:14655: \$? = $ac_status" >&5
14656   (exit $ac_status); } >/dev/null; then
14657   if test -s conftest.err; then
14658     ac_cpp_err=$ac_c_preproc_warn_flag
14659   else
14660     ac_cpp_err=
14661   fi
14662 else
14663   ac_cpp_err=yes
14664 fi
14665 if test -z "$ac_cpp_err"; then
14666   ac_cv_header_dbmalloc_h=yes
14667 else
14668   echo "$as_me: failed program was:" >&5
14669   cat conftest.$ac_ext >&5
14670   ac_cv_header_dbmalloc_h=no
14671 fi
14672 rm -f conftest.err conftest.$ac_ext
14673 fi
14674 echo "$as_me:14674: result: $ac_cv_header_dbmalloc_h" >&5
14675 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14676 if test $ac_cv_header_dbmalloc_h = yes; then
14677
14678 echo "$as_me:14678: checking for debug_malloc in -ldbmalloc" >&5
14679 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14680 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14681   echo $ECHO_N "(cached) $ECHO_C" >&6
14682 else
14683   ac_check_lib_save_LIBS=$LIBS
14684 LIBS="-ldbmalloc  $LIBS"
14685 cat >conftest.$ac_ext <<_ACEOF
14686 #line 14686 "configure"
14687 #include "confdefs.h"
14688
14689 /* Override any gcc2 internal prototype to avoid an error.  */
14690 #ifdef __cplusplus
14691 extern "C"
14692 #endif
14693 /* We use char because int might match the return type of a gcc2
14694    builtin and then its argument prototype would still apply.  */
14695 char debug_malloc ();
14696 int
14697 main ()
14698 {
14699 debug_malloc ();
14700   ;
14701   return 0;
14702 }
14703 _ACEOF
14704 rm -f conftest.$ac_objext conftest$ac_exeext
14705 if { (eval echo "$as_me:14705: \"$ac_link\"") >&5
14706   (eval $ac_link) 2>&5
14707   ac_status=$?
14708   echo "$as_me:14708: \$? = $ac_status" >&5
14709   (exit $ac_status); } &&
14710          { ac_try='test -s conftest$ac_exeext'
14711   { (eval echo "$as_me:14711: \"$ac_try\"") >&5
14712   (eval $ac_try) 2>&5
14713   ac_status=$?
14714   echo "$as_me:14714: \$? = $ac_status" >&5
14715   (exit $ac_status); }; }; then
14716   ac_cv_lib_dbmalloc_debug_malloc=yes
14717 else
14718   echo "$as_me: failed program was:" >&5
14719 cat conftest.$ac_ext >&5
14720 ac_cv_lib_dbmalloc_debug_malloc=no
14721 fi
14722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14723 LIBS=$ac_check_lib_save_LIBS
14724 fi
14725 echo "$as_me:14725: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14726 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14727 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14728   cat >>confdefs.h <<EOF
14729 #define HAVE_LIBDBMALLOC 1
14730 EOF
14731
14732   LIBS="-ldbmalloc $LIBS"
14733
14734 fi
14735
14736 fi
14737
14738 fi
14739
14740 echo "$as_me:14740: checking if you want to use valgrind for testing" >&5
14741 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14742
14743 # Check whether --with-valgrind or --without-valgrind was given.
14744 if test "${with_valgrind+set}" = set; then
14745   withval="$with_valgrind"
14746
14747 cat >>confdefs.h <<EOF
14748 #define USE_VALGRIND 1
14749 EOF
14750
14751         : ${with_cflags:=-g}
14752         : ${with_no_leaks:=yes}
14753          with_valgrind=yes
14754 else
14755   with_valgrind=
14756 fi;
14757 echo "$as_me:14757: result: ${with_valgrind:-no}" >&5
14758 echo "${ECHO_T}${with_valgrind:-no}" >&6
14759
14760 case .$with_cflags in
14761 (.*-g*)
14762         case .$CFLAGS in
14763         (.*-g*)
14764                 ;;
14765         (*)
14766
14767 cf_fix_cppflags=no
14768 cf_new_cflags=
14769 cf_new_cppflags=
14770 cf_new_extra_cppflags=
14771
14772 for cf_add_cflags in -g
14773 do
14774 case $cf_fix_cppflags in
14775 (no)
14776         case $cf_add_cflags in
14777         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14778                 case $cf_add_cflags in
14779                 (-D*)
14780                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14781
14782                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14783                                 && test -z "${cf_tst_cflags}" \
14784                                 && cf_fix_cppflags=yes
14785
14786                         if test $cf_fix_cppflags = yes ; then
14787                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14788                                 continue
14789                         elif test "${cf_tst_cflags}" = "\"'" ; then
14790                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14791                                 continue
14792                         fi
14793                         ;;
14794                 esac
14795                 case "$CPPFLAGS" in
14796                 (*$cf_add_cflags)
14797                         ;;
14798                 (*)
14799                         case $cf_add_cflags in
14800                         (-D*)
14801                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14802
14803 CPPFLAGS=`echo "$CPPFLAGS" | \
14804         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14805                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14806
14807                                 ;;
14808                         esac
14809                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14810                         ;;
14811                 esac
14812                 ;;
14813         (*)
14814                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14815                 ;;
14816         esac
14817         ;;
14818 (yes)
14819         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14820
14821         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14822
14823         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14824                 && test -z "${cf_tst_cflags}" \
14825                 && cf_fix_cppflags=no
14826         ;;
14827 esac
14828 done
14829
14830 if test -n "$cf_new_cflags" ; then
14831
14832         CFLAGS="$CFLAGS $cf_new_cflags"
14833 fi
14834
14835 if test -n "$cf_new_cppflags" ; then
14836
14837         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14838 fi
14839
14840 if test -n "$cf_new_extra_cppflags" ; then
14841
14842         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14843 fi
14844
14845                 ;;
14846         esac
14847         ;;
14848 esac
14849
14850 echo "$as_me:14850: checking if you want to perform memory-leak testing" >&5
14851 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14852
14853 # Check whether --enable-leaks or --disable-leaks was given.
14854 if test "${enable_leaks+set}" = set; then
14855   enableval="$enable_leaks"
14856   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14857 else
14858   : ${with_no_leaks:=no}
14859 fi;
14860 echo "$as_me:14860: result: $with_no_leaks" >&5
14861 echo "${ECHO_T}$with_no_leaks" >&6
14862
14863 if test "$with_no_leaks" = yes ; then
14864
14865 cat >>confdefs.h <<\EOF
14866 #define NO_LEAKS 1
14867 EOF
14868
14869 cat >>confdefs.h <<\EOF
14870 #define YY_NO_LEAKS 1
14871 EOF
14872
14873 fi
14874
14875 cat >>confdefs.h <<\EOF
14876 #define HAVE_NC_ALLOC_H 1
14877 EOF
14878
14879 ###     use option --enable-expanded to generate certain macros as functions
14880
14881 # Check whether --enable-expanded or --disable-expanded was given.
14882 if test "${enable_expanded+set}" = set; then
14883   enableval="$enable_expanded"
14884   test "x$enableval" = xyes &&
14885 cat >>confdefs.h <<\EOF
14886 #define NCURSES_EXPANDED 1
14887 EOF
14888
14889 fi;
14890
14891 ###     use option --disable-macros to suppress macros in favor of functions
14892
14893 # Check whether --enable-macros or --disable-macros was given.
14894 if test "${enable_macros+set}" = set; then
14895   enableval="$enable_macros"
14896   test "$enableval" = no &&
14897 cat >>confdefs.h <<\EOF
14898 #define NCURSES_NOMACROS 1
14899 EOF
14900
14901 fi;
14902
14903 # Normally we only add trace() to the debug-library.  Allow this to be
14904 # extended to all models of the ncurses library:
14905 cf_all_traces=no
14906 case "$CFLAGS $CPPFLAGS" in
14907 (*-DTRACE*)
14908         cf_all_traces=yes
14909         ;;
14910 esac
14911
14912 echo "$as_me:14912: checking whether to add trace feature to all models" >&5
14913 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14914
14915 # Check whether --with-trace or --without-trace was given.
14916 if test "${with_trace+set}" = set; then
14917   withval="$with_trace"
14918   cf_with_trace=$withval
14919 else
14920   cf_with_trace=$cf_all_traces
14921 fi;
14922 echo "$as_me:14922: result: $cf_with_trace" >&5
14923 echo "${ECHO_T}$cf_with_trace" >&6
14924
14925 if test "x$cf_with_trace" = xyes ; then
14926         LIB_TRACING=all
14927         ADA_TRACE=TRUE
14928
14929 cf_fix_cppflags=no
14930 cf_new_cflags=
14931 cf_new_cppflags=
14932 cf_new_extra_cppflags=
14933
14934 for cf_add_cflags in -DTRACE
14935 do
14936 case $cf_fix_cppflags in
14937 (no)
14938         case $cf_add_cflags in
14939         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14940                 case $cf_add_cflags in
14941                 (-D*)
14942                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14943
14944                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14945                                 && test -z "${cf_tst_cflags}" \
14946                                 && cf_fix_cppflags=yes
14947
14948                         if test $cf_fix_cppflags = yes ; then
14949                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14950                                 continue
14951                         elif test "${cf_tst_cflags}" = "\"'" ; then
14952                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14953                                 continue
14954                         fi
14955                         ;;
14956                 esac
14957                 case "$CPPFLAGS" in
14958                 (*$cf_add_cflags)
14959                         ;;
14960                 (*)
14961                         case $cf_add_cflags in
14962                         (-D*)
14963                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14964
14965 CPPFLAGS=`echo "$CPPFLAGS" | \
14966         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14967                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14968
14969                                 ;;
14970                         esac
14971                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14972                         ;;
14973                 esac
14974                 ;;
14975         (*)
14976                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14977                 ;;
14978         esac
14979         ;;
14980 (yes)
14981         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14982
14983         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14984
14985         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14986                 && test -z "${cf_tst_cflags}" \
14987                 && cf_fix_cppflags=no
14988         ;;
14989 esac
14990 done
14991
14992 if test -n "$cf_new_cflags" ; then
14993
14994         CFLAGS="$CFLAGS $cf_new_cflags"
14995 fi
14996
14997 if test -n "$cf_new_cppflags" ; then
14998
14999         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15000 fi
15001
15002 if test -n "$cf_new_extra_cppflags" ; then
15003
15004         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15005 fi
15006
15007 else
15008         LIB_TRACING=DEBUG
15009         ADA_TRACE=FALSE
15010 fi
15011
15012 echo "$as_me:15012: checking if we want to use GNAT projects" >&5
15013 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15014
15015 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15016 if test "${enable_gnat_projects+set}" = set; then
15017   enableval="$enable_gnat_projects"
15018   test "$enableval" != no && enableval=yes
15019         if test "$enableval" != "yes" ; then
15020     enable_gnat_projects=no
15021         else
15022                 enable_gnat_projects=yes
15023         fi
15024 else
15025   enableval=yes
15026         enable_gnat_projects=yes
15027
15028 fi;
15029 echo "$as_me:15029: result: $enable_gnat_projects" >&5
15030 echo "${ECHO_T}$enable_gnat_projects" >&6
15031
15032 ###     Checks for libraries.
15033 case $cf_cv_system_name in
15034 (*mingw32*|*mingw64*)
15035         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15036         LIBS=" -lpsapi $LIBS"
15037         ;;
15038 (*)
15039 echo "$as_me:15039: checking for gettimeofday" >&5
15040 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15041 if test "${ac_cv_func_gettimeofday+set}" = set; then
15042   echo $ECHO_N "(cached) $ECHO_C" >&6
15043 else
15044   cat >conftest.$ac_ext <<_ACEOF
15045 #line 15045 "configure"
15046 #include "confdefs.h"
15047 /* System header to define __stub macros and hopefully few prototypes,
15048     which can conflict with char gettimeofday (); below.  */
15049 #include <assert.h>
15050 /* Override any gcc2 internal prototype to avoid an error.  */
15051 #ifdef __cplusplus
15052 extern "C"
15053 #endif
15054 /* We use char because int might match the return type of a gcc2
15055    builtin and then its argument prototype would still apply.  */
15056 char gettimeofday ();
15057 char (*f) ();
15058
15059 int
15060 main ()
15061 {
15062 /* The GNU C library defines this for functions which it implements
15063     to always fail with ENOSYS.  Some functions are actually named
15064     something starting with __ and the normal name is an alias.  */
15065 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15066 choke me
15067 #else
15068 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15069 #endif
15070
15071   ;
15072   return 0;
15073 }
15074 _ACEOF
15075 rm -f conftest.$ac_objext conftest$ac_exeext
15076 if { (eval echo "$as_me:15076: \"$ac_link\"") >&5
15077   (eval $ac_link) 2>&5
15078   ac_status=$?
15079   echo "$as_me:15079: \$? = $ac_status" >&5
15080   (exit $ac_status); } &&
15081          { ac_try='test -s conftest$ac_exeext'
15082   { (eval echo "$as_me:15082: \"$ac_try\"") >&5
15083   (eval $ac_try) 2>&5
15084   ac_status=$?
15085   echo "$as_me:15085: \$? = $ac_status" >&5
15086   (exit $ac_status); }; }; then
15087   ac_cv_func_gettimeofday=yes
15088 else
15089   echo "$as_me: failed program was:" >&5
15090 cat conftest.$ac_ext >&5
15091 ac_cv_func_gettimeofday=no
15092 fi
15093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15094 fi
15095 echo "$as_me:15095: result: $ac_cv_func_gettimeofday" >&5
15096 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15097 if test $ac_cv_func_gettimeofday = yes; then
15098
15099 cat >>confdefs.h <<\EOF
15100 #define HAVE_GETTIMEOFDAY 1
15101 EOF
15102
15103 else
15104
15105 echo "$as_me:15105: checking for gettimeofday in -lbsd" >&5
15106 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15107 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15108   echo $ECHO_N "(cached) $ECHO_C" >&6
15109 else
15110   ac_check_lib_save_LIBS=$LIBS
15111 LIBS="-lbsd  $LIBS"
15112 cat >conftest.$ac_ext <<_ACEOF
15113 #line 15113 "configure"
15114 #include "confdefs.h"
15115
15116 /* Override any gcc2 internal prototype to avoid an error.  */
15117 #ifdef __cplusplus
15118 extern "C"
15119 #endif
15120 /* We use char because int might match the return type of a gcc2
15121    builtin and then its argument prototype would still apply.  */
15122 char gettimeofday ();
15123 int
15124 main ()
15125 {
15126 gettimeofday ();
15127   ;
15128   return 0;
15129 }
15130 _ACEOF
15131 rm -f conftest.$ac_objext conftest$ac_exeext
15132 if { (eval echo "$as_me:15132: \"$ac_link\"") >&5
15133   (eval $ac_link) 2>&5
15134   ac_status=$?
15135   echo "$as_me:15135: \$? = $ac_status" >&5
15136   (exit $ac_status); } &&
15137          { ac_try='test -s conftest$ac_exeext'
15138   { (eval echo "$as_me:15138: \"$ac_try\"") >&5
15139   (eval $ac_try) 2>&5
15140   ac_status=$?
15141   echo "$as_me:15141: \$? = $ac_status" >&5
15142   (exit $ac_status); }; }; then
15143   ac_cv_lib_bsd_gettimeofday=yes
15144 else
15145   echo "$as_me: failed program was:" >&5
15146 cat conftest.$ac_ext >&5
15147 ac_cv_lib_bsd_gettimeofday=no
15148 fi
15149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15150 LIBS=$ac_check_lib_save_LIBS
15151 fi
15152 echo "$as_me:15152: result: $ac_cv_lib_bsd_gettimeofday" >&5
15153 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15154 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15155
15156 cat >>confdefs.h <<\EOF
15157 #define HAVE_GETTIMEOFDAY 1
15158 EOF
15159
15160 cf_add_libs="-lbsd"
15161 # Filter out duplicates - this happens with badly-designed ".pc" files...
15162 for cf_add_1lib in $LIBS
15163 do
15164         for cf_add_2lib in $cf_add_libs
15165         do
15166                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15167                 then
15168                         cf_add_1lib=
15169                         break
15170                 fi
15171         done
15172         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15173 done
15174 LIBS="$cf_add_libs"
15175
15176 fi
15177
15178 fi
15179         ;;
15180 esac
15181
15182 echo "$as_me:15182: checking if -lm needed for math functions" >&5
15183 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15184 if test "${cf_cv_need_libm+set}" = set; then
15185   echo $ECHO_N "(cached) $ECHO_C" >&6
15186 else
15187
15188         cat >conftest.$ac_ext <<_ACEOF
15189 #line 15189 "configure"
15190 #include "confdefs.h"
15191
15192         #include <stdio.h>
15193         #include <stdlib.h>
15194         #include <math.h>
15195
15196 int
15197 main ()
15198 {
15199 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15200   ;
15201   return 0;
15202 }
15203 _ACEOF
15204 rm -f conftest.$ac_objext conftest$ac_exeext
15205 if { (eval echo "$as_me:15205: \"$ac_link\"") >&5
15206   (eval $ac_link) 2>&5
15207   ac_status=$?
15208   echo "$as_me:15208: \$? = $ac_status" >&5
15209   (exit $ac_status); } &&
15210          { ac_try='test -s conftest$ac_exeext'
15211   { (eval echo "$as_me:15211: \"$ac_try\"") >&5
15212   (eval $ac_try) 2>&5
15213   ac_status=$?
15214   echo "$as_me:15214: \$? = $ac_status" >&5
15215   (exit $ac_status); }; }; then
15216   cf_cv_need_libm=no
15217 else
15218   echo "$as_me: failed program was:" >&5
15219 cat conftest.$ac_ext >&5
15220 cf_cv_need_libm=yes
15221 fi
15222 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15223 fi
15224 echo "$as_me:15224: result: $cf_cv_need_libm" >&5
15225 echo "${ECHO_T}$cf_cv_need_libm" >&6
15226 if test "$cf_cv_need_libm" = yes
15227 then
15228 MATH_LIB=-lm
15229 fi
15230
15231 ###     Checks for header files.
15232 echo "$as_me:15232: checking for ANSI C header files" >&5
15233 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15234 if test "${ac_cv_header_stdc+set}" = set; then
15235   echo $ECHO_N "(cached) $ECHO_C" >&6
15236 else
15237   cat >conftest.$ac_ext <<_ACEOF
15238 #line 15238 "configure"
15239 #include "confdefs.h"
15240 #include <stdlib.h>
15241 #include <stdarg.h>
15242 #include <string.h>
15243 #include <float.h>
15244
15245 _ACEOF
15246 if { (eval echo "$as_me:15246: \"$ac_cpp conftest.$ac_ext\"") >&5
15247   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15248   ac_status=$?
15249   egrep -v '^ *\+' conftest.er1 >conftest.err
15250   rm -f conftest.er1
15251   cat conftest.err >&5
15252   echo "$as_me:15252: \$? = $ac_status" >&5
15253   (exit $ac_status); } >/dev/null; then
15254   if test -s conftest.err; then
15255     ac_cpp_err=$ac_c_preproc_warn_flag
15256   else
15257     ac_cpp_err=
15258   fi
15259 else
15260   ac_cpp_err=yes
15261 fi
15262 if test -z "$ac_cpp_err"; then
15263   ac_cv_header_stdc=yes
15264 else
15265   echo "$as_me: failed program was:" >&5
15266   cat conftest.$ac_ext >&5
15267   ac_cv_header_stdc=no
15268 fi
15269 rm -f conftest.err conftest.$ac_ext
15270
15271 if test $ac_cv_header_stdc = yes; then
15272   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15273   cat >conftest.$ac_ext <<_ACEOF
15274 #line 15274 "configure"
15275 #include "confdefs.h"
15276 #include <string.h>
15277
15278 _ACEOF
15279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15280   egrep "memchr" >/dev/null 2>&1; then
15281   :
15282 else
15283   ac_cv_header_stdc=no
15284 fi
15285 rm -rf conftest*
15286
15287 fi
15288
15289 if test $ac_cv_header_stdc = yes; then
15290   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15291   cat >conftest.$ac_ext <<_ACEOF
15292 #line 15292 "configure"
15293 #include "confdefs.h"
15294 #include <stdlib.h>
15295
15296 _ACEOF
15297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15298   egrep "free" >/dev/null 2>&1; then
15299   :
15300 else
15301   ac_cv_header_stdc=no
15302 fi
15303 rm -rf conftest*
15304
15305 fi
15306
15307 if test $ac_cv_header_stdc = yes; then
15308   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15309   if test "$cross_compiling" = yes; then
15310   :
15311 else
15312   cat >conftest.$ac_ext <<_ACEOF
15313 #line 15313 "configure"
15314 #include "confdefs.h"
15315 #include <ctype.h>
15316 #if ((' ' & 0x0FF) == 0x020)
15317 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15318 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15319 #else
15320 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15321                      || ('j' <= (c) && (c) <= 'r') \
15322                      || ('s' <= (c) && (c) <= 'z'))
15323 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15324 #endif
15325
15326 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15327 int
15328 main ()
15329 {
15330   int i;
15331   for (i = 0; i < 256; i++)
15332     if (XOR (islower (i), ISLOWER (i))
15333         || toupper (i) != TOUPPER (i))
15334       $ac_main_return(2);
15335   $ac_main_return (0);
15336 }
15337 _ACEOF
15338 rm -f conftest$ac_exeext
15339 if { (eval echo "$as_me:15339: \"$ac_link\"") >&5
15340   (eval $ac_link) 2>&5
15341   ac_status=$?
15342   echo "$as_me:15342: \$? = $ac_status" >&5
15343   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15344   { (eval echo "$as_me:15344: \"$ac_try\"") >&5
15345   (eval $ac_try) 2>&5
15346   ac_status=$?
15347   echo "$as_me:15347: \$? = $ac_status" >&5
15348   (exit $ac_status); }; }; then
15349   :
15350 else
15351   echo "$as_me: program exited with status $ac_status" >&5
15352 echo "$as_me: failed program was:" >&5
15353 cat conftest.$ac_ext >&5
15354 ac_cv_header_stdc=no
15355 fi
15356 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15357 fi
15358 fi
15359 fi
15360 echo "$as_me:15360: result: $ac_cv_header_stdc" >&5
15361 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15362 if test $ac_cv_header_stdc = yes; then
15363
15364 cat >>confdefs.h <<\EOF
15365 #define STDC_HEADERS 1
15366 EOF
15367
15368 fi
15369
15370 ac_header_dirent=no
15371 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15372   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15373 echo "$as_me:15373: checking for $ac_hdr that defines DIR" >&5
15374 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15375 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15376   echo $ECHO_N "(cached) $ECHO_C" >&6
15377 else
15378   cat >conftest.$ac_ext <<_ACEOF
15379 #line 15379 "configure"
15380 #include "confdefs.h"
15381 #include <sys/types.h>
15382 #include <$ac_hdr>
15383
15384 int
15385 main ()
15386 {
15387 if ((DIR *) 0)
15388 return 0;
15389   ;
15390   return 0;
15391 }
15392 _ACEOF
15393 rm -f conftest.$ac_objext
15394 if { (eval echo "$as_me:15394: \"$ac_compile\"") >&5
15395   (eval $ac_compile) 2>&5
15396   ac_status=$?
15397   echo "$as_me:15397: \$? = $ac_status" >&5
15398   (exit $ac_status); } &&
15399          { ac_try='test -s conftest.$ac_objext'
15400   { (eval echo "$as_me:15400: \"$ac_try\"") >&5
15401   (eval $ac_try) 2>&5
15402   ac_status=$?
15403   echo "$as_me:15403: \$? = $ac_status" >&5
15404   (exit $ac_status); }; }; then
15405   eval "$as_ac_Header=yes"
15406 else
15407   echo "$as_me: failed program was:" >&5
15408 cat conftest.$ac_ext >&5
15409 eval "$as_ac_Header=no"
15410 fi
15411 rm -f conftest.$ac_objext conftest.$ac_ext
15412 fi
15413 echo "$as_me:15413: result: `eval echo '${'$as_ac_Header'}'`" >&5
15414 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15415 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15416   cat >>confdefs.h <<EOF
15417 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15418 EOF
15419
15420 ac_header_dirent=$ac_hdr; break
15421 fi
15422
15423 done
15424 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15425 if test $ac_header_dirent = dirent.h; then
15426   echo "$as_me:15426: checking for opendir in -ldir" >&5
15427 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15428 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15429   echo $ECHO_N "(cached) $ECHO_C" >&6
15430 else
15431   ac_check_lib_save_LIBS=$LIBS
15432 LIBS="-ldir  $LIBS"
15433 cat >conftest.$ac_ext <<_ACEOF
15434 #line 15434 "configure"
15435 #include "confdefs.h"
15436
15437 /* Override any gcc2 internal prototype to avoid an error.  */
15438 #ifdef __cplusplus
15439 extern "C"
15440 #endif
15441 /* We use char because int might match the return type of a gcc2
15442    builtin and then its argument prototype would still apply.  */
15443 char opendir ();
15444 int
15445 main ()
15446 {
15447 opendir ();
15448   ;
15449   return 0;
15450 }
15451 _ACEOF
15452 rm -f conftest.$ac_objext conftest$ac_exeext
15453 if { (eval echo "$as_me:15453: \"$ac_link\"") >&5
15454   (eval $ac_link) 2>&5
15455   ac_status=$?
15456   echo "$as_me:15456: \$? = $ac_status" >&5
15457   (exit $ac_status); } &&
15458          { ac_try='test -s conftest$ac_exeext'
15459   { (eval echo "$as_me:15459: \"$ac_try\"") >&5
15460   (eval $ac_try) 2>&5
15461   ac_status=$?
15462   echo "$as_me:15462: \$? = $ac_status" >&5
15463   (exit $ac_status); }; }; then
15464   ac_cv_lib_dir_opendir=yes
15465 else
15466   echo "$as_me: failed program was:" >&5
15467 cat conftest.$ac_ext >&5
15468 ac_cv_lib_dir_opendir=no
15469 fi
15470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15471 LIBS=$ac_check_lib_save_LIBS
15472 fi
15473 echo "$as_me:15473: result: $ac_cv_lib_dir_opendir" >&5
15474 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15475 if test $ac_cv_lib_dir_opendir = yes; then
15476   LIBS="$LIBS -ldir"
15477 fi
15478
15479 else
15480   echo "$as_me:15480: checking for opendir in -lx" >&5
15481 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15482 if test "${ac_cv_lib_x_opendir+set}" = set; then
15483   echo $ECHO_N "(cached) $ECHO_C" >&6
15484 else
15485   ac_check_lib_save_LIBS=$LIBS
15486 LIBS="-lx  $LIBS"
15487 cat >conftest.$ac_ext <<_ACEOF
15488 #line 15488 "configure"
15489 #include "confdefs.h"
15490
15491 /* Override any gcc2 internal prototype to avoid an error.  */
15492 #ifdef __cplusplus
15493 extern "C"
15494 #endif
15495 /* We use char because int might match the return type of a gcc2
15496    builtin and then its argument prototype would still apply.  */
15497 char opendir ();
15498 int
15499 main ()
15500 {
15501 opendir ();
15502   ;
15503   return 0;
15504 }
15505 _ACEOF
15506 rm -f conftest.$ac_objext conftest$ac_exeext
15507 if { (eval echo "$as_me:15507: \"$ac_link\"") >&5
15508   (eval $ac_link) 2>&5
15509   ac_status=$?
15510   echo "$as_me:15510: \$? = $ac_status" >&5
15511   (exit $ac_status); } &&
15512          { ac_try='test -s conftest$ac_exeext'
15513   { (eval echo "$as_me:15513: \"$ac_try\"") >&5
15514   (eval $ac_try) 2>&5
15515   ac_status=$?
15516   echo "$as_me:15516: \$? = $ac_status" >&5
15517   (exit $ac_status); }; }; then
15518   ac_cv_lib_x_opendir=yes
15519 else
15520   echo "$as_me: failed program was:" >&5
15521 cat conftest.$ac_ext >&5
15522 ac_cv_lib_x_opendir=no
15523 fi
15524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15525 LIBS=$ac_check_lib_save_LIBS
15526 fi
15527 echo "$as_me:15527: result: $ac_cv_lib_x_opendir" >&5
15528 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15529 if test $ac_cv_lib_x_opendir = yes; then
15530   LIBS="$LIBS -lx"
15531 fi
15532
15533 fi
15534
15535 echo "$as_me:15535: checking whether time.h and sys/time.h may both be included" >&5
15536 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15537 if test "${ac_cv_header_time+set}" = set; then
15538   echo $ECHO_N "(cached) $ECHO_C" >&6
15539 else
15540   cat >conftest.$ac_ext <<_ACEOF
15541 #line 15541 "configure"
15542 #include "confdefs.h"
15543 #include <sys/types.h>
15544 #include <sys/time.h>
15545 #include <time.h>
15546
15547 int
15548 main ()
15549 {
15550 if ((struct tm *) 0)
15551 return 0;
15552   ;
15553   return 0;
15554 }
15555 _ACEOF
15556 rm -f conftest.$ac_objext
15557 if { (eval echo "$as_me:15557: \"$ac_compile\"") >&5
15558   (eval $ac_compile) 2>&5
15559   ac_status=$?
15560   echo "$as_me:15560: \$? = $ac_status" >&5
15561   (exit $ac_status); } &&
15562          { ac_try='test -s conftest.$ac_objext'
15563   { (eval echo "$as_me:15563: \"$ac_try\"") >&5
15564   (eval $ac_try) 2>&5
15565   ac_status=$?
15566   echo "$as_me:15566: \$? = $ac_status" >&5
15567   (exit $ac_status); }; }; then
15568   ac_cv_header_time=yes
15569 else
15570   echo "$as_me: failed program was:" >&5
15571 cat conftest.$ac_ext >&5
15572 ac_cv_header_time=no
15573 fi
15574 rm -f conftest.$ac_objext conftest.$ac_ext
15575 fi
15576 echo "$as_me:15576: result: $ac_cv_header_time" >&5
15577 echo "${ECHO_T}$ac_cv_header_time" >&6
15578 if test $ac_cv_header_time = yes; then
15579
15580 cat >>confdefs.h <<\EOF
15581 #define TIME_WITH_SYS_TIME 1
15582 EOF
15583
15584 fi
15585
15586 cf_regex_func=no
15587
15588 cf_regex_libs="regex re"
15589 case $host_os in
15590 (mingw*)
15591         cf_regex_libs="gnurx $cf_regex_libs"
15592         ;;
15593 esac
15594
15595 echo "$as_me:15595: checking for regcomp" >&5
15596 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15597 if test "${ac_cv_func_regcomp+set}" = set; then
15598   echo $ECHO_N "(cached) $ECHO_C" >&6
15599 else
15600   cat >conftest.$ac_ext <<_ACEOF
15601 #line 15601 "configure"
15602 #include "confdefs.h"
15603 /* System header to define __stub macros and hopefully few prototypes,
15604     which can conflict with char regcomp (); below.  */
15605 #include <assert.h>
15606 /* Override any gcc2 internal prototype to avoid an error.  */
15607 #ifdef __cplusplus
15608 extern "C"
15609 #endif
15610 /* We use char because int might match the return type of a gcc2
15611    builtin and then its argument prototype would still apply.  */
15612 char regcomp ();
15613 char (*f) ();
15614
15615 int
15616 main ()
15617 {
15618 /* The GNU C library defines this for functions which it implements
15619     to always fail with ENOSYS.  Some functions are actually named
15620     something starting with __ and the normal name is an alias.  */
15621 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15622 choke me
15623 #else
15624 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15625 #endif
15626
15627   ;
15628   return 0;
15629 }
15630 _ACEOF
15631 rm -f conftest.$ac_objext conftest$ac_exeext
15632 if { (eval echo "$as_me:15632: \"$ac_link\"") >&5
15633   (eval $ac_link) 2>&5
15634   ac_status=$?
15635   echo "$as_me:15635: \$? = $ac_status" >&5
15636   (exit $ac_status); } &&
15637          { ac_try='test -s conftest$ac_exeext'
15638   { (eval echo "$as_me:15638: \"$ac_try\"") >&5
15639   (eval $ac_try) 2>&5
15640   ac_status=$?
15641   echo "$as_me:15641: \$? = $ac_status" >&5
15642   (exit $ac_status); }; }; then
15643   ac_cv_func_regcomp=yes
15644 else
15645   echo "$as_me: failed program was:" >&5
15646 cat conftest.$ac_ext >&5
15647 ac_cv_func_regcomp=no
15648 fi
15649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15650 fi
15651 echo "$as_me:15651: result: $ac_cv_func_regcomp" >&5
15652 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15653 if test $ac_cv_func_regcomp = yes; then
15654   cf_regex_func=regcomp
15655 else
15656
15657         for cf_regex_lib in $cf_regex_libs
15658         do
15659                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15660 echo "$as_me:15660: checking for regcomp in -l$cf_regex_lib" >&5
15661 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15662 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15663   echo $ECHO_N "(cached) $ECHO_C" >&6
15664 else
15665   ac_check_lib_save_LIBS=$LIBS
15666 LIBS="-l$cf_regex_lib  $LIBS"
15667 cat >conftest.$ac_ext <<_ACEOF
15668 #line 15668 "configure"
15669 #include "confdefs.h"
15670
15671 /* Override any gcc2 internal prototype to avoid an error.  */
15672 #ifdef __cplusplus
15673 extern "C"
15674 #endif
15675 /* We use char because int might match the return type of a gcc2
15676    builtin and then its argument prototype would still apply.  */
15677 char regcomp ();
15678 int
15679 main ()
15680 {
15681 regcomp ();
15682   ;
15683   return 0;
15684 }
15685 _ACEOF
15686 rm -f conftest.$ac_objext conftest$ac_exeext
15687 if { (eval echo "$as_me:15687: \"$ac_link\"") >&5
15688   (eval $ac_link) 2>&5
15689   ac_status=$?
15690   echo "$as_me:15690: \$? = $ac_status" >&5
15691   (exit $ac_status); } &&
15692          { ac_try='test -s conftest$ac_exeext'
15693   { (eval echo "$as_me:15693: \"$ac_try\"") >&5
15694   (eval $ac_try) 2>&5
15695   ac_status=$?
15696   echo "$as_me:15696: \$? = $ac_status" >&5
15697   (exit $ac_status); }; }; then
15698   eval "$as_ac_Lib=yes"
15699 else
15700   echo "$as_me: failed program was:" >&5
15701 cat conftest.$ac_ext >&5
15702 eval "$as_ac_Lib=no"
15703 fi
15704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15705 LIBS=$ac_check_lib_save_LIBS
15706 fi
15707 echo "$as_me:15707: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15708 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15709 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15710
15711 cf_add_libs="-l$cf_regex_lib"
15712 # Filter out duplicates - this happens with badly-designed ".pc" files...
15713 for cf_add_1lib in $LIBS
15714 do
15715         for cf_add_2lib in $cf_add_libs
15716         do
15717                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15718                 then
15719                         cf_add_1lib=
15720                         break
15721                 fi
15722         done
15723         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15724 done
15725 LIBS="$cf_add_libs"
15726
15727                                 cf_regex_func=regcomp
15728                                 break
15729 fi
15730
15731         done
15732
15733 fi
15734
15735 if test "$cf_regex_func" = no ; then
15736         echo "$as_me:15736: checking for compile" >&5
15737 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15738 if test "${ac_cv_func_compile+set}" = set; then
15739   echo $ECHO_N "(cached) $ECHO_C" >&6
15740 else
15741   cat >conftest.$ac_ext <<_ACEOF
15742 #line 15742 "configure"
15743 #include "confdefs.h"
15744 /* System header to define __stub macros and hopefully few prototypes,
15745     which can conflict with char compile (); below.  */
15746 #include <assert.h>
15747 /* Override any gcc2 internal prototype to avoid an error.  */
15748 #ifdef __cplusplus
15749 extern "C"
15750 #endif
15751 /* We use char because int might match the return type of a gcc2
15752    builtin and then its argument prototype would still apply.  */
15753 char compile ();
15754 char (*f) ();
15755
15756 int
15757 main ()
15758 {
15759 /* The GNU C library defines this for functions which it implements
15760     to always fail with ENOSYS.  Some functions are actually named
15761     something starting with __ and the normal name is an alias.  */
15762 #if defined (__stub_compile) || defined (__stub___compile)
15763 choke me
15764 #else
15765 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15766 #endif
15767
15768   ;
15769   return 0;
15770 }
15771 _ACEOF
15772 rm -f conftest.$ac_objext conftest$ac_exeext
15773 if { (eval echo "$as_me:15773: \"$ac_link\"") >&5
15774   (eval $ac_link) 2>&5
15775   ac_status=$?
15776   echo "$as_me:15776: \$? = $ac_status" >&5
15777   (exit $ac_status); } &&
15778          { ac_try='test -s conftest$ac_exeext'
15779   { (eval echo "$as_me:15779: \"$ac_try\"") >&5
15780   (eval $ac_try) 2>&5
15781   ac_status=$?
15782   echo "$as_me:15782: \$? = $ac_status" >&5
15783   (exit $ac_status); }; }; then
15784   ac_cv_func_compile=yes
15785 else
15786   echo "$as_me: failed program was:" >&5
15787 cat conftest.$ac_ext >&5
15788 ac_cv_func_compile=no
15789 fi
15790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15791 fi
15792 echo "$as_me:15792: result: $ac_cv_func_compile" >&5
15793 echo "${ECHO_T}$ac_cv_func_compile" >&6
15794 if test $ac_cv_func_compile = yes; then
15795   cf_regex_func=compile
15796 else
15797
15798                 echo "$as_me:15798: checking for compile in -lgen" >&5
15799 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15800 if test "${ac_cv_lib_gen_compile+set}" = set; then
15801   echo $ECHO_N "(cached) $ECHO_C" >&6
15802 else
15803   ac_check_lib_save_LIBS=$LIBS
15804 LIBS="-lgen  $LIBS"
15805 cat >conftest.$ac_ext <<_ACEOF
15806 #line 15806 "configure"
15807 #include "confdefs.h"
15808
15809 /* Override any gcc2 internal prototype to avoid an error.  */
15810 #ifdef __cplusplus
15811 extern "C"
15812 #endif
15813 /* We use char because int might match the return type of a gcc2
15814    builtin and then its argument prototype would still apply.  */
15815 char compile ();
15816 int
15817 main ()
15818 {
15819 compile ();
15820   ;
15821   return 0;
15822 }
15823 _ACEOF
15824 rm -f conftest.$ac_objext conftest$ac_exeext
15825 if { (eval echo "$as_me:15825: \"$ac_link\"") >&5
15826   (eval $ac_link) 2>&5
15827   ac_status=$?
15828   echo "$as_me:15828: \$? = $ac_status" >&5
15829   (exit $ac_status); } &&
15830          { ac_try='test -s conftest$ac_exeext'
15831   { (eval echo "$as_me:15831: \"$ac_try\"") >&5
15832   (eval $ac_try) 2>&5
15833   ac_status=$?
15834   echo "$as_me:15834: \$? = $ac_status" >&5
15835   (exit $ac_status); }; }; then
15836   ac_cv_lib_gen_compile=yes
15837 else
15838   echo "$as_me: failed program was:" >&5
15839 cat conftest.$ac_ext >&5
15840 ac_cv_lib_gen_compile=no
15841 fi
15842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15843 LIBS=$ac_check_lib_save_LIBS
15844 fi
15845 echo "$as_me:15845: result: $ac_cv_lib_gen_compile" >&5
15846 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15847 if test $ac_cv_lib_gen_compile = yes; then
15848
15849 cf_add_libs="-lgen"
15850 # Filter out duplicates - this happens with badly-designed ".pc" files...
15851 for cf_add_1lib in $LIBS
15852 do
15853         for cf_add_2lib in $cf_add_libs
15854         do
15855                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15856                 then
15857                         cf_add_1lib=
15858                         break
15859                 fi
15860         done
15861         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15862 done
15863 LIBS="$cf_add_libs"
15864
15865                                 cf_regex_func=compile
15866 fi
15867
15868 fi
15869
15870 fi
15871
15872 if test "$cf_regex_func" = no ; then
15873         { echo "$as_me:15873: WARNING: cannot find regular expression library" >&5
15874 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15875 fi
15876
15877 echo "$as_me:15877: checking for regular-expression headers" >&5
15878 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15879 if test "${cf_cv_regex_hdrs+set}" = set; then
15880   echo $ECHO_N "(cached) $ECHO_C" >&6
15881 else
15882
15883 cf_cv_regex_hdrs=no
15884 case $cf_regex_func in
15885 (compile)
15886         for cf_regex_hdr in regexp.h regexpr.h
15887         do
15888                 cat >conftest.$ac_ext <<_ACEOF
15889 #line 15889 "configure"
15890 #include "confdefs.h"
15891 #include <$cf_regex_hdr>
15892 int
15893 main ()
15894 {
15895
15896                         char *p = compile("", "", "", 0);
15897                         int x = step("", "");
15898
15899   ;
15900   return 0;
15901 }
15902 _ACEOF
15903 rm -f conftest.$ac_objext conftest$ac_exeext
15904 if { (eval echo "$as_me:15904: \"$ac_link\"") >&5
15905   (eval $ac_link) 2>&5
15906   ac_status=$?
15907   echo "$as_me:15907: \$? = $ac_status" >&5
15908   (exit $ac_status); } &&
15909          { ac_try='test -s conftest$ac_exeext'
15910   { (eval echo "$as_me:15910: \"$ac_try\"") >&5
15911   (eval $ac_try) 2>&5
15912   ac_status=$?
15913   echo "$as_me:15913: \$? = $ac_status" >&5
15914   (exit $ac_status); }; }; then
15915
15916                         cf_cv_regex_hdrs=$cf_regex_hdr
15917                         break
15918
15919 else
15920   echo "$as_me: failed program was:" >&5
15921 cat conftest.$ac_ext >&5
15922 fi
15923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15924         done
15925         ;;
15926 (*)
15927         for cf_regex_hdr in regex.h
15928         do
15929                 cat >conftest.$ac_ext <<_ACEOF
15930 #line 15930 "configure"
15931 #include "confdefs.h"
15932 #include <sys/types.h>
15933 #include <$cf_regex_hdr>
15934 int
15935 main ()
15936 {
15937
15938                         regex_t *p;
15939                         int x = regcomp(p, "", 0);
15940                         int y = regexec(p, "", 0, 0, 0);
15941                         regfree(p);
15942
15943   ;
15944   return 0;
15945 }
15946 _ACEOF
15947 rm -f conftest.$ac_objext conftest$ac_exeext
15948 if { (eval echo "$as_me:15948: \"$ac_link\"") >&5
15949   (eval $ac_link) 2>&5
15950   ac_status=$?
15951   echo "$as_me:15951: \$? = $ac_status" >&5
15952   (exit $ac_status); } &&
15953          { ac_try='test -s conftest$ac_exeext'
15954   { (eval echo "$as_me:15954: \"$ac_try\"") >&5
15955   (eval $ac_try) 2>&5
15956   ac_status=$?
15957   echo "$as_me:15957: \$? = $ac_status" >&5
15958   (exit $ac_status); }; }; then
15959
15960                         cf_cv_regex_hdrs=$cf_regex_hdr
15961                         break
15962
15963 else
15964   echo "$as_me: failed program was:" >&5
15965 cat conftest.$ac_ext >&5
15966 fi
15967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15968         done
15969         ;;
15970 esac
15971
15972 fi
15973 echo "$as_me:15973: result: $cf_cv_regex_hdrs" >&5
15974 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15975
15976 case $cf_cv_regex_hdrs in
15977         (no)            { echo "$as_me:15977: WARNING: no regular expression header found" >&5
15978 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15979         (regex.h)
15980 cat >>confdefs.h <<\EOF
15981 #define HAVE_REGEX_H_FUNCS 1
15982 EOF
15983  ;;
15984         (regexp.h)
15985 cat >>confdefs.h <<\EOF
15986 #define HAVE_REGEXP_H_FUNCS 1
15987 EOF
15988  ;;
15989         (regexpr.h)
15990 cat >>confdefs.h <<\EOF
15991 #define HAVE_REGEXPR_H_FUNCS 1
15992 EOF
15993  ;;
15994 esac
15995
15996 for ac_header in \
15997 fcntl.h \
15998 getopt.h \
15999 limits.h \
16000 locale.h \
16001 math.h \
16002 poll.h \
16003 sys/bsdtypes.h \
16004 sys/ioctl.h \
16005 sys/param.h \
16006 sys/poll.h \
16007 sys/select.h \
16008 sys/time.h \
16009 sys/times.h \
16010 ttyent.h \
16011 unistd.h \
16012 wctype.h \
16013
16014 do
16015 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16016 echo "$as_me:16016: checking for $ac_header" >&5
16017 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16018 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16019   echo $ECHO_N "(cached) $ECHO_C" >&6
16020 else
16021   cat >conftest.$ac_ext <<_ACEOF
16022 #line 16022 "configure"
16023 #include "confdefs.h"
16024 #include <$ac_header>
16025 _ACEOF
16026 if { (eval echo "$as_me:16026: \"$ac_cpp conftest.$ac_ext\"") >&5
16027   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16028   ac_status=$?
16029   egrep -v '^ *\+' conftest.er1 >conftest.err
16030   rm -f conftest.er1
16031   cat conftest.err >&5
16032   echo "$as_me:16032: \$? = $ac_status" >&5
16033   (exit $ac_status); } >/dev/null; then
16034   if test -s conftest.err; then
16035     ac_cpp_err=$ac_c_preproc_warn_flag
16036   else
16037     ac_cpp_err=
16038   fi
16039 else
16040   ac_cpp_err=yes
16041 fi
16042 if test -z "$ac_cpp_err"; then
16043   eval "$as_ac_Header=yes"
16044 else
16045   echo "$as_me: failed program was:" >&5
16046   cat conftest.$ac_ext >&5
16047   eval "$as_ac_Header=no"
16048 fi
16049 rm -f conftest.err conftest.$ac_ext
16050 fi
16051 echo "$as_me:16051: result: `eval echo '${'$as_ac_Header'}'`" >&5
16052 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16053 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16054   cat >>confdefs.h <<EOF
16055 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16056 EOF
16057
16058 fi
16059 done
16060
16061 for ac_header in unistd.h getopt.h
16062 do
16063 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16064 echo "$as_me:16064: checking for $ac_header" >&5
16065 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16066 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16067   echo $ECHO_N "(cached) $ECHO_C" >&6
16068 else
16069   cat >conftest.$ac_ext <<_ACEOF
16070 #line 16070 "configure"
16071 #include "confdefs.h"
16072 #include <$ac_header>
16073 _ACEOF
16074 if { (eval echo "$as_me:16074: \"$ac_cpp conftest.$ac_ext\"") >&5
16075   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16076   ac_status=$?
16077   egrep -v '^ *\+' conftest.er1 >conftest.err
16078   rm -f conftest.er1
16079   cat conftest.err >&5
16080   echo "$as_me:16080: \$? = $ac_status" >&5
16081   (exit $ac_status); } >/dev/null; then
16082   if test -s conftest.err; then
16083     ac_cpp_err=$ac_c_preproc_warn_flag
16084   else
16085     ac_cpp_err=
16086   fi
16087 else
16088   ac_cpp_err=yes
16089 fi
16090 if test -z "$ac_cpp_err"; then
16091   eval "$as_ac_Header=yes"
16092 else
16093   echo "$as_me: failed program was:" >&5
16094   cat conftest.$ac_ext >&5
16095   eval "$as_ac_Header=no"
16096 fi
16097 rm -f conftest.err conftest.$ac_ext
16098 fi
16099 echo "$as_me:16099: result: `eval echo '${'$as_ac_Header'}'`" >&5
16100 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16101 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16102   cat >>confdefs.h <<EOF
16103 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16104 EOF
16105
16106 fi
16107 done
16108
16109 echo "$as_me:16109: checking for header declaring getopt variables" >&5
16110 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16111 if test "${cf_cv_getopt_header+set}" = set; then
16112   echo $ECHO_N "(cached) $ECHO_C" >&6
16113 else
16114
16115 cf_cv_getopt_header=none
16116 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16117 do
16118 cat >conftest.$ac_ext <<_ACEOF
16119 #line 16119 "configure"
16120 #include "confdefs.h"
16121
16122 #include <$cf_header>
16123 int
16124 main ()
16125 {
16126 int x = optind; char *y = optarg
16127   ;
16128   return 0;
16129 }
16130 _ACEOF
16131 rm -f conftest.$ac_objext
16132 if { (eval echo "$as_me:16132: \"$ac_compile\"") >&5
16133   (eval $ac_compile) 2>&5
16134   ac_status=$?
16135   echo "$as_me:16135: \$? = $ac_status" >&5
16136   (exit $ac_status); } &&
16137          { ac_try='test -s conftest.$ac_objext'
16138   { (eval echo "$as_me:16138: \"$ac_try\"") >&5
16139   (eval $ac_try) 2>&5
16140   ac_status=$?
16141   echo "$as_me:16141: \$? = $ac_status" >&5
16142   (exit $ac_status); }; }; then
16143   cf_cv_getopt_header=$cf_header
16144  break
16145 else
16146   echo "$as_me: failed program was:" >&5
16147 cat conftest.$ac_ext >&5
16148 fi
16149 rm -f conftest.$ac_objext conftest.$ac_ext
16150 done
16151
16152 fi
16153 echo "$as_me:16153: result: $cf_cv_getopt_header" >&5
16154 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16155 if test $cf_cv_getopt_header != none ; then
16156
16157 cat >>confdefs.h <<\EOF
16158 #define HAVE_GETOPT_HEADER 1
16159 EOF
16160
16161 fi
16162 if test $cf_cv_getopt_header = getopt.h ; then
16163
16164 cat >>confdefs.h <<\EOF
16165 #define NEED_GETOPT_H 1
16166 EOF
16167
16168 fi
16169
16170 # check for ISC (this may also define _POSIX_SOURCE)
16171 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16172 if test "x$ISC" = xyes ; then
16173
16174 echo "$as_me:16174: checking for main in -lcposix" >&5
16175 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16176 if test "${ac_cv_lib_cposix_main+set}" = set; then
16177   echo $ECHO_N "(cached) $ECHO_C" >&6
16178 else
16179   ac_check_lib_save_LIBS=$LIBS
16180 LIBS="-lcposix  $LIBS"
16181 cat >conftest.$ac_ext <<_ACEOF
16182 #line 16182 "configure"
16183 #include "confdefs.h"
16184
16185 int
16186 main ()
16187 {
16188 main ();
16189   ;
16190   return 0;
16191 }
16192 _ACEOF
16193 rm -f conftest.$ac_objext conftest$ac_exeext
16194 if { (eval echo "$as_me:16194: \"$ac_link\"") >&5
16195   (eval $ac_link) 2>&5
16196   ac_status=$?
16197   echo "$as_me:16197: \$? = $ac_status" >&5
16198   (exit $ac_status); } &&
16199          { ac_try='test -s conftest$ac_exeext'
16200   { (eval echo "$as_me:16200: \"$ac_try\"") >&5
16201   (eval $ac_try) 2>&5
16202   ac_status=$?
16203   echo "$as_me:16203: \$? = $ac_status" >&5
16204   (exit $ac_status); }; }; then
16205   ac_cv_lib_cposix_main=yes
16206 else
16207   echo "$as_me: failed program was:" >&5
16208 cat conftest.$ac_ext >&5
16209 ac_cv_lib_cposix_main=no
16210 fi
16211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16212 LIBS=$ac_check_lib_save_LIBS
16213 fi
16214 echo "$as_me:16214: result: $ac_cv_lib_cposix_main" >&5
16215 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16216 if test $ac_cv_lib_cposix_main = yes; then
16217   cat >>confdefs.h <<EOF
16218 #define HAVE_LIBCPOSIX 1
16219 EOF
16220
16221   LIBS="-lcposix $LIBS"
16222
16223 fi
16224
16225         echo "$as_me:16225: checking for bzero in -linet" >&5
16226 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16227 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16228   echo $ECHO_N "(cached) $ECHO_C" >&6
16229 else
16230   ac_check_lib_save_LIBS=$LIBS
16231 LIBS="-linet  $LIBS"
16232 cat >conftest.$ac_ext <<_ACEOF
16233 #line 16233 "configure"
16234 #include "confdefs.h"
16235
16236 /* Override any gcc2 internal prototype to avoid an error.  */
16237 #ifdef __cplusplus
16238 extern "C"
16239 #endif
16240 /* We use char because int might match the return type of a gcc2
16241    builtin and then its argument prototype would still apply.  */
16242 char bzero ();
16243 int
16244 main ()
16245 {
16246 bzero ();
16247   ;
16248   return 0;
16249 }
16250 _ACEOF
16251 rm -f conftest.$ac_objext conftest$ac_exeext
16252 if { (eval echo "$as_me:16252: \"$ac_link\"") >&5
16253   (eval $ac_link) 2>&5
16254   ac_status=$?
16255   echo "$as_me:16255: \$? = $ac_status" >&5
16256   (exit $ac_status); } &&
16257          { ac_try='test -s conftest$ac_exeext'
16258   { (eval echo "$as_me:16258: \"$ac_try\"") >&5
16259   (eval $ac_try) 2>&5
16260   ac_status=$?
16261   echo "$as_me:16261: \$? = $ac_status" >&5
16262   (exit $ac_status); }; }; then
16263   ac_cv_lib_inet_bzero=yes
16264 else
16265   echo "$as_me: failed program was:" >&5
16266 cat conftest.$ac_ext >&5
16267 ac_cv_lib_inet_bzero=no
16268 fi
16269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16270 LIBS=$ac_check_lib_save_LIBS
16271 fi
16272 echo "$as_me:16272: result: $ac_cv_lib_inet_bzero" >&5
16273 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16274 if test $ac_cv_lib_inet_bzero = yes; then
16275
16276 cf_add_libs="-linet"
16277 # Filter out duplicates - this happens with badly-designed ".pc" files...
16278 for cf_add_1lib in $LIBS
16279 do
16280         for cf_add_2lib in $cf_add_libs
16281         do
16282                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16283                 then
16284                         cf_add_1lib=
16285                         break
16286                 fi
16287         done
16288         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16289 done
16290 LIBS="$cf_add_libs"
16291
16292 fi
16293 fi
16294
16295 echo "$as_me:16295: checking if sys/time.h works with sys/select.h" >&5
16296 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16297 if test "${cf_cv_sys_time_select+set}" = set; then
16298   echo $ECHO_N "(cached) $ECHO_C" >&6
16299 else
16300
16301 cat >conftest.$ac_ext <<_ACEOF
16302 #line 16302 "configure"
16303 #include "confdefs.h"
16304
16305 #include <sys/types.h>
16306 #ifdef HAVE_SYS_TIME_H
16307 #include <sys/time.h>
16308 #endif
16309 #ifdef HAVE_SYS_SELECT_H
16310 #include <sys/select.h>
16311 #endif
16312
16313 int
16314 main ()
16315 {
16316
16317   ;
16318   return 0;
16319 }
16320 _ACEOF
16321 rm -f conftest.$ac_objext
16322 if { (eval echo "$as_me:16322: \"$ac_compile\"") >&5
16323   (eval $ac_compile) 2>&5
16324   ac_status=$?
16325   echo "$as_me:16325: \$? = $ac_status" >&5
16326   (exit $ac_status); } &&
16327          { ac_try='test -s conftest.$ac_objext'
16328   { (eval echo "$as_me:16328: \"$ac_try\"") >&5
16329   (eval $ac_try) 2>&5
16330   ac_status=$?
16331   echo "$as_me:16331: \$? = $ac_status" >&5
16332   (exit $ac_status); }; }; then
16333   cf_cv_sys_time_select=yes
16334 else
16335   echo "$as_me: failed program was:" >&5
16336 cat conftest.$ac_ext >&5
16337 cf_cv_sys_time_select=no
16338 fi
16339 rm -f conftest.$ac_objext conftest.$ac_ext
16340
16341 fi
16342
16343 echo "$as_me:16343: result: $cf_cv_sys_time_select" >&5
16344 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16345 test "$cf_cv_sys_time_select" = yes &&
16346 cat >>confdefs.h <<\EOF
16347 #define HAVE_SYS_TIME_SELECT 1
16348 EOF
16349
16350 ###     checks for compiler characteristics
16351 ac_ext=c
16352 ac_cpp='$CPP $CPPFLAGS'
16353 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16354 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16355 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16356 ac_main_return=return
16357
16358 echo "$as_me:16358: checking for an ANSI C-conforming const" >&5
16359 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16360 if test "${ac_cv_c_const+set}" = set; then
16361   echo $ECHO_N "(cached) $ECHO_C" >&6
16362 else
16363   cat >conftest.$ac_ext <<_ACEOF
16364 #line 16364 "configure"
16365 #include "confdefs.h"
16366
16367 int
16368 main ()
16369 {
16370 /* FIXME: Include the comments suggested by Paul. */
16371 #ifndef __cplusplus
16372   /* Ultrix mips cc rejects this.  */
16373   typedef int charset[2];
16374   const charset x;
16375   /* SunOS 4.1.1 cc rejects this.  */
16376   char const *const *ccp;
16377   char **p;
16378   /* NEC SVR4.0.2 mips cc rejects this.  */
16379   struct point {int x, y;};
16380   static struct point const zero = {0,0};
16381   /* AIX XL C 1.02.0.0 rejects this.
16382      It does not let you subtract one const X* pointer from another in
16383      an arm of an if-expression whose if-part is not a constant
16384      expression */
16385   const char *g = "string";
16386   ccp = &g + (g ? g-g : 0);
16387   /* HPUX 7.0 cc rejects these. */
16388   ++ccp;
16389   p = (char**) ccp;
16390   ccp = (char const *const *) p;
16391   { /* SCO 3.2v4 cc rejects this.  */
16392     char *t;
16393     char const *s = 0 ? (char *) 0 : (char const *) 0;
16394
16395     *t++ = 0;
16396   }
16397   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16398     int x[] = {25, 17};
16399     const int *foo = &x[0];
16400     ++foo;
16401   }
16402   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16403     typedef const int *iptr;
16404     iptr p = 0;
16405     ++p;
16406   }
16407   { /* AIX XL C 1.02.0.0 rejects this saying
16408        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16409     struct s { int j; const int *ap[3]; };
16410     struct s *b; b->j = 5;
16411   }
16412   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16413     const int foo = 10;
16414   }
16415 #endif
16416
16417   ;
16418   return 0;
16419 }
16420 _ACEOF
16421 rm -f conftest.$ac_objext
16422 if { (eval echo "$as_me:16422: \"$ac_compile\"") >&5
16423   (eval $ac_compile) 2>&5
16424   ac_status=$?
16425   echo "$as_me:16425: \$? = $ac_status" >&5
16426   (exit $ac_status); } &&
16427          { ac_try='test -s conftest.$ac_objext'
16428   { (eval echo "$as_me:16428: \"$ac_try\"") >&5
16429   (eval $ac_try) 2>&5
16430   ac_status=$?
16431   echo "$as_me:16431: \$? = $ac_status" >&5
16432   (exit $ac_status); }; }; then
16433   ac_cv_c_const=yes
16434 else
16435   echo "$as_me: failed program was:" >&5
16436 cat conftest.$ac_ext >&5
16437 ac_cv_c_const=no
16438 fi
16439 rm -f conftest.$ac_objext conftest.$ac_ext
16440 fi
16441 echo "$as_me:16441: result: $ac_cv_c_const" >&5
16442 echo "${ECHO_T}$ac_cv_c_const" >&6
16443 if test $ac_cv_c_const = no; then
16444
16445 cat >>confdefs.h <<\EOF
16446 #define const
16447 EOF
16448
16449 fi
16450
16451 echo "$as_me:16451: checking for inline" >&5
16452 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16453 if test "${ac_cv_c_inline+set}" = set; then
16454   echo $ECHO_N "(cached) $ECHO_C" >&6
16455 else
16456   ac_cv_c_inline=no
16457 for ac_kw in inline __inline__ __inline; do
16458   cat >conftest.$ac_ext <<_ACEOF
16459 #line 16459 "configure"
16460 #include "confdefs.h"
16461 #ifndef __cplusplus
16462 static $ac_kw int static_foo () {return 0; }
16463 $ac_kw int foo () {return 0; }
16464 #endif
16465
16466 _ACEOF
16467 rm -f conftest.$ac_objext
16468 if { (eval echo "$as_me:16468: \"$ac_compile\"") >&5
16469   (eval $ac_compile) 2>&5
16470   ac_status=$?
16471   echo "$as_me:16471: \$? = $ac_status" >&5
16472   (exit $ac_status); } &&
16473          { ac_try='test -s conftest.$ac_objext'
16474   { (eval echo "$as_me:16474: \"$ac_try\"") >&5
16475   (eval $ac_try) 2>&5
16476   ac_status=$?
16477   echo "$as_me:16477: \$? = $ac_status" >&5
16478   (exit $ac_status); }; }; then
16479   ac_cv_c_inline=$ac_kw; break
16480 else
16481   echo "$as_me: failed program was:" >&5
16482 cat conftest.$ac_ext >&5
16483 fi
16484 rm -f conftest.$ac_objext conftest.$ac_ext
16485 done
16486
16487 fi
16488 echo "$as_me:16488: result: $ac_cv_c_inline" >&5
16489 echo "${ECHO_T}$ac_cv_c_inline" >&6
16490 case $ac_cv_c_inline in
16491   inline | yes) ;;
16492   no)
16493 cat >>confdefs.h <<\EOF
16494 #define inline
16495 EOF
16496  ;;
16497   *)  cat >>confdefs.h <<EOF
16498 #define inline $ac_cv_c_inline
16499 EOF
16500  ;;
16501 esac
16502
16503 NCURSES_INLINE=
16504 if test "$ac_cv_c_inline" != no ; then
16505         NCURSES_INLINE=inline
16506         if test "$INTEL_COMPILER" = yes
16507         then
16508                 :
16509         elif test "$CLANG_COMPILER" = yes
16510         then
16511                 :
16512         elif test "$GCC" = yes
16513         then
16514                 echo "$as_me:16514: checking if $CC supports options to tune inlining" >&5
16515 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16516 if test "${cf_cv_gcc_inline+set}" = set; then
16517   echo $ECHO_N "(cached) $ECHO_C" >&6
16518 else
16519
16520                 cf_save_CFLAGS=$CFLAGS
16521                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16522                 cat >conftest.$ac_ext <<_ACEOF
16523 #line 16523 "configure"
16524 #include "confdefs.h"
16525 inline int foo(void) { return 1; }
16526 int
16527 main ()
16528 {
16529 ${cf_cv_main_return:-return} foo()
16530   ;
16531   return 0;
16532 }
16533 _ACEOF
16534 rm -f conftest.$ac_objext
16535 if { (eval echo "$as_me:16535: \"$ac_compile\"") >&5
16536   (eval $ac_compile) 2>&5
16537   ac_status=$?
16538   echo "$as_me:16538: \$? = $ac_status" >&5
16539   (exit $ac_status); } &&
16540          { ac_try='test -s conftest.$ac_objext'
16541   { (eval echo "$as_me:16541: \"$ac_try\"") >&5
16542   (eval $ac_try) 2>&5
16543   ac_status=$?
16544   echo "$as_me:16544: \$? = $ac_status" >&5
16545   (exit $ac_status); }; }; then
16546   cf_cv_gcc_inline=yes
16547 else
16548   echo "$as_me: failed program was:" >&5
16549 cat conftest.$ac_ext >&5
16550 cf_cv_gcc_inline=no
16551 fi
16552 rm -f conftest.$ac_objext conftest.$ac_ext
16553                 CFLAGS=$cf_save_CFLAGS
16554
16555 fi
16556 echo "$as_me:16556: result: $cf_cv_gcc_inline" >&5
16557 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16558                 if test "$cf_cv_gcc_inline" = yes ; then
16559
16560 cf_fix_cppflags=no
16561 cf_new_cflags=
16562 cf_new_cppflags=
16563 cf_new_extra_cppflags=
16564
16565 for cf_add_cflags in --param max-inline-insns-single=1200
16566 do
16567 case $cf_fix_cppflags in
16568 (no)
16569         case $cf_add_cflags in
16570         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16571                 case $cf_add_cflags in
16572                 (-D*)
16573                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16574
16575                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16576                                 && test -z "${cf_tst_cflags}" \
16577                                 && cf_fix_cppflags=yes
16578
16579                         if test $cf_fix_cppflags = yes ; then
16580                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16581                                 continue
16582                         elif test "${cf_tst_cflags}" = "\"'" ; then
16583                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16584                                 continue
16585                         fi
16586                         ;;
16587                 esac
16588                 case "$CPPFLAGS" in
16589                 (*$cf_add_cflags)
16590                         ;;
16591                 (*)
16592                         case $cf_add_cflags in
16593                         (-D*)
16594                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16595
16596 CPPFLAGS=`echo "$CPPFLAGS" | \
16597         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16598                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16599
16600                                 ;;
16601                         esac
16602                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16603                         ;;
16604                 esac
16605                 ;;
16606         (*)
16607                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16608                 ;;
16609         esac
16610         ;;
16611 (yes)
16612         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16613
16614         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16615
16616         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16617                 && test -z "${cf_tst_cflags}" \
16618                 && cf_fix_cppflags=no
16619         ;;
16620 esac
16621 done
16622
16623 if test -n "$cf_new_cflags" ; then
16624
16625         CFLAGS="$CFLAGS $cf_new_cflags"
16626 fi
16627
16628 if test -n "$cf_new_cppflags" ; then
16629
16630         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16631 fi
16632
16633 if test -n "$cf_new_extra_cppflags" ; then
16634
16635         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16636 fi
16637
16638                 fi
16639         fi
16640 fi
16641
16642 echo "$as_me:16642: checking for signal global datatype" >&5
16643 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16644 if test "${cf_cv_sig_atomic_t+set}" = set; then
16645   echo $ECHO_N "(cached) $ECHO_C" >&6
16646 else
16647
16648         for cf_type in \
16649                 "volatile sig_atomic_t" \
16650                 "sig_atomic_t" \
16651                 "int"
16652         do
16653         cat >conftest.$ac_ext <<_ACEOF
16654 #line 16654 "configure"
16655 #include "confdefs.h"
16656
16657 #include <sys/types.h>
16658 #include <signal.h>
16659 #include <stdio.h>
16660
16661 extern $cf_type x;
16662 $cf_type x;
16663 static void handler(int sig)
16664 {
16665         x = 5;
16666 }
16667 int
16668 main ()
16669 {
16670 signal(SIGINT, handler);
16671                  x = 1
16672   ;
16673   return 0;
16674 }
16675 _ACEOF
16676 rm -f conftest.$ac_objext
16677 if { (eval echo "$as_me:16677: \"$ac_compile\"") >&5
16678   (eval $ac_compile) 2>&5
16679   ac_status=$?
16680   echo "$as_me:16680: \$? = $ac_status" >&5
16681   (exit $ac_status); } &&
16682          { ac_try='test -s conftest.$ac_objext'
16683   { (eval echo "$as_me:16683: \"$ac_try\"") >&5
16684   (eval $ac_try) 2>&5
16685   ac_status=$?
16686   echo "$as_me:16686: \$? = $ac_status" >&5
16687   (exit $ac_status); }; }; then
16688   cf_cv_sig_atomic_t=$cf_type
16689 else
16690   echo "$as_me: failed program was:" >&5
16691 cat conftest.$ac_ext >&5
16692 cf_cv_sig_atomic_t=no
16693 fi
16694 rm -f conftest.$ac_objext conftest.$ac_ext
16695                 test "$cf_cv_sig_atomic_t" != no && break
16696         done
16697
16698 fi
16699
16700 echo "$as_me:16700: result: $cf_cv_sig_atomic_t" >&5
16701 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16702 test "$cf_cv_sig_atomic_t" != no &&
16703 cat >>confdefs.h <<EOF
16704 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16705 EOF
16706
16707 if test $NCURSES_CHTYPE = auto ; then
16708
16709 echo "$as_me:16709: checking for type of chtype" >&5
16710 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16711 if test "${cf_cv_typeof_chtype+set}" = set; then
16712   echo $ECHO_N "(cached) $ECHO_C" >&6
16713 else
16714
16715                 if test "$cross_compiling" = yes; then
16716   cf_cv_typeof_chtype=long
16717 else
16718   cat >conftest.$ac_ext <<_ACEOF
16719 #line 16719 "configure"
16720 #include "confdefs.h"
16721
16722 #define WANT_BITS 31
16723 #include <stdio.h>
16724 int main(void)
16725 {
16726         FILE *fp = fopen("cf_test.out", "w");
16727         if (fp != 0) {
16728                 char *result = "long";
16729                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16730                         int n;
16731                         unsigned int x, y;
16732                         for (n = 0; n < WANT_BITS; n++) {
16733                                 x = (1 << n);
16734                                 y = (x >> n);
16735                                 if (y != 1 || x == 0) {
16736                                         x = 0;
16737                                         break;
16738                                 }
16739                         }
16740                         /*
16741                          * If x is nonzero, an int is big enough for the bits
16742                          * that we want.
16743                          */
16744                         result = (x != 0) ? "int" : "long";
16745                 }
16746                 fputs(result, fp);
16747                 fclose(fp);
16748         }
16749         ${cf_cv_main_return:-return}(0);
16750 }
16751
16752 _ACEOF
16753 rm -f conftest$ac_exeext
16754 if { (eval echo "$as_me:16754: \"$ac_link\"") >&5
16755   (eval $ac_link) 2>&5
16756   ac_status=$?
16757   echo "$as_me:16757: \$? = $ac_status" >&5
16758   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16759   { (eval echo "$as_me:16759: \"$ac_try\"") >&5
16760   (eval $ac_try) 2>&5
16761   ac_status=$?
16762   echo "$as_me:16762: \$? = $ac_status" >&5
16763   (exit $ac_status); }; }; then
16764   cf_cv_typeof_chtype=`cat cf_test.out`
16765 else
16766   echo "$as_me: program exited with status $ac_status" >&5
16767 echo "$as_me: failed program was:" >&5
16768 cat conftest.$ac_ext >&5
16769 cf_cv_typeof_chtype=long
16770 fi
16771 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16772 fi
16773                 rm -f cf_test.out
16774
16775 fi
16776
16777 echo "$as_me:16777: result: $cf_cv_typeof_chtype" >&5
16778 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16779
16780 cat >>confdefs.h <<EOF
16781 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16782 EOF
16783
16784 else
16785         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16786 fi
16787 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16788
16789 echo "$as_me:16789: checking if unsigned literals are legal" >&5
16790 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16791 if test "${cf_cv_unsigned_literals+set}" = set; then
16792   echo $ECHO_N "(cached) $ECHO_C" >&6
16793 else
16794
16795         cat >conftest.$ac_ext <<_ACEOF
16796 #line 16796 "configure"
16797 #include "confdefs.h"
16798
16799 int
16800 main ()
16801 {
16802 long x = 1L + 1UL + 1U + 1
16803   ;
16804   return 0;
16805 }
16806 _ACEOF
16807 rm -f conftest.$ac_objext
16808 if { (eval echo "$as_me:16808: \"$ac_compile\"") >&5
16809   (eval $ac_compile) 2>&5
16810   ac_status=$?
16811   echo "$as_me:16811: \$? = $ac_status" >&5
16812   (exit $ac_status); } &&
16813          { ac_try='test -s conftest.$ac_objext'
16814   { (eval echo "$as_me:16814: \"$ac_try\"") >&5
16815   (eval $ac_try) 2>&5
16816   ac_status=$?
16817   echo "$as_me:16817: \$? = $ac_status" >&5
16818   (exit $ac_status); }; }; then
16819   cf_cv_unsigned_literals=yes
16820 else
16821   echo "$as_me: failed program was:" >&5
16822 cat conftest.$ac_ext >&5
16823 cf_cv_unsigned_literals=no
16824 fi
16825 rm -f conftest.$ac_objext conftest.$ac_ext
16826
16827 fi
16828
16829 echo "$as_me:16829: result: $cf_cv_unsigned_literals" >&5
16830 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16831
16832 cf_cv_1UL="1"
16833 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16834 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16835
16836 if test $NCURSES_MMASK_T = auto ; then
16837         cf_cv_typeof_mmask_t=long
16838 else
16839         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16840 fi
16841 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16842
16843 ###     Checks for external-data
16844
16845 echo "$as_me:16845: checking if external errno is declared" >&5
16846 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16847 if test "${cf_cv_dcl_errno+set}" = set; then
16848   echo $ECHO_N "(cached) $ECHO_C" >&6
16849 else
16850
16851         cat >conftest.$ac_ext <<_ACEOF
16852 #line 16852 "configure"
16853 #include "confdefs.h"
16854
16855 #ifdef HAVE_STDLIB_H
16856 #include <stdlib.h>
16857 #endif
16858 #include <stdio.h>
16859 #include <sys/types.h>
16860 #include <errno.h>
16861 int
16862 main ()
16863 {
16864 int x = (int) errno
16865   ;
16866   return 0;
16867 }
16868 _ACEOF
16869 rm -f conftest.$ac_objext
16870 if { (eval echo "$as_me:16870: \"$ac_compile\"") >&5
16871   (eval $ac_compile) 2>&5
16872   ac_status=$?
16873   echo "$as_me:16873: \$? = $ac_status" >&5
16874   (exit $ac_status); } &&
16875          { ac_try='test -s conftest.$ac_objext'
16876   { (eval echo "$as_me:16876: \"$ac_try\"") >&5
16877   (eval $ac_try) 2>&5
16878   ac_status=$?
16879   echo "$as_me:16879: \$? = $ac_status" >&5
16880   (exit $ac_status); }; }; then
16881   cf_cv_dcl_errno=yes
16882 else
16883   echo "$as_me: failed program was:" >&5
16884 cat conftest.$ac_ext >&5
16885 cf_cv_dcl_errno=no
16886 fi
16887 rm -f conftest.$ac_objext conftest.$ac_ext
16888
16889 fi
16890 echo "$as_me:16890: result: $cf_cv_dcl_errno" >&5
16891 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16892
16893 if test "$cf_cv_dcl_errno" = no ; then
16894
16895 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16896
16897         cat >>confdefs.h <<EOF
16898 #define $cf_result 1
16899 EOF
16900
16901 fi
16902
16903 # It's possible (for near-UNIX clones) that the data doesn't exist
16904
16905 echo "$as_me:16905: checking if external errno exists" >&5
16906 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16907 if test "${cf_cv_have_errno+set}" = set; then
16908   echo $ECHO_N "(cached) $ECHO_C" >&6
16909 else
16910
16911         cat >conftest.$ac_ext <<_ACEOF
16912 #line 16912 "configure"
16913 #include "confdefs.h"
16914
16915 #undef errno
16916 extern int errno;
16917
16918 int
16919 main ()
16920 {
16921 errno = 2
16922   ;
16923   return 0;
16924 }
16925 _ACEOF
16926 rm -f conftest.$ac_objext conftest$ac_exeext
16927 if { (eval echo "$as_me:16927: \"$ac_link\"") >&5
16928   (eval $ac_link) 2>&5
16929   ac_status=$?
16930   echo "$as_me:16930: \$? = $ac_status" >&5
16931   (exit $ac_status); } &&
16932          { ac_try='test -s conftest$ac_exeext'
16933   { (eval echo "$as_me:16933: \"$ac_try\"") >&5
16934   (eval $ac_try) 2>&5
16935   ac_status=$?
16936   echo "$as_me:16936: \$? = $ac_status" >&5
16937   (exit $ac_status); }; }; then
16938   cf_cv_have_errno=yes
16939 else
16940   echo "$as_me: failed program was:" >&5
16941 cat conftest.$ac_ext >&5
16942 cf_cv_have_errno=no
16943 fi
16944 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16945
16946 fi
16947 echo "$as_me:16947: result: $cf_cv_have_errno" >&5
16948 echo "${ECHO_T}$cf_cv_have_errno" >&6
16949
16950 if test "$cf_cv_have_errno" = yes ; then
16951
16952 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16953
16954         cat >>confdefs.h <<EOF
16955 #define $cf_result 1
16956 EOF
16957
16958 fi
16959
16960 echo "$as_me:16960: checking if data-only library module links" >&5
16961 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16962 if test "${cf_cv_link_dataonly+set}" = set; then
16963   echo $ECHO_N "(cached) $ECHO_C" >&6
16964 else
16965
16966         rm -f conftest.a
16967         cat >conftest.$ac_ext <<EOF
16968 #line 16968 "configure"
16969 int     testdata[3] = { 123, 456, 789 };
16970 EOF
16971         if { (eval echo "$as_me:16971: \"$ac_compile\"") >&5
16972   (eval $ac_compile) 2>&5
16973   ac_status=$?
16974   echo "$as_me:16974: \$? = $ac_status" >&5
16975   (exit $ac_status); } ; then
16976                 mv conftest.o data.o && \
16977                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16978         fi
16979         rm -f conftest.$ac_ext data.o
16980         cat >conftest.$ac_ext <<EOF
16981 #line 16981 "configure"
16982 int     testfunc()
16983 {
16984 #if defined(NeXT)
16985         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16986 #else
16987         extern int testdata[3];
16988         return testdata[0] == 123
16989            &&  testdata[1] == 456
16990            &&  testdata[2] == 789;
16991 #endif
16992 }
16993 EOF
16994         if { (eval echo "$as_me:16994: \"$ac_compile\"") >&5
16995   (eval $ac_compile) 2>&5
16996   ac_status=$?
16997   echo "$as_me:16997: \$? = $ac_status" >&5
16998   (exit $ac_status); }; then
16999                 mv conftest.o func.o && \
17000                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17001         fi
17002         rm -f conftest.$ac_ext func.o
17003         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17004         cf_saveLIBS="$LIBS"
17005         LIBS="conftest.a $LIBS"
17006         if test "$cross_compiling" = yes; then
17007   cf_cv_link_dataonly=unknown
17008 else
17009   cat >conftest.$ac_ext <<_ACEOF
17010 #line 17010 "configure"
17011 #include "confdefs.h"
17012
17013         int main(void)
17014         {
17015                 extern int testfunc();
17016                 ${cf_cv_main_return:-return} (!testfunc());
17017         }
17018
17019 _ACEOF
17020 rm -f conftest$ac_exeext
17021 if { (eval echo "$as_me:17021: \"$ac_link\"") >&5
17022   (eval $ac_link) 2>&5
17023   ac_status=$?
17024   echo "$as_me:17024: \$? = $ac_status" >&5
17025   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17026   { (eval echo "$as_me:17026: \"$ac_try\"") >&5
17027   (eval $ac_try) 2>&5
17028   ac_status=$?
17029   echo "$as_me:17029: \$? = $ac_status" >&5
17030   (exit $ac_status); }; }; then
17031   cf_cv_link_dataonly=yes
17032 else
17033   echo "$as_me: program exited with status $ac_status" >&5
17034 echo "$as_me: failed program was:" >&5
17035 cat conftest.$ac_ext >&5
17036 cf_cv_link_dataonly=no
17037 fi
17038 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17039 fi
17040         LIBS="$cf_saveLIBS"
17041
17042 fi
17043
17044 echo "$as_me:17044: result: $cf_cv_link_dataonly" >&5
17045 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17046
17047 if test "$cf_cv_link_dataonly" = no ; then
17048
17049 cat >>confdefs.h <<\EOF
17050 #define BROKEN_LINKER 1
17051 EOF
17052
17053         BROKEN_LINKER=1
17054 fi
17055
17056 ###     Checks for library functions.
17057
17058 for ac_func in \
17059 getcwd \
17060 getegid \
17061 geteuid \
17062 getopt \
17063 getttynam \
17064 issetugid \
17065 poll \
17066 putenv \
17067 remove \
17068 select \
17069 setbuf \
17070 setbuffer \
17071 setenv \
17072 setvbuf \
17073 sigaction \
17074 sigvec \
17075 strdup \
17076 strstr \
17077 tcgetpgrp \
17078 times \
17079 vsnprintf \
17080
17081 do
17082 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17083 echo "$as_me:17083: checking for $ac_func" >&5
17084 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17085 if eval "test \"\${$as_ac_var+set}\" = set"; then
17086   echo $ECHO_N "(cached) $ECHO_C" >&6
17087 else
17088   cat >conftest.$ac_ext <<_ACEOF
17089 #line 17089 "configure"
17090 #include "confdefs.h"
17091 /* System header to define __stub macros and hopefully few prototypes,
17092     which can conflict with char $ac_func (); below.  */
17093 #include <assert.h>
17094 /* Override any gcc2 internal prototype to avoid an error.  */
17095 #ifdef __cplusplus
17096 extern "C"
17097 #endif
17098 /* We use char because int might match the return type of a gcc2
17099    builtin and then its argument prototype would still apply.  */
17100 char $ac_func ();
17101 char (*f) ();
17102
17103 int
17104 main ()
17105 {
17106 /* The GNU C library defines this for functions which it implements
17107     to always fail with ENOSYS.  Some functions are actually named
17108     something starting with __ and the normal name is an alias.  */
17109 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17110 choke me
17111 #else
17112 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17113 #endif
17114
17115   ;
17116   return 0;
17117 }
17118 _ACEOF
17119 rm -f conftest.$ac_objext conftest$ac_exeext
17120 if { (eval echo "$as_me:17120: \"$ac_link\"") >&5
17121   (eval $ac_link) 2>&5
17122   ac_status=$?
17123   echo "$as_me:17123: \$? = $ac_status" >&5
17124   (exit $ac_status); } &&
17125          { ac_try='test -s conftest$ac_exeext'
17126   { (eval echo "$as_me:17126: \"$ac_try\"") >&5
17127   (eval $ac_try) 2>&5
17128   ac_status=$?
17129   echo "$as_me:17129: \$? = $ac_status" >&5
17130   (exit $ac_status); }; }; then
17131   eval "$as_ac_var=yes"
17132 else
17133   echo "$as_me: failed program was:" >&5
17134 cat conftest.$ac_ext >&5
17135 eval "$as_ac_var=no"
17136 fi
17137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17138 fi
17139 echo "$as_me:17139: result: `eval echo '${'$as_ac_var'}'`" >&5
17140 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17141 if test `eval echo '${'$as_ac_var'}'` = yes; then
17142   cat >>confdefs.h <<EOF
17143 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17144 EOF
17145
17146 fi
17147 done
17148
17149 if test "x$ac_cv_func_getopt" = xno &&
17150    test "x$cf_with_progs$cf_with_tests" != xnono; then
17151         { { echo "$as_me:17151: error: getopt is required for building programs" >&5
17152 echo "$as_me: error: getopt is required for building programs" >&2;}
17153    { (exit 1); exit 1; }; }
17154 fi
17155
17156 if test "x$with_getcap" = "xyes" ; then
17157
17158 echo "$as_me:17158: checking for terminal-capability database functions" >&5
17159 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17160 if test "${cf_cv_cgetent+set}" = set; then
17161   echo $ECHO_N "(cached) $ECHO_C" >&6
17162 else
17163
17164 cat >conftest.$ac_ext <<_ACEOF
17165 #line 17165 "configure"
17166 #include "confdefs.h"
17167
17168 #include <stdlib.h>
17169 int
17170 main ()
17171 {
17172
17173         char temp[128];
17174         char *buf = temp;
17175         char *db_array = temp;
17176         cgetent(&buf, &db_array, "vt100");
17177         cgetcap(buf, "tc", '=');
17178         cgetmatch(buf, "tc");
17179
17180   ;
17181   return 0;
17182 }
17183 _ACEOF
17184 rm -f conftest.$ac_objext conftest$ac_exeext
17185 if { (eval echo "$as_me:17185: \"$ac_link\"") >&5
17186   (eval $ac_link) 2>&5
17187   ac_status=$?
17188   echo "$as_me:17188: \$? = $ac_status" >&5
17189   (exit $ac_status); } &&
17190          { ac_try='test -s conftest$ac_exeext'
17191   { (eval echo "$as_me:17191: \"$ac_try\"") >&5
17192   (eval $ac_try) 2>&5
17193   ac_status=$?
17194   echo "$as_me:17194: \$? = $ac_status" >&5
17195   (exit $ac_status); }; }; then
17196   cf_cv_cgetent=yes
17197 else
17198   echo "$as_me: failed program was:" >&5
17199 cat conftest.$ac_ext >&5
17200 cf_cv_cgetent=no
17201 fi
17202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17203
17204 fi
17205 echo "$as_me:17205: result: $cf_cv_cgetent" >&5
17206 echo "${ECHO_T}$cf_cv_cgetent" >&6
17207
17208 if test "$cf_cv_cgetent" = yes
17209 then
17210
17211 cat >>confdefs.h <<\EOF
17212 #define HAVE_BSD_CGETENT 1
17213 EOF
17214
17215 echo "$as_me:17215: checking if cgetent uses const parameter" >&5
17216 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17217 if test "${cf_cv_cgetent_const+set}" = set; then
17218   echo $ECHO_N "(cached) $ECHO_C" >&6
17219 else
17220
17221 cat >conftest.$ac_ext <<_ACEOF
17222 #line 17222 "configure"
17223 #include "confdefs.h"
17224
17225 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17226 #include <stdlib.h>
17227 int
17228 main ()
17229 {
17230
17231         char temp[128];
17232         char *buf = temp;
17233 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17234         const char *db_array = temp;
17235         cgetent(&buf, &db_array, "vt100");
17236 #endif
17237         cgetcap(buf, "tc", '=');
17238         cgetmatch(buf, "tc");
17239
17240   ;
17241   return 0;
17242 }
17243 _ACEOF
17244 rm -f conftest.$ac_objext conftest$ac_exeext
17245 if { (eval echo "$as_me:17245: \"$ac_link\"") >&5
17246   (eval $ac_link) 2>&5
17247   ac_status=$?
17248   echo "$as_me:17248: \$? = $ac_status" >&5
17249   (exit $ac_status); } &&
17250          { ac_try='test -s conftest$ac_exeext'
17251   { (eval echo "$as_me:17251: \"$ac_try\"") >&5
17252   (eval $ac_try) 2>&5
17253   ac_status=$?
17254   echo "$as_me:17254: \$? = $ac_status" >&5
17255   (exit $ac_status); }; }; then
17256   cf_cv_cgetent_const=yes
17257 else
17258   echo "$as_me: failed program was:" >&5
17259 cat conftest.$ac_ext >&5
17260 cf_cv_cgetent_const=no
17261 fi
17262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17263
17264 fi
17265 echo "$as_me:17265: result: $cf_cv_cgetent_const" >&5
17266 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17267         if test "$cf_cv_cgetent_const" = yes
17268         then
17269
17270 cat >>confdefs.h <<EOF
17271 #define CGETENT_CONST const
17272 EOF
17273
17274         fi
17275 fi
17276
17277 fi
17278
17279 echo "$as_me:17279: checking for isascii" >&5
17280 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17281 if test "${cf_cv_have_isascii+set}" = set; then
17282   echo $ECHO_N "(cached) $ECHO_C" >&6
17283 else
17284
17285         cat >conftest.$ac_ext <<_ACEOF
17286 #line 17286 "configure"
17287 #include "confdefs.h"
17288 #include <ctype.h>
17289 int
17290 main ()
17291 {
17292 int x = isascii(' ')
17293   ;
17294   return 0;
17295 }
17296 _ACEOF
17297 rm -f conftest.$ac_objext conftest$ac_exeext
17298 if { (eval echo "$as_me:17298: \"$ac_link\"") >&5
17299   (eval $ac_link) 2>&5
17300   ac_status=$?
17301   echo "$as_me:17301: \$? = $ac_status" >&5
17302   (exit $ac_status); } &&
17303          { ac_try='test -s conftest$ac_exeext'
17304   { (eval echo "$as_me:17304: \"$ac_try\"") >&5
17305   (eval $ac_try) 2>&5
17306   ac_status=$?
17307   echo "$as_me:17307: \$? = $ac_status" >&5
17308   (exit $ac_status); }; }; then
17309   cf_cv_have_isascii=yes
17310 else
17311   echo "$as_me: failed program was:" >&5
17312 cat conftest.$ac_ext >&5
17313 cf_cv_have_isascii=no
17314 fi
17315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17316
17317 fi
17318 echo "$as_me:17318: result: $cf_cv_have_isascii" >&5
17319 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17320 test "$cf_cv_have_isascii" = yes &&
17321 cat >>confdefs.h <<\EOF
17322 #define HAVE_ISASCII 1
17323 EOF
17324
17325 if test "$ac_cv_func_sigaction" = yes; then
17326 echo "$as_me:17326: checking whether sigaction needs _POSIX_SOURCE" >&5
17327 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17328 cat >conftest.$ac_ext <<_ACEOF
17329 #line 17329 "configure"
17330 #include "confdefs.h"
17331
17332 #include <sys/types.h>
17333 #include <signal.h>
17334 int
17335 main ()
17336 {
17337 struct sigaction act
17338   ;
17339   return 0;
17340 }
17341 _ACEOF
17342 rm -f conftest.$ac_objext
17343 if { (eval echo "$as_me:17343: \"$ac_compile\"") >&5
17344   (eval $ac_compile) 2>&5
17345   ac_status=$?
17346   echo "$as_me:17346: \$? = $ac_status" >&5
17347   (exit $ac_status); } &&
17348          { ac_try='test -s conftest.$ac_objext'
17349   { (eval echo "$as_me:17349: \"$ac_try\"") >&5
17350   (eval $ac_try) 2>&5
17351   ac_status=$?
17352   echo "$as_me:17352: \$? = $ac_status" >&5
17353   (exit $ac_status); }; }; then
17354   sigact_bad=no
17355 else
17356   echo "$as_me: failed program was:" >&5
17357 cat conftest.$ac_ext >&5
17358
17359 cat >conftest.$ac_ext <<_ACEOF
17360 #line 17360 "configure"
17361 #include "confdefs.h"
17362
17363 #define _POSIX_SOURCE
17364 #include <sys/types.h>
17365 #include <signal.h>
17366 int
17367 main ()
17368 {
17369 struct sigaction act
17370   ;
17371   return 0;
17372 }
17373 _ACEOF
17374 rm -f conftest.$ac_objext
17375 if { (eval echo "$as_me:17375: \"$ac_compile\"") >&5
17376   (eval $ac_compile) 2>&5
17377   ac_status=$?
17378   echo "$as_me:17378: \$? = $ac_status" >&5
17379   (exit $ac_status); } &&
17380          { ac_try='test -s conftest.$ac_objext'
17381   { (eval echo "$as_me:17381: \"$ac_try\"") >&5
17382   (eval $ac_try) 2>&5
17383   ac_status=$?
17384   echo "$as_me:17384: \$? = $ac_status" >&5
17385   (exit $ac_status); }; }; then
17386   sigact_bad=yes
17387
17388 cat >>confdefs.h <<\EOF
17389 #define _POSIX_SOURCE 1
17390 EOF
17391
17392 else
17393   echo "$as_me: failed program was:" >&5
17394 cat conftest.$ac_ext >&5
17395 sigact_bad=unknown
17396 fi
17397 rm -f conftest.$ac_objext conftest.$ac_ext
17398 fi
17399 rm -f conftest.$ac_objext conftest.$ac_ext
17400 echo "$as_me:17400: result: $sigact_bad" >&5
17401 echo "${ECHO_T}$sigact_bad" >&6
17402 fi
17403
17404 echo "$as_me:17404: checking if nanosleep really works" >&5
17405 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17406 if test "${cf_cv_func_nanosleep+set}" = set; then
17407   echo $ECHO_N "(cached) $ECHO_C" >&6
17408 else
17409
17410 if test "$cross_compiling" = yes; then
17411   cf_cv_func_nanosleep=unknown
17412 else
17413   cat >conftest.$ac_ext <<_ACEOF
17414 #line 17414 "configure"
17415 #include "confdefs.h"
17416
17417 #include <stdio.h>
17418 #include <errno.h>
17419 #include <time.h>
17420
17421 #ifdef HAVE_SYS_TIME_H
17422 #include <sys/time.h>
17423 #endif
17424
17425 int main(void) {
17426         struct timespec ts1, ts2;
17427         int code;
17428         ts1.tv_sec  = 0;
17429         ts1.tv_nsec = 750000000;
17430         ts2.tv_sec  = 0;
17431         ts2.tv_nsec = 0;
17432         errno = 0;
17433         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17434         ${cf_cv_main_return:-return}(code != 0);
17435 }
17436
17437 _ACEOF
17438 rm -f conftest$ac_exeext
17439 if { (eval echo "$as_me:17439: \"$ac_link\"") >&5
17440   (eval $ac_link) 2>&5
17441   ac_status=$?
17442   echo "$as_me:17442: \$? = $ac_status" >&5
17443   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17444   { (eval echo "$as_me:17444: \"$ac_try\"") >&5
17445   (eval $ac_try) 2>&5
17446   ac_status=$?
17447   echo "$as_me:17447: \$? = $ac_status" >&5
17448   (exit $ac_status); }; }; then
17449   cf_cv_func_nanosleep=yes
17450 else
17451   echo "$as_me: program exited with status $ac_status" >&5
17452 echo "$as_me: failed program was:" >&5
17453 cat conftest.$ac_ext >&5
17454 cf_cv_func_nanosleep=no
17455 fi
17456 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17457 fi
17458 fi
17459 echo "$as_me:17459: result: $cf_cv_func_nanosleep" >&5
17460 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17461
17462 test "$cf_cv_func_nanosleep" = "yes" &&
17463 cat >>confdefs.h <<\EOF
17464 #define HAVE_NANOSLEEP 1
17465 EOF
17466
17467 for ac_header in \
17468 termio.h \
17469 termios.h \
17470 unistd.h \
17471
17472 do
17473 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17474 echo "$as_me:17474: checking for $ac_header" >&5
17475 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17476 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17477   echo $ECHO_N "(cached) $ECHO_C" >&6
17478 else
17479   cat >conftest.$ac_ext <<_ACEOF
17480 #line 17480 "configure"
17481 #include "confdefs.h"
17482 #include <$ac_header>
17483 _ACEOF
17484 if { (eval echo "$as_me:17484: \"$ac_cpp conftest.$ac_ext\"") >&5
17485   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17486   ac_status=$?
17487   egrep -v '^ *\+' conftest.er1 >conftest.err
17488   rm -f conftest.er1
17489   cat conftest.err >&5
17490   echo "$as_me:17490: \$? = $ac_status" >&5
17491   (exit $ac_status); } >/dev/null; then
17492   if test -s conftest.err; then
17493     ac_cpp_err=$ac_c_preproc_warn_flag
17494   else
17495     ac_cpp_err=
17496   fi
17497 else
17498   ac_cpp_err=yes
17499 fi
17500 if test -z "$ac_cpp_err"; then
17501   eval "$as_ac_Header=yes"
17502 else
17503   echo "$as_me: failed program was:" >&5
17504   cat conftest.$ac_ext >&5
17505   eval "$as_ac_Header=no"
17506 fi
17507 rm -f conftest.err conftest.$ac_ext
17508 fi
17509 echo "$as_me:17509: result: `eval echo '${'$as_ac_Header'}'`" >&5
17510 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17511 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17512   cat >>confdefs.h <<EOF
17513 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17514 EOF
17515
17516 fi
17517 done
17518
17519 if test "$ISC" = yes ; then
17520
17521 for ac_header in sys/termio.h
17522 do
17523 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17524 echo "$as_me:17524: checking for $ac_header" >&5
17525 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17526 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17527   echo $ECHO_N "(cached) $ECHO_C" >&6
17528 else
17529   cat >conftest.$ac_ext <<_ACEOF
17530 #line 17530 "configure"
17531 #include "confdefs.h"
17532 #include <$ac_header>
17533 _ACEOF
17534 if { (eval echo "$as_me:17534: \"$ac_cpp conftest.$ac_ext\"") >&5
17535   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17536   ac_status=$?
17537   egrep -v '^ *\+' conftest.er1 >conftest.err
17538   rm -f conftest.er1
17539   cat conftest.err >&5
17540   echo "$as_me:17540: \$? = $ac_status" >&5
17541   (exit $ac_status); } >/dev/null; then
17542   if test -s conftest.err; then
17543     ac_cpp_err=$ac_c_preproc_warn_flag
17544   else
17545     ac_cpp_err=
17546   fi
17547 else
17548   ac_cpp_err=yes
17549 fi
17550 if test -z "$ac_cpp_err"; then
17551   eval "$as_ac_Header=yes"
17552 else
17553   echo "$as_me: failed program was:" >&5
17554   cat conftest.$ac_ext >&5
17555   eval "$as_ac_Header=no"
17556 fi
17557 rm -f conftest.err conftest.$ac_ext
17558 fi
17559 echo "$as_me:17559: result: `eval echo '${'$as_ac_Header'}'`" >&5
17560 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17561 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17562   cat >>confdefs.h <<EOF
17563 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17564 EOF
17565
17566 fi
17567 done
17568
17569 fi
17570 if test "$ac_cv_header_termios_h" = yes ; then
17571         case "$CFLAGS $CPPFLAGS" in
17572         (*-D_POSIX_SOURCE*)
17573                 termios_bad=dunno ;;
17574         (*)     termios_bad=maybe ;;
17575         esac
17576         if test "$termios_bad" = maybe ; then
17577         echo "$as_me:17577: checking whether termios.h needs _POSIX_SOURCE" >&5
17578 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17579         cat >conftest.$ac_ext <<_ACEOF
17580 #line 17580 "configure"
17581 #include "confdefs.h"
17582 #include <termios.h>
17583 int
17584 main ()
17585 {
17586 struct termios foo; int x = foo.c_iflag
17587   ;
17588   return 0;
17589 }
17590 _ACEOF
17591 rm -f conftest.$ac_objext
17592 if { (eval echo "$as_me:17592: \"$ac_compile\"") >&5
17593   (eval $ac_compile) 2>&5
17594   ac_status=$?
17595   echo "$as_me:17595: \$? = $ac_status" >&5
17596   (exit $ac_status); } &&
17597          { ac_try='test -s conftest.$ac_objext'
17598   { (eval echo "$as_me:17598: \"$ac_try\"") >&5
17599   (eval $ac_try) 2>&5
17600   ac_status=$?
17601   echo "$as_me:17601: \$? = $ac_status" >&5
17602   (exit $ac_status); }; }; then
17603   termios_bad=no
17604 else
17605   echo "$as_me: failed program was:" >&5
17606 cat conftest.$ac_ext >&5
17607
17608                 cat >conftest.$ac_ext <<_ACEOF
17609 #line 17609 "configure"
17610 #include "confdefs.h"
17611
17612 #define _POSIX_SOURCE
17613 #include <termios.h>
17614 int
17615 main ()
17616 {
17617 struct termios foo; int x = foo.c_iflag
17618   ;
17619   return 0;
17620 }
17621 _ACEOF
17622 rm -f conftest.$ac_objext
17623 if { (eval echo "$as_me:17623: \"$ac_compile\"") >&5
17624   (eval $ac_compile) 2>&5
17625   ac_status=$?
17626   echo "$as_me:17626: \$? = $ac_status" >&5
17627   (exit $ac_status); } &&
17628          { ac_try='test -s conftest.$ac_objext'
17629   { (eval echo "$as_me:17629: \"$ac_try\"") >&5
17630   (eval $ac_try) 2>&5
17631   ac_status=$?
17632   echo "$as_me:17632: \$? = $ac_status" >&5
17633   (exit $ac_status); }; }; then
17634   termios_bad=unknown
17635 else
17636   echo "$as_me: failed program was:" >&5
17637 cat conftest.$ac_ext >&5
17638 termios_bad=yes
17639 cat >>confdefs.h <<\EOF
17640 #define _POSIX_SOURCE 1
17641 EOF
17642
17643 fi
17644 rm -f conftest.$ac_objext conftest.$ac_ext
17645
17646 fi
17647 rm -f conftest.$ac_objext conftest.$ac_ext
17648         echo "$as_me:17648: result: $termios_bad" >&5
17649 echo "${ECHO_T}$termios_bad" >&6
17650         fi
17651 fi
17652
17653 echo "$as_me:17653: checking for tcgetattr" >&5
17654 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17655 if test "${cf_cv_have_tcgetattr+set}" = set; then
17656   echo $ECHO_N "(cached) $ECHO_C" >&6
17657 else
17658
17659 cat >conftest.$ac_ext <<_ACEOF
17660 #line 17660 "configure"
17661 #include "confdefs.h"
17662
17663 #include <sys/types.h>
17664 #ifdef HAVE_UNISTD_H
17665 #include <unistd.h>
17666 #endif
17667 #ifdef HAVE_TERMIOS_H
17668 #include <termios.h>
17669 #define TTY struct termios
17670 #else
17671 #ifdef HAVE_TERMIO_H
17672 #include <termio.h>
17673 #define TTY struct termio
17674 #endif
17675 #endif
17676
17677 int
17678 main ()
17679 {
17680
17681 TTY foo;
17682 tcgetattr(1, &foo);
17683   ;
17684   return 0;
17685 }
17686 _ACEOF
17687 rm -f conftest.$ac_objext conftest$ac_exeext
17688 if { (eval echo "$as_me:17688: \"$ac_link\"") >&5
17689   (eval $ac_link) 2>&5
17690   ac_status=$?
17691   echo "$as_me:17691: \$? = $ac_status" >&5
17692   (exit $ac_status); } &&
17693          { ac_try='test -s conftest$ac_exeext'
17694   { (eval echo "$as_me:17694: \"$ac_try\"") >&5
17695   (eval $ac_try) 2>&5
17696   ac_status=$?
17697   echo "$as_me:17697: \$? = $ac_status" >&5
17698   (exit $ac_status); }; }; then
17699   cf_cv_have_tcgetattr=yes
17700 else
17701   echo "$as_me: failed program was:" >&5
17702 cat conftest.$ac_ext >&5
17703 cf_cv_have_tcgetattr=no
17704 fi
17705 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17706 fi
17707 echo "$as_me:17707: result: $cf_cv_have_tcgetattr" >&5
17708 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17709 test "$cf_cv_have_tcgetattr" = yes &&
17710 cat >>confdefs.h <<\EOF
17711 #define HAVE_TCGETATTR 1
17712 EOF
17713
17714 echo "$as_me:17714: checking for vsscanf function or workaround" >&5
17715 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17716 if test "${cf_cv_func_vsscanf+set}" = set; then
17717   echo $ECHO_N "(cached) $ECHO_C" >&6
17718 else
17719
17720 cat >conftest.$ac_ext <<_ACEOF
17721 #line 17721 "configure"
17722 #include "confdefs.h"
17723
17724 #include <stdarg.h>
17725 #include <stdio.h>
17726 int
17727 main ()
17728 {
17729
17730         va_list ap;
17731         vsscanf("from", "%d", ap)
17732   ;
17733   return 0;
17734 }
17735 _ACEOF
17736 rm -f conftest.$ac_objext conftest$ac_exeext
17737 if { (eval echo "$as_me:17737: \"$ac_link\"") >&5
17738   (eval $ac_link) 2>&5
17739   ac_status=$?
17740   echo "$as_me:17740: \$? = $ac_status" >&5
17741   (exit $ac_status); } &&
17742          { ac_try='test -s conftest$ac_exeext'
17743   { (eval echo "$as_me:17743: \"$ac_try\"") >&5
17744   (eval $ac_try) 2>&5
17745   ac_status=$?
17746   echo "$as_me:17746: \$? = $ac_status" >&5
17747   (exit $ac_status); }; }; then
17748   cf_cv_func_vsscanf=vsscanf
17749 else
17750   echo "$as_me: failed program was:" >&5
17751 cat conftest.$ac_ext >&5
17752
17753 cat >conftest.$ac_ext <<_ACEOF
17754 #line 17754 "configure"
17755 #include "confdefs.h"
17756
17757 #include <stdarg.h>
17758 #include <stdio.h>
17759 int
17760 main ()
17761 {
17762
17763         FILE strbuf;
17764         char *str = "from";
17765
17766         strbuf._flag = _IOREAD;
17767         strbuf._ptr = strbuf._base = (unsigned char *) str;
17768         strbuf._cnt = strlen(str);
17769         strbuf._file = _NFILE;
17770         return (vfscanf(&strbuf, "%d", ap))
17771   ;
17772   return 0;
17773 }
17774 _ACEOF
17775 rm -f conftest.$ac_objext conftest$ac_exeext
17776 if { (eval echo "$as_me:17776: \"$ac_link\"") >&5
17777   (eval $ac_link) 2>&5
17778   ac_status=$?
17779   echo "$as_me:17779: \$? = $ac_status" >&5
17780   (exit $ac_status); } &&
17781          { ac_try='test -s conftest$ac_exeext'
17782   { (eval echo "$as_me:17782: \"$ac_try\"") >&5
17783   (eval $ac_try) 2>&5
17784   ac_status=$?
17785   echo "$as_me:17785: \$? = $ac_status" >&5
17786   (exit $ac_status); }; }; then
17787   cf_cv_func_vsscanf=vfscanf
17788 else
17789   echo "$as_me: failed program was:" >&5
17790 cat conftest.$ac_ext >&5
17791
17792 cat >conftest.$ac_ext <<_ACEOF
17793 #line 17793 "configure"
17794 #include "confdefs.h"
17795
17796 #include <stdarg.h>
17797 #include <stdio.h>
17798 int
17799 main ()
17800 {
17801
17802         FILE strbuf;
17803         char *str = "from";
17804
17805         strbuf._flag = _IOREAD;
17806         strbuf._ptr = strbuf._base = (unsigned char *) str;
17807         strbuf._cnt = strlen(str);
17808         strbuf._file = _NFILE;
17809         return (_doscan(&strbuf, "%d", ap))
17810   ;
17811   return 0;
17812 }
17813 _ACEOF
17814 rm -f conftest.$ac_objext conftest$ac_exeext
17815 if { (eval echo "$as_me:17815: \"$ac_link\"") >&5
17816   (eval $ac_link) 2>&5
17817   ac_status=$?
17818   echo "$as_me:17818: \$? = $ac_status" >&5
17819   (exit $ac_status); } &&
17820          { ac_try='test -s conftest$ac_exeext'
17821   { (eval echo "$as_me:17821: \"$ac_try\"") >&5
17822   (eval $ac_try) 2>&5
17823   ac_status=$?
17824   echo "$as_me:17824: \$? = $ac_status" >&5
17825   (exit $ac_status); }; }; then
17826   cf_cv_func_vsscanf=_doscan
17827 else
17828   echo "$as_me: failed program was:" >&5
17829 cat conftest.$ac_ext >&5
17830
17831 cf_cv_func_vsscanf=no
17832 fi
17833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17834 fi
17835 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17836 fi
17837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17838 fi
17839 echo "$as_me:17839: result: $cf_cv_func_vsscanf" >&5
17840 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17841
17842 case $cf_cv_func_vsscanf in
17843 (vsscanf)
17844 cat >>confdefs.h <<\EOF
17845 #define HAVE_VSSCANF 1
17846 EOF
17847 ;;
17848 (vfscanf)
17849 cat >>confdefs.h <<\EOF
17850 #define HAVE_VFSCANF 1
17851 EOF
17852 ;;
17853 (_doscan)
17854 cat >>confdefs.h <<\EOF
17855 #define HAVE__DOSCAN 1
17856 EOF
17857 ;;
17858 esac
17859
17860 for ac_header in \
17861 unistd.h \
17862
17863 do
17864 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17865 echo "$as_me:17865: checking for $ac_header" >&5
17866 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17867 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17868   echo $ECHO_N "(cached) $ECHO_C" >&6
17869 else
17870   cat >conftest.$ac_ext <<_ACEOF
17871 #line 17871 "configure"
17872 #include "confdefs.h"
17873 #include <$ac_header>
17874 _ACEOF
17875 if { (eval echo "$as_me:17875: \"$ac_cpp conftest.$ac_ext\"") >&5
17876   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17877   ac_status=$?
17878   egrep -v '^ *\+' conftest.er1 >conftest.err
17879   rm -f conftest.er1
17880   cat conftest.err >&5
17881   echo "$as_me:17881: \$? = $ac_status" >&5
17882   (exit $ac_status); } >/dev/null; then
17883   if test -s conftest.err; then
17884     ac_cpp_err=$ac_c_preproc_warn_flag
17885   else
17886     ac_cpp_err=
17887   fi
17888 else
17889   ac_cpp_err=yes
17890 fi
17891 if test -z "$ac_cpp_err"; then
17892   eval "$as_ac_Header=yes"
17893 else
17894   echo "$as_me: failed program was:" >&5
17895   cat conftest.$ac_ext >&5
17896   eval "$as_ac_Header=no"
17897 fi
17898 rm -f conftest.err conftest.$ac_ext
17899 fi
17900 echo "$as_me:17900: result: `eval echo '${'$as_ac_Header'}'`" >&5
17901 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17902 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17903   cat >>confdefs.h <<EOF
17904 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17905 EOF
17906
17907 fi
17908 done
17909
17910 echo "$as_me:17910: checking for working mkstemp" >&5
17911 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17912 if test "${cf_cv_func_mkstemp+set}" = set; then
17913   echo $ECHO_N "(cached) $ECHO_C" >&6
17914 else
17915
17916 rm -rf conftest*
17917 if test "$cross_compiling" = yes; then
17918   cf_cv_func_mkstemp=maybe
17919 else
17920   cat >conftest.$ac_ext <<_ACEOF
17921 #line 17921 "configure"
17922 #include "confdefs.h"
17923
17924 #include <sys/types.h>
17925 #ifdef HAVE_UNISTD_H
17926 #include <unistd.h>
17927 #endif
17928 #include <stdlib.h>
17929 #include <stdio.h>
17930 #include <string.h>
17931 #include <sys/stat.h>
17932 int main(void)
17933 {
17934         char *tmpl = "conftestXXXXXX";
17935         char name[2][80];
17936         int n;
17937         int result = 0;
17938         int fd;
17939         struct stat sb;
17940
17941         umask(077);
17942         for (n = 0; n < 2; ++n) {
17943                 strcpy(name[n], tmpl);
17944                 if ((fd = mkstemp(name[n])) >= 0) {
17945                         if (!strcmp(name[n], tmpl)
17946                          || stat(name[n], &sb) != 0
17947                          || (sb.st_mode & S_IFMT) != S_IFREG
17948                          || (sb.st_mode & 077) != 0) {
17949                                 result = 1;
17950                         }
17951                         close(fd);
17952                 }
17953         }
17954         if (result == 0
17955          && !strcmp(name[0], name[1]))
17956                 result = 1;
17957         ${cf_cv_main_return:-return}(result);
17958 }
17959
17960 _ACEOF
17961 rm -f conftest$ac_exeext
17962 if { (eval echo "$as_me:17962: \"$ac_link\"") >&5
17963   (eval $ac_link) 2>&5
17964   ac_status=$?
17965   echo "$as_me:17965: \$? = $ac_status" >&5
17966   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17967   { (eval echo "$as_me:17967: \"$ac_try\"") >&5
17968   (eval $ac_try) 2>&5
17969   ac_status=$?
17970   echo "$as_me:17970: \$? = $ac_status" >&5
17971   (exit $ac_status); }; }; then
17972   cf_cv_func_mkstemp=yes
17973
17974 else
17975   echo "$as_me: program exited with status $ac_status" >&5
17976 echo "$as_me: failed program was:" >&5
17977 cat conftest.$ac_ext >&5
17978 cf_cv_func_mkstemp=no
17979
17980 fi
17981 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17982 fi
17983
17984 fi
17985 echo "$as_me:17985: result: $cf_cv_func_mkstemp" >&5
17986 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17987 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17988         echo "$as_me:17988: checking for mkstemp" >&5
17989 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17990 if test "${ac_cv_func_mkstemp+set}" = set; then
17991   echo $ECHO_N "(cached) $ECHO_C" >&6
17992 else
17993   cat >conftest.$ac_ext <<_ACEOF
17994 #line 17994 "configure"
17995 #include "confdefs.h"
17996 /* System header to define __stub macros and hopefully few prototypes,
17997     which can conflict with char mkstemp (); below.  */
17998 #include <assert.h>
17999 /* Override any gcc2 internal prototype to avoid an error.  */
18000 #ifdef __cplusplus
18001 extern "C"
18002 #endif
18003 /* We use char because int might match the return type of a gcc2
18004    builtin and then its argument prototype would still apply.  */
18005 char mkstemp ();
18006 char (*f) ();
18007
18008 int
18009 main ()
18010 {
18011 /* The GNU C library defines this for functions which it implements
18012     to always fail with ENOSYS.  Some functions are actually named
18013     something starting with __ and the normal name is an alias.  */
18014 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18015 choke me
18016 #else
18017 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18018 #endif
18019
18020   ;
18021   return 0;
18022 }
18023 _ACEOF
18024 rm -f conftest.$ac_objext conftest$ac_exeext
18025 if { (eval echo "$as_me:18025: \"$ac_link\"") >&5
18026   (eval $ac_link) 2>&5
18027   ac_status=$?
18028   echo "$as_me:18028: \$? = $ac_status" >&5
18029   (exit $ac_status); } &&
18030          { ac_try='test -s conftest$ac_exeext'
18031   { (eval echo "$as_me:18031: \"$ac_try\"") >&5
18032   (eval $ac_try) 2>&5
18033   ac_status=$?
18034   echo "$as_me:18034: \$? = $ac_status" >&5
18035   (exit $ac_status); }; }; then
18036   ac_cv_func_mkstemp=yes
18037 else
18038   echo "$as_me: failed program was:" >&5
18039 cat conftest.$ac_ext >&5
18040 ac_cv_func_mkstemp=no
18041 fi
18042 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18043 fi
18044 echo "$as_me:18044: result: $ac_cv_func_mkstemp" >&5
18045 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18046
18047 fi
18048 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18049
18050 cat >>confdefs.h <<\EOF
18051 #define HAVE_MKSTEMP 1
18052 EOF
18053
18054 fi
18055
18056 # setup for prototype of fallback for vsscanf()
18057
18058 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18059         HAVE_VSSCANF=1
18060 else
18061         HAVE_VSSCANF=0
18062 fi
18063
18064 if test "x$cross_compiling" = xyes ; then
18065         { echo "$as_me:18065: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18066 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18067 else
18068         echo "$as_me:18068: checking whether setvbuf arguments are reversed" >&5
18069 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18070 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18071   echo $ECHO_N "(cached) $ECHO_C" >&6
18072 else
18073   if test "$cross_compiling" = yes; then
18074   { { echo "$as_me:18074: error: cannot run test program while cross compiling" >&5
18075 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18076    { (exit 1); exit 1; }; }
18077 else
18078   cat >conftest.$ac_ext <<_ACEOF
18079 #line 18079 "configure"
18080 #include "confdefs.h"
18081 #include <stdio.h>
18082 /* If setvbuf has the reversed format, exit 0. */
18083 int
18084 main ()
18085 {
18086   /* This call has the arguments reversed.
18087      A reversed system may check and see that the address of main
18088      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18089   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18090     $ac_main_return(1);
18091   putc('\r', stdout);
18092   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18093 }
18094 _ACEOF
18095 rm -f conftest$ac_exeext
18096 if { (eval echo "$as_me:18096: \"$ac_link\"") >&5
18097   (eval $ac_link) 2>&5
18098   ac_status=$?
18099   echo "$as_me:18099: \$? = $ac_status" >&5
18100   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18101   { (eval echo "$as_me:18101: \"$ac_try\"") >&5
18102   (eval $ac_try) 2>&5
18103   ac_status=$?
18104   echo "$as_me:18104: \$? = $ac_status" >&5
18105   (exit $ac_status); }; }; then
18106   ac_cv_func_setvbuf_reversed=yes
18107 else
18108   echo "$as_me: program exited with status $ac_status" >&5
18109 echo "$as_me: failed program was:" >&5
18110 cat conftest.$ac_ext >&5
18111 ac_cv_func_setvbuf_reversed=no
18112 fi
18113 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18114 fi
18115 rm -f core core.* *.core
18116 fi
18117 echo "$as_me:18117: result: $ac_cv_func_setvbuf_reversed" >&5
18118 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18119 if test $ac_cv_func_setvbuf_reversed = yes; then
18120
18121 cat >>confdefs.h <<\EOF
18122 #define SETVBUF_REVERSED 1
18123 EOF
18124
18125 fi
18126
18127 fi
18128 echo "$as_me:18128: checking for intptr_t" >&5
18129 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18130 if test "${ac_cv_type_intptr_t+set}" = set; then
18131   echo $ECHO_N "(cached) $ECHO_C" >&6
18132 else
18133   cat >conftest.$ac_ext <<_ACEOF
18134 #line 18134 "configure"
18135 #include "confdefs.h"
18136 $ac_includes_default
18137 int
18138 main ()
18139 {
18140 if ((intptr_t *) 0)
18141   return 0;
18142 if (sizeof (intptr_t))
18143   return 0;
18144   ;
18145   return 0;
18146 }
18147 _ACEOF
18148 rm -f conftest.$ac_objext
18149 if { (eval echo "$as_me:18149: \"$ac_compile\"") >&5
18150   (eval $ac_compile) 2>&5
18151   ac_status=$?
18152   echo "$as_me:18152: \$? = $ac_status" >&5
18153   (exit $ac_status); } &&
18154          { ac_try='test -s conftest.$ac_objext'
18155   { (eval echo "$as_me:18155: \"$ac_try\"") >&5
18156   (eval $ac_try) 2>&5
18157   ac_status=$?
18158   echo "$as_me:18158: \$? = $ac_status" >&5
18159   (exit $ac_status); }; }; then
18160   ac_cv_type_intptr_t=yes
18161 else
18162   echo "$as_me: failed program was:" >&5
18163 cat conftest.$ac_ext >&5
18164 ac_cv_type_intptr_t=no
18165 fi
18166 rm -f conftest.$ac_objext conftest.$ac_ext
18167 fi
18168 echo "$as_me:18168: result: $ac_cv_type_intptr_t" >&5
18169 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18170 if test $ac_cv_type_intptr_t = yes; then
18171   :
18172 else
18173
18174 cat >>confdefs.h <<EOF
18175 #define intptr_t long
18176 EOF
18177
18178 fi
18179
18180 echo "$as_me:18180: checking for ssize_t" >&5
18181 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18182 if test "${ac_cv_type_ssize_t+set}" = set; then
18183   echo $ECHO_N "(cached) $ECHO_C" >&6
18184 else
18185   cat >conftest.$ac_ext <<_ACEOF
18186 #line 18186 "configure"
18187 #include "confdefs.h"
18188 $ac_includes_default
18189 int
18190 main ()
18191 {
18192 if ((ssize_t *) 0)
18193   return 0;
18194 if (sizeof (ssize_t))
18195   return 0;
18196   ;
18197   return 0;
18198 }
18199 _ACEOF
18200 rm -f conftest.$ac_objext
18201 if { (eval echo "$as_me:18201: \"$ac_compile\"") >&5
18202   (eval $ac_compile) 2>&5
18203   ac_status=$?
18204   echo "$as_me:18204: \$? = $ac_status" >&5
18205   (exit $ac_status); } &&
18206          { ac_try='test -s conftest.$ac_objext'
18207   { (eval echo "$as_me:18207: \"$ac_try\"") >&5
18208   (eval $ac_try) 2>&5
18209   ac_status=$?
18210   echo "$as_me:18210: \$? = $ac_status" >&5
18211   (exit $ac_status); }; }; then
18212   ac_cv_type_ssize_t=yes
18213 else
18214   echo "$as_me: failed program was:" >&5
18215 cat conftest.$ac_ext >&5
18216 ac_cv_type_ssize_t=no
18217 fi
18218 rm -f conftest.$ac_objext conftest.$ac_ext
18219 fi
18220 echo "$as_me:18220: result: $ac_cv_type_ssize_t" >&5
18221 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18222 if test $ac_cv_type_ssize_t = yes; then
18223   :
18224 else
18225
18226 cat >>confdefs.h <<EOF
18227 #define ssize_t int
18228 EOF
18229
18230 fi
18231
18232 echo "$as_me:18232: checking for type sigaction_t" >&5
18233 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18234 if test "${cf_cv_type_sigaction+set}" = set; then
18235   echo $ECHO_N "(cached) $ECHO_C" >&6
18236 else
18237
18238         cat >conftest.$ac_ext <<_ACEOF
18239 #line 18239 "configure"
18240 #include "confdefs.h"
18241
18242 #include <signal.h>
18243 int
18244 main ()
18245 {
18246 sigaction_t x
18247   ;
18248   return 0;
18249 }
18250 _ACEOF
18251 rm -f conftest.$ac_objext
18252 if { (eval echo "$as_me:18252: \"$ac_compile\"") >&5
18253   (eval $ac_compile) 2>&5
18254   ac_status=$?
18255   echo "$as_me:18255: \$? = $ac_status" >&5
18256   (exit $ac_status); } &&
18257          { ac_try='test -s conftest.$ac_objext'
18258   { (eval echo "$as_me:18258: \"$ac_try\"") >&5
18259   (eval $ac_try) 2>&5
18260   ac_status=$?
18261   echo "$as_me:18261: \$? = $ac_status" >&5
18262   (exit $ac_status); }; }; then
18263   cf_cv_type_sigaction=yes
18264 else
18265   echo "$as_me: failed program was:" >&5
18266 cat conftest.$ac_ext >&5
18267 cf_cv_type_sigaction=no
18268 fi
18269 rm -f conftest.$ac_objext conftest.$ac_ext
18270 fi
18271
18272 echo "$as_me:18272: result: $cf_cv_type_sigaction" >&5
18273 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18274 test "$cf_cv_type_sigaction" = yes &&
18275 cat >>confdefs.h <<\EOF
18276 #define HAVE_TYPE_SIGACTION 1
18277 EOF
18278
18279 echo "$as_me:18279: checking declaration of size-change" >&5
18280 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18281 if test "${cf_cv_sizechange+set}" = set; then
18282   echo $ECHO_N "(cached) $ECHO_C" >&6
18283 else
18284
18285         cf_cv_sizechange=unknown
18286         cf_save_CPPFLAGS="$CPPFLAGS"
18287
18288 for cf_opts in "" "NEED_PTEM_H"
18289 do
18290
18291         CPPFLAGS="$cf_save_CPPFLAGS"
18292         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18293         cat >conftest.$ac_ext <<_ACEOF
18294 #line 18294 "configure"
18295 #include "confdefs.h"
18296 #include <sys/types.h>
18297 #ifdef HAVE_TERMIOS_H
18298 #include <termios.h>
18299 #else
18300 #ifdef HAVE_TERMIO_H
18301 #include <termio.h>
18302 #endif
18303 #endif
18304 #ifdef NEED_PTEM_H
18305 /* This is a workaround for SCO:  they neglected to define struct winsize in
18306  * termios.h -- it's only in termio.h and ptem.h
18307  */
18308 #include        <sys/stream.h>
18309 #include        <sys/ptem.h>
18310 #endif
18311 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18312 #include <sys/ioctl.h>
18313 #endif
18314
18315 int
18316 main ()
18317 {
18318
18319 #ifdef TIOCGSIZE
18320         struct ttysize win;     /* FIXME: what system is this? */
18321         int y = win.ts_lines;
18322         int x = win.ts_cols;
18323 #else
18324 #ifdef TIOCGWINSZ
18325         struct winsize win;
18326         int y = win.ws_row;
18327         int x = win.ws_col;
18328 #else
18329         no TIOCGSIZE or TIOCGWINSZ
18330 #endif /* TIOCGWINSZ */
18331 #endif /* TIOCGSIZE */
18332
18333   ;
18334   return 0;
18335 }
18336 _ACEOF
18337 rm -f conftest.$ac_objext
18338 if { (eval echo "$as_me:18338: \"$ac_compile\"") >&5
18339   (eval $ac_compile) 2>&5
18340   ac_status=$?
18341   echo "$as_me:18341: \$? = $ac_status" >&5
18342   (exit $ac_status); } &&
18343          { ac_try='test -s conftest.$ac_objext'
18344   { (eval echo "$as_me:18344: \"$ac_try\"") >&5
18345   (eval $ac_try) 2>&5
18346   ac_status=$?
18347   echo "$as_me:18347: \$? = $ac_status" >&5
18348   (exit $ac_status); }; }; then
18349   cf_cv_sizechange=yes
18350 else
18351   echo "$as_me: failed program was:" >&5
18352 cat conftest.$ac_ext >&5
18353 cf_cv_sizechange=no
18354 fi
18355 rm -f conftest.$ac_objext conftest.$ac_ext
18356
18357         CPPFLAGS="$cf_save_CPPFLAGS"
18358         if test "$cf_cv_sizechange" = yes ; then
18359                 echo "size-change succeeded ($cf_opts)" >&5
18360                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18361                 break
18362         fi
18363 done
18364
18365 fi
18366 echo "$as_me:18366: result: $cf_cv_sizechange" >&5
18367 echo "${ECHO_T}$cf_cv_sizechange" >&6
18368 if test "$cf_cv_sizechange" != no ; then
18369
18370 cat >>confdefs.h <<\EOF
18371 #define HAVE_SIZECHANGE 1
18372 EOF
18373
18374         case $cf_cv_sizechange in
18375         (NEED*)
18376                 cat >>confdefs.h <<EOF
18377 #define $cf_cv_sizechange  1
18378 EOF
18379
18380                 ;;
18381         esac
18382 fi
18383
18384 echo "$as_me:18384: checking for memmove" >&5
18385 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18386 if test "${ac_cv_func_memmove+set}" = set; then
18387   echo $ECHO_N "(cached) $ECHO_C" >&6
18388 else
18389   cat >conftest.$ac_ext <<_ACEOF
18390 #line 18390 "configure"
18391 #include "confdefs.h"
18392 /* System header to define __stub macros and hopefully few prototypes,
18393     which can conflict with char memmove (); below.  */
18394 #include <assert.h>
18395 /* Override any gcc2 internal prototype to avoid an error.  */
18396 #ifdef __cplusplus
18397 extern "C"
18398 #endif
18399 /* We use char because int might match the return type of a gcc2
18400    builtin and then its argument prototype would still apply.  */
18401 char memmove ();
18402 char (*f) ();
18403
18404 int
18405 main ()
18406 {
18407 /* The GNU C library defines this for functions which it implements
18408     to always fail with ENOSYS.  Some functions are actually named
18409     something starting with __ and the normal name is an alias.  */
18410 #if defined (__stub_memmove) || defined (__stub___memmove)
18411 choke me
18412 #else
18413 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18414 #endif
18415
18416   ;
18417   return 0;
18418 }
18419 _ACEOF
18420 rm -f conftest.$ac_objext conftest$ac_exeext
18421 if { (eval echo "$as_me:18421: \"$ac_link\"") >&5
18422   (eval $ac_link) 2>&5
18423   ac_status=$?
18424   echo "$as_me:18424: \$? = $ac_status" >&5
18425   (exit $ac_status); } &&
18426          { ac_try='test -s conftest$ac_exeext'
18427   { (eval echo "$as_me:18427: \"$ac_try\"") >&5
18428   (eval $ac_try) 2>&5
18429   ac_status=$?
18430   echo "$as_me:18430: \$? = $ac_status" >&5
18431   (exit $ac_status); }; }; then
18432   ac_cv_func_memmove=yes
18433 else
18434   echo "$as_me: failed program was:" >&5
18435 cat conftest.$ac_ext >&5
18436 ac_cv_func_memmove=no
18437 fi
18438 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18439 fi
18440 echo "$as_me:18440: result: $ac_cv_func_memmove" >&5
18441 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18442 if test $ac_cv_func_memmove = yes; then
18443   :
18444 else
18445
18446 echo "$as_me:18446: checking for bcopy" >&5
18447 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18448 if test "${ac_cv_func_bcopy+set}" = set; then
18449   echo $ECHO_N "(cached) $ECHO_C" >&6
18450 else
18451   cat >conftest.$ac_ext <<_ACEOF
18452 #line 18452 "configure"
18453 #include "confdefs.h"
18454 /* System header to define __stub macros and hopefully few prototypes,
18455     which can conflict with char bcopy (); below.  */
18456 #include <assert.h>
18457 /* Override any gcc2 internal prototype to avoid an error.  */
18458 #ifdef __cplusplus
18459 extern "C"
18460 #endif
18461 /* We use char because int might match the return type of a gcc2
18462    builtin and then its argument prototype would still apply.  */
18463 char bcopy ();
18464 char (*f) ();
18465
18466 int
18467 main ()
18468 {
18469 /* The GNU C library defines this for functions which it implements
18470     to always fail with ENOSYS.  Some functions are actually named
18471     something starting with __ and the normal name is an alias.  */
18472 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18473 choke me
18474 #else
18475 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18476 #endif
18477
18478   ;
18479   return 0;
18480 }
18481 _ACEOF
18482 rm -f conftest.$ac_objext conftest$ac_exeext
18483 if { (eval echo "$as_me:18483: \"$ac_link\"") >&5
18484   (eval $ac_link) 2>&5
18485   ac_status=$?
18486   echo "$as_me:18486: \$? = $ac_status" >&5
18487   (exit $ac_status); } &&
18488          { ac_try='test -s conftest$ac_exeext'
18489   { (eval echo "$as_me:18489: \"$ac_try\"") >&5
18490   (eval $ac_try) 2>&5
18491   ac_status=$?
18492   echo "$as_me:18492: \$? = $ac_status" >&5
18493   (exit $ac_status); }; }; then
18494   ac_cv_func_bcopy=yes
18495 else
18496   echo "$as_me: failed program was:" >&5
18497 cat conftest.$ac_ext >&5
18498 ac_cv_func_bcopy=no
18499 fi
18500 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18501 fi
18502 echo "$as_me:18502: result: $ac_cv_func_bcopy" >&5
18503 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18504 if test $ac_cv_func_bcopy = yes; then
18505
18506         echo "$as_me:18506: checking if bcopy does overlapping moves" >&5
18507 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18508 if test "${cf_cv_good_bcopy+set}" = set; then
18509   echo $ECHO_N "(cached) $ECHO_C" >&6
18510 else
18511
18512                 if test "$cross_compiling" = yes; then
18513   cf_cv_good_bcopy=unknown
18514 else
18515   cat >conftest.$ac_ext <<_ACEOF
18516 #line 18516 "configure"
18517 #include "confdefs.h"
18518
18519 int main(void) {
18520         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18521         char temp[40];
18522         bcopy(data, temp, sizeof(data));
18523         bcopy(temp+10, temp, 15);
18524         bcopy(temp+5, temp+15, 10);
18525         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18526 }
18527
18528 _ACEOF
18529 rm -f conftest$ac_exeext
18530 if { (eval echo "$as_me:18530: \"$ac_link\"") >&5
18531   (eval $ac_link) 2>&5
18532   ac_status=$?
18533   echo "$as_me:18533: \$? = $ac_status" >&5
18534   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18535   { (eval echo "$as_me:18535: \"$ac_try\"") >&5
18536   (eval $ac_try) 2>&5
18537   ac_status=$?
18538   echo "$as_me:18538: \$? = $ac_status" >&5
18539   (exit $ac_status); }; }; then
18540   cf_cv_good_bcopy=yes
18541 else
18542   echo "$as_me: program exited with status $ac_status" >&5
18543 echo "$as_me: failed program was:" >&5
18544 cat conftest.$ac_ext >&5
18545 cf_cv_good_bcopy=no
18546 fi
18547 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18548 fi
18549
18550 fi
18551 echo "$as_me:18551: result: $cf_cv_good_bcopy" >&5
18552 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18553
18554 else
18555   cf_cv_good_bcopy=no
18556 fi
18557
18558         if test "$cf_cv_good_bcopy" = yes ; then
18559
18560 cat >>confdefs.h <<\EOF
18561 #define USE_OK_BCOPY 1
18562 EOF
18563
18564         else
18565
18566 cat >>confdefs.h <<\EOF
18567 #define USE_MY_MEMMOVE 1
18568 EOF
18569
18570         fi
18571
18572 fi
18573
18574 tty 2>&1 >/dev/null || {
18575 for ac_func in posix_openpt
18576 do
18577 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18578 echo "$as_me:18578: checking for $ac_func" >&5
18579 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18580 if eval "test \"\${$as_ac_var+set}\" = set"; then
18581   echo $ECHO_N "(cached) $ECHO_C" >&6
18582 else
18583   cat >conftest.$ac_ext <<_ACEOF
18584 #line 18584 "configure"
18585 #include "confdefs.h"
18586 /* System header to define __stub macros and hopefully few prototypes,
18587     which can conflict with char $ac_func (); below.  */
18588 #include <assert.h>
18589 /* Override any gcc2 internal prototype to avoid an error.  */
18590 #ifdef __cplusplus
18591 extern "C"
18592 #endif
18593 /* We use char because int might match the return type of a gcc2
18594    builtin and then its argument prototype would still apply.  */
18595 char $ac_func ();
18596 char (*f) ();
18597
18598 int
18599 main ()
18600 {
18601 /* The GNU C library defines this for functions which it implements
18602     to always fail with ENOSYS.  Some functions are actually named
18603     something starting with __ and the normal name is an alias.  */
18604 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18605 choke me
18606 #else
18607 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18608 #endif
18609
18610   ;
18611   return 0;
18612 }
18613 _ACEOF
18614 rm -f conftest.$ac_objext conftest$ac_exeext
18615 if { (eval echo "$as_me:18615: \"$ac_link\"") >&5
18616   (eval $ac_link) 2>&5
18617   ac_status=$?
18618   echo "$as_me:18618: \$? = $ac_status" >&5
18619   (exit $ac_status); } &&
18620          { ac_try='test -s conftest$ac_exeext'
18621   { (eval echo "$as_me:18621: \"$ac_try\"") >&5
18622   (eval $ac_try) 2>&5
18623   ac_status=$?
18624   echo "$as_me:18624: \$? = $ac_status" >&5
18625   (exit $ac_status); }; }; then
18626   eval "$as_ac_var=yes"
18627 else
18628   echo "$as_me: failed program was:" >&5
18629 cat conftest.$ac_ext >&5
18630 eval "$as_ac_var=no"
18631 fi
18632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18633 fi
18634 echo "$as_me:18634: result: `eval echo '${'$as_ac_var'}'`" >&5
18635 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18636 if test `eval echo '${'$as_ac_var'}'` = yes; then
18637   cat >>confdefs.h <<EOF
18638 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18639 EOF
18640
18641 fi
18642 done
18643  }
18644 echo "$as_me:18644: checking if poll really works" >&5
18645 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18646 if test "${cf_cv_working_poll+set}" = set; then
18647   echo $ECHO_N "(cached) $ECHO_C" >&6
18648 else
18649
18650 if test "$cross_compiling" = yes; then
18651   cf_cv_working_poll=unknown
18652 else
18653   cat >conftest.$ac_ext <<_ACEOF
18654 #line 18654 "configure"
18655 #include "confdefs.h"
18656
18657 #include <stdlib.h>
18658 #include <stdio.h>
18659 #include <unistd.h>
18660 #include <fcntl.h>
18661 #ifdef HAVE_POLL_H
18662 #include <poll.h>
18663 #else
18664 #include <sys/poll.h>
18665 #endif
18666 int main(void) {
18667         struct pollfd myfds;
18668         int ret;
18669
18670         /* check for Darwin bug with respect to "devices" */
18671         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18672         if (myfds.fd < 0)
18673                 myfds.fd = 0;
18674         myfds.events = POLLIN;
18675         myfds.revents = 0;
18676
18677         ret = poll(&myfds, 1, 100);
18678
18679         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18680                 ret = -1;
18681         } else {
18682                 int fd = 0;
18683                 if (!isatty(fd)) {
18684                         fd = open("/dev/tty", 2);       /* O_RDWR */
18685                 }
18686 #ifdef HAVE_POSIX_OPENPT
18687                 if (fd < 0) {
18688                         fd = posix_openpt(O_RDWR);
18689                 }
18690 #endif
18691
18692                 if (fd >= 0) {
18693                         /* also check with standard input */
18694                         myfds.fd = fd;
18695                         myfds.events = POLLIN;
18696                         myfds.revents = 0;
18697                         ret = poll(&myfds, 1, 100);
18698                 } else {
18699                         ret = -1;
18700                 }
18701         }
18702         ${cf_cv_main_return:-return}(ret < 0);
18703 }
18704 _ACEOF
18705 rm -f conftest$ac_exeext
18706 if { (eval echo "$as_me:18706: \"$ac_link\"") >&5
18707   (eval $ac_link) 2>&5
18708   ac_status=$?
18709   echo "$as_me:18709: \$? = $ac_status" >&5
18710   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18711   { (eval echo "$as_me:18711: \"$ac_try\"") >&5
18712   (eval $ac_try) 2>&5
18713   ac_status=$?
18714   echo "$as_me:18714: \$? = $ac_status" >&5
18715   (exit $ac_status); }; }; then
18716   cf_cv_working_poll=yes
18717 else
18718   echo "$as_me: program exited with status $ac_status" >&5
18719 echo "$as_me: failed program was:" >&5
18720 cat conftest.$ac_ext >&5
18721 cf_cv_working_poll=no
18722 fi
18723 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18724 fi
18725 fi
18726 echo "$as_me:18726: result: $cf_cv_working_poll" >&5
18727 echo "${ECHO_T}$cf_cv_working_poll" >&6
18728 test "$cf_cv_working_poll" = "yes" &&
18729 cat >>confdefs.h <<\EOF
18730 #define HAVE_WORKING_POLL 1
18731 EOF
18732
18733 echo "$as_me:18733: checking for va_copy" >&5
18734 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18735 if test "${cf_cv_have_va_copy+set}" = set; then
18736   echo $ECHO_N "(cached) $ECHO_C" >&6
18737 else
18738
18739 cat >conftest.$ac_ext <<_ACEOF
18740 #line 18740 "configure"
18741 #include "confdefs.h"
18742
18743 #include <stdarg.h>
18744
18745 int
18746 main ()
18747 {
18748
18749         static va_list dst;
18750         static va_list src;
18751         va_copy(dst, src)
18752   ;
18753   return 0;
18754 }
18755 _ACEOF
18756 rm -f conftest.$ac_objext conftest$ac_exeext
18757 if { (eval echo "$as_me:18757: \"$ac_link\"") >&5
18758   (eval $ac_link) 2>&5
18759   ac_status=$?
18760   echo "$as_me:18760: \$? = $ac_status" >&5
18761   (exit $ac_status); } &&
18762          { ac_try='test -s conftest$ac_exeext'
18763   { (eval echo "$as_me:18763: \"$ac_try\"") >&5
18764   (eval $ac_try) 2>&5
18765   ac_status=$?
18766   echo "$as_me:18766: \$? = $ac_status" >&5
18767   (exit $ac_status); }; }; then
18768   cf_cv_have_va_copy=yes
18769 else
18770   echo "$as_me: failed program was:" >&5
18771 cat conftest.$ac_ext >&5
18772 cf_cv_have_va_copy=no
18773 fi
18774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18775 fi
18776 echo "$as_me:18776: result: $cf_cv_have_va_copy" >&5
18777 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18778
18779 test "$cf_cv_have_va_copy" = yes &&
18780 cat >>confdefs.h <<\EOF
18781 #define HAVE_VA_COPY 1
18782 EOF
18783
18784 echo "$as_me:18784: checking for __va_copy" >&5
18785 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18786 if test "${cf_cv_have___va_copy+set}" = set; then
18787   echo $ECHO_N "(cached) $ECHO_C" >&6
18788 else
18789
18790 cat >conftest.$ac_ext <<_ACEOF
18791 #line 18791 "configure"
18792 #include "confdefs.h"
18793
18794 #include <stdarg.h>
18795
18796 int
18797 main ()
18798 {
18799
18800         static va_list dst;
18801         static va_list src;
18802         __va_copy(dst, src)
18803   ;
18804   return 0;
18805 }
18806 _ACEOF
18807 rm -f conftest.$ac_objext conftest$ac_exeext
18808 if { (eval echo "$as_me:18808: \"$ac_link\"") >&5
18809   (eval $ac_link) 2>&5
18810   ac_status=$?
18811   echo "$as_me:18811: \$? = $ac_status" >&5
18812   (exit $ac_status); } &&
18813          { ac_try='test -s conftest$ac_exeext'
18814   { (eval echo "$as_me:18814: \"$ac_try\"") >&5
18815   (eval $ac_try) 2>&5
18816   ac_status=$?
18817   echo "$as_me:18817: \$? = $ac_status" >&5
18818   (exit $ac_status); }; }; then
18819   cf_cv_have___va_copy=yes
18820 else
18821   echo "$as_me: failed program was:" >&5
18822 cat conftest.$ac_ext >&5
18823 cf_cv_have___va_copy=no
18824 fi
18825 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18826 fi
18827 echo "$as_me:18827: result: $cf_cv_have___va_copy" >&5
18828 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18829
18830 test "$cf_cv_have___va_copy" = yes &&
18831 cat >>confdefs.h <<\EOF
18832 #define HAVE___VA_COPY 1
18833 EOF
18834
18835 echo "$as_me:18835: checking for pid_t" >&5
18836 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18837 if test "${ac_cv_type_pid_t+set}" = set; then
18838   echo $ECHO_N "(cached) $ECHO_C" >&6
18839 else
18840   cat >conftest.$ac_ext <<_ACEOF
18841 #line 18841 "configure"
18842 #include "confdefs.h"
18843 $ac_includes_default
18844 int
18845 main ()
18846 {
18847 if ((pid_t *) 0)
18848   return 0;
18849 if (sizeof (pid_t))
18850   return 0;
18851   ;
18852   return 0;
18853 }
18854 _ACEOF
18855 rm -f conftest.$ac_objext
18856 if { (eval echo "$as_me:18856: \"$ac_compile\"") >&5
18857   (eval $ac_compile) 2>&5
18858   ac_status=$?
18859   echo "$as_me:18859: \$? = $ac_status" >&5
18860   (exit $ac_status); } &&
18861          { ac_try='test -s conftest.$ac_objext'
18862   { (eval echo "$as_me:18862: \"$ac_try\"") >&5
18863   (eval $ac_try) 2>&5
18864   ac_status=$?
18865   echo "$as_me:18865: \$? = $ac_status" >&5
18866   (exit $ac_status); }; }; then
18867   ac_cv_type_pid_t=yes
18868 else
18869   echo "$as_me: failed program was:" >&5
18870 cat conftest.$ac_ext >&5
18871 ac_cv_type_pid_t=no
18872 fi
18873 rm -f conftest.$ac_objext conftest.$ac_ext
18874 fi
18875 echo "$as_me:18875: result: $ac_cv_type_pid_t" >&5
18876 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18877 if test $ac_cv_type_pid_t = yes; then
18878   :
18879 else
18880
18881 cat >>confdefs.h <<EOF
18882 #define pid_t int
18883 EOF
18884
18885 fi
18886
18887 for ac_header in unistd.h vfork.h
18888 do
18889 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18890 echo "$as_me:18890: checking for $ac_header" >&5
18891 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18892 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18893   echo $ECHO_N "(cached) $ECHO_C" >&6
18894 else
18895   cat >conftest.$ac_ext <<_ACEOF
18896 #line 18896 "configure"
18897 #include "confdefs.h"
18898 #include <$ac_header>
18899 _ACEOF
18900 if { (eval echo "$as_me:18900: \"$ac_cpp conftest.$ac_ext\"") >&5
18901   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18902   ac_status=$?
18903   egrep -v '^ *\+' conftest.er1 >conftest.err
18904   rm -f conftest.er1
18905   cat conftest.err >&5
18906   echo "$as_me:18906: \$? = $ac_status" >&5
18907   (exit $ac_status); } >/dev/null; then
18908   if test -s conftest.err; then
18909     ac_cpp_err=$ac_c_preproc_warn_flag
18910   else
18911     ac_cpp_err=
18912   fi
18913 else
18914   ac_cpp_err=yes
18915 fi
18916 if test -z "$ac_cpp_err"; then
18917   eval "$as_ac_Header=yes"
18918 else
18919   echo "$as_me: failed program was:" >&5
18920   cat conftest.$ac_ext >&5
18921   eval "$as_ac_Header=no"
18922 fi
18923 rm -f conftest.err conftest.$ac_ext
18924 fi
18925 echo "$as_me:18925: result: `eval echo '${'$as_ac_Header'}'`" >&5
18926 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18927 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18928   cat >>confdefs.h <<EOF
18929 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18930 EOF
18931
18932 fi
18933 done
18934
18935 for ac_func in fork vfork
18936 do
18937 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18938 echo "$as_me:18938: checking for $ac_func" >&5
18939 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18940 if eval "test \"\${$as_ac_var+set}\" = set"; then
18941   echo $ECHO_N "(cached) $ECHO_C" >&6
18942 else
18943   cat >conftest.$ac_ext <<_ACEOF
18944 #line 18944 "configure"
18945 #include "confdefs.h"
18946 /* System header to define __stub macros and hopefully few prototypes,
18947     which can conflict with char $ac_func (); below.  */
18948 #include <assert.h>
18949 /* Override any gcc2 internal prototype to avoid an error.  */
18950 #ifdef __cplusplus
18951 extern "C"
18952 #endif
18953 /* We use char because int might match the return type of a gcc2
18954    builtin and then its argument prototype would still apply.  */
18955 char $ac_func ();
18956 char (*f) ();
18957
18958 int
18959 main ()
18960 {
18961 /* The GNU C library defines this for functions which it implements
18962     to always fail with ENOSYS.  Some functions are actually named
18963     something starting with __ and the normal name is an alias.  */
18964 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18965 choke me
18966 #else
18967 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18968 #endif
18969
18970   ;
18971   return 0;
18972 }
18973 _ACEOF
18974 rm -f conftest.$ac_objext conftest$ac_exeext
18975 if { (eval echo "$as_me:18975: \"$ac_link\"") >&5
18976   (eval $ac_link) 2>&5
18977   ac_status=$?
18978   echo "$as_me:18978: \$? = $ac_status" >&5
18979   (exit $ac_status); } &&
18980          { ac_try='test -s conftest$ac_exeext'
18981   { (eval echo "$as_me:18981: \"$ac_try\"") >&5
18982   (eval $ac_try) 2>&5
18983   ac_status=$?
18984   echo "$as_me:18984: \$? = $ac_status" >&5
18985   (exit $ac_status); }; }; then
18986   eval "$as_ac_var=yes"
18987 else
18988   echo "$as_me: failed program was:" >&5
18989 cat conftest.$ac_ext >&5
18990 eval "$as_ac_var=no"
18991 fi
18992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18993 fi
18994 echo "$as_me:18994: result: `eval echo '${'$as_ac_var'}'`" >&5
18995 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18996 if test `eval echo '${'$as_ac_var'}'` = yes; then
18997   cat >>confdefs.h <<EOF
18998 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18999 EOF
19000
19001 fi
19002 done
19003
19004 ac_cv_func_fork_works=$ac_cv_func_fork
19005 if test "x$ac_cv_func_fork" = xyes; then
19006   echo "$as_me:19006: checking for working fork" >&5
19007 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19008 if test "${ac_cv_func_fork_works+set}" = set; then
19009   echo $ECHO_N "(cached) $ECHO_C" >&6
19010 else
19011   if test "$cross_compiling" = yes; then
19012   ac_cv_func_fork_works=cross
19013 else
19014   cat >conftest.$ac_ext <<_ACEOF
19015 /* By Rüdiger Kuhlmann. */
19016       #include <sys/types.h>
19017       #if HAVE_UNISTD_H
19018       # include <unistd.h>
19019       #endif
19020       /* Some systems only have a dummy stub for fork() */
19021       int main ()
19022       {
19023         if (fork() < 0)
19024           $ac_main_return (1);
19025         $ac_main_return (0);
19026       }
19027 _ACEOF
19028 rm -f conftest$ac_exeext
19029 if { (eval echo "$as_me:19029: \"$ac_link\"") >&5
19030   (eval $ac_link) 2>&5
19031   ac_status=$?
19032   echo "$as_me:19032: \$? = $ac_status" >&5
19033   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19034   { (eval echo "$as_me:19034: \"$ac_try\"") >&5
19035   (eval $ac_try) 2>&5
19036   ac_status=$?
19037   echo "$as_me:19037: \$? = $ac_status" >&5
19038   (exit $ac_status); }; }; then
19039   ac_cv_func_fork_works=yes
19040 else
19041   echo "$as_me: program exited with status $ac_status" >&5
19042 echo "$as_me: failed program was:" >&5
19043 cat conftest.$ac_ext >&5
19044 ac_cv_func_fork_works=no
19045 fi
19046 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19047 fi
19048 fi
19049 echo "$as_me:19049: result: $ac_cv_func_fork_works" >&5
19050 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19051
19052 fi
19053 if test "x$ac_cv_func_fork_works" = xcross; then
19054   case $host in
19055     *-*-amigaos* | *-*-msdosdjgpp*)
19056       # Override, as these systems have only a dummy fork() stub
19057       ac_cv_func_fork_works=no
19058       ;;
19059     *)
19060       ac_cv_func_fork_works=yes
19061       ;;
19062   esac
19063   { echo "$as_me:19063: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19064 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19065 fi
19066 ac_cv_func_vfork_works=$ac_cv_func_vfork
19067 if test "x$ac_cv_func_vfork" = xyes; then
19068   echo "$as_me:19068: checking for working vfork" >&5
19069 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19070 if test "${ac_cv_func_vfork_works+set}" = set; then
19071   echo $ECHO_N "(cached) $ECHO_C" >&6
19072 else
19073   if test "$cross_compiling" = yes; then
19074   ac_cv_func_vfork_works=cross
19075 else
19076   cat >conftest.$ac_ext <<_ACEOF
19077 #line 19077 "configure"
19078 #include "confdefs.h"
19079 /* Thanks to Paul Eggert for this test.  */
19080 #include <stdio.h>
19081 #include <sys/types.h>
19082 #include <sys/stat.h>
19083 #if HAVE_UNISTD_H
19084 # include <unistd.h>
19085 #endif
19086 #if HAVE_VFORK_H
19087 # include <vfork.h>
19088 #endif
19089 /* On some sparc systems, changes by the child to local and incoming
19090    argument registers are propagated back to the parent.  The compiler
19091    is told about this with #include <vfork.h>, but some compilers
19092    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19093    static variable whose address is put into a register that is
19094    clobbered by the vfork.  */
19095 static
19096 #ifdef __cplusplus
19097 sparc_address_test (int arg)
19098 # else
19099 sparc_address_test (arg) int arg;
19100 #endif
19101 {
19102   static pid_t child;
19103   if (!child) {
19104     child = vfork ();
19105     if (child < 0) {
19106       perror ("vfork");
19107       _exit(2);
19108     }
19109     if (!child) {
19110       arg = getpid();
19111       write(-1, "", 0);
19112       _exit (arg);
19113     }
19114   }
19115 }
19116
19117 int
19118 main ()
19119 {
19120   pid_t parent = getpid ();
19121   pid_t child;
19122
19123   sparc_address_test ();
19124
19125   child = vfork ();
19126
19127   if (child == 0) {
19128     /* Here is another test for sparc vfork register problems.  This
19129        test uses lots of local variables, at least as many local
19130        variables as main has allocated so far including compiler
19131        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19132        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19133        reuse the register of parent for one of the local variables,
19134        since it will think that parent can't possibly be used any more
19135        in this routine.  Assigning to the local variable will thus
19136        munge parent in the parent process.  */
19137     pid_t
19138       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19139       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19140     /* Convince the compiler that p..p7 are live; otherwise, it might
19141        use the same hardware register for all 8 local variables.  */
19142     if (p != p1 || p != p2 || p != p3 || p != p4
19143         || p != p5 || p != p6 || p != p7)
19144       _exit(1);
19145
19146     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19147        from child file descriptors.  If the child closes a descriptor
19148        before it execs or exits, this munges the parent's descriptor
19149        as well.  Test for this by closing stdout in the child.  */
19150     _exit(close(fileno(stdout)) != 0);
19151   } else {
19152     int status;
19153     struct stat st;
19154
19155     while (wait(&status) != child)
19156       ;
19157     $ac_main_return(
19158          /* Was there some problem with vforking?  */
19159          child < 0
19160
19161          /* Did the child fail?  (This shouldn't happen.)  */
19162          || status
19163
19164          /* Did the vfork/compiler bug occur?  */
19165          || parent != getpid()
19166
19167          /* Did the file descriptor bug occur?  */
19168          || fstat(fileno(stdout), &st) != 0
19169          );
19170   }
19171 }
19172 _ACEOF
19173 rm -f conftest$ac_exeext
19174 if { (eval echo "$as_me:19174: \"$ac_link\"") >&5
19175   (eval $ac_link) 2>&5
19176   ac_status=$?
19177   echo "$as_me:19177: \$? = $ac_status" >&5
19178   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19179   { (eval echo "$as_me:19179: \"$ac_try\"") >&5
19180   (eval $ac_try) 2>&5
19181   ac_status=$?
19182   echo "$as_me:19182: \$? = $ac_status" >&5
19183   (exit $ac_status); }; }; then
19184   ac_cv_func_vfork_works=yes
19185 else
19186   echo "$as_me: program exited with status $ac_status" >&5
19187 echo "$as_me: failed program was:" >&5
19188 cat conftest.$ac_ext >&5
19189 ac_cv_func_vfork_works=no
19190 fi
19191 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19192 fi
19193 fi
19194 echo "$as_me:19194: result: $ac_cv_func_vfork_works" >&5
19195 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19196
19197 fi;
19198 if test "x$ac_cv_func_fork_works" = xcross; then
19199   ac_cv_func_vfork_works=ac_cv_func_vfork
19200   { echo "$as_me:19200: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19201 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19202 fi
19203
19204 if test "x$ac_cv_func_vfork_works" = xyes; then
19205
19206 cat >>confdefs.h <<\EOF
19207 #define HAVE_WORKING_VFORK 1
19208 EOF
19209
19210 else
19211
19212 cat >>confdefs.h <<\EOF
19213 #define vfork fork
19214 EOF
19215
19216 fi
19217 if test "x$ac_cv_func_fork_works" = xyes; then
19218
19219 cat >>confdefs.h <<\EOF
19220 #define HAVE_WORKING_FORK 1
19221 EOF
19222
19223 fi
19224
19225 # special check for test/ditto.c
19226
19227 echo "$as_me:19227: checking for openpty in -lutil" >&5
19228 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19229 if test "${ac_cv_lib_util_openpty+set}" = set; then
19230   echo $ECHO_N "(cached) $ECHO_C" >&6
19231 else
19232   ac_check_lib_save_LIBS=$LIBS
19233 LIBS="-lutil  $LIBS"
19234 cat >conftest.$ac_ext <<_ACEOF
19235 #line 19235 "configure"
19236 #include "confdefs.h"
19237
19238 /* Override any gcc2 internal prototype to avoid an error.  */
19239 #ifdef __cplusplus
19240 extern "C"
19241 #endif
19242 /* We use char because int might match the return type of a gcc2
19243    builtin and then its argument prototype would still apply.  */
19244 char openpty ();
19245 int
19246 main ()
19247 {
19248 openpty ();
19249   ;
19250   return 0;
19251 }
19252 _ACEOF
19253 rm -f conftest.$ac_objext conftest$ac_exeext
19254 if { (eval echo "$as_me:19254: \"$ac_link\"") >&5
19255   (eval $ac_link) 2>&5
19256   ac_status=$?
19257   echo "$as_me:19257: \$? = $ac_status" >&5
19258   (exit $ac_status); } &&
19259          { ac_try='test -s conftest$ac_exeext'
19260   { (eval echo "$as_me:19260: \"$ac_try\"") >&5
19261   (eval $ac_try) 2>&5
19262   ac_status=$?
19263   echo "$as_me:19263: \$? = $ac_status" >&5
19264   (exit $ac_status); }; }; then
19265   ac_cv_lib_util_openpty=yes
19266 else
19267   echo "$as_me: failed program was:" >&5
19268 cat conftest.$ac_ext >&5
19269 ac_cv_lib_util_openpty=no
19270 fi
19271 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19272 LIBS=$ac_check_lib_save_LIBS
19273 fi
19274 echo "$as_me:19274: result: $ac_cv_lib_util_openpty" >&5
19275 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19276 if test $ac_cv_lib_util_openpty = yes; then
19277   cf_cv_lib_util=yes
19278 else
19279   cf_cv_lib_util=no
19280 fi
19281
19282 echo "$as_me:19282: checking for openpty header" >&5
19283 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19284 if test "${cf_cv_func_openpty+set}" = set; then
19285   echo $ECHO_N "(cached) $ECHO_C" >&6
19286 else
19287
19288         cf_save_LIBS="$LIBS"
19289         test $cf_cv_lib_util = yes && {
19290 cf_add_libs="-lutil"
19291 # Filter out duplicates - this happens with badly-designed ".pc" files...
19292 for cf_add_1lib in $LIBS
19293 do
19294         for cf_add_2lib in $cf_add_libs
19295         do
19296                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19297                 then
19298                         cf_add_1lib=
19299                         break
19300                 fi
19301         done
19302         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19303 done
19304 LIBS="$cf_add_libs"
19305  }
19306         for cf_header in pty.h libutil.h util.h
19307         do
19308         cat >conftest.$ac_ext <<_ACEOF
19309 #line 19309 "configure"
19310 #include "confdefs.h"
19311
19312 #include <$cf_header>
19313
19314 int
19315 main ()
19316 {
19317
19318         int x = openpty((int *)0, (int *)0, (char *)0,
19319                                    (struct termios *)0, (struct winsize *)0);
19320
19321   ;
19322   return 0;
19323 }
19324 _ACEOF
19325 rm -f conftest.$ac_objext conftest$ac_exeext
19326 if { (eval echo "$as_me:19326: \"$ac_link\"") >&5
19327   (eval $ac_link) 2>&5
19328   ac_status=$?
19329   echo "$as_me:19329: \$? = $ac_status" >&5
19330   (exit $ac_status); } &&
19331          { ac_try='test -s conftest$ac_exeext'
19332   { (eval echo "$as_me:19332: \"$ac_try\"") >&5
19333   (eval $ac_try) 2>&5
19334   ac_status=$?
19335   echo "$as_me:19335: \$? = $ac_status" >&5
19336   (exit $ac_status); }; }; then
19337
19338                 cf_cv_func_openpty=$cf_header
19339                 break
19340
19341 else
19342   echo "$as_me: failed program was:" >&5
19343 cat conftest.$ac_ext >&5
19344
19345                 cf_cv_func_openpty=no
19346
19347 fi
19348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19349         done
19350         LIBS="$cf_save_LIBS"
19351
19352 fi
19353 echo "$as_me:19353: result: $cf_cv_func_openpty" >&5
19354 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19355
19356 if test "$cf_cv_func_openpty" != no ; then
19357
19358 cat >>confdefs.h <<EOF
19359 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19360 EOF
19361
19362 cat >>confdefs.h <<\EOF
19363 #define USE_XTERM_PTY 1
19364 EOF
19365
19366         if test "x$cf_cv_lib_util" = xyes ; then
19367
19368 cf_add_libs="-lutil"
19369 # Filter out duplicates - this happens with badly-designed ".pc" files...
19370 for cf_add_1lib in $TEST_LIBS
19371 do
19372         for cf_add_2lib in $cf_add_libs
19373         do
19374                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19375                 then
19376                         cf_add_1lib=
19377                         break
19378                 fi
19379         done
19380         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19381 done
19382 TEST_LIBS="$cf_add_libs"
19383
19384         fi
19385 fi
19386
19387 if test "$with_hashed_db" != no ; then
19388
19389 cat >>confdefs.h <<\EOF
19390 #define USE_HASHED_DB 1
19391 EOF
19392
19393 case $with_hashed_db in
19394 (yes|*able*)
19395         ;;
19396 (*)
19397         if test -d "$with_hashed_db" ; then
19398
19399 if test -n "$with_hashed_db/include" ; then
19400   for cf_add_incdir in $with_hashed_db/include
19401   do
19402         while test $cf_add_incdir != /usr/include
19403         do
19404           if test -d $cf_add_incdir
19405           then
19406                 cf_have_incdir=no
19407                 if test -n "$CFLAGS$CPPFLAGS" ; then
19408                   # a loop is needed to ensure we can add subdirs of existing dirs
19409                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19410                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19411                           cf_have_incdir=yes; break
19412                         fi
19413                   done
19414                 fi
19415
19416                 if test "$cf_have_incdir" = no ; then
19417                   if test "$cf_add_incdir" = /usr/local/include ; then
19418                         if test "$GCC" = yes
19419                         then
19420                           cf_save_CPPFLAGS=$CPPFLAGS
19421                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19422                           cat >conftest.$ac_ext <<_ACEOF
19423 #line 19423 "configure"
19424 #include "confdefs.h"
19425 #include <stdio.h>
19426 int
19427 main ()
19428 {
19429 printf("Hello")
19430   ;
19431   return 0;
19432 }
19433 _ACEOF
19434 rm -f conftest.$ac_objext
19435 if { (eval echo "$as_me:19435: \"$ac_compile\"") >&5
19436   (eval $ac_compile) 2>&5
19437   ac_status=$?
19438   echo "$as_me:19438: \$? = $ac_status" >&5
19439   (exit $ac_status); } &&
19440          { ac_try='test -s conftest.$ac_objext'
19441   { (eval echo "$as_me:19441: \"$ac_try\"") >&5
19442   (eval $ac_try) 2>&5
19443   ac_status=$?
19444   echo "$as_me:19444: \$? = $ac_status" >&5
19445   (exit $ac_status); }; }; then
19446   :
19447 else
19448   echo "$as_me: failed program was:" >&5
19449 cat conftest.$ac_ext >&5
19450 cf_have_incdir=yes
19451 fi
19452 rm -f conftest.$ac_objext conftest.$ac_ext
19453                           CPPFLAGS=$cf_save_CPPFLAGS
19454                         fi
19455                   fi
19456                 fi
19457
19458                 if test "$cf_have_incdir" = no ; then
19459                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19460
19461 echo "${as_me:-configure}:19461: testing adding $cf_add_incdir to include-path ..." 1>&5
19462
19463                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19464
19465                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19466                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19467                   cf_add_incdir="$cf_top_incdir"
19468                 else
19469                   break
19470                 fi
19471           else
19472                 break
19473           fi
19474         done
19475   done
19476 fi
19477
19478 if test -n "$with_hashed_db/lib" ; then
19479         for cf_add_libdir in $with_hashed_db/lib
19480         do
19481                 if test $cf_add_libdir = /usr/lib ; then
19482                         :
19483                 elif test -d $cf_add_libdir
19484                 then
19485                         cf_have_libdir=no
19486                         if test -n "$LDFLAGS$LIBS" ; then
19487                                 # a loop is needed to ensure we can add subdirs of existing dirs
19488                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19489                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19490                                                 cf_have_libdir=yes; break
19491                                         fi
19492                                 done
19493                         fi
19494                         if test "$cf_have_libdir" = no ; then
19495                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19496
19497 echo "${as_me:-configure}:19497: testing adding $cf_add_libdir to library-path ..." 1>&5
19498
19499                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19500                         fi
19501                 fi
19502         done
19503 fi
19504
19505         else
19506                 case "$with_hashed_db" in
19507                 (./*|../*|/*)
19508                         { echo "$as_me:19508: WARNING: no such directory $with_hashed_db" >&5
19509 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19510                         ;;
19511                 (*)
19512
19513 cf_search=
19514
19515 test "x$prefix" != "xNONE" && \
19516 test -d "$prefix" && \
19517  {
19518         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19519         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19520         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19521         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19522         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19523         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19524 }
19525
19526 for cf_subdir_prefix in \
19527         /usr \
19528         /usr/local \
19529         /usr/pkg \
19530         /opt \
19531         /opt/local \
19532         $HOME
19533 do
19534
19535 test "x$cf_subdir_prefix" != "x$prefix" && \
19536 test -d "$cf_subdir_prefix" && \
19537 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19538         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19539         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19540         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19541         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19542         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19543         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"
19544 }
19545
19546 done
19547
19548         for cf_item in $cf_search
19549         do
19550                 case $cf_item in
19551                 (*/$with_hashed_db)
19552
19553 if test -n "$cf_item" ; then
19554   for cf_add_incdir in $cf_item
19555   do
19556         while test $cf_add_incdir != /usr/include
19557         do
19558           if test -d $cf_add_incdir
19559           then
19560                 cf_have_incdir=no
19561                 if test -n "$CFLAGS$CPPFLAGS" ; then
19562                   # a loop is needed to ensure we can add subdirs of existing dirs
19563                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19564                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19565                           cf_have_incdir=yes; break
19566                         fi
19567                   done
19568                 fi
19569
19570                 if test "$cf_have_incdir" = no ; then
19571                   if test "$cf_add_incdir" = /usr/local/include ; then
19572                         if test "$GCC" = yes
19573                         then
19574                           cf_save_CPPFLAGS=$CPPFLAGS
19575                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19576                           cat >conftest.$ac_ext <<_ACEOF
19577 #line 19577 "configure"
19578 #include "confdefs.h"
19579 #include <stdio.h>
19580 int
19581 main ()
19582 {
19583 printf("Hello")
19584   ;
19585   return 0;
19586 }
19587 _ACEOF
19588 rm -f conftest.$ac_objext
19589 if { (eval echo "$as_me:19589: \"$ac_compile\"") >&5
19590   (eval $ac_compile) 2>&5
19591   ac_status=$?
19592   echo "$as_me:19592: \$? = $ac_status" >&5
19593   (exit $ac_status); } &&
19594          { ac_try='test -s conftest.$ac_objext'
19595   { (eval echo "$as_me:19595: \"$ac_try\"") >&5
19596   (eval $ac_try) 2>&5
19597   ac_status=$?
19598   echo "$as_me:19598: \$? = $ac_status" >&5
19599   (exit $ac_status); }; }; then
19600   :
19601 else
19602   echo "$as_me: failed program was:" >&5
19603 cat conftest.$ac_ext >&5
19604 cf_have_incdir=yes
19605 fi
19606 rm -f conftest.$ac_objext conftest.$ac_ext
19607                           CPPFLAGS=$cf_save_CPPFLAGS
19608                         fi
19609                   fi
19610                 fi
19611
19612                 if test "$cf_have_incdir" = no ; then
19613                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19614
19615 echo "${as_me:-configure}:19615: testing adding $cf_add_incdir to include-path ..." 1>&5
19616
19617                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19618
19619                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19620                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19621                   cf_add_incdir="$cf_top_incdir"
19622                 else
19623                   break
19624                 fi
19625           else
19626                 break
19627           fi
19628         done
19629   done
19630 fi
19631
19632                         ;;
19633                 esac
19634         done
19635
19636 cf_search=
19637
19638 test "x$prefix" != "xNONE" && \
19639 test -d "$prefix" && \
19640  {
19641         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19642         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19643         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19644         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19645         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19646         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19647 }
19648
19649 for cf_subdir_prefix in \
19650         /usr \
19651         /usr/local \
19652         /usr/pkg \
19653         /opt \
19654         /opt/local \
19655         $HOME
19656 do
19657
19658 test "x$cf_subdir_prefix" != "x$prefix" && \
19659 test -d "$cf_subdir_prefix" && \
19660 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19661         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19662         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19663         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19664         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19665         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19666         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"
19667 }
19668
19669 done
19670
19671         for cf_item in $cf_search
19672         do
19673                 case $cf_item in
19674                 (*/$with_hashed_db)
19675
19676 if test -n "$cf_item" ; then
19677         for cf_add_libdir in $cf_item
19678         do
19679                 if test $cf_add_libdir = /usr/lib ; then
19680                         :
19681                 elif test -d $cf_add_libdir
19682                 then
19683                         cf_have_libdir=no
19684                         if test -n "$LDFLAGS$LIBS" ; then
19685                                 # a loop is needed to ensure we can add subdirs of existing dirs
19686                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19687                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19688                                                 cf_have_libdir=yes; break
19689                                         fi
19690                                 done
19691                         fi
19692                         if test "$cf_have_libdir" = no ; then
19693                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19694
19695 echo "${as_me:-configure}:19695: testing adding $cf_add_libdir to library-path ..." 1>&5
19696
19697                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19698                         fi
19699                 fi
19700         done
19701 fi
19702
19703                         ;;
19704                 esac
19705         done
19706
19707                         ;;
19708                 esac
19709         fi
19710 esac
19711
19712 echo "$as_me:19712: checking for db.h" >&5
19713 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19714 if test "${ac_cv_header_db_h+set}" = set; then
19715   echo $ECHO_N "(cached) $ECHO_C" >&6
19716 else
19717   cat >conftest.$ac_ext <<_ACEOF
19718 #line 19718 "configure"
19719 #include "confdefs.h"
19720 #include <db.h>
19721 _ACEOF
19722 if { (eval echo "$as_me:19722: \"$ac_cpp conftest.$ac_ext\"") >&5
19723   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19724   ac_status=$?
19725   egrep -v '^ *\+' conftest.er1 >conftest.err
19726   rm -f conftest.er1
19727   cat conftest.err >&5
19728   echo "$as_me:19728: \$? = $ac_status" >&5
19729   (exit $ac_status); } >/dev/null; then
19730   if test -s conftest.err; then
19731     ac_cpp_err=$ac_c_preproc_warn_flag
19732   else
19733     ac_cpp_err=
19734   fi
19735 else
19736   ac_cpp_err=yes
19737 fi
19738 if test -z "$ac_cpp_err"; then
19739   ac_cv_header_db_h=yes
19740 else
19741   echo "$as_me: failed program was:" >&5
19742   cat conftest.$ac_ext >&5
19743   ac_cv_header_db_h=no
19744 fi
19745 rm -f conftest.err conftest.$ac_ext
19746 fi
19747 echo "$as_me:19747: result: $ac_cv_header_db_h" >&5
19748 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19749 if test $ac_cv_header_db_h = yes; then
19750
19751 echo "$as_me:19751: checking for version of db" >&5
19752 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19753 if test "${cf_cv_hashed_db_version+set}" = set; then
19754   echo $ECHO_N "(cached) $ECHO_C" >&6
19755 else
19756
19757 cf_cv_hashed_db_version=unknown
19758
19759 for cf_db_version in 1 2 3 4 5 6
19760 do
19761
19762 echo "${as_me:-configure}:19762: testing checking for db version $cf_db_version ..." 1>&5
19763
19764         cat >conftest.$ac_ext <<_ACEOF
19765 #line 19765 "configure"
19766 #include "confdefs.h"
19767
19768 $ac_includes_default
19769 #include <db.h>
19770
19771 #ifdef DB_VERSION_MAJOR
19772         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19773 #if $cf_db_version == DB_VERSION_MAJOR
19774         /* ok */
19775 #else
19776         make an error
19777 #endif
19778 #else
19779 #if $cf_db_version == 1
19780         /* ok: assuming this is DB 1.8.5 */
19781 #else
19782         make an error
19783 #endif
19784 #endif
19785
19786 int
19787 main ()
19788 {
19789 DBT *foo = 0
19790   ;
19791   return 0;
19792 }
19793 _ACEOF
19794 rm -f conftest.$ac_objext
19795 if { (eval echo "$as_me:19795: \"$ac_compile\"") >&5
19796   (eval $ac_compile) 2>&5
19797   ac_status=$?
19798   echo "$as_me:19798: \$? = $ac_status" >&5
19799   (exit $ac_status); } &&
19800          { ac_try='test -s conftest.$ac_objext'
19801   { (eval echo "$as_me:19801: \"$ac_try\"") >&5
19802   (eval $ac_try) 2>&5
19803   ac_status=$?
19804   echo "$as_me:19804: \$? = $ac_status" >&5
19805   (exit $ac_status); }; }; then
19806
19807         cf_cv_hashed_db_version=$cf_db_version
19808         break
19809
19810 else
19811   echo "$as_me: failed program was:" >&5
19812 cat conftest.$ac_ext >&5
19813 fi
19814 rm -f conftest.$ac_objext conftest.$ac_ext
19815 done
19816
19817 fi
19818 echo "$as_me:19818: result: $cf_cv_hashed_db_version" >&5
19819 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19820
19821 if test "$cf_cv_hashed_db_version" = unknown ; then
19822         { { echo "$as_me:19822: error: Cannot determine version of db" >&5
19823 echo "$as_me: error: Cannot determine version of db" >&2;}
19824    { (exit 1); exit 1; }; }
19825 else
19826
19827 echo "$as_me:19827: checking for db libraries" >&5
19828 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19829 if test "${cf_cv_hashed_db_libs+set}" = set; then
19830   echo $ECHO_N "(cached) $ECHO_C" >&6
19831 else
19832
19833 cf_cv_hashed_db_libs=unknown
19834 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19835 do
19836         cf_save_libs="$LIBS"
19837         if test -n "$cf_db_libs"; then
19838
19839 cf_add_libs="-l$cf_db_libs"
19840 # Filter out duplicates - this happens with badly-designed ".pc" files...
19841 for cf_add_1lib in $LIBS
19842 do
19843         for cf_add_2lib in $cf_add_libs
19844         do
19845                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19846                 then
19847                         cf_add_1lib=
19848                         break
19849                 fi
19850         done
19851         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19852 done
19853 LIBS="$cf_add_libs"
19854
19855         fi
19856
19857 echo "${as_me:-configure}:19857: testing checking for library "$cf_db_libs" ..." 1>&5
19858
19859         cat >conftest.$ac_ext <<_ACEOF
19860 #line 19860 "configure"
19861 #include "confdefs.h"
19862
19863 $ac_includes_default
19864 #include <db.h>
19865
19866 int
19867 main ()
19868 {
19869
19870         char *path = "/tmp/foo";
19871 #ifdef DB_VERSION_MAJOR
19872 #if DB_VERSION_MAJOR >= 4
19873         DB *result = 0;
19874         db_create(&result, NULL, 0);
19875         result->open(result,
19876                 NULL,
19877                 path,
19878                 path,
19879                 DB_HASH,
19880                 DB_CREATE,
19881                 0644);
19882 #elif DB_VERSION_MAJOR >= 3
19883         DB *result = 0;
19884         db_create(&result, NULL, 0);
19885         result->open(result,
19886                 path,
19887                 path,
19888                 DB_HASH,
19889                 DB_CREATE,
19890                 0644);
19891 #elif DB_VERSION_MAJOR >= 2
19892         DB *result = 0;
19893         db_open(path,
19894                 DB_HASH,
19895                 DB_CREATE,
19896                 0644,
19897                 (DB_ENV *) 0,
19898                 (DB_INFO *) 0,
19899                 &result);
19900 #endif /* DB_VERSION_MAJOR */
19901 #else
19902         DB *result = dbopen(path,
19903                      2,
19904                      0644,
19905                      DB_HASH,
19906                      0);
19907 #endif
19908         ${cf_cv_main_return:-return}(result != 0)
19909
19910   ;
19911   return 0;
19912 }
19913 _ACEOF
19914 rm -f conftest.$ac_objext conftest$ac_exeext
19915 if { (eval echo "$as_me:19915: \"$ac_link\"") >&5
19916   (eval $ac_link) 2>&5
19917   ac_status=$?
19918   echo "$as_me:19918: \$? = $ac_status" >&5
19919   (exit $ac_status); } &&
19920          { ac_try='test -s conftest$ac_exeext'
19921   { (eval echo "$as_me:19921: \"$ac_try\"") >&5
19922   (eval $ac_try) 2>&5
19923   ac_status=$?
19924   echo "$as_me:19924: \$? = $ac_status" >&5
19925   (exit $ac_status); }; }; then
19926
19927         if test -n "$cf_db_libs" ; then
19928                 cf_cv_hashed_db_libs=$cf_db_libs
19929         else
19930                 cf_cv_hashed_db_libs=default
19931         fi
19932         LIBS="$cf_save_libs"
19933         break
19934
19935 else
19936   echo "$as_me: failed program was:" >&5
19937 cat conftest.$ac_ext >&5
19938 fi
19939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19940         LIBS="$cf_save_libs"
19941 done
19942
19943 fi
19944 echo "$as_me:19944: result: $cf_cv_hashed_db_libs" >&5
19945 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19946
19947         if test "$cf_cv_hashed_db_libs" = unknown ; then
19948                 { { echo "$as_me:19948: error: Cannot determine library for db" >&5
19949 echo "$as_me: error: Cannot determine library for db" >&2;}
19950    { (exit 1); exit 1; }; }
19951         elif test "$cf_cv_hashed_db_libs" != default ; then
19952
19953 cf_add_libs="-l$cf_cv_hashed_db_libs"
19954 # Filter out duplicates - this happens with badly-designed ".pc" files...
19955 for cf_add_1lib in $LIBS
19956 do
19957         for cf_add_2lib in $cf_add_libs
19958         do
19959                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19960                 then
19961                         cf_add_1lib=
19962                         break
19963                 fi
19964         done
19965         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19966 done
19967 LIBS="$cf_add_libs"
19968
19969         fi
19970 fi
19971
19972 else
19973
19974         { { echo "$as_me:19974: error: Cannot find db.h" >&5
19975 echo "$as_me: error: Cannot find db.h" >&2;}
19976    { (exit 1); exit 1; }; }
19977
19978 fi
19979
19980 fi
19981
19982 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19983         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19984         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19985 fi
19986
19987 # Just in case, check if the C compiler has a bool type.
19988
19989 echo "$as_me:19989: checking if we should include stdbool.h" >&5
19990 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19991
19992 if test "${cf_cv_header_stdbool_h+set}" = set; then
19993   echo $ECHO_N "(cached) $ECHO_C" >&6
19994 else
19995
19996         cat >conftest.$ac_ext <<_ACEOF
19997 #line 19997 "configure"
19998 #include "confdefs.h"
19999
20000 int
20001 main ()
20002 {
20003 bool foo = false
20004   ;
20005   return 0;
20006 }
20007 _ACEOF
20008 rm -f conftest.$ac_objext
20009 if { (eval echo "$as_me:20009: \"$ac_compile\"") >&5
20010   (eval $ac_compile) 2>&5
20011   ac_status=$?
20012   echo "$as_me:20012: \$? = $ac_status" >&5
20013   (exit $ac_status); } &&
20014          { ac_try='test -s conftest.$ac_objext'
20015   { (eval echo "$as_me:20015: \"$ac_try\"") >&5
20016   (eval $ac_try) 2>&5
20017   ac_status=$?
20018   echo "$as_me:20018: \$? = $ac_status" >&5
20019   (exit $ac_status); }; }; then
20020   cf_cv_header_stdbool_h=0
20021 else
20022   echo "$as_me: failed program was:" >&5
20023 cat conftest.$ac_ext >&5
20024 cat >conftest.$ac_ext <<_ACEOF
20025 #line 20025 "configure"
20026 #include "confdefs.h"
20027
20028 #ifndef __BEOS__
20029 #include <stdbool.h>
20030 #endif
20031
20032 int
20033 main ()
20034 {
20035 bool foo = false
20036   ;
20037   return 0;
20038 }
20039 _ACEOF
20040 rm -f conftest.$ac_objext
20041 if { (eval echo "$as_me:20041: \"$ac_compile\"") >&5
20042   (eval $ac_compile) 2>&5
20043   ac_status=$?
20044   echo "$as_me:20044: \$? = $ac_status" >&5
20045   (exit $ac_status); } &&
20046          { ac_try='test -s conftest.$ac_objext'
20047   { (eval echo "$as_me:20047: \"$ac_try\"") >&5
20048   (eval $ac_try) 2>&5
20049   ac_status=$?
20050   echo "$as_me:20050: \$? = $ac_status" >&5
20051   (exit $ac_status); }; }; then
20052   cf_cv_header_stdbool_h=1
20053 else
20054   echo "$as_me: failed program was:" >&5
20055 cat conftest.$ac_ext >&5
20056 cf_cv_header_stdbool_h=0
20057 fi
20058 rm -f conftest.$ac_objext conftest.$ac_ext
20059 fi
20060 rm -f conftest.$ac_objext conftest.$ac_ext
20061 fi
20062
20063 if test "$cf_cv_header_stdbool_h" = 1
20064 then    echo "$as_me:20064: result: yes" >&5
20065 echo "${ECHO_T}yes" >&6
20066 else    echo "$as_me:20066: result: no" >&5
20067 echo "${ECHO_T}no" >&6
20068 fi
20069
20070 echo "$as_me:20070: checking for builtin bool type" >&5
20071 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20072
20073 if test "${cf_cv_cc_bool_type+set}" = set; then
20074   echo $ECHO_N "(cached) $ECHO_C" >&6
20075 else
20076
20077         cat >conftest.$ac_ext <<_ACEOF
20078 #line 20078 "configure"
20079 #include "confdefs.h"
20080
20081 #include <stdio.h>
20082 #include <sys/types.h>
20083
20084 int
20085 main ()
20086 {
20087 bool x = false
20088   ;
20089   return 0;
20090 }
20091 _ACEOF
20092 rm -f conftest.$ac_objext
20093 if { (eval echo "$as_me:20093: \"$ac_compile\"") >&5
20094   (eval $ac_compile) 2>&5
20095   ac_status=$?
20096   echo "$as_me:20096: \$? = $ac_status" >&5
20097   (exit $ac_status); } &&
20098          { ac_try='test -s conftest.$ac_objext'
20099   { (eval echo "$as_me:20099: \"$ac_try\"") >&5
20100   (eval $ac_try) 2>&5
20101   ac_status=$?
20102   echo "$as_me:20102: \$? = $ac_status" >&5
20103   (exit $ac_status); }; }; then
20104   cf_cv_cc_bool_type=1
20105 else
20106   echo "$as_me: failed program was:" >&5
20107 cat conftest.$ac_ext >&5
20108 cf_cv_cc_bool_type=0
20109 fi
20110 rm -f conftest.$ac_objext conftest.$ac_ext
20111
20112 fi
20113
20114 if test "$cf_cv_cc_bool_type" = 1
20115 then    echo "$as_me:20115: result: yes" >&5
20116 echo "${ECHO_T}yes" >&6
20117 else    echo "$as_me:20117: result: no" >&5
20118 echo "${ECHO_T}no" >&6
20119 fi
20120
20121 # Check for C++ compiler characteristics (and ensure that it's there!)
20122 if test -n "$CXX" ; then
20123         ac_ext=cc
20124 ac_cpp='$CXXCPP $CPPFLAGS'
20125 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20126 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20127 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20128 ac_main_return=return
20129
20130 if test -n "$GXX" ; then
20131
20132         cf_save="$LIBS"
20133         LIBS="$LIBS $CXXLIBS"
20134         echo "$as_me:20134: checking if we already have C++ library" >&5
20135 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20136         cat >conftest.$ac_ext <<_ACEOF
20137 #line 20137 "configure"
20138 #include "confdefs.h"
20139
20140                         #include <iostream>
20141 int
20142 main ()
20143 {
20144
20145                         std::cout << "Hello World!" << std::endl;
20146   ;
20147   return 0;
20148 }
20149 _ACEOF
20150 rm -f conftest.$ac_objext conftest$ac_exeext
20151 if { (eval echo "$as_me:20151: \"$ac_link\"") >&5
20152   (eval $ac_link) 2>&5
20153   ac_status=$?
20154   echo "$as_me:20154: \$? = $ac_status" >&5
20155   (exit $ac_status); } &&
20156          { ac_try='test -s conftest$ac_exeext'
20157   { (eval echo "$as_me:20157: \"$ac_try\"") >&5
20158   (eval $ac_try) 2>&5
20159   ac_status=$?
20160   echo "$as_me:20160: \$? = $ac_status" >&5
20161   (exit $ac_status); }; }; then
20162   cf_have_libstdcpp=yes
20163 else
20164   echo "$as_me: failed program was:" >&5
20165 cat conftest.$ac_ext >&5
20166 cf_have_libstdcpp=no
20167 fi
20168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20169         echo "$as_me:20169: result: $cf_have_libstdcpp" >&5
20170 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20171         LIBS="$cf_save"
20172
20173         if test $cf_have_libstdcpp != yes
20174         then
20175                 case $cf_cv_system_name in
20176                 (os2*)
20177                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20178                                 cf_stdcpp_libname=stdcpp
20179                         else
20180                                 cf_stdcpp_libname=stdc++
20181                         fi
20182                         ;;
20183                 (*)
20184                         cf_stdcpp_libname=stdc++
20185                         ;;
20186                 esac
20187
20188                 echo "$as_me:20188: checking for library $cf_stdcpp_libname" >&5
20189 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20190 if test "${cf_cv_libstdcpp+set}" = set; then
20191   echo $ECHO_N "(cached) $ECHO_C" >&6
20192 else
20193
20194                         cf_save="$LIBS"
20195                         LIBS="$LIBS $CXXLIBS"
20196
20197 cf_add_libs="-l$cf_stdcpp_libname"
20198 # Filter out duplicates - this happens with badly-designed ".pc" files...
20199 for cf_add_1lib in $LIBS
20200 do
20201         for cf_add_2lib in $cf_add_libs
20202         do
20203                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20204                 then
20205                         cf_add_1lib=
20206                         break
20207                 fi
20208         done
20209         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20210 done
20211 LIBS="$cf_add_libs"
20212
20213                 cat >conftest.$ac_ext <<_ACEOF
20214 #line 20214 "configure"
20215 #include "confdefs.h"
20216
20217                                 #include <iostream>
20218 int
20219 main ()
20220 {
20221
20222                                 std::cout << "Hello World!" << std::endl;
20223   ;
20224   return 0;
20225 }
20226 _ACEOF
20227 rm -f conftest.$ac_objext conftest$ac_exeext
20228 if { (eval echo "$as_me:20228: \"$ac_link\"") >&5
20229   (eval $ac_link) 2>&5
20230   ac_status=$?
20231   echo "$as_me:20231: \$? = $ac_status" >&5
20232   (exit $ac_status); } &&
20233          { ac_try='test -s conftest$ac_exeext'
20234   { (eval echo "$as_me:20234: \"$ac_try\"") >&5
20235   (eval $ac_try) 2>&5
20236   ac_status=$?
20237   echo "$as_me:20237: \$? = $ac_status" >&5
20238   (exit $ac_status); }; }; then
20239   cf_cv_libstdcpp=yes
20240 else
20241   echo "$as_me: failed program was:" >&5
20242 cat conftest.$ac_ext >&5
20243 cf_cv_libstdcpp=no
20244 fi
20245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20246                         LIBS="$cf_save"
20247
20248 fi
20249 echo "$as_me:20249: result: $cf_cv_libstdcpp" >&5
20250 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20251                 test "$cf_cv_libstdcpp" = yes && {
20252 cf_add_libs="-l$cf_stdcpp_libname"
20253 # Filter out duplicates - this happens with badly-designed ".pc" files...
20254 for cf_add_1lib in $CXXLIBS
20255 do
20256         for cf_add_2lib in $cf_add_libs
20257         do
20258                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20259                 then
20260                         cf_add_1lib=
20261                         break
20262                 fi
20263         done
20264         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20265 done
20266 CXXLIBS="$cf_add_libs"
20267  }
20268         fi
20269 fi
20270
20271         echo "$as_me:20271: checking whether $CXX understands -c and -o together" >&5
20272 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20273 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20274   echo $ECHO_N "(cached) $ECHO_C" >&6
20275 else
20276
20277 cat > conftest.$ac_ext <<CF_EOF
20278 int main(void)
20279 {
20280         ${cf_cv_main_return:-return}(0);
20281 }
20282 CF_EOF
20283 # We do the test twice because some compilers refuse to overwrite an
20284 # existing .o file with -o, though they will create one.
20285 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20286 if { (eval echo "$as_me:20286: \"$ac_try\"") >&5
20287   (eval $ac_try) 2>&5
20288   ac_status=$?
20289   echo "$as_me:20289: \$? = $ac_status" >&5
20290   (exit $ac_status); } &&
20291   test -f conftest2.$ac_objext && { (eval echo "$as_me:20291: \"$ac_try\"") >&5
20292   (eval $ac_try) 2>&5
20293   ac_status=$?
20294   echo "$as_me:20294: \$? = $ac_status" >&5
20295   (exit $ac_status); };
20296 then
20297   eval cf_cv_prog_CXX_c_o=yes
20298 else
20299   eval cf_cv_prog_CXX_c_o=no
20300 fi
20301 rm -rf conftest*
20302
20303 fi
20304 if test $cf_cv_prog_CXX_c_o = yes; then
20305   echo "$as_me:20305: result: yes" >&5
20306 echo "${ECHO_T}yes" >&6
20307 else
20308   echo "$as_me:20308: result: no" >&5
20309 echo "${ECHO_T}no" >&6
20310 fi
20311
20312         case $GXX_VERSION in
20313         (1*|2.0-6*)
20314                 cf_cxx_library=yes
20315                 ;;
20316         (*-2.7*|2.7*)
20317
20318 cf_cxx_library=unknown
20319 case $cf_cv_system_name in
20320 (os2*)
20321         cf_gpp_libname=gpp
20322         ;;
20323 (*)
20324         cf_gpp_libname=g++
20325         ;;
20326 esac
20327 if test "$GXX" = yes; then
20328         echo "$as_me:20328: checking for lib$cf_gpp_libname" >&5
20329 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20330         cf_save="$LIBS"
20331
20332 cf_add_libs="-l$cf_gpp_libname"
20333 # Filter out duplicates - this happens with badly-designed ".pc" files...
20334 for cf_add_1lib in $LIBS
20335 do
20336         for cf_add_2lib in $cf_add_libs
20337         do
20338                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20339                 then
20340                         cf_add_1lib=
20341                         break
20342                 fi
20343         done
20344         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20345 done
20346 LIBS="$cf_add_libs"
20347
20348         cat >conftest.$ac_ext <<_ACEOF
20349 #line 20349 "configure"
20350 #include "confdefs.h"
20351
20352 #include <$cf_gpp_libname/builtin.h>
20353
20354 int
20355 main ()
20356 {
20357 two_arg_error_handler_t foo2 = lib_error_handler
20358   ;
20359   return 0;
20360 }
20361 _ACEOF
20362 rm -f conftest.$ac_objext conftest$ac_exeext
20363 if { (eval echo "$as_me:20363: \"$ac_link\"") >&5
20364   (eval $ac_link) 2>&5
20365   ac_status=$?
20366   echo "$as_me:20366: \$? = $ac_status" >&5
20367   (exit $ac_status); } &&
20368          { ac_try='test -s conftest$ac_exeext'
20369   { (eval echo "$as_me:20369: \"$ac_try\"") >&5
20370   (eval $ac_try) 2>&5
20371   ac_status=$?
20372   echo "$as_me:20372: \$? = $ac_status" >&5
20373   (exit $ac_status); }; }; then
20374   cf_cxx_library=yes
20375
20376 cf_add_libs="-l$cf_gpp_libname"
20377 # Filter out duplicates - this happens with badly-designed ".pc" files...
20378 for cf_add_1lib in $CXXLIBS
20379 do
20380         for cf_add_2lib in $cf_add_libs
20381         do
20382                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20383                 then
20384                         cf_add_1lib=
20385                         break
20386                 fi
20387         done
20388         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20389 done
20390 CXXLIBS="$cf_add_libs"
20391
20392          if test "$cf_gpp_libname" = cpp ; then
20393
20394 cat >>confdefs.h <<\EOF
20395 #define HAVE_GPP_BUILTIN_H 1
20396 EOF
20397
20398          else
20399
20400 cat >>confdefs.h <<\EOF
20401 #define HAVE_GXX_BUILTIN_H 1
20402 EOF
20403
20404          fi
20405 else
20406   echo "$as_me: failed program was:" >&5
20407 cat conftest.$ac_ext >&5
20408 cat >conftest.$ac_ext <<_ACEOF
20409 #line 20409 "configure"
20410 #include "confdefs.h"
20411
20412 #include <builtin.h>
20413
20414 int
20415 main ()
20416 {
20417 two_arg_error_handler_t foo2 = lib_error_handler
20418   ;
20419   return 0;
20420 }
20421 _ACEOF
20422 rm -f conftest.$ac_objext conftest$ac_exeext
20423 if { (eval echo "$as_me:20423: \"$ac_link\"") >&5
20424   (eval $ac_link) 2>&5
20425   ac_status=$?
20426   echo "$as_me:20426: \$? = $ac_status" >&5
20427   (exit $ac_status); } &&
20428          { ac_try='test -s conftest$ac_exeext'
20429   { (eval echo "$as_me:20429: \"$ac_try\"") >&5
20430   (eval $ac_try) 2>&5
20431   ac_status=$?
20432   echo "$as_me:20432: \$? = $ac_status" >&5
20433   (exit $ac_status); }; }; then
20434   cf_cxx_library=yes
20435
20436 cf_add_libs="-l$cf_gpp_libname"
20437 # Filter out duplicates - this happens with badly-designed ".pc" files...
20438 for cf_add_1lib in $CXXLIBS
20439 do
20440         for cf_add_2lib in $cf_add_libs
20441         do
20442                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20443                 then
20444                         cf_add_1lib=
20445                         break
20446                 fi
20447         done
20448         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20449 done
20450 CXXLIBS="$cf_add_libs"
20451
20452 cat >>confdefs.h <<\EOF
20453 #define HAVE_BUILTIN_H 1
20454 EOF
20455
20456 else
20457   echo "$as_me: failed program was:" >&5
20458 cat conftest.$ac_ext >&5
20459 cf_cxx_library=no
20460 fi
20461 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20462 fi
20463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20464         LIBS="$cf_save"
20465         echo "$as_me:20465: result: $cf_cxx_library" >&5
20466 echo "${ECHO_T}$cf_cxx_library" >&6
20467 fi
20468
20469                 ;;
20470         (*)
20471                 cf_cxx_library=no
20472                 ;;
20473         esac
20474
20475         ac_ext=cc
20476 ac_cpp='$CXXCPP $CPPFLAGS'
20477 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20478 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20479 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20480 ac_main_return=return
20481 echo "$as_me:20481: checking how to run the C++ preprocessor" >&5
20482 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20483 if test -z "$CXXCPP"; then
20484   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20485   echo $ECHO_N "(cached) $ECHO_C" >&6
20486 else
20487       # Double quotes because CXXCPP needs to be expanded
20488     for CXXCPP in "$CXX -E" "/lib/cpp"
20489     do
20490       ac_preproc_ok=false
20491 for ac_cxx_preproc_warn_flag in '' yes
20492 do
20493   # Use a header file that comes with gcc, so configuring glibc
20494   # with a fresh cross-compiler works.
20495   # On the NeXT, cc -E runs the code through the compiler's parser,
20496   # not just through cpp. "Syntax error" is here to catch this case.
20497   cat >conftest.$ac_ext <<_ACEOF
20498 #line 20498 "configure"
20499 #include "confdefs.h"
20500 #include <assert.h>
20501                      Syntax error
20502 _ACEOF
20503 if { (eval echo "$as_me:20503: \"$ac_cpp conftest.$ac_ext\"") >&5
20504   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20505   ac_status=$?
20506   egrep -v '^ *\+' conftest.er1 >conftest.err
20507   rm -f conftest.er1
20508   cat conftest.err >&5
20509   echo "$as_me:20509: \$? = $ac_status" >&5
20510   (exit $ac_status); } >/dev/null; then
20511   if test -s conftest.err; then
20512     ac_cpp_err=$ac_cxx_preproc_warn_flag
20513   else
20514     ac_cpp_err=
20515   fi
20516 else
20517   ac_cpp_err=yes
20518 fi
20519 if test -z "$ac_cpp_err"; then
20520   :
20521 else
20522   echo "$as_me: failed program was:" >&5
20523   cat conftest.$ac_ext >&5
20524   # Broken: fails on valid input.
20525 continue
20526 fi
20527 rm -f conftest.err conftest.$ac_ext
20528
20529   # OK, works on sane cases.  Now check whether non-existent headers
20530   # can be detected and how.
20531   cat >conftest.$ac_ext <<_ACEOF
20532 #line 20532 "configure"
20533 #include "confdefs.h"
20534 #include <ac_nonexistent.h>
20535 _ACEOF
20536 if { (eval echo "$as_me:20536: \"$ac_cpp conftest.$ac_ext\"") >&5
20537   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20538   ac_status=$?
20539   egrep -v '^ *\+' conftest.er1 >conftest.err
20540   rm -f conftest.er1
20541   cat conftest.err >&5
20542   echo "$as_me:20542: \$? = $ac_status" >&5
20543   (exit $ac_status); } >/dev/null; then
20544   if test -s conftest.err; then
20545     ac_cpp_err=$ac_cxx_preproc_warn_flag
20546   else
20547     ac_cpp_err=
20548   fi
20549 else
20550   ac_cpp_err=yes
20551 fi
20552 if test -z "$ac_cpp_err"; then
20553   # Broken: success on invalid input.
20554 continue
20555 else
20556   echo "$as_me: failed program was:" >&5
20557   cat conftest.$ac_ext >&5
20558   # Passes both tests.
20559 ac_preproc_ok=:
20560 break
20561 fi
20562 rm -f conftest.err conftest.$ac_ext
20563
20564 done
20565 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20566 rm -f conftest.err conftest.$ac_ext
20567 if $ac_preproc_ok; then
20568   break
20569 fi
20570
20571     done
20572     ac_cv_prog_CXXCPP=$CXXCPP
20573
20574 fi
20575   CXXCPP=$ac_cv_prog_CXXCPP
20576 else
20577   ac_cv_prog_CXXCPP=$CXXCPP
20578 fi
20579 echo "$as_me:20579: result: $CXXCPP" >&5
20580 echo "${ECHO_T}$CXXCPP" >&6
20581 ac_preproc_ok=false
20582 for ac_cxx_preproc_warn_flag in '' yes
20583 do
20584   # Use a header file that comes with gcc, so configuring glibc
20585   # with a fresh cross-compiler works.
20586   # On the NeXT, cc -E runs the code through the compiler's parser,
20587   # not just through cpp. "Syntax error" is here to catch this case.
20588   cat >conftest.$ac_ext <<_ACEOF
20589 #line 20589 "configure"
20590 #include "confdefs.h"
20591 #include <assert.h>
20592                      Syntax error
20593 _ACEOF
20594 if { (eval echo "$as_me:20594: \"$ac_cpp conftest.$ac_ext\"") >&5
20595   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20596   ac_status=$?
20597   egrep -v '^ *\+' conftest.er1 >conftest.err
20598   rm -f conftest.er1
20599   cat conftest.err >&5
20600   echo "$as_me:20600: \$? = $ac_status" >&5
20601   (exit $ac_status); } >/dev/null; then
20602   if test -s conftest.err; then
20603     ac_cpp_err=$ac_cxx_preproc_warn_flag
20604   else
20605     ac_cpp_err=
20606   fi
20607 else
20608   ac_cpp_err=yes
20609 fi
20610 if test -z "$ac_cpp_err"; then
20611   :
20612 else
20613   echo "$as_me: failed program was:" >&5
20614   cat conftest.$ac_ext >&5
20615   # Broken: fails on valid input.
20616 continue
20617 fi
20618 rm -f conftest.err conftest.$ac_ext
20619
20620   # OK, works on sane cases.  Now check whether non-existent headers
20621   # can be detected and how.
20622   cat >conftest.$ac_ext <<_ACEOF
20623 #line 20623 "configure"
20624 #include "confdefs.h"
20625 #include <ac_nonexistent.h>
20626 _ACEOF
20627 if { (eval echo "$as_me:20627: \"$ac_cpp conftest.$ac_ext\"") >&5
20628   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20629   ac_status=$?
20630   egrep -v '^ *\+' conftest.er1 >conftest.err
20631   rm -f conftest.er1
20632   cat conftest.err >&5
20633   echo "$as_me:20633: \$? = $ac_status" >&5
20634   (exit $ac_status); } >/dev/null; then
20635   if test -s conftest.err; then
20636     ac_cpp_err=$ac_cxx_preproc_warn_flag
20637   else
20638     ac_cpp_err=
20639   fi
20640 else
20641   ac_cpp_err=yes
20642 fi
20643 if test -z "$ac_cpp_err"; then
20644   # Broken: success on invalid input.
20645 continue
20646 else
20647   echo "$as_me: failed program was:" >&5
20648   cat conftest.$ac_ext >&5
20649   # Passes both tests.
20650 ac_preproc_ok=:
20651 break
20652 fi
20653 rm -f conftest.err conftest.$ac_ext
20654
20655 done
20656 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20657 rm -f conftest.err conftest.$ac_ext
20658 if $ac_preproc_ok; then
20659   :
20660 else
20661   { { echo "$as_me:20661: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20662 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20663    { (exit 1); exit 1; }; }
20664 fi
20665
20666 ac_ext=cc
20667 ac_cpp='$CXXCPP $CPPFLAGS'
20668 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20669 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20670 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20671 ac_main_return=return
20672
20673 for ac_header in typeinfo
20674 do
20675 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20676 echo "$as_me:20676: checking for $ac_header" >&5
20677 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20678 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20679   echo $ECHO_N "(cached) $ECHO_C" >&6
20680 else
20681   cat >conftest.$ac_ext <<_ACEOF
20682 #line 20682 "configure"
20683 #include "confdefs.h"
20684 #include <$ac_header>
20685 _ACEOF
20686 if { (eval echo "$as_me:20686: \"$ac_cpp conftest.$ac_ext\"") >&5
20687   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20688   ac_status=$?
20689   egrep -v '^ *\+' conftest.er1 >conftest.err
20690   rm -f conftest.er1
20691   cat conftest.err >&5
20692   echo "$as_me:20692: \$? = $ac_status" >&5
20693   (exit $ac_status); } >/dev/null; then
20694   if test -s conftest.err; then
20695     ac_cpp_err=$ac_cxx_preproc_warn_flag
20696   else
20697     ac_cpp_err=
20698   fi
20699 else
20700   ac_cpp_err=yes
20701 fi
20702 if test -z "$ac_cpp_err"; then
20703   eval "$as_ac_Header=yes"
20704 else
20705   echo "$as_me: failed program was:" >&5
20706   cat conftest.$ac_ext >&5
20707   eval "$as_ac_Header=no"
20708 fi
20709 rm -f conftest.err conftest.$ac_ext
20710 fi
20711 echo "$as_me:20711: result: `eval echo '${'$as_ac_Header'}'`" >&5
20712 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20713 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20714   cat >>confdefs.h <<EOF
20715 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20716 EOF
20717
20718 fi
20719 done
20720
20721 for ac_header in iostream
20722 do
20723 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20724 echo "$as_me:20724: checking for $ac_header" >&5
20725 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20726 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20727   echo $ECHO_N "(cached) $ECHO_C" >&6
20728 else
20729   cat >conftest.$ac_ext <<_ACEOF
20730 #line 20730 "configure"
20731 #include "confdefs.h"
20732 #include <$ac_header>
20733 _ACEOF
20734 if { (eval echo "$as_me:20734: \"$ac_cpp conftest.$ac_ext\"") >&5
20735   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20736   ac_status=$?
20737   egrep -v '^ *\+' conftest.er1 >conftest.err
20738   rm -f conftest.er1
20739   cat conftest.err >&5
20740   echo "$as_me:20740: \$? = $ac_status" >&5
20741   (exit $ac_status); } >/dev/null; then
20742   if test -s conftest.err; then
20743     ac_cpp_err=$ac_cxx_preproc_warn_flag
20744   else
20745     ac_cpp_err=
20746   fi
20747 else
20748   ac_cpp_err=yes
20749 fi
20750 if test -z "$ac_cpp_err"; then
20751   eval "$as_ac_Header=yes"
20752 else
20753   echo "$as_me: failed program was:" >&5
20754   cat conftest.$ac_ext >&5
20755   eval "$as_ac_Header=no"
20756 fi
20757 rm -f conftest.err conftest.$ac_ext
20758 fi
20759 echo "$as_me:20759: result: `eval echo '${'$as_ac_Header'}'`" >&5
20760 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20761 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20762   cat >>confdefs.h <<EOF
20763 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20764 EOF
20765
20766 fi
20767 done
20768
20769 if test x"$ac_cv_header_iostream" = xyes ; then
20770         echo "$as_me:20770: checking if iostream uses std-namespace" >&5
20771 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20772         cat >conftest.$ac_ext <<_ACEOF
20773 #line 20773 "configure"
20774 #include "confdefs.h"
20775
20776 #include <iostream>
20777 using std::endl;
20778 using std::cerr;
20779 int
20780 main ()
20781 {
20782
20783 cerr << "testing" << endl;
20784
20785   ;
20786   return 0;
20787 }
20788 _ACEOF
20789 rm -f conftest.$ac_objext
20790 if { (eval echo "$as_me:20790: \"$ac_compile\"") >&5
20791   (eval $ac_compile) 2>&5
20792   ac_status=$?
20793   echo "$as_me:20793: \$? = $ac_status" >&5
20794   (exit $ac_status); } &&
20795          { ac_try='test -s conftest.$ac_objext'
20796   { (eval echo "$as_me:20796: \"$ac_try\"") >&5
20797   (eval $ac_try) 2>&5
20798   ac_status=$?
20799   echo "$as_me:20799: \$? = $ac_status" >&5
20800   (exit $ac_status); }; }; then
20801   cf_iostream_namespace=yes
20802 else
20803   echo "$as_me: failed program was:" >&5
20804 cat conftest.$ac_ext >&5
20805 cf_iostream_namespace=no
20806 fi
20807 rm -f conftest.$ac_objext conftest.$ac_ext
20808         echo "$as_me:20808: result: $cf_iostream_namespace" >&5
20809 echo "${ECHO_T}$cf_iostream_namespace" >&6
20810         if test "$cf_iostream_namespace" = yes ; then
20811
20812 cat >>confdefs.h <<\EOF
20813 #define IOSTREAM_NAMESPACE 1
20814 EOF
20815
20816         fi
20817 fi
20818
20819 echo "$as_me:20819: checking if we should include stdbool.h" >&5
20820 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20821
20822 if test "${cf_cv_header_stdbool_h+set}" = set; then
20823   echo $ECHO_N "(cached) $ECHO_C" >&6
20824 else
20825
20826         cat >conftest.$ac_ext <<_ACEOF
20827 #line 20827 "configure"
20828 #include "confdefs.h"
20829
20830 int
20831 main ()
20832 {
20833 bool foo = false
20834   ;
20835   return 0;
20836 }
20837 _ACEOF
20838 rm -f conftest.$ac_objext
20839 if { (eval echo "$as_me:20839: \"$ac_compile\"") >&5
20840   (eval $ac_compile) 2>&5
20841   ac_status=$?
20842   echo "$as_me:20842: \$? = $ac_status" >&5
20843   (exit $ac_status); } &&
20844          { ac_try='test -s conftest.$ac_objext'
20845   { (eval echo "$as_me:20845: \"$ac_try\"") >&5
20846   (eval $ac_try) 2>&5
20847   ac_status=$?
20848   echo "$as_me:20848: \$? = $ac_status" >&5
20849   (exit $ac_status); }; }; then
20850   cf_cv_header_stdbool_h=0
20851 else
20852   echo "$as_me: failed program was:" >&5
20853 cat conftest.$ac_ext >&5
20854 cat >conftest.$ac_ext <<_ACEOF
20855 #line 20855 "configure"
20856 #include "confdefs.h"
20857
20858 #ifndef __BEOS__
20859 #include <stdbool.h>
20860 #endif
20861
20862 int
20863 main ()
20864 {
20865 bool foo = false
20866   ;
20867   return 0;
20868 }
20869 _ACEOF
20870 rm -f conftest.$ac_objext
20871 if { (eval echo "$as_me:20871: \"$ac_compile\"") >&5
20872   (eval $ac_compile) 2>&5
20873   ac_status=$?
20874   echo "$as_me:20874: \$? = $ac_status" >&5
20875   (exit $ac_status); } &&
20876          { ac_try='test -s conftest.$ac_objext'
20877   { (eval echo "$as_me:20877: \"$ac_try\"") >&5
20878   (eval $ac_try) 2>&5
20879   ac_status=$?
20880   echo "$as_me:20880: \$? = $ac_status" >&5
20881   (exit $ac_status); }; }; then
20882   cf_cv_header_stdbool_h=1
20883 else
20884   echo "$as_me: failed program was:" >&5
20885 cat conftest.$ac_ext >&5
20886 cf_cv_header_stdbool_h=0
20887 fi
20888 rm -f conftest.$ac_objext conftest.$ac_ext
20889 fi
20890 rm -f conftest.$ac_objext conftest.$ac_ext
20891 fi
20892
20893 if test "$cf_cv_header_stdbool_h" = 1
20894 then    echo "$as_me:20894: result: yes" >&5
20895 echo "${ECHO_T}yes" >&6
20896 else    echo "$as_me:20896: result: no" >&5
20897 echo "${ECHO_T}no" >&6
20898 fi
20899
20900 echo "$as_me:20900: checking for builtin bool type" >&5
20901 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20902
20903 if test "${cf_cv_builtin_bool+set}" = set; then
20904   echo $ECHO_N "(cached) $ECHO_C" >&6
20905 else
20906
20907         cat >conftest.$ac_ext <<_ACEOF
20908 #line 20908 "configure"
20909 #include "confdefs.h"
20910
20911 #include <stdio.h>
20912 #include <sys/types.h>
20913
20914 int
20915 main ()
20916 {
20917 bool x = false
20918   ;
20919   return 0;
20920 }
20921 _ACEOF
20922 rm -f conftest.$ac_objext
20923 if { (eval echo "$as_me:20923: \"$ac_compile\"") >&5
20924   (eval $ac_compile) 2>&5
20925   ac_status=$?
20926   echo "$as_me:20926: \$? = $ac_status" >&5
20927   (exit $ac_status); } &&
20928          { ac_try='test -s conftest.$ac_objext'
20929   { (eval echo "$as_me:20929: \"$ac_try\"") >&5
20930   (eval $ac_try) 2>&5
20931   ac_status=$?
20932   echo "$as_me:20932: \$? = $ac_status" >&5
20933   (exit $ac_status); }; }; then
20934   cf_cv_builtin_bool=1
20935 else
20936   echo "$as_me: failed program was:" >&5
20937 cat conftest.$ac_ext >&5
20938 cf_cv_builtin_bool=0
20939 fi
20940 rm -f conftest.$ac_objext conftest.$ac_ext
20941
20942 fi
20943
20944 if test "$cf_cv_builtin_bool" = 1
20945 then    echo "$as_me:20945: result: yes" >&5
20946 echo "${ECHO_T}yes" >&6
20947 else    echo "$as_me:20947: result: no" >&5
20948 echo "${ECHO_T}no" >&6
20949 fi
20950
20951 echo "$as_me:20951: checking for size of bool" >&5
20952 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20953 if test "${cf_cv_type_of_bool+set}" = set; then
20954   echo $ECHO_N "(cached) $ECHO_C" >&6
20955 else
20956
20957         rm -f cf_test.out
20958         if test "$cross_compiling" = yes; then
20959   cf_cv_type_of_bool=unknown
20960 else
20961   cat >conftest.$ac_ext <<_ACEOF
20962 #line 20962 "configure"
20963 #include "confdefs.h"
20964
20965 #include <stdlib.h>
20966 #include <stdio.h>
20967
20968 #if defined(__cplusplus)
20969
20970 #ifdef HAVE_GXX_BUILTIN_H
20971 #include <g++/builtin.h>
20972 #elif HAVE_GPP_BUILTIN_H
20973 #include <gpp/builtin.h>
20974 #elif HAVE_BUILTIN_H
20975 #include <builtin.h>
20976 #endif
20977
20978 #else
20979
20980 #if $cf_cv_header_stdbool_h
20981 #include <stdbool.h>
20982 #endif
20983
20984 #endif
20985
20986 int main(void)
20987 {
20988         FILE *fp = fopen("cf_test.out", "w");
20989         if (fp != 0) {
20990                 bool x = true;
20991                 if ((bool)(-x) >= 0)
20992                         fputs("unsigned ", fp);
20993                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20994                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20995                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20996                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20997                 fclose(fp);
20998         }
20999         ${cf_cv_main_return:-return}(0);
21000 }
21001
21002 _ACEOF
21003 rm -f conftest$ac_exeext
21004 if { (eval echo "$as_me:21004: \"$ac_link\"") >&5
21005   (eval $ac_link) 2>&5
21006   ac_status=$?
21007   echo "$as_me:21007: \$? = $ac_status" >&5
21008   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21009   { (eval echo "$as_me:21009: \"$ac_try\"") >&5
21010   (eval $ac_try) 2>&5
21011   ac_status=$?
21012   echo "$as_me:21012: \$? = $ac_status" >&5
21013   (exit $ac_status); }; }; then
21014   cf_cv_type_of_bool=`cat cf_test.out`
21015                  if test -z "$cf_cv_type_of_bool"; then
21016                    cf_cv_type_of_bool=unknown
21017                  fi
21018 else
21019   echo "$as_me: program exited with status $ac_status" >&5
21020 echo "$as_me: failed program was:" >&5
21021 cat conftest.$ac_ext >&5
21022 cf_cv_type_of_bool=unknown
21023 fi
21024 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21025 fi
21026
21027 fi
21028
21029         rm -f cf_test.out
21030 echo "$as_me:21030: result: $cf_cv_type_of_bool" >&5
21031 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21032 if test "$cf_cv_type_of_bool" = unknown ; then
21033         case .$NCURSES_BOOL in
21034         (.auto|.) NCURSES_BOOL=unsigned;;
21035         esac
21036         { echo "$as_me:21036: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21037 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21038         cf_cv_type_of_bool=$NCURSES_BOOL
21039 fi
21040
21041 echo "$as_me:21041: checking for special defines needed for etip.h" >&5
21042 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21043 cf_save_CXXFLAGS="$CXXFLAGS"
21044 cf_result="none"
21045
21046 # etip.h includes ncurses.h which includes ncurses_dll.h
21047 # But ncurses_dll.h is generated - fix here.
21048 test -d include || mkdir include
21049 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
21050
21051 for cf_math in "" MATH_H
21052 do
21053 for cf_excp in "" MATH_EXCEPTION
21054 do
21055         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21056         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21057         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21058 cat >conftest.$ac_ext <<_ACEOF
21059 #line 21059 "configure"
21060 #include "confdefs.h"
21061
21062 #include <etip.h.in>
21063
21064 int
21065 main ()
21066 {
21067
21068   ;
21069   return 0;
21070 }
21071 _ACEOF
21072 rm -f conftest.$ac_objext
21073 if { (eval echo "$as_me:21073: \"$ac_compile\"") >&5
21074   (eval $ac_compile) 2>&5
21075   ac_status=$?
21076   echo "$as_me:21076: \$? = $ac_status" >&5
21077   (exit $ac_status); } &&
21078          { ac_try='test -s conftest.$ac_objext'
21079   { (eval echo "$as_me:21079: \"$ac_try\"") >&5
21080   (eval $ac_try) 2>&5
21081   ac_status=$?
21082   echo "$as_me:21082: \$? = $ac_status" >&5
21083   (exit $ac_status); }; }; then
21084
21085         test -n "$cf_math" && cat >>confdefs.h <<EOF
21086 #define ETIP_NEEDS_${cf_math} 1
21087 EOF
21088
21089         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21090 #define ETIP_NEEDS_${cf_excp} 1
21091 EOF
21092
21093         cf_result="$cf_math $cf_excp"
21094         break 2
21095
21096 else
21097   echo "$as_me: failed program was:" >&5
21098 cat conftest.$ac_ext >&5
21099 fi
21100 rm -f conftest.$ac_objext conftest.$ac_ext
21101 done
21102 done
21103 echo "$as_me:21103: result: $cf_result" >&5
21104 echo "${ECHO_T}$cf_result" >&6
21105 CXXFLAGS="$cf_save_CXXFLAGS"
21106
21107 if test -n "$CXX"; then
21108 echo "$as_me:21108: checking if $CXX accepts parameter initialization" >&5
21109 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21110 if test "${cf_cv_cpp_param_init+set}" = set; then
21111   echo $ECHO_N "(cached) $ECHO_C" >&6
21112 else
21113
21114         ac_ext=cc
21115 ac_cpp='$CXXCPP $CPPFLAGS'
21116 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21117 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21118 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21119 ac_main_return=return
21120
21121         if test "$cross_compiling" = yes; then
21122   cf_cv_cpp_param_init=unknown
21123 else
21124   cat >conftest.$ac_ext <<_ACEOF
21125 #line 21125 "configure"
21126 #include "confdefs.h"
21127
21128 class TEST {
21129 private:
21130         int value;
21131 public:
21132         TEST(int x = 1);
21133         ~TEST();
21134 };
21135
21136 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21137 {
21138         value = x;
21139 }
21140 int main(void) { }
21141
21142 _ACEOF
21143 rm -f conftest$ac_exeext
21144 if { (eval echo "$as_me:21144: \"$ac_link\"") >&5
21145   (eval $ac_link) 2>&5
21146   ac_status=$?
21147   echo "$as_me:21147: \$? = $ac_status" >&5
21148   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21149   { (eval echo "$as_me:21149: \"$ac_try\"") >&5
21150   (eval $ac_try) 2>&5
21151   ac_status=$?
21152   echo "$as_me:21152: \$? = $ac_status" >&5
21153   (exit $ac_status); }; }; then
21154   cf_cv_cpp_param_init=yes
21155 else
21156   echo "$as_me: program exited with status $ac_status" >&5
21157 echo "$as_me: failed program was:" >&5
21158 cat conftest.$ac_ext >&5
21159 cf_cv_cpp_param_init=no
21160 fi
21161 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21162 fi
21163         ac_ext=cc
21164 ac_cpp='$CXXCPP $CPPFLAGS'
21165 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21166 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21167 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21168 ac_main_return=return
21169
21170 fi
21171 echo "$as_me:21171: result: $cf_cv_cpp_param_init" >&5
21172 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21173 fi
21174 test "$cf_cv_cpp_param_init" = yes &&
21175 cat >>confdefs.h <<\EOF
21176 #define CPP_HAS_PARAM_INIT 1
21177 EOF
21178
21179 if test -n "$CXX"; then
21180
21181 echo "$as_me:21181: checking if $CXX accepts static_cast" >&5
21182 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21183 if test "${cf_cv_cpp_static_cast+set}" = set; then
21184   echo $ECHO_N "(cached) $ECHO_C" >&6
21185 else
21186
21187         ac_ext=cc
21188 ac_cpp='$CXXCPP $CPPFLAGS'
21189 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21190 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21191 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21192 ac_main_return=return
21193
21194         cat >conftest.$ac_ext <<_ACEOF
21195 #line 21195 "configure"
21196 #include "confdefs.h"
21197
21198 class NCursesPanel
21199 {
21200 public:
21201   NCursesPanel(int nlines,
21202                int ncols,
21203                int begin_y = 0,
21204                int begin_x = 0)
21205   {
21206   }
21207   NCursesPanel();
21208   ~NCursesPanel();
21209 };
21210
21211 template<class T> class NCursesUserPanel : public NCursesPanel
21212 {
21213 public:
21214   NCursesUserPanel (int nlines,
21215                     int ncols,
21216                     int begin_y = 0,
21217                     int begin_x = 0,
21218                     const T* p_UserData = static_cast<T*>(0))
21219     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21220   {
21221   };
21222   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21223   {
21224   };
21225
21226   virtual ~NCursesUserPanel() {};
21227 };
21228
21229 int
21230 main ()
21231 {
21232
21233         const char* p_UserData = static_cast<char*>(0)
21234   ;
21235   return 0;
21236 }
21237 _ACEOF
21238 rm -f conftest.$ac_objext
21239 if { (eval echo "$as_me:21239: \"$ac_compile\"") >&5
21240   (eval $ac_compile) 2>&5
21241   ac_status=$?
21242   echo "$as_me:21242: \$? = $ac_status" >&5
21243   (exit $ac_status); } &&
21244          { ac_try='test -s conftest.$ac_objext'
21245   { (eval echo "$as_me:21245: \"$ac_try\"") >&5
21246   (eval $ac_try) 2>&5
21247   ac_status=$?
21248   echo "$as_me:21248: \$? = $ac_status" >&5
21249   (exit $ac_status); }; }; then
21250   cf_cv_cpp_static_cast=yes
21251 else
21252   echo "$as_me: failed program was:" >&5
21253 cat conftest.$ac_ext >&5
21254 cf_cv_cpp_static_cast=no
21255 fi
21256 rm -f conftest.$ac_objext conftest.$ac_ext
21257
21258         ac_ext=cc
21259 ac_cpp='$CXXCPP $CPPFLAGS'
21260 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21261 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21262 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21263 ac_main_return=return
21264
21265 fi
21266 echo "$as_me:21266: result: $cf_cv_cpp_static_cast" >&5
21267 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21268
21269 fi
21270
21271 test "$cf_cv_cpp_static_cast" = yes &&
21272 cat >>confdefs.h <<\EOF
21273 #define CPP_HAS_STATIC_CAST 1
21274 EOF
21275
21276         CXX_AR='$(AR)'
21277         CXX_ARFLAGS='$(ARFLAGS)'
21278         case $cf_cv_system_name in
21279         (irix*)
21280             if test "$GXX" != yes ; then
21281                 CXX_AR='$(CXX)'
21282                 CXX_ARFLAGS='-ar -o'
21283             fi
21284             ;;
21285         (sco3.2v5*)
21286             CXXLDFLAGS="-u main"
21287             ;;
21288         (solaris2*)
21289             if test "$GXX" != yes ; then
21290                 CXX_AR='$(CXX)'
21291                 CXX_ARFLAGS='-xar -o'
21292             fi
21293             ;;
21294         esac
21295
21296 else
21297         cf_cxx_library=no
21298         cf_cv_builtin_bool=1
21299
21300         # Just because we are not configuring against C++ right now does not
21301         # mean that a user will not want to use C++.  Some distributors disable
21302         # the C++ portion of this configuration as a shortcut (or just to avoid
21303         # compiling the demo in the c++ directory).  So we need a reasonable
21304         # default for the 'bool' type.
21305         #
21306         # Caveat: since the storage of the bool type is not standardized, it
21307         # may change.
21308
21309         if test "$NCURSES_BOOL" != auto ; then
21310                 cf_cv_type_of_bool=$NCURSES_BOOL
21311                 cf_cv_header_stdbool_h=0
21312         else
21313                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21314
21315 echo "$as_me:21315: checking for size of bool" >&5
21316 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21317 if test "${cf_cv_type_of_bool+set}" = set; then
21318   echo $ECHO_N "(cached) $ECHO_C" >&6
21319 else
21320
21321         rm -f cf_test.out
21322         if test "$cross_compiling" = yes; then
21323   cf_cv_type_of_bool=unknown
21324 else
21325   cat >conftest.$ac_ext <<_ACEOF
21326 #line 21326 "configure"
21327 #include "confdefs.h"
21328
21329 #include <stdlib.h>
21330 #include <stdio.h>
21331
21332 #if defined(__cplusplus)
21333
21334 #ifdef HAVE_GXX_BUILTIN_H
21335 #include <g++/builtin.h>
21336 #elif HAVE_GPP_BUILTIN_H
21337 #include <gpp/builtin.h>
21338 #elif HAVE_BUILTIN_H
21339 #include <builtin.h>
21340 #endif
21341
21342 #else
21343
21344 #if $cf_cv_header_stdbool_h
21345 #include <stdbool.h>
21346 #endif
21347
21348 #endif
21349
21350 int main(void)
21351 {
21352         FILE *fp = fopen("cf_test.out", "w");
21353         if (fp != 0) {
21354                 bool x = true;
21355                 if ((bool)(-x) >= 0)
21356                         fputs("unsigned ", fp);
21357                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21358                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21359                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21360                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21361                 fclose(fp);
21362         }
21363         ${cf_cv_main_return:-return}(0);
21364 }
21365
21366 _ACEOF
21367 rm -f conftest$ac_exeext
21368 if { (eval echo "$as_me:21368: \"$ac_link\"") >&5
21369   (eval $ac_link) 2>&5
21370   ac_status=$?
21371   echo "$as_me:21371: \$? = $ac_status" >&5
21372   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21373   { (eval echo "$as_me:21373: \"$ac_try\"") >&5
21374   (eval $ac_try) 2>&5
21375   ac_status=$?
21376   echo "$as_me:21376: \$? = $ac_status" >&5
21377   (exit $ac_status); }; }; then
21378   cf_cv_type_of_bool=`cat cf_test.out`
21379                  if test -z "$cf_cv_type_of_bool"; then
21380                    cf_cv_type_of_bool=unknown
21381                  fi
21382 else
21383   echo "$as_me: program exited with status $ac_status" >&5
21384 echo "$as_me: failed program was:" >&5
21385 cat conftest.$ac_ext >&5
21386 cf_cv_type_of_bool=unknown
21387 fi
21388 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21389 fi
21390
21391 fi
21392
21393         rm -f cf_test.out
21394 echo "$as_me:21394: result: $cf_cv_type_of_bool" >&5
21395 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21396 if test "$cf_cv_type_of_bool" = unknown ; then
21397         case .$NCURSES_BOOL in
21398         (.auto|.) NCURSES_BOOL=unsigned;;
21399         esac
21400         { echo "$as_me:21400: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21401 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21402         cf_cv_type_of_bool=$NCURSES_BOOL
21403 fi
21404
21405                 else
21406                         echo "$as_me:21406: checking for fallback type of bool" >&5
21407 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21408                         case "$host_cpu" in
21409                         (i?86)  cf_cv_type_of_bool=char ;;
21410                         (*)     cf_cv_type_of_bool=int  ;;
21411                         esac
21412                         echo "$as_me:21412: result: $cf_cv_type_of_bool" >&5
21413 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21414                 fi
21415         fi
21416 fi
21417
21418 # If the C compiler did not declare bool, and we did not determine that the C++
21419 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21420 # ncurses library use the same type as C++ bool.  Note that this allows one to
21421 # specify the type of bool in a configure-script option and postpone
21422 # integration with the C++ compiler provided that the types are compatible.
21423 USE_CXX_BOOL=1
21424 if test $cf_cv_cc_bool_type = 1
21425 then
21426         # oops: C has a bool.  Unlikely, but C++ could differ.
21427         USE_CXX_BOOL=0
21428 elif test $cf_cv_builtin_bool = 0
21429 then
21430         # C++ has no bool
21431         USE_CXX_BOOL=0
21432 else
21433         # this is the normal case
21434         USE_CXX_BOOL='defined(__cplusplus)'
21435 fi
21436
21437 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21438
21439         if test "$cf_with_ada" != "no" ; then
21440                 if test "$with_libtool" != "no"; then
21441                         { echo "$as_me:21441: WARNING: libtool does not support Ada - disabling feature" >&5
21442 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21443                         cf_with_ada=no
21444                 fi
21445         fi
21446
21447         if test "$cf_with_ada" != "no" ; then
21448
21449 cf_ada_make=gnatmake
21450 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21451 set dummy $cf_ada_make; ac_word=$2
21452 echo "$as_me:21452: checking for $ac_word" >&5
21453 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21454 if test "${ac_cv_prog_gnat_exists+set}" = set; then
21455   echo $ECHO_N "(cached) $ECHO_C" >&6
21456 else
21457   if test -n "$gnat_exists"; then
21458   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
21459 else
21460   ac_save_IFS=$IFS; IFS=$ac_path_separator
21461 ac_dummy="$PATH"
21462 for ac_dir in $ac_dummy; do
21463   IFS=$ac_save_IFS
21464   test -z "$ac_dir" && ac_dir=.
21465   $as_executable_p "$ac_dir/$ac_word" || continue
21466 ac_cv_prog_gnat_exists="yes"
21467 echo "$as_me:21467: found $ac_dir/$ac_word" >&5
21468 break
21469 done
21470
21471   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
21472 fi
21473 fi
21474 gnat_exists=$ac_cv_prog_gnat_exists
21475 if test -n "$gnat_exists"; then
21476   echo "$as_me:21476: result: $gnat_exists" >&5
21477 echo "${ECHO_T}$gnat_exists" >&6
21478 else
21479   echo "$as_me:21479: result: no" >&5
21480 echo "${ECHO_T}no" >&6
21481 fi
21482
21483 if test "$ac_cv_prog_gnat_exists" = no; then
21484         cf_ada_make=
21485         cf_cv_prog_gnat_correct=no
21486 else
21487
21488 echo "$as_me:21488: checking for gnat version" >&5
21489 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21490 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21491         grep '[0-9].[0-9][0-9]*' |\
21492         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21493 echo "$as_me:21493: result: $cf_gnat_version" >&5
21494 echo "${ECHO_T}$cf_gnat_version" >&6
21495
21496 case $cf_gnat_version in
21497 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21498         cf_cv_prog_gnat_correct=yes
21499         ;;
21500 (*)
21501         { echo "$as_me:21501: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21502 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21503         cf_cv_prog_gnat_correct=no
21504         ;;
21505 esac
21506
21507         # Extract the first word of "m4", so it can be a program name with args.
21508 set dummy m4; ac_word=$2
21509 echo "$as_me:21509: checking for $ac_word" >&5
21510 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21511 if test "${ac_cv_prog_M4_exists+set}" = set; then
21512   echo $ECHO_N "(cached) $ECHO_C" >&6
21513 else
21514   if test -n "$M4_exists"; then
21515   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21516 else
21517   ac_save_IFS=$IFS; IFS=$ac_path_separator
21518 ac_dummy="$PATH"
21519 for ac_dir in $ac_dummy; do
21520   IFS=$ac_save_IFS
21521   test -z "$ac_dir" && ac_dir=.
21522   $as_executable_p "$ac_dir/$ac_word" || continue
21523 ac_cv_prog_M4_exists="yes"
21524 echo "$as_me:21524: found $ac_dir/$ac_word" >&5
21525 break
21526 done
21527
21528   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21529 fi
21530 fi
21531 M4_exists=$ac_cv_prog_M4_exists
21532 if test -n "$M4_exists"; then
21533   echo "$as_me:21533: result: $M4_exists" >&5
21534 echo "${ECHO_T}$M4_exists" >&6
21535 else
21536   echo "$as_me:21536: result: no" >&5
21537 echo "${ECHO_T}no" >&6
21538 fi
21539
21540         if test "$ac_cv_prog_M4_exists" = no; then
21541                 cf_cv_prog_gnat_correct=no
21542                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21543         fi
21544         if test "$cf_cv_prog_gnat_correct" = yes; then
21545                 echo "$as_me:21545: checking if GNAT works" >&5
21546 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21547
21548 rm -rf conftest* *~conftest*
21549 cat >>conftest.ads <<CF_EOF
21550 procedure conftest;
21551 CF_EOF
21552 cat >>conftest.adb <<CF_EOF
21553 with Text_IO;
21554 with GNAT.OS_Lib;
21555 procedure conftest is
21556 begin
21557    Text_IO.Put ("Hello World");
21558    Text_IO.New_Line;
21559    GNAT.OS_Lib.OS_Exit (0);
21560 end conftest;
21561 CF_EOF
21562 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21563    if ( ./conftest 1>&5 2>&1 ) ; then
21564       cf_cv_prog_gnat_correct=yes
21565    else
21566       cf_cv_prog_gnat_correct=no
21567    fi
21568 else
21569    cf_cv_prog_gnat_correct=no
21570 fi
21571 rm -rf conftest* *~conftest*
21572
21573                 echo "$as_me:21573: result: $cf_cv_prog_gnat_correct" >&5
21574 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21575         fi
21576 fi
21577
21578                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21579
21580         ADAFLAGS="$ADAFLAGS -gnatpn"
21581
21582         echo "$as_me:21582: checking optimization options for ADAFLAGS" >&5
21583 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21584         case "$CFLAGS" in
21585         (*-g*)
21586
21587         ADAFLAGS="$ADAFLAGS -g"
21588
21589                 ;;
21590         esac
21591         case "$CFLAGS" in
21592         (*-O*)
21593                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21594
21595         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21596
21597                 ;;
21598         esac
21599         echo "$as_me:21599: result: $ADAFLAGS" >&5
21600 echo "${ECHO_T}$ADAFLAGS" >&6
21601
21602 echo "$as_me:21602: checking if GNATPREP supports -T option" >&5
21603 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21604 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21605   echo $ECHO_N "(cached) $ECHO_C" >&6
21606 else
21607
21608 cf_cv_gnatprep_opt_t=no
21609 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21610
21611 fi
21612 echo "$as_me:21612: result: $cf_cv_gnatprep_opt_t" >&5
21613 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21614 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21615
21616 echo "$as_me:21616: checking if GNAT supports generics" >&5
21617 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21618 case $cf_gnat_version in
21619 (3.[1-9]*|[4-9].*)
21620         cf_gnat_generics=yes
21621         ;;
21622 (*)
21623         cf_gnat_generics=no
21624         ;;
21625 esac
21626 echo "$as_me:21626: result: $cf_gnat_generics" >&5
21627 echo "${ECHO_T}$cf_gnat_generics" >&6
21628
21629 if test "$cf_gnat_generics" = yes
21630 then
21631         cf_compile_generics=generics
21632         cf_generic_objects="\${GENOBJS}"
21633 else
21634         cf_compile_generics=
21635         cf_generic_objects=
21636 fi
21637
21638 echo "$as_me:21638: checking if GNAT supports SIGINT" >&5
21639 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21640 if test "${cf_cv_gnat_sigint+set}" = set; then
21641   echo $ECHO_N "(cached) $ECHO_C" >&6
21642 else
21643
21644 rm -rf conftest* *~conftest*
21645 cat >>conftest.ads <<CF_EOF
21646 with Ada.Interrupts.Names;
21647
21648 package ConfTest is
21649
21650    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21651    pragma Unreserve_All_Interrupts;
21652    pragma Warnings (On);
21653
21654    protected Process is
21655       procedure Stop;
21656       function Continue return Boolean;
21657       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21658    private
21659       Done : Boolean := False;
21660    end Process;
21661
21662 end ConfTest;
21663 CF_EOF
21664 cat >>conftest.adb <<CF_EOF
21665 package body ConfTest is
21666    protected body Process is
21667       procedure Stop is
21668       begin
21669          Done := True;
21670       end Stop;
21671       function Continue return Boolean is
21672       begin
21673          return not Done;
21674       end Continue;
21675    end Process;
21676 end ConfTest;
21677 CF_EOF
21678 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21679       cf_cv_gnat_sigint=yes
21680 else
21681    cf_cv_gnat_sigint=no
21682 fi
21683 rm -rf conftest* *~conftest*
21684
21685 fi
21686 echo "$as_me:21686: result: $cf_cv_gnat_sigint" >&5
21687 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21688
21689 if test $cf_cv_gnat_sigint = yes ; then
21690         USE_GNAT_SIGINT=""
21691 else
21692         USE_GNAT_SIGINT="#"
21693 fi
21694
21695 cf_gnat_libraries=no
21696 cf_gnat_projects=no
21697
21698 if test "$enable_gnat_projects" != no ; then
21699 echo "$as_me:21699: checking if GNAT supports project files" >&5
21700 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21701 case $cf_gnat_version in
21702 (3.[0-9]*)
21703         ;;
21704 (*)
21705         case $cf_cv_system_name in
21706         (cygwin*|msys*)
21707                 ;;
21708         (*)
21709                 mkdir conftest.src conftest.bin conftest.lib
21710                 cd conftest.src
21711                 rm -rf conftest* *~conftest*
21712                 cat >>library.gpr <<CF_EOF
21713 project Library is
21714   Kind := External ("LIB_KIND");
21715   for Library_Name use "ConfTest";
21716   for Object_Dir use ".";
21717   for Library_ALI_Dir use External("LIBRARY_DIR");
21718   for Library_Version use External ("SONAME");
21719   for Library_Kind use Kind;
21720   for Library_Dir use External("BUILD_DIR");
21721   Source_Dir := External ("SOURCE_DIR");
21722   for Source_Dirs use (Source_Dir);
21723 end Library;
21724 CF_EOF
21725                 cat >>confpackage.ads <<CF_EOF
21726 package ConfPackage is
21727    procedure conftest;
21728 end ConfPackage;
21729 CF_EOF
21730                 cat >>confpackage.adb <<CF_EOF
21731 with Text_IO;
21732 package body ConfPackage is
21733    procedure conftest is
21734    begin
21735       Text_IO.Put ("Hello World");
21736       Text_IO.New_Line;
21737    end conftest;
21738 end ConfPackage;
21739 CF_EOF
21740                 if ( $cf_ada_make $ADAFLAGS \
21741                                 -Plibrary.gpr \
21742                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21743                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21744                                 -XSOURCE_DIR=`pwd` \
21745                                 -XSONAME=libConfTest.so.1 \
21746                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21747                         cf_gnat_projects=yes
21748                 fi
21749                 cd ..
21750                 if test -f conftest.lib/confpackage.ali
21751                 then
21752                         cf_gnat_libraries=yes
21753                 fi
21754                 rm -rf conftest* *~conftest*
21755                 ;;
21756         esac
21757         ;;
21758 esac
21759 echo "$as_me:21759: result: $cf_gnat_projects" >&5
21760 echo "${ECHO_T}$cf_gnat_projects" >&6
21761 fi # enable_gnat_projects
21762
21763 if test $cf_gnat_projects = yes
21764 then
21765         echo "$as_me:21765: checking if GNAT supports libraries" >&5
21766 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21767         echo "$as_me:21767: result: $cf_gnat_libraries" >&5
21768 echo "${ECHO_T}$cf_gnat_libraries" >&6
21769 fi
21770
21771 if test "$cf_gnat_projects" = yes
21772 then
21773         USE_OLD_MAKERULES="#"
21774         USE_GNAT_PROJECTS=""
21775 else
21776         USE_OLD_MAKERULES=""
21777         USE_GNAT_PROJECTS="#"
21778 fi
21779
21780 if test "$cf_gnat_libraries" = yes
21781 then
21782         USE_GNAT_LIBRARIES=""
21783 else
21784         USE_GNAT_LIBRARIES="#"
21785 fi
21786
21787 echo "$as_me:21787: checking for ada-compiler" >&5
21788 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21789
21790 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21791 if test "${with_ada_compiler+set}" = set; then
21792   withval="$with_ada_compiler"
21793   cf_ada_compiler=$withval
21794 else
21795   cf_ada_compiler=gnatmake
21796 fi;
21797
21798 echo "$as_me:21798: result: $cf_ada_compiler" >&5
21799 echo "${ECHO_T}$cf_ada_compiler" >&6
21800
21801                         cf_ada_package=terminal_interface
21802
21803 echo "$as_me:21803: checking for ada-include" >&5
21804 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21805
21806 # Check whether --with-ada-include or --without-ada-include was given.
21807 if test "${with_ada_include+set}" = set; then
21808   withval="$with_ada_include"
21809
21810 else
21811   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21812 fi; if test -n "$prefix/share/ada/adainclude" ; then
21813
21814 if test "x$prefix" != xNONE; then
21815         cf_path_syntax="$prefix"
21816 else
21817         cf_path_syntax="$ac_default_prefix"
21818 fi
21819
21820 case ".$withval" in
21821 (.\$\(*\)*|.\'*\'*)
21822         ;;
21823 (..|./*|.\\*)
21824         ;;
21825 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21826         ;;
21827 (.\${*prefix}*|.\${*dir}*)
21828         eval withval="$withval"
21829         case ".$withval" in
21830         (.NONE/*)
21831                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21832                 ;;
21833         esac
21834         ;;
21835 (.no|.NONE/*)
21836         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21837         ;;
21838 (*)
21839         { { echo "$as_me:21839: error: expected a pathname, not \"$withval\"" >&5
21840 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21841    { (exit 1); exit 1; }; }
21842         ;;
21843 esac
21844
21845 fi
21846 eval ADA_INCLUDE="$withval"
21847
21848 echo "$as_me:21848: result: $ADA_INCLUDE" >&5
21849 echo "${ECHO_T}$ADA_INCLUDE" >&6
21850
21851 echo "$as_me:21851: checking for ada-objects" >&5
21852 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21853
21854 # Check whether --with-ada-objects or --without-ada-objects was given.
21855 if test "${with_ada_objects+set}" = set; then
21856   withval="$with_ada_objects"
21857
21858 else
21859   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21860 fi; if test -n "$prefix/lib/ada/adalib" ; then
21861
21862 if test "x$prefix" != xNONE; then
21863         cf_path_syntax="$prefix"
21864 else
21865         cf_path_syntax="$ac_default_prefix"
21866 fi
21867
21868 case ".$withval" in
21869 (.\$\(*\)*|.\'*\'*)
21870         ;;
21871 (..|./*|.\\*)
21872         ;;
21873 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21874         ;;
21875 (.\${*prefix}*|.\${*dir}*)
21876         eval withval="$withval"
21877         case ".$withval" in
21878         (.NONE/*)
21879                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21880                 ;;
21881         esac
21882         ;;
21883 (.no|.NONE/*)
21884         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21885         ;;
21886 (*)
21887         { { echo "$as_me:21887: error: expected a pathname, not \"$withval\"" >&5
21888 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21889    { (exit 1); exit 1; }; }
21890         ;;
21891 esac
21892
21893 fi
21894 eval ADA_OBJECTS="$withval"
21895
21896 echo "$as_me:21896: result: $ADA_OBJECTS" >&5
21897 echo "${ECHO_T}$ADA_OBJECTS" >&6
21898
21899 echo "$as_me:21899: checking if an Ada95 shared-library should be built" >&5
21900 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21901
21902 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21903 if test "${with_ada_sharedlib+set}" = set; then
21904   withval="$with_ada_sharedlib"
21905   with_ada_sharedlib=$withval
21906 else
21907   with_ada_sharedlib=no
21908 fi;
21909 echo "$as_me:21909: result: $with_ada_sharedlib" >&5
21910 echo "${ECHO_T}$with_ada_sharedlib" >&6
21911
21912 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21913 MAKE_ADA_SHAREDLIB="#"
21914
21915 if test "x$with_ada_sharedlib" != xno
21916 then
21917         MAKE_ADA_SHAREDLIB=
21918         if test "x$with_ada_sharedlib" != xyes
21919         then
21920                 ADA_SHAREDLIB="$with_ada_sharedlib"
21921         fi
21922 fi
21923
21924                 fi
21925         fi
21926 else
21927         cf_with_ada=no
21928 fi
21929
21930 # do this "late" to avoid conflict with header-checks
21931 if test "x$with_widec" = xyes ; then
21932         echo "$as_me:21932: checking for wchar_t" >&5
21933 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21934 if test "${ac_cv_type_wchar_t+set}" = set; then
21935   echo $ECHO_N "(cached) $ECHO_C" >&6
21936 else
21937   cat >conftest.$ac_ext <<_ACEOF
21938 #line 21938 "configure"
21939 #include "confdefs.h"
21940 $ac_includes_default
21941 int
21942 main ()
21943 {
21944 if ((wchar_t *) 0)
21945   return 0;
21946 if (sizeof (wchar_t))
21947   return 0;
21948   ;
21949   return 0;
21950 }
21951 _ACEOF
21952 rm -f conftest.$ac_objext
21953 if { (eval echo "$as_me:21953: \"$ac_compile\"") >&5
21954   (eval $ac_compile) 2>&5
21955   ac_status=$?
21956   echo "$as_me:21956: \$? = $ac_status" >&5
21957   (exit $ac_status); } &&
21958          { ac_try='test -s conftest.$ac_objext'
21959   { (eval echo "$as_me:21959: \"$ac_try\"") >&5
21960   (eval $ac_try) 2>&5
21961   ac_status=$?
21962   echo "$as_me:21962: \$? = $ac_status" >&5
21963   (exit $ac_status); }; }; then
21964   ac_cv_type_wchar_t=yes
21965 else
21966   echo "$as_me: failed program was:" >&5
21967 cat conftest.$ac_ext >&5
21968 ac_cv_type_wchar_t=no
21969 fi
21970 rm -f conftest.$ac_objext conftest.$ac_ext
21971 fi
21972 echo "$as_me:21972: result: $ac_cv_type_wchar_t" >&5
21973 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21974
21975 echo "$as_me:21975: checking size of wchar_t" >&5
21976 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21977 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21978   echo $ECHO_N "(cached) $ECHO_C" >&6
21979 else
21980   if test "$ac_cv_type_wchar_t" = yes; then
21981   if test "$cross_compiling" = yes; then
21982   # Depending upon the size, compute the lo and hi bounds.
21983 cat >conftest.$ac_ext <<_ACEOF
21984 #line 21984 "configure"
21985 #include "confdefs.h"
21986 $ac_includes_default
21987 int
21988 main ()
21989 {
21990 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21991   ;
21992   return 0;
21993 }
21994 _ACEOF
21995 rm -f conftest.$ac_objext
21996 if { (eval echo "$as_me:21996: \"$ac_compile\"") >&5
21997   (eval $ac_compile) 2>&5
21998   ac_status=$?
21999   echo "$as_me:21999: \$? = $ac_status" >&5
22000   (exit $ac_status); } &&
22001          { ac_try='test -s conftest.$ac_objext'
22002   { (eval echo "$as_me:22002: \"$ac_try\"") >&5
22003   (eval $ac_try) 2>&5
22004   ac_status=$?
22005   echo "$as_me:22005: \$? = $ac_status" >&5
22006   (exit $ac_status); }; }; then
22007   ac_lo=0 ac_mid=0
22008   while :; do
22009     cat >conftest.$ac_ext <<_ACEOF
22010 #line 22010 "configure"
22011 #include "confdefs.h"
22012 $ac_includes_default
22013 int
22014 main ()
22015 {
22016 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22017   ;
22018   return 0;
22019 }
22020 _ACEOF
22021 rm -f conftest.$ac_objext
22022 if { (eval echo "$as_me:22022: \"$ac_compile\"") >&5
22023   (eval $ac_compile) 2>&5
22024   ac_status=$?
22025   echo "$as_me:22025: \$? = $ac_status" >&5
22026   (exit $ac_status); } &&
22027          { ac_try='test -s conftest.$ac_objext'
22028   { (eval echo "$as_me:22028: \"$ac_try\"") >&5
22029   (eval $ac_try) 2>&5
22030   ac_status=$?
22031   echo "$as_me:22031: \$? = $ac_status" >&5
22032   (exit $ac_status); }; }; then
22033   ac_hi=$ac_mid; break
22034 else
22035   echo "$as_me: failed program was:" >&5
22036 cat conftest.$ac_ext >&5
22037 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22038 fi
22039 rm -f conftest.$ac_objext conftest.$ac_ext
22040   done
22041 else
22042   echo "$as_me: failed program was:" >&5
22043 cat conftest.$ac_ext >&5
22044 ac_hi=-1 ac_mid=-1
22045   while :; do
22046     cat >conftest.$ac_ext <<_ACEOF
22047 #line 22047 "configure"
22048 #include "confdefs.h"
22049 $ac_includes_default
22050 int
22051 main ()
22052 {
22053 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
22054   ;
22055   return 0;
22056 }
22057 _ACEOF
22058 rm -f conftest.$ac_objext
22059 if { (eval echo "$as_me:22059: \"$ac_compile\"") >&5
22060   (eval $ac_compile) 2>&5
22061   ac_status=$?
22062   echo "$as_me:22062: \$? = $ac_status" >&5
22063   (exit $ac_status); } &&
22064          { ac_try='test -s conftest.$ac_objext'
22065   { (eval echo "$as_me:22065: \"$ac_try\"") >&5
22066   (eval $ac_try) 2>&5
22067   ac_status=$?
22068   echo "$as_me:22068: \$? = $ac_status" >&5
22069   (exit $ac_status); }; }; then
22070   ac_lo=$ac_mid; break
22071 else
22072   echo "$as_me: failed program was:" >&5
22073 cat conftest.$ac_ext >&5
22074 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
22075 fi
22076 rm -f conftest.$ac_objext conftest.$ac_ext
22077   done
22078 fi
22079 rm -f conftest.$ac_objext conftest.$ac_ext
22080 # Binary search between lo and hi bounds.
22081 while test "x$ac_lo" != "x$ac_hi"; do
22082   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22083   cat >conftest.$ac_ext <<_ACEOF
22084 #line 22084 "configure"
22085 #include "confdefs.h"
22086 $ac_includes_default
22087 int
22088 main ()
22089 {
22090 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22091   ;
22092   return 0;
22093 }
22094 _ACEOF
22095 rm -f conftest.$ac_objext
22096 if { (eval echo "$as_me:22096: \"$ac_compile\"") >&5
22097   (eval $ac_compile) 2>&5
22098   ac_status=$?
22099   echo "$as_me:22099: \$? = $ac_status" >&5
22100   (exit $ac_status); } &&
22101          { ac_try='test -s conftest.$ac_objext'
22102   { (eval echo "$as_me:22102: \"$ac_try\"") >&5
22103   (eval $ac_try) 2>&5
22104   ac_status=$?
22105   echo "$as_me:22105: \$? = $ac_status" >&5
22106   (exit $ac_status); }; }; then
22107   ac_hi=$ac_mid
22108 else
22109   echo "$as_me: failed program was:" >&5
22110 cat conftest.$ac_ext >&5
22111 ac_lo=`expr $ac_mid + 1`
22112 fi
22113 rm -f conftest.$ac_objext conftest.$ac_ext
22114 done
22115 ac_cv_sizeof_wchar_t=$ac_lo
22116 else
22117   if test "$cross_compiling" = yes; then
22118   { { echo "$as_me:22118: error: cannot run test program while cross compiling" >&5
22119 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22120    { (exit 1); exit 1; }; }
22121 else
22122   cat >conftest.$ac_ext <<_ACEOF
22123 #line 22123 "configure"
22124 #include "confdefs.h"
22125 $ac_includes_default
22126 int
22127 main ()
22128 {
22129 FILE *f = fopen ("conftest.val", "w");
22130 if (!f)
22131   $ac_main_return (1);
22132 fprintf (f, "%d", (sizeof (wchar_t)));
22133 fclose (f);
22134   ;
22135   return 0;
22136 }
22137 _ACEOF
22138 rm -f conftest$ac_exeext
22139 if { (eval echo "$as_me:22139: \"$ac_link\"") >&5
22140   (eval $ac_link) 2>&5
22141   ac_status=$?
22142   echo "$as_me:22142: \$? = $ac_status" >&5
22143   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22144   { (eval echo "$as_me:22144: \"$ac_try\"") >&5
22145   (eval $ac_try) 2>&5
22146   ac_status=$?
22147   echo "$as_me:22147: \$? = $ac_status" >&5
22148   (exit $ac_status); }; }; then
22149   ac_cv_sizeof_wchar_t=`cat conftest.val`
22150 else
22151   echo "$as_me: program exited with status $ac_status" >&5
22152 echo "$as_me: failed program was:" >&5
22153 cat conftest.$ac_ext >&5
22154 fi
22155 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22156 fi
22157 fi
22158 rm -f conftest.val
22159 else
22160   ac_cv_sizeof_wchar_t=0
22161 fi
22162 fi
22163 echo "$as_me:22163: result: $ac_cv_sizeof_wchar_t" >&5
22164 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22165 cat >>confdefs.h <<EOF
22166 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22167 EOF
22168
22169 fi
22170
22171 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22172 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22173 ###
22174 ### ticlib modules may be a separate library, otherwise contained in termlib.
22175 ### termlib modules may be a separate library, otherwise contained in ncurses.
22176 ###
22177 ### The of "+" or " " between the tokens controls the way the script
22178 ### chooses to split module lists into libraries.
22179 ###
22180 ### (see CF_LIB_RULES).
22181 echo "$as_me:22181: checking for library subsets" >&5
22182 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22183 LIB_SUBSETS=
22184
22185 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22186         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22187         if test "$with_ticlib" != no ; then
22188                 LIB_SUBSETS="${LIB_SUBSETS} "
22189         else
22190                 LIB_SUBSETS="${LIB_SUBSETS}+"
22191         fi
22192 fi
22193
22194 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22195 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22196
22197 if test "$with_termlib" != no ; then
22198         LIB_SUBSETS="${LIB_SUBSETS} "
22199 else
22200         LIB_SUBSETS="${LIB_SUBSETS}+"
22201 fi
22202
22203 LIB_SUBSETS="${LIB_SUBSETS}base"
22204
22205 # Most term-driver calls are to tinfo, but some like init_pair are to the
22206 # base library (so it resides in base).
22207 if test "$with_term_driver" != no ; then
22208         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22209         case $cf_cv_system_name in
22210         (*mingw32*|*mingw64*)
22211                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22212                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22213                 ;;
22214         (*)
22215                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22216                 ;;
22217         esac
22218 fi
22219
22220 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22221 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22222
22223 echo "$as_me:22223: result: $LIB_SUBSETS" >&5
22224 echo "${ECHO_T}$LIB_SUBSETS" >&6
22225
22226 ### Construct the list of include-directories to be generated
22227
22228 if test "$srcdir" != "."; then
22229         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22230 fi
22231 CPPFLAGS="-I../include $CPPFLAGS"
22232 if test "$srcdir" != "."; then
22233         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22234 fi
22235 CPPFLAGS="-I. $CPPFLAGS"
22236
22237 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22238 if test "$srcdir" != "."; then
22239         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22240 fi
22241 if test "$GCC" != yes; then
22242         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22243 elif test "$includedir" != "/usr/include"; then
22244         if test "$includedir" = '${prefix}/include' ; then
22245                 if test x$prefix != x/usr ; then
22246                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22247                 fi
22248         else
22249                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22250         fi
22251 fi
22252
22253 ### Build up pieces for makefile rules
22254 echo "$as_me:22254: checking default library suffix" >&5
22255 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22256
22257         case $DFT_LWR_MODEL in
22258         (libtool) DFT_ARG_SUFFIX=''   ;;
22259         (normal)  DFT_ARG_SUFFIX=''   ;;
22260         (debug)   DFT_ARG_SUFFIX='_g' ;;
22261         (profile) DFT_ARG_SUFFIX='_p' ;;
22262         (shared)  DFT_ARG_SUFFIX=''   ;;
22263         esac
22264         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22265 echo "$as_me:22265: result: $DFT_ARG_SUFFIX" >&5
22266 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22267
22268 echo "$as_me:22268: checking default library-dependency suffix" >&5
22269 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22270
22271         case X$DFT_LWR_MODEL in
22272         (Xlibtool)
22273                 DFT_LIB_SUFFIX='.la'
22274                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22275                 ;;
22276         (Xdebug)
22277                 DFT_LIB_SUFFIX='_g.a'
22278                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22279                 ;;
22280         (Xprofile)
22281                 DFT_LIB_SUFFIX='_p.a'
22282                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22283                 ;;
22284         (Xshared)
22285                 case $cf_cv_system_name in
22286                 (aix[5-7]*)
22287                         DFT_LIB_SUFFIX='.so'
22288                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22289                         ;;
22290                 (cygwin*|msys*|mingw*)
22291                         DFT_LIB_SUFFIX='.dll'
22292                         DFT_DEP_SUFFIX='.dll.a'
22293                         ;;
22294                 (darwin*)
22295                         DFT_LIB_SUFFIX='.dylib'
22296                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22297                         ;;
22298                 (hpux*)
22299                         case $target in
22300                         (ia64*)
22301                                 DFT_LIB_SUFFIX='.so'
22302                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22303                                 ;;
22304                         (*)
22305                                 DFT_LIB_SUFFIX='.sl'
22306                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22307                                 ;;
22308                         esac
22309                         ;;
22310                 (*)
22311                         DFT_LIB_SUFFIX='.so'
22312                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22313                         ;;
22314                 esac
22315                 ;;
22316         (*)
22317                 DFT_LIB_SUFFIX='.a'
22318                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22319                 ;;
22320         esac
22321         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22322         then
22323                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22324                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22325         fi
22326 echo "$as_me:22326: result: $DFT_DEP_SUFFIX" >&5
22327 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22328
22329 echo "$as_me:22329: checking default object directory" >&5
22330 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22331
22332         case $DFT_LWR_MODEL in
22333         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22334         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22335         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22336         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22337         (shared)
22338                 case $cf_cv_system_name in
22339                 (cygwin|msys)
22340                         DFT_OBJ_SUBDIR='objects' ;;
22341                 (*)
22342                         DFT_OBJ_SUBDIR='obj_s' ;;
22343                 esac
22344         esac
22345 echo "$as_me:22345: result: $DFT_OBJ_SUBDIR" >&5
22346 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22347
22348 if test "x$cf_with_cxx" = xyes ; then
22349 echo "$as_me:22349: checking c++ library-dependency suffix" >&5
22350 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22351 if test "$with_libtool" != "no"; then
22352         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22353         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22354 elif test "$with_shared_cxx" != "no"; then
22355         # also for g++ users...
22356         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22357 else
22358         # we normally make a static library because C/C++ library rules differ
22359
22360         case Xnormal in
22361         (Xlibtool)
22362                 CXX_LIB_SUFFIX='.la'
22363                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22364                 ;;
22365         (Xdebug)
22366                 CXX_LIB_SUFFIX='_g.a'
22367                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22368                 ;;
22369         (Xprofile)
22370                 CXX_LIB_SUFFIX='_p.a'
22371                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22372                 ;;
22373         (Xshared)
22374                 case $cf_cv_system_name in
22375                 (aix[5-7]*)
22376                         CXX_LIB_SUFFIX='.so'
22377                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22378                         ;;
22379                 (cygwin*|msys*|mingw*)
22380                         CXX_LIB_SUFFIX='.dll'
22381                         CXX_DEP_SUFFIX='.dll.a'
22382                         ;;
22383                 (darwin*)
22384                         CXX_LIB_SUFFIX='.dylib'
22385                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22386                         ;;
22387                 (hpux*)
22388                         case $target in
22389                         (ia64*)
22390                                 CXX_LIB_SUFFIX='.so'
22391                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22392                                 ;;
22393                         (*)
22394                                 CXX_LIB_SUFFIX='.sl'
22395                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22396                                 ;;
22397                         esac
22398                         ;;
22399                 (*)
22400                         CXX_LIB_SUFFIX='.so'
22401                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22402                         ;;
22403                 esac
22404                 ;;
22405         (*)
22406                 CXX_LIB_SUFFIX='.a'
22407                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22408                 ;;
22409         esac
22410         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22411         then
22412                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22413                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22414         fi
22415
22416 fi
22417 echo "$as_me:22417: result: $CXX_LIB_SUFFIX" >&5
22418 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22419
22420 fi
22421
22422 # do not want -ldl in build except as needed for -lncurses dependency
22423 if test "x$with_dlsym" = xyes ; then
22424 if test $DFT_LWR_MODEL = shared || \
22425    test $DFT_LWR_MODEL = libtool ; then
22426
22427 # remove dl library from $LIBS
22428 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
22429
22430 fi
22431 fi
22432 ### Set up low-level terminfo dependencies for makefiles.
22433
22434 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
22435 # do not need libdl
22436 TICS_LIST=
22437 if test "x$with_dlsym" = xyes ; then
22438
22439 # remove dl library from $SHLIB_LIST
22440 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
22441
22442 fi
22443
22444 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
22445 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
22446 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
22447 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
22448 then
22449         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
22450 fi
22451
22452 if test "$with_ticlib" != no ; then
22453
22454         if test "x$with_ticlib" != xyes ; then
22455                 TICS_NAME=$with_ticlib
22456                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22457                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22458                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22459                 TICS_LIB_SUFFIX="${with_ticlib}"
22460         else
22461                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
22462                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
22463                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
22464                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
22465         fi
22466         TICS_LDFLAGS="-L${LIB_DIR}"
22467         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22468 else
22469         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22470         TICS_LDFLAGS="-L${LIB_DIR}"
22471         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22472 fi
22473
22474 if test "$with_termlib" != no ; then
22475
22476         if test "x$with_termlib" != xyes ; then
22477                 TINFO_NAME=$with_termlib
22478                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22479                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22480                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22481                 TINFO_LIB_SUFFIX="${with_termlib}"
22482         else
22483                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22484                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22485                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22486                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22487         fi
22488
22489         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22490         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22491         if test "$DFT_LWR_MODEL" = "libtool"; then
22492                 TEST_ARGS="${TEST_DEPS}"
22493                 TEST_ARG2="${TEST_DEP2}"
22494                 TINFO_LDFLAGS="-L${LIB_DIR}"
22495                 TINFO_LIBS="$TEST_ARGS"
22496                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22497                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22498         else
22499                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22500                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22501                 if test "x$with_term_driver" != xno ; then
22502                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22503                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22504                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22505                 else
22506                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22507                         TINFO_LIBS="$TEST_ARGS"
22508                 fi
22509                 TINFO_LDFLAGS="-L${LIB_DIR}"
22510                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22511         fi
22512 else
22513         # the next lines are needed for linking libtic over libncurses
22514         TINFO_NAME=${LIB_NAME}
22515         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22516         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22517         if test "x$with_tic_depends" = xyes ; then
22518                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22519         else
22520                 TICS_LIST="$SHLIB_LIST"
22521         fi
22522
22523         TINFO_LDFLAGS="-L${LIB_DIR}"
22524         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22525 fi
22526
22527 if test "$DFT_LWR_MODEL" = shared ; then
22528         case $cf_cv_system_name in
22529         (cygwin*|msys*)
22530                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22531                 TINFO_SUFFIX=.dll
22532                 ;;
22533         esac
22534 fi
22535
22536 if test "x$with_dlsym" = xyes ; then
22537
22538 # remove dl library from $TICS_LIST
22539 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22540
22541 fi
22542
22543 if test "$DFT_LWR_MODEL" = "libtool"; then
22544         OBJEXT=lo
22545 fi
22546
22547 # needed for Ada95
22548 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22549
22550 case $DFT_LWR_MODEL in
22551 (normal|debug|profile)
22552
22553 if test "$GCC" = yes ; then
22554         case $cf_cv_system_name in
22555         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22556                 LDFLAGS_STATIC=
22557                 LDFLAGS_SHARED=
22558                 ;;
22559         (*)     # normally, except when broken
22560                 LDFLAGS_STATIC=-static
22561                 LDFLAGS_SHARED=-dynamic
22562                 ;;
22563         esac
22564 else
22565         case $cf_cv_system_name in
22566         (aix[4-7]*)     # from ld manpage
22567                 LDFLAGS_STATIC=-bstatic
22568                 LDFLAGS_SHARED=-bdynamic
22569                 ;;
22570         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22571                 # We could also use just "archive" and "shared".
22572                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22573                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22574                 ;;
22575         (irix*)         # from ld manpage IRIX64
22576                 LDFLAGS_STATIC=-Bstatic
22577                 LDFLAGS_SHARED=-Bdynamic
22578                 ;;
22579         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22580                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22581                 LDFLAGS_STATIC=-noso
22582                 LDFLAGS_SHARED=-so_archive
22583                 ;;
22584         (solaris2*)
22585                 LDFLAGS_STATIC=-Bstatic
22586                 LDFLAGS_SHARED=-Bdynamic
22587                 ;;
22588         esac
22589 fi
22590
22591 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22592 then
22593         echo "$as_me:22593: checking if linker supports switching between static/dynamic" >&5
22594 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22595
22596         rm -f libconftest.a
22597         cat >conftest.$ac_ext <<EOF
22598 #line 22598 "configure"
22599 #include <stdio.h>
22600 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22601 EOF
22602         if { (eval echo "$as_me:22602: \"$ac_compile\"") >&5
22603   (eval $ac_compile) 2>&5
22604   ac_status=$?
22605   echo "$as_me:22605: \$? = $ac_status" >&5
22606   (exit $ac_status); } ; then
22607                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22608                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22609         fi
22610         rm -f conftest.*
22611
22612         cf_save_LIBS="$LIBS"
22613
22614         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22615         cat >conftest.$ac_ext <<_ACEOF
22616 #line 22616 "configure"
22617 #include "confdefs.h"
22618
22619 #line 22619 "configure"
22620 #include <stdio.h>
22621 int cf_ldflags_static(FILE *fp);
22622
22623 int
22624 main ()
22625 {
22626
22627         return cf_ldflags_static(stdin);
22628
22629   ;
22630   return 0;
22631 }
22632 _ACEOF
22633 rm -f conftest.$ac_objext conftest$ac_exeext
22634 if { (eval echo "$as_me:22634: \"$ac_link\"") >&5
22635   (eval $ac_link) 2>&5
22636   ac_status=$?
22637   echo "$as_me:22637: \$? = $ac_status" >&5
22638   (exit $ac_status); } &&
22639          { ac_try='test -s conftest$ac_exeext'
22640   { (eval echo "$as_me:22640: \"$ac_try\"") >&5
22641   (eval $ac_try) 2>&5
22642   ac_status=$?
22643   echo "$as_me:22643: \$? = $ac_status" >&5
22644   (exit $ac_status); }; }; then
22645
22646         # some linkers simply ignore the -dynamic
22647         case x`file conftest$ac_exeext 2>/dev/null` in
22648         (*static*)
22649                 cf_ldflags_static=no
22650                 ;;
22651         (*)
22652                 cf_ldflags_static=yes
22653                 ;;
22654         esac
22655
22656 else
22657   echo "$as_me: failed program was:" >&5
22658 cat conftest.$ac_ext >&5
22659 cf_ldflags_static=no
22660 fi
22661 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22662
22663         rm -f libconftest.*
22664         LIBS="$cf_save_LIBS"
22665
22666         echo "$as_me:22666: result: $cf_ldflags_static" >&5
22667 echo "${ECHO_T}$cf_ldflags_static" >&6
22668
22669         if test $cf_ldflags_static != yes
22670         then
22671                 LDFLAGS_STATIC=
22672                 LDFLAGS_SHARED=
22673         fi
22674 else
22675         LDFLAGS_STATIC=
22676         LDFLAGS_SHARED=
22677 fi
22678
22679         ;;
22680 esac
22681
22682 echo "$as_me:22682: checking where we will install curses.h" >&5
22683 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22684
22685 includesubdir=
22686 if test "$with_overwrite" = no && \
22687  ( test "x$includedir" = 'x${prefix}/include' || \
22688    test "x$includedir" = "x${prefix}/include" )
22689 then
22690         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22691 fi
22692 echo "$as_me:22692: result: ${includedir}${includesubdir}" >&5
22693 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22694
22695 ### Resolve a conflict between normal and wide-curses by forcing applications
22696 ### that will need libutf8 to add it to their configure script.
22697 if test "$with_overwrite" != no ; then
22698 if test "$NCURSES_LIBUTF8" = 1 ; then
22699         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22700         { echo "$as_me:22700: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22701 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22702 fi
22703 fi
22704 WITH_OVERWRITE=$with_overwrite
22705
22706 # used to separate tack out of the tree
22707 NCURSES_TREE=
22708
22709 ### predefined stuff for the test programs
22710
22711 cat >>confdefs.h <<\EOF
22712 #define HAVE_SLK_COLOR 1
22713 EOF
22714
22715 ### Construct the list of subdirectories for which we'll customize makefiles
22716 ### with the appropriate compile-rules.
22717
22718 echo "$as_me:22718: checking for src modules" >&5
22719 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22720
22721 # dependencies and linker-arguments for test-programs
22722 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22723 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22724 if test "$DFT_LWR_MODEL" = "libtool"; then
22725         TEST_ARGS="${TEST_DEPS}"
22726         TEST_ARG2="${TEST_DEP2}"
22727 else
22728         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22729         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22730 fi
22731
22732 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22733 cf_cv_src_modules=
22734 for cf_dir in $modules_to_build
22735 do
22736         if test -f $srcdir/$cf_dir/modules; then
22737
22738                 # We may/may not have tack in the distribution, though the
22739                 # makefile is.
22740                 if test $cf_dir = tack ; then
22741                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22742                                 continue
22743                         fi
22744                 fi
22745
22746                 if test -z "$cf_cv_src_modules"; then
22747                         cf_cv_src_modules=$cf_dir
22748                 else
22749                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22750                 fi
22751
22752                 # Make the ncurses_cfg.h file record the library interface files as
22753                 # well.  These are header files that are the same name as their
22754                 # directory.  Ncurses is the only library that does not follow
22755                 # that pattern.
22756                 if test $cf_dir = tack ; then
22757                         continue
22758                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22759
22760 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22761
22762                         cat >>confdefs.h <<EOF
22763 #define HAVE_${cf_have_include}_H 1
22764 EOF
22765
22766                         cat >>confdefs.h <<EOF
22767 #define HAVE_LIB${cf_have_include} 1
22768 EOF
22769
22770                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22771                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22772                         if test "$DFT_LWR_MODEL" = "libtool"; then
22773                                 TEST_ARGS="${TEST_DEPS}"
22774                                 TEST_ARG2="${TEST_DEP2}"
22775                         else
22776                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22777                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22778                         fi
22779                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22780                 fi
22781         fi
22782 done
22783 echo "$as_me:22783: result: $cf_cv_src_modules" >&5
22784 echo "${ECHO_T}$cf_cv_src_modules" >&6
22785
22786 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22787 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22788
22789 SRC_SUBDIRS=
22790 if test "x$cf_with_manpages" != xno ; then
22791         SRC_SUBDIRS="$SRC_SUBDIRS man"
22792 fi
22793 SRC_SUBDIRS="$SRC_SUBDIRS include"
22794 for cf_dir in $cf_cv_src_modules
22795 do
22796         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22797 done
22798 if test "x$cf_with_tests" != "xno" ; then
22799         SRC_SUBDIRS="$SRC_SUBDIRS test"
22800 fi
22801 # always make this, to install the ncurses-config script
22802 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22803 if test "$cf_with_cxx_binding" != no; then
22804         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22805         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22806 fi
22807
22808 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22809 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22810
22811 ADA_SUBDIRS=
22812 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22813         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22814         ADA_SUBDIRS="gen src"
22815         if test "x$cf_with_tests" != "xno" ; then
22816                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22817         fi
22818 fi
22819
22820 SUB_MAKEFILES=
22821 for cf_dir in $SRC_SUBDIRS
22822 do
22823         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22824 done
22825
22826 if test -n "$ADA_SUBDIRS"; then
22827         for cf_dir in $ADA_SUBDIRS
22828         do
22829                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22830         done
22831
22832 fi
22833
22834 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22835    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22836    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22837 fi
22838
22839 DIRS_TO_MAKE="lib"
22840 for cf_item in $cf_list_models
22841 do
22842
22843         case $cf_item in
22844         (libtool) cf_subdir='obj_lo'  ;;
22845         (normal)  cf_subdir='objects' ;;
22846         (debug)   cf_subdir='obj_g' ;;
22847         (profile) cf_subdir='obj_p' ;;
22848         (shared)
22849                 case $cf_cv_system_name in
22850                 (cygwin|msys)
22851                         cf_subdir='objects' ;;
22852                 (*)
22853                         cf_subdir='obj_s' ;;
22854                 esac
22855         esac
22856
22857         for cf_item2 in $DIRS_TO_MAKE
22858         do
22859                 test $cf_item2 = $cf_subdir && break
22860         done
22861         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22862 done
22863 for cf_dir in $DIRS_TO_MAKE
22864 do
22865         test ! -d $cf_dir && mkdir $cf_dir
22866 done
22867
22868 # symbols that differ when compiling Ada95 by itself.
22869 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22870
22871 # values to use as strings
22872
22873 cat >>confdefs.h <<EOF
22874 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22875 EOF
22876
22877 cat >>confdefs.h <<EOF
22878 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22879 EOF
22880
22881 ### Now that we're done running tests, add the compiler-warnings, if any
22882
22883 cf_fix_cppflags=no
22884 cf_new_cflags=
22885 cf_new_cppflags=
22886 cf_new_extra_cppflags=
22887
22888 for cf_add_cflags in $EXTRA_CFLAGS
22889 do
22890 case $cf_fix_cppflags in
22891 (no)
22892         case $cf_add_cflags in
22893         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22894                 case $cf_add_cflags in
22895                 (-D*)
22896                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22897
22898                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22899                                 && test -z "${cf_tst_cflags}" \
22900                                 && cf_fix_cppflags=yes
22901
22902                         if test $cf_fix_cppflags = yes ; then
22903                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22904                                 continue
22905                         elif test "${cf_tst_cflags}" = "\"'" ; then
22906                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22907                                 continue
22908                         fi
22909                         ;;
22910                 esac
22911                 case "$CPPFLAGS" in
22912                 (*$cf_add_cflags)
22913                         ;;
22914                 (*)
22915                         case $cf_add_cflags in
22916                         (-D*)
22917                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22918
22919 CPPFLAGS=`echo "$CPPFLAGS" | \
22920         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22921                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22922
22923                                 ;;
22924                         esac
22925                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22926                         ;;
22927                 esac
22928                 ;;
22929         (*)
22930                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22931                 ;;
22932         esac
22933         ;;
22934 (yes)
22935         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22936
22937         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22938
22939         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22940                 && test -z "${cf_tst_cflags}" \
22941                 && cf_fix_cppflags=no
22942         ;;
22943 esac
22944 done
22945
22946 if test -n "$cf_new_cflags" ; then
22947
22948         CFLAGS="$CFLAGS $cf_new_cflags"
22949 fi
22950
22951 if test -n "$cf_new_cppflags" ; then
22952
22953         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22954 fi
22955
22956 if test -n "$cf_new_extra_cppflags" ; then
22957
22958         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22959 fi
22960
22961 ### Define substitutions for header files to avoid name-pollution
22962
22963 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22964         HAVE_TCGETATTR=1
22965 else
22966         HAVE_TCGETATTR=0
22967 fi
22968
22969 if test "x$ac_cv_header_stdint_h" = xyes ; then
22970         HAVE_STDINT_H=1
22971 else
22972         HAVE_STDINT_H=0
22973 fi
22974
22975 if test "x$ac_cv_header_termio_h" = xyes ; then
22976         HAVE_TERMIO_H=1
22977 else
22978         HAVE_TERMIO_H=0
22979 fi
22980
22981 if test "x$ac_cv_header_termios_h" = xyes ; then
22982         HAVE_TERMIOS_H=1
22983 else
22984         HAVE_TERMIOS_H=0
22985 fi
22986
22987 ################################################################################
22988 test "x$use_database" = xyes && \
22989 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22990
22991 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22992 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22993
22994 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
22995 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22996 fi
22997
22998 # Extract the first word of "tic", so it can be a program name with args.
22999 set dummy tic; ac_word=$2
23000 echo "$as_me:23000: checking for $ac_word" >&5
23001 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23002 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23003   echo $ECHO_N "(cached) $ECHO_C" >&6
23004 else
23005   case $TIC_PATH in
23006   [\\/]* | ?:[\\/]*)
23007   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23008   ;;
23009   *)
23010   ac_save_IFS=$IFS; IFS=$ac_path_separator
23011 ac_dummy="$PATH:/usr/local/ncurses/bin"
23012 for ac_dir in $ac_dummy; do
23013   IFS=$ac_save_IFS
23014   test -z "$ac_dir" && ac_dir=.
23015   if $as_executable_p "$ac_dir/$ac_word"; then
23016    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23017    echo "$as_me:23017: found $ac_dir/$ac_word" >&5
23018    break
23019 fi
23020 done
23021
23022   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23023   ;;
23024 esac
23025 fi
23026 TIC_PATH=$ac_cv_path_TIC_PATH
23027
23028 if test -n "$TIC_PATH"; then
23029   echo "$as_me:23029: result: $TIC_PATH" >&5
23030 echo "${ECHO_T}$TIC_PATH" >&6
23031 else
23032   echo "$as_me:23032: result: no" >&5
23033 echo "${ECHO_T}no" >&6
23034 fi
23035
23036 if test -n "$FALLBACK_LIST"
23037 then
23038         if test "$TIC_PATH" = unknown
23039         then
23040                 { echo "$as_me:23040: WARNING: no tic program found for fallbacks" >&5
23041 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
23042         fi
23043 fi
23044
23045 if test "x$cf_with_tests" != xno ; then
23046         MAKE_TESTS=
23047 else
23048         MAKE_TESTS="#"
23049 fi
23050
23051 ADAHTML_DIR=../../doc/html/ada
23052
23053 # these could be configurable, but are not currently
23054 PANEL_NAME=panel
23055 MENU_NAME=menu
23056 FORM_NAME=form
23057 CXX_NAME=ncurses++
23058
23059 # workaround for OS/2 (20151017)
23060 case $cf_cv_system_name in
23061 (os2*)
23062         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
23063         ;;
23064 (*)
23065         LIBTOOL_OPTS_CXX=
23066         ;;
23067 esac
23068
23069 # workaround for g++ versus Solaris (20131116)
23070 case $cf_cv_system_name in
23071 (solaris2*)
23072         case "x$CPPFLAGS" in
23073         (*-D_XOPEN_SOURCE_EXTENDED*)
23074                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
23075
23076 echo "${as_me:-configure}:23076: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
23077
23078                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
23079                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
23080                 ;;
23081         esac
23082         ;;
23083 esac
23084
23085 # Help to automatically enable the extended curses features when using either
23086 # the *-config or the ".pc" files by adding defines.
23087 echo "$as_me:23087: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
23088 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
23089 PKG_CFLAGS=
23090 for cf_loop1 in $CPPFLAGS_after_XOPEN
23091 do
23092         cf_found=no
23093         for cf_loop2 in $CPPFLAGS_before_XOPEN
23094         do
23095                 if test "x$cf_loop1" = "x$cf_loop2"
23096                 then
23097                         cf_found=yes
23098                         break
23099                 fi
23100         done
23101         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23102 done
23103 echo "$as_me:23103: result: $PKG_CFLAGS" >&5
23104 echo "${ECHO_T}$PKG_CFLAGS" >&6
23105
23106 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23107 case "x$NCURSES_OSPEED" in
23108 (*short*)
23109         cf_compatible=1
23110         ;;
23111 (*)
23112         cf_compatible=0
23113         ;;
23114 esac
23115
23116 cat >>confdefs.h <<EOF
23117 #define NCURSES_OSPEED_COMPAT $cf_compatible
23118 EOF
23119
23120 case "x$cf_cv_typeof_chtype" in
23121 (xshort|xint|xlong)
23122         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23123         ;;
23124 esac
23125
23126 case "x$cf_cv_typeof_mmask_t" in
23127 (xshort|xint|xlong)
23128         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23129         ;;
23130 esac
23131
23132 # substitute into misc/Makefile to suppress
23133 # (un)install.data from the
23134 # (un)install rules.
23135 if test "x$cf_with_db_install" = "xno"; then
23136         MISC_INSTALL_DATA=
23137         MISC_UNINSTALL_DATA=
23138 else
23139         MISC_INSTALL_DATA=install.data
23140         MISC_UNINSTALL_DATA=uninstall.data
23141 fi
23142
23143 SUB_SCRIPTS=
23144
23145 if test -n "$PACKAGE"
23146 then
23147         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23148         export PACKAGE
23149         echo "package: $PACKAGE"
23150 fi
23151
23152 UNALTERED_SYMS=
23153 cf_filter_syms=no
23154
23155 if test -n "$RESULTING_SYMS"
23156 then
23157         cf_filter_syms=$cf_dft_filter_syms
23158         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23159
23160 echo "${as_me:-configure}:23160: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23161
23162 fi
23163
23164 if test "x$WILDCARD_SYMS" = xno
23165 then
23166         cf_filter_syms=yes
23167 fi
23168
23169 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23170
23171 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23172 if test $cf_filter_syms = yes
23173 then
23174         RESULTING_SYMS=resulting.map
23175 fi
23176
23177 if test "x$cross_compiling" = xyes ; then
23178         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23179 else
23180         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23181 fi
23182
23183 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
23184 ac_config_commands="$ac_config_commands default"
23185 cat >confcache <<\_ACEOF
23186 # This file is a shell script that caches the results of configure
23187 # tests run on this system so they can be shared between configure
23188 # scripts and configure runs, see configure's option --config-cache.
23189 # It is not useful on other systems.  If it contains results you don't
23190 # want to keep, you may remove or edit it.
23191 #
23192 # config.status only pays attention to the cache file if you give it
23193 # the --recheck option to rerun configure.
23194 #
23195 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23196 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23197 # following values.
23198
23199 _ACEOF
23200
23201 # The following way of writing the cache mishandles newlines in values,
23202 # but we know of no workaround that is simple, portable, and efficient.
23203 # So, don't put newlines in cache variables' values.
23204 # Ultrix sh set writes to stderr and can't be redirected directly,
23205 # and sets the high bit in the cache file unless we assign to the vars.
23206 {
23207   (set) 2>&1 |
23208     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23209     *ac_space=\ *)
23210       # `set' does not quote correctly, so add quotes (double-quote
23211       # substitution turns \\\\ into \\, and sed turns \\ into \).
23212       sed -n \
23213         "s/'/'\\\\''/g;
23214           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23215       ;;
23216     *)
23217       # `set' quotes correctly as required by POSIX, so do not add quotes.
23218       sed -n \
23219         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23220       ;;
23221     esac;
23222 } |
23223   sed '
23224      t clear
23225      : clear
23226      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23227      t end
23228      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23229      : end' >>confcache
23230 if cmp -s $cache_file confcache; then :; else
23231   if test -w $cache_file; then
23232     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23233     cat confcache >$cache_file
23234   else
23235     echo "not updating unwritable cache $cache_file"
23236   fi
23237 fi
23238 rm -f confcache
23239
23240 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23241 # Let make expand exec_prefix.
23242 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23243
23244 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23245 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23246 # trailing colons and then remove the whole line if VPATH becomes empty
23247 # (actually we leave an empty line to preserve line numbers).
23248 if test "x$srcdir" = x.; then
23249   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23250 s/:*\$(srcdir):*/:/;
23251 s/:*\${srcdir}:*/:/;
23252 s/:*@srcdir@:*/:/;
23253 s/^\([^=]*=[    ]*\):*/\1/;
23254 s/:*$//;
23255 s/^[^=]*=[      ]*$//;
23256 }'
23257 fi
23258
23259 DEFS=-DHAVE_CONFIG_H
23260
23261 : ${CONFIG_STATUS=./config.status}
23262 ac_clean_files_save=$ac_clean_files
23263 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23264 { echo "$as_me:23264: creating $CONFIG_STATUS" >&5
23265 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23266 cat >$CONFIG_STATUS <<_ACEOF
23267 #! $SHELL
23268 # Generated automatically by configure.
23269 # Run this file to recreate the current configuration.
23270 # Compiler output produced by configure, useful for debugging
23271 # configure, is in config.log if it exists.
23272
23273 debug=false
23274 SHELL=\${CONFIG_SHELL-$SHELL}
23275 ac_cs_invocation="\$0 \$@"
23276
23277 _ACEOF
23278
23279 cat >>$CONFIG_STATUS <<\_ACEOF
23280 # Be Bourne compatible
23281 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23282   emulate sh
23283   NULLCMD=:
23284 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23285   set -o posix
23286 fi
23287
23288 # Name of the executable.
23289 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23290
23291 if expr a : '\(a\)' >/dev/null 2>&1; then
23292   as_expr=expr
23293 else
23294   as_expr=false
23295 fi
23296
23297 rm -f conf$$ conf$$.exe conf$$.file
23298 echo >conf$$.file
23299 if ln -s conf$$.file conf$$ 2>/dev/null; then
23300   # We could just check for DJGPP; but this test a) works b) is more generic
23301   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23302   if test -f conf$$.exe; then
23303     # Don't use ln at all; we don't have any links
23304     as_ln_s='cp -p'
23305   else
23306     as_ln_s='ln -s'
23307   fi
23308 elif ln conf$$.file conf$$ 2>/dev/null; then
23309   as_ln_s=ln
23310 else
23311   as_ln_s='cp -p'
23312 fi
23313 rm -f conf$$ conf$$.exe conf$$.file
23314
23315 as_executable_p="test -f"
23316
23317 # Support unset when possible.
23318 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23319   as_unset=unset
23320 else
23321   as_unset=false
23322 fi
23323
23324 # NLS nuisances.
23325 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23326 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23327 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23328 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23329 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23330 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23331 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23332 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23333
23334 # IFS
23335 # We need space, tab and new line, in precisely that order.
23336 as_nl='
23337 '
23338 IFS="   $as_nl"
23339
23340 # CDPATH.
23341 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23342
23343 exec 6>&1
23344
23345 _ACEOF
23346
23347 # Files that config.status was made for.
23348 if test -n "$ac_config_files"; then
23349   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23350 fi
23351
23352 if test -n "$ac_config_headers"; then
23353   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23354 fi
23355
23356 if test -n "$ac_config_links"; then
23357   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23358 fi
23359
23360 if test -n "$ac_config_commands"; then
23361   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23362 fi
23363
23364 cat >>$CONFIG_STATUS <<\EOF
23365
23366 ac_cs_usage="\
23367 \`$as_me' instantiates files from templates according to the
23368 current configuration.
23369
23370 Usage: $0 [OPTIONS] [FILE]...
23371
23372   -h, --help       print this help, then exit
23373   -V, --version    print version number, then exit
23374   -d, --debug      don't remove temporary files
23375       --recheck    update $as_me by reconfiguring in the same conditions
23376   --file=FILE[:TEMPLATE]
23377                    instantiate the configuration file FILE
23378   --header=FILE[:TEMPLATE]
23379                    instantiate the configuration header FILE
23380
23381 Configuration files:
23382 $config_files
23383
23384 Configuration headers:
23385 $config_headers
23386
23387 Configuration commands:
23388 $config_commands
23389
23390 Report bugs to <dickey@invisible-island.net>."
23391 EOF
23392
23393 cat >>$CONFIG_STATUS <<EOF
23394 ac_cs_version="\\
23395 config.status
23396 configured by $0, generated by GNU Autoconf 2.52.20150926,
23397   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23398
23399 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23400 Free Software Foundation, Inc.
23401 This config.status script is free software; the Free Software Foundation
23402 gives unlimited permission to copy, distribute and modify it."
23403 srcdir=$srcdir
23404 INSTALL="$INSTALL"
23405 EOF
23406
23407 cat >>$CONFIG_STATUS <<\EOF
23408 # If no file are specified by the user, then we need to provide default
23409 # value.  By we need to know if files were specified by the user.
23410 ac_need_defaults=:
23411 while test $# != 0
23412 do
23413   case $1 in
23414   --*=*)
23415     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23416     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23417     shift
23418     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23419     shift
23420     ;;
23421   -*);;
23422   *) # This is not an option, so the user has probably given explicit
23423      # arguments.
23424      ac_need_defaults=false;;
23425   esac
23426
23427   case $1 in
23428   # Handling of the options.
23429 EOF
23430 cat >>$CONFIG_STATUS <<EOF
23431   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23432     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23433     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23434 EOF
23435 cat >>$CONFIG_STATUS <<\EOF
23436   --version | --vers* | -V )
23437     echo "$ac_cs_version"; exit 0 ;;
23438   --he | --h)
23439     # Conflict between --help and --header
23440     { { echo "$as_me:23440: error: ambiguous option: $1
23441 Try \`$0 --help' for more information." >&5
23442 echo "$as_me: error: ambiguous option: $1
23443 Try \`$0 --help' for more information." >&2;}
23444    { (exit 1); exit 1; }; };;
23445   --help | --hel | -h )
23446     echo "$ac_cs_usage"; exit 0 ;;
23447   --debug | --d* | -d )
23448     debug=: ;;
23449   --file | --fil | --fi | --f )
23450     shift
23451     CONFIG_FILES="$CONFIG_FILES $1"
23452     ac_need_defaults=false;;
23453   --header | --heade | --head | --hea )
23454     shift
23455     CONFIG_HEADERS="$CONFIG_HEADERS $1"
23456     ac_need_defaults=false;;
23457
23458   # This is an error.
23459   -*) { { echo "$as_me:23459: error: unrecognized option: $1
23460 Try \`$0 --help' for more information." >&5
23461 echo "$as_me: error: unrecognized option: $1
23462 Try \`$0 --help' for more information." >&2;}
23463    { (exit 1); exit 1; }; } ;;
23464
23465   *) ac_config_targets="$ac_config_targets $1" ;;
23466
23467   esac
23468   shift
23469 done
23470
23471 exec 5>>config.log
23472 cat >&5 << _ACEOF
23473
23474 ## ----------------------- ##
23475 ## Running config.status.  ##
23476 ## ----------------------- ##
23477
23478 This file was extended by $as_me 2.52.20150926, executed with
23479   CONFIG_FILES    = $CONFIG_FILES
23480   CONFIG_HEADERS  = $CONFIG_HEADERS
23481   CONFIG_LINKS    = $CONFIG_LINKS
23482   CONFIG_COMMANDS = $CONFIG_COMMANDS
23483   > $ac_cs_invocation
23484 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23485
23486 _ACEOF
23487 EOF
23488
23489 cat >>$CONFIG_STATUS <<EOF
23490 #
23491 # INIT-COMMANDS section.
23492 #
23493
23494 ### Special initialization commands, used to pass information from the
23495 ### configuration-run into config.status
23496
23497 AWK="$AWK"
23498 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23499 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23500 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23501 ECHO_LD="$ECHO_LD"
23502 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23503 LDCONFIG="$LDCONFIG"
23504 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23505 LIB_NAME="$LIB_NAME"
23506 LIB_PREFIX="$LIB_PREFIX"
23507 LIB_SUBSETS="$LIB_SUBSETS"
23508 LIB_SUFFIX="$LIB_SUFFIX"
23509 LIB_TRACING="$LIB_TRACING"
23510 LN_S="$LN_S"
23511 MAKE_TERMINFO="$MAKE_TERMINFO"
23512 NCURSES_MAJOR="$NCURSES_MAJOR"
23513 NCURSES_MINOR="$NCURSES_MINOR"
23514 NCURSES_OSPEED="$NCURSES_OSPEED"
23515 NCURSES_PATCH="$NCURSES_PATCH"
23516 SRC_SUBDIRS="$SRC_SUBDIRS"
23517 TERMINFO="$TERMINFO"
23518 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23519 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23520 TICS_NAME="$TICS_NAME"
23521 TICS_SUFFIX="$TICS_SUFFIX"
23522 TIC_PATH="$TIC_PATH"
23523 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23524 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23525 TINFO_NAME="$TINFO_NAME"
23526 TINFO_SUFFIX="$TINFO_SUFFIX"
23527 UNALTERED_SYMS="$UNALTERED_SYMS"
23528 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23529 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23530 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23531 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23532 WILDCARD_SYMS="$WILDCARD_SYMS"
23533 WITH_CURSES_H="$with_curses_h"
23534 WITH_ECHO="${enable_echo:=yes}"
23535 WITH_OVERWRITE="$with_overwrite"
23536 cf_LIST_MODELS="$cf_list_models"
23537 cf_cv_abi_version="$cf_cv_abi_version"
23538 cf_cv_do_relink="$cf_cv_do_relink"
23539 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23540 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23541 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23542 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23543 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23544 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23545 cf_cv_rel_version="$cf_cv_rel_version"
23546 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23547 cf_cv_shared_soname='$cf_cv_shared_soname'
23548 cf_cv_shlib_version="$cf_cv_shlib_version"
23549 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23550 cf_cv_system_name="$cf_cv_system_name"
23551 cf_cv_term_driver="$with_term_driver"
23552 cf_with_ada="$cf_with_ada"
23553 cf_with_cxx_binding="$cf_with_cxx_binding"
23554 cf_with_db_install="$cf_with_db_install"
23555 cf_with_manpages="$cf_with_manpages"
23556 cf_with_tests="$cf_with_tests"
23557 host="$host"
23558 target="$target"
23559 with_shared_cxx="$with_shared_cxx"
23560
23561 EOF
23562
23563 cat >>$CONFIG_STATUS <<\EOF
23564 for ac_config_target in $ac_config_targets
23565 do
23566   case "$ac_config_target" in
23567   # Handling of arguments.
23568   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23569   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23570   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23571   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23572   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23573   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23574   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23575   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23576   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23577   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23578   *) { { echo "$as_me:23578: error: invalid argument: $ac_config_target" >&5
23579 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23580    { (exit 1); exit 1; }; };;
23581   esac
23582 done
23583
23584 # If the user did not use the arguments to specify the items to instantiate,
23585 # then the envvar interface is used.  Set only those that are not.
23586 # We use the long form for the default assignment because of an extremely
23587 # bizarre bug on SunOS 4.1.3.
23588 if $ac_need_defaults; then
23589   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23590   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23591   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23592 fi
23593
23594 # Create a temporary directory, and hook for its removal unless debugging.
23595 $debug ||
23596 {
23597   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23598   trap '{ (exit 1); exit 1; }' 1 2 13 15
23599 }
23600
23601 # Create a (secure) tmp directory for tmp files.
23602 : ${TMPDIR=/tmp}
23603 {
23604   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23605   test -n "$tmp" && test -d "$tmp"
23606 }  ||
23607 {
23608   tmp=$TMPDIR/cs$$-$RANDOM
23609   (umask 077 && mkdir $tmp)
23610 } ||
23611 {
23612    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23613    { (exit 1); exit 1; }
23614 }
23615
23616 EOF
23617
23618 cat >>$CONFIG_STATUS <<EOF
23619
23620 #
23621 # CONFIG_FILES section.
23622 #
23623
23624 # No need to generate the scripts if there are no CONFIG_FILES.
23625 # This happens for instance when ./config.status config.h
23626 if test -n "\$CONFIG_FILES"; then
23627   # Protect against being on the right side of a sed subst in config.status.
23628   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23629    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23630 s,@SHELL@,$SHELL,;t t
23631 s,@exec_prefix@,$exec_prefix,;t t
23632 s,@prefix@,$prefix,;t t
23633 s,@program_transform_name@,$program_transform_name,;t t
23634 s,@bindir@,$bindir,;t t
23635 s,@sbindir@,$sbindir,;t t
23636 s,@libexecdir@,$libexecdir,;t t
23637 s,@datarootdir@,$datarootdir,;t t
23638 s,@datadir@,$datadir,;t t
23639 s,@sysconfdir@,$sysconfdir,;t t
23640 s,@sharedstatedir@,$sharedstatedir,;t t
23641 s,@localstatedir@,$localstatedir,;t t
23642 s,@libdir@,$libdir,;t t
23643 s,@includedir@,$includedir,;t t
23644 s,@oldincludedir@,$oldincludedir,;t t
23645 s,@infodir@,$infodir,;t t
23646 s,@mandir@,$mandir,;t t
23647 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23648 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23649 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23650 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23651 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23652 s,@build_alias@,$build_alias,;t t
23653 s,@host_alias@,$host_alias,;t t
23654 s,@target_alias@,$target_alias,;t t
23655 s,@ECHO_C@,$ECHO_C,;t t
23656 s,@ECHO_N@,$ECHO_N,;t t
23657 s,@ECHO_T@,$ECHO_T,;t t
23658 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23659 s,@DEFS@,$DEFS,;t t
23660 s,@LIBS@,$LIBS,;t t
23661 s,@top_builddir@,$top_builddir,;t t
23662 s,@EGREP@,$EGREP,;t t
23663 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23664 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23665 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23666 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23667 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23668 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23669 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23670 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23671 s,@VERSION@,$VERSION,;t t
23672 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23673 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23674 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23675 s,@PACKAGE@,$PACKAGE,;t t
23676 s,@build@,$build,;t t
23677 s,@build_cpu@,$build_cpu,;t t
23678 s,@build_vendor@,$build_vendor,;t t
23679 s,@build_os@,$build_os,;t t
23680 s,@host@,$host,;t t
23681 s,@host_cpu@,$host_cpu,;t t
23682 s,@host_vendor@,$host_vendor,;t t
23683 s,@host_os@,$host_os,;t t
23684 s,@target@,$target,;t t
23685 s,@target_cpu@,$target_cpu,;t t
23686 s,@target_vendor@,$target_vendor,;t t
23687 s,@target_os@,$target_os,;t t
23688 s,@CC@,$CC,;t t
23689 s,@CFLAGS@,$CFLAGS,;t t
23690 s,@LDFLAGS@,$LDFLAGS,;t t
23691 s,@CPPFLAGS@,$CPPFLAGS,;t t
23692 s,@ac_ct_CC@,$ac_ct_CC,;t t
23693 s,@EXEEXT@,$EXEEXT,;t t
23694 s,@OBJEXT@,$OBJEXT,;t t
23695 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23696 s,@CPP@,$CPP,;t t
23697 s,@LDCONFIG@,$LDCONFIG,;t t
23698 s,@CXX@,$CXX,;t t
23699 s,@CXXFLAGS@,$CXXFLAGS,;t t
23700 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23701 s,@AWK@,$AWK,;t t
23702 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23703 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23704 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23705 s,@LINT@,$LINT,;t t
23706 s,@LINT_OPTS@,$LINT_OPTS,;t t
23707 s,@LN_S@,$LN_S,;t t
23708 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23709 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23710 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23711 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
23712 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
23713 s,@SET_MAKE@,$SET_MAKE,;t t
23714 s,@CTAGS@,$CTAGS,;t t
23715 s,@ETAGS@,$ETAGS,;t t
23716 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23717 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23718 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
23719 s,@RANLIB@,$RANLIB,;t t
23720 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23721 s,@LD@,$LD,;t t
23722 s,@ac_ct_LD@,$ac_ct_LD,;t t
23723 s,@AR@,$AR,;t t
23724 s,@ac_ct_AR@,$ac_ct_AR,;t t
23725 s,@NM@,$NM,;t t
23726 s,@ac_ct_NM@,$ac_ct_NM,;t t
23727 s,@ARFLAGS@,$ARFLAGS,;t t
23728 s,@DESTDIR@,$DESTDIR,;t t
23729 s,@BUILD_CC@,$BUILD_CC,;t t
23730 s,@BUILD_CPP@,$BUILD_CPP,;t t
23731 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
23732 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23733 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23734 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23735 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23736 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23737 s,@cf_list_models@,$cf_list_models,;t t
23738 s,@ABI_VERSION@,$ABI_VERSION,;t t
23739 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23740 s,@LIBTOOL@,$LIBTOOL,;t t
23741 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23742 s,@LT_UNDEF@,$LT_UNDEF,;t t
23743 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23744 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23745 s,@LIB_CREATE@,$LIB_CREATE,;t t
23746 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23747 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23748 s,@LIB_PREP@,$LIB_PREP,;t t
23749 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23750 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23751 s,@LIB_LINK@,$LIB_LINK,;t t
23752 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23753 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23754 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23755 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23756 s,@TICS_NAME@,$TICS_NAME,;t t
23757 s,@TINFO_NAME@,$TINFO_NAME,;t t
23758 s,@LIB_NAME@,$LIB_NAME,;t t
23759 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23760 s,@CC_G_OPT@,$CC_G_OPT,;t t
23761 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23762 s,@LD_MODEL@,$LD_MODEL,;t t
23763 s,@shlibdir@,$shlibdir,;t t
23764 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23765 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23766 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23767 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23768 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23769 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23770 s,@LINK_PROGS@,$LINK_PROGS,;t t
23771 s,@LINK_TESTS@,$LINK_TESTS,;t t
23772 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23773 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23774 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23775 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23776 s,@RPATH_LIST@,$RPATH_LIST,;t t
23777 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23778 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23779 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23780 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23781 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23782 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23783 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23784 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23785 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23786 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23787 s,@XTERM_KBS@,$XTERM_KBS,;t t
23788 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23789 s,@TERMINFO@,$TERMINFO,;t t
23790 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23791 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23792 s,@TERMPATH@,$TERMPATH,;t t
23793 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23794 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23795 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
23796 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23797 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23798 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23799 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23800 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23801 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23802 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23803 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23804 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23805 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23806 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
23807 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23808 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23809 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23810 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23811 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23812 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23813 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23814 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23815 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23816 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23817 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23818 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23819 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23820 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23821 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23822 s,@PTHREAD@,$PTHREAD,;t t
23823 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23824 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23825 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23826 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23827 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
23828 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
23829 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
23830 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23831 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23832 s,@ECHO_LT@,$ECHO_LT,;t t
23833 s,@ECHO_LD@,$ECHO_LD,;t t
23834 s,@RULE_CC@,$RULE_CC,;t t
23835 s,@SHOW_CC@,$SHOW_CC,;t t
23836 s,@ECHO_CC@,$ECHO_CC,;t t
23837 s,@ECHO_LINK@,$ECHO_LINK,;t t
23838 s,@ADAFLAGS@,$ADAFLAGS,;t t
23839 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23840 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23841 s,@ADA_TRACE@,$ADA_TRACE,;t t
23842 s,@MATH_LIB@,$MATH_LIB,;t t
23843 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23844 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23845 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23846 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23847 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23848 s,@TEST_LIBS@,$TEST_LIBS,;t t
23849 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23850 s,@CXXCPP@,$CXXCPP,;t t
23851 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23852 s,@CXX_AR@,$CXX_AR,;t t
23853 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23854 s,@CXXLIBS@,$CXXLIBS,;t t
23855 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23856 s,@gnat_exists@,$gnat_exists,;t t
23857 s,@M4_exists@,$M4_exists,;t t
23858 s,@cf_ada_make@,$cf_ada_make,;t t
23859 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23860 s,@cf_compile_generics@,$cf_compile_generics,;t t
23861 s,@cf_generic_objects@,$cf_generic_objects,;t t
23862 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23863 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23864 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23865 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23866 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23867 s,@cf_ada_package@,$cf_ada_package,;t t
23868 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23869 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23870 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23871 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23872 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23873 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23874 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23875 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23876 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23877 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23878 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23879 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23880 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23881 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23882 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23883 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23884 s,@TICS_LIBS@,$TICS_LIBS,;t t
23885 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23886 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23887 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23888 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23889 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23890 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23891 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23892 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23893 s,@includesubdir@,$includesubdir,;t t
23894 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23895 s,@TICS_LIST@,$TICS_LIST,;t t
23896 s,@TINFO_LIST@,$TINFO_LIST,;t t
23897 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23898 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23899 s,@TEST_ARGS@,$TEST_ARGS,;t t
23900 s,@TEST_DEPS@,$TEST_DEPS,;t t
23901 s,@TEST_ARG2@,$TEST_ARG2,;t t
23902 s,@TEST_DEP2@,$TEST_DEP2,;t t
23903 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23904 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23905 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23906 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23907 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23908 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23909 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23910 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23911 s,@cross_compiling@,$cross_compiling,;t t
23912 s,@TIC_PATH@,$TIC_PATH,;t t
23913 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23914 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23915 s,@PANEL_NAME@,$PANEL_NAME,;t t
23916 s,@MENU_NAME@,$MENU_NAME,;t t
23917 s,@FORM_NAME@,$FORM_NAME,;t t
23918 s,@CXX_NAME@,$CXX_NAME,;t t
23919 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23920 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23921 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23922 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23923 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23924 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23925 CEOF
23926
23927 EOF
23928
23929   cat >>$CONFIG_STATUS <<\EOF
23930   # Split the substitutions into bite-sized pieces for seds with
23931   # small command number limits, like on Digital OSF/1 and HP-UX.
23932   ac_max_sed_lines=48
23933   ac_sed_frag=1 # Number of current file.
23934   ac_beg=1 # First line for current file.
23935   ac_end=$ac_max_sed_lines # Line after last line for current file.
23936   ac_more_lines=:
23937   ac_sed_cmds=
23938   while $ac_more_lines; do
23939     if test $ac_beg -gt 1; then
23940       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23941     else
23942       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23943     fi
23944     if test ! -s $tmp/subs.frag; then
23945       ac_more_lines=false
23946     else
23947       # The purpose of the label and of the branching condition is to
23948       # speed up the sed processing (if there are no `@' at all, there
23949       # is no need to browse any of the substitutions).
23950       # These are the two extra sed commands mentioned above.
23951       (echo ':t
23952   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23953       # It is possible to make a multiline substitution using escaped newlines.
23954       # Ensure that we do not split the substitution between script fragments.
23955       ac_BEG=$ac_end
23956       ac_END=`expr $ac_end + $ac_max_sed_lines`
23957       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23958       if test -s $tmp/subs.next; then
23959         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23960         if test ! -s $tmp/subs.edit; then
23961           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23962           if test ! -s $tmp/subs.edit; then
23963             if test $ac_beg -gt 1; then
23964               ac_end=`expr $ac_end - 1`
23965               continue
23966             fi
23967           fi
23968         fi
23969       fi
23970
23971       if test -z "$ac_sed_cmds"; then
23972         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23973       else
23974         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23975       fi
23976       ac_sed_frag=`expr $ac_sed_frag + 1`
23977       ac_beg=$ac_end
23978       ac_end=`expr $ac_end + $ac_max_sed_lines`
23979     fi
23980   done
23981   if test -z "$ac_sed_cmds"; then
23982     ac_sed_cmds=cat
23983   fi
23984 fi # test -n "$CONFIG_FILES"
23985
23986 EOF
23987 cat >>$CONFIG_STATUS <<\EOF
23988 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23989   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23990   case $ac_file in
23991   - | *:- | *:-:* ) # input from stdin
23992         cat >$tmp/stdin
23993         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23994         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23995   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23996         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23997   * )   ac_file_in=$ac_file.in ;;
23998   esac
23999
24000   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24001   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24002          X"$ac_file" : 'X\(//\)[^/]' \| \
24003          X"$ac_file" : 'X\(//\)$' \| \
24004          X"$ac_file" : 'X\(/\)' \| \
24005          .     : '\(.\)' 2>/dev/null ||
24006 echo X"$ac_file" |
24007     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24008           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24009           /^X\(\/\/\)$/{ s//\1/; q; }
24010           /^X\(\/\).*/{ s//\1/; q; }
24011           s/.*/./; q'`
24012   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24013     { case "$ac_dir" in
24014   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24015   *)                      as_incr_dir=.;;
24016 esac
24017 as_dummy="$ac_dir"
24018 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24019   case $as_mkdir_dir in
24020     # Skip DOS drivespec
24021     ?:) as_incr_dir=$as_mkdir_dir ;;
24022     *)
24023       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24024       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24025     ;;
24026   esac
24027 done; }
24028
24029     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24030     # A "../" for each directory in $ac_dir_suffix.
24031     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24032   else
24033     ac_dir_suffix= ac_dots=
24034   fi
24035
24036   case $srcdir in
24037   .)  ac_srcdir=.
24038       if test -z "$ac_dots"; then
24039          ac_top_srcdir=.
24040       else
24041          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
24042       fi ;;
24043   [\\/]* | ?:[\\/]* )
24044       ac_srcdir=$srcdir$ac_dir_suffix;
24045       ac_top_srcdir=$srcdir ;;
24046   *) # Relative path.
24047     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
24048     ac_top_srcdir=$ac_dots$srcdir ;;
24049   esac
24050
24051   case $INSTALL in
24052   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24053   *) ac_INSTALL=$ac_dots$INSTALL ;;
24054   esac
24055
24056   if test x"$ac_file" != x-; then
24057     { echo "$as_me:24057: creating $ac_file" >&5
24058 echo "$as_me: creating $ac_file" >&6;}
24059     rm -f "$ac_file"
24060   fi
24061   # Let's still pretend it is `configure' which instantiates (i.e., don't
24062   # use $as_me), people would be surprised to read:
24063   #    /* config.h.  Generated automatically by config.status.  */
24064   configure_input="Generated automatically from `echo $ac_file_in |
24065                                                  sed 's,.*/,,'` by configure."
24066
24067   # First look for the input files in the build tree, otherwise in the
24068   # src tree.
24069   ac_file_inputs=`IFS=:
24070     for f in $ac_file_in; do
24071       case $f in
24072       -) echo $tmp/stdin ;;
24073       [\\/$]*)
24074          # Absolute (can't be DOS-style, as IFS=:)
24075          test -f "$f" || { { echo "$as_me:24075: error: cannot find input file: $f" >&5
24076 echo "$as_me: error: cannot find input file: $f" >&2;}
24077    { (exit 1); exit 1; }; }
24078          echo $f;;
24079       *) # Relative
24080          if test -f "$f"; then
24081            # Build tree
24082            echo $f
24083          elif test -f "$srcdir/$f"; then
24084            # Source tree
24085            echo $srcdir/$f
24086          else
24087            # /dev/null tree
24088            { { echo "$as_me:24088: error: cannot find input file: $f" >&5
24089 echo "$as_me: error: cannot find input file: $f" >&2;}
24090    { (exit 1); exit 1; }; }
24091          fi;;
24092       esac
24093     done` || { (exit 1); exit 1; }
24094 EOF
24095 cat >>$CONFIG_STATUS <<\EOF
24096   ac_warn_datarootdir=no
24097   if test x"$ac_file" != x-; then
24098     for ac_item in $ac_file_inputs
24099     do
24100       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24101       if test -n "$ac_seen"; then
24102         ac_used=`grep '@datarootdir@' $ac_item`
24103         if test -z "$ac_used"; then
24104           { echo "$as_me:24104: WARNING: datarootdir was used implicitly but not set:
24105 $ac_seen" >&5
24106 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24107 $ac_seen" >&2;}
24108           ac_warn_datarootdir=yes
24109         fi
24110       fi
24111       ac_seen=`grep '${datarootdir}' $ac_item`
24112       if test -n "$ac_seen"; then
24113         { echo "$as_me:24113: WARNING: datarootdir was used explicitly but not set:
24114 $ac_seen" >&5
24115 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24116 $ac_seen" >&2;}
24117         ac_warn_datarootdir=yes
24118       fi
24119     done
24120   fi
24121
24122 if test "x$ac_warn_datarootdir" = xyes; then
24123   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24124 fi
24125
24126 EOF
24127 cat >>$CONFIG_STATUS <<EOF
24128   sed "$ac_vpsub
24129 $extrasub
24130 EOF
24131 cat >>$CONFIG_STATUS <<\EOF
24132 :t
24133 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24134 s,@configure_input@,$configure_input,;t t
24135 s,@srcdir@,$ac_srcdir,;t t
24136 s,@top_srcdir@,$ac_top_srcdir,;t t
24137 s,@INSTALL@,$ac_INSTALL,;t t
24138 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24139   rm -f $tmp/stdin
24140   if test x"$ac_file" != x-; then
24141     cp $tmp/out $ac_file
24142
24143     for ac_name in prefix exec_prefix datarootdir
24144     do
24145         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24146         if test -n "$ac_seen"; then
24147             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24148             if test -z "$ac_init"; then
24149               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24150               { echo "$as_me:24150: WARNING: Variable $ac_name is used but was not set:
24151 $ac_seen" >&5
24152 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24153 $ac_seen" >&2;}
24154             fi
24155         fi
24156     done
24157     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24158     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24159     if test -s $tmp/out; then
24160       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24161       { echo "$as_me:24161: WARNING: Some variables may not be substituted:
24162 $ac_seen" >&5
24163 echo "$as_me: WARNING: Some variables may not be substituted:
24164 $ac_seen" >&2;}
24165     fi
24166   else
24167     cat $tmp/out
24168   fi
24169   rm -f $tmp/out
24170
24171 done
24172 EOF
24173 cat >>$CONFIG_STATUS <<\EOF
24174
24175 #
24176 # CONFIG_HEADER section.
24177 #
24178
24179 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24180 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24181 #
24182 # ac_d sets the value in "#define NAME VALUE" lines.
24183 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24184 ac_dB='[        ].*$,\1#\2'
24185 ac_dC=' '
24186 ac_dD=',;t'
24187 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24188 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24189 ac_iB='\([      ]\),\1#\2define\3'
24190 ac_iC=' '
24191 ac_iD='\4,;t'
24192 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24193 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24194 ac_uB='$,\1#\2define\3'
24195 ac_uC=' '
24196 ac_uD=',;t'
24197
24198 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24199   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24200   case $ac_file in
24201   - | *:- | *:-:* ) # input from stdin
24202         cat >$tmp/stdin
24203         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24204         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24205   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24206         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24207   * )   ac_file_in=$ac_file.in ;;
24208   esac
24209
24210   test x"$ac_file" != x- && { echo "$as_me:24210: creating $ac_file" >&5
24211 echo "$as_me: creating $ac_file" >&6;}
24212
24213   # First look for the input files in the build tree, otherwise in the
24214   # src tree.
24215   ac_file_inputs=`IFS=:
24216     for f in $ac_file_in; do
24217       case $f in
24218       -) echo $tmp/stdin ;;
24219       [\\/$]*)
24220          # Absolute (can't be DOS-style, as IFS=:)
24221          test -f "$f" || { { echo "$as_me:24221: error: cannot find input file: $f" >&5
24222 echo "$as_me: error: cannot find input file: $f" >&2;}
24223    { (exit 1); exit 1; }; }
24224          echo $f;;
24225       *) # Relative
24226          if test -f "$f"; then
24227            # Build tree
24228            echo $f
24229          elif test -f "$srcdir/$f"; then
24230            # Source tree
24231            echo $srcdir/$f
24232          else
24233            # /dev/null tree
24234            { { echo "$as_me:24234: error: cannot find input file: $f" >&5
24235 echo "$as_me: error: cannot find input file: $f" >&2;}
24236    { (exit 1); exit 1; }; }
24237          fi;;
24238       esac
24239     done` || { (exit 1); exit 1; }
24240   # Remove the trailing spaces.
24241   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24242
24243 EOF
24244
24245 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24246 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24247 # be either 'cat' or 'sort'.
24248 cat confdefs.h | uniq >conftest.vals
24249
24250 # Break up conftest.vals because some shells have a limit on
24251 # the size of here documents, and old seds have small limits too.
24252
24253 rm -f conftest.tail
24254 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24255 while grep . conftest.vals >/dev/null
24256 do
24257   # Write chunks of a limited-size here document to conftest.frag.
24258   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24259   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24260   echo 'CEOF' >> $CONFIG_STATUS
24261   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24262   rm -f conftest.vals
24263   mv conftest.tail conftest.vals
24264 done
24265 rm -f conftest.vals
24266
24267 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24268 # marker @DEFS@.
24269 echo '  cat >> conftest.edit <<CEOF
24270 /@DEFS@/r conftest.frag
24271 /@DEFS@/d
24272 CEOF
24273 sed -f conftest.edit $tmp/in > $tmp/out
24274 rm -f $tmp/in
24275 mv $tmp/out $tmp/in
24276 rm -f conftest.edit conftest.frag
24277 ' >> $CONFIG_STATUS
24278
24279 cat >>$CONFIG_STATUS <<\EOF
24280   # Let's still pretend it is `configure' which instantiates (i.e., don't
24281   # use $as_me), people would be surprised to read:
24282   #    /* config.h.  Generated automatically by config.status.  */
24283   if test x"$ac_file" = x-; then
24284     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24285   else
24286     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24287   fi
24288   cat $tmp/in >>$tmp/config.h
24289   rm -f $tmp/in
24290   if test x"$ac_file" != x-; then
24291     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24292       { echo "$as_me:24292: $ac_file is unchanged" >&5
24293 echo "$as_me: $ac_file is unchanged" >&6;}
24294     else
24295       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24296          X"$ac_file" : 'X\(//\)[^/]' \| \
24297          X"$ac_file" : 'X\(//\)$' \| \
24298          X"$ac_file" : 'X\(/\)' \| \
24299          .     : '\(.\)' 2>/dev/null ||
24300 echo X"$ac_file" |
24301     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24302           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24303           /^X\(\/\/\)$/{ s//\1/; q; }
24304           /^X\(\/\).*/{ s//\1/; q; }
24305           s/.*/./; q'`
24306       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24307         { case "$ac_dir" in
24308   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24309   *)                      as_incr_dir=.;;
24310 esac
24311 as_dummy="$ac_dir"
24312 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24313   case $as_mkdir_dir in
24314     # Skip DOS drivespec
24315     ?:) as_incr_dir=$as_mkdir_dir ;;
24316     *)
24317       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24318       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24319     ;;
24320   esac
24321 done; }
24322
24323       fi
24324       rm -f $ac_file
24325       mv $tmp/config.h $ac_file
24326     fi
24327   else
24328     cat $tmp/config.h
24329     rm -f $tmp/config.h
24330   fi
24331 done
24332 EOF
24333 cat >>$CONFIG_STATUS <<\EOF
24334 #
24335 # CONFIG_COMMANDS section.
24336 #
24337 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24338   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24339   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24340
24341   case $ac_dest in
24342     default )
24343 if test "x$cf_with_tests" != xno ; then
24344
24345 for cf_dir in test
24346 do
24347         if test ! -d $srcdir/$cf_dir; then
24348                 continue
24349         elif test -f $srcdir/$cf_dir/programs; then
24350                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24351         fi
24352 done
24353
24354 fi
24355
24356 cf_prefix=$LIB_PREFIX
24357
24358 case $cf_cv_shlib_version in
24359 (cygdll|msysdll|mingw)
24360         TINFO_NAME=$TINFO_ARG_SUFFIX
24361         TINFO_SUFFIX=.dll
24362         ;;
24363 esac
24364
24365 if test -n "$TINFO_SUFFIX" ; then
24366         case $TINFO_SUFFIX in
24367         (tw*)
24368                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24369                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24370                 ;;
24371         (t*)
24372                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24373                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24374                 ;;
24375         (w*)
24376                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24377                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24378                 ;;
24379         esac
24380 fi
24381
24382 for cf_dir in $SRC_SUBDIRS
24383 do
24384         if test ! -d $srcdir/$cf_dir ; then
24385                 continue
24386         elif test -f $srcdir/$cf_dir/modules; then
24387
24388                 SHARED_LIB=
24389                 Libs_To_Make=
24390                 cf_awk_program=
24391                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
24392                 then
24393                         cf_awk_program="$cf_awk_program\
24394 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
24395 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
24396 "
24397                 fi
24398
24399                 if test "x$WILDCARD_SYMS" = xno
24400                 then
24401                         cf_awk_program="$cf_awk_program\
24402 /[      ]_\\*;/ { skip=1; next; }\
24403 "
24404                 fi
24405
24406                 if test "x$cf_awk_program" != "x"
24407                 then
24408                         cat >>$cf_dir/Makefile <<CF_EOF
24409
24410 # Generated by CF_LIB_RULES
24411 resulting.map: $UNALTERED_SYMS
24412         $AWK 'BEGIN { skip = 1; last=""; } \
24413 $cf_awk_program \
24414 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
24415  skip = 0; last = \$\$0; } \
24416 END { print last; }' < $UNALTERED_SYMS >\$@
24417
24418 distclean::
24419         rm -f resulting.map
24420 CF_EOF
24421                 fi
24422
24423                 for cf_item in $cf_LIST_MODELS
24424                 do
24425
24426         case X$cf_item in
24427         (Xlibtool)
24428                 cf_suffix='.la'
24429                 cf_depsuf=$cf_suffix
24430                 ;;
24431         (Xdebug)
24432                 cf_suffix='_g.a'
24433                 cf_depsuf=$cf_suffix
24434                 ;;
24435         (Xprofile)
24436                 cf_suffix='_p.a'
24437                 cf_depsuf=$cf_suffix
24438                 ;;
24439         (Xshared)
24440                 case $cf_cv_system_name in
24441                 (aix[5-7]*)
24442                         cf_suffix='.so'
24443                         cf_depsuf=$cf_suffix
24444                         ;;
24445                 (cygwin*|msys*|mingw*)
24446                         cf_suffix='.dll'
24447                         cf_depsuf='.dll.a'
24448                         ;;
24449                 (darwin*)
24450                         cf_suffix='.dylib'
24451                         cf_depsuf=$cf_suffix
24452                         ;;
24453                 (hpux*)
24454                         case $target in
24455                         (ia64*)
24456                                 cf_suffix='.so'
24457                                 cf_depsuf=$cf_suffix
24458                                 ;;
24459                         (*)
24460                                 cf_suffix='.sl'
24461                                 cf_depsuf=$cf_suffix
24462                                 ;;
24463                         esac
24464                         ;;
24465                 (*)
24466                         cf_suffix='.so'
24467                         cf_depsuf=$cf_suffix
24468                         ;;
24469                 esac
24470                 ;;
24471         (*)
24472                 cf_suffix='.a'
24473                 cf_depsuf=$cf_suffix
24474                 ;;
24475         esac
24476         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24477         then
24478                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24479                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24480         fi
24481
24482                         cf_libname=$cf_dir
24483                         test "$cf_dir" = c++ && cf_libname=ncurses++
24484                         if test $cf_item = shared ; then
24485                                 if test -n "${LIB_SUFFIX}"
24486                                 then
24487                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24488                                 else
24489                                         cf_shared_suffix="$cf_suffix"
24490                                 fi
24491                                 if test "$cf_cv_do_symlinks" = yes ; then
24492                                         cf_version_name=
24493
24494                                         case "$cf_cv_shlib_version" in
24495                                         (rel)
24496                                                 cf_version_name=REL_VERSION
24497                                                 ;;
24498                                         (abi)
24499                                                 cf_version_name=ABI_VERSION
24500                                                 ;;
24501                                         esac
24502
24503                                         if test -n "$cf_version_name"
24504                                         then
24505                                                 case "$cf_cv_system_name" in
24506                                                 (darwin*)
24507                                                         # "w", etc?
24508                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24509                                                         ;;
24510                                                 (*)
24511                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24512                                                         ;;
24513                                                 esac
24514                                         fi
24515                                         if test -n "${USE_LIB_SUFFIX}"
24516                                         then
24517                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24518                                         else
24519                                                 cf_shared_suffix="$cf_suffix"
24520                                         fi
24521                                 fi
24522                                 # cygwin needs import library, and has unique naming convention
24523                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24524                                 # use 'cyg' prefix for shared lib.
24525                                 case $cf_cv_shlib_version in
24526                                 (cygdll)
24527                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24528                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24529                                         ;;
24530                                 (msysdll)
24531                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24532                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24533                                         ;;
24534                                 (mingw)
24535                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24536                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24537                                         ;;
24538                                 (*)
24539                                         cf_add_lib=
24540                                         ;;
24541                                 esac
24542                                 if test -n "$cf_add_lib"
24543                                 then
24544                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24545                                         continue
24546                                 fi
24547                         fi
24548                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24549                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24550                 done
24551
24552                 if test $cf_dir = ncurses ; then
24553                         cf_subsets="$LIB_SUBSETS"
24554                         cf_r_parts="$cf_subsets"
24555                         cf_liblist="$Libs_To_Make"
24556
24557                         while test -n "$cf_r_parts"
24558                         do
24559                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24560                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24561                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24562                                         cf_add_lib=
24563                                         case $cf_l_parts in
24564                                         (*termlib*)
24565                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24566                                                 ;;
24567                                         (*ticlib*)
24568                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24569                                                 ;;
24570                                         (*)
24571                                                 break
24572                                                 ;;
24573                                         esac
24574                                         if test -n "$cf_add_lib"; then
24575                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24576                                         fi
24577                                 else
24578                                         break
24579                                 fi
24580                         done
24581                 else
24582                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24583                 fi
24584
24585                 if test $cf_dir = c++; then
24586                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24587                                 cf_list=
24588                                 for cf_item in $Libs_To_Make
24589                                 do
24590                                         case $cf_item in
24591                                         (*.a)
24592                                                 ;;
24593                                         (*)
24594                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24595                                                 ;;
24596                                         esac
24597                                         for cf_test in $cf_list
24598                                         do
24599                                                 if test "$cf_test" = "$cf_item"
24600                                                 then
24601                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24602                                                         cf_item=
24603                                                         break
24604                                                 fi
24605                                         done
24606                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24607                                 done
24608                                 Libs_To_Make="$cf_list"
24609                         fi
24610                 fi
24611
24612                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24613                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24614                         $cf_dir/Makefile >$cf_dir/Makefile.out
24615                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24616
24617                 $AWK -f $srcdir/mk-0th.awk \
24618                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24619                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24620
24621                 for cf_subset in $cf_subsets
24622                 do
24623                         cf_subdirs=
24624                         for cf_item in $cf_LIST_MODELS
24625                         do
24626
24627                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24628
24629 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24630
24631                         CXX_MODEL=$cf_ITEM
24632                         if test "$CXX_MODEL" = SHARED; then
24633                                 case $cf_cv_shlib_version in
24634                                 (cygdll|msysdll|mingw)
24635                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24636
24637 echo "${as_me:-configure}:24637: testing overriding CXX_MODEL to SHARED ..." 1>&5
24638
24639                                         with_shared_cxx=yes
24640                                         ;;
24641                                 (*)
24642                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24643                                         ;;
24644                                 esac
24645                         fi
24646
24647         case X$cf_item in
24648         (Xlibtool)
24649                 cf_suffix='.la'
24650                 cf_depsuf=$cf_suffix
24651                 ;;
24652         (Xdebug)
24653                 cf_suffix='_g.a'
24654                 cf_depsuf=$cf_suffix
24655                 ;;
24656         (Xprofile)
24657                 cf_suffix='_p.a'
24658                 cf_depsuf=$cf_suffix
24659                 ;;
24660         (Xshared)
24661                 case $cf_cv_system_name in
24662                 (aix[5-7]*)
24663                         cf_suffix='.so'
24664                         cf_depsuf=$cf_suffix
24665                         ;;
24666                 (cygwin*|msys*|mingw*)
24667                         cf_suffix='.dll'
24668                         cf_depsuf='.dll.a'
24669                         ;;
24670                 (darwin*)
24671                         cf_suffix='.dylib'
24672                         cf_depsuf=$cf_suffix
24673                         ;;
24674                 (hpux*)
24675                         case $target in
24676                         (ia64*)
24677                                 cf_suffix='.so'
24678                                 cf_depsuf=$cf_suffix
24679                                 ;;
24680                         (*)
24681                                 cf_suffix='.sl'
24682                                 cf_depsuf=$cf_suffix
24683                                 ;;
24684                         esac
24685                         ;;
24686                 (*)
24687                         cf_suffix='.so'
24688                         cf_depsuf=$cf_suffix
24689                         ;;
24690                 esac
24691                 ;;
24692         (*)
24693                 cf_suffix='.a'
24694                 cf_depsuf=$cf_suffix
24695                 ;;
24696         esac
24697         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24698         then
24699                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24700                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24701         fi
24702
24703         case $cf_item in
24704         (libtool) cf_subdir='obj_lo'  ;;
24705         (normal)  cf_subdir='objects' ;;
24706         (debug)   cf_subdir='obj_g' ;;
24707         (profile) cf_subdir='obj_p' ;;
24708         (shared)
24709                 case $cf_cv_system_name in
24710                 (cygwin|msys)
24711                         cf_subdir='objects' ;;
24712                 (*)
24713                         cf_subdir='obj_s' ;;
24714                 esac
24715         esac
24716
24717                         # Test for case where we build libtinfo with a different name.
24718                         cf_libname=$cf_dir
24719                         if test $cf_dir = ncurses ; then
24720                                 case $cf_subset in
24721                                 (*base*)
24722                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
24723                                         ;;
24724                                 (*termlib*)
24725                                         cf_libname=$TINFO_LIB_SUFFIX
24726                                         ;;
24727                                 (ticlib*)
24728                                         cf_libname=$TICS_LIB_SUFFIX
24729                                         ;;
24730                                 esac
24731                         elif test $cf_dir = c++ ; then
24732                                 cf_libname=ncurses++$USE_LIB_SUFFIX
24733                         else
24734                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
24735                         fi
24736                         if test -n "${USE_ARG_SUFFIX}" ; then
24737                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
24738                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
24739                         fi
24740
24741                         # These dependencies really are for development, not
24742                         # builds, but they are useful in porting, too.
24743                         cf_depend="../include/ncurses_cfg.h"
24744                         if test "$srcdir" = "."; then
24745                                 cf_reldir="."
24746                         else
24747                                 cf_reldir="\${srcdir}"
24748                         fi
24749
24750                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24751                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24752                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24753                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24754                         fi
24755
24756                         cf_dir_suffix=
24757                         old_cf_suffix="$cf_suffix"
24758                         if test "$cf_cv_shlib_version_infix" = yes ; then
24759                         if test -n "$USE_LIB_SUFFIX" ; then
24760                                 case $USE_LIB_SUFFIX in
24761                                 (tw*)
24762                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24763                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24764                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24765                                         ;;
24766                                 (t*)
24767                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24768                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24769                                         cf_dir_suffix=t$EXTRA_SUFFIX
24770                                         ;;
24771                                 (w*)
24772                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24773                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24774                                         cf_dir_suffix=w$EXTRA_SUFFIX
24775                                         ;;
24776                                 (*)
24777                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24778                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24779                                         cf_dir_suffix=$EXTRA_SUFFIX
24780                                         ;;
24781                                 esac
24782                         fi
24783                         fi
24784
24785                         $AWK -f $srcdir/mk-1st.awk \
24786                                 name=${cf_libname}${cf_dir_suffix} \
24787                                 traces=$LIB_TRACING \
24788                                 MODEL=$cf_ITEM \
24789                                 CXX_MODEL=$CXX_MODEL \
24790                                 model=$cf_subdir \
24791                                 prefix=$cf_prefix \
24792                                 suffix=$cf_suffix \
24793                                 subset=$cf_subset \
24794                                 driver=$cf_cv_term_driver \
24795                                 SymLink="$LN_S" \
24796                                 TermlibRoot=$TINFO_NAME \
24797                                 TermlibSuffix=$TINFO_SUFFIX \
24798                                 ShlibVer=$cf_cv_shlib_version \
24799                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24800                                 ReLink=${cf_cv_do_relink:-no} \
24801                                 DoLinks=$cf_cv_do_symlinks \
24802                                 rmSoLocs=$cf_cv_rm_so_locs \
24803                                 ldconfig="$LDCONFIG" \
24804                                 overwrite=$WITH_OVERWRITE \
24805                                 depend="$cf_depend" \
24806                                 host="$host" \
24807                                 libtool_version="$LIBTOOL_VERSION" \
24808                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24809
24810                         cf_suffix="$old_cf_suffix"
24811
24812                         for cf_subdir2 in $cf_subdirs lib
24813                         do
24814                                 test $cf_subdir = $cf_subdir2 && break
24815                         done
24816                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24817                         $AWK -f $srcdir/mk-2nd.awk \
24818                                 name=$cf_dir \
24819                                 traces=$LIB_TRACING \
24820                                 MODEL=$cf_ITEM \
24821                                 model=$cf_subdir \
24822                                 subset=$cf_subset \
24823                                 srcdir=$srcdir \
24824                                 echo=$WITH_ECHO \
24825                                 crenames=$cf_cv_prog_CC_c_o \
24826                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24827                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24828                         cf_subdirs="$cf_subdirs $cf_subdir"
24829                         done
24830                 done
24831         fi
24832
24833         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24834 done
24835
24836 for cf_dir in $SRC_SUBDIRS
24837 do
24838         if test ! -d $srcdir/$cf_dir ; then
24839                 continue
24840         fi
24841
24842         if test -f $cf_dir/Makefile ; then
24843                 case "$cf_dir" in
24844                 (Ada95)
24845                         echo 'libs \' >> Makefile
24846                         echo 'install.libs \' >> Makefile
24847                         echo 'uninstall.libs ::' >> Makefile
24848                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24849                         ;;
24850                 esac
24851         fi
24852
24853         if test -f $srcdir/$cf_dir/modules; then
24854                 echo >> Makefile
24855                 if test -f $srcdir/$cf_dir/headers; then
24856 cat >> Makefile <<CF_EOF
24857 install.includes \\
24858 uninstall.includes \\
24859 CF_EOF
24860                 fi
24861 if test "$cf_dir" != "c++" ; then
24862 echo 'lint \' >> Makefile
24863 fi
24864 cat >> Makefile <<CF_EOF
24865 libs \\
24866 lintlib \\
24867 install.libs \\
24868 uninstall.libs \\
24869 install.$cf_dir \\
24870 uninstall.$cf_dir ::
24871         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24872 CF_EOF
24873         elif test -f $srcdir/$cf_dir/headers; then
24874 cat >> Makefile <<CF_EOF
24875
24876 libs \\
24877 install.libs \\
24878 uninstall.libs \\
24879 install.includes \\
24880 uninstall.includes ::
24881         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24882 CF_EOF
24883 fi
24884 done
24885
24886 if test "x$cf_with_db_install" = xyes; then
24887 cat >> Makefile <<CF_EOF
24888
24889 install.libs uninstall.libs \\
24890 install.data uninstall.data ::
24891 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24892 CF_EOF
24893 else
24894 cat >> Makefile <<CF_EOF
24895
24896 install.libs uninstall.libs ::
24897         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24898 CF_EOF
24899 fi
24900
24901 if test "x$cf_with_manpages" = xyes; then
24902 cat >> Makefile <<CF_EOF
24903
24904 install.man \\
24905 uninstall.man ::
24906         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24907 CF_EOF
24908 fi
24909
24910 cat >> Makefile <<CF_EOF
24911
24912 distclean ::
24913         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24914         rm -f headers.sh headers.sed mk_shared_lib.sh
24915         rm -f edit_man.* man_alias.*
24916         rm -rf \${DIRS_TO_MAKE}
24917 CF_EOF
24918
24919 # Special case: tack's manpage lives in its own directory.
24920 if test "x$cf_with_manpages" = xyes; then
24921 if test -d tack ; then
24922 if test -f $srcdir/$tack.h; then
24923 cat >> Makefile <<CF_EOF
24924
24925 install.man \\
24926 uninstall.man ::
24927         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24928 CF_EOF
24929 fi
24930 fi
24931 fi
24932
24933 rm -f headers.sed headers.sh
24934
24935 echo creating headers.sh
24936 cat >headers.sh <<CF_EOF
24937 #! $SHELL
24938 # This shell script is generated by the 'configure' script.  It is invoked in a
24939 # subdirectory of the build tree.  It generates a sed-script in the parent
24940 # directory that is used to adjust includes for header files that reside in a
24941 # subdirectory of /usr/include, etc.
24942 PRG=""
24943 while test \$# != 3
24944 do
24945 PRG="\$PRG \$1"; shift
24946 done
24947 DST=\$1
24948 REF=\$2
24949 SRC=\$3
24950 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24951 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24952 echo installing \$SRC in \$DST
24953 CF_EOF
24954
24955 if test $WITH_CURSES_H = yes; then
24956         cat >>headers.sh <<CF_EOF
24957 case \$DST in
24958 (/*/include/*)
24959         END=\`basename \$DST\`
24960         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24961         do
24962                 NAME=\`basename \$i\`
24963                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24964         done
24965         ;;
24966 (*)
24967         echo "" >> \$TMPSED
24968         ;;
24969 esac
24970 CF_EOF
24971
24972 else
24973         cat >>headers.sh <<CF_EOF
24974 case \$DST in
24975 (/*/include/*)
24976         END=\`basename \$DST\`
24977         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24978         do
24979                 NAME=\`basename \$i\`
24980                 if test "\$NAME" = "curses.h"
24981                 then
24982                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24983                         NAME=ncurses.h
24984                 fi
24985                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24986         done
24987         ;;
24988 (*)
24989         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24990         ;;
24991 esac
24992 CF_EOF
24993 fi
24994 cat >>headers.sh <<CF_EOF
24995 rm -f \$TMPSRC
24996 sed -f \$TMPSED \$SRC > \$TMPSRC
24997 NAME=\`basename \$SRC\`
24998 CF_EOF
24999 if test $WITH_CURSES_H != yes; then
25000         cat >>headers.sh <<CF_EOF
25001 test "\$NAME" = "curses.h" && NAME=ncurses.h
25002 CF_EOF
25003 fi
25004 cat >>headers.sh <<CF_EOF
25005 # Just in case someone gzip'd manpages, remove the conflicting copy.
25006 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25007
25008 eval \$PRG \$TMPSRC \$DST/\$NAME
25009 rm -f \$TMPSRC \$TMPSED
25010 CF_EOF
25011
25012 chmod 0755 headers.sh
25013
25014 for cf_dir in $SRC_SUBDIRS
25015 do
25016         if test ! -d $srcdir/$cf_dir ; then
25017                 continue
25018         fi
25019
25020         if test -f $srcdir/$cf_dir/headers; then
25021                 $AWK -f $srcdir/mk-hdr.awk \
25022                         subset="$LIB_SUBSETS" \
25023                         compat="$WITH_CURSES_H" \
25024                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
25025         fi
25026
25027         if test -f $srcdir/$cf_dir/modules; then
25028                 if test "$cf_dir" != "c++" ; then
25029                         cat >>$cf_dir/Makefile <<"CF_EOF"
25030 depend : ${AUTO_SRC}
25031         makedepend -- ${CPPFLAGS} -- ${C_SRC}
25032
25033 # DO NOT DELETE THIS LINE -- make depend depends on it.
25034 CF_EOF
25035                 fi
25036         fi
25037 done
25038
25039 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25040 if test -z "$USE_OLD_MAKERULES" ; then
25041         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
25042 fi
25043 fi
25044  ;;
25045   esac
25046 done
25047 EOF
25048
25049 cat >>$CONFIG_STATUS <<\EOF
25050
25051 { (exit 0); exit 0; }
25052 EOF
25053 chmod +x $CONFIG_STATUS
25054 ac_clean_files=$ac_clean_files_save
25055
25056 # configure is writing to config.log, and then calls config.status.
25057 # config.status does its own redirection, appending to config.log.
25058 # Unfortunately, on DOS this fails, as config.log is still kept open
25059 # by configure, so config.status won't be able to write to it; its
25060 # output is simply discarded.  So we exec the FD to /dev/null,
25061 # effectively closing config.log, so it can be properly (re)opened and
25062 # appended to by config.status.  When coming back to configure, we
25063 # need to make the FD available again.
25064 if test "$no_create" != yes; then
25065   ac_cs_success=:
25066   exec 5>/dev/null
25067   $SHELL $CONFIG_STATUS || ac_cs_success=false
25068   exec 5>>config.log
25069   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25070   # would make configure fail if this is the last instruction.
25071   $ac_cs_success || { (exit 1); exit 1; }
25072 fi
25073 ${MAKE:-make} preinstall