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