]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20210102
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.726 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200802.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME=
188 PACKAGE_TARNAME=
189 PACKAGE_VERSION=
190 PACKAGE_STRING=
191 PACKAGE_BUGREPORT=
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236   | --dataroo | --dataro | --datar)
237     ac_prev=datarootdir ;;
238   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240     datarootdir=$ac_optarg ;;
241
242   -disable-* | --disable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     eval "enable_$ac_feature=no" ;;
250
251   -enable-* | --enable-*)
252     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253     # Reject names that are not valid shell variable names.
254     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256    { (exit 1); exit 1; }; }
257     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258     case $ac_option in
259       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260       *) ac_optarg=yes ;;
261     esac
262     eval "enable_$ac_feature='$ac_optarg'" ;;
263
264   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266   | --exec | --exe | --ex)
267     ac_prev=exec_prefix ;;
268   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270   | --exec=* | --exe=* | --ex=*)
271     exec_prefix=$ac_optarg ;;
272
273   -gas | --gas | --ga | --g)
274     # Obsolete; use --with-gas.
275     with_gas=yes ;;
276
277   -help | --help | --hel | --he | -h)
278     ac_init_help=long ;;
279   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280     ac_init_help=recursive ;;
281   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282     ac_init_help=short ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host_alias ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host_alias=$ac_optarg ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir=$ac_optarg ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir=$ac_optarg ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir=$ac_optarg ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir=$ac_optarg ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir=$ac_optarg ;;
321
322   -runstatedir | --runstatedir | --runstatedi | --runstated \
323   | --runstate | --runstat | --runsta | --runst \
324   | --runs | --run | --ru)
325     ac_prev=runstatedir ;;
326   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328   | --runs=* | --run=* | --ru=*)
329     runstatedir=$ac_optarg ;;
330
331   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332     ac_prev=mandir ;;
333   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334     mandir=$ac_optarg ;;
335
336   -nfp | --nfp | --nf)
337     # Obsolete; use --without-fp.
338     with_fp=no ;;
339
340   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341   | --no-cr | --no-c)
342     no_create=yes ;;
343
344   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346     no_recursion=yes ;;
347
348   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350   | --oldin | --oldi | --old | --ol | --o)
351     ac_prev=oldincludedir ;;
352   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355     oldincludedir=$ac_optarg ;;
356
357   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358     ac_prev=prefix ;;
359   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360     prefix=$ac_optarg ;;
361
362   -program-prefix | --program-prefix | --program-prefi | --program-pref \
363   | --program-pre | --program-pr | --program-p)
364     ac_prev=program_prefix ;;
365   -program-prefix=* | --program-prefix=* | --program-prefi=* \
366   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367     program_prefix=$ac_optarg ;;
368
369   -program-suffix | --program-suffix | --program-suffi | --program-suff \
370   | --program-suf | --program-su | --program-s)
371     ac_prev=program_suffix ;;
372   -program-suffix=* | --program-suffix=* | --program-suffi=* \
373   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374     program_suffix=$ac_optarg ;;
375
376   -program-transform-name | --program-transform-name \
377   | --program-transform-nam | --program-transform-na \
378   | --program-transform-n | --program-transform- \
379   | --program-transform | --program-transfor \
380   | --program-transfo | --program-transf \
381   | --program-trans | --program-tran \
382   | --progr-tra | --program-tr | --program-t)
383     ac_prev=program_transform_name ;;
384   -program-transform-name=* | --program-transform-name=* \
385   | --program-transform-nam=* | --program-transform-na=* \
386   | --program-transform-n=* | --program-transform-=* \
387   | --program-transform=* | --program-transfor=* \
388   | --program-transfo=* | --program-transf=* \
389   | --program-trans=* | --program-tran=* \
390   | --progr-tra=* | --program-tr=* | --program-t=*)
391     program_transform_name=$ac_optarg ;;
392
393   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394   | -silent | --silent | --silen | --sile | --sil)
395     silent=yes ;;
396
397   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398     ac_prev=sbindir ;;
399   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400   | --sbi=* | --sb=*)
401     sbindir=$ac_optarg ;;
402
403   -sharedstatedir | --sharedstatedir | --sharedstatedi \
404   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405   | --sharedst | --shareds | --shared | --share | --shar \
406   | --sha | --sh)
407     ac_prev=sharedstatedir ;;
408   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411   | --sha=* | --sh=*)
412     sharedstatedir=$ac_optarg ;;
413
414   -site | --site | --sit)
415     ac_prev=site ;;
416   -site=* | --site=* | --sit=*)
417     site=$ac_optarg ;;
418
419   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420     ac_prev=srcdir ;;
421   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422     srcdir=$ac_optarg ;;
423
424   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425   | --syscon | --sysco | --sysc | --sys | --sy)
426     ac_prev=sysconfdir ;;
427   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429     sysconfdir=$ac_optarg ;;
430
431   -target | --target | --targe | --targ | --tar | --ta | --t)
432     ac_prev=target_alias ;;
433   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434     target_alias=$ac_optarg ;;
435
436   -v | -verbose | --verbose | --verbos | --verbo | --verb)
437     verbose=yes ;;
438
439   -version | --version | --versio | --versi | --vers | -V)
440     ac_init_version=: ;;
441
442   -with-* | --with-*)
443     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444     # Reject names that are not valid shell variable names.
445     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446       { echo "$as_me: error: invalid package name: $ac_package" >&2
447    { (exit 1); exit 1; }; }
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case $ac_option in
450       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_$ac_package='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457     # Reject names that are not valid shell variable names.
458     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459       { echo "$as_me: error: invalid package name: $ac_package" >&2
460    { (exit 1); exit 1; }; }
461     ac_package=`echo $ac_package | sed 's/-/_/g'`
462     eval "with_$ac_package=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes=$ac_optarg ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries=$ac_optarg ;;
481
482   -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484    { (exit 1); exit 1; }; }
485     ;;
486
487   *=*)
488     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489     # Reject names that are not valid shell variable names.
490     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492    { (exit 1); exit 1; }; }
493     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494     eval "$ac_envvar='$ac_optarg'"
495     export $ac_envvar ;;
496
497   *)
498     # FIXME: should be removed in autoconf 3.0.
499     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503     ;;
504
505   esac
506 done
507
508 if test -n "$ac_prev"; then
509   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510   { echo "$as_me: error: missing argument to $ac_option" >&2
511    { (exit 1); exit 1; }; }
512 fi
513
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
516 do
517   eval ac_val=$`echo $ac_var`
518   case $ac_val in
519     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521    { (exit 1); exit 1; }; };;
522   esac
523 done
524
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527               localstatedir libdir includedir oldincludedir infodir mandir
528 do
529   eval ac_val=$`echo $ac_var`
530   case $ac_val in
531     [\\/$]* | ?:[\\/]* ) ;;
532     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533    { (exit 1); exit 1; }; };;
534   esac
535 done
536
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
539 build=$build_alias
540 host=$host_alias
541 target=$target_alias
542
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545   if test "x$build_alias" = x; then
546     cross_compiling=maybe
547     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548     If a cross compiler is detected then cross compile mode will be used." >&2
549   elif test "x$build_alias" != "x$host_alias"; then
550     cross_compiling=yes
551   fi
552 fi
553
554 ac_tool_prefix=
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557 test "$silent" = yes && exec 6>/dev/null
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576    { (exit 1); exit 1; }; }
577   else
578     { echo "$as_me: error: cannot find sources in $srcdir" >&2
579    { (exit 1); exit 1; }; }
580   fi
581 fi
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
596 ac_env_CC_value=$CC
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
615 ac_env_CXX_set=${CXX+set}
616 ac_env_CXX_value=$CXX
617 ac_cv_env_CXX_set=${CXX+set}
618 ac_cv_env_CXX_value=$CXX
619 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620 ac_env_CXXFLAGS_value=$CXXFLAGS
621 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623 ac_env_CXXCPP_set=${CXXCPP+set}
624 ac_env_CXXCPP_value=$CXXCPP
625 ac_cv_env_CXXCPP_set=${CXXCPP+set}
626 ac_cv_env_CXXCPP_value=$CXXCPP
627
628 #
629 # Report the --help message.
630 #
631 if test "$ac_init_help" = "long"; then
632   # Omit some internal or obsolete options to make the list less imposing.
633   # This message is too long to be a string in the A/UX 3.1 sh.
634   cat <<EOF
635 \`configure' configures this package to adapt to many kinds of systems.
636
637 Usage: $0 [OPTION]... [VAR=VALUE]...
638
639 To assign environment variables (e.g., CC, CFLAGS...), specify them as
640 VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642 Defaults for the options are specified in brackets.
643
644 Configuration:
645   -h, --help              display this help and exit
646       --help=short        display options specific to this package
647       --help=recursive    display the short help of all the included packages
648   -V, --version           display version information and exit
649   -q, --quiet, --silent   do not print \`checking...' messages
650       --cache-file=FILE   cache test results in FILE [disabled]
651   -C, --config-cache      alias for \`--cache-file=config.cache'
652   -n, --no-create         do not create output files
653       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655 EOF
656
657   cat <<EOF
658 Installation directories:
659   --prefix=PREFIX         install architecture-independent files in PREFIX
660                           [$ac_default_prefix]
661   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                           [PREFIX]
663
664 By default, \`make install' will install all the files in
665 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667 for instance \`--prefix=\$HOME'.
668
669 For better control, use the options below.
670
671 Fine tuning of the installation directories:
672   --bindir=DIR            user executables [EPREFIX/bin]
673   --sbindir=DIR           system admin executables [EPREFIX/sbin]
674   --libexecdir=DIR        program executables [EPREFIX/libexec]
675   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681   --libdir=DIR            object code libraries [EPREFIX/lib]
682   --includedir=DIR        C header files [PREFIX/include]
683   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684   --infodir=DIR           info documentation [DATAROOTDIR/info]
685   --mandir=DIR            man documentation [DATAROOTDIR/man]
686 EOF
687
688   cat <<\EOF
689
690 Program names:
691   --program-prefix=PREFIX            prepend PREFIX to installed program names
692   --program-suffix=SUFFIX            append SUFFIX to installed program names
693   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695 System types:
696   --build=BUILD           configure for building on BUILD [guessed]
697   --host=HOST       build programs to run on HOST [BUILD]
698   --target=TARGET   configure for building compilers for TARGET [HOST]
699 EOF
700 fi
701
702 if test -n "$ac_init_help"; then
703
704   cat <<\EOF
705
706 Optional Packages:
707   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710 Optional Features:
711   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714   --with-rel-version=XXX  override derived release version
715   --with-abi-version=XXX  override derived ABI version
716   --with-system-type=XXX  test: override derived host system-type
717   --without-ada           suppress check for Ada compiler, don't build demo
718   --without-cxx           do not adjust ncurses bool to match C++
719   --without-cxx-binding   do not build C++ binding and demo
720   --disable-db-install    suppress install of terminal database
721   --without-manpages      suppress install of manpages
722   --without-progs         suppress build/install with programs (e.g., tic)
723   --without-tack          suppress build/install with tack program
724   --without-tests         suppress build/install with test-programs
725   --without-curses-h      install curses.h as ncurses.h only
726   --with-config-suffix=X  suffixes ncursesXX-config file
727   --with-pkg-config{=path} enable/disable use of pkg-config
728   --with-pkg-config-libdir=XXX use given directory for installing pc-files
729   --enable-pc-files       generate and install .pc files for pkg-config
730   --with-pc-suffix        suffixes pc-files
731   --enable-mixed-case     tic should assume mixed-case filenames
732   --with-install-prefix   prefixes actual install-location ($DESTDIR)
733 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740 Options to Specify the Libraries Built/Used:
741   --disable-libtool-version  enable to use libtool's incompatible naming scheme
742   --with-libtool          generate libraries with libtool
743   --with-shared           generate shared-libraries
744   --with-normal           generate normal-libraries (default)
745   --with-debug            generate debug-libraries (default)
746   --with-profile          generate profile-libraries
747   --with-cxx-shared       generate C++ shared-libraries
748   --with-lib-prefix       override library-prefix
749   --with-termlib          generate separate terminfo library
750   --with-ticlib           generate separate tic library
751   --enable-rpath          use rpath option when generating shared libraries
752   --disable-relink        relink shared libraries during install
753   --with-shlib-version=X  Specify rel or abi version for shared libs
754   --with-libtool-opts=XXX specify additional libtool options
755   --with-export-syms=XXX  limit exported symbols using libtool
756   --with-versioned-syms=X markup versioned symbols using ld
757   --with-gpm              use Alessandro Rubini's GPM library
758   --without-dlsym         do not use dlsym() to load GPM dynamically
759   --with-pcre2            use PCRE2 for regular-expressions
760   --with-sysmouse         use sysmouse (FreeBSD console)
761   --disable-lib-suffixes  disable library suffixes
762   --disable-rpath-hack    don't add rpath options for additional libraries
763   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
764 Fine-Tuning Your Configuration:
765   --with-extra-suffix=X   append extra suffix to header/library paths
766   --disable-overwrite     put headers in subdir, omit link to -lcurses
767   --disable-database      do not use terminfo, only fallbacks/termcap
768   --with-database=XXX     specify terminfo source to install
769   --with-hashed-db        specify hashed-database library
770   --with-fallbacks=XXX    specify list of fallback terminal descriptions
771   --with-tic-path=XXX     specify path of tic for fallbacks
772   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
773   --without-xterm-new     specify if xterm terminfo should be old version
774   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
775   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
776   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
777   --disable-big-core      assume machine has little memory
778   --disable-big-strings   assume compiler has only standard-size strings
779   --enable-termcap        compile in termcap fallback support
780   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
781   --enable-getcap         fast termcap load, no xrefs to terminfo
782   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
783   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
784   --disable-root-environ  restrict environment when running as root
785   --enable-symlinks       make tic use symbolic links not hard links
786   --enable-broken_linker  compile with broken-linker support code
787   --enable-bsdpad         recognize BSD-style prefix padding
788   --enable-widec          compile with wide-char/UTF-8 code
789   --disable-lp64          allow chtype to be long (ignore _LP64)
790   --disable-largefile     omit support for large files
791   --disable-tparm-varargs compile tparm() without varargs interface
792   --disable-tic-depends   link tic library without explicit dependency on ncurses library
793   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
794   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
795   --with-bool=TYPE        override fallback type of bool variable
796   --with-caps=alt         compile with alternate Caps file
797   --with-chtype=TYPE      override type of chtype
798   --with-ospeed=TYPE      override type of ospeed variable
799   --with-mmask-t=TYPE     override type of mmask_t
800   --with-ccharw-max=XXX   override size CCHARW_MAX
801   --enable-signed-char    compile using signed Boolean's in term.h
802   --with-tparm-arg=TYPE   override parameter type of tparm
803   --with-rcs-ids          compile-in RCS identifiers
804 Options to Specify How Manpages are Installed:
805   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
806                           optionally formatted/catonly, e.g., gzip,formatted
807   --with-manpage-renames  specify manpage-renaming
808   --with-manpage-aliases  specify manpage-aliases using .so
809   --with-manpage-symlinks specify manpage-aliases using symlinks
810   --with-manpage-tbl      specify manpage processing with tbl
811 Extensions:
812   --disable-ext-funcs     disable function-extensions
813   --enable-sp-funcs       enable SCREEN-extensions
814   --enable-term-driver    enable terminal-driver
815   --enable-const          compile with extra/non-standard const
816   --enable-ext-colors     compile for 256-color support
817   --enable-ext-mouse      compile for extended mouse-encoding
818   --enable-ext-putwin     compile with extended putwin/screendump
819   --enable-no-padding     compile with $NCURSES_NO_PADDING code
820   --enable-sigwinch       compile with SIGWINCH handler
821   --enable-tcap-names     compile with user-definable terminal capabilities
822 Reentrant Code:
823   --with-pthread          use POSIX thread library
824   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
825   --enable-weak-symbols   enable weak-symbols for pthreads
826   --enable-reentrant      compile with reentrant code
827   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
828   --enable-opaque-form    make form-library structures "opaque"
829   --enable-opaque-menu    make menu-library structures "opaque"
830   --enable-opaque-panel   make panel-library structures "opaque"
831   --with-wrap-prefix=XXX  override prefix used for public variables
832 Development Code:
833   --without-develop       disable development options
834   --enable-hard-tabs      compile with hard-tabs code
835   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
836 Experimental Code:
837   --disable-assumed-color do not assume anything about default-colors
838   --disable-hashmap       compile without hashmap scrolling-optimization
839   --enable-colorfgbg      compile-in experimental $COLORFGBG code
840   --enable-fvisibility    compile with -fvisibility=hidden
841   --enable-interop        compile-in interop bindings
842   --enable-safe-sprintf   compile with experimental safe-sprintf code
843   --disable-scroll-hints  compile without scroll-hints code
844   --enable-wgetch-events  compile with wgetch-events code
845   --enable-exp-win32      compile with experimental-Windows driver
846 Testing/development Options:
847   --disable-echo          do not display "compiling" commands
848   --disable-stripping     do not strip (debug info) installed executables
849   --enable-warnings       test: turn on gcc compiler warnings
850   --enable-string-hacks   work around bogus compiler/loader warnings
851   --enable-assertions     test: turn on generation of assertion code
852   --with-dmalloc          test: use Gray Watson's dmalloc library
853   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
854   --with-valgrind         test: use valgrind
855   --disable-leaks         test: free permanent memory, analyze leaks
856   --enable-expanded       test: generate functions for certain macros
857   --disable-macros        test: use functions rather than macros
858   --with-trace            test: add trace() function to all models of ncurses
859   --disable-gnat-projects test: disable GNAT projects even if usable
860 Ada Binding Options:
861   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
862   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
863   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
864   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
865   --with-ada-libname=XXX  override default Ada library-name
866   --with-form-libname=XXX override form basename of library
867   --with-menu-libname=XXX override menu basename of library
868   --with-panel-libname=XXX override panel basename of library
869   --with-cxx-libname=XXX override ncurses++ basename of library
870
871 Some influential environment variables:
872   CC          C compiler command
873   CFLAGS      C compiler flags
874   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
875               nonstandard directory <lib dir>
876   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
877               headers in a nonstandard directory <include dir>
878   CPP         C preprocessor
879   CXX         C++ compiler command
880   CXXFLAGS    C++ compiler flags
881   CXXCPP      C++ preprocessor
882
883 Use these variables to override the choices made by `configure' or to help
884 it to find libraries and programs with nonstandard names/locations.
885
886 EOF
887 fi
888
889 if test "$ac_init_help" = "recursive"; then
890   # If there are subdirs, report their specific --help.
891   ac_popdir=`pwd`
892   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
893     cd $ac_subdir
894     # A "../" for each directory in /$ac_subdir.
895     ac_dots=`echo $ac_subdir |
896              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
897
898     case $srcdir in
899     .) # No --srcdir option.  We are building in place.
900       ac_sub_srcdir=$srcdir ;;
901     [\\/]* | ?:[\\/]* ) # Absolute path.
902       ac_sub_srcdir=$srcdir/$ac_subdir ;;
903     *) # Relative path.
904       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
905     esac
906
907     # Check for guested configure; otherwise get Cygnus style configure.
908     if test -f $ac_sub_srcdir/configure.gnu; then
909       echo
910       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
911     elif test -f $ac_sub_srcdir/configure; then
912       echo
913       $SHELL $ac_sub_srcdir/configure  --help=recursive
914     elif test -f $ac_sub_srcdir/configure.ac ||
915            test -f $ac_sub_srcdir/configure.in; then
916       echo
917       $ac_configure --help
918     else
919       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
920     fi
921     cd $ac_popdir
922   done
923 fi
924
925 test -n "$ac_init_help" && exit 0
926 if $ac_init_version; then
927   cat <<\EOF
928
929 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
930 Free Software Foundation, Inc.
931 This configure script is free software; the Free Software Foundation
932 gives unlimited permission to copy, distribute and modify it.
933 EOF
934   exit 0
935 fi
936 exec 5>config.log
937 cat >&5 <<EOF
938 This file contains any messages produced by compilers while
939 running configure, to aid debugging if configure makes a mistake.
940
941 It was created by $as_me, which was
942 generated by GNU Autoconf 2.52.20200802.  Invocation command line was
943
944   $ $0 $@
945
946 EOF
947 {
948 cat <<_ASUNAME
949 ## ---------- ##
950 ## Platform.  ##
951 ## ---------- ##
952
953 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
954 uname -m = `(uname -m) 2>/dev/null || echo unknown`
955 uname -r = `(uname -r) 2>/dev/null || echo unknown`
956 uname -s = `(uname -s) 2>/dev/null || echo unknown`
957 uname -v = `(uname -v) 2>/dev/null || echo unknown`
958
959 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
960 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
961
962 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
963 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
964 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
965 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
966 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
967 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
968 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
969
970 PATH = $PATH
971
972 _ASUNAME
973 } >&5
974
975 cat >&5 <<EOF
976 ## ------------ ##
977 ## Core tests.  ##
978 ## ------------ ##
979
980 EOF
981
982 # Keep a trace of the command line.
983 # Strip out --no-create and --no-recursion so they do not pile up.
984 # Also quote any args containing shell meta-characters.
985 ac_configure_args=
986 ac_sep=
987 for ac_arg
988 do
989   case $ac_arg in
990   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
991   | --no-cr | --no-c) ;;
992   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
993   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
994   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
995     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
996     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
997     ac_sep=" " ;;
998   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
999      ac_sep=" " ;;
1000   esac
1001   # Get rid of the leading space.
1002 done
1003
1004 # When interrupted or exit'd, cleanup temporary files, and complete
1005 # config.log.  We remove comments because anyway the quotes in there
1006 # would cause problems or look ugly.
1007 trap 'exit_status=$?
1008   # Save into config.log some information that might help in debugging.
1009   echo >&5
1010   echo "## ----------------- ##" >&5
1011   echo "## Cache variables.  ##" >&5
1012   echo "## ----------------- ##" >&5
1013   echo >&5
1014   # The following way of writing the cache mishandles newlines in values,
1015 {
1016   (set) 2>&1 |
1017     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1018     *ac_space=\ *)
1019       sed -n \
1020         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1021           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1022       ;;
1023     *)
1024       sed -n \
1025         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1026       ;;
1027     esac;
1028 } >&5
1029   sed "/^$/d" confdefs.h >conftest.log
1030   if test -s conftest.log; then
1031     echo >&5
1032     echo "## ------------ ##" >&5
1033     echo "## confdefs.h.  ##" >&5
1034     echo "## ------------ ##" >&5
1035     echo >&5
1036     cat conftest.log >&5
1037   fi
1038   (echo; echo) >&5
1039   test "$ac_signal" != 0 &&
1040     echo "$as_me: caught signal $ac_signal" >&5
1041   echo "$as_me: exit $exit_status" >&5
1042   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1043     exit $exit_status
1044      ' 0
1045 for ac_signal in 1 2 13 15; do
1046   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1047 done
1048 ac_signal=0
1049
1050 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1051 rm -rf conftest* confdefs.h
1052 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1053 echo >confdefs.h
1054
1055 # Let the site file select an alternate cache file if it wants to.
1056 # Prefer explicitly selected file to automatically selected ones.
1057 if test -z "$CONFIG_SITE"; then
1058   if test "x$prefix" != xNONE; then
1059     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1060   else
1061     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1062   fi
1063 fi
1064 for ac_site_file in $CONFIG_SITE; do
1065   if test -r "$ac_site_file"; then
1066     { echo "$as_me:1066: loading site script $ac_site_file" >&5
1067 echo "$as_me: loading site script $ac_site_file" >&6;}
1068     cat "$ac_site_file" >&5
1069     . "$ac_site_file"
1070   fi
1071 done
1072
1073 if test -r "$cache_file"; then
1074   # Some versions of bash will fail to source /dev/null (special
1075   # files actually), so we avoid doing that.
1076   if test -f "$cache_file"; then
1077     { echo "$as_me:1077: loading cache $cache_file" >&5
1078 echo "$as_me: loading cache $cache_file" >&6;}
1079     case $cache_file in
1080       [\\/]* | ?:[\\/]* ) . $cache_file;;
1081       *)                      . ./$cache_file;;
1082     esac
1083   fi
1084 else
1085   { echo "$as_me:1085: creating cache $cache_file" >&5
1086 echo "$as_me: creating cache $cache_file" >&6;}
1087   >$cache_file
1088 fi
1089
1090 # Check that the precious variables saved in the cache have kept the same
1091 # value.
1092 ac_cache_corrupted=false
1093 for ac_var in `(set) 2>&1 |
1094                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1095   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1096   eval ac_new_set=\$ac_env_${ac_var}_set
1097   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1098   eval ac_new_val="\$ac_env_${ac_var}_value"
1099   case $ac_old_set,$ac_new_set in
1100     set,)
1101       { echo "$as_me:1101: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1102 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1103       ac_cache_corrupted=: ;;
1104     ,set)
1105       { echo "$as_me:1105: error: \`$ac_var' was not set in the previous run" >&5
1106 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1107       ac_cache_corrupted=: ;;
1108     ,);;
1109     *)
1110       if test "x$ac_old_val" != "x$ac_new_val"; then
1111         { echo "$as_me:1111: error: \`$ac_var' has changed since the previous run:" >&5
1112 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1113         { echo "$as_me:1113:   former value:  $ac_old_val" >&5
1114 echo "$as_me:   former value:  $ac_old_val" >&2;}
1115         { echo "$as_me:1115:   current value: $ac_new_val" >&5
1116 echo "$as_me:   current value: $ac_new_val" >&2;}
1117         ac_cache_corrupted=:
1118       fi;;
1119   esac
1120   # Pass precious variables to config.status.  It doesn't matter if
1121   # we pass some twice (in addition to the command line arguments).
1122   if test "$ac_new_set" = set; then
1123     case $ac_new_val in
1124     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1125       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1126       ac_configure_args="$ac_configure_args '$ac_arg'"
1127       ;;
1128     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1129        ;;
1130     esac
1131   fi
1132 done
1133 if $ac_cache_corrupted; then
1134   { echo "$as_me:1134: error: changes in the environment can compromise the build" >&5
1135 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1136   { { echo "$as_me:1136: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1137 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1138    { (exit 1); exit 1; }; }
1139 fi
1140
1141 ac_ext=c
1142 ac_cpp='$CPP $CPPFLAGS'
1143 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1144 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1145 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1146 ac_main_return=return
1147
1148 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1149   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1150                    ECHO_T='     ' ;;
1151   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1152   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1153 esac
1154 echo "#! $SHELL" >conftest.sh
1155 echo  "exit 0"   >>conftest.sh
1156 chmod +x conftest.sh
1157 if { (echo "$as_me:1157: PATH=\".;.\"; conftest.sh") >&5
1158   (PATH=".;."; conftest.sh) 2>&5
1159   ac_status=$?
1160   echo "$as_me:1160: \$? = $ac_status" >&5
1161   (exit $ac_status); }; then
1162   ac_path_separator=';'
1163 else
1164   ac_path_separator=:
1165 fi
1166 PATH_SEPARATOR="$ac_path_separator"
1167 rm -f conftest.sh
1168
1169 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1170
1171 top_builddir=`pwd`
1172
1173 echo "$as_me:1173: checking for egrep" >&5
1174 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1175 if test "${ac_cv_prog_egrep+set}" = set; then
1176   echo $ECHO_N "(cached) $ECHO_C" >&6
1177 else
1178   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1179                 then ac_cv_prog_egrep='grep -E'
1180                 else ac_cv_prog_egrep='egrep'
1181         fi
1182 fi
1183 echo "$as_me:1183: result: $ac_cv_prog_egrep" >&5
1184 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1185         EGREP=$ac_cv_prog_egrep
1186
1187         test -z "$EGREP" && { { echo "$as_me:1187: error: No egrep program found" >&5
1188 echo "$as_me: error: No egrep program found" >&2;}
1189    { (exit 1); exit 1; }; }
1190
1191 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1192 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1193 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1194 cf_cv_abi_version=${NCURSES_MAJOR}
1195 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1196 cf_cv_timestamp=`date`
1197 echo "$as_me:1197: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1198 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1199
1200 if test -f $srcdir/VERSION ; then
1201         echo "$as_me:1201: checking for package version" >&5
1202 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1203
1204         # if there are not enough fields, cut returns the last one...
1205         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1206         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1207         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1208
1209         # this is how CF_BUNDLED_INTL uses $VERSION:
1210         VERSION="$cf_field1"
1211
1212         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1213         test -z "$VERSION_MAJOR" && { { echo "$as_me:1213: error: missing major-version" >&5
1214 echo "$as_me: error: missing major-version" >&2;}
1215    { (exit 1); exit 1; }; }
1216
1217         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1218         test -z "$VERSION_MINOR" && { { echo "$as_me:1218: error: missing minor-version" >&5
1219 echo "$as_me: error: missing minor-version" >&2;}
1220    { (exit 1); exit 1; }; }
1221
1222         echo "$as_me:1222: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1223 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1224
1225         echo "$as_me:1225: checking for package patch date" >&5
1226 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1227         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1228         case .$VERSION_PATCH in
1229         (.)
1230                 { { echo "$as_me:1230: error: missing patch-date $VERSION_PATCH" >&5
1231 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1232    { (exit 1); exit 1; }; }
1233                 ;;
1234         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1235                 ;;
1236         (*)
1237                 { { echo "$as_me:1237: error: illegal patch-date $VERSION_PATCH" >&5
1238 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1239    { (exit 1); exit 1; }; }
1240                 ;;
1241         esac
1242         echo "$as_me:1242: result: $VERSION_PATCH" >&5
1243 echo "${ECHO_T}$VERSION_PATCH" >&6
1244 else
1245         { { echo "$as_me:1245: error: did not find $srcdir/VERSION" >&5
1246 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1247    { (exit 1); exit 1; }; }
1248 fi
1249
1250 # show the actual data that we have for versions:
1251 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1252
1253 echo "${as_me:-configure}:1253: testing ABI VERSION $VERSION ..." 1>&5
1254
1255 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1256
1257 echo "${as_me:-configure}:1257: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1258
1259 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1260
1261 echo "${as_me:-configure}:1261: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1262
1263 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1264
1265 echo "${as_me:-configure}:1265: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1266
1267         cf_PACKAGE=NCURSES
1268         PACKAGE=ncurses
1269
1270 cat >>confdefs.h <<EOF
1271 #define PACKAGE "$PACKAGE"
1272 EOF
1273
1274 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1275
1276         cat >>confdefs.h <<EOF
1277 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1278 EOF
1279
1280         cat >>confdefs.h <<EOF
1281 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1282 EOF
1283
1284 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1285
1286 # Check whether --with-rel-version or --without-rel-version was given.
1287 if test "${with_rel_version+set}" = set; then
1288   withval="$with_rel_version"
1289   { echo "$as_me:1289: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1290 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1291  cf_cv_rel_version=$withval
1292 fi;
1293
1294  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1295  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1296
1297 if test -n "$NCURSES_MAJOR" ; then
1298   case $NCURSES_MAJOR in
1299   ([0-9]*)
1300         ;;
1301   (*)
1302         { { echo "$as_me:1302: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1303 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1304    { (exit 1); exit 1; }; }
1305         ;;
1306   esac
1307 else
1308   { { echo "$as_me:1308: error: Release major-version value is empty" >&5
1309 echo "$as_me: error: Release major-version value is empty" >&2;}
1310    { (exit 1); exit 1; }; }
1311 fi
1312
1313 if test -n "$NCURSES_MINOR" ; then
1314   case $NCURSES_MINOR in
1315   ([0-9]*)
1316         ;;
1317   (*)
1318         { { echo "$as_me:1318: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1319 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1320    { (exit 1); exit 1; }; }
1321         ;;
1322   esac
1323 else
1324   { { echo "$as_me:1324: error: Release minor-version value is empty" >&5
1325 echo "$as_me: error: Release minor-version value is empty" >&2;}
1326    { (exit 1); exit 1; }; }
1327 fi
1328
1329 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1330
1331 # Check whether --with-abi-version or --without-abi-version was given.
1332 if test "${with_abi_version+set}" = set; then
1333   withval="$with_abi_version"
1334
1335         if test "x$cf_cv_abi_version" != "x$withval"
1336         then
1337                 { echo "$as_me:1337: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1338 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1339                 case $cf_cv_rel_version in
1340                 (5.*)
1341                         cf_cv_rel_version=$withval.0
1342                         ;;
1343                 (6.*)
1344                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1345                         ;;
1346                 esac
1347         fi
1348         cf_cv_abi_version=$withval
1349 fi;
1350
1351 if test -n "$cf_cv_abi_version" ; then
1352   case $cf_cv_abi_version in
1353   ([0-9]*)
1354         ;;
1355   (*)
1356         { { echo "$as_me:1356: error: ABI version is not a number: $cf_cv_abi_version" >&5
1357 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1358    { (exit 1); exit 1; }; }
1359         ;;
1360   esac
1361 else
1362   { { echo "$as_me:1362: error: ABI version value is empty" >&5
1363 echo "$as_me: error: ABI version value is empty" >&2;}
1364    { (exit 1); exit 1; }; }
1365 fi
1366
1367 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1368 then
1369         case $cf_cv_rel_version in
1370         (5.*)
1371                 cf_cv_rel_version=$with_abi_version.0
1372                 ;;
1373         esac
1374 fi
1375
1376 ac_aux_dir=
1377 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1378   if test -f $ac_dir/install-sh; then
1379     ac_aux_dir=$ac_dir
1380     ac_install_sh="$ac_aux_dir/install-sh -c"
1381     break
1382   elif test -f $ac_dir/install.sh; then
1383     ac_aux_dir=$ac_dir
1384     ac_install_sh="$ac_aux_dir/install.sh -c"
1385     break
1386   elif test -f $ac_dir/shtool; then
1387     ac_aux_dir=$ac_dir
1388     ac_install_sh="$ac_aux_dir/shtool install -c"
1389     break
1390   fi
1391 done
1392 if test -z "$ac_aux_dir"; then
1393   { { echo "$as_me:1393: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1394 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1395    { (exit 1); exit 1; }; }
1396 fi
1397 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1398 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1399 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1400
1401 # Make sure we can run config.sub.
1402 $ac_config_sub sun4 >/dev/null 2>&1 ||
1403   { { echo "$as_me:1403: error: cannot run $ac_config_sub" >&5
1404 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1405    { (exit 1); exit 1; }; }
1406
1407 echo "$as_me:1407: checking build system type" >&5
1408 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1409 if test "${ac_cv_build+set}" = set; then
1410   echo $ECHO_N "(cached) $ECHO_C" >&6
1411 else
1412   ac_cv_build_alias=$build_alias
1413 test -z "$ac_cv_build_alias" &&
1414   ac_cv_build_alias=`$ac_config_guess`
1415 test -z "$ac_cv_build_alias" &&
1416   { { echo "$as_me:1416: error: cannot guess build type; you must specify one" >&5
1417 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1418    { (exit 1); exit 1; }; }
1419 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1420   { { echo "$as_me:1420: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1421 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1422    { (exit 1); exit 1; }; }
1423
1424 fi
1425 echo "$as_me:1425: result: $ac_cv_build" >&5
1426 echo "${ECHO_T}$ac_cv_build" >&6
1427 build=$ac_cv_build
1428 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1429 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1430 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1431
1432 echo "$as_me:1432: checking host system type" >&5
1433 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1434 if test "${ac_cv_host+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   ac_cv_host_alias=$host_alias
1438 test -z "$ac_cv_host_alias" &&
1439   ac_cv_host_alias=$ac_cv_build_alias
1440 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1441   { { echo "$as_me:1441: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1442 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1443    { (exit 1); exit 1; }; }
1444
1445 fi
1446 echo "$as_me:1446: result: $ac_cv_host" >&5
1447 echo "${ECHO_T}$ac_cv_host" >&6
1448 host=$ac_cv_host
1449 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1454         echo "$as_me:1454: checking target system type" >&5
1455 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1456 if test "${ac_cv_target+set}" = set; then
1457   echo $ECHO_N "(cached) $ECHO_C" >&6
1458 else
1459   ac_cv_target_alias=$target_alias
1460 test "x$ac_cv_target_alias" = "x" &&
1461   ac_cv_target_alias=$ac_cv_host_alias
1462 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1463   { { echo "$as_me:1463: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1464 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1465    { (exit 1); exit 1; }; }
1466
1467 fi
1468 echo "$as_me:1468: result: $ac_cv_target" >&5
1469 echo "${ECHO_T}$ac_cv_target" >&6
1470 target=$ac_cv_target
1471 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1472 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1473 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1474
1475 # The aliases save the names the user supplied, while $host etc.
1476 # will get canonicalized.
1477 test -n "$target_alias" &&
1478   test "$program_prefix$program_suffix$program_transform_name" = \
1479     NONENONEs,x,x, &&
1480   program_prefix=${target_alias}-
1481         system_name="$host_os"
1482 else
1483         system_name="`(uname -s -r) 2>/dev/null`"
1484         if test -z "$system_name" ; then
1485                 system_name="`(hostname) 2>/dev/null`"
1486         fi
1487 fi
1488 test -n "$system_name" &&
1489 cat >>confdefs.h <<EOF
1490 #define SYSTEM_NAME "$system_name"
1491 EOF
1492
1493 if test "${cf_cv_system_name+set}" = set; then
1494   echo $ECHO_N "(cached) $ECHO_C" >&6
1495 else
1496   cf_cv_system_name="$system_name"
1497 fi
1498
1499 test -z "$system_name" && system_name="$cf_cv_system_name"
1500 test -n "$cf_cv_system_name" && echo "$as_me:1500: result: Configuring for $cf_cv_system_name" >&5
1501 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1502
1503 if test ".$system_name" != ".$cf_cv_system_name" ; then
1504         echo "$as_me:1504: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1505 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1506         { { echo "$as_me:1506: error: \"Please remove config.cache and try again.\"" >&5
1507 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1508    { (exit 1); exit 1; }; }
1509 fi
1510
1511 # Check whether --with-system-type or --without-system-type was given.
1512 if test "${with_system_type+set}" = set; then
1513   withval="$with_system_type"
1514   { echo "$as_me:1514: WARNING: overriding system type to $withval" >&5
1515 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1516         cf_cv_system_name=$withval
1517         host_os=$withval
1518
1519 fi;
1520
1521 ###     Save the given $CFLAGS to allow user-override.
1522 cf_user_CFLAGS="$CFLAGS"
1523
1524 ###     Default install-location
1525
1526 echo "$as_me:1526: checking for prefix" >&5
1527 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1528 if test "x$prefix" = "xNONE" ; then
1529         case "$cf_cv_system_name" in
1530                 # non-vendor systems don't have a conflict
1531         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1532                 prefix=/usr
1533                 ;;
1534         (*)     prefix=$ac_default_prefix
1535                 ;;
1536         esac
1537 fi
1538 echo "$as_me:1538: result: $prefix" >&5
1539 echo "${ECHO_T}$prefix" >&6
1540
1541 if test "x$prefix" = "xNONE" ; then
1542 echo "$as_me:1542: checking for default include-directory" >&5
1543 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1544 test -n "$verbose" && echo 1>&6
1545 for cf_symbol in \
1546         $includedir \
1547         $includedir/ncurses \
1548         $prefix/include \
1549         $prefix/include/ncurses \
1550         /usr/local/include \
1551         /usr/local/include/ncurses \
1552         /usr/include \
1553         /usr/include/ncurses
1554 do
1555         cf_dir=`eval echo $cf_symbol`
1556         if test -f $cf_dir/curses.h ; then
1557         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1558                 includedir="$cf_symbol"
1559                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1560                 break
1561         fi
1562         fi
1563         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1564 done
1565 echo "$as_me:1565: result: $includedir" >&5
1566 echo "${ECHO_T}$includedir" >&6
1567 fi
1568
1569 ### Defaults for ncurses ABI
1570
1571 case x$cf_cv_abi_version in
1572 (x[6789])
1573         cf_dft_ext_colors=yes
1574         cf_dft_ext_const=yes
1575         cf_dft_ext_mouse=yes
1576         cf_dft_ext_putwin=yes
1577         cf_dft_ext_spfuncs=yes
1578         cf_dft_filter_syms=yes
1579         cf_dft_chtype=uint32_t
1580         cf_dft_mmask_t=uint32_t
1581         cf_dft_interop=yes
1582         cf_dft_tparm_arg=intptr_t
1583         cf_dft_with_lp64=yes
1584         ;;
1585 (*)
1586         cf_dft_ext_colors=no
1587         cf_dft_ext_const=no
1588         cf_dft_ext_mouse=no
1589         cf_dft_ext_putwin=no
1590         cf_dft_ext_spfuncs=no
1591         cf_dft_filter_syms=no
1592         cf_dft_chtype=auto
1593         cf_dft_mmask_t=auto
1594         cf_dft_interop=no
1595         cf_dft_tparm_arg=long
1596         cf_dft_with_lp64=no
1597         ;;
1598 esac
1599
1600 ###     Checks for programs.
1601
1602 # Check whether --with-ada or --without-ada was given.
1603 if test "${with_ada+set}" = set; then
1604   withval="$with_ada"
1605   cf_with_ada=$withval
1606 else
1607   cf_with_ada=yes
1608 fi;
1609
1610 if test "x$cf_with_ada" = xyes
1611 then
1612         cf_prog_cc="gnatgcc gcc cc"
1613 else
1614         cf_prog_cc="gcc cc"
1615 fi
1616
1617 ac_ext=c
1618 ac_cpp='$CPP $CPPFLAGS'
1619 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1620 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1621 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1622 ac_main_return=return
1623 if test -n "$ac_tool_prefix"; then
1624   for ac_prog in $cf_prog_cc
1625   do
1626     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1627 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1628 echo "$as_me:1628: checking for $ac_word" >&5
1629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1630 if test "${ac_cv_prog_CC+set}" = set; then
1631   echo $ECHO_N "(cached) $ECHO_C" >&6
1632 else
1633   if test -n "$CC"; then
1634   ac_cv_prog_CC="$CC" # Let the user override the test.
1635 else
1636   ac_save_IFS=$IFS; IFS=$ac_path_separator
1637 ac_dummy="$PATH"
1638 for ac_dir in $ac_dummy; do
1639   IFS=$ac_save_IFS
1640   test -z "$ac_dir" && ac_dir=.
1641   $as_executable_p "$ac_dir/$ac_word" || continue
1642 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1643 echo "$as_me:1643: found $ac_dir/$ac_word" >&5
1644 break
1645 done
1646
1647 fi
1648 fi
1649 CC=$ac_cv_prog_CC
1650 if test -n "$CC"; then
1651   echo "$as_me:1651: result: $CC" >&5
1652 echo "${ECHO_T}$CC" >&6
1653 else
1654   echo "$as_me:1654: result: no" >&5
1655 echo "${ECHO_T}no" >&6
1656 fi
1657
1658     test -n "$CC" && break
1659   done
1660 fi
1661 if test -z "$CC"; then
1662   ac_ct_CC=$CC
1663   for ac_prog in $cf_prog_cc
1664 do
1665   # Extract the first word of "$ac_prog", so it can be a program name with args.
1666 set dummy $ac_prog; ac_word=$2
1667 echo "$as_me:1667: checking for $ac_word" >&5
1668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1669 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1670   echo $ECHO_N "(cached) $ECHO_C" >&6
1671 else
1672   if test -n "$ac_ct_CC"; then
1673   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1674 else
1675   ac_save_IFS=$IFS; IFS=$ac_path_separator
1676 ac_dummy="$PATH"
1677 for ac_dir in $ac_dummy; do
1678   IFS=$ac_save_IFS
1679   test -z "$ac_dir" && ac_dir=.
1680   $as_executable_p "$ac_dir/$ac_word" || continue
1681 ac_cv_prog_ac_ct_CC="$ac_prog"
1682 echo "$as_me:1682: found $ac_dir/$ac_word" >&5
1683 break
1684 done
1685
1686 fi
1687 fi
1688 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1689 if test -n "$ac_ct_CC"; then
1690   echo "$as_me:1690: result: $ac_ct_CC" >&5
1691 echo "${ECHO_T}$ac_ct_CC" >&6
1692 else
1693   echo "$as_me:1693: result: no" >&5
1694 echo "${ECHO_T}no" >&6
1695 fi
1696
1697   test -n "$ac_ct_CC" && break
1698 done
1699
1700   CC=$ac_ct_CC
1701 fi
1702
1703 test -z "$CC" && { { echo "$as_me:1703: error: no acceptable cc found in \$PATH" >&5
1704 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1705    { (exit 1); exit 1; }; }
1706
1707 # Provide some information about the compiler.
1708 echo "$as_me:1708:" \
1709      "checking for C compiler version" >&5
1710 ac_compiler=`set X $ac_compile; echo $2`
1711 { (eval echo "$as_me:1711: \"$ac_compiler --version </dev/null >&5\"") >&5
1712   (eval $ac_compiler --version </dev/null >&5) 2>&5
1713   ac_status=$?
1714   echo "$as_me:1714: \$? = $ac_status" >&5
1715   (exit $ac_status); }
1716 { (eval echo "$as_me:1716: \"$ac_compiler -v </dev/null >&5\"") >&5
1717   (eval $ac_compiler -v </dev/null >&5) 2>&5
1718   ac_status=$?
1719   echo "$as_me:1719: \$? = $ac_status" >&5
1720   (exit $ac_status); }
1721 { (eval echo "$as_me:1721: \"$ac_compiler -V </dev/null >&5\"") >&5
1722   (eval $ac_compiler -V </dev/null >&5) 2>&5
1723   ac_status=$?
1724   echo "$as_me:1724: \$? = $ac_status" >&5
1725   (exit $ac_status); }
1726
1727 cat >conftest.$ac_ext <<_ACEOF
1728 #line 1728 "configure"
1729 #include "confdefs.h"
1730
1731 int
1732 main (void)
1733 {
1734
1735   ;
1736   return 0;
1737 }
1738 _ACEOF
1739 ac_clean_files_save=$ac_clean_files
1740 ac_clean_files="$ac_clean_files a.out a.exe"
1741 # Try to create an executable without -o first, disregard a.out.
1742 # It will help us diagnose broken compilers, and finding out an intuition
1743 # of exeext.
1744 echo "$as_me:1744: checking for C compiler default output" >&5
1745 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1746 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1747 if { (eval echo "$as_me:1747: \"$ac_link_default\"") >&5
1748   (eval $ac_link_default) 2>&5
1749   ac_status=$?
1750   echo "$as_me:1750: \$? = $ac_status" >&5
1751   (exit $ac_status); }; then
1752   # Find the output, starting from the most likely.  This scheme is
1753 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1754 # resort.
1755 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1756                 ls a.out conftest 2>/dev/null;
1757                 ls a.* conftest.* 2>/dev/null`; do
1758   case $ac_file in
1759     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1760     a.out ) # We found the default executable, but exeext='' is most
1761             # certainly right.
1762             break;;
1763     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1764           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1765           export ac_cv_exeext
1766           break;;
1767     * ) break;;
1768   esac
1769 done
1770 else
1771   echo "$as_me: failed program was:" >&5
1772 cat conftest.$ac_ext >&5
1773 { { echo "$as_me:1773: error: C compiler cannot create executables" >&5
1774 echo "$as_me: error: C compiler cannot create executables" >&2;}
1775    { (exit 77); exit 77; }; }
1776 fi
1777
1778 ac_exeext=$ac_cv_exeext
1779 echo "$as_me:1779: result: $ac_file" >&5
1780 echo "${ECHO_T}$ac_file" >&6
1781
1782 # Check the compiler produces executables we can run.  If not, either
1783 # the compiler is broken, or we cross compile.
1784 echo "$as_me:1784: checking whether the C compiler works" >&5
1785 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1786 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1787 # If not cross compiling, check that we can run a simple program.
1788 if test "$cross_compiling" != yes; then
1789   if { ac_try='./$ac_file'
1790   { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1791   (eval $ac_try) 2>&5
1792   ac_status=$?
1793   echo "$as_me:1793: \$? = $ac_status" >&5
1794   (exit $ac_status); }; }; then
1795     cross_compiling=no
1796   else
1797     if test "$cross_compiling" = maybe; then
1798         cross_compiling=yes
1799     else
1800         { { echo "$as_me:1800: error: cannot run C compiled programs.
1801 If you meant to cross compile, use \`--host'." >&5
1802 echo "$as_me: error: cannot run C compiled programs.
1803 If you meant to cross compile, use \`--host'." >&2;}
1804    { (exit 1); exit 1; }; }
1805     fi
1806   fi
1807 fi
1808 echo "$as_me:1808: result: yes" >&5
1809 echo "${ECHO_T}yes" >&6
1810
1811 rm -f a.out a.exe conftest$ac_cv_exeext
1812 ac_clean_files=$ac_clean_files_save
1813 # Check the compiler produces executables we can run.  If not, either
1814 # the compiler is broken, or we cross compile.
1815 echo "$as_me:1815: checking whether we are cross compiling" >&5
1816 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1817 echo "$as_me:1817: result: $cross_compiling" >&5
1818 echo "${ECHO_T}$cross_compiling" >&6
1819
1820 echo "$as_me:1820: checking for executable suffix" >&5
1821 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1822 if { (eval echo "$as_me:1822: \"$ac_link\"") >&5
1823   (eval $ac_link) 2>&5
1824   ac_status=$?
1825   echo "$as_me:1825: \$? = $ac_status" >&5
1826   (exit $ac_status); }; then
1827   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1828 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1829 # work properly (i.e., refer to `conftest.exe'), while it won't with
1830 # `rm'.
1831 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1832   case $ac_file in
1833     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1834     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1835           export ac_cv_exeext
1836           break;;
1837     * ) break;;
1838   esac
1839 done
1840 else
1841   { { echo "$as_me:1841: error: cannot compute EXEEXT: cannot compile and link" >&5
1842 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1843    { (exit 1); exit 1; }; }
1844 fi
1845
1846 rm -f conftest$ac_cv_exeext
1847 echo "$as_me:1847: result: $ac_cv_exeext" >&5
1848 echo "${ECHO_T}$ac_cv_exeext" >&6
1849
1850 rm -f conftest.$ac_ext
1851 EXEEXT=$ac_cv_exeext
1852 ac_exeext=$EXEEXT
1853 echo "$as_me:1853: checking for object suffix" >&5
1854 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1855 if test "${ac_cv_objext+set}" = set; then
1856   echo $ECHO_N "(cached) $ECHO_C" >&6
1857 else
1858   cat >conftest.$ac_ext <<_ACEOF
1859 #line 1859 "configure"
1860 #include "confdefs.h"
1861
1862 int
1863 main (void)
1864 {
1865
1866   ;
1867   return 0;
1868 }
1869 _ACEOF
1870 rm -f conftest.o conftest.obj
1871 if { (eval echo "$as_me:1871: \"$ac_compile\"") >&5
1872   (eval $ac_compile) 2>&5
1873   ac_status=$?
1874   echo "$as_me:1874: \$? = $ac_status" >&5
1875   (exit $ac_status); }; then
1876   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1877   case $ac_file in
1878     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1879     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1880        break;;
1881   esac
1882 done
1883 else
1884   echo "$as_me: failed program was:" >&5
1885 cat conftest.$ac_ext >&5
1886 { { echo "$as_me:1886: error: cannot compute OBJEXT: cannot compile" >&5
1887 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1888    { (exit 1); exit 1; }; }
1889 fi
1890
1891 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1892 fi
1893 echo "$as_me:1893: result: $ac_cv_objext" >&5
1894 echo "${ECHO_T}$ac_cv_objext" >&6
1895 OBJEXT=$ac_cv_objext
1896 ac_objext=$OBJEXT
1897 echo "$as_me:1897: checking whether we are using the GNU C compiler" >&5
1898 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1899 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1900   echo $ECHO_N "(cached) $ECHO_C" >&6
1901 else
1902   cat >conftest.$ac_ext <<_ACEOF
1903 #line 1903 "configure"
1904 #include "confdefs.h"
1905
1906 int
1907 main (void)
1908 {
1909 #ifndef __GNUC__
1910        choke me
1911 #endif
1912
1913   ;
1914   return 0;
1915 }
1916 _ACEOF
1917 rm -f conftest.$ac_objext
1918 if { (eval echo "$as_me:1918: \"$ac_compile\"") >&5
1919   (eval $ac_compile) 2>&5
1920   ac_status=$?
1921   echo "$as_me:1921: \$? = $ac_status" >&5
1922   (exit $ac_status); } &&
1923          { ac_try='test -s conftest.$ac_objext'
1924   { (eval echo "$as_me:1924: \"$ac_try\"") >&5
1925   (eval $ac_try) 2>&5
1926   ac_status=$?
1927   echo "$as_me:1927: \$? = $ac_status" >&5
1928   (exit $ac_status); }; }; then
1929   ac_compiler_gnu=yes
1930 else
1931   echo "$as_me: failed program was:" >&5
1932 cat conftest.$ac_ext >&5
1933 ac_compiler_gnu=no
1934 fi
1935 rm -f conftest.$ac_objext conftest.$ac_ext
1936 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1937
1938 fi
1939 echo "$as_me:1939: result: $ac_cv_c_compiler_gnu" >&5
1940 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1941 GCC=`test $ac_compiler_gnu = yes && echo yes`
1942 ac_test_CFLAGS=${CFLAGS+set}
1943 ac_save_CFLAGS=$CFLAGS
1944 CFLAGS="-g"
1945 echo "$as_me:1945: checking whether $CC accepts -g" >&5
1946 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1947 if test "${ac_cv_prog_cc_g+set}" = set; then
1948   echo $ECHO_N "(cached) $ECHO_C" >&6
1949 else
1950   cat >conftest.$ac_ext <<_ACEOF
1951 #line 1951 "configure"
1952 #include "confdefs.h"
1953
1954 int
1955 main (void)
1956 {
1957
1958   ;
1959   return 0;
1960 }
1961 _ACEOF
1962 rm -f conftest.$ac_objext
1963 if { (eval echo "$as_me:1963: \"$ac_compile\"") >&5
1964   (eval $ac_compile) 2>&5
1965   ac_status=$?
1966   echo "$as_me:1966: \$? = $ac_status" >&5
1967   (exit $ac_status); } &&
1968          { ac_try='test -s conftest.$ac_objext'
1969   { (eval echo "$as_me:1969: \"$ac_try\"") >&5
1970   (eval $ac_try) 2>&5
1971   ac_status=$?
1972   echo "$as_me:1972: \$? = $ac_status" >&5
1973   (exit $ac_status); }; }; then
1974   ac_cv_prog_cc_g=yes
1975 else
1976   echo "$as_me: failed program was:" >&5
1977 cat conftest.$ac_ext >&5
1978 ac_cv_prog_cc_g=no
1979 fi
1980 rm -f conftest.$ac_objext conftest.$ac_ext
1981 fi
1982 echo "$as_me:1982: result: $ac_cv_prog_cc_g" >&5
1983 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1984 if test "$ac_test_CFLAGS" = set; then
1985   CFLAGS=$ac_save_CFLAGS
1986 elif test $ac_cv_prog_cc_g = yes; then
1987   if test "$GCC" = yes; then
1988     CFLAGS="-g -O2"
1989   else
1990     CFLAGS="-g"
1991   fi
1992 else
1993   if test "$GCC" = yes; then
1994     CFLAGS="-O2"
1995   else
1996     CFLAGS=
1997   fi
1998 fi
1999 # Some people use a C++ compiler to compile C.  Since we use `exit',
2000 # in C++ we need to declare it.  In case someone uses the same compiler
2001 # for both compiling C and C++ we need to have the C++ compiler decide
2002 # the declaration of exit, since it's the most demanding environment.
2003 cat >conftest.$ac_ext <<_ACEOF
2004 #ifndef __cplusplus
2005   choke me
2006 #endif
2007 _ACEOF
2008 rm -f conftest.$ac_objext
2009 if { (eval echo "$as_me:2009: \"$ac_compile\"") >&5
2010   (eval $ac_compile) 2>&5
2011   ac_status=$?
2012   echo "$as_me:2012: \$? = $ac_status" >&5
2013   (exit $ac_status); } &&
2014          { ac_try='test -s conftest.$ac_objext'
2015   { (eval echo "$as_me:2015: \"$ac_try\"") >&5
2016   (eval $ac_try) 2>&5
2017   ac_status=$?
2018   echo "$as_me:2018: \$? = $ac_status" >&5
2019   (exit $ac_status); }; }; then
2020   for ac_declaration in \
2021    ''\
2022    '#include <stdlib.h>' \
2023    'extern "C" void std::exit (int) throw (); using std::exit;' \
2024    'extern "C" void std::exit (int); using std::exit;' \
2025    'extern "C" void exit (int) throw ();' \
2026    'extern "C" void exit (int);' \
2027    'void exit (int);'
2028 do
2029   cat >conftest.$ac_ext <<_ACEOF
2030 #line 2030 "configure"
2031 #include "confdefs.h"
2032 #include <stdlib.h>
2033 $ac_declaration
2034 int
2035 main (void)
2036 {
2037 exit (42);
2038   ;
2039   return 0;
2040 }
2041 _ACEOF
2042 rm -f conftest.$ac_objext
2043 if { (eval echo "$as_me:2043: \"$ac_compile\"") >&5
2044   (eval $ac_compile) 2>&5
2045   ac_status=$?
2046   echo "$as_me:2046: \$? = $ac_status" >&5
2047   (exit $ac_status); } &&
2048          { ac_try='test -s conftest.$ac_objext'
2049   { (eval echo "$as_me:2049: \"$ac_try\"") >&5
2050   (eval $ac_try) 2>&5
2051   ac_status=$?
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); }; }; then
2054   :
2055 else
2056   echo "$as_me: failed program was:" >&5
2057 cat conftest.$ac_ext >&5
2058 continue
2059 fi
2060 rm -f conftest.$ac_objext conftest.$ac_ext
2061   cat >conftest.$ac_ext <<_ACEOF
2062 #line 2062 "configure"
2063 #include "confdefs.h"
2064 $ac_declaration
2065 int
2066 main (void)
2067 {
2068 exit (42);
2069   ;
2070   return 0;
2071 }
2072 _ACEOF
2073 rm -f conftest.$ac_objext
2074 if { (eval echo "$as_me:2074: \"$ac_compile\"") >&5
2075   (eval $ac_compile) 2>&5
2076   ac_status=$?
2077   echo "$as_me:2077: \$? = $ac_status" >&5
2078   (exit $ac_status); } &&
2079          { ac_try='test -s conftest.$ac_objext'
2080   { (eval echo "$as_me:2080: \"$ac_try\"") >&5
2081   (eval $ac_try) 2>&5
2082   ac_status=$?
2083   echo "$as_me:2083: \$? = $ac_status" >&5
2084   (exit $ac_status); }; }; then
2085   break
2086 else
2087   echo "$as_me: failed program was:" >&5
2088 cat conftest.$ac_ext >&5
2089 fi
2090 rm -f conftest.$ac_objext conftest.$ac_ext
2091 done
2092 rm -rf conftest*
2093 if test -n "$ac_declaration"; then
2094   echo '#ifdef __cplusplus' >>confdefs.h
2095   echo $ac_declaration      >>confdefs.h
2096   echo '#endif'             >>confdefs.h
2097 fi
2098
2099 else
2100   echo "$as_me: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 fi
2103 rm -f conftest.$ac_objext conftest.$ac_ext
2104 ac_ext=c
2105 ac_cpp='$CPP $CPPFLAGS'
2106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2109 ac_main_return=return
2110
2111 GCC_VERSION=none
2112 if test "$GCC" = yes ; then
2113         echo "$as_me:2113: checking version of $CC" >&5
2114 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2115         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.].*//'`"
2116         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2117         echo "$as_me:2117: result: $GCC_VERSION" >&5
2118 echo "${ECHO_T}$GCC_VERSION" >&6
2119 fi
2120
2121 INTEL_COMPILER=no
2122
2123 if test "$GCC" = yes ; then
2124         case $host_os in
2125         (linux*|gnu*)
2126                 echo "$as_me:2126: checking if this is really Intel C compiler" >&5
2127 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2128                 cf_save_CFLAGS="$CFLAGS"
2129                 CFLAGS="$CFLAGS -no-gcc"
2130                 cat >conftest.$ac_ext <<_ACEOF
2131 #line 2131 "configure"
2132 #include "confdefs.h"
2133
2134 int
2135 main (void)
2136 {
2137
2138 #ifdef __INTEL_COMPILER
2139 #else
2140 make an error
2141 #endif
2142
2143   ;
2144   return 0;
2145 }
2146 _ACEOF
2147 rm -f conftest.$ac_objext
2148 if { (eval echo "$as_me:2148: \"$ac_compile\"") >&5
2149   (eval $ac_compile) 2>&5
2150   ac_status=$?
2151   echo "$as_me:2151: \$? = $ac_status" >&5
2152   (exit $ac_status); } &&
2153          { ac_try='test -s conftest.$ac_objext'
2154   { (eval echo "$as_me:2154: \"$ac_try\"") >&5
2155   (eval $ac_try) 2>&5
2156   ac_status=$?
2157   echo "$as_me:2157: \$? = $ac_status" >&5
2158   (exit $ac_status); }; }; then
2159   INTEL_COMPILER=yes
2160 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2161
2162 else
2163   echo "$as_me: failed program was:" >&5
2164 cat conftest.$ac_ext >&5
2165 fi
2166 rm -f conftest.$ac_objext conftest.$ac_ext
2167                 CFLAGS="$cf_save_CFLAGS"
2168                 echo "$as_me:2168: result: $INTEL_COMPILER" >&5
2169 echo "${ECHO_T}$INTEL_COMPILER" >&6
2170                 ;;
2171         esac
2172 fi
2173
2174 CLANG_COMPILER=no
2175
2176 if test "$GCC" = yes ; then
2177         echo "$as_me:2177: checking if this is really Clang C compiler" >&5
2178 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2179         cf_save_CFLAGS="$CFLAGS"
2180         cat >conftest.$ac_ext <<_ACEOF
2181 #line 2181 "configure"
2182 #include "confdefs.h"
2183
2184 int
2185 main (void)
2186 {
2187
2188 #ifdef __clang__
2189 #else
2190 make an error
2191 #endif
2192
2193   ;
2194   return 0;
2195 }
2196 _ACEOF
2197 rm -f conftest.$ac_objext
2198 if { (eval echo "$as_me:2198: \"$ac_compile\"") >&5
2199   (eval $ac_compile) 2>&5
2200   ac_status=$?
2201   echo "$as_me:2201: \$? = $ac_status" >&5
2202   (exit $ac_status); } &&
2203          { ac_try='test -s conftest.$ac_objext'
2204   { (eval echo "$as_me:2204: \"$ac_try\"") >&5
2205   (eval $ac_try) 2>&5
2206   ac_status=$?
2207   echo "$as_me:2207: \$? = $ac_status" >&5
2208   (exit $ac_status); }; }; then
2209   CLANG_COMPILER=yes
2210
2211 else
2212   echo "$as_me: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 fi
2215 rm -f conftest.$ac_objext conftest.$ac_ext
2216         CFLAGS="$cf_save_CFLAGS"
2217         echo "$as_me:2217: result: $CLANG_COMPILER" >&5
2218 echo "${ECHO_T}$CLANG_COMPILER" >&6
2219 fi
2220
2221 CLANG_VERSION=none
2222
2223 if test "x$CLANG_COMPILER" = "xyes" ; then
2224         case "$CC" in
2225         (c[1-9][0-9]|*/c[1-9][0-9])
2226                 { echo "$as_me:2226: WARNING: replacing broken compiler alias $CC" >&5
2227 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2228                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2229                 CC=clang
2230                 ;;
2231         esac
2232
2233         echo "$as_me:2233: checking version of $CC" >&5
2234 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2235         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2236         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2237         echo "$as_me:2237: result: $CLANG_VERSION" >&5
2238 echo "${ECHO_T}$CLANG_VERSION" >&6
2239
2240         for cf_clang_opt in \
2241                 -Qunused-arguments \
2242                 -Wno-error=implicit-function-declaration
2243         do
2244                 echo "$as_me:2244: checking if option $cf_clang_opt works" >&5
2245 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2246                 cf_save_CFLAGS="$CFLAGS"
2247                 CFLAGS="$CFLAGS $cf_clang_opt"
2248                 cat >conftest.$ac_ext <<_ACEOF
2249 #line 2249 "configure"
2250 #include "confdefs.h"
2251
2252                         #include <stdio.h>
2253 int
2254 main (void)
2255 {
2256
2257                         printf("hello!\n");
2258   ;
2259   return 0;
2260 }
2261 _ACEOF
2262 rm -f conftest.$ac_objext conftest$ac_exeext
2263 if { (eval echo "$as_me:2263: \"$ac_link\"") >&5
2264   (eval $ac_link) 2>&5
2265   ac_status=$?
2266   echo "$as_me:2266: \$? = $ac_status" >&5
2267   (exit $ac_status); } &&
2268          { ac_try='test -s conftest$ac_exeext'
2269   { (eval echo "$as_me:2269: \"$ac_try\"") >&5
2270   (eval $ac_try) 2>&5
2271   ac_status=$?
2272   echo "$as_me:2272: \$? = $ac_status" >&5
2273   (exit $ac_status); }; }; then
2274
2275                         cf_clang_optok=yes
2276 else
2277   echo "$as_me: failed program was:" >&5
2278 cat conftest.$ac_ext >&5
2279
2280                         cf_clang_optok=no
2281 fi
2282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2283                 echo "$as_me:2283: result: $cf_clang_optok" >&5
2284 echo "${ECHO_T}$cf_clang_optok" >&6
2285                 CFLAGS="$cf_save_CFLAGS"
2286                 if test $cf_clang_optok = yes; then
2287                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2288
2289 echo "${as_me:-configure}:2289: testing adding option $cf_clang_opt ..." 1>&5
2290
2291         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2292         CFLAGS="${CFLAGS}$cf_clang_opt"
2293
2294                 fi
2295         done
2296 fi
2297
2298 echo "$as_me:2298: checking for $CC option to accept ANSI C" >&5
2299 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2300 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2301   echo $ECHO_N "(cached) $ECHO_C" >&6
2302 else
2303   ac_cv_prog_cc_stdc=no
2304 ac_save_CC=$CC
2305 cat >conftest.$ac_ext <<_ACEOF
2306 #line 2306 "configure"
2307 #include "confdefs.h"
2308 #include <stdarg.h>
2309 #include <stdio.h>
2310 #include <sys/types.h>
2311 #include <sys/stat.h>
2312 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2313 struct buf { int x; };
2314 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2315 static char *e (p, i)
2316      char **p;
2317      int i;
2318 {
2319   return p[i];
2320 }
2321 static char *f (char * (*g) (char **, int), char **p, ...)
2322 {
2323   char *s;
2324   va_list v;
2325   va_start (v,p);
2326   s = g (p, va_arg (v,int));
2327   va_end (v);
2328   return s;
2329 }
2330 int test (int i, double x);
2331 struct s1 {int (*f) (int a);};
2332 struct s2 {int (*f) (double a);};
2333 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2334 int argc;
2335 char **argv;
2336 int
2337 main (void)
2338 {
2339 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2340   ;
2341   return 0;
2342 }
2343 _ACEOF
2344 # Don't try gcc -ansi; that turns off useful extensions and
2345 # breaks some systems' header files.
2346 # AIX                   -qlanglvl=ansi
2347 # Ultrix and OSF/1      -std1
2348 # HP-UX 10.20 and later -Ae
2349 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2350 # SVR4                  -Xc -D__EXTENSIONS__
2351 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2352 do
2353   CC="$ac_save_CC $ac_arg"
2354   rm -f conftest.$ac_objext
2355 if { (eval echo "$as_me:2355: \"$ac_compile\"") >&5
2356   (eval $ac_compile) 2>&5
2357   ac_status=$?
2358   echo "$as_me:2358: \$? = $ac_status" >&5
2359   (exit $ac_status); } &&
2360          { ac_try='test -s conftest.$ac_objext'
2361   { (eval echo "$as_me:2361: \"$ac_try\"") >&5
2362   (eval $ac_try) 2>&5
2363   ac_status=$?
2364   echo "$as_me:2364: \$? = $ac_status" >&5
2365   (exit $ac_status); }; }; then
2366   ac_cv_prog_cc_stdc=$ac_arg
2367 break
2368 else
2369   echo "$as_me: failed program was:" >&5
2370 cat conftest.$ac_ext >&5
2371 fi
2372 rm -f conftest.$ac_objext
2373 done
2374 rm -f conftest.$ac_ext conftest.$ac_objext
2375 CC=$ac_save_CC
2376
2377 fi
2378
2379 case "x$ac_cv_prog_cc_stdc" in
2380   x|xno)
2381     echo "$as_me:2381: result: none needed" >&5
2382 echo "${ECHO_T}none needed" >&6 ;;
2383   *)
2384     echo "$as_me:2384: result: $ac_cv_prog_cc_stdc" >&5
2385 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2386     CC="$CC $ac_cv_prog_cc_stdc" ;;
2387 esac
2388
2389 # This should have been defined by AC_PROG_CC
2390 : ${CC:=cc}
2391
2392 echo "$as_me:2392: checking \$CFLAGS variable" >&5
2393 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2394 case "x$CFLAGS" in
2395 (*-[IUD]*)
2396         echo "$as_me:2396: result: broken" >&5
2397 echo "${ECHO_T}broken" >&6
2398         { echo "$as_me:2398: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2399 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2400         cf_flags="$CFLAGS"
2401         CFLAGS=
2402         for cf_arg in $cf_flags
2403         do
2404
2405 cf_fix_cppflags=no
2406 cf_new_cflags=
2407 cf_new_cppflags=
2408 cf_new_extra_cppflags=
2409
2410 for cf_add_cflags in $cf_arg
2411 do
2412 case $cf_fix_cppflags in
2413 (no)
2414         case $cf_add_cflags in
2415         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2416                 case $cf_add_cflags in
2417                 (-D*)
2418                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2419
2420                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2421                                 && test -z "${cf_tst_cflags}" \
2422                                 && cf_fix_cppflags=yes
2423
2424                         if test $cf_fix_cppflags = yes ; then
2425
2426         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2427         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2428
2429                                 continue
2430                         elif test "${cf_tst_cflags}" = "\"'" ; then
2431
2432         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2433         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2434
2435                                 continue
2436                         fi
2437                         ;;
2438                 esac
2439                 case "$CPPFLAGS" in
2440                 (*$cf_add_cflags)
2441                         ;;
2442                 (*)
2443                         case $cf_add_cflags in
2444                         (-D*)
2445                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2446
2447 CPPFLAGS=`echo "$CPPFLAGS" | \
2448         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2449                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2450
2451                                 ;;
2452                         esac
2453
2454         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2455         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2456
2457                         ;;
2458                 esac
2459                 ;;
2460         (*)
2461
2462         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2463         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2464
2465                 ;;
2466         esac
2467         ;;
2468 (yes)
2469
2470         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2471         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2472
2473         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2474
2475         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2476                 && test -z "${cf_tst_cflags}" \
2477                 && cf_fix_cppflags=no
2478         ;;
2479 esac
2480 done
2481
2482 if test -n "$cf_new_cflags" ; then
2483
2484         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2485         CFLAGS="${CFLAGS}$cf_new_cflags"
2486
2487 fi
2488
2489 if test -n "$cf_new_cppflags" ; then
2490
2491         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2492         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2493
2494 fi
2495
2496 if test -n "$cf_new_extra_cppflags" ; then
2497
2498         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2499         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2500
2501 fi
2502
2503         done
2504         ;;
2505 (*)
2506         echo "$as_me:2506: result: ok" >&5
2507 echo "${ECHO_T}ok" >&6
2508         ;;
2509 esac
2510
2511 echo "$as_me:2511: checking \$CC variable" >&5
2512 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2513 case "$CC" in
2514 (*[\ \  ]-*)
2515         echo "$as_me:2515: result: broken" >&5
2516 echo "${ECHO_T}broken" >&6
2517         { echo "$as_me:2517: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2518 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2519         # humor him...
2520         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2521         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2522         CC="$cf_prog"
2523         for cf_arg in $cf_flags
2524         do
2525                 case "x$cf_arg" in
2526                 (x-[IUDfgOW]*)
2527
2528 cf_fix_cppflags=no
2529 cf_new_cflags=
2530 cf_new_cppflags=
2531 cf_new_extra_cppflags=
2532
2533 for cf_add_cflags in $cf_arg
2534 do
2535 case $cf_fix_cppflags in
2536 (no)
2537         case $cf_add_cflags in
2538         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2539                 case $cf_add_cflags in
2540                 (-D*)
2541                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2542
2543                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2544                                 && test -z "${cf_tst_cflags}" \
2545                                 && cf_fix_cppflags=yes
2546
2547                         if test $cf_fix_cppflags = yes ; then
2548
2549         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2550         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2551
2552                                 continue
2553                         elif test "${cf_tst_cflags}" = "\"'" ; then
2554
2555         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2556         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2557
2558                                 continue
2559                         fi
2560                         ;;
2561                 esac
2562                 case "$CPPFLAGS" in
2563                 (*$cf_add_cflags)
2564                         ;;
2565                 (*)
2566                         case $cf_add_cflags in
2567                         (-D*)
2568                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2569
2570 CPPFLAGS=`echo "$CPPFLAGS" | \
2571         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2572                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2573
2574                                 ;;
2575                         esac
2576
2577         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2578         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2579
2580                         ;;
2581                 esac
2582                 ;;
2583         (*)
2584
2585         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2586         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2587
2588                 ;;
2589         esac
2590         ;;
2591 (yes)
2592
2593         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2594         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2595
2596         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2597
2598         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2599                 && test -z "${cf_tst_cflags}" \
2600                 && cf_fix_cppflags=no
2601         ;;
2602 esac
2603 done
2604
2605 if test -n "$cf_new_cflags" ; then
2606
2607         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2608         CFLAGS="${CFLAGS}$cf_new_cflags"
2609
2610 fi
2611
2612 if test -n "$cf_new_cppflags" ; then
2613
2614         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2615         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2616
2617 fi
2618
2619 if test -n "$cf_new_extra_cppflags" ; then
2620
2621         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2622         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2623
2624 fi
2625
2626                         ;;
2627                 (*)
2628                         CC="$CC $cf_arg"
2629                         ;;
2630                 esac
2631         done
2632         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2633
2634 echo "${as_me:-configure}:2634: testing resulting CC: '$CC' ..." 1>&5
2635
2636         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2637
2638 echo "${as_me:-configure}:2638: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2639
2640         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2641
2642 echo "${as_me:-configure}:2642: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2643
2644         ;;
2645 (*)
2646         echo "$as_me:2646: result: ok" >&5
2647 echo "${ECHO_T}ok" >&6
2648         ;;
2649 esac
2650
2651 ac_ext=c
2652 ac_cpp='$CPP $CPPFLAGS'
2653 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2654 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2655 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2656 ac_main_return=return
2657 echo "$as_me:2657: checking how to run the C preprocessor" >&5
2658 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2659 # On Suns, sometimes $CPP names a directory.
2660 if test -n "$CPP" && test -d "$CPP"; then
2661   CPP=
2662 fi
2663 if test -z "$CPP"; then
2664   if test "${ac_cv_prog_CPP+set}" = set; then
2665   echo $ECHO_N "(cached) $ECHO_C" >&6
2666 else
2667       # Double quotes because CPP needs to be expanded
2668     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2669     do
2670       ac_preproc_ok=false
2671 for ac_c_preproc_warn_flag in '' yes
2672 do
2673   # Use a header file that comes with gcc, so configuring glibc
2674   # with a fresh cross-compiler works.
2675   # On the NeXT, cc -E runs the code through the compiler's parser,
2676   # not just through cpp. "Syntax error" is here to catch this case.
2677   cat >conftest.$ac_ext <<_ACEOF
2678 #line 2678 "configure"
2679 #include "confdefs.h"
2680 #include <assert.h>
2681                      Syntax error
2682 _ACEOF
2683 if { (eval echo "$as_me:2683: \"$ac_cpp conftest.$ac_ext\"") >&5
2684   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2685   ac_status=$?
2686   egrep -v '^ *\+' conftest.er1 >conftest.err
2687   rm -f conftest.er1
2688   cat conftest.err >&5
2689   echo "$as_me:2689: \$? = $ac_status" >&5
2690   (exit $ac_status); } >/dev/null; then
2691   if test -s conftest.err; then
2692     ac_cpp_err=$ac_c_preproc_warn_flag
2693   else
2694     ac_cpp_err=
2695   fi
2696 else
2697   ac_cpp_err=yes
2698 fi
2699 if test -z "$ac_cpp_err"; then
2700   :
2701 else
2702   echo "$as_me: failed program was:" >&5
2703   cat conftest.$ac_ext >&5
2704   # Broken: fails on valid input.
2705 continue
2706 fi
2707 rm -f conftest.err conftest.$ac_ext
2708
2709   # OK, works on sane cases.  Now check whether non-existent headers
2710   # can be detected and how.
2711   cat >conftest.$ac_ext <<_ACEOF
2712 #line 2712 "configure"
2713 #include "confdefs.h"
2714 #include <ac_nonexistent.h>
2715 _ACEOF
2716 if { (eval echo "$as_me:2716: \"$ac_cpp conftest.$ac_ext\"") >&5
2717   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2718   ac_status=$?
2719   egrep -v '^ *\+' conftest.er1 >conftest.err
2720   rm -f conftest.er1
2721   cat conftest.err >&5
2722   echo "$as_me:2722: \$? = $ac_status" >&5
2723   (exit $ac_status); } >/dev/null; then
2724   if test -s conftest.err; then
2725     ac_cpp_err=$ac_c_preproc_warn_flag
2726   else
2727     ac_cpp_err=
2728   fi
2729 else
2730   ac_cpp_err=yes
2731 fi
2732 if test -z "$ac_cpp_err"; then
2733   # Broken: success on invalid input.
2734 continue
2735 else
2736   echo "$as_me: failed program was:" >&5
2737   cat conftest.$ac_ext >&5
2738   # Passes both tests.
2739 ac_preproc_ok=:
2740 break
2741 fi
2742 rm -f conftest.err conftest.$ac_ext
2743
2744 done
2745 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2746 rm -f conftest.err conftest.$ac_ext
2747 if $ac_preproc_ok; then
2748   break
2749 fi
2750
2751     done
2752     ac_cv_prog_CPP=$CPP
2753
2754 fi
2755   CPP=$ac_cv_prog_CPP
2756 else
2757   ac_cv_prog_CPP=$CPP
2758 fi
2759 echo "$as_me:2759: result: $CPP" >&5
2760 echo "${ECHO_T}$CPP" >&6
2761 ac_preproc_ok=false
2762 for ac_c_preproc_warn_flag in '' yes
2763 do
2764   # Use a header file that comes with gcc, so configuring glibc
2765   # with a fresh cross-compiler works.
2766   # On the NeXT, cc -E runs the code through the compiler's parser,
2767   # not just through cpp. "Syntax error" is here to catch this case.
2768   cat >conftest.$ac_ext <<_ACEOF
2769 #line 2769 "configure"
2770 #include "confdefs.h"
2771 #include <assert.h>
2772                      Syntax error
2773 _ACEOF
2774 if { (eval echo "$as_me:2774: \"$ac_cpp conftest.$ac_ext\"") >&5
2775   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2776   ac_status=$?
2777   egrep -v '^ *\+' conftest.er1 >conftest.err
2778   rm -f conftest.er1
2779   cat conftest.err >&5
2780   echo "$as_me:2780: \$? = $ac_status" >&5
2781   (exit $ac_status); } >/dev/null; then
2782   if test -s conftest.err; then
2783     ac_cpp_err=$ac_c_preproc_warn_flag
2784   else
2785     ac_cpp_err=
2786   fi
2787 else
2788   ac_cpp_err=yes
2789 fi
2790 if test -z "$ac_cpp_err"; then
2791   :
2792 else
2793   echo "$as_me: failed program was:" >&5
2794   cat conftest.$ac_ext >&5
2795   # Broken: fails on valid input.
2796 continue
2797 fi
2798 rm -f conftest.err conftest.$ac_ext
2799
2800   # OK, works on sane cases.  Now check whether non-existent headers
2801   # can be detected and how.
2802   cat >conftest.$ac_ext <<_ACEOF
2803 #line 2803 "configure"
2804 #include "confdefs.h"
2805 #include <ac_nonexistent.h>
2806 _ACEOF
2807 if { (eval echo "$as_me:2807: \"$ac_cpp conftest.$ac_ext\"") >&5
2808   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2809   ac_status=$?
2810   egrep -v '^ *\+' conftest.er1 >conftest.err
2811   rm -f conftest.er1
2812   cat conftest.err >&5
2813   echo "$as_me:2813: \$? = $ac_status" >&5
2814   (exit $ac_status); } >/dev/null; then
2815   if test -s conftest.err; then
2816     ac_cpp_err=$ac_c_preproc_warn_flag
2817   else
2818     ac_cpp_err=
2819   fi
2820 else
2821   ac_cpp_err=yes
2822 fi
2823 if test -z "$ac_cpp_err"; then
2824   # Broken: success on invalid input.
2825 continue
2826 else
2827   echo "$as_me: failed program was:" >&5
2828   cat conftest.$ac_ext >&5
2829   # Passes both tests.
2830 ac_preproc_ok=:
2831 break
2832 fi
2833 rm -f conftest.err conftest.$ac_ext
2834
2835 done
2836 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2837 rm -f conftest.err conftest.$ac_ext
2838 if $ac_preproc_ok; then
2839   :
2840 else
2841   { { echo "$as_me:2841: error: C preprocessor \"$CPP\" fails sanity check" >&5
2842 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2843    { (exit 1); exit 1; }; }
2844 fi
2845
2846 ac_ext=c
2847 ac_cpp='$CPP $CPPFLAGS'
2848 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2849 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2850 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2851 ac_main_return=return
2852
2853 if test $ac_cv_c_compiler_gnu = yes; then
2854     echo "$as_me:2854: checking whether $CC needs -traditional" >&5
2855 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2856 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2857   echo $ECHO_N "(cached) $ECHO_C" >&6
2858 else
2859     ac_pattern="Autoconf.*'x'"
2860   cat >conftest.$ac_ext <<_ACEOF
2861 #line 2861 "configure"
2862 #include "confdefs.h"
2863 #include <sgtty.h>
2864 int Autoconf = TIOCGETP;
2865 _ACEOF
2866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2867   egrep "$ac_pattern" >/dev/null 2>&1; then
2868   ac_cv_prog_gcc_traditional=yes
2869 else
2870   ac_cv_prog_gcc_traditional=no
2871 fi
2872 rm -rf conftest*
2873
2874   if test $ac_cv_prog_gcc_traditional = no; then
2875     cat >conftest.$ac_ext <<_ACEOF
2876 #line 2876 "configure"
2877 #include "confdefs.h"
2878 #include <termio.h>
2879 int Autoconf = TCGETA;
2880 _ACEOF
2881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2882   egrep "$ac_pattern" >/dev/null 2>&1; then
2883   ac_cv_prog_gcc_traditional=yes
2884 fi
2885 rm -rf conftest*
2886
2887   fi
2888 fi
2889 echo "$as_me:2889: result: $ac_cv_prog_gcc_traditional" >&5
2890 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2891   if test $ac_cv_prog_gcc_traditional = yes; then
2892     CC="$CC -traditional"
2893   fi
2894 fi
2895
2896 echo "$as_me:2896: checking whether $CC understands -c and -o together" >&5
2897 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2898 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2899   echo $ECHO_N "(cached) $ECHO_C" >&6
2900 else
2901
2902 cat > conftest.$ac_ext <<CF_EOF
2903 int main(void)
2904 {
2905         ${cf_cv_main_return:-return}(0);
2906 }
2907 CF_EOF
2908 # We do the test twice because some compilers refuse to overwrite an
2909 # existing .o file with -o, though they will create one.
2910 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2911 if { (eval echo "$as_me:2911: \"$ac_try\"") >&5
2912   (eval $ac_try) 2>&5
2913   ac_status=$?
2914   echo "$as_me:2914: \$? = $ac_status" >&5
2915   (exit $ac_status); } &&
2916   test -f conftest2.$ac_objext && { (eval echo "$as_me:2916: \"$ac_try\"") >&5
2917   (eval $ac_try) 2>&5
2918   ac_status=$?
2919   echo "$as_me:2919: \$? = $ac_status" >&5
2920   (exit $ac_status); };
2921 then
2922   eval cf_cv_prog_CC_c_o=yes
2923 else
2924   eval cf_cv_prog_CC_c_o=no
2925 fi
2926 rm -rf conftest*
2927
2928 fi
2929 if test $cf_cv_prog_CC_c_o = yes; then
2930   echo "$as_me:2930: result: yes" >&5
2931 echo "${ECHO_T}yes" >&6
2932 else
2933   echo "$as_me:2933: result: no" >&5
2934 echo "${ECHO_T}no" >&6
2935 fi
2936
2937 if test "$cross_compiling" = yes ; then
2938         LDCONFIG=:
2939 else
2940         case "$cf_cv_system_name" in
2941         (dragonfly*|mirbsd*|freebsd*)
2942                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2943                 ;;
2944         (*) LDPATH=$PATH:/sbin:/usr/sbin
2945                 # Extract the first word of "ldconfig", so it can be a program name with args.
2946 set dummy ldconfig; ac_word=$2
2947 echo "$as_me:2947: checking for $ac_word" >&5
2948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2949 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2950   echo $ECHO_N "(cached) $ECHO_C" >&6
2951 else
2952   case $LDCONFIG in
2953   [\\/]* | ?:[\\/]*)
2954   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2955   ;;
2956   *)
2957   ac_save_IFS=$IFS; IFS=$ac_path_separator
2958 ac_dummy="$LDPATH"
2959 for ac_dir in $ac_dummy; do
2960   IFS=$ac_save_IFS
2961   test -z "$ac_dir" && ac_dir=.
2962   if $as_executable_p "$ac_dir/$ac_word"; then
2963    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2964    echo "$as_me:2964: found $ac_dir/$ac_word" >&5
2965    break
2966 fi
2967 done
2968
2969   ;;
2970 esac
2971 fi
2972 LDCONFIG=$ac_cv_path_LDCONFIG
2973
2974 if test -n "$LDCONFIG"; then
2975   echo "$as_me:2975: result: $LDCONFIG" >&5
2976 echo "${ECHO_T}$LDCONFIG" >&6
2977 else
2978   echo "$as_me:2978: result: no" >&5
2979 echo "${ECHO_T}no" >&6
2980 fi
2981
2982                 ;;
2983         esac
2984 fi
2985
2986 echo "$as_me:2986: checking if you want to ensure bool is consistent with C++" >&5
2987 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2988
2989 # Check whether --with-cxx or --without-cxx was given.
2990 if test "${with_cxx+set}" = set; then
2991   withval="$with_cxx"
2992   cf_with_cxx=$withval
2993 else
2994   cf_with_cxx=yes
2995 fi;
2996 echo "$as_me:2996: result: $cf_with_cxx" >&5
2997 echo "${ECHO_T}$cf_with_cxx" >&6
2998 if test "X$cf_with_cxx" = Xno ; then
2999         CXX=""
3000         GXX=""
3001 else
3002         # with autoconf 2.13, we can change the error to a warning:
3003                 ac_ext=cc
3004 ac_cpp='$CXXCPP $CPPFLAGS'
3005 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3006 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3007 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3008 ac_main_return=return
3009 if test -n "$ac_tool_prefix"; then
3010   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3011   do
3012     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3013 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3014 echo "$as_me:3014: checking for $ac_word" >&5
3015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3016 if test "${ac_cv_prog_CXX+set}" = set; then
3017   echo $ECHO_N "(cached) $ECHO_C" >&6
3018 else
3019   if test -n "$CXX"; then
3020   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3021 else
3022   ac_save_IFS=$IFS; IFS=$ac_path_separator
3023 ac_dummy="$PATH"
3024 for ac_dir in $ac_dummy; do
3025   IFS=$ac_save_IFS
3026   test -z "$ac_dir" && ac_dir=.
3027   $as_executable_p "$ac_dir/$ac_word" || continue
3028 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3029 echo "$as_me:3029: found $ac_dir/$ac_word" >&5
3030 break
3031 done
3032
3033 fi
3034 fi
3035 CXX=$ac_cv_prog_CXX
3036 if test -n "$CXX"; then
3037   echo "$as_me:3037: result: $CXX" >&5
3038 echo "${ECHO_T}$CXX" >&6
3039 else
3040   echo "$as_me:3040: result: no" >&5
3041 echo "${ECHO_T}no" >&6
3042 fi
3043
3044     test -n "$CXX" && break
3045   done
3046 fi
3047 if test -z "$CXX"; then
3048   ac_ct_CXX=$CXX
3049   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3050 do
3051   # Extract the first word of "$ac_prog", so it can be a program name with args.
3052 set dummy $ac_prog; ac_word=$2
3053 echo "$as_me:3053: checking for $ac_word" >&5
3054 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3055 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3056   echo $ECHO_N "(cached) $ECHO_C" >&6
3057 else
3058   if test -n "$ac_ct_CXX"; then
3059   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3060 else
3061   ac_save_IFS=$IFS; IFS=$ac_path_separator
3062 ac_dummy="$PATH"
3063 for ac_dir in $ac_dummy; do
3064   IFS=$ac_save_IFS
3065   test -z "$ac_dir" && ac_dir=.
3066   $as_executable_p "$ac_dir/$ac_word" || continue
3067 ac_cv_prog_ac_ct_CXX="$ac_prog"
3068 echo "$as_me:3068: found $ac_dir/$ac_word" >&5
3069 break
3070 done
3071
3072 fi
3073 fi
3074 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3075 if test -n "$ac_ct_CXX"; then
3076   echo "$as_me:3076: result: $ac_ct_CXX" >&5
3077 echo "${ECHO_T}$ac_ct_CXX" >&6
3078 else
3079   echo "$as_me:3079: result: no" >&5
3080 echo "${ECHO_T}no" >&6
3081 fi
3082
3083   test -n "$ac_ct_CXX" && break
3084 done
3085 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3086
3087   CXX=$ac_ct_CXX
3088 fi
3089
3090 # Provide some information about the compiler.
3091 echo "$as_me:3091:" \
3092      "checking for C++ compiler version" >&5
3093 ac_compiler=`set X $ac_compile; echo $2`
3094 { (eval echo "$as_me:3094: \"$ac_compiler --version </dev/null >&5\"") >&5
3095   (eval $ac_compiler --version </dev/null >&5) 2>&5
3096   ac_status=$?
3097   echo "$as_me:3097: \$? = $ac_status" >&5
3098   (exit $ac_status); }
3099 { (eval echo "$as_me:3099: \"$ac_compiler -v </dev/null >&5\"") >&5
3100   (eval $ac_compiler -v </dev/null >&5) 2>&5
3101   ac_status=$?
3102   echo "$as_me:3102: \$? = $ac_status" >&5
3103   (exit $ac_status); }
3104 { (eval echo "$as_me:3104: \"$ac_compiler -V </dev/null >&5\"") >&5
3105   (eval $ac_compiler -V </dev/null >&5) 2>&5
3106   ac_status=$?
3107   echo "$as_me:3107: \$? = $ac_status" >&5
3108   (exit $ac_status); }
3109
3110 echo "$as_me:3110: checking whether we are using the GNU C++ compiler" >&5
3111 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3112 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3113   echo $ECHO_N "(cached) $ECHO_C" >&6
3114 else
3115   cat >conftest.$ac_ext <<_ACEOF
3116 #line 3116 "configure"
3117 #include "confdefs.h"
3118
3119 int
3120 main (void)
3121 {
3122 #ifndef __GNUC__
3123        choke me
3124 #endif
3125
3126   ;
3127   return 0;
3128 }
3129 _ACEOF
3130 rm -f conftest.$ac_objext
3131 if { (eval echo "$as_me:3131: \"$ac_compile\"") >&5
3132   (eval $ac_compile) 2>&5
3133   ac_status=$?
3134   echo "$as_me:3134: \$? = $ac_status" >&5
3135   (exit $ac_status); } &&
3136          { ac_try='test -s conftest.$ac_objext'
3137   { (eval echo "$as_me:3137: \"$ac_try\"") >&5
3138   (eval $ac_try) 2>&5
3139   ac_status=$?
3140   echo "$as_me:3140: \$? = $ac_status" >&5
3141   (exit $ac_status); }; }; then
3142   ac_compiler_gnu=yes
3143 else
3144   echo "$as_me: failed program was:" >&5
3145 cat conftest.$ac_ext >&5
3146 ac_compiler_gnu=no
3147 fi
3148 rm -f conftest.$ac_objext conftest.$ac_ext
3149 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3150
3151 fi
3152 echo "$as_me:3152: result: $ac_cv_cxx_compiler_gnu" >&5
3153 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3154 GXX=`test $ac_compiler_gnu = yes && echo yes`
3155 ac_test_CXXFLAGS=${CXXFLAGS+set}
3156 ac_save_CXXFLAGS=$CXXFLAGS
3157 CXXFLAGS="-g"
3158 echo "$as_me:3158: checking whether $CXX accepts -g" >&5
3159 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3160 if test "${ac_cv_prog_cxx_g+set}" = set; then
3161   echo $ECHO_N "(cached) $ECHO_C" >&6
3162 else
3163   cat >conftest.$ac_ext <<_ACEOF
3164 #line 3164 "configure"
3165 #include "confdefs.h"
3166
3167 int
3168 main (void)
3169 {
3170
3171   ;
3172   return 0;
3173 }
3174 _ACEOF
3175 rm -f conftest.$ac_objext
3176 if { (eval echo "$as_me:3176: \"$ac_compile\"") >&5
3177   (eval $ac_compile) 2>&5
3178   ac_status=$?
3179   echo "$as_me:3179: \$? = $ac_status" >&5
3180   (exit $ac_status); } &&
3181          { ac_try='test -s conftest.$ac_objext'
3182   { (eval echo "$as_me:3182: \"$ac_try\"") >&5
3183   (eval $ac_try) 2>&5
3184   ac_status=$?
3185   echo "$as_me:3185: \$? = $ac_status" >&5
3186   (exit $ac_status); }; }; then
3187   ac_cv_prog_cxx_g=yes
3188 else
3189   echo "$as_me: failed program was:" >&5
3190 cat conftest.$ac_ext >&5
3191 ac_cv_prog_cxx_g=no
3192 fi
3193 rm -f conftest.$ac_objext conftest.$ac_ext
3194 fi
3195 echo "$as_me:3195: result: $ac_cv_prog_cxx_g" >&5
3196 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3197 if test "$ac_test_CXXFLAGS" = set; then
3198   CXXFLAGS=$ac_save_CXXFLAGS
3199 elif test $ac_cv_prog_cxx_g = yes; then
3200   if test "$GXX" = yes; then
3201     CXXFLAGS="-g -O2"
3202   else
3203     CXXFLAGS="-g"
3204   fi
3205 else
3206   if test "$GXX" = yes; then
3207     CXXFLAGS="-O2"
3208   else
3209     CXXFLAGS=
3210   fi
3211 fi
3212 for ac_declaration in \
3213    ''\
3214    '#include <stdlib.h>' \
3215    'extern "C" void std::exit (int) throw (); using std::exit;' \
3216    'extern "C" void std::exit (int); using std::exit;' \
3217    'extern "C" void exit (int) throw ();' \
3218    'extern "C" void exit (int);' \
3219    'void exit (int);'
3220 do
3221   cat >conftest.$ac_ext <<_ACEOF
3222 #line 3222 "configure"
3223 #include "confdefs.h"
3224 #include <stdlib.h>
3225 $ac_declaration
3226 int
3227 main (void)
3228 {
3229 exit (42);
3230   ;
3231   return 0;
3232 }
3233 _ACEOF
3234 rm -f conftest.$ac_objext
3235 if { (eval echo "$as_me:3235: \"$ac_compile\"") >&5
3236   (eval $ac_compile) 2>&5
3237   ac_status=$?
3238   echo "$as_me:3238: \$? = $ac_status" >&5
3239   (exit $ac_status); } &&
3240          { ac_try='test -s conftest.$ac_objext'
3241   { (eval echo "$as_me:3241: \"$ac_try\"") >&5
3242   (eval $ac_try) 2>&5
3243   ac_status=$?
3244   echo "$as_me:3244: \$? = $ac_status" >&5
3245   (exit $ac_status); }; }; then
3246   :
3247 else
3248   echo "$as_me: failed program was:" >&5
3249 cat conftest.$ac_ext >&5
3250 continue
3251 fi
3252 rm -f conftest.$ac_objext conftest.$ac_ext
3253   cat >conftest.$ac_ext <<_ACEOF
3254 #line 3254 "configure"
3255 #include "confdefs.h"
3256 $ac_declaration
3257 int
3258 main (void)
3259 {
3260 exit (42);
3261   ;
3262   return 0;
3263 }
3264 _ACEOF
3265 rm -f conftest.$ac_objext
3266 if { (eval echo "$as_me:3266: \"$ac_compile\"") >&5
3267   (eval $ac_compile) 2>&5
3268   ac_status=$?
3269   echo "$as_me:3269: \$? = $ac_status" >&5
3270   (exit $ac_status); } &&
3271          { ac_try='test -s conftest.$ac_objext'
3272   { (eval echo "$as_me:3272: \"$ac_try\"") >&5
3273   (eval $ac_try) 2>&5
3274   ac_status=$?
3275   echo "$as_me:3275: \$? = $ac_status" >&5
3276   (exit $ac_status); }; }; then
3277   break
3278 else
3279   echo "$as_me: failed program was:" >&5
3280 cat conftest.$ac_ext >&5
3281 fi
3282 rm -f conftest.$ac_objext conftest.$ac_ext
3283 done
3284 rm -rf conftest*
3285 if test -n "$ac_declaration"; then
3286   echo '#ifdef __cplusplus' >>confdefs.h
3287   echo $ac_declaration      >>confdefs.h
3288   echo '#endif'             >>confdefs.h
3289 fi
3290
3291 ac_ext=c
3292 ac_cpp='$CPP $CPPFLAGS'
3293 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3294 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3295 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3296 ac_main_return=return
3297
3298         ac_ext=cc
3299 ac_cpp='$CXXCPP $CPPFLAGS'
3300 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3301 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3302 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3303 ac_main_return=return
3304
3305         if test "x$cf_with_cxx" != xno
3306         then
3307                 # Several of the C++ configurations do not work, particularly when
3308                 # cross-compiling (20140913 -TD)
3309                 echo "$as_me:3309: checking if $CXX works" >&5
3310 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3311
3312                 save_CPPFLAGS="$CPPFLAGS"
3313                 eval cf_includedir=${includedir}
3314                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3315
3316 cat >conftest.$ac_ext <<_ACEOF
3317 #line 3317 "configure"
3318 #include "confdefs.h"
3319
3320 #include <stdlib.h>
3321 #include <stdio.h>
3322
3323 int
3324 main (void)
3325 {
3326
3327                 printf("Hello world!\n")
3328
3329   ;
3330   return 0;
3331 }
3332 _ACEOF
3333 rm -f conftest.$ac_objext
3334 if { (eval echo "$as_me:3334: \"$ac_compile\"") >&5
3335   (eval $ac_compile) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit $ac_status); } &&
3339          { ac_try='test -s conftest.$ac_objext'
3340   { (eval echo "$as_me:3340: \"$ac_try\"") >&5
3341   (eval $ac_try) 2>&5
3342   ac_status=$?
3343   echo "$as_me:3343: \$? = $ac_status" >&5
3344   (exit $ac_status); }; }; then
3345   cf_cxx_works=yes
3346 else
3347   echo "$as_me: failed program was:" >&5
3348 cat conftest.$ac_ext >&5
3349 cf_cxx_works=no
3350 fi
3351 rm -f conftest.$ac_objext conftest.$ac_ext
3352                 CPPFLAGS="$save_CPPFLAGS"
3353
3354                 echo "$as_me:3354: result: $cf_cxx_works" >&5
3355 echo "${ECHO_T}$cf_cxx_works" >&6
3356                 if test "x$cf_cxx_works" = xno
3357                 then
3358                         { echo "$as_me:3358: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3359 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3360                         cf_with_cxx=no; CXX=""; GXX="";
3361                 fi
3362         fi
3363         ac_ext=c
3364 ac_cpp='$CPP $CPPFLAGS'
3365 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3366 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3367 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3368 ac_main_return=return
3369
3370         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3371         if test "$CXX" = "g++" ; then
3372                 # Extract the first word of "g++", so it can be a program name with args.
3373 set dummy g++; ac_word=$2
3374 echo "$as_me:3374: checking for $ac_word" >&5
3375 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3376 if test "${ac_cv_path_CXX+set}" = set; then
3377   echo $ECHO_N "(cached) $ECHO_C" >&6
3378 else
3379   case $CXX in
3380   [\\/]* | ?:[\\/]*)
3381   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3382   ;;
3383   *)
3384   ac_save_IFS=$IFS; IFS=$ac_path_separator
3385 ac_dummy="$PATH"
3386 for ac_dir in $ac_dummy; do
3387   IFS=$ac_save_IFS
3388   test -z "$ac_dir" && ac_dir=.
3389   if $as_executable_p "$ac_dir/$ac_word"; then
3390    ac_cv_path_CXX="$ac_dir/$ac_word"
3391    echo "$as_me:3391: found $ac_dir/$ac_word" >&5
3392    break
3393 fi
3394 done
3395
3396   ;;
3397 esac
3398 fi
3399 CXX=$ac_cv_path_CXX
3400
3401 if test -n "$CXX"; then
3402   echo "$as_me:3402: result: $CXX" >&5
3403 echo "${ECHO_T}$CXX" >&6
3404 else
3405   echo "$as_me:3405: result: no" >&5
3406 echo "${ECHO_T}no" >&6
3407 fi
3408
3409         fi
3410         case "x$CXX" in
3411         (x|xg++)
3412                 { echo "$as_me:3412: WARNING: You don't have any C++ compiler, too bad" >&5
3413 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3414                 cf_with_cxx=no; CXX=""; GXX="";
3415                 ;;
3416         esac
3417 fi
3418
3419 GXX_VERSION=none
3420 if test "$GXX" = yes; then
3421         echo "$as_me:3421: checking version of ${CXX:-g++}" >&5
3422 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3423         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3424         if test -z "$GXX_VERSION"
3425         then
3426                 GXX_VERSION=unknown
3427                 GXX=no
3428         fi
3429         echo "$as_me:3429: result: $GXX_VERSION" >&5
3430 echo "${ECHO_T}$GXX_VERSION" >&6
3431 fi
3432
3433 case $GXX_VERSION in
3434 ([1-9][0-9].*)
3435         ;;
3436 (1.*|2.[0-6]*)
3437         { echo "$as_me:3437: WARNING: templates do not work" >&5
3438 echo "$as_me: WARNING: templates do not work" >&2;}
3439         ;;
3440 esac
3441
3442 echo "$as_me:3442: checking if you want to build C++ binding and demo" >&5
3443 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3444
3445 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3446 if test "${with_cxx_binding+set}" = set; then
3447   withval="$with_cxx_binding"
3448   cf_with_cxx_binding=$withval
3449 else
3450   cf_with_cxx_binding=$cf_with_cxx
3451 fi;
3452 echo "$as_me:3452: result: $cf_with_cxx_binding" >&5
3453 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3454
3455 echo "$as_me:3455: checking if you want to build with Ada" >&5
3456 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3457 echo "$as_me:3457: result: $cf_with_ada" >&5
3458 echo "${ECHO_T}$cf_with_ada" >&6
3459
3460 echo "$as_me:3460: checking if you want to install terminal database" >&5
3461 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3462
3463 # Check whether --enable-db-install or --disable-db-install was given.
3464 if test "${enable_db_install+set}" = set; then
3465   enableval="$enable_db_install"
3466   cf_with_db_install=$enableval
3467 else
3468   cf_with_db_install=yes
3469 fi;
3470 echo "$as_me:3470: result: $cf_with_db_install" >&5
3471 echo "${ECHO_T}$cf_with_db_install" >&6
3472
3473 echo "$as_me:3473: checking if you want to install manpages" >&5
3474 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3475
3476 # Check whether --with-manpages or --without-manpages was given.
3477 if test "${with_manpages+set}" = set; then
3478   withval="$with_manpages"
3479   cf_with_manpages=$withval
3480 else
3481   cf_with_manpages=yes
3482 fi;
3483 echo "$as_me:3483: result: $cf_with_manpages" >&5
3484 echo "${ECHO_T}$cf_with_manpages" >&6
3485
3486 echo "$as_me:3486: checking if you want to build programs such as tic" >&5
3487 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3488
3489 # Check whether --with-progs or --without-progs was given.
3490 if test "${with_progs+set}" = set; then
3491   withval="$with_progs"
3492   cf_with_progs=$withval
3493 else
3494   cf_with_progs=yes
3495 fi;
3496 echo "$as_me:3496: result: $cf_with_progs" >&5
3497 echo "${ECHO_T}$cf_with_progs" >&6
3498
3499 if test -f $srcdir/tack/tack.h; then
3500         if test "x$cross_compiling" = xyes ; then
3501                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3502
3503 echo "${as_me:-configure}:3503: testing ignoring tack because we are cross-compiling ..." 1>&5
3504
3505                 cf_with_tack=no
3506         else
3507                 echo "$as_me:3507: checking if you want to build the tack program" >&5
3508 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3509
3510 # Check whether --with-tack or --without-tack was given.
3511 if test "${with_tack+set}" = set; then
3512   withval="$with_tack"
3513   cf_with_tack=$withval
3514 else
3515   cf_with_tack=$cf_with_progs
3516 fi;
3517                 echo "$as_me:3517: result: $cf_with_tack" >&5
3518 echo "${ECHO_T}$cf_with_tack" >&6
3519         fi
3520 else
3521         cf_with_tack=no
3522 fi
3523
3524 echo "$as_me:3524: checking if you want to build test-programs" >&5
3525 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3526
3527 # Check whether --with-tests or --without-tests was given.
3528 if test "${with_tests+set}" = set; then
3529   withval="$with_tests"
3530   cf_with_tests=$withval
3531 else
3532   cf_with_tests=yes
3533 fi;
3534 echo "$as_me:3534: result: $cf_with_tests" >&5
3535 echo "${ECHO_T}$cf_with_tests" >&6
3536
3537 echo "$as_me:3537: checking if you wish to install curses.h" >&5
3538 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3539
3540 # Check whether --with-curses-h or --without-curses-h was given.
3541 if test "${with_curses_h+set}" = set; then
3542   withval="$with_curses_h"
3543   with_curses_h=$withval
3544 else
3545   with_curses_h=yes
3546 fi;
3547 echo "$as_me:3547: result: $with_curses_h" >&5
3548 echo "${ECHO_T}$with_curses_h" >&6
3549
3550 modules_to_build="ncurses"
3551 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3552 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3553 modules_to_build="$modules_to_build panel menu form"
3554
3555 test "$program_prefix" != NONE &&
3556   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3557 # Use a double $ so make ignores it.
3558 test "$program_suffix" != NONE &&
3559   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3560 # Double any \ or $.  echo might interpret backslashes.
3561 # By default was `s,x,x', remove it if useless.
3562 cat <<\_ACEOF >conftest.sed
3563 s/[\\$]/&&/g;s/;s,x,x,$//
3564 _ACEOF
3565 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3566 rm conftest.sed
3567
3568 for ac_prog in mawk gawk nawk awk
3569 do
3570   # Extract the first word of "$ac_prog", so it can be a program name with args.
3571 set dummy $ac_prog; ac_word=$2
3572 echo "$as_me:3572: checking for $ac_word" >&5
3573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3574 if test "${ac_cv_prog_AWK+set}" = set; then
3575   echo $ECHO_N "(cached) $ECHO_C" >&6
3576 else
3577   if test -n "$AWK"; then
3578   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3579 else
3580   ac_save_IFS=$IFS; IFS=$ac_path_separator
3581 ac_dummy="$PATH"
3582 for ac_dir in $ac_dummy; do
3583   IFS=$ac_save_IFS
3584   test -z "$ac_dir" && ac_dir=.
3585   $as_executable_p "$ac_dir/$ac_word" || continue
3586 ac_cv_prog_AWK="$ac_prog"
3587 echo "$as_me:3587: found $ac_dir/$ac_word" >&5
3588 break
3589 done
3590
3591 fi
3592 fi
3593 AWK=$ac_cv_prog_AWK
3594 if test -n "$AWK"; then
3595   echo "$as_me:3595: result: $AWK" >&5
3596 echo "${ECHO_T}$AWK" >&6
3597 else
3598   echo "$as_me:3598: result: no" >&5
3599 echo "${ECHO_T}no" >&6
3600 fi
3601
3602   test -n "$AWK" && break
3603 done
3604
3605 test -z "$AWK" && { { echo "$as_me:3605: error: No awk program found" >&5
3606 echo "$as_me: error: No awk program found" >&2;}
3607    { (exit 1); exit 1; }; }
3608
3609 echo "$as_me:3609: checking for egrep" >&5
3610 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3611 if test "${ac_cv_prog_egrep+set}" = set; then
3612   echo $ECHO_N "(cached) $ECHO_C" >&6
3613 else
3614   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3615                 then ac_cv_prog_egrep='grep -E'
3616                 else ac_cv_prog_egrep='egrep'
3617         fi
3618 fi
3619 echo "$as_me:3619: result: $ac_cv_prog_egrep" >&5
3620 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3621         EGREP=$ac_cv_prog_egrep
3622
3623         test -z "$EGREP" && { { echo "$as_me:3623: error: No egrep program found" >&5
3624 echo "$as_me: error: No egrep program found" >&2;}
3625    { (exit 1); exit 1; }; }
3626
3627 # Find a good install program.  We prefer a C program (faster),
3628 # so one script is as good as another.  But avoid the broken or
3629 # incompatible versions:
3630 # SysV /etc/install, /usr/sbin/install
3631 # SunOS /usr/etc/install
3632 # IRIX /sbin/install
3633 # AIX /bin/install
3634 # AmigaOS /C/install, which installs bootblocks on floppy discs
3635 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3636 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3637 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3638 # ./install, which can be erroneously created by make from ./install.sh.
3639 echo "$as_me:3639: checking for a BSD compatible install" >&5
3640 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3641 if test -z "$INSTALL"; then
3642 if test "${ac_cv_path_install+set}" = set; then
3643   echo $ECHO_N "(cached) $ECHO_C" >&6
3644 else
3645     ac_save_IFS=$IFS; IFS=$ac_path_separator
3646   for ac_dir in $PATH; do
3647     IFS=$ac_save_IFS
3648     # Account for people who put trailing slashes in PATH elements.
3649     case $ac_dir/ in
3650     / | ./ | .// | /cC/* \
3651     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3652     | /usr/ucb/* ) ;;
3653     *)
3654       # OSF1 and SCO ODT 3.0 have their own names for install.
3655       # Don't use installbsd from OSF since it installs stuff as root
3656       # by default.
3657       for ac_prog in ginstall scoinst install; do
3658         if $as_executable_p "$ac_dir/$ac_prog"; then
3659           if test $ac_prog = install &&
3660             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3661             # AIX install.  It has an incompatible calling convention.
3662             :
3663           elif test $ac_prog = install &&
3664             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3665             # program-specific install script used by HP pwplus--don't use.
3666             :
3667           else
3668             ac_cv_path_install="$ac_dir/$ac_prog -c"
3669             break 2
3670           fi
3671         fi
3672       done
3673       ;;
3674     esac
3675   done
3676
3677 fi
3678   if test "${ac_cv_path_install+set}" = set; then
3679     INSTALL=$ac_cv_path_install
3680   else
3681     # As a last resort, use the slow shell script.  We don't cache a
3682     # path for INSTALL within a source directory, because that will
3683     # break other packages using the cache if that directory is
3684     # removed, or if the path is relative.
3685     INSTALL=$ac_install_sh
3686   fi
3687 fi
3688 echo "$as_me:3688: result: $INSTALL" >&5
3689 echo "${ECHO_T}$INSTALL" >&6
3690
3691 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3692 # It thinks the first close brace ends the variable substitution.
3693 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3694
3695 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3696
3697 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3698
3699 case $INSTALL in
3700 (/*)
3701         ;;
3702 (*)
3703         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3704         test -z "$cf_dir" && cf_dir=.
3705         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3706         ;;
3707 esac
3708
3709 for ac_prog in lint cppcheck splint
3710 do
3711   # Extract the first word of "$ac_prog", so it can be a program name with args.
3712 set dummy $ac_prog; ac_word=$2
3713 echo "$as_me:3713: checking for $ac_word" >&5
3714 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3715 if test "${ac_cv_prog_LINT+set}" = set; then
3716   echo $ECHO_N "(cached) $ECHO_C" >&6
3717 else
3718   if test -n "$LINT"; then
3719   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3720 else
3721   ac_save_IFS=$IFS; IFS=$ac_path_separator
3722 ac_dummy="$PATH"
3723 for ac_dir in $ac_dummy; do
3724   IFS=$ac_save_IFS
3725   test -z "$ac_dir" && ac_dir=.
3726   $as_executable_p "$ac_dir/$ac_word" || continue
3727 ac_cv_prog_LINT="$ac_prog"
3728 echo "$as_me:3728: found $ac_dir/$ac_word" >&5
3729 break
3730 done
3731
3732 fi
3733 fi
3734 LINT=$ac_cv_prog_LINT
3735 if test -n "$LINT"; then
3736   echo "$as_me:3736: result: $LINT" >&5
3737 echo "${ECHO_T}$LINT" >&6
3738 else
3739   echo "$as_me:3739: result: no" >&5
3740 echo "${ECHO_T}no" >&6
3741 fi
3742
3743   test -n "$LINT" && break
3744 done
3745
3746 case "x$LINT" in
3747 (xcppcheck|x*/cppcheck)
3748         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3749         ;;
3750 esac
3751
3752 echo "$as_me:3752: checking whether ln -s works" >&5
3753 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3754 LN_S=$as_ln_s
3755 if test "$LN_S" = "ln -s"; then
3756   echo "$as_me:3756: result: yes" >&5
3757 echo "${ECHO_T}yes" >&6
3758 else
3759   echo "$as_me:3759: result: no, using $LN_S" >&5
3760 echo "${ECHO_T}no, using $LN_S" >&6
3761 fi
3762
3763 echo "$as_me:3763: checking if $LN_S -f options work" >&5
3764 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3765
3766 rm -f conf$$.src conf$$dst
3767 echo >conf$$.dst
3768 echo first >conf$$.src
3769 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3770         cf_prog_ln_sf=yes
3771 else
3772         cf_prog_ln_sf=no
3773 fi
3774 rm -f conf$$.dst conf$$src
3775 echo "$as_me:3775: result: $cf_prog_ln_sf" >&5
3776 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3777
3778 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3779
3780 echo "$as_me:3780: checking for long file names" >&5
3781 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3782 if test "${ac_cv_sys_long_file_names+set}" = set; then
3783   echo $ECHO_N "(cached) $ECHO_C" >&6
3784 else
3785   ac_cv_sys_long_file_names=yes
3786 # Test for long file names in all the places we know might matter:
3787 #      .                the current directory, where building will happen
3788 #      $prefix/lib      where we will be installing things
3789 #      $exec_prefix/lib likewise
3790 # eval it to expand exec_prefix.
3791 #      $TMPDIR          if set, where it might want to write temporary files
3792 # if $TMPDIR is not set:
3793 #      /tmp             where it might want to write temporary files
3794 #      /var/tmp         likewise
3795 #      /usr/tmp         likewise
3796 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3797   ac_tmpdirs=$TMPDIR
3798 else
3799   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3800 fi
3801 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3802   test -d $ac_dir || continue
3803   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3804   ac_xdir=$ac_dir/cf$$
3805   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3806   ac_tf1=$ac_xdir/conftest9012345
3807   ac_tf2=$ac_xdir/conftest9012346
3808   (echo 1 >$ac_tf1) 2>/dev/null
3809   (echo 2 >$ac_tf2) 2>/dev/null
3810   ac_val=`cat $ac_tf1 2>/dev/null`
3811   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3812     ac_cv_sys_long_file_names=no
3813     rm -rf $ac_xdir 2>/dev/null
3814     break
3815   fi
3816   rm -rf $ac_xdir 2>/dev/null
3817 done
3818 fi
3819 echo "$as_me:3819: result: $ac_cv_sys_long_file_names" >&5
3820 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3821 if test $ac_cv_sys_long_file_names = yes; then
3822
3823 cat >>confdefs.h <<\EOF
3824 #define HAVE_LONG_FILE_NAMES 1
3825 EOF
3826
3827 fi
3828
3829 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3830 # of package conflict.
3831 cf_config_suffix=
3832
3833 # Check whether --with-config-suffix or --without-config-suffix was given.
3834 if test "${with_config_suffix+set}" = set; then
3835   withval="$with_config_suffix"
3836   case "x$withval" in
3837         (xyes|xno)
3838                 { echo "$as_me:3838: WARNING: expected a value for config-suffix option" >&5
3839 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3840                 ;;
3841         (*)     cf_config_suffix="$withval"
3842                 ;;
3843         esac
3844 fi;
3845
3846 # If we find pkg-config, check if we should install the ".pc" files.
3847
3848 echo "$as_me:3848: checking if you want to use pkg-config" >&5
3849 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3850
3851 # Check whether --with-pkg-config or --without-pkg-config was given.
3852 if test "${with_pkg_config+set}" = set; then
3853   withval="$with_pkg_config"
3854   cf_pkg_config=$withval
3855 else
3856   cf_pkg_config=yes
3857 fi;
3858 echo "$as_me:3858: result: $cf_pkg_config" >&5
3859 echo "${ECHO_T}$cf_pkg_config" >&6
3860
3861 case $cf_pkg_config in
3862 (no)
3863         PKG_CONFIG=none
3864         ;;
3865 (yes)
3866
3867 if test -n "$ac_tool_prefix"; then
3868   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3869 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3870 echo "$as_me:3870: checking for $ac_word" >&5
3871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3872 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3873   echo $ECHO_N "(cached) $ECHO_C" >&6
3874 else
3875   case $PKG_CONFIG in
3876   [\\/]* | ?:[\\/]*)
3877   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3878   ;;
3879   *)
3880   ac_save_IFS=$IFS; IFS=$ac_path_separator
3881 ac_dummy="$PATH"
3882 for ac_dir in $ac_dummy; do
3883   IFS=$ac_save_IFS
3884   test -z "$ac_dir" && ac_dir=.
3885   if $as_executable_p "$ac_dir/$ac_word"; then
3886    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3887    echo "$as_me:3887: found $ac_dir/$ac_word" >&5
3888    break
3889 fi
3890 done
3891
3892   ;;
3893 esac
3894 fi
3895 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3896
3897 if test -n "$PKG_CONFIG"; then
3898   echo "$as_me:3898: result: $PKG_CONFIG" >&5
3899 echo "${ECHO_T}$PKG_CONFIG" >&6
3900 else
3901   echo "$as_me:3901: result: no" >&5
3902 echo "${ECHO_T}no" >&6
3903 fi
3904
3905 fi
3906 if test -z "$ac_cv_path_PKG_CONFIG"; then
3907   ac_pt_PKG_CONFIG=$PKG_CONFIG
3908   # Extract the first word of "pkg-config", so it can be a program name with args.
3909 set dummy pkg-config; 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_path_ac_pt_PKG_CONFIG+set}" = set; then
3913   echo $ECHO_N "(cached) $ECHO_C" >&6
3914 else
3915   case $ac_pt_PKG_CONFIG in
3916   [\\/]* | ?:[\\/]*)
3917   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3918   ;;
3919   *)
3920   ac_save_IFS=$IFS; IFS=$ac_path_separator
3921 ac_dummy="$PATH"
3922 for ac_dir in $ac_dummy; do
3923   IFS=$ac_save_IFS
3924   test -z "$ac_dir" && ac_dir=.
3925   if $as_executable_p "$ac_dir/$ac_word"; then
3926    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3927    echo "$as_me:3927: found $ac_dir/$ac_word" >&5
3928    break
3929 fi
3930 done
3931
3932   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3933   ;;
3934 esac
3935 fi
3936 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3937
3938 if test -n "$ac_pt_PKG_CONFIG"; then
3939   echo "$as_me:3939: result: $ac_pt_PKG_CONFIG" >&5
3940 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3941 else
3942   echo "$as_me:3942: result: no" >&5
3943 echo "${ECHO_T}no" >&6
3944 fi
3945
3946   PKG_CONFIG=$ac_pt_PKG_CONFIG
3947 else
3948   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3949 fi
3950
3951         ;;
3952 (*)
3953         PKG_CONFIG=$withval
3954         ;;
3955 esac
3956
3957 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3958 if test "$PKG_CONFIG" != none ; then
3959
3960 if test "x$prefix" != xNONE; then
3961         cf_path_syntax="$prefix"
3962 else
3963         cf_path_syntax="$ac_default_prefix"
3964 fi
3965
3966 case ".$PKG_CONFIG" in
3967 (.\$\(*\)*|.\'*\'*)
3968         ;;
3969 (..|./*|.\\*)
3970         ;;
3971 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3972         ;;
3973 (.\${*prefix}*|.\${*dir}*)
3974         eval PKG_CONFIG="$PKG_CONFIG"
3975         case ".$PKG_CONFIG" in
3976         (.NONE/*)
3977                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3978                 ;;
3979         esac
3980         ;;
3981 (.no|.NONE/*)
3982         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3983         ;;
3984 (*)
3985         { { echo "$as_me:3985: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3986 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3987    { (exit 1); exit 1; }; }
3988         ;;
3989 esac
3990
3991 elif test "x$cf_pkg_config" != xno ; then
3992         { echo "$as_me:3992: WARNING: pkg-config is not installed" >&5
3993 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3994 fi
3995
3996 case $PKG_CONFIG in
3997 (no|none|yes)
3998         echo "$as_me:3998: checking for pkg-config library directory" >&5
3999 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4000         ;;
4001 (*)
4002         echo "$as_me:4002: checking for $PKG_CONFIG library directory" >&5
4003 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4004         ;;
4005 esac
4006
4007 PKG_CONFIG_LIBDIR=no
4008
4009 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4010 if test "${with_pkg_config_libdir+set}" = set; then
4011   withval="$with_pkg_config_libdir"
4012   PKG_CONFIG_LIBDIR=$withval
4013 else
4014   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4015 fi;
4016
4017 case x$PKG_CONFIG_LIBDIR in