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