]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.9 - patch 20110604
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.30 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
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
110 # Initialize some variables set by options.
111 ac_init_help=
112 ac_init_version=false
113 # The variables have the same names as the options, with
114 # dashes changed to underlines.
115 cache_file=/dev/null
116 exec_prefix=NONE
117 no_create=
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129
130 # Installation directory options.
131 # These are left unexpanded so users can "make install exec_prefix=/foo"
132 # and all the variables that are supposed to be based on exec_prefix
133 # by default will actually change.
134 # Use braces instead of parens because sh, perl, etc. also accept them.
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
147
148 # Identity of this package.
149 PACKAGE_NAME=
150 PACKAGE_TARNAME=
151 PACKAGE_VERSION=
152 PACKAGE_STRING=
153 PACKAGE_BUGREPORT=
154
155 ac_prev=
156 for ac_option
157 do
158   # If the previous option needs an argument, assign it.
159   if test -n "$ac_prev"; then
160     eval "$ac_prev=\$ac_option"
161     ac_prev=
162     continue
163   fi
164
165   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case $ac_option in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir=$ac_optarg ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build_alias ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build_alias=$ac_optarg ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file=$ac_optarg ;;
187
188   --config-cache | -C)
189     cache_file=config.cache ;;
190
191   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192     ac_prev=datadir ;;
193   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194   | --da=*)
195     datadir=$ac_optarg ;;
196
197   -disable-* | --disable-*)
198     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
199     # Reject names that are not valid shell variable names.
200     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
201       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
202    { (exit 1); exit 1; }; }
203     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
204     eval "enable_$ac_feature=no" ;;
205
206   -enable-* | --enable-*)
207     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
208     # Reject names that are not valid shell variable names.
209     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
210       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
211    { (exit 1); exit 1; }; }
212     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
213     case $ac_option in
214       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
215       *) ac_optarg=yes ;;
216     esac
217     eval "enable_$ac_feature='$ac_optarg'" ;;
218
219   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
220   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
221   | --exec | --exe | --ex)
222     ac_prev=exec_prefix ;;
223   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
224   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
225   | --exec=* | --exe=* | --ex=*)
226     exec_prefix=$ac_optarg ;;
227
228   -gas | --gas | --ga | --g)
229     # Obsolete; use --with-gas.
230     with_gas=yes ;;
231
232   -help | --help | --hel | --he | -h)
233     ac_init_help=long ;;
234   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
235     ac_init_help=recursive ;;
236   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
237     ac_init_help=short ;;
238
239   -host | --host | --hos | --ho)
240     ac_prev=host_alias ;;
241   -host=* | --host=* | --hos=* | --ho=*)
242     host_alias=$ac_optarg ;;
243
244   -includedir | --includedir | --includedi | --included | --include \
245   | --includ | --inclu | --incl | --inc)
246     ac_prev=includedir ;;
247   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
248   | --includ=* | --inclu=* | --incl=* | --inc=*)
249     includedir=$ac_optarg ;;
250
251   -infodir | --infodir | --infodi | --infod | --info | --inf)
252     ac_prev=infodir ;;
253   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
254     infodir=$ac_optarg ;;
255
256   -libdir | --libdir | --libdi | --libd)
257     ac_prev=libdir ;;
258   -libdir=* | --libdir=* | --libdi=* | --libd=*)
259     libdir=$ac_optarg ;;
260
261   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
262   | --libexe | --libex | --libe)
263     ac_prev=libexecdir ;;
264   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
265   | --libexe=* | --libex=* | --libe=*)
266     libexecdir=$ac_optarg ;;
267
268   -localstatedir | --localstatedir | --localstatedi | --localstated \
269   | --localstate | --localstat | --localsta | --localst \
270   | --locals | --local | --loca | --loc | --lo)
271     ac_prev=localstatedir ;;
272   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
273   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
274   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
275     localstatedir=$ac_optarg ;;
276
277   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278     ac_prev=mandir ;;
279   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
280     mandir=$ac_optarg ;;
281
282   -nfp | --nfp | --nf)
283     # Obsolete; use --without-fp.
284     with_fp=no ;;
285
286   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
287   | --no-cr | --no-c)
288     no_create=yes ;;
289
290   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
291   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
292     no_recursion=yes ;;
293
294   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
295   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
296   | --oldin | --oldi | --old | --ol | --o)
297     ac_prev=oldincludedir ;;
298   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
299   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
300   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
301     oldincludedir=$ac_optarg ;;
302
303   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304     ac_prev=prefix ;;
305   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
306     prefix=$ac_optarg ;;
307
308   -program-prefix | --program-prefix | --program-prefi | --program-pref \
309   | --program-pre | --program-pr | --program-p)
310     ac_prev=program_prefix ;;
311   -program-prefix=* | --program-prefix=* | --program-prefi=* \
312   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
313     program_prefix=$ac_optarg ;;
314
315   -program-suffix | --program-suffix | --program-suffi | --program-suff \
316   | --program-suf | --program-su | --program-s)
317     ac_prev=program_suffix ;;
318   -program-suffix=* | --program-suffix=* | --program-suffi=* \
319   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
320     program_suffix=$ac_optarg ;;
321
322   -program-transform-name | --program-transform-name \
323   | --program-transform-nam | --program-transform-na \
324   | --program-transform-n | --program-transform- \
325   | --program-transform | --program-transfor \
326   | --program-transfo | --program-transf \
327   | --program-trans | --program-tran \
328   | --progr-tra | --program-tr | --program-t)
329     ac_prev=program_transform_name ;;
330   -program-transform-name=* | --program-transform-name=* \
331   | --program-transform-nam=* | --program-transform-na=* \
332   | --program-transform-n=* | --program-transform-=* \
333   | --program-transform=* | --program-transfor=* \
334   | --program-transfo=* | --program-transf=* \
335   | --program-trans=* | --program-tran=* \
336   | --progr-tra=* | --program-tr=* | --program-t=*)
337     program_transform_name=$ac_optarg ;;
338
339   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
340   | -silent | --silent | --silen | --sile | --sil)
341     silent=yes ;;
342
343   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344     ac_prev=sbindir ;;
345   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346   | --sbi=* | --sb=*)
347     sbindir=$ac_optarg ;;
348
349   -sharedstatedir | --sharedstatedir | --sharedstatedi \
350   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
351   | --sharedst | --shareds | --shared | --share | --shar \
352   | --sha | --sh)
353     ac_prev=sharedstatedir ;;
354   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
355   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
356   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357   | --sha=* | --sh=*)
358     sharedstatedir=$ac_optarg ;;
359
360   -site | --site | --sit)
361     ac_prev=site ;;
362   -site=* | --site=* | --sit=*)
363     site=$ac_optarg ;;
364
365   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366     ac_prev=srcdir ;;
367   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
368     srcdir=$ac_optarg ;;
369
370   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
371   | --syscon | --sysco | --sysc | --sys | --sy)
372     ac_prev=sysconfdir ;;
373   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
374   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
375     sysconfdir=$ac_optarg ;;
376
377   -target | --target | --targe | --targ | --tar | --ta | --t)
378     ac_prev=target_alias ;;
379   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
380     target_alias=$ac_optarg ;;
381
382   -v | -verbose | --verbose | --verbos | --verbo | --verb)
383     verbose=yes ;;
384
385   -version | --version | --versio | --versi | --vers | -V)
386     ac_init_version=: ;;
387
388   -with-* | --with-*)
389     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
390     # Reject names that are not valid shell variable names.
391     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
392       { echo "$as_me: error: invalid package name: $ac_package" >&2
393    { (exit 1); exit 1; }; }
394     ac_package=`echo $ac_package| sed 's/-/_/g'`
395     case $ac_option in
396       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
397       *) ac_optarg=yes ;;
398     esac
399     eval "with_$ac_package='$ac_optarg'" ;;
400
401   -without-* | --without-*)
402     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
403     # Reject names that are not valid shell variable names.
404     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405       { echo "$as_me: error: invalid package name: $ac_package" >&2
406    { (exit 1); exit 1; }; }
407     ac_package=`echo $ac_package | sed 's/-/_/g'`
408     eval "with_$ac_package=no" ;;
409
410   --x)
411     # Obsolete; use --with-x.
412     with_x=yes ;;
413
414   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415   | --x-incl | --x-inc | --x-in | --x-i)
416     ac_prev=x_includes ;;
417   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419     x_includes=$ac_optarg ;;
420
421   -x-libraries | --x-libraries | --x-librarie | --x-librari \
422   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423     ac_prev=x_libraries ;;
424   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426     x_libraries=$ac_optarg ;;
427
428   -*) { echo "$as_me: error: unrecognized option: $ac_option
429 Try \`$0 --help' for more information." >&2
430    { (exit 1); exit 1; }; }
431     ;;
432
433   *=*)
434     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
435     # Reject names that are not valid shell variable names.
436     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
437       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
438    { (exit 1); exit 1; }; }
439     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
440     eval "$ac_envvar='$ac_optarg'"
441     export $ac_envvar ;;
442
443   *)
444     # FIXME: should be removed in autoconf 3.0.
445     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
446     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
447       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
448     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
449     ;;
450
451   esac
452 done
453
454 if test -n "$ac_prev"; then
455   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
456   { echo "$as_me: error: missing argument to $ac_option" >&2
457    { (exit 1); exit 1; }; }
458 fi
459
460 # Be sure to have absolute paths.
461 for ac_var in exec_prefix prefix
462 do
463   eval ac_val=$`echo $ac_var`
464   case $ac_val in
465     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
466     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
467    { (exit 1); exit 1; }; };;
468   esac
469 done
470
471 # Be sure to have absolute paths.
472 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
473               localstatedir libdir includedir oldincludedir infodir mandir
474 do
475   eval ac_val=$`echo $ac_var`
476   case $ac_val in
477     [\\/$]* | ?:[\\/]* ) ;;
478     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
479    { (exit 1); exit 1; }; };;
480   esac
481 done
482
483 # There might be people who depend on the old broken behavior: `$host'
484 # used to hold the argument of --host etc.
485 build=$build_alias
486 host=$host_alias
487 target=$target_alias
488
489 # FIXME: should be removed in autoconf 3.0.
490 if test "x$host_alias" != x; then
491   if test "x$build_alias" = x; then
492     cross_compiling=maybe
493     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
494     If a cross compiler is detected then cross compile mode will be used." >&2
495   elif test "x$build_alias" != "x$host_alias"; then
496     cross_compiling=yes
497   fi
498 fi
499
500 ac_tool_prefix=
501 test -n "$host_alias" && ac_tool_prefix=$host_alias-
502
503 test "$silent" = yes && exec 6>/dev/null
504
505 # Find the source files, if location was not specified.
506 if test -z "$srcdir"; then
507   ac_srcdir_defaulted=yes
508   # Try the directory containing this script, then its parent.
509   ac_prog=$0
510   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
511   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512   srcdir=$ac_confdir
513   if test ! -r $srcdir/$ac_unique_file; then
514     srcdir=..
515   fi
516 else
517   ac_srcdir_defaulted=no
518 fi
519 if test ! -r $srcdir/$ac_unique_file; then
520   if test "$ac_srcdir_defaulted" = yes; then
521     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
522    { (exit 1); exit 1; }; }
523   else
524     { echo "$as_me: error: cannot find sources in $srcdir" >&2
525    { (exit 1); exit 1; }; }
526   fi
527 fi
528 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
529 ac_env_build_alias_set=${build_alias+set}
530 ac_env_build_alias_value=$build_alias
531 ac_cv_env_build_alias_set=${build_alias+set}
532 ac_cv_env_build_alias_value=$build_alias
533 ac_env_host_alias_set=${host_alias+set}
534 ac_env_host_alias_value=$host_alias
535 ac_cv_env_host_alias_set=${host_alias+set}
536 ac_cv_env_host_alias_value=$host_alias
537 ac_env_target_alias_set=${target_alias+set}
538 ac_env_target_alias_value=$target_alias
539 ac_cv_env_target_alias_set=${target_alias+set}
540 ac_cv_env_target_alias_value=$target_alias
541 ac_env_CC_set=${CC+set}
542 ac_env_CC_value=$CC
543 ac_cv_env_CC_set=${CC+set}
544 ac_cv_env_CC_value=$CC
545 ac_env_CFLAGS_set=${CFLAGS+set}
546 ac_env_CFLAGS_value=$CFLAGS
547 ac_cv_env_CFLAGS_set=${CFLAGS+set}
548 ac_cv_env_CFLAGS_value=$CFLAGS
549 ac_env_LDFLAGS_set=${LDFLAGS+set}
550 ac_env_LDFLAGS_value=$LDFLAGS
551 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
552 ac_cv_env_LDFLAGS_value=$LDFLAGS
553 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
554 ac_env_CPPFLAGS_value=$CPPFLAGS
555 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
556 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
557 ac_env_CPP_set=${CPP+set}
558 ac_env_CPP_value=$CPP
559 ac_cv_env_CPP_set=${CPP+set}
560 ac_cv_env_CPP_value=$CPP
561
562 #
563 # Report the --help message.
564 #
565 if test "$ac_init_help" = "long"; then
566   # Omit some internal or obsolete options to make the list less imposing.
567   # This message is too long to be a string in the A/UX 3.1 sh.
568   cat <<EOF
569 \`configure' configures this package to adapt to many kinds of systems.
570
571 Usage: $0 [OPTION]... [VAR=VALUE]...
572
573 To assign environment variables (e.g., CC, CFLAGS...), specify them as
574 VAR=VALUE.  See below for descriptions of some of the useful variables.
575
576 Defaults for the options are specified in brackets.
577
578 Configuration:
579   -h, --help              display this help and exit
580       --help=short        display options specific to this package
581       --help=recursive    display the short help of all the included packages
582   -V, --version           display version information and exit
583   -q, --quiet, --silent   do not print \`checking...' messages
584       --cache-file=FILE   cache test results in FILE [disabled]
585   -C, --config-cache      alias for \`--cache-file=config.cache'
586   -n, --no-create         do not create output files
587       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
588
589 EOF
590
591   cat <<EOF
592 Installation directories:
593   --prefix=PREFIX         install architecture-independent files in PREFIX
594                           [$ac_default_prefix]
595   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
596                           [PREFIX]
597
598 By default, \`make install' will install all the files in
599 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
600 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
601 for instance \`--prefix=\$HOME'.
602
603 For better control, use the options below.
604
605 Fine tuning of the installation directories:
606   --bindir=DIR            user executables [EPREFIX/bin]
607   --sbindir=DIR           system admin executables [EPREFIX/sbin]
608   --libexecdir=DIR        program executables [EPREFIX/libexec]
609   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
610   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
611   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
612   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
613   --libdir=DIR            object code libraries [EPREFIX/lib]
614   --includedir=DIR        C header files [PREFIX/include]
615   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
616   --infodir=DIR           info documentation [PREFIX/info]
617   --mandir=DIR            man documentation [PREFIX/man]
618 EOF
619
620   cat <<\EOF
621
622 Program names:
623   --program-prefix=PREFIX            prepend PREFIX to installed program names
624   --program-suffix=SUFFIX            append SUFFIX to installed program names
625   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
626
627 System types:
628   --build=BUILD           configure for building on BUILD [guessed]
629   --host=HOST       build programs to run on HOST [BUILD]
630   --target=TARGET   configure for building compilers for TARGET [HOST]
631 EOF
632 fi
633
634 if test -n "$ac_init_help"; then
635
636   cat <<\EOF
637
638 Optional Packages:
639   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
640   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
641
642 Optional Features:
643   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
644   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
645
646   --with-system-type=XXX  test: override derived host system-type
647   --with-pkg-config{=path} enable/disable use of pkg-config
648   --enable-pc-files       generate and install .pc files for pkg-config
649   --without-tests         suppress build with test-programs
650   --enable-mixed-case     tic should assume mixed-case filenames
651   --with-install-prefix   prefixes actual install-location ($DESTDIR)
652 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
653   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
654   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
655   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
656   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
657   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
658   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
659 Options to Specify the Libraries Built/Used:
660   --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
661   --enable-widec          compile with wide-char/UTF-8 code
662   --with-curses-dir=DIR   directory in which (n)curses is installed
663   --with-shlib-version=X  Specify rel or abi version for shared libs
664   --enable-rpath-link     link sample programs with rpath option
665 Fine-Tuning Your Configuration:
666   --enable-broken_linker  compile with broken-linker support code
667   --disable-largefile     omit support for large files
668   --with-rcs-ids          compile-in RCS identifiers
669 Extensions:
670   --disable-ext-funcs     disable function-extensions
671   --enable-const          compile with extra/non-standard const
672 Development Code:
673   --without-develop       disable development options
674 Experimental Code:
675   --with-pthread          use POSIX thread library
676   --enable-weak-symbols   enable weak-symbols for pthreads
677   --enable-reentrant      compile with experimental reentrant code
678   --with-wrap-prefix=XXX  override prefix used for public variables
679 Testing/development Options:
680   --enable-echo           build: display "compiling" commands (default)
681   --enable-warnings       build: turn on GCC compiler warnings
682   --enable-assertions     test: turn on generation of assertion code
683   --enable-expanded       test: generate functions for certain macros
684   --disable-macros        test: use functions rather than macros
685   --with-trace            test: add trace() function to all models of ncurses
686 Ada95 Binding Options:
687   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
688   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
689   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
690   --with-ada-sharedlib=XX build Ada95 shared-library
691
692 Some influential environment variables:
693   CC          C compiler command
694   CFLAGS      C compiler flags
695   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
696               nonstandard directory <lib dir>
697   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
698               headers in a nonstandard directory <include dir>
699   CPP         C preprocessor
700
701 Use these variables to override the choices made by `configure' or to help
702 it to find libraries and programs with nonstandard names/locations.
703
704 EOF
705 fi
706
707 if test "$ac_init_help" = "recursive"; then
708   # If there are subdirs, report their specific --help.
709   ac_popdir=`pwd`
710   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
711     cd $ac_subdir
712     # A "../" for each directory in /$ac_subdir.
713     ac_dots=`echo $ac_subdir |
714              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
715
716     case $srcdir in
717     .) # No --srcdir option.  We are building in place.
718       ac_sub_srcdir=$srcdir ;;
719     [\\/]* | ?:[\\/]* ) # Absolute path.
720       ac_sub_srcdir=$srcdir/$ac_subdir ;;
721     *) # Relative path.
722       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
723     esac
724
725     # Check for guested configure; otherwise get Cygnus style configure.
726     if test -f $ac_sub_srcdir/configure.gnu; then
727       echo
728       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
729     elif test -f $ac_sub_srcdir/configure; then
730       echo
731       $SHELL $ac_sub_srcdir/configure  --help=recursive
732     elif test -f $ac_sub_srcdir/configure.ac ||
733            test -f $ac_sub_srcdir/configure.in; then
734       echo
735       $ac_configure --help
736     else
737       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
738     fi
739     cd $ac_popdir
740   done
741 fi
742
743 test -n "$ac_init_help" && exit 0
744 if $ac_init_version; then
745   cat <<\EOF
746
747 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
748 Free Software Foundation, Inc.
749 This configure script is free software; the Free Software Foundation
750 gives unlimited permission to copy, distribute and modify it.
751 EOF
752   exit 0
753 fi
754 exec 5>config.log
755 cat >&5 <<EOF
756 This file contains any messages produced by compilers while
757 running configure, to aid debugging if configure makes a mistake.
758
759 It was created by $as_me, which was
760 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
761
762   $ $0 $@
763
764 EOF
765 {
766 cat <<_ASUNAME
767 ## ---------- ##
768 ## Platform.  ##
769 ## ---------- ##
770
771 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
772 uname -m = `(uname -m) 2>/dev/null || echo unknown`
773 uname -r = `(uname -r) 2>/dev/null || echo unknown`
774 uname -s = `(uname -s) 2>/dev/null || echo unknown`
775 uname -v = `(uname -v) 2>/dev/null || echo unknown`
776
777 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
778 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
779
780 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
781 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
782 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
783 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
784 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
785 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
786 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
787
788 PATH = $PATH
789
790 _ASUNAME
791 } >&5
792
793 cat >&5 <<EOF
794 ## ------------ ##
795 ## Core tests.  ##
796 ## ------------ ##
797
798 EOF
799
800 # Keep a trace of the command line.
801 # Strip out --no-create and --no-recursion so they do not pile up.
802 # Also quote any args containing shell meta-characters.
803 ac_configure_args=
804 ac_sep=
805 for ac_arg
806 do
807   case $ac_arg in
808   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
809   | --no-cr | --no-c) ;;
810   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
811   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
812   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
813     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
814     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
815     ac_sep=" " ;;
816   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
817      ac_sep=" " ;;
818   esac
819   # Get rid of the leading space.
820 done
821
822 # When interrupted or exit'd, cleanup temporary files, and complete
823 # config.log.  We remove comments because anyway the quotes in there
824 # would cause problems or look ugly.
825 trap 'exit_status=$?
826   # Save into config.log some information that might help in debugging.
827   echo >&5
828   echo "## ----------------- ##" >&5
829   echo "## Cache variables.  ##" >&5
830   echo "## ----------------- ##" >&5
831   echo >&5
832   # The following way of writing the cache mishandles newlines in values,
833 {
834   (set) 2>&1 |
835     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
836     *ac_space=\ *)
837       sed -n \
838         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
839           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
840       ;;
841     *)
842       sed -n \
843         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
844       ;;
845     esac;
846 } >&5
847   sed "/^$/d" confdefs.h >conftest.log
848   if test -s conftest.log; then
849     echo >&5
850     echo "## ------------ ##" >&5
851     echo "## confdefs.h.  ##" >&5
852     echo "## ------------ ##" >&5
853     echo >&5
854     cat conftest.log >&5
855   fi
856   (echo; echo) >&5
857   test "$ac_signal" != 0 &&
858     echo "$as_me: caught signal $ac_signal" >&5
859   echo "$as_me: exit $exit_status" >&5
860   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
861     exit $exit_status
862      ' 0
863 for ac_signal in 1 2 13 15; do
864   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
865 done
866 ac_signal=0
867
868 # confdefs.h avoids OS command line length limits that DEFS can exceed.
869 rm -rf conftest* confdefs.h
870 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
871 echo >confdefs.h
872
873 # Let the site file select an alternate cache file if it wants to.
874 # Prefer explicitly selected file to automatically selected ones.
875 if test -z "$CONFIG_SITE"; then
876   if test "x$prefix" != xNONE; then
877     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
878   else
879     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
880   fi
881 fi
882 for ac_site_file in $CONFIG_SITE; do
883   if test -r "$ac_site_file"; then
884     { echo "$as_me:884: loading site script $ac_site_file" >&5
885 echo "$as_me: loading site script $ac_site_file" >&6;}
886     cat "$ac_site_file" >&5
887     . "$ac_site_file"
888   fi
889 done
890
891 if test -r "$cache_file"; then
892   # Some versions of bash will fail to source /dev/null (special
893   # files actually), so we avoid doing that.
894   if test -f "$cache_file"; then
895     { echo "$as_me:895: loading cache $cache_file" >&5
896 echo "$as_me: loading cache $cache_file" >&6;}
897     case $cache_file in
898       [\\/]* | ?:[\\/]* ) . $cache_file;;
899       *)                      . ./$cache_file;;
900     esac
901   fi
902 else
903   { echo "$as_me:903: creating cache $cache_file" >&5
904 echo "$as_me: creating cache $cache_file" >&6;}
905   >$cache_file
906 fi
907
908 # Check that the precious variables saved in the cache have kept the same
909 # value.
910 ac_cache_corrupted=false
911 for ac_var in `(set) 2>&1 |
912                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
913   eval ac_old_set=\$ac_cv_env_${ac_var}_set
914   eval ac_new_set=\$ac_env_${ac_var}_set
915   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
916   eval ac_new_val="\$ac_env_${ac_var}_value"
917   case $ac_old_set,$ac_new_set in
918     set,)
919       { echo "$as_me:919: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
920 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
921       ac_cache_corrupted=: ;;
922     ,set)
923       { echo "$as_me:923: error: \`$ac_var' was not set in the previous run" >&5
924 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
925       ac_cache_corrupted=: ;;
926     ,);;
927     *)
928       if test "x$ac_old_val" != "x$ac_new_val"; then
929         { echo "$as_me:929: error: \`$ac_var' has changed since the previous run:" >&5
930 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
931         { echo "$as_me:931:   former value:  $ac_old_val" >&5
932 echo "$as_me:   former value:  $ac_old_val" >&2;}
933         { echo "$as_me:933:   current value: $ac_new_val" >&5
934 echo "$as_me:   current value: $ac_new_val" >&2;}
935         ac_cache_corrupted=:
936       fi;;
937   esac
938   # Pass precious variables to config.status.  It doesn't matter if
939   # we pass some twice (in addition to the command line arguments).
940   if test "$ac_new_set" = set; then
941     case $ac_new_val in
942     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
943       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
944       ac_configure_args="$ac_configure_args '$ac_arg'"
945       ;;
946     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
947        ;;
948     esac
949   fi
950 done
951 if $ac_cache_corrupted; then
952   { echo "$as_me:952: error: changes in the environment can compromise the build" >&5
953 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
954   { { echo "$as_me:954: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
955 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
956    { (exit 1); exit 1; }; }
957 fi
958
959 ac_ext=c
960 ac_cpp='$CPP $CPPFLAGS'
961 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
962 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
963 ac_compiler_gnu=$ac_cv_c_compiler_gnu
964 ac_main_return=return
965
966 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
967   *c*,-n*) ECHO_N= ECHO_C='
968 ' ECHO_T='      ' ;;
969   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
970   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
971 esac
972 echo "#! $SHELL" >conftest.sh
973 echo  "exit 0"   >>conftest.sh
974 chmod +x conftest.sh
975 if { (echo "$as_me:975: PATH=\".;.\"; conftest.sh") >&5
976   (PATH=".;."; conftest.sh) 2>&5
977   ac_status=$?
978   echo "$as_me:978: \$? = $ac_status" >&5
979   (exit $ac_status); }; then
980   ac_path_separator=';'
981 else
982   ac_path_separator=:
983 fi
984 PATH_SEPARATOR="$ac_path_separator"
985 rm -f conftest.sh
986
987 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
988
989 top_builddir=`pwd`
990
991 ac_aux_dir=
992 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
993   if test -f $ac_dir/install-sh; then
994     ac_aux_dir=$ac_dir
995     ac_install_sh="$ac_aux_dir/install-sh -c"
996     break
997   elif test -f $ac_dir/install.sh; then
998     ac_aux_dir=$ac_dir
999     ac_install_sh="$ac_aux_dir/install.sh -c"
1000     break
1001   elif test -f $ac_dir/shtool; then
1002     ac_aux_dir=$ac_dir
1003     ac_install_sh="$ac_aux_dir/shtool install -c"
1004     break
1005   fi
1006 done
1007 if test -z "$ac_aux_dir"; then
1008   { { echo "$as_me:1008: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1009 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1010    { (exit 1); exit 1; }; }
1011 fi
1012 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1013 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1014 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1015
1016 # Make sure we can run config.sub.
1017 $ac_config_sub sun4 >/dev/null 2>&1 ||
1018   { { echo "$as_me:1018: error: cannot run $ac_config_sub" >&5
1019 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1020    { (exit 1); exit 1; }; }
1021
1022 echo "$as_me:1022: checking build system type" >&5
1023 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1024 if test "${ac_cv_build+set}" = set; then
1025   echo $ECHO_N "(cached) $ECHO_C" >&6
1026 else
1027   ac_cv_build_alias=$build_alias
1028 test -z "$ac_cv_build_alias" &&
1029   ac_cv_build_alias=`$ac_config_guess`
1030 test -z "$ac_cv_build_alias" &&
1031   { { echo "$as_me:1031: error: cannot guess build type; you must specify one" >&5
1032 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1033    { (exit 1); exit 1; }; }
1034 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1035   { { echo "$as_me:1035: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1036 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1037    { (exit 1); exit 1; }; }
1038
1039 fi
1040 echo "$as_me:1040: result: $ac_cv_build" >&5
1041 echo "${ECHO_T}$ac_cv_build" >&6
1042 build=$ac_cv_build
1043 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1044 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1045 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046
1047 echo "$as_me:1047: checking host system type" >&5
1048 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1049 if test "${ac_cv_host+set}" = set; then
1050   echo $ECHO_N "(cached) $ECHO_C" >&6
1051 else
1052   ac_cv_host_alias=$host_alias
1053 test -z "$ac_cv_host_alias" &&
1054   ac_cv_host_alias=$ac_cv_build_alias
1055 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1056   { { echo "$as_me:1056: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1057 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1058    { (exit 1); exit 1; }; }
1059
1060 fi
1061 echo "$as_me:1061: result: $ac_cv_host" >&5
1062 echo "${ECHO_T}$ac_cv_host" >&6
1063 host=$ac_cv_host
1064 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1065 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1066 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1067
1068 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1069         echo "$as_me:1069: checking target system type" >&5
1070 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1071 if test "${ac_cv_target+set}" = set; then
1072   echo $ECHO_N "(cached) $ECHO_C" >&6
1073 else
1074   ac_cv_target_alias=$target_alias
1075 test "x$ac_cv_target_alias" = "x" &&
1076   ac_cv_target_alias=$ac_cv_host_alias
1077 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1078   { { echo "$as_me:1078: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1079 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1080    { (exit 1); exit 1; }; }
1081
1082 fi
1083 echo "$as_me:1083: result: $ac_cv_target" >&5
1084 echo "${ECHO_T}$ac_cv_target" >&6
1085 target=$ac_cv_target
1086 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1087 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1088 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1089
1090 # The aliases save the names the user supplied, while $host etc.
1091 # will get canonicalized.
1092 test -n "$target_alias" &&
1093   test "$program_prefix$program_suffix$program_transform_name" = \
1094     NONENONEs,x,x, &&
1095   program_prefix=${target_alias}-
1096         system_name="$host_os"
1097 else
1098         system_name="`(uname -s -r) 2>/dev/null`"
1099         if test -z "$system_name" ; then
1100                 system_name="`(hostname) 2>/dev/null`"
1101         fi
1102 fi
1103 test -n "$system_name" && cat >>confdefs.h <<EOF
1104 #define SYSTEM_NAME "$system_name"
1105 EOF
1106
1107 if test "${cf_cv_system_name+set}" = set; then
1108   echo $ECHO_N "(cached) $ECHO_C" >&6
1109 else
1110   cf_cv_system_name="$system_name"
1111 fi
1112
1113 test -z "$system_name" && system_name="$cf_cv_system_name"
1114 test -n "$cf_cv_system_name" && echo "$as_me:1114: result: Configuring for $cf_cv_system_name" >&5
1115 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1116
1117 if test ".$system_name" != ".$cf_cv_system_name" ; then
1118         echo "$as_me:1118: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1119 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1120         { { echo "$as_me:1120: error: \"Please remove config.cache and try again.\"" >&5
1121 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1122    { (exit 1); exit 1; }; }
1123 fi
1124
1125 # Check whether --with-system-type or --without-system-type was given.
1126 if test "${with_system_type+set}" = set; then
1127   withval="$with_system_type"
1128   { echo "$as_me:1128: WARNING: overriding system type to $withval" >&5
1129 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1130  cf_cv_system_name=$withval
1131 fi;
1132
1133 ###     Save the given $CFLAGS to allow user-override.
1134 cf_user_CFLAGS="$CFLAGS"
1135
1136 ###     Default install-location
1137
1138 echo "$as_me:1138: checking for prefix" >&5
1139 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1140 if test "x$prefix" = "xNONE" ; then
1141         case "$cf_cv_system_name" in
1142                 # non-vendor systems don't have a conflict
1143         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1144                 prefix=/usr
1145                 ;;
1146         *)      prefix=$ac_default_prefix
1147                 ;;
1148         esac
1149 fi
1150 echo "$as_me:1150: result: $prefix" >&5
1151 echo "${ECHO_T}$prefix" >&6
1152
1153 if test "x$prefix" = "xNONE" ; then
1154 echo "$as_me:1154: checking for default include-directory" >&5
1155 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1156 test -n "$verbose" && echo 1>&6
1157 for cf_symbol in \
1158         $includedir \
1159         $includedir/ncurses \
1160         $prefix/include \
1161         $prefix/include/ncurses \
1162         /usr/local/include \
1163         /usr/local/include/ncurses \
1164         /usr/include \
1165         /usr/include/ncurses
1166 do
1167         cf_dir=`eval echo $cf_symbol`
1168         if test -f $cf_dir/curses.h ; then
1169         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1170                 includedir="$cf_symbol"
1171                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1172                 break
1173         fi
1174         fi
1175         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1176 done
1177 echo "$as_me:1177: result: $includedir" >&5
1178 echo "${ECHO_T}$includedir" >&6
1179 fi
1180
1181 ###     Checks for programs.
1182 ac_ext=c
1183 ac_cpp='$CPP $CPPFLAGS'
1184 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1185 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1186 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1187 ac_main_return=return
1188 if test -n "$ac_tool_prefix"; then
1189   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1190 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1191 echo "$as_me:1191: checking for $ac_word" >&5
1192 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1193 if test "${ac_cv_prog_CC+set}" = set; then
1194   echo $ECHO_N "(cached) $ECHO_C" >&6
1195 else
1196   if test -n "$CC"; then
1197   ac_cv_prog_CC="$CC" # Let the user override the test.
1198 else
1199   ac_save_IFS=$IFS; IFS=$ac_path_separator
1200 ac_dummy="$PATH"
1201 for ac_dir in $ac_dummy; do
1202   IFS=$ac_save_IFS
1203   test -z "$ac_dir" && ac_dir=.
1204   $as_executable_p "$ac_dir/$ac_word" || continue
1205 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1206 echo "$as_me:1206: found $ac_dir/$ac_word" >&5
1207 break
1208 done
1209
1210 fi
1211 fi
1212 CC=$ac_cv_prog_CC
1213 if test -n "$CC"; then
1214   echo "$as_me:1214: result: $CC" >&5
1215 echo "${ECHO_T}$CC" >&6
1216 else
1217   echo "$as_me:1217: result: no" >&5
1218 echo "${ECHO_T}no" >&6
1219 fi
1220
1221 fi
1222 if test -z "$ac_cv_prog_CC"; then
1223   ac_ct_CC=$CC
1224   # Extract the first word of "gcc", so it can be a program name with args.
1225 set dummy gcc; ac_word=$2
1226 echo "$as_me:1226: checking for $ac_word" >&5
1227 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1228 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1229   echo $ECHO_N "(cached) $ECHO_C" >&6
1230 else
1231   if test -n "$ac_ct_CC"; then
1232   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1233 else
1234   ac_save_IFS=$IFS; IFS=$ac_path_separator
1235 ac_dummy="$PATH"
1236 for ac_dir in $ac_dummy; do
1237   IFS=$ac_save_IFS
1238   test -z "$ac_dir" && ac_dir=.
1239   $as_executable_p "$ac_dir/$ac_word" || continue
1240 ac_cv_prog_ac_ct_CC="gcc"
1241 echo "$as_me:1241: found $ac_dir/$ac_word" >&5
1242 break
1243 done
1244
1245 fi
1246 fi
1247 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1248 if test -n "$ac_ct_CC"; then
1249   echo "$as_me:1249: result: $ac_ct_CC" >&5
1250 echo "${ECHO_T}$ac_ct_CC" >&6
1251 else
1252   echo "$as_me:1252: result: no" >&5
1253 echo "${ECHO_T}no" >&6
1254 fi
1255
1256   CC=$ac_ct_CC
1257 else
1258   CC="$ac_cv_prog_CC"
1259 fi
1260
1261 if test -z "$CC"; then
1262   if test -n "$ac_tool_prefix"; then
1263   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1264 set dummy ${ac_tool_prefix}cc; ac_word=$2
1265 echo "$as_me:1265: checking for $ac_word" >&5
1266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1267 if test "${ac_cv_prog_CC+set}" = set; then
1268   echo $ECHO_N "(cached) $ECHO_C" >&6
1269 else
1270   if test -n "$CC"; then
1271   ac_cv_prog_CC="$CC" # Let the user override the test.
1272 else
1273   ac_save_IFS=$IFS; IFS=$ac_path_separator
1274 ac_dummy="$PATH"
1275 for ac_dir in $ac_dummy; do
1276   IFS=$ac_save_IFS
1277   test -z "$ac_dir" && ac_dir=.
1278   $as_executable_p "$ac_dir/$ac_word" || continue
1279 ac_cv_prog_CC="${ac_tool_prefix}cc"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1281 break
1282 done
1283
1284 fi
1285 fi
1286 CC=$ac_cv_prog_CC
1287 if test -n "$CC"; then
1288   echo "$as_me:1288: result: $CC" >&5
1289 echo "${ECHO_T}$CC" >&6
1290 else
1291   echo "$as_me:1291: result: no" >&5
1292 echo "${ECHO_T}no" >&6
1293 fi
1294
1295 fi
1296 if test -z "$ac_cv_prog_CC"; then
1297   ac_ct_CC=$CC
1298   # Extract the first word of "cc", so it can be a program name with args.
1299 set dummy cc; ac_word=$2
1300 echo "$as_me:1300: checking for $ac_word" >&5
1301 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1302 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1303   echo $ECHO_N "(cached) $ECHO_C" >&6
1304 else
1305   if test -n "$ac_ct_CC"; then
1306   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1307 else
1308   ac_save_IFS=$IFS; IFS=$ac_path_separator
1309 ac_dummy="$PATH"
1310 for ac_dir in $ac_dummy; do
1311   IFS=$ac_save_IFS
1312   test -z "$ac_dir" && ac_dir=.
1313   $as_executable_p "$ac_dir/$ac_word" || continue
1314 ac_cv_prog_ac_ct_CC="cc"
1315 echo "$as_me:1315: found $ac_dir/$ac_word" >&5
1316 break
1317 done
1318
1319 fi
1320 fi
1321 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1322 if test -n "$ac_ct_CC"; then
1323   echo "$as_me:1323: result: $ac_ct_CC" >&5
1324 echo "${ECHO_T}$ac_ct_CC" >&6
1325 else
1326   echo "$as_me:1326: result: no" >&5
1327 echo "${ECHO_T}no" >&6
1328 fi
1329
1330   CC=$ac_ct_CC
1331 else
1332   CC="$ac_cv_prog_CC"
1333 fi
1334
1335 fi
1336 if test -z "$CC"; then
1337   # Extract the first word of "cc", so it can be a program name with args.
1338 set dummy cc; ac_word=$2
1339 echo "$as_me:1339: checking for $ac_word" >&5
1340 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1341 if test "${ac_cv_prog_CC+set}" = set; then
1342   echo $ECHO_N "(cached) $ECHO_C" >&6
1343 else
1344   if test -n "$CC"; then
1345   ac_cv_prog_CC="$CC" # Let the user override the test.
1346 else
1347   ac_prog_rejected=no
1348   ac_save_IFS=$IFS; IFS=$ac_path_separator
1349 ac_dummy="$PATH"
1350 for ac_dir in $ac_dummy; do
1351   IFS=$ac_save_IFS
1352   test -z "$ac_dir" && ac_dir=.
1353   $as_executable_p "$ac_dir/$ac_word" || continue
1354 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1355   ac_prog_rejected=yes
1356   continue
1357 fi
1358 ac_cv_prog_CC="cc"
1359 echo "$as_me:1359: found $ac_dir/$ac_word" >&5
1360 break
1361 done
1362
1363 if test $ac_prog_rejected = yes; then
1364   # We found a bogon in the path, so make sure we never use it.
1365   set dummy $ac_cv_prog_CC
1366   shift
1367   if test $# != 0; then
1368     # We chose a different compiler from the bogus one.
1369     # However, it has the same basename, so the bogon will be chosen
1370     # first if we set CC to just the basename; use the full file name.
1371     shift
1372     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1373     shift
1374     ac_cv_prog_CC="$@"
1375   fi
1376 fi
1377 fi
1378 fi
1379 CC=$ac_cv_prog_CC
1380 if test -n "$CC"; then
1381   echo "$as_me:1381: result: $CC" >&5
1382 echo "${ECHO_T}$CC" >&6
1383 else
1384   echo "$as_me:1384: result: no" >&5
1385 echo "${ECHO_T}no" >&6
1386 fi
1387
1388 fi
1389 if test -z "$CC"; then
1390   if test -n "$ac_tool_prefix"; then
1391   for ac_prog in cl
1392   do
1393     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1394 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1395 echo "$as_me:1395: checking for $ac_word" >&5
1396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1397 if test "${ac_cv_prog_CC+set}" = set; then
1398   echo $ECHO_N "(cached) $ECHO_C" >&6
1399 else
1400   if test -n "$CC"; then
1401   ac_cv_prog_CC="$CC" # Let the user override the test.
1402 else
1403   ac_save_IFS=$IFS; IFS=$ac_path_separator
1404 ac_dummy="$PATH"
1405 for ac_dir in $ac_dummy; do
1406   IFS=$ac_save_IFS
1407   test -z "$ac_dir" && ac_dir=.
1408   $as_executable_p "$ac_dir/$ac_word" || continue
1409 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1410 echo "$as_me:1410: found $ac_dir/$ac_word" >&5
1411 break
1412 done
1413
1414 fi
1415 fi
1416 CC=$ac_cv_prog_CC
1417 if test -n "$CC"; then
1418   echo "$as_me:1418: result: $CC" >&5
1419 echo "${ECHO_T}$CC" >&6
1420 else
1421   echo "$as_me:1421: result: no" >&5
1422 echo "${ECHO_T}no" >&6
1423 fi
1424
1425     test -n "$CC" && break
1426   done
1427 fi
1428 if test -z "$CC"; then
1429   ac_ct_CC=$CC
1430   for ac_prog in cl
1431 do
1432   # Extract the first word of "$ac_prog", so it can be a program name with args.
1433 set dummy $ac_prog; ac_word=$2
1434 echo "$as_me:1434: checking for $ac_word" >&5
1435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1436 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1437   echo $ECHO_N "(cached) $ECHO_C" >&6
1438 else
1439   if test -n "$ac_ct_CC"; then
1440   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1441 else
1442   ac_save_IFS=$IFS; IFS=$ac_path_separator
1443 ac_dummy="$PATH"
1444 for ac_dir in $ac_dummy; do
1445   IFS=$ac_save_IFS
1446   test -z "$ac_dir" && ac_dir=.
1447   $as_executable_p "$ac_dir/$ac_word" || continue
1448 ac_cv_prog_ac_ct_CC="$ac_prog"
1449 echo "$as_me:1449: found $ac_dir/$ac_word" >&5
1450 break
1451 done
1452
1453 fi
1454 fi
1455 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1456 if test -n "$ac_ct_CC"; then
1457   echo "$as_me:1457: result: $ac_ct_CC" >&5
1458 echo "${ECHO_T}$ac_ct_CC" >&6
1459 else
1460   echo "$as_me:1460: result: no" >&5
1461 echo "${ECHO_T}no" >&6
1462 fi
1463
1464   test -n "$ac_ct_CC" && break
1465 done
1466
1467   CC=$ac_ct_CC
1468 fi
1469
1470 fi
1471
1472 test -z "$CC" && { { echo "$as_me:1472: error: no acceptable cc found in \$PATH" >&5
1473 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1474    { (exit 1); exit 1; }; }
1475
1476 # Provide some information about the compiler.
1477 echo "$as_me:1477:" \
1478      "checking for C compiler version" >&5
1479 ac_compiler=`set X $ac_compile; echo $2`
1480 { (eval echo "$as_me:1480: \"$ac_compiler --version </dev/null >&5\"") >&5
1481   (eval $ac_compiler --version </dev/null >&5) 2>&5
1482   ac_status=$?
1483   echo "$as_me:1483: \$? = $ac_status" >&5
1484   (exit $ac_status); }
1485 { (eval echo "$as_me:1485: \"$ac_compiler -v </dev/null >&5\"") >&5
1486   (eval $ac_compiler -v </dev/null >&5) 2>&5
1487   ac_status=$?
1488   echo "$as_me:1488: \$? = $ac_status" >&5
1489   (exit $ac_status); }
1490 { (eval echo "$as_me:1490: \"$ac_compiler -V </dev/null >&5\"") >&5
1491   (eval $ac_compiler -V </dev/null >&5) 2>&5
1492   ac_status=$?
1493   echo "$as_me:1493: \$? = $ac_status" >&5
1494   (exit $ac_status); }
1495
1496 cat >conftest.$ac_ext <<_ACEOF
1497 #line 1497 "configure"
1498 #include "confdefs.h"
1499
1500 int
1501 main ()
1502 {
1503
1504   ;
1505   return 0;
1506 }
1507 _ACEOF
1508 ac_clean_files_save=$ac_clean_files
1509 ac_clean_files="$ac_clean_files a.out a.exe"
1510 # Try to create an executable without -o first, disregard a.out.
1511 # It will help us diagnose broken compilers, and finding out an intuition
1512 # of exeext.
1513 echo "$as_me:1513: checking for C compiler default output" >&5
1514 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1515 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1516 if { (eval echo "$as_me:1516: \"$ac_link_default\"") >&5
1517   (eval $ac_link_default) 2>&5
1518   ac_status=$?
1519   echo "$as_me:1519: \$? = $ac_status" >&5
1520   (exit $ac_status); }; then
1521   # Find the output, starting from the most likely.  This scheme is
1522 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1523 # resort.
1524 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1525                 ls a.out conftest 2>/dev/null;
1526                 ls a.* conftest.* 2>/dev/null`; do
1527   case $ac_file in
1528     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1529     a.out ) # We found the default executable, but exeext='' is most
1530             # certainly right.
1531             break;;
1532     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1533           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1534           export ac_cv_exeext
1535           break;;
1536     * ) break;;
1537   esac
1538 done
1539 else
1540   echo "$as_me: failed program was:" >&5
1541 cat conftest.$ac_ext >&5
1542 { { echo "$as_me:1542: error: C compiler cannot create executables" >&5
1543 echo "$as_me: error: C compiler cannot create executables" >&2;}
1544    { (exit 77); exit 77; }; }
1545 fi
1546
1547 ac_exeext=$ac_cv_exeext
1548 echo "$as_me:1548: result: $ac_file" >&5
1549 echo "${ECHO_T}$ac_file" >&6
1550
1551 # Check the compiler produces executables we can run.  If not, either
1552 # the compiler is broken, or we cross compile.
1553 echo "$as_me:1553: checking whether the C compiler works" >&5
1554 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1555 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1556 # If not cross compiling, check that we can run a simple program.
1557 if test "$cross_compiling" != yes; then
1558   if { ac_try='./$ac_file'
1559   { (eval echo "$as_me:1559: \"$ac_try\"") >&5
1560   (eval $ac_try) 2>&5
1561   ac_status=$?
1562   echo "$as_me:1562: \$? = $ac_status" >&5
1563   (exit $ac_status); }; }; then
1564     cross_compiling=no
1565   else
1566     if test "$cross_compiling" = maybe; then
1567         cross_compiling=yes
1568     else
1569         { { echo "$as_me:1569: error: cannot run C compiled programs.
1570 If you meant to cross compile, use \`--host'." >&5
1571 echo "$as_me: error: cannot run C compiled programs.
1572 If you meant to cross compile, use \`--host'." >&2;}
1573    { (exit 1); exit 1; }; }
1574     fi
1575   fi
1576 fi
1577 echo "$as_me:1577: result: yes" >&5
1578 echo "${ECHO_T}yes" >&6
1579
1580 rm -f a.out a.exe conftest$ac_cv_exeext
1581 ac_clean_files=$ac_clean_files_save
1582 # Check the compiler produces executables we can run.  If not, either
1583 # the compiler is broken, or we cross compile.
1584 echo "$as_me:1584: checking whether we are cross compiling" >&5
1585 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1586 echo "$as_me:1586: result: $cross_compiling" >&5
1587 echo "${ECHO_T}$cross_compiling" >&6
1588
1589 echo "$as_me:1589: checking for executable suffix" >&5
1590 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1591 if { (eval echo "$as_me:1591: \"$ac_link\"") >&5
1592   (eval $ac_link) 2>&5
1593   ac_status=$?
1594   echo "$as_me:1594: \$? = $ac_status" >&5
1595   (exit $ac_status); }; then
1596   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1597 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1598 # work properly (i.e., refer to `conftest.exe'), while it won't with
1599 # `rm'.
1600 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1601   case $ac_file in
1602     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1603     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1604           export ac_cv_exeext
1605           break;;
1606     * ) break;;
1607   esac
1608 done
1609 else
1610   { { echo "$as_me:1610: error: cannot compute EXEEXT: cannot compile and link" >&5
1611 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1612    { (exit 1); exit 1; }; }
1613 fi
1614
1615 rm -f conftest$ac_cv_exeext
1616 echo "$as_me:1616: result: $ac_cv_exeext" >&5
1617 echo "${ECHO_T}$ac_cv_exeext" >&6
1618
1619 rm -f conftest.$ac_ext
1620 EXEEXT=$ac_cv_exeext
1621 ac_exeext=$EXEEXT
1622 echo "$as_me:1622: checking for object suffix" >&5
1623 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1624 if test "${ac_cv_objext+set}" = set; then
1625   echo $ECHO_N "(cached) $ECHO_C" >&6
1626 else
1627   cat >conftest.$ac_ext <<_ACEOF
1628 #line 1628 "configure"
1629 #include "confdefs.h"
1630
1631 int
1632 main ()
1633 {
1634
1635   ;
1636   return 0;
1637 }
1638 _ACEOF
1639 rm -f conftest.o conftest.obj
1640 if { (eval echo "$as_me:1640: \"$ac_compile\"") >&5
1641   (eval $ac_compile) 2>&5
1642   ac_status=$?
1643   echo "$as_me:1643: \$? = $ac_status" >&5
1644   (exit $ac_status); }; then
1645   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1646   case $ac_file in
1647     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1648     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1649        break;;
1650   esac
1651 done
1652 else
1653   echo "$as_me: failed program was:" >&5
1654 cat conftest.$ac_ext >&5
1655 { { echo "$as_me:1655: error: cannot compute OBJEXT: cannot compile" >&5
1656 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1657    { (exit 1); exit 1; }; }
1658 fi
1659
1660 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1661 fi
1662 echo "$as_me:1662: result: $ac_cv_objext" >&5
1663 echo "${ECHO_T}$ac_cv_objext" >&6
1664 OBJEXT=$ac_cv_objext
1665 ac_objext=$OBJEXT
1666 echo "$as_me:1666: checking whether we are using the GNU C compiler" >&5
1667 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1668 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1669   echo $ECHO_N "(cached) $ECHO_C" >&6
1670 else
1671   cat >conftest.$ac_ext <<_ACEOF
1672 #line 1672 "configure"
1673 #include "confdefs.h"
1674
1675 int
1676 main ()
1677 {
1678 #ifndef __GNUC__
1679        choke me
1680 #endif
1681
1682   ;
1683   return 0;
1684 }
1685 _ACEOF
1686 rm -f conftest.$ac_objext
1687 if { (eval echo "$as_me:1687: \"$ac_compile\"") >&5
1688   (eval $ac_compile) 2>&5
1689   ac_status=$?
1690   echo "$as_me:1690: \$? = $ac_status" >&5
1691   (exit $ac_status); } &&
1692          { ac_try='test -s conftest.$ac_objext'
1693   { (eval echo "$as_me:1693: \"$ac_try\"") >&5
1694   (eval $ac_try) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }; }; then
1698   ac_compiler_gnu=yes
1699 else
1700   echo "$as_me: failed program was:" >&5
1701 cat conftest.$ac_ext >&5
1702 ac_compiler_gnu=no
1703 fi
1704 rm -f conftest.$ac_objext conftest.$ac_ext
1705 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1706
1707 fi
1708 echo "$as_me:1708: result: $ac_cv_c_compiler_gnu" >&5
1709 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1710 GCC=`test $ac_compiler_gnu = yes && echo yes`
1711 ac_test_CFLAGS=${CFLAGS+set}
1712 ac_save_CFLAGS=$CFLAGS
1713 CFLAGS="-g"
1714 echo "$as_me:1714: checking whether $CC accepts -g" >&5
1715 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1716 if test "${ac_cv_prog_cc_g+set}" = set; then
1717   echo $ECHO_N "(cached) $ECHO_C" >&6
1718 else
1719   cat >conftest.$ac_ext <<_ACEOF
1720 #line 1720 "configure"
1721 #include "confdefs.h"
1722
1723 int
1724 main ()
1725 {
1726
1727   ;
1728   return 0;
1729 }
1730 _ACEOF
1731 rm -f conftest.$ac_objext
1732 if { (eval echo "$as_me:1732: \"$ac_compile\"") >&5
1733   (eval $ac_compile) 2>&5
1734   ac_status=$?
1735   echo "$as_me:1735: \$? = $ac_status" >&5
1736   (exit $ac_status); } &&
1737          { ac_try='test -s conftest.$ac_objext'
1738   { (eval echo "$as_me:1738: \"$ac_try\"") >&5
1739   (eval $ac_try) 2>&5
1740   ac_status=$?
1741   echo "$as_me:1741: \$? = $ac_status" >&5
1742   (exit $ac_status); }; }; then
1743   ac_cv_prog_cc_g=yes
1744 else
1745   echo "$as_me: failed program was:" >&5
1746 cat conftest.$ac_ext >&5
1747 ac_cv_prog_cc_g=no
1748 fi
1749 rm -f conftest.$ac_objext conftest.$ac_ext
1750 fi
1751 echo "$as_me:1751: result: $ac_cv_prog_cc_g" >&5
1752 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1753 if test "$ac_test_CFLAGS" = set; then
1754   CFLAGS=$ac_save_CFLAGS
1755 elif test $ac_cv_prog_cc_g = yes; then
1756   if test "$GCC" = yes; then
1757     CFLAGS="-g -O2"
1758   else
1759     CFLAGS="-g"
1760   fi
1761 else
1762   if test "$GCC" = yes; then
1763     CFLAGS="-O2"
1764   else
1765     CFLAGS=
1766   fi
1767 fi
1768 # Some people use a C++ compiler to compile C.  Since we use `exit',
1769 # in C++ we need to declare it.  In case someone uses the same compiler
1770 # for both compiling C and C++ we need to have the C++ compiler decide
1771 # the declaration of exit, since it's the most demanding environment.
1772 cat >conftest.$ac_ext <<_ACEOF
1773 #ifndef __cplusplus
1774   choke me
1775 #endif
1776 _ACEOF
1777 rm -f conftest.$ac_objext
1778 if { (eval echo "$as_me:1778: \"$ac_compile\"") >&5
1779   (eval $ac_compile) 2>&5
1780   ac_status=$?
1781   echo "$as_me:1781: \$? = $ac_status" >&5
1782   (exit $ac_status); } &&
1783          { ac_try='test -s conftest.$ac_objext'
1784   { (eval echo "$as_me:1784: \"$ac_try\"") >&5
1785   (eval $ac_try) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); }; }; then
1789   for ac_declaration in \
1790    ''\
1791    '#include <stdlib.h>' \
1792    'extern "C" void std::exit (int) throw (); using std::exit;' \
1793    'extern "C" void std::exit (int); using std::exit;' \
1794    'extern "C" void exit (int) throw ();' \
1795    'extern "C" void exit (int);' \
1796    'void exit (int);'
1797 do
1798   cat >conftest.$ac_ext <<_ACEOF
1799 #line 1799 "configure"
1800 #include "confdefs.h"
1801 #include <stdlib.h>
1802 $ac_declaration
1803 int
1804 main ()
1805 {
1806 exit (42);
1807   ;
1808   return 0;
1809 }
1810 _ACEOF
1811 rm -f conftest.$ac_objext
1812 if { (eval echo "$as_me:1812: \"$ac_compile\"") >&5
1813   (eval $ac_compile) 2>&5
1814   ac_status=$?
1815   echo "$as_me:1815: \$? = $ac_status" >&5
1816   (exit $ac_status); } &&
1817          { ac_try='test -s conftest.$ac_objext'
1818   { (eval echo "$as_me:1818: \"$ac_try\"") >&5
1819   (eval $ac_try) 2>&5
1820   ac_status=$?
1821   echo "$as_me:1821: \$? = $ac_status" >&5
1822   (exit $ac_status); }; }; then
1823   :
1824 else
1825   echo "$as_me: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1827 continue
1828 fi
1829 rm -f conftest.$ac_objext conftest.$ac_ext
1830   cat >conftest.$ac_ext <<_ACEOF
1831 #line 1831 "configure"
1832 #include "confdefs.h"
1833 $ac_declaration
1834 int
1835 main ()
1836 {
1837 exit (42);
1838   ;
1839   return 0;
1840 }
1841 _ACEOF
1842 rm -f conftest.$ac_objext
1843 if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5
1844   (eval $ac_compile) 2>&5
1845   ac_status=$?
1846   echo "$as_me:1846: \$? = $ac_status" >&5
1847   (exit $ac_status); } &&
1848          { ac_try='test -s conftest.$ac_objext'
1849   { (eval echo "$as_me:1849: \"$ac_try\"") >&5
1850   (eval $ac_try) 2>&5
1851   ac_status=$?
1852   echo "$as_me:1852: \$? = $ac_status" >&5
1853   (exit $ac_status); }; }; then
1854   break
1855 else
1856   echo "$as_me: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1858 fi
1859 rm -f conftest.$ac_objext conftest.$ac_ext
1860 done
1861 rm -rf conftest*
1862 if test -n "$ac_declaration"; then
1863   echo '#ifdef __cplusplus' >>confdefs.h
1864   echo $ac_declaration      >>confdefs.h
1865   echo '#endif'             >>confdefs.h
1866 fi
1867
1868 else
1869   echo "$as_me: failed program was:" >&5
1870 cat conftest.$ac_ext >&5
1871 fi
1872 rm -f conftest.$ac_objext conftest.$ac_ext
1873 ac_ext=c
1874 ac_cpp='$CPP $CPPFLAGS'
1875 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1876 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1877 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1878 ac_main_return=return
1879
1880 GCC_VERSION=none
1881 if test "$GCC" = yes ; then
1882         echo "$as_me:1882: checking version of $CC" >&5
1883 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1884         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1885         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1886         echo "$as_me:1886: result: $GCC_VERSION" >&5
1887 echo "${ECHO_T}$GCC_VERSION" >&6
1888 fi
1889
1890 ac_ext=c
1891 ac_cpp='$CPP $CPPFLAGS'
1892 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1893 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1894 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1895 ac_main_return=return
1896 echo "$as_me:1896: checking how to run the C preprocessor" >&5
1897 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1898 # On Suns, sometimes $CPP names a directory.
1899 if test -n "$CPP" && test -d "$CPP"; then
1900   CPP=
1901 fi
1902 if test -z "$CPP"; then
1903   if test "${ac_cv_prog_CPP+set}" = set; then
1904   echo $ECHO_N "(cached) $ECHO_C" >&6
1905 else
1906       # Double quotes because CPP needs to be expanded
1907     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1908     do
1909       ac_preproc_ok=false
1910 for ac_c_preproc_warn_flag in '' yes
1911 do
1912   # Use a header file that comes with gcc, so configuring glibc
1913   # with a fresh cross-compiler works.
1914   # On the NeXT, cc -E runs the code through the compiler's parser,
1915   # not just through cpp. "Syntax error" is here to catch this case.
1916   cat >conftest.$ac_ext <<_ACEOF
1917 #line 1917 "configure"
1918 #include "confdefs.h"
1919 #include <assert.h>
1920                      Syntax error
1921 _ACEOF
1922 if { (eval echo "$as_me:1922: \"$ac_cpp conftest.$ac_ext\"") >&5
1923   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1924   ac_status=$?
1925   egrep -v '^ *\+' conftest.er1 >conftest.err
1926   rm -f conftest.er1
1927   cat conftest.err >&5
1928   echo "$as_me:1928: \$? = $ac_status" >&5
1929   (exit $ac_status); } >/dev/null; then
1930   if test -s conftest.err; then
1931     ac_cpp_err=$ac_c_preproc_warn_flag
1932   else
1933     ac_cpp_err=
1934   fi
1935 else
1936   ac_cpp_err=yes
1937 fi
1938 if test -z "$ac_cpp_err"; then
1939   :
1940 else
1941   echo "$as_me: failed program was:" >&5
1942   cat conftest.$ac_ext >&5
1943   # Broken: fails on valid input.
1944 continue
1945 fi
1946 rm -f conftest.err conftest.$ac_ext
1947
1948   # OK, works on sane cases.  Now check whether non-existent headers
1949   # can be detected and how.
1950   cat >conftest.$ac_ext <<_ACEOF
1951 #line 1951 "configure"
1952 #include "confdefs.h"
1953 #include <ac_nonexistent.h>
1954 _ACEOF
1955 if { (eval echo "$as_me:1955: \"$ac_cpp conftest.$ac_ext\"") >&5
1956   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1957   ac_status=$?
1958   egrep -v '^ *\+' conftest.er1 >conftest.err
1959   rm -f conftest.er1
1960   cat conftest.err >&5
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit $ac_status); } >/dev/null; then
1963   if test -s conftest.err; then
1964     ac_cpp_err=$ac_c_preproc_warn_flag
1965   else
1966     ac_cpp_err=
1967   fi
1968 else
1969   ac_cpp_err=yes
1970 fi
1971 if test -z "$ac_cpp_err"; then
1972   # Broken: success on invalid input.
1973 continue
1974 else
1975   echo "$as_me: failed program was:" >&5
1976   cat conftest.$ac_ext >&5
1977   # Passes both tests.
1978 ac_preproc_ok=:
1979 break
1980 fi
1981 rm -f conftest.err conftest.$ac_ext
1982
1983 done
1984 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1985 rm -f conftest.err conftest.$ac_ext
1986 if $ac_preproc_ok; then
1987   break
1988 fi
1989
1990     done
1991     ac_cv_prog_CPP=$CPP
1992
1993 fi
1994   CPP=$ac_cv_prog_CPP
1995 else
1996   ac_cv_prog_CPP=$CPP
1997 fi
1998 echo "$as_me:1998: result: $CPP" >&5
1999 echo "${ECHO_T}$CPP" >&6
2000 ac_preproc_ok=false
2001 for ac_c_preproc_warn_flag in '' yes
2002 do
2003   # Use a header file that comes with gcc, so configuring glibc
2004   # with a fresh cross-compiler works.
2005   # On the NeXT, cc -E runs the code through the compiler's parser,
2006   # not just through cpp. "Syntax error" is here to catch this case.
2007   cat >conftest.$ac_ext <<_ACEOF
2008 #line 2008 "configure"
2009 #include "confdefs.h"
2010 #include <assert.h>
2011                      Syntax error
2012 _ACEOF
2013 if { (eval echo "$as_me:2013: \"$ac_cpp conftest.$ac_ext\"") >&5
2014   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2015   ac_status=$?
2016   egrep -v '^ *\+' conftest.er1 >conftest.err
2017   rm -f conftest.er1
2018   cat conftest.err >&5
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); } >/dev/null; then
2021   if test -s conftest.err; then
2022     ac_cpp_err=$ac_c_preproc_warn_flag
2023   else
2024     ac_cpp_err=
2025   fi
2026 else
2027   ac_cpp_err=yes
2028 fi
2029 if test -z "$ac_cpp_err"; then
2030   :
2031 else
2032   echo "$as_me: failed program was:" >&5
2033   cat conftest.$ac_ext >&5
2034   # Broken: fails on valid input.
2035 continue
2036 fi
2037 rm -f conftest.err conftest.$ac_ext
2038
2039   # OK, works on sane cases.  Now check whether non-existent headers
2040   # can be detected and how.
2041   cat >conftest.$ac_ext <<_ACEOF
2042 #line 2042 "configure"
2043 #include "confdefs.h"
2044 #include <ac_nonexistent.h>
2045 _ACEOF
2046 if { (eval echo "$as_me:2046: \"$ac_cpp conftest.$ac_ext\"") >&5
2047   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2048   ac_status=$?
2049   egrep -v '^ *\+' conftest.er1 >conftest.err
2050   rm -f conftest.er1
2051   cat conftest.err >&5
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); } >/dev/null; then
2054   if test -s conftest.err; then
2055     ac_cpp_err=$ac_c_preproc_warn_flag
2056   else
2057     ac_cpp_err=
2058   fi
2059 else
2060   ac_cpp_err=yes
2061 fi
2062 if test -z "$ac_cpp_err"; then
2063   # Broken: success on invalid input.
2064 continue
2065 else
2066   echo "$as_me: failed program was:" >&5
2067   cat conftest.$ac_ext >&5
2068   # Passes both tests.
2069 ac_preproc_ok=:
2070 break
2071 fi
2072 rm -f conftest.err conftest.$ac_ext
2073
2074 done
2075 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2076 rm -f conftest.err conftest.$ac_ext
2077 if $ac_preproc_ok; then
2078   :
2079 else
2080   { { echo "$as_me:2080: error: C preprocessor \"$CPP\" fails sanity check" >&5
2081 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2082    { (exit 1); exit 1; }; }
2083 fi
2084
2085 ac_ext=c
2086 ac_cpp='$CPP $CPPFLAGS'
2087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2090 ac_main_return=return
2091
2092 if test $ac_cv_c_compiler_gnu = yes; then
2093     echo "$as_me:2093: checking whether $CC needs -traditional" >&5
2094 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2095 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2096   echo $ECHO_N "(cached) $ECHO_C" >&6
2097 else
2098     ac_pattern="Autoconf.*'x'"
2099   cat >conftest.$ac_ext <<_ACEOF
2100 #line 2100 "configure"
2101 #include "confdefs.h"
2102 #include <sgtty.h>
2103 int Autoconf = TIOCGETP;
2104 _ACEOF
2105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2106   egrep "$ac_pattern" >/dev/null 2>&1; then
2107   ac_cv_prog_gcc_traditional=yes
2108 else
2109   ac_cv_prog_gcc_traditional=no
2110 fi
2111 rm -rf conftest*
2112
2113   if test $ac_cv_prog_gcc_traditional = no; then
2114     cat >conftest.$ac_ext <<_ACEOF
2115 #line 2115 "configure"
2116 #include "confdefs.h"
2117 #include <termio.h>
2118 int Autoconf = TCGETA;
2119 _ACEOF
2120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2121   egrep "$ac_pattern" >/dev/null 2>&1; then
2122   ac_cv_prog_gcc_traditional=yes
2123 fi
2124 rm -rf conftest*
2125
2126   fi
2127 fi
2128 echo "$as_me:2128: result: $ac_cv_prog_gcc_traditional" >&5
2129 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2130   if test $ac_cv_prog_gcc_traditional = yes; then
2131     CC="$CC -traditional"
2132   fi
2133 fi
2134
2135 echo "$as_me:2135: checking whether $CC understands -c and -o together" >&5
2136 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2137 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2138   echo $ECHO_N "(cached) $ECHO_C" >&6
2139 else
2140
2141 cat > conftest.$ac_ext <<CF_EOF
2142 #include <stdio.h>
2143 int main()
2144 {
2145         ${cf_cv_main_return:-return}(0);
2146 }
2147 CF_EOF
2148 # We do the test twice because some compilers refuse to overwrite an
2149 # existing .o file with -o, though they will create one.
2150 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2151 if { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152   (eval $ac_try) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); } &&
2156   test -f conftest2.$ac_objext && { (eval echo "$as_me:2156: \"$ac_try\"") >&5
2157   (eval $ac_try) 2>&5
2158   ac_status=$?
2159   echo "$as_me:2159: \$? = $ac_status" >&5
2160   (exit $ac_status); };
2161 then
2162   eval cf_cv_prog_CC_c_o=yes
2163 else
2164   eval cf_cv_prog_CC_c_o=no
2165 fi
2166 rm -rf conftest*
2167
2168 fi
2169 if test $cf_cv_prog_CC_c_o = yes; then
2170   echo "$as_me:2170: result: yes" >&5
2171 echo "${ECHO_T}yes" >&6
2172 else
2173   echo "$as_me:2173: result: no" >&5
2174 echo "${ECHO_T}no" >&6
2175 fi
2176
2177 echo "$as_me:2177: checking for POSIXized ISC" >&5
2178 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2179 if test -d /etc/conf/kconfig.d &&
2180    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2181 then
2182   echo "$as_me:2182: result: yes" >&5
2183 echo "${ECHO_T}yes" >&6
2184   ISC=yes # If later tests want to check for ISC.
2185
2186 cat >>confdefs.h <<\EOF
2187 #define _POSIX_SOURCE 1
2188 EOF
2189
2190   if test "$GCC" = yes; then
2191     CC="$CC -posix"
2192   else
2193     CC="$CC -Xp"
2194   fi
2195 else
2196   echo "$as_me:2196: result: no" >&5
2197 echo "${ECHO_T}no" >&6
2198   ISC=
2199 fi
2200
2201 echo "$as_me:2201: checking for ${CC:-cc} option to accept ANSI C" >&5
2202 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2203 if test "${cf_cv_ansi_cc+set}" = set; then
2204   echo $ECHO_N "(cached) $ECHO_C" >&6
2205 else
2206
2207 cf_cv_ansi_cc=no
2208 cf_save_CFLAGS="$CFLAGS"
2209 cf_save_CPPFLAGS="$CPPFLAGS"
2210 # Don't try gcc -ansi; that turns off useful extensions and
2211 # breaks some systems' header files.
2212 # AIX                   -qlanglvl=ansi
2213 # Ultrix and OSF/1      -std1
2214 # HP-UX                 -Aa -D_HPUX_SOURCE
2215 # SVR4                  -Xc
2216 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2217 for cf_arg in "-DCC_HAS_PROTOS" \
2218         "" \
2219         -qlanglvl=ansi \
2220         -std1 \
2221         -Ae \
2222         "-Aa -D_HPUX_SOURCE" \
2223         -Xc
2224 do
2225
2226 cf_fix_cppflags=no
2227 cf_new_cflags=
2228 cf_new_cppflags=
2229 cf_new_extra_cppflags=
2230
2231 for cf_add_cflags in $cf_arg
2232 do
2233 case $cf_fix_cppflags in
2234 no)
2235         case $cf_add_cflags in #(vi
2236         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2237                 case $cf_add_cflags in
2238                 -D*)
2239                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2240
2241                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2242                                 && test -z "${cf_tst_cflags}" \
2243                                 && cf_fix_cppflags=yes
2244
2245                         if test $cf_fix_cppflags = yes ; then
2246                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2247                                 continue
2248                         elif test "${cf_tst_cflags}" = "\"'" ; then
2249                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2250                                 continue
2251                         fi
2252                         ;;
2253                 esac
2254                 case "$CPPFLAGS" in
2255                 *$cf_add_cflags) #(vi
2256                         ;;
2257                 *) #(vi
2258                         case $cf_add_cflags in #(vi
2259                         -D*)
2260                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2261
2262 CPPFLAGS=`echo "$CPPFLAGS" | \
2263         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2264                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2265
2266                                 ;;
2267                         esac
2268                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2269                         ;;
2270                 esac
2271                 ;;
2272         *)
2273                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2274                 ;;
2275         esac
2276         ;;
2277 yes)
2278         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2279
2280         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2281
2282         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2283                 && test -z "${cf_tst_cflags}" \
2284                 && cf_fix_cppflags=no
2285         ;;
2286 esac
2287 done
2288
2289 if test -n "$cf_new_cflags" ; then
2290
2291         CFLAGS="$CFLAGS $cf_new_cflags"
2292 fi
2293
2294 if test -n "$cf_new_cppflags" ; then
2295
2296         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2297 fi
2298
2299 if test -n "$cf_new_extra_cppflags" ; then
2300
2301         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2302 fi
2303
2304         cat >conftest.$ac_ext <<_ACEOF
2305 #line 2305 "configure"
2306 #include "confdefs.h"
2307
2308 #ifndef CC_HAS_PROTOS
2309 #if !defined(__STDC__) || (__STDC__ != 1)
2310 choke me
2311 #endif
2312 #endif
2313
2314 int
2315 main ()
2316 {
2317
2318         int test (int i, double x);
2319         struct s1 {int (*f) (int a);};
2320         struct s2 {int (*f) (double a);};
2321   ;
2322   return 0;
2323 }
2324 _ACEOF
2325 rm -f conftest.$ac_objext
2326 if { (eval echo "$as_me:2326: \"$ac_compile\"") >&5
2327   (eval $ac_compile) 2>&5
2328   ac_status=$?
2329   echo "$as_me:2329: \$? = $ac_status" >&5
2330   (exit $ac_status); } &&
2331          { ac_try='test -s conftest.$ac_objext'
2332   { (eval echo "$as_me:2332: \"$ac_try\"") >&5
2333   (eval $ac_try) 2>&5
2334   ac_status=$?
2335   echo "$as_me:2335: \$? = $ac_status" >&5
2336   (exit $ac_status); }; }; then
2337   cf_cv_ansi_cc="$cf_arg"; break
2338 else
2339   echo "$as_me: failed program was:" >&5
2340 cat conftest.$ac_ext >&5
2341 fi
2342 rm -f conftest.$ac_objext conftest.$ac_ext
2343 done
2344 CFLAGS="$cf_save_CFLAGS"
2345 CPPFLAGS="$cf_save_CPPFLAGS"
2346
2347 fi
2348 echo "$as_me:2348: result: $cf_cv_ansi_cc" >&5
2349 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2350
2351 if test "$cf_cv_ansi_cc" != "no"; then
2352 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2353
2354 cf_fix_cppflags=no
2355 cf_new_cflags=
2356 cf_new_cppflags=
2357 cf_new_extra_cppflags=
2358
2359 for cf_add_cflags in $cf_cv_ansi_cc
2360 do
2361 case $cf_fix_cppflags in
2362 no)
2363         case $cf_add_cflags in #(vi
2364         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2365                 case $cf_add_cflags in
2366                 -D*)
2367                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2368
2369                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2370                                 && test -z "${cf_tst_cflags}" \
2371                                 && cf_fix_cppflags=yes
2372
2373                         if test $cf_fix_cppflags = yes ; then
2374                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2375                                 continue
2376                         elif test "${cf_tst_cflags}" = "\"'" ; then
2377                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2378                                 continue
2379                         fi
2380                         ;;
2381                 esac
2382                 case "$CPPFLAGS" in
2383                 *$cf_add_cflags) #(vi
2384                         ;;
2385                 *) #(vi
2386                         case $cf_add_cflags in #(vi
2387                         -D*)
2388                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2389
2390 CPPFLAGS=`echo "$CPPFLAGS" | \
2391         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2392                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2393
2394                                 ;;
2395                         esac
2396                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2397                         ;;
2398                 esac
2399                 ;;
2400         *)
2401                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2402                 ;;
2403         esac
2404         ;;
2405 yes)
2406         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2407
2408         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2409
2410         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2411                 && test -z "${cf_tst_cflags}" \
2412                 && cf_fix_cppflags=no
2413         ;;
2414 esac
2415 done
2416
2417 if test -n "$cf_new_cflags" ; then
2418
2419         CFLAGS="$CFLAGS $cf_new_cflags"
2420 fi
2421
2422 if test -n "$cf_new_cppflags" ; then
2423
2424         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2425 fi
2426
2427 if test -n "$cf_new_extra_cppflags" ; then
2428
2429         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2430 fi
2431
2432 else
2433         cat >>confdefs.h <<\EOF
2434 #define CC_HAS_PROTOS 1
2435 EOF
2436
2437 fi
2438 fi
2439
2440 if test "$cf_cv_ansi_cc" = "no"; then
2441         { { echo "$as_me:2441: error: Your compiler does not appear to recognize prototypes.
2442 You have the following choices:
2443         a. adjust your compiler options
2444         b. get an up-to-date compiler
2445         c. use a wrapper such as unproto" >&5
2446 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2447 You have the following choices:
2448         a. adjust your compiler options
2449         b. get an up-to-date compiler
2450         c. use a wrapper such as unproto" >&2;}
2451    { (exit 1); exit 1; }; }
2452 fi
2453
2454 case $cf_cv_system_name in
2455 os2*)
2456     CFLAGS="$CFLAGS -Zmt"
2457     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2458     CXXFLAGS="$CXXFLAGS -Zmt"
2459     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2460     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2461     ac_cv_exeext=.exe
2462     ;;
2463 esac
2464
2465 PROG_EXT="$EXEEXT"
2466
2467 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2468 #define PROG_EXT "$PROG_EXT"
2469 EOF
2470
2471 test "$program_prefix" != NONE &&
2472   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2473 # Use a double $ so make ignores it.
2474 test "$program_suffix" != NONE &&
2475   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2476 # Double any \ or $.  echo might interpret backslashes.
2477 # By default was `s,x,x', remove it if useless.
2478 cat <<\_ACEOF >conftest.sed
2479 s/[\\$]/&&/g;s/;s,x,x,$//
2480 _ACEOF
2481 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2482 rm conftest.sed
2483
2484 for ac_prog in mawk gawk nawk awk
2485 do
2486   # Extract the first word of "$ac_prog", so it can be a program name with args.
2487 set dummy $ac_prog; ac_word=$2
2488 echo "$as_me:2488: checking for $ac_word" >&5
2489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2490 if test "${ac_cv_prog_AWK+set}" = set; then
2491   echo $ECHO_N "(cached) $ECHO_C" >&6
2492 else
2493   if test -n "$AWK"; then
2494   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2495 else
2496   ac_save_IFS=$IFS; IFS=$ac_path_separator
2497 ac_dummy="$PATH"
2498 for ac_dir in $ac_dummy; do
2499   IFS=$ac_save_IFS
2500   test -z "$ac_dir" && ac_dir=.
2501   $as_executable_p "$ac_dir/$ac_word" || continue
2502 ac_cv_prog_AWK="$ac_prog"
2503 echo "$as_me:2503: found $ac_dir/$ac_word" >&5
2504 break
2505 done
2506
2507 fi
2508 fi
2509 AWK=$ac_cv_prog_AWK
2510 if test -n "$AWK"; then
2511   echo "$as_me:2511: result: $AWK" >&5
2512 echo "${ECHO_T}$AWK" >&6
2513 else
2514   echo "$as_me:2514: result: no" >&5
2515 echo "${ECHO_T}no" >&6
2516 fi
2517
2518   test -n "$AWK" && break
2519 done
2520
2521 test -z "$AWK" && { { echo "$as_me:2521: error: No awk program found" >&5
2522 echo "$as_me: error: No awk program found" >&2;}
2523    { (exit 1); exit 1; }; }
2524
2525 echo "$as_me:2525: checking for egrep" >&5
2526 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2527 if test "${ac_cv_prog_egrep+set}" = set; then
2528   echo $ECHO_N "(cached) $ECHO_C" >&6
2529 else
2530   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2531     then ac_cv_prog_egrep='grep -E'
2532     else ac_cv_prog_egrep='egrep'
2533     fi
2534 fi
2535 echo "$as_me:2535: result: $ac_cv_prog_egrep" >&5
2536 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2537  EGREP=$ac_cv_prog_egrep
2538
2539 test -z "$EGREP" && { { echo "$as_me:2539: error: No egrep program found" >&5
2540 echo "$as_me: error: No egrep program found" >&2;}
2541    { (exit 1); exit 1; }; }
2542
2543 # Find a good install program.  We prefer a C program (faster),
2544 # so one script is as good as another.  But avoid the broken or
2545 # incompatible versions:
2546 # SysV /etc/install, /usr/sbin/install
2547 # SunOS /usr/etc/install
2548 # IRIX /sbin/install
2549 # AIX /bin/install
2550 # AmigaOS /C/install, which installs bootblocks on floppy discs
2551 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2552 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2553 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2554 # ./install, which can be erroneously created by make from ./install.sh.
2555 echo "$as_me:2555: checking for a BSD compatible install" >&5
2556 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2557 if test -z "$INSTALL"; then
2558 if test "${ac_cv_path_install+set}" = set; then
2559   echo $ECHO_N "(cached) $ECHO_C" >&6
2560 else
2561     ac_save_IFS=$IFS; IFS=$ac_path_separator
2562   for ac_dir in $PATH; do
2563     IFS=$ac_save_IFS
2564     # Account for people who put trailing slashes in PATH elements.
2565     case $ac_dir/ in
2566     / | ./ | .// | /cC/* \
2567     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2568     | /usr/ucb/* ) ;;
2569     *)
2570       # OSF1 and SCO ODT 3.0 have their own names for install.
2571       # Don't use installbsd from OSF since it installs stuff as root
2572       # by default.
2573       for ac_prog in ginstall scoinst install; do
2574         if $as_executable_p "$ac_dir/$ac_prog"; then
2575           if test $ac_prog = install &&
2576             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2577             # AIX install.  It has an incompatible calling convention.
2578             :
2579           elif test $ac_prog = install &&
2580             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2581             # program-specific install script used by HP pwplus--don't use.
2582             :
2583           else
2584             ac_cv_path_install="$ac_dir/$ac_prog -c"
2585             break 2
2586           fi
2587         fi
2588       done
2589       ;;
2590     esac
2591   done
2592
2593 fi
2594   if test "${ac_cv_path_install+set}" = set; then
2595     INSTALL=$ac_cv_path_install
2596   else
2597     # As a last resort, use the slow shell script.  We don't cache a
2598     # path for INSTALL within a source directory, because that will
2599     # break other packages using the cache if that directory is
2600     # removed, or if the path is relative.
2601     INSTALL=$ac_install_sh
2602   fi
2603 fi
2604 echo "$as_me:2604: result: $INSTALL" >&5
2605 echo "${ECHO_T}$INSTALL" >&6
2606
2607 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2608 # It thinks the first close brace ends the variable substitution.
2609 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2610
2611 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2612
2613 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2614
2615 echo "$as_me:2615: checking whether ln -s works" >&5
2616 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2617 LN_S=$as_ln_s
2618 if test "$LN_S" = "ln -s"; then
2619   echo "$as_me:2619: result: yes" >&5
2620 echo "${ECHO_T}yes" >&6
2621 else
2622   echo "$as_me:2622: result: no, using $LN_S" >&5
2623 echo "${ECHO_T}no, using $LN_S" >&6
2624 fi
2625
2626 echo "$as_me:2626: checking if $LN_S -f options work" >&5
2627 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2628
2629 rm -f conf$$.src conf$$dst
2630 echo >conf$$.dst
2631 echo first >conf$$.src
2632 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2633         cf_prog_ln_sf=yes
2634 else
2635         cf_prog_ln_sf=no
2636 fi
2637 rm -f conf$$.dst conf$$src
2638 echo "$as_me:2638: result: $cf_prog_ln_sf" >&5
2639 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2640
2641 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2642
2643 echo "$as_me:2643: checking for long file names" >&5
2644 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2645 if test "${ac_cv_sys_long_file_names+set}" = set; then
2646   echo $ECHO_N "(cached) $ECHO_C" >&6
2647 else
2648   ac_cv_sys_long_file_names=yes
2649 # Test for long file names in all the places we know might matter:
2650 #      .                the current directory, where building will happen
2651 #      $prefix/lib      where we will be installing things
2652 #      $exec_prefix/lib likewise
2653 # eval it to expand exec_prefix.
2654 #      $TMPDIR          if set, where it might want to write temporary files
2655 # if $TMPDIR is not set:
2656 #      /tmp             where it might want to write temporary files
2657 #      /var/tmp         likewise
2658 #      /usr/tmp         likewise
2659 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2660   ac_tmpdirs=$TMPDIR
2661 else
2662   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2663 fi
2664 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2665   test -d $ac_dir || continue
2666   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2667   ac_xdir=$ac_dir/cf$$
2668   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2669   ac_tf1=$ac_xdir/conftest9012345
2670   ac_tf2=$ac_xdir/conftest9012346
2671   (echo 1 >$ac_tf1) 2>/dev/null
2672   (echo 2 >$ac_tf2) 2>/dev/null
2673   ac_val=`cat $ac_tf1 2>/dev/null`
2674   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2675     ac_cv_sys_long_file_names=no
2676     rm -rf $ac_xdir 2>/dev/null
2677     break
2678   fi
2679   rm -rf $ac_xdir 2>/dev/null
2680 done
2681 fi
2682 echo "$as_me:2682: result: $ac_cv_sys_long_file_names" >&5
2683 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2684 if test $ac_cv_sys_long_file_names = yes; then
2685
2686 cat >>confdefs.h <<\EOF
2687 #define HAVE_LONG_FILE_NAMES 1
2688 EOF
2689
2690 fi
2691
2692 # if we find pkg-config, check if we should install the ".pc" files.
2693
2694 echo "$as_me:2694: checking if you want to use pkg-config" >&5
2695 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2696
2697 # Check whether --with-pkg-config or --without-pkg-config was given.
2698 if test "${with_pkg_config+set}" = set; then
2699   withval="$with_pkg_config"
2700   cf_pkg_config=$withval
2701 else
2702   cf_pkg_config=yes
2703 fi;
2704 echo "$as_me:2704: result: $cf_pkg_config" >&5
2705 echo "${ECHO_T}$cf_pkg_config" >&6
2706
2707 case $cf_pkg_config in #(vi
2708 no) #(vi
2709         PKG_CONFIG=none
2710         ;;
2711 yes) #(vi
2712
2713 if test -n "$ac_tool_prefix"; then
2714   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2715 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2716 echo "$as_me:2716: checking for $ac_word" >&5
2717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2718 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2719   echo $ECHO_N "(cached) $ECHO_C" >&6
2720 else
2721   case $PKG_CONFIG in
2722   [\\/]* | ?:[\\/]*)
2723   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2724   ;;
2725   *)
2726   ac_save_IFS=$IFS; IFS=$ac_path_separator
2727 ac_dummy="$PATH"
2728 for ac_dir in $ac_dummy; do
2729   IFS=$ac_save_IFS
2730   test -z "$ac_dir" && ac_dir=.
2731   if $as_executable_p "$ac_dir/$ac_word"; then
2732    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2733    echo "$as_me:2733: found $ac_dir/$ac_word" >&5
2734    break
2735 fi
2736 done
2737
2738   ;;
2739 esac
2740 fi
2741 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2742
2743 if test -n "$PKG_CONFIG"; then
2744   echo "$as_me:2744: result: $PKG_CONFIG" >&5
2745 echo "${ECHO_T}$PKG_CONFIG" >&6
2746 else
2747   echo "$as_me:2747: result: no" >&5
2748 echo "${ECHO_T}no" >&6
2749 fi
2750
2751 fi
2752 if test -z "$ac_cv_path_PKG_CONFIG"; then
2753   ac_pt_PKG_CONFIG=$PKG_CONFIG
2754   # Extract the first word of "pkg-config", so it can be a program name with args.
2755 set dummy pkg-config; ac_word=$2
2756 echo "$as_me:2756: checking for $ac_word" >&5
2757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2758 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2759   echo $ECHO_N "(cached) $ECHO_C" >&6
2760 else
2761   case $ac_pt_PKG_CONFIG in
2762   [\\/]* | ?:[\\/]*)
2763   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2764   ;;
2765   *)
2766   ac_save_IFS=$IFS; IFS=$ac_path_separator
2767 ac_dummy="$PATH"
2768 for ac_dir in $ac_dummy; do
2769   IFS=$ac_save_IFS
2770   test -z "$ac_dir" && ac_dir=.
2771   if $as_executable_p "$ac_dir/$ac_word"; then
2772    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2773    echo "$as_me:2773: found $ac_dir/$ac_word" >&5
2774    break
2775 fi
2776 done
2777
2778   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2779   ;;
2780 esac
2781 fi
2782 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2783
2784 if test -n "$ac_pt_PKG_CONFIG"; then
2785   echo "$as_me:2785: result: $ac_pt_PKG_CONFIG" >&5
2786 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2787 else
2788   echo "$as_me:2788: result: no" >&5
2789 echo "${ECHO_T}no" >&6
2790 fi
2791
2792   PKG_CONFIG=$ac_pt_PKG_CONFIG
2793 else
2794   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2795 fi
2796
2797         ;;
2798 *)
2799         PKG_CONFIG=$withval
2800         ;;
2801 esac
2802
2803 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2804 if test "$PKG_CONFIG" != none ; then
2805
2806 if test "x$prefix" != xNONE; then
2807   cf_path_syntax="$prefix"
2808 else
2809   cf_path_syntax="$ac_default_prefix"
2810 fi
2811
2812 case ".$PKG_CONFIG" in #(vi
2813 .\$\(*\)*|.\'*\'*) #(vi
2814   ;;
2815 ..|./*|.\\*) #(vi
2816   ;;
2817 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2818   ;;
2819 .\${*prefix}*) #(vi
2820   eval PKG_CONFIG="$PKG_CONFIG"
2821   case ".$PKG_CONFIG" in #(vi
2822   .NONE/*)
2823     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2824     ;;
2825   esac
2826   ;; #(vi
2827 .no|.NONE/*)
2828   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2829   ;;
2830 *)
2831   { { echo "$as_me:2831: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2832 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2833    { (exit 1); exit 1; }; }
2834   ;;
2835 esac
2836
2837 fi
2838
2839 if test "$PKG_CONFIG" != none ; then
2840         echo "$as_me:2840: checking if we should install .pc files for $PKG_CONFIG" >&5
2841 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2842
2843         # Leave this as something that can be overridden in the environment.
2844         if test -z "$PKG_CONFIG_LIBDIR" ; then
2845                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
2846         fi
2847         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
2848         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
2849
2850 # Check whether --enable-pc-files or --disable-pc-files was given.
2851 if test "${enable_pc_files+set}" = set; then
2852   enableval="$enable_pc_files"
2853   enable_pc_files=$enableval
2854 else
2855   enable_pc_files=no
2856 fi;
2857                 echo "$as_me:2857: result: $enable_pc_files" >&5
2858 echo "${ECHO_T}$enable_pc_files" >&6
2859         else
2860                 echo "$as_me:2860: result: no" >&5
2861 echo "${ECHO_T}no" >&6
2862                 { echo "$as_me:2862: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
2863 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
2864                 enable_pc_files=no
2865         fi
2866 fi
2867
2868 echo "$as_me:2868: checking if you want to build test-programs" >&5
2869 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2870
2871 # Check whether --with-tests or --without-tests was given.
2872 if test "${with_tests+set}" = set; then
2873   withval="$with_tests"
2874   cf_with_tests=$withval
2875 else
2876   cf_with_tests=yes
2877 fi;
2878 echo "$as_me:2878: result: $cf_with_tests" >&5
2879 echo "${ECHO_T}$cf_with_tests" >&6
2880
2881 echo "$as_me:2881: checking if we should assume mixed-case filenames" >&5
2882 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2883
2884 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2885 if test "${enable_mixed_case+set}" = set; then
2886   enableval="$enable_mixed_case"
2887   enable_mixedcase=$enableval
2888 else
2889   enable_mixedcase=auto
2890 fi;
2891 echo "$as_me:2891: result: $enable_mixedcase" >&5
2892 echo "${ECHO_T}$enable_mixedcase" >&6
2893 if test "$enable_mixedcase" = "auto" ; then
2894
2895 echo "$as_me:2895: checking if filesystem supports mixed-case filenames" >&5
2896 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2897 if test "${cf_cv_mixedcase+set}" = set; then
2898   echo $ECHO_N "(cached) $ECHO_C" >&6
2899 else
2900
2901 if test "$cross_compiling" = yes ; then
2902         case $target_alias in #(vi
2903         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2904                 cf_cv_mixedcase=no
2905                 ;;
2906         *)
2907                 cf_cv_mixedcase=yes
2908                 ;;
2909         esac
2910 else
2911         rm -f conftest CONFTEST
2912         echo test >conftest
2913         if test -f CONFTEST ; then
2914                 cf_cv_mixedcase=no
2915         else
2916                 cf_cv_mixedcase=yes
2917         fi
2918         rm -f conftest CONFTEST
2919 fi
2920
2921 fi
2922 echo "$as_me:2922: result: $cf_cv_mixedcase" >&5
2923 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2924 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2925 #define MIXEDCASE_FILENAMES 1
2926 EOF
2927
2928 else
2929     cf_cv_mixedcase=$enable_mixedcase
2930     if test "$enable_mixedcase" = "yes" ; then
2931         cat >>confdefs.h <<\EOF
2932 #define MIXEDCASE_FILENAMES 1
2933 EOF
2934
2935     fi
2936 fi
2937
2938 # do this after mixed-case option (tags/TAGS is not as important as tic).
2939 echo "$as_me:2939: checking whether ${MAKE-make} sets \${MAKE}" >&5
2940 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2941 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2942 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2943   echo $ECHO_N "(cached) $ECHO_C" >&6
2944 else
2945   cat >conftest.make <<\EOF
2946 all:
2947         @echo 'ac_maketemp="${MAKE}"'
2948 EOF
2949 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2950 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2951 if test -n "$ac_maketemp"; then
2952   eval ac_cv_prog_make_${ac_make}_set=yes
2953 else
2954   eval ac_cv_prog_make_${ac_make}_set=no
2955 fi
2956 rm -f conftest.make
2957 fi
2958 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2959   echo "$as_me:2959: result: yes" >&5
2960 echo "${ECHO_T}yes" >&6
2961   SET_MAKE=
2962 else
2963   echo "$as_me:2963: result: no" >&5
2964 echo "${ECHO_T}no" >&6
2965   SET_MAKE="MAKE=${MAKE-make}"
2966 fi
2967
2968 for ac_prog in exctags ctags
2969 do
2970   # Extract the first word of "$ac_prog", so it can be a program name with args.
2971 set dummy $ac_prog; ac_word=$2
2972 echo "$as_me:2972: checking for $ac_word" >&5
2973 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2974 if test "${ac_cv_prog_CTAGS+set}" = set; then
2975   echo $ECHO_N "(cached) $ECHO_C" >&6
2976 else
2977   if test -n "$CTAGS"; then
2978   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2979 else
2980   ac_save_IFS=$IFS; IFS=$ac_path_separator
2981 ac_dummy="$PATH"
2982 for ac_dir in $ac_dummy; do
2983   IFS=$ac_save_IFS
2984   test -z "$ac_dir" && ac_dir=.
2985   $as_executable_p "$ac_dir/$ac_word" || continue
2986 ac_cv_prog_CTAGS="$ac_prog"
2987 echo "$as_me:2987: found $ac_dir/$ac_word" >&5
2988 break
2989 done
2990
2991 fi
2992 fi
2993 CTAGS=$ac_cv_prog_CTAGS
2994 if test -n "$CTAGS"; then
2995   echo "$as_me:2995: result: $CTAGS" >&5
2996 echo "${ECHO_T}$CTAGS" >&6
2997 else
2998   echo "$as_me:2998: result: no" >&5
2999 echo "${ECHO_T}no" >&6
3000 fi
3001
3002   test -n "$CTAGS" && break
3003 done
3004
3005 for ac_prog in exetags etags
3006 do
3007   # Extract the first word of "$ac_prog", so it can be a program name with args.
3008 set dummy $ac_prog; ac_word=$2
3009 echo "$as_me:3009: checking for $ac_word" >&5
3010 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3011 if test "${ac_cv_prog_ETAGS+set}" = set; then
3012   echo $ECHO_N "(cached) $ECHO_C" >&6
3013 else
3014   if test -n "$ETAGS"; then
3015   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3016 else
3017   ac_save_IFS=$IFS; IFS=$ac_path_separator
3018 ac_dummy="$PATH"
3019 for ac_dir in $ac_dummy; do
3020   IFS=$ac_save_IFS
3021   test -z "$ac_dir" && ac_dir=.
3022   $as_executable_p "$ac_dir/$ac_word" || continue
3023 ac_cv_prog_ETAGS="$ac_prog"
3024 echo "$as_me:3024: found $ac_dir/$ac_word" >&5
3025 break
3026 done
3027
3028 fi
3029 fi
3030 ETAGS=$ac_cv_prog_ETAGS
3031 if test -n "$ETAGS"; then
3032   echo "$as_me:3032: result: $ETAGS" >&5
3033 echo "${ECHO_T}$ETAGS" >&6
3034 else
3035   echo "$as_me:3035: result: no" >&5
3036 echo "${ECHO_T}no" >&6
3037 fi
3038
3039   test -n "$ETAGS" && break
3040 done
3041
3042 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3043 set dummy ${CTAGS:-ctags}; ac_word=$2
3044 echo "$as_me:3044: checking for $ac_word" >&5
3045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3046 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3047   echo $ECHO_N "(cached) $ECHO_C" >&6
3048 else
3049   if test -n "$MAKE_LOWER_TAGS"; then
3050   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3051 else
3052   ac_save_IFS=$IFS; IFS=$ac_path_separator
3053 ac_dummy="$PATH"
3054 for ac_dir in $ac_dummy; do
3055   IFS=$ac_save_IFS
3056   test -z "$ac_dir" && ac_dir=.
3057   $as_executable_p "$ac_dir/$ac_word" || continue
3058 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3059 echo "$as_me:3059: found $ac_dir/$ac_word" >&5
3060 break
3061 done
3062
3063   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3064 fi
3065 fi
3066 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3067 if test -n "$MAKE_LOWER_TAGS"; then
3068   echo "$as_me:3068: result: $MAKE_LOWER_TAGS" >&5
3069 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3070 else
3071   echo "$as_me:3071: result: no" >&5
3072 echo "${ECHO_T}no" >&6
3073 fi
3074
3075 if test "$cf_cv_mixedcase" = yes ; then
3076         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3077 set dummy ${ETAGS:-etags}; ac_word=$2
3078 echo "$as_me:3078: checking for $ac_word" >&5
3079 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3080 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3081   echo $ECHO_N "(cached) $ECHO_C" >&6
3082 else
3083   if test -n "$MAKE_UPPER_TAGS"; then
3084   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3085 else
3086   ac_save_IFS=$IFS; IFS=$ac_path_separator
3087 ac_dummy="$PATH"
3088 for ac_dir in $ac_dummy; do
3089   IFS=$ac_save_IFS
3090   test -z "$ac_dir" && ac_dir=.
3091   $as_executable_p "$ac_dir/$ac_word" || continue
3092 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3093 echo "$as_me:3093: found $ac_dir/$ac_word" >&5
3094 break
3095 done
3096
3097   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3098 fi
3099 fi
3100 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3101 if test -n "$MAKE_UPPER_TAGS"; then
3102   echo "$as_me:3102: result: $MAKE_UPPER_TAGS" >&5
3103 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3104 else
3105   echo "$as_me:3105: result: no" >&5
3106 echo "${ECHO_T}no" >&6
3107 fi
3108
3109 else
3110         MAKE_UPPER_TAGS=no
3111 fi
3112
3113 if test "$MAKE_UPPER_TAGS" = yes ; then
3114         MAKE_UPPER_TAGS=
3115 else
3116         MAKE_UPPER_TAGS="#"
3117 fi
3118
3119 if test "$MAKE_LOWER_TAGS" = yes ; then
3120         MAKE_LOWER_TAGS=
3121 else
3122         MAKE_LOWER_TAGS="#"
3123 fi
3124
3125 echo "$as_me:3125: checking for makeflags variable" >&5
3126 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3127 if test "${cf_cv_makeflags+set}" = set; then
3128   echo $ECHO_N "(cached) $ECHO_C" >&6
3129 else
3130
3131         cf_cv_makeflags=''
3132         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3133         do
3134                 cat >cf_makeflags.tmp <<CF_EOF
3135 SHELL = /bin/sh
3136 all :
3137         @ echo '.$cf_option'
3138 CF_EOF
3139                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3140                 case "$cf_result" in
3141                 .*k)
3142                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3143                         case "$cf_result" in
3144                         .*CC=*) cf_cv_makeflags=
3145                                 ;;
3146                         *)      cf_cv_makeflags=$cf_option
3147                                 ;;
3148                         esac
3149                         break
3150                         ;;
3151                 .-)     ;;
3152                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3153                         ;;
3154                 esac
3155         done
3156         rm -f cf_makeflags.tmp
3157
3158 fi
3159 echo "$as_me:3159: result: $cf_cv_makeflags" >&5
3160 echo "${ECHO_T}$cf_cv_makeflags" >&6
3161
3162 if test -n "$ac_tool_prefix"; then
3163   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3164 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3165 echo "$as_me:3165: checking for $ac_word" >&5
3166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3167 if test "${ac_cv_prog_RANLIB+set}" = set; then
3168   echo $ECHO_N "(cached) $ECHO_C" >&6
3169 else
3170   if test -n "$RANLIB"; then
3171   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3172 else
3173   ac_save_IFS=$IFS; IFS=$ac_path_separator
3174 ac_dummy="$PATH"
3175 for ac_dir in $ac_dummy; do
3176   IFS=$ac_save_IFS
3177   test -z "$ac_dir" && ac_dir=.
3178   $as_executable_p "$ac_dir/$ac_word" || continue
3179 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3180 echo "$as_me:3180: found $ac_dir/$ac_word" >&5
3181 break
3182 done
3183
3184 fi
3185 fi
3186 RANLIB=$ac_cv_prog_RANLIB
3187 if test -n "$RANLIB"; then
3188   echo "$as_me:3188: result: $RANLIB" >&5
3189 echo "${ECHO_T}$RANLIB" >&6
3190 else
3191   echo "$as_me:3191: result: no" >&5
3192 echo "${ECHO_T}no" >&6
3193 fi
3194
3195 fi
3196 if test -z "$ac_cv_prog_RANLIB"; then
3197   ac_ct_RANLIB=$RANLIB
3198   # Extract the first word of "ranlib", so it can be a program name with args.
3199 set dummy ranlib; ac_word=$2
3200 echo "$as_me:3200: checking for $ac_word" >&5
3201 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3202 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3203   echo $ECHO_N "(cached) $ECHO_C" >&6
3204 else
3205   if test -n "$ac_ct_RANLIB"; then
3206   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3207 else
3208   ac_save_IFS=$IFS; IFS=$ac_path_separator
3209 ac_dummy="$PATH"
3210 for ac_dir in $ac_dummy; do
3211   IFS=$ac_save_IFS
3212   test -z "$ac_dir" && ac_dir=.
3213   $as_executable_p "$ac_dir/$ac_word" || continue
3214 ac_cv_prog_ac_ct_RANLIB="ranlib"
3215 echo "$as_me:3215: found $ac_dir/$ac_word" >&5
3216 break
3217 done
3218
3219   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3220 fi
3221 fi
3222 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3223 if test -n "$ac_ct_RANLIB"; then
3224   echo "$as_me:3224: result: $ac_ct_RANLIB" >&5
3225 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3226 else
3227   echo "$as_me:3227: result: no" >&5
3228 echo "${ECHO_T}no" >&6
3229 fi
3230
3231   RANLIB=$ac_ct_RANLIB
3232 else
3233   RANLIB="$ac_cv_prog_RANLIB"
3234 fi
3235
3236 if test -n "$ac_tool_prefix"; then
3237   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3238 set dummy ${ac_tool_prefix}ld; ac_word=$2
3239 echo "$as_me:3239: checking for $ac_word" >&5
3240 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3241 if test "${ac_cv_prog_LD+set}" = set; then
3242   echo $ECHO_N "(cached) $ECHO_C" >&6
3243 else
3244   if test -n "$LD"; then
3245   ac_cv_prog_LD="$LD" # Let the user override the test.
3246 else
3247   ac_save_IFS=$IFS; IFS=$ac_path_separator
3248 ac_dummy="$PATH"
3249 for ac_dir in $ac_dummy; do
3250   IFS=$ac_save_IFS
3251   test -z "$ac_dir" && ac_dir=.
3252   $as_executable_p "$ac_dir/$ac_word" || continue
3253 ac_cv_prog_LD="${ac_tool_prefix}ld"
3254 echo "$as_me:3254: found $ac_dir/$ac_word" >&5
3255 break
3256 done
3257
3258 fi
3259 fi
3260 LD=$ac_cv_prog_LD
3261 if test -n "$LD"; then
3262   echo "$as_me:3262: result: $LD" >&5
3263 echo "${ECHO_T}$LD" >&6
3264 else
3265   echo "$as_me:3265: result: no" >&5
3266 echo "${ECHO_T}no" >&6
3267 fi
3268
3269 fi
3270 if test -z "$ac_cv_prog_LD"; then
3271   ac_ct_LD=$LD
3272   # Extract the first word of "ld", so it can be a program name with args.
3273 set dummy ld; ac_word=$2
3274 echo "$as_me:3274: checking for $ac_word" >&5
3275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3276 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3277   echo $ECHO_N "(cached) $ECHO_C" >&6
3278 else
3279   if test -n "$ac_ct_LD"; then
3280   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3281 else
3282   ac_save_IFS=$IFS; IFS=$ac_path_separator
3283 ac_dummy="$PATH"
3284 for ac_dir in $ac_dummy; do
3285   IFS=$ac_save_IFS
3286   test -z "$ac_dir" && ac_dir=.
3287   $as_executable_p "$ac_dir/$ac_word" || continue
3288 ac_cv_prog_ac_ct_LD="ld"
3289 echo "$as_me:3289: found $ac_dir/$ac_word" >&5
3290 break
3291 done
3292
3293   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3294 fi
3295 fi
3296 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3297 if test -n "$ac_ct_LD"; then
3298   echo "$as_me:3298: result: $ac_ct_LD" >&5
3299 echo "${ECHO_T}$ac_ct_LD" >&6
3300 else
3301   echo "$as_me:3301: result: no" >&5
3302 echo "${ECHO_T}no" >&6
3303 fi
3304
3305   LD=$ac_ct_LD
3306 else
3307   LD="$ac_cv_prog_LD"
3308 fi
3309
3310 if test -n "$ac_tool_prefix"; then
3311   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3312 set dummy ${ac_tool_prefix}ar; ac_word=$2
3313 echo "$as_me:3313: checking for $ac_word" >&5
3314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3315 if test "${ac_cv_prog_AR+set}" = set; then
3316   echo $ECHO_N "(cached) $ECHO_C" >&6
3317 else
3318   if test -n "$AR"; then
3319   ac_cv_prog_AR="$AR" # Let the user override the test.
3320 else
3321   ac_save_IFS=$IFS; IFS=$ac_path_separator
3322 ac_dummy="$PATH"
3323 for ac_dir in $ac_dummy; do
3324   IFS=$ac_save_IFS
3325   test -z "$ac_dir" && ac_dir=.
3326   $as_executable_p "$ac_dir/$ac_word" || continue
3327 ac_cv_prog_AR="${ac_tool_prefix}ar"
3328 echo "$as_me:3328: found $ac_dir/$ac_word" >&5
3329 break
3330 done
3331
3332 fi
3333 fi
3334 AR=$ac_cv_prog_AR
3335 if test -n "$AR"; then
3336   echo "$as_me:3336: result: $AR" >&5
3337 echo "${ECHO_T}$AR" >&6
3338 else
3339   echo "$as_me:3339: result: no" >&5
3340 echo "${ECHO_T}no" >&6
3341 fi
3342
3343 fi
3344 if test -z "$ac_cv_prog_AR"; then
3345   ac_ct_AR=$AR
3346   # Extract the first word of "ar", so it can be a program name with args.
3347 set dummy ar; ac_word=$2
3348 echo "$as_me:3348: checking for $ac_word" >&5
3349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3350 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3351   echo $ECHO_N "(cached) $ECHO_C" >&6
3352 else
3353   if test -n "$ac_ct_AR"; then
3354   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3355 else
3356   ac_save_IFS=$IFS; IFS=$ac_path_separator
3357 ac_dummy="$PATH"
3358 for ac_dir in $ac_dummy; do
3359   IFS=$ac_save_IFS
3360   test -z "$ac_dir" && ac_dir=.
3361   $as_executable_p "$ac_dir/$ac_word" || continue
3362 ac_cv_prog_ac_ct_AR="ar"
3363 echo "$as_me:3363: found $ac_dir/$ac_word" >&5
3364 break
3365 done
3366
3367   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3368 fi
3369 fi
3370 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3371 if test -n "$ac_ct_AR"; then
3372   echo "$as_me:3372: result: $ac_ct_AR" >&5
3373 echo "${ECHO_T}$ac_ct_AR" >&6
3374 else
3375   echo "$as_me:3375: result: no" >&5
3376 echo "${ECHO_T}no" >&6
3377 fi
3378
3379   AR=$ac_ct_AR
3380 else
3381   AR="$ac_cv_prog_AR"
3382 fi
3383
3384 if test -n "$ac_tool_prefix"; then
3385   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3386 set dummy ${ac_tool_prefix}ar; ac_word=$2
3387 echo "$as_me:3387: checking for $ac_word" >&5
3388 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3389 if test "${ac_cv_prog_AR+set}" = set; then
3390   echo $ECHO_N "(cached) $ECHO_C" >&6
3391 else
3392   if test -n "$AR"; then
3393   ac_cv_prog_AR="$AR" # Let the user override the test.
3394 else
3395   ac_save_IFS=$IFS; IFS=$ac_path_separator
3396 ac_dummy="$PATH"
3397 for ac_dir in $ac_dummy; do
3398   IFS=$ac_save_IFS
3399   test -z "$ac_dir" && ac_dir=.
3400   $as_executable_p "$ac_dir/$ac_word" || continue
3401 ac_cv_prog_AR="${ac_tool_prefix}ar"
3402 echo "$as_me:3402: found $ac_dir/$ac_word" >&5
3403 break
3404 done
3405
3406 fi
3407 fi
3408 AR=$ac_cv_prog_AR
3409 if test -n "$AR"; then
3410   echo "$as_me:3410: result: $AR" >&5
3411 echo "${ECHO_T}$AR" >&6
3412 else
3413   echo "$as_me:3413: result: no" >&5
3414 echo "${ECHO_T}no" >&6
3415 fi
3416
3417 fi
3418 if test -z "$ac_cv_prog_AR"; then
3419   ac_ct_AR=$AR
3420   # Extract the first word of "ar", so it can be a program name with args.
3421 set dummy ar; ac_word=$2
3422 echo "$as_me:3422: checking for $ac_word" >&5
3423 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3424 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3425   echo $ECHO_N "(cached) $ECHO_C" >&6
3426 else
3427   if test -n "$ac_ct_AR"; then
3428   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3429 else
3430   ac_save_IFS=$IFS; IFS=$ac_path_separator
3431 ac_dummy="$PATH"
3432 for ac_dir in $ac_dummy; do
3433   IFS=$ac_save_IFS
3434   test -z "$ac_dir" && ac_dir=.
3435   $as_executable_p "$ac_dir/$ac_word" || continue
3436 ac_cv_prog_ac_ct_AR="ar"
3437 echo "$as_me:3437: found $ac_dir/$ac_word" >&5
3438 break
3439 done
3440
3441   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3442 fi
3443 fi
3444 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3445 if test -n "$ac_ct_AR"; then
3446   echo "$as_me:3446: result: $ac_ct_AR" >&5
3447 echo "${ECHO_T}$ac_ct_AR" >&6
3448 else
3449   echo "$as_me:3449: result: no" >&5
3450 echo "${ECHO_T}no" >&6
3451 fi
3452
3453   AR=$ac_ct_AR
3454 else
3455   AR="$ac_cv_prog_AR"
3456 fi
3457
3458 echo "$as_me:3458: checking for options to update archives" >&5
3459 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3460 if test "${cf_cv_ar_flags+set}" = set; then
3461   echo $ECHO_N "(cached) $ECHO_C" >&6
3462 else
3463
3464         cf_cv_ar_flags=unknown
3465         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3466         do
3467
3468                 # check if $ARFLAGS already contains this choice
3469                 if test "x$ARFLAGS" != "x" ; then
3470                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3471                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3472                                 cf_cv_ar_flags=
3473                                 break
3474                         fi
3475                 fi
3476
3477                 rm -f conftest.$ac_cv_objext
3478                 rm -f conftest.a
3479
3480                 cat >conftest.$ac_ext <<EOF
3481 #line 3481 "configure"
3482 int     testdata[3] = { 123, 456, 789 };
3483 EOF
3484                 if { (eval echo "$as_me:3484: \"$ac_compile\"") >&5
3485   (eval $ac_compile) 2>&5
3486   ac_status=$?
3487   echo "$as_me:3487: \$? = $ac_status" >&5
3488   (exit $ac_status); } ; then
3489                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3490                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3491                         if test -f conftest.a ; then
3492                                 cf_cv_ar_flags=$cf_ar_flags
3493                                 break
3494                         fi
3495                 else
3496                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3497
3498 echo "${as_me:-configure}:3498: testing cannot compile test-program ..." 1>&5
3499
3500                         break
3501                 fi
3502         done
3503         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3504
3505 fi
3506 echo "$as_me:3506: result: $cf_cv_ar_flags" >&5
3507 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3508
3509 if test -n "$ARFLAGS" ; then
3510         if test -n "$cf_cv_ar_flags" ; then
3511                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3512         fi
3513 else
3514         ARFLAGS=$cf_cv_ar_flags
3515 fi
3516
3517 echo "$as_me:3517: checking if you have specified an install-prefix" >&5
3518 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3519
3520 # Check whether --with-install-prefix or --without-install-prefix was given.
3521 if test "${with_install_prefix+set}" = set; then
3522   withval="$with_install_prefix"
3523   case "$withval" in #(vi
3524         yes|no) #(vi
3525                 ;;
3526         *)      DESTDIR="$withval"
3527                 ;;
3528         esac
3529 fi;
3530 echo "$as_me:3530: result: $DESTDIR" >&5
3531 echo "${ECHO_T}$DESTDIR" >&6
3532
3533 ###############################################################################
3534
3535 # If we're cross-compiling, allow the user to override the tools and their
3536 # options.  The configure script is oriented toward identifying the host
3537 # compiler, etc., but we need a build compiler to generate parts of the source.
3538
3539 if test "$cross_compiling" = yes ; then
3540
3541         # defaults that we might want to override
3542         : ${BUILD_CFLAGS:=''}
3543         : ${BUILD_CPPFLAGS:=''}
3544         : ${BUILD_LDFLAGS:=''}
3545         : ${BUILD_LIBS:=''}
3546         : ${BUILD_EXEEXT:='$x'}
3547         : ${BUILD_OBJEXT:='o'}
3548
3549 # Check whether --with-build-cc or --without-build-cc was given.
3550 if test "${with_build_cc+set}" = set; then
3551   withval="$with_build_cc"
3552   BUILD_CC="$withval"
3553 else
3554   for ac_prog in gcc cc cl
3555 do
3556   # Extract the first word of "$ac_prog", so it can be a program name with args.
3557 set dummy $ac_prog; ac_word=$2
3558 echo "$as_me:3558: checking for $ac_word" >&5
3559 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3560 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3561   echo $ECHO_N "(cached) $ECHO_C" >&6
3562 else
3563   if test -n "$BUILD_CC"; then
3564   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3565 else
3566   ac_save_IFS=$IFS; IFS=$ac_path_separator
3567 ac_dummy="$PATH"
3568 for ac_dir in $ac_dummy; do
3569   IFS=$ac_save_IFS
3570   test -z "$ac_dir" && ac_dir=.
3571   $as_executable_p "$ac_dir/$ac_word" || continue
3572 ac_cv_prog_BUILD_CC="$ac_prog"
3573 echo "$as_me:3573: found $ac_dir/$ac_word" >&5
3574 break
3575 done
3576
3577 fi
3578 fi
3579 BUILD_CC=$ac_cv_prog_BUILD_CC
3580 if test -n "$BUILD_CC"; then
3581   echo "$as_me:3581: result: $BUILD_CC" >&5
3582 echo "${ECHO_T}$BUILD_CC" >&6
3583 else
3584   echo "$as_me:3584: result: no" >&5
3585 echo "${ECHO_T}no" >&6
3586 fi
3587
3588   test -n "$BUILD_CC" && break
3589 done
3590
3591 fi;
3592         echo "$as_me:3592: checking for native build C compiler" >&5
3593 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3594         echo "$as_me:3594: result: $BUILD_CC" >&5
3595 echo "${ECHO_T}$BUILD_CC" >&6
3596
3597         echo "$as_me:3597: checking for native build C preprocessor" >&5
3598 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3599
3600 # Check whether --with-build-cpp or --without-build-cpp was given.
3601 if test "${with_build_cpp+set}" = set; then
3602   withval="$with_build_cpp"
3603   BUILD_CPP="$withval"
3604 else
3605   BUILD_CPP='${BUILD_CC} -E'
3606 fi;
3607         echo "$as_me:3607: result: $BUILD_CPP" >&5
3608 echo "${ECHO_T}$BUILD_CPP" >&6
3609
3610         echo "$as_me:3610: checking for native build C flags" >&5
3611 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3612
3613 # Check whether --with-build-cflags or --without-build-cflags was given.
3614 if test "${with_build_cflags+set}" = set; then
3615   withval="$with_build_cflags"
3616   BUILD_CFLAGS="$withval"
3617 fi;
3618         echo "$as_me:3618: result: $BUILD_CFLAGS" >&5
3619 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3620
3621         echo "$as_me:3621: checking for native build C preprocessor-flags" >&5
3622 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3623
3624 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3625 if test "${with_build_cppflags+set}" = set; then
3626   withval="$with_build_cppflags"
3627   BUILD_CPPFLAGS="$withval"
3628 fi;
3629         echo "$as_me:3629: result: $BUILD_CPPFLAGS" >&5
3630 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3631
3632         echo "$as_me:3632: checking for native build linker-flags" >&5
3633 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3634
3635 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3636 if test "${with_build_ldflags+set}" = set; then
3637   withval="$with_build_ldflags"
3638   BUILD_LDFLAGS="$withval"
3639 fi;
3640         echo "$as_me:3640: result: $BUILD_LDFLAGS" >&5
3641 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3642
3643         echo "$as_me:3643: checking for native build linker-libraries" >&5
3644 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3645
3646 # Check whether --with-build-libs or --without-build-libs was given.
3647 if test "${with_build_libs+set}" = set; then
3648   withval="$with_build_libs"
3649   BUILD_LIBS="$withval"
3650 fi;
3651         echo "$as_me:3651: result: $BUILD_LIBS" >&5
3652 echo "${ECHO_T}$BUILD_LIBS" >&6
3653
3654         # this assumes we're on Unix.
3655         BUILD_EXEEXT=
3656         BUILD_OBJEXT=o
3657
3658         : ${BUILD_CC:='${CC}'}
3659
3660         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3661                 { { echo "$as_me:3661: error: Cross-build requires two compilers.
3662 Use --with-build-cc to specify the native compiler." >&5
3663 echo "$as_me: error: Cross-build requires two compilers.
3664 Use --with-build-cc to specify the native compiler." >&2;}
3665    { (exit 1); exit 1; }; }
3666         fi
3667
3668 else
3669         : ${BUILD_CC:='${CC}'}
3670         : ${BUILD_CPP:='${CPP}'}
3671         : ${BUILD_CFLAGS:='${CFLAGS}'}
3672         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3673         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3674         : ${BUILD_LIBS:='${LIBS}'}
3675         : ${BUILD_EXEEXT:='$x'}
3676         : ${BUILD_OBJEXT:='o'}
3677 fi
3678
3679 ###############################################################################
3680
3681 ### Options to allow the user to specify the set of libraries which are used.
3682 ### Use "--without-normal --with-shared" to allow the default model to be
3683 ### shared, for example.
3684 cf_list_models=""
3685
3686 echo "$as_me:3686: checking if you want to build shared C-objects" >&5
3687 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3688
3689 # Check whether --with-shared or --without-shared was given.
3690 if test "${with_shared+set}" = set; then
3691   withval="$with_shared"
3692   with_shared=$withval
3693 else
3694   with_shared=no
3695 fi;
3696 echo "$as_me:3696: result: $with_shared" >&5
3697 echo "${ECHO_T}$with_shared" >&6
3698 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3699
3700 echo "$as_me:3700: checking for specified models" >&5
3701 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3702 test -z "$cf_list_models" && cf_list_models=normal
3703 echo "$as_me:3703: result: $cf_list_models" >&5
3704 echo "${ECHO_T}$cf_list_models" >&6
3705
3706 ### Use the first model as the default, and save its suffix for use in building
3707 ### up test-applications.
3708 echo "$as_me:3708: checking for default model" >&5
3709 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3710 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3711 echo "$as_me:3711: result: $DFT_LWR_MODEL" >&5
3712 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3713
3714 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3715
3716 echo "$as_me:3716: checking for specific curses-directory" >&5
3717 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3718
3719 # Check whether --with-curses-dir or --without-curses-dir was given.
3720 if test "${with_curses_dir+set}" = set; then
3721   withval="$with_curses_dir"
3722   cf_cv_curses_dir=$withval
3723 else
3724   cf_cv_curses_dir=no
3725 fi;
3726 echo "$as_me:3726: result: $cf_cv_curses_dir" >&5
3727 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3728
3729 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3730 then
3731
3732 if test "x$prefix" != xNONE; then
3733   cf_path_syntax="$prefix"
3734 else
3735   cf_path_syntax="$ac_default_prefix"
3736 fi
3737
3738 case ".$withval" in #(vi
3739 .\$\(*\)*|.\'*\'*) #(vi
3740   ;;
3741 ..|./*|.\\*) #(vi
3742   ;;
3743 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3744   ;;
3745 .\${*prefix}*) #(vi
3746   eval withval="$withval"
3747   case ".$withval" in #(vi
3748   .NONE/*)
3749     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3750     ;;
3751   esac
3752   ;; #(vi
3753 .no|.NONE/*)
3754   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3755   ;;
3756 *)
3757   { { echo "$as_me:3757: error: expected a pathname, not \"$withval\"" >&5
3758 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3759    { (exit 1); exit 1; }; }
3760   ;;
3761 esac
3762
3763         if test -d "$cf_cv_curses_dir"
3764         then
3765
3766 if test -n "$cf_cv_curses_dir/include" ; then
3767   for cf_add_incdir in $cf_cv_curses_dir/include
3768   do
3769         while test $cf_add_incdir != /usr/include
3770         do
3771           if test -d $cf_add_incdir
3772           then
3773                 cf_have_incdir=no
3774                 if test -n "$CFLAGS$CPPFLAGS" ; then
3775                   # a loop is needed to ensure we can add subdirs of existing dirs
3776                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3777                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3778                           cf_have_incdir=yes; break
3779                         fi
3780                   done
3781                 fi
3782
3783                 if test "$cf_have_incdir" = no ; then
3784                   if test "$cf_add_incdir" = /usr/local/include ; then
3785                         if test "$GCC" = yes
3786                         then
3787                           cf_save_CPPFLAGS=$CPPFLAGS
3788                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3789                           cat >conftest.$ac_ext <<_ACEOF
3790 #line 3790 "configure"
3791 #include "confdefs.h"
3792 #include <stdio.h>
3793 int
3794 main ()
3795 {
3796 printf("Hello")
3797   ;
3798   return 0;
3799 }
3800 _ACEOF
3801 rm -f conftest.$ac_objext
3802 if { (eval echo "$as_me:3802: \"$ac_compile\"") >&5
3803   (eval $ac_compile) 2>&5
3804   ac_status=$?
3805   echo "$as_me:3805: \$? = $ac_status" >&5
3806   (exit $ac_status); } &&
3807          { ac_try='test -s conftest.$ac_objext'
3808   { (eval echo "$as_me:3808: \"$ac_try\"") >&5
3809   (eval $ac_try) 2>&5
3810   ac_status=$?
3811   echo "$as_me:3811: \$? = $ac_status" >&5
3812   (exit $ac_status); }; }; then
3813   :
3814 else
3815   echo "$as_me: failed program was:" >&5
3816 cat conftest.$ac_ext >&5
3817 cf_have_incdir=yes
3818 fi
3819 rm -f conftest.$ac_objext conftest.$ac_ext
3820                           CPPFLAGS=$cf_save_CPPFLAGS
3821                         fi
3822                   fi
3823                 fi
3824
3825                 if test "$cf_have_incdir" = no ; then
3826                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3827
3828 echo "${as_me:-configure}:3828: testing adding $cf_add_incdir to include-path ..." 1>&5
3829
3830                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3831
3832                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3833                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3834                   cf_add_incdir="$cf_top_incdir"
3835                 else
3836                   break
3837                 fi
3838           fi
3839         done
3840   done
3841 fi
3842
3843 if test -n "$cf_cv_curses_dir/lib" ; then
3844   for cf_add_libdir in $cf_cv_curses_dir/lib
3845   do
3846     if test $cf_add_libdir = /usr/lib ; then
3847       :
3848     elif test -d $cf_add_libdir
3849     then
3850       cf_have_libdir=no
3851       if test -n "$LDFLAGS$LIBS" ; then
3852         # a loop is needed to ensure we can add subdirs of existing dirs
3853         for cf_test_libdir in $LDFLAGS $LIBS ; do
3854           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3855             cf_have_libdir=yes; break
3856           fi
3857         done
3858       fi
3859       if test "$cf_have_libdir" = no ; then
3860         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
3861
3862 echo "${as_me:-configure}:3862: testing adding $cf_add_libdir to library-path ..." 1>&5
3863
3864         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3865       fi
3866     fi
3867   done
3868 fi
3869
3870         fi
3871 fi
3872
3873 echo "$as_me:3873: checking if you want wide-character code" >&5
3874 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3875
3876 # Check whether --enable-widec or --disable-widec was given.
3877 if test "${enable_widec+set}" = set; then
3878   enableval="$enable_widec"
3879   with_widec=$enableval
3880 else
3881   with_widec=no
3882 fi;
3883 echo "$as_me:3883: result: $with_widec" >&5
3884 echo "${ECHO_T}$with_widec" >&6
3885 if test "$with_widec" = yes ; then
3886
3887 echo "$as_me:3887: checking for multibyte character support" >&5
3888 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3889 if test "${cf_cv_utf8_lib+set}" = set; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892
3893         cf_save_LIBS="$LIBS"
3894         cat >conftest.$ac_ext <<_ACEOF
3895 #line 3895 "configure"
3896 #include "confdefs.h"
3897
3898 #include <stdlib.h>
3899 int
3900 main ()
3901 {
3902 putwc(0,0);
3903   ;
3904   return 0;
3905 }
3906 _ACEOF
3907 rm -f conftest.$ac_objext conftest$ac_exeext
3908 if { (eval echo "$as_me:3908: \"$ac_link\"") >&5
3909   (eval $ac_link) 2>&5
3910   ac_status=$?
3911   echo "$as_me:3911: \$? = $ac_status" >&5
3912   (exit $ac_status); } &&
3913          { ac_try='test -s conftest$ac_exeext'
3914   { (eval echo "$as_me:3914: \"$ac_try\"") >&5
3915   (eval $ac_try) 2>&5
3916   ac_status=$?
3917   echo "$as_me:3917: \$? = $ac_status" >&5
3918   (exit $ac_status); }; }; then
3919   cf_cv_utf8_lib=yes
3920 else
3921   echo "$as_me: failed program was:" >&5
3922 cat conftest.$ac_ext >&5
3923
3924 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3925 # will be set on completion of the AC_TRY_LINK below.
3926 cf_cv_header_path_utf8=
3927 cf_cv_library_path_utf8=
3928
3929 echo "${as_me:-configure}:3929: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3930
3931 cf_save_LIBS="$LIBS"
3932
3933 cat >conftest.$ac_ext <<_ACEOF
3934 #line 3934 "configure"
3935 #include "confdefs.h"
3936
3937 #include <libutf8.h>
3938 int
3939 main ()
3940 {
3941 putwc(0,0);
3942   ;
3943   return 0;
3944 }
3945 _ACEOF
3946 rm -f conftest.$ac_objext conftest$ac_exeext
3947 if { (eval echo "$as_me:3947: \"$ac_link\"") >&5
3948   (eval $ac_link) 2>&5
3949   ac_status=$?
3950   echo "$as_me:3950: \$? = $ac_status" >&5
3951   (exit $ac_status); } &&
3952          { ac_try='test -s conftest$ac_exeext'
3953   { (eval echo "$as_me:3953: \"$ac_try\"") >&5
3954   (eval $ac_try) 2>&5
3955   ac_status=$?
3956   echo "$as_me:3956: \$? = $ac_status" >&5
3957   (exit $ac_status); }; }; then
3958
3959         cf_cv_find_linkage_utf8=yes
3960         cf_cv_header_path_utf8=/usr/include
3961         cf_cv_library_path_utf8=/usr/lib
3962
3963 else
3964   echo "$as_me: failed program was:" >&5
3965 cat conftest.$ac_ext >&5
3966
3967 LIBS="-lutf8  $cf_save_LIBS"
3968
3969 cat >conftest.$ac_ext <<_ACEOF
3970 #line 3970 "configure"
3971 #include "confdefs.h"
3972
3973 #include <libutf8.h>
3974 int
3975 main ()
3976 {
3977 putwc(0,0);
3978   ;
3979   return 0;
3980 }
3981 _ACEOF
3982 rm -f conftest.$ac_objext conftest$ac_exeext
3983 if { (eval echo "$as_me:3983: \"$ac_link\"") >&5
3984   (eval $ac_link) 2>&5
3985   ac_status=$?
3986   echo "$as_me:3986: \$? = $ac_status" >&5
3987   (exit $ac_status); } &&
3988          { ac_try='test -s conftest$ac_exeext'
3989   { (eval echo "$as_me:3989: \"$ac_try\"") >&5
3990   (eval $ac_try) 2>&5
3991   ac_status=$?
3992   echo "$as_me:3992: \$? = $ac_status" >&5
3993   (exit $ac_status); }; }; then
3994
3995         cf_cv_find_linkage_utf8=yes
3996         cf_cv_header_path_utf8=/usr/include
3997         cf_cv_library_path_utf8=/usr/lib
3998         cf_cv_library_file_utf8="-lutf8"
3999
4000 else
4001   echo "$as_me: failed program was:" >&5
4002 cat conftest.$ac_ext >&5
4003
4004         cf_cv_find_linkage_utf8=no
4005         LIBS="$cf_save_LIBS"
4006
4007     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
4008
4009 echo "${as_me:-configure}:4009: testing find linkage for utf8 library ..." 1>&5
4010
4011 echo "${as_me:-configure}:4011: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4012
4013     cf_save_CPPFLAGS="$CPPFLAGS"
4014     cf_test_CPPFLAGS="$CPPFLAGS"
4015
4016 cf_search=
4017
4018 # collect the current set of include-directories from compiler flags
4019 cf_header_path_list=""
4020 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4021         for cf_header_path in $CPPFLAGS $CFLAGS
4022         do
4023                 case $cf_header_path in #(vi
4024                 -I*)
4025                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4026
4027 test "$cf_header_path" != "NONE" && \
4028 test -d "$cf_header_path" && \
4029  {
4030         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4031         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4032         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
4033         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
4034         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
4035         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4036 }
4037
4038                         cf_header_path_list="$cf_header_path_list $cf_search"
4039                         ;;
4040                 esac
4041         done
4042 fi
4043
4044 # add the variations for the package we are looking for
4045
4046 cf_search=
4047
4048 test "/usr" != "$prefix" && \
4049 test -d "/usr" && \
4050 (test $prefix = NONE || test "/usr" != "$prefix") && {
4051         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4052         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4053         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
4054         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
4055         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
4056         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
4057 }
4058
4059 test "$prefix" != "NONE" && \
4060 test -d "$prefix" && \
4061  {
4062         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4063         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4064         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
4065         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
4066         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
4067         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
4068 }
4069
4070 test "/usr/local" != "$prefix" && \
4071 test -d "/usr/local" && \
4072 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4073         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4074         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4075         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
4076         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
4077         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
4078         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
4079 }
4080
4081 test "/opt" != "$prefix" && \
4082 test -d "/opt" && \
4083 (test $prefix = NONE || test "/opt" != "$prefix") && {
4084         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4085         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4086         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
4087         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
4088         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
4089         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
4090 }
4091
4092 test "$HOME" != "$prefix" && \
4093 test -d "$HOME" && \
4094 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4095         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4096         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4097         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
4098         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
4099         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
4100         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
4101 }
4102
4103 test "$includedir" != NONE && \
4104 test "$includedir" != "/usr/include" && \
4105 test -d "$includedir" && {
4106         test -d $includedir &&    cf_search="$cf_search $includedir"
4107         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4108 }
4109
4110 test "$oldincludedir" != NONE && \
4111 test "$oldincludedir" != "/usr/include" && \
4112 test -d "$oldincludedir" && {
4113         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4114         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4115 }
4116
4117 cf_search="$cf_search $cf_header_path_list"
4118
4119     for cf_cv_header_path_utf8 in $cf_search
4120     do
4121       if test -d $cf_cv_header_path_utf8 ; then
4122         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
4123
4124 echo "${as_me:-configure}:4124: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4125
4126         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4127         cat >conftest.$ac_ext <<_ACEOF
4128 #line 4128 "configure"
4129 #include "confdefs.h"
4130
4131 #include <libutf8.h>
4132 int
4133 main ()
4134 {
4135 putwc(0,0);
4136   ;
4137   return 0;
4138 }
4139 _ACEOF
4140 rm -f conftest.$ac_objext
4141 if { (eval echo "$as_me:4141: \"$ac_compile\"") >&5
4142   (eval $ac_compile) 2>&5
4143   ac_status=$?
4144   echo "$as_me:4144: \$? = $ac_status" >&5
4145   (exit $ac_status); } &&
4146          { ac_try='test -s conftest.$ac_objext'
4147   { (eval echo "$as_me:4147: \"$ac_try\"") >&5
4148   (eval $ac_try) 2>&5
4149   ac_status=$?
4150   echo "$as_me:4150: \$? = $ac_status" >&5
4151   (exit $ac_status); }; }; then
4152
4153             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4154
4155 echo "${as_me:-configure}:4155: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4156
4157             cf_cv_find_linkage_utf8=maybe
4158             cf_test_CPPFLAGS="$CPPFLAGS"
4159             break
4160 else
4161   echo "$as_me: failed program was:" >&5
4162 cat conftest.$ac_ext >&5
4163
4164             CPPFLAGS="$cf_save_CPPFLAGS"
4165
4166 fi
4167 rm -f conftest.$ac_objext conftest.$ac_ext
4168       fi
4169     done
4170
4171     if test "$cf_cv_find_linkage_utf8" = maybe ; then
4172
4173 echo "${as_me:-configure}:4173: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4174
4175       cf_save_LIBS="$LIBS"
4176       cf_save_LDFLAGS="$LDFLAGS"
4177
4178       if test "$cf_cv_find_linkage_utf8" != yes ; then
4179
4180 cf_search=
4181 cf_library_path_list=""
4182 if test -n "${LDFLAGS}${LIBS}" ; then
4183         for cf_library_path in $LDFLAGS $LIBS
4184         do
4185                 case $cf_library_path in #(vi
4186                 -L*)
4187                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4188
4189 test "$cf_library_path" != "NONE" && \
4190 test -d "$cf_library_path" && \
4191  {
4192         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4193         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4194         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4195         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4196         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4197         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4198 }
4199
4200                         cf_library_path_list="$cf_library_path_list $cf_search"
4201                         ;;
4202                 esac
4203         done
4204 fi
4205
4206 cf_search=
4207
4208 test "/usr" != "$prefix" && \
4209 test -d "/usr" && \
4210 (test $prefix = NONE || test "/usr" != "$prefix") && {
4211         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4212         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4213         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4214         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4215         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4216         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4217 }
4218
4219 test "$prefix" != "NONE" && \
4220 test -d "$prefix" && \
4221  {
4222         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4223         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4224         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4225         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4226         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4227         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4228 }
4229
4230 test "/usr/local" != "$prefix" && \
4231 test -d "/usr/local" && \
4232 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4233         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4234         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4235         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4236         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4237         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4238         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4239 }
4240
4241 test "/opt" != "$prefix" && \
4242 test -d "/opt" && \
4243 (test $prefix = NONE || test "/opt" != "$prefix") && {
4244         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4245         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4246         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4247         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4248         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4249         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4250 }
4251
4252 test "$HOME" != "$prefix" && \
4253 test -d "$HOME" && \
4254 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4255         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4256         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4257         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4258         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4259         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4260         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4261 }
4262
4263 cf_search="$cf_library_path_list $cf_search"
4264
4265         for cf_cv_library_path_utf8 in $cf_search
4266         do
4267           if test -d $cf_cv_library_path_utf8 ; then
4268             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4269
4270 echo "${as_me:-configure}:4270: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4271
4272             CPPFLAGS="$cf_test_CPPFLAGS"
4273             LIBS="-lutf8  $cf_save_LIBS"
4274             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4275             cat >conftest.$ac_ext <<_ACEOF
4276 #line 4276 "configure"
4277 #include "confdefs.h"
4278
4279 #include <libutf8.h>
4280 int
4281 main ()
4282 {
4283 putwc(0,0);
4284   ;
4285   return 0;
4286 }
4287 _ACEOF
4288 rm -f conftest.$ac_objext conftest$ac_exeext
4289 if { (eval echo "$as_me:4289: \"$ac_link\"") >&5
4290   (eval $ac_link) 2>&5
4291   ac_status=$?
4292   echo "$as_me:4292: \$? = $ac_status" >&5
4293   (exit $ac_status); } &&
4294          { ac_try='test -s conftest$ac_exeext'
4295   { (eval echo "$as_me:4295: \"$ac_try\"") >&5
4296   (eval $ac_try) 2>&5
4297   ac_status=$?
4298   echo "$as_me:4298: \$? = $ac_status" >&5
4299   (exit $ac_status); }; }; then
4300
4301                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4302
4303 echo "${as_me:-configure}:4303: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4304
4305                 cf_cv_find_linkage_utf8=yes
4306                 cf_cv_library_file_utf8="-lutf8"
4307                 break
4308 else
4309   echo "$as_me: failed program was:" >&5
4310 cat conftest.$ac_ext >&5
4311
4312                 CPPFLAGS="$cf_save_CPPFLAGS"
4313                 LIBS="$cf_save_LIBS"
4314                 LDFLAGS="$cf_save_LDFLAGS"
4315
4316 fi
4317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4318           fi
4319         done
4320         CPPFLAGS="$cf_save_CPPFLAGS"
4321         LDFLAGS="$cf_save_LDFLAGS"
4322       fi
4323
4324     else
4325       cf_cv_find_linkage_utf8=no
4326     fi
4327
4328 fi
4329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4330
4331 fi
4332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4333
4334 LIBS="$cf_save_LIBS"
4335
4336 if test "$cf_cv_find_linkage_utf8" = yes ; then
4337 cf_cv_utf8_lib=add-on
4338 else
4339 cf_cv_utf8_lib=no
4340 fi
4341
4342 fi
4343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4344 fi
4345 echo "$as_me:4345: result: $cf_cv_utf8_lib" >&5
4346 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4347
4348 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4349 # ncurses/ncursesw:
4350 if test "$cf_cv_utf8_lib" = "add-on" ; then
4351         cat >>confdefs.h <<\EOF
4352 #define HAVE_LIBUTF8_H 1
4353 EOF
4354
4355 if test -n "$cf_cv_header_path_utf8" ; then
4356   for cf_add_incdir in $cf_cv_header_path_utf8
4357   do
4358         while test $cf_add_incdir != /usr/include
4359         do
4360           if test -d $cf_add_incdir
4361           then
4362                 cf_have_incdir=no
4363                 if test -n "$CFLAGS$CPPFLAGS" ; then
4364                   # a loop is needed to ensure we can add subdirs of existing dirs
4365                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4366                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4367                           cf_have_incdir=yes; break
4368                         fi
4369                   done
4370                 fi
4371
4372                 if test "$cf_have_incdir" = no ; then
4373                   if test "$cf_add_incdir" = /usr/local/include ; then
4374                         if test "$GCC" = yes
4375                         then
4376                           cf_save_CPPFLAGS=$CPPFLAGS
4377                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4378                           cat >conftest.$ac_ext <<_ACEOF
4379 #line 4379 "configure"
4380 #include "confdefs.h"
4381 #include <stdio.h>
4382 int
4383 main ()
4384 {
4385 printf("Hello")
4386   ;
4387   return 0;
4388 }
4389 _ACEOF
4390 rm -f conftest.$ac_objext
4391 if { (eval echo "$as_me:4391: \"$ac_compile\"") >&5
4392   (eval $ac_compile) 2>&5
4393   ac_status=$?
4394   echo "$as_me:4394: \$? = $ac_status" >&5
4395   (exit $ac_status); } &&
4396          { ac_try='test -s conftest.$ac_objext'
4397   { (eval echo "$as_me:4397: \"$ac_try\"") >&5
4398   (eval $ac_try) 2>&5
4399   ac_status=$?
4400   echo "$as_me:4400: \$? = $ac_status" >&5
4401   (exit $ac_status); }; }; then
4402   :
4403 else
4404   echo "$as_me: failed program was:" >&5
4405 cat conftest.$ac_ext >&5
4406 cf_have_incdir=yes
4407 fi
4408 rm -f conftest.$ac_objext conftest.$ac_ext
4409                           CPPFLAGS=$cf_save_CPPFLAGS
4410                         fi
4411                   fi
4412                 fi
4413
4414                 if test "$cf_have_incdir" = no ; then
4415                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4416
4417 echo "${as_me:-configure}:4417: testing adding $cf_add_incdir to include-path ..." 1>&5
4418
4419                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4420
4421                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4422                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4423                   cf_add_incdir="$cf_top_incdir"
4424                 else
4425                   break
4426                 fi
4427           fi
4428         done
4429   done
4430 fi
4431
4432 if test -n "$cf_cv_library_path_utf8" ; then
4433   for cf_add_libdir in $cf_cv_library_path_utf8
4434   do
4435     if test $cf_add_libdir = /usr/lib ; then
4436       :
4437     elif test -d $cf_add_libdir
4438     then
4439       cf_have_libdir=no
4440       if test -n "$LDFLAGS$LIBS" ; then
4441         # a loop is needed to ensure we can add subdirs of existing dirs
4442         for cf_test_libdir in $LDFLAGS $LIBS ; do
4443           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4444             cf_have_libdir=yes; break
4445           fi
4446         done
4447       fi
4448       if test "$cf_have_libdir" = no ; then
4449         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4450
4451 echo "${as_me:-configure}:4451: testing adding $cf_add_libdir to library-path ..." 1>&5
4452
4453         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4454       fi
4455     fi
4456   done
4457 fi
4458
4459         LIBS="$cf_cv_library_file_utf8 $LIBS"
4460 fi
4461
4462 cf_ncuconfig_root=ncursesw
4463
4464 echo "Looking for ${cf_ncuconfig_root}-config"
4465 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4466 do
4467   # Extract the first word of "$ac_prog", so it can be a program name with args.
4468 set dummy $ac_prog; ac_word=$2
4469 echo "$as_me:4469: checking for $ac_word" >&5
4470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4471 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   case $NCURSES_CONFIG in
4475   [\\/]* | ?:[\\/]*)
4476   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4477   ;;
4478   *)
4479   ac_save_IFS=$IFS; IFS=$ac_path_separator
4480 ac_dummy="$PATH"
4481 for ac_dir in $ac_dummy; do
4482   IFS=$ac_save_IFS
4483   test -z "$ac_dir" && ac_dir=.
4484   if $as_executable_p "$ac_dir/$ac_word"; then
4485    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4486    echo "$as_me:4486: found $ac_dir/$ac_word" >&5
4487    break
4488 fi
4489 done
4490
4491   ;;
4492 esac
4493 fi
4494 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
4495
4496 if test -n "$NCURSES_CONFIG"; then
4497   echo "$as_me:4497: result: $NCURSES_CONFIG" >&5
4498 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4499 else
4500   echo "$as_me:4500: result: no" >&5
4501 echo "${ECHO_T}no" >&6
4502 fi
4503
4504   test -n "$NCURSES_CONFIG" && break
4505 done
4506 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4507
4508 if test "$NCURSES_CONFIG" != none ; then
4509
4510 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4511 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4512
4513 # even with config script, some packages use no-override for curses.h
4514
4515 echo "$as_me:4515: checking if we have identified curses headers" >&5
4516 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4517 if test "${cf_cv_ncurses_header+set}" = set; then
4518   echo $ECHO_N "(cached) $ECHO_C" >&6
4519 else
4520
4521 cf_cv_ncurses_header=none
4522 for cf_header in  \
4523     ncursesw/ncurses.h \
4524         ncursesw/curses.h \
4525         ncurses.h \
4526         curses.h
4527 do
4528 cat >conftest.$ac_ext <<_ACEOF
4529 #line 4529 "configure"
4530 #include "confdefs.h"
4531 #include <${cf_header}>
4532 int
4533 main ()
4534 {
4535 initscr(); tgoto("?", 0,0)
4536   ;
4537   return 0;
4538 }
4539 _ACEOF
4540 rm -f conftest.$ac_objext
4541 if { (eval echo "$as_me:4541: \"$ac_compile\"") >&5
4542   (eval $ac_compile) 2>&5
4543   ac_status=$?
4544   echo "$as_me:4544: \$? = $ac_status" >&5
4545   (exit $ac_status); } &&
4546          { ac_try='test -s conftest.$ac_objext'
4547   { (eval echo "$as_me:4547: \"$ac_try\"") >&5
4548   (eval $ac_try) 2>&5
4549   ac_status=$?
4550   echo "$as_me:4550: \$? = $ac_status" >&5
4551   (exit $ac_status); }; }; then
4552   cf_cv_ncurses_header=$cf_header; break
4553 else
4554   echo "$as_me: failed program was:" >&5
4555 cat conftest.$ac_ext >&5
4556 fi
4557 rm -f conftest.$ac_objext conftest.$ac_ext
4558 done
4559
4560 fi
4561 echo "$as_me:4561: result: $cf_cv_ncurses_header" >&5
4562 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4563
4564 if test "$cf_cv_ncurses_header" = none ; then
4565         { { echo "$as_me:4565: error: No curses header-files found" >&5
4566 echo "$as_me: error: No curses header-files found" >&2;}
4567    { (exit 1); exit 1; }; }
4568 fi
4569
4570 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4571
4572 for ac_header in $cf_cv_ncurses_header
4573 do
4574 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4575 echo "$as_me:4575: checking for $ac_header" >&5
4576 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4577 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4578   echo $ECHO_N "(cached) $ECHO_C" >&6
4579 else
4580   cat >conftest.$ac_ext <<_ACEOF
4581 #line 4581 "configure"
4582 #include "confdefs.h"
4583 #include <$ac_header>
4584 _ACEOF
4585 if { (eval echo "$as_me:4585: \"$ac_cpp conftest.$ac_ext\"") >&5
4586   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4587   ac_status=$?
4588   egrep -v '^ *\+' conftest.er1 >conftest.err
4589   rm -f conftest.er1
4590   cat conftest.err >&5
4591   echo "$as_me:4591: \$? = $ac_status" >&5
4592   (exit $ac_status); } >/dev/null; then
4593   if test -s conftest.err; then
4594     ac_cpp_err=$ac_c_preproc_warn_flag
4595   else
4596     ac_cpp_err=
4597   fi
4598 else
4599   ac_cpp_err=yes
4600 fi
4601 if test -z "$ac_cpp_err"; then
4602   eval "$as_ac_Header=yes"
4603 else
4604   echo "$as_me: failed program was:" >&5
4605   cat conftest.$ac_ext >&5
4606   eval "$as_ac_Header=no"
4607 fi
4608 rm -f conftest.err conftest.$ac_ext
4609 fi
4610 echo "$as_me:4610: result: `eval echo '${'$as_ac_Header'}'`" >&5
4611 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4612 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4613   cat >>confdefs.h <<EOF
4614 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4615 EOF
4616
4617 fi
4618 done
4619
4620 cat >>confdefs.h <<\EOF
4621 #define NCURSES 1
4622 EOF
4623
4624 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4625
4626 cat >>confdefs.h <<EOF
4627 #define $cf_nculib_ROOT 1
4628 EOF
4629
4630 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4631
4632 else
4633
4634 cf_ncuhdr_root=ncursesw
4635
4636 test -n "$cf_cv_curses_dir" && \
4637 test "$cf_cv_curses_dir" != "no" && { \
4638
4639 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4640   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4641   do
4642         while test $cf_add_incdir != /usr/include
4643         do
4644           if test -d $cf_add_incdir
4645           then
4646                 cf_have_incdir=no
4647                 if test -n "$CFLAGS$CPPFLAGS" ; then
4648                   # a loop is needed to ensure we can add subdirs of existing dirs
4649                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4650                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4651                           cf_have_incdir=yes; break
4652                         fi
4653                   done
4654                 fi
4655
4656                 if test "$cf_have_incdir" = no ; then
4657                   if test "$cf_add_incdir" = /usr/local/include ; then
4658                         if test "$GCC" = yes
4659                         then
4660                           cf_save_CPPFLAGS=$CPPFLAGS
4661                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4662                           cat >conftest.$ac_ext <<_ACEOF
4663 #line 4663 "configure"
4664 #include "confdefs.h"
4665 #include <stdio.h>
4666 int
4667 main ()
4668 {
4669 printf("Hello")
4670   ;
4671   return 0;
4672 }
4673 _ACEOF
4674 rm -f conftest.$ac_objext
4675 if { (eval echo "$as_me:4675: \"$ac_compile\"") >&5
4676   (eval $ac_compile) 2>&5
4677   ac_status=$?
4678   echo "$as_me:4678: \$? = $ac_status" >&5
4679   (exit $ac_status); } &&
4680          { ac_try='test -s conftest.$ac_objext'
4681   { (eval echo "$as_me:4681: \"$ac_try\"") >&5
4682   (eval $ac_try) 2>&5
4683   ac_status=$?
4684   echo "$as_me:4684: \$? = $ac_status" >&5
4685   (exit $ac_status); }; }; then
4686   :
4687 else
4688   echo "$as_me: failed program was:" >&5
4689 cat conftest.$ac_ext >&5
4690 cf_have_incdir=yes
4691 fi
4692 rm -f conftest.$ac_objext conftest.$ac_ext
4693                           CPPFLAGS=$cf_save_CPPFLAGS
4694                         fi
4695                   fi
4696                 fi
4697
4698                 if test "$cf_have_incdir" = no ; then
4699                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4700
4701 echo "${as_me:-configure}:4701: testing adding $cf_add_incdir to include-path ..." 1>&5
4702
4703                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4704
4705                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4706                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4707                   cf_add_incdir="$cf_top_incdir"
4708                 else
4709                   break
4710                 fi
4711           fi
4712         done
4713   done
4714 fi
4715
4716 }
4717
4718 echo "$as_me:4718: checking for $cf_ncuhdr_root header in include-path" >&5
4719 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4720 if test "${cf_cv_ncurses_h+set}" = set; then
4721   echo $ECHO_N "(cached) $ECHO_C" >&6
4722 else
4723
4724         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4725         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4726         for cf_header in $cf_header_list
4727         do
4728
4729         cat >conftest.$ac_ext <<_ACEOF
4730 #line 4730 "configure"
4731 #include "confdefs.h"
4732
4733 #define _XOPEN_SOURCE_EXTENDED
4734 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4735 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4736
4737 #include <$cf_header>
4738 int
4739 main ()
4740 {
4741
4742 #ifdef NCURSES_VERSION
4743
4744 #ifndef WACS_BSSB
4745         make an error
4746 #endif
4747
4748 printf("%s\n", NCURSES_VERSION);
4749 #else
4750 #ifdef __NCURSES_H
4751 printf("old\n");
4752 #else
4753         make an error
4754 #endif
4755 #endif
4756
4757   ;
4758   return 0;
4759 }
4760 _ACEOF
4761 rm -f conftest.$ac_objext
4762 if { (eval echo "$as_me:4762: \"$ac_compile\"") >&5
4763   (eval $ac_compile) 2>&5
4764   ac_status=$?
4765   echo "$as_me:4765: \$? = $ac_status" >&5
4766   (exit $ac_status); } &&
4767          { ac_try='test -s conftest.$ac_objext'
4768   { (eval echo "$as_me:4768: \"$ac_try\"") >&5
4769   (eval $ac_try) 2>&5
4770   ac_status=$?
4771   echo "$as_me:4771: \$? = $ac_status" >&5
4772   (exit $ac_status); }; }; then
4773   cf_cv_ncurses_h=$cf_header
4774
4775 else
4776   echo "$as_me: failed program was:" >&5
4777 cat conftest.$ac_ext >&5
4778 cf_cv_ncurses_h=no
4779 fi
4780 rm -f conftest.$ac_objext conftest.$ac_ext
4781
4782                 test "$cf_cv_ncurses_h" != no && break
4783         done
4784
4785 fi
4786 echo "$as_me:4786: result: $cf_cv_ncurses_h" >&5
4787 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4788
4789 if test "$cf_cv_ncurses_h" != no ; then
4790         cf_cv_ncurses_header=$cf_cv_ncurses_h
4791 else
4792
4793 echo "$as_me:4793: checking for $cf_ncuhdr_root include-path" >&5
4794 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4795 if test "${cf_cv_ncurses_h2+set}" = set; then
4796   echo $ECHO_N "(cached) $ECHO_C" >&6
4797 else
4798
4799         test -n "$verbose" && echo
4800
4801 cf_search=
4802
4803 # collect the current set of include-directories from compiler flags
4804 cf_header_path_list=""
4805 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4806         for cf_header_path in $CPPFLAGS $CFLAGS
4807         do
4808                 case $cf_header_path in #(vi
4809                 -I*)
4810                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4811
4812 test "$cf_header_path" != "NONE" && \
4813 test -d "$cf_header_path" && \
4814  {
4815         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4816         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4817         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4818         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4819         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4820         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"
4821 }
4822
4823                         cf_header_path_list="$cf_header_path_list $cf_search"
4824                         ;;
4825                 esac
4826         done
4827 fi
4828
4829 # add the variations for the package we are looking for
4830
4831 cf_search=
4832
4833 test "/usr" != "$prefix" && \
4834 test -d "/usr" && \
4835 (test $prefix = NONE || test "/usr" != "$prefix") && {
4836         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4837         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4838         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4839         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4840         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4841         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4842 }
4843
4844 test "$prefix" != "NONE" && \
4845 test -d "$prefix" && \
4846  {
4847         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4848         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4849         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4850         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4851         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4852         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4853 }
4854
4855 test "/usr/local" != "$prefix" && \
4856 test -d "/usr/local" && \
4857 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4858         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4859         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4860         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4861         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4862         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4863         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4864 }
4865
4866 test "/opt" != "$prefix" && \
4867 test -d "/opt" && \
4868 (test $prefix = NONE || test "/opt" != "$prefix") && {
4869         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4870         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4871         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4872         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4873         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4874         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4875 }
4876
4877 test "$HOME" != "$prefix" && \
4878 test -d "$HOME" && \
4879 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4880         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4881         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4882         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4883         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4884         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4885         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4886 }
4887
4888 test "$includedir" != NONE && \
4889 test "$includedir" != "/usr/include" && \
4890 test -d "$includedir" && {
4891         test -d $includedir &&    cf_search="$cf_search $includedir"
4892         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4893 }
4894
4895 test "$oldincludedir" != NONE && \
4896 test "$oldincludedir" != "/usr/include" && \
4897 test -d "$oldincludedir" && {
4898         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4899         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4900 }
4901
4902 cf_search="$cf_search $cf_header_path_list"
4903
4904         test -n "$verbose" && echo search path $cf_search
4905         cf_save2_CPPFLAGS="$CPPFLAGS"
4906         for cf_incdir in $cf_search
4907         do
4908
4909 if test -n "$cf_incdir" ; then
4910   for cf_add_incdir in $cf_incdir
4911   do
4912         while test $cf_add_incdir != /usr/include
4913         do
4914           if test -d $cf_add_incdir
4915           then
4916                 cf_have_incdir=no
4917                 if test -n "$CFLAGS$CPPFLAGS" ; then
4918                   # a loop is needed to ensure we can add subdirs of existing dirs
4919                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4920                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4921                           cf_have_incdir=yes; break
4922                         fi
4923                   done
4924                 fi
4925
4926                 if test "$cf_have_incdir" = no ; then
4927                   if test "$cf_add_incdir" = /usr/local/include ; then
4928                         if test "$GCC" = yes
4929                         then
4930                           cf_save_CPPFLAGS=$CPPFLAGS
4931                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4932                           cat >conftest.$ac_ext <<_ACEOF
4933 #line 4933 "configure"
4934 #include "confdefs.h"
4935 #include <stdio.h>
4936 int
4937 main ()
4938 {
4939 printf("Hello")
4940   ;
4941   return 0;
4942 }
4943 _ACEOF
4944 rm -f conftest.$ac_objext
4945 if { (eval echo "$as_me:4945: \"$ac_compile\"") >&5
4946   (eval $ac_compile) 2>&5
4947   ac_status=$?
4948   echo "$as_me:4948: \$? = $ac_status" >&5
4949   (exit $ac_status); } &&
4950          { ac_try='test -s conftest.$ac_objext'
4951   { (eval echo "$as_me:4951: \"$ac_try\"") >&5
4952   (eval $ac_try) 2>&5
4953   ac_status=$?
4954   echo "$as_me:4954: \$? = $ac_status" >&5
4955   (exit $ac_status); }; }; then
4956   :
4957 else
4958   echo "$as_me: failed program was:" >&5
4959 cat conftest.$ac_ext >&5
4960 cf_have_incdir=yes
4961 fi
4962 rm -f conftest.$ac_objext conftest.$ac_ext
4963                           CPPFLAGS=$cf_save_CPPFLAGS
4964                         fi
4965                   fi
4966                 fi
4967
4968                 if test "$cf_have_incdir" = no ; then
4969                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4970
4971 echo "${as_me:-configure}:4971: testing adding $cf_add_incdir to include-path ..." 1>&5
4972
4973                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4974
4975                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4976                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4977                   cf_add_incdir="$cf_top_incdir"
4978                 else
4979                   break
4980                 fi
4981           fi
4982         done
4983   done
4984 fi
4985
4986                 for cf_header in \
4987                         ncurses.h \
4988                         curses.h
4989                 do
4990
4991         cat >conftest.$ac_ext <<_ACEOF
4992 #line 4992 "configure"
4993 #include "confdefs.h"
4994
4995 #include <$cf_header>
4996 int
4997 main ()
4998 {
4999
5000 #ifdef NCURSES_VERSION
5001
5002 printf("%s\n", NCURSES_VERSION);
5003 #else
5004 #ifdef __NCURSES_H
5005 printf("old\n");
5006 #else
5007         make an error
5008 #endif
5009 #endif
5010
5011   ;
5012   return 0;
5013 }
5014 _ACEOF
5015 rm -f conftest.$ac_objext
5016 if { (eval echo "$as_me:5016: \"$ac_compile\"") >&5
5017   (eval $ac_compile) 2>&5
5018   ac_status=$?
5019   echo "$as_me:5019: \$? = $ac_status" >&5
5020   (exit $ac_status); } &&
5021          { ac_try='test -s conftest.$ac_objext'
5022   { (eval echo "$as_me:5022: \"$ac_try\"") >&5
5023   (eval $ac_try) 2>&5
5024   ac_status=$?
5025   echo "$as_me:5025: \$? = $ac_status" >&5
5026   (exit $ac_status); }; }; then
5027   cf_cv_ncurses_h2=$cf_header
5028
5029 else
5030   echo "$as_me: failed program was:" >&5
5031 cat conftest.$ac_ext >&5
5032 cf_cv_ncurses_h2=no
5033 fi
5034 rm -f conftest.$ac_objext conftest.$ac_ext
5035
5036                         if test "$cf_cv_ncurses_h2" != no ; then
5037                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5038                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
5039                                 break
5040                         fi
5041                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
5042                 done
5043                 CPPFLAGS="$cf_save2_CPPFLAGS"
5044                 test "$cf_cv_ncurses_h2" != no && break
5045         done
5046         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5046: error: not found" >&5
5047 echo "$as_me: error: not found" >&2;}
5048    { (exit 1); exit 1; }; }
5049
5050 fi
5051 echo "$as_me:5051: result: $cf_cv_ncurses_h2" >&5
5052 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5053
5054         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5055         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5056         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5057                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5058         fi
5059
5060 if test -n "$cf_1st_incdir" ; then
5061   for cf_add_incdir in $cf_1st_incdir
5062   do
5063         while test $cf_add_incdir != /usr/include
5064         do
5065           if test -d $cf_add_incdir
5066           then
5067                 cf_have_incdir=no
5068                 if test -n "$CFLAGS$CPPFLAGS" ; then
5069                   # a loop is needed to ensure we can add subdirs of existing dirs
5070                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5071                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5072                           cf_have_incdir=yes; break
5073                         fi
5074                   done
5075                 fi
5076
5077                 if test "$cf_have_incdir" = no ; then
5078                   if test "$cf_add_incdir" = /usr/local/include ; then
5079                         if test "$GCC" = yes
5080                         then
5081                           cf_save_CPPFLAGS=$CPPFLAGS
5082                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5083                           cat >conftest.$ac_ext <<_ACEOF
5084 #line 5084 "configure"
5085 #include "confdefs.h"
5086 #include <stdio.h>
5087 int
5088 main ()
5089 {
5090 printf("Hello")
5091   ;
5092   return 0;
5093 }
5094 _ACEOF
5095 rm -f conftest.$ac_objext
5096 if { (eval echo "$as_me:5096: \"$ac_compile\"") >&5
5097   (eval $ac_compile) 2>&5
5098   ac_status=$?
5099   echo "$as_me:5099: \$? = $ac_status" >&5
5100   (exit $ac_status); } &&
5101          { ac_try='test -s conftest.$ac_objext'
5102   { (eval echo "$as_me:5102: \"$ac_try\"") >&5
5103   (eval $ac_try) 2>&5
5104   ac_status=$?
5105   echo "$as_me:5105: \$? = $ac_status" >&5
5106   (exit $ac_status); }; }; then
5107   :
5108 else
5109   echo "$as_me: failed program was:" >&5
5110 cat conftest.$ac_ext >&5
5111 cf_have_incdir=yes
5112 fi
5113 rm -f conftest.$ac_objext conftest.$ac_ext
5114                           CPPFLAGS=$cf_save_CPPFLAGS
5115                         fi
5116                   fi
5117                 fi
5118
5119                 if test "$cf_have_incdir" = no ; then
5120                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5121
5122 echo "${as_me:-configure}:5122: testing adding $cf_add_incdir to include-path ..." 1>&5
5123
5124                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5125
5126                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5127                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5128                   cf_add_incdir="$cf_top_incdir"
5129                 else
5130                   break
5131                 fi
5132           fi
5133         done
5134   done
5135 fi
5136
5137 fi
5138
5139 # Set definitions to allow ifdef'ing for ncurses.h
5140
5141 case $cf_cv_ncurses_header in # (vi
5142 *ncurses.h)
5143         cat >>confdefs.h <<\EOF
5144 #define HAVE_NCURSES_H 1
5145 EOF
5146
5147         ;;
5148 esac
5149
5150 case $cf_cv_ncurses_header in # (vi
5151 ncurses/curses.h|ncurses/ncurses.h)
5152         cat >>confdefs.h <<\EOF
5153 #define HAVE_NCURSES_NCURSES_H 1
5154 EOF
5155
5156         ;;
5157 ncursesw/curses.h|ncursesw/ncurses.h)
5158         cat >>confdefs.h <<\EOF
5159 #define HAVE_NCURSESW_NCURSES_H 1
5160 EOF
5161
5162         ;;
5163 esac
5164
5165 echo "$as_me:5165: checking for terminfo header" >&5
5166 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5167 if test "${cf_cv_term_header+set}" = set; then
5168   echo $ECHO_N "(cached) $ECHO_C" >&6
5169 else
5170
5171 case ${cf_cv_ncurses_header} in #(vi
5172 */ncurses.h|*/ncursesw.h) #(vi
5173         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5174         ;;
5175 *)
5176         cf_term_header=term.h
5177         ;;
5178 esac
5179
5180 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5181 do
5182 cat >conftest.$ac_ext <<_ACEOF
5183 #line 5183 "configure"
5184 #include "confdefs.h"
5185 #include <stdio.h>
5186 #include <${cf_cv_ncurses_header:-curses.h}>
5187 #include <$cf_test>
5188
5189 int
5190 main ()
5191 {
5192 int x = auto_left_margin
5193   ;
5194   return 0;
5195 }
5196 _ACEOF
5197 rm -f conftest.$ac_objext
5198 if { (eval echo "$as_me:5198: \"$ac_compile\"") >&5
5199   (eval $ac_compile) 2>&5
5200   ac_status=$?
5201   echo "$as_me:5201: \$? = $ac_status" >&5
5202   (exit $ac_status); } &&
5203          { ac_try='test -s conftest.$ac_objext'
5204   { (eval echo "$as_me:5204: \"$ac_try\"") >&5
5205   (eval $ac_try) 2>&5
5206   ac_status=$?
5207   echo "$as_me:5207: \$? = $ac_status" >&5
5208   (exit $ac_status); }; }; then
5209
5210         cf_cv_term_header="$cf_test"
5211 else
5212   echo "$as_me: failed program was:" >&5
5213 cat conftest.$ac_ext >&5
5214
5215         cf_cv_term_header=unknown
5216
5217 fi
5218 rm -f conftest.$ac_objext conftest.$ac_ext
5219         test "$cf_cv_term_header" != unknown && break
5220 done
5221
5222 fi
5223 echo "$as_me:5223: result: $cf_cv_term_header" >&5
5224 echo "${ECHO_T}$cf_cv_term_header" >&6
5225
5226 # Set definitions to allow ifdef'ing to accommodate subdirectories
5227
5228 case $cf_cv_term_header in # (vi
5229 *term.h)
5230         cat >>confdefs.h <<\EOF
5231 #define HAVE_TERM_H 1
5232 EOF
5233
5234         ;;
5235 esac
5236
5237 case $cf_cv_term_header in # (vi
5238 ncurses/term.h) #(vi
5239         cat >>confdefs.h <<\EOF
5240 #define HAVE_NCURSES_TERM_H 1
5241 EOF
5242
5243         ;;
5244 ncursesw/term.h)
5245         cat >>confdefs.h <<\EOF
5246 #define HAVE_NCURSESW_TERM_H 1
5247 EOF
5248
5249         ;;
5250 esac
5251
5252 # some applications need this, but should check for NCURSES_VERSION
5253 cat >>confdefs.h <<\EOF
5254 #define NCURSES 1
5255 EOF
5256
5257 echo "$as_me:5257: checking for ncurses version" >&5
5258 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5259 if test "${cf_cv_ncurses_version+set}" = set; then
5260   echo $ECHO_N "(cached) $ECHO_C" >&6
5261 else
5262
5263         cf_cv_ncurses_version=no
5264         cf_tempfile=out$$
5265         rm -f $cf_tempfile
5266         if test "$cross_compiling" = yes; then
5267
5268         # This will not work if the preprocessor splits the line after the
5269         # Autoconf token.  The 'unproto' program does that.
5270         cat > conftest.$ac_ext <<EOF
5271 #include <${cf_cv_ncurses_header:-curses.h}>
5272 #undef Autoconf
5273 #ifdef NCURSES_VERSION
5274 Autoconf NCURSES_VERSION
5275 #else
5276 #ifdef __NCURSES_H
5277 Autoconf "old"
5278 #endif
5279 ;
5280 #endif
5281 EOF
5282         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5283         { (eval echo "$as_me:5283: \"$cf_try\"") >&5
5284   (eval $cf_try) 2>&5
5285   ac_status=$?
5286   echo "$as_me:5286: \$? = $ac_status" >&5
5287   (exit $ac_status); }
5288         if test -f conftest.out ; then
5289                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5290                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5291                 rm -f conftest.out
5292         fi
5293
5294 else
5295   cat >conftest.$ac_ext <<_ACEOF
5296 #line 5296 "configure"
5297 #include "confdefs.h"
5298
5299 #include <${cf_cv_ncurses_header:-curses.h}>
5300 #include <stdio.h>
5301 int main()
5302 {
5303         FILE *fp = fopen("$cf_tempfile", "w");
5304 #ifdef NCURSES_VERSION
5305 # ifdef NCURSES_VERSION_PATCH
5306         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5307 # else
5308         fprintf(fp, "%s\n", NCURSES_VERSION);
5309 # endif
5310 #else
5311 # ifdef __NCURSES_H
5312         fprintf(fp, "old\n");
5313 # else
5314         make an error
5315 # endif
5316 #endif
5317         ${cf_cv_main_return:-return}(0);
5318 }
5319 _ACEOF
5320 rm -f conftest$ac_exeext
5321 if { (eval echo "$as_me:5321: \"$ac_link\"") >&5
5322   (eval $ac_link) 2>&5
5323   ac_status=$?
5324   echo "$as_me:5324: \$? = $ac_status" >&5
5325   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5326   { (eval echo "$as_me:5326: \"$ac_try\"") >&5
5327   (eval $ac_try) 2>&5
5328   ac_status=$?
5329   echo "$as_me:5329: \$? = $ac_status" >&5
5330   (exit $ac_status); }; }; then
5331
5332         cf_cv_ncurses_version=`cat $cf_tempfile`
5333 else
5334   echo "$as_me: program exited with status $ac_status" >&5
5335 echo "$as_me: failed program was:" >&5
5336 cat conftest.$ac_ext >&5
5337 fi
5338 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5339 fi
5340         rm -f $cf_tempfile
5341
5342 fi
5343 echo "$as_me:5343: result: $cf_cv_ncurses_version" >&5
5344 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5345 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5346 #define NCURSES 1
5347 EOF
5348
5349 cf_nculib_root=ncursesw
5350         # This works, except for the special case where we find gpm, but
5351         # ncurses is in a nonstandard location via $LIBS, and we really want
5352         # to link gpm.
5353 cf_ncurses_LIBS=""
5354 cf_ncurses_SAVE="$LIBS"
5355 echo "$as_me:5355: checking for Gpm_Open in -lgpm" >&5
5356 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5357 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5358   echo $ECHO_N "(cached) $ECHO_C" >&6
5359 else
5360   ac_check_lib_save_LIBS=$LIBS
5361 LIBS="-lgpm  $LIBS"
5362 cat >conftest.$ac_ext <<_ACEOF
5363 #line 5363 "configure"
5364 #include "confdefs.h"
5365
5366 /* Override any gcc2 internal prototype to avoid an error.  */
5367 #ifdef __cplusplus
5368 extern "C"
5369 #endif
5370 /* We use char because int might match the return type of a gcc2
5371    builtin and then its argument prototype would still apply.  */
5372 char Gpm_Open ();
5373 int
5374 main ()
5375 {
5376 Gpm_Open ();
5377   ;
5378   return 0;
5379 }
5380 _ACEOF
5381 rm -f conftest.$ac_objext conftest$ac_exeext
5382 if { (eval echo "$as_me:5382: \"$ac_link\"") >&5
5383   (eval $ac_link) 2>&5
5384   ac_status=$?
5385   echo "$as_me:5385: \$? = $ac_status" >&5
5386   (exit $ac_status); } &&
5387          { ac_try='test -s conftest$ac_exeext'
5388   { (eval echo "$as_me:5388: \"$ac_try\"") >&5
5389   (eval $ac_try) 2>&5
5390   ac_status=$?
5391   echo "$as_me:5391: \$? = $ac_status" >&5
5392   (exit $ac_status); }; }; then
5393   ac_cv_lib_gpm_Gpm_Open=yes
5394 else
5395   echo "$as_me: failed program was:" >&5
5396 cat conftest.$ac_ext >&5
5397 ac_cv_lib_gpm_Gpm_Open=no
5398 fi
5399 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5400 LIBS=$ac_check_lib_save_LIBS
5401 fi
5402 echo "$as_me:5402: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5403 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5404 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5405   echo "$as_me:5405: checking for initscr in -lgpm" >&5
5406 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5407 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5408   echo $ECHO_N "(cached) $ECHO_C" >&6
5409 else
5410   ac_check_lib_save_LIBS=$LIBS
5411 LIBS="-lgpm  $LIBS"
5412 cat >conftest.$ac_ext <<_ACEOF
5413 #line 5413 "configure"
5414 #include "confdefs.h"
5415
5416 /* Override any gcc2 internal prototype to avoid an error.  */
5417 #ifdef __cplusplus
5418 extern "C"
5419 #endif
5420 /* We use char because int might match the return type of a gcc2
5421    builtin and then its argument prototype would still apply.  */
5422 char initscr ();
5423 int
5424 main ()
5425 {
5426 initscr ();
5427   ;
5428   return 0;
5429 }
5430 _ACEOF
5431 rm -f conftest.$ac_objext conftest$ac_exeext
5432 if { (eval echo "$as_me:5432: \"$ac_link\"") >&5
5433   (eval $ac_link) 2>&5
5434   ac_status=$?
5435   echo "$as_me:5435: \$? = $ac_status" >&5
5436   (exit $ac_status); } &&
5437          { ac_try='test -s conftest$ac_exeext'
5438   { (eval echo "$as_me:5438: \"$ac_try\"") >&5
5439   (eval $ac_try) 2>&5
5440   ac_status=$?
5441   echo "$as_me:5441: \$? = $ac_status" >&5
5442   (exit $ac_status); }; }; then
5443   ac_cv_lib_gpm_initscr=yes
5444 else
5445   echo "$as_me: failed program was:" >&5
5446 cat conftest.$ac_ext >&5
5447 ac_cv_lib_gpm_initscr=no
5448 fi
5449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5450 LIBS=$ac_check_lib_save_LIBS
5451 fi
5452 echo "$as_me:5452: result: $ac_cv_lib_gpm_initscr" >&5
5453 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5454 if test $ac_cv_lib_gpm_initscr = yes; then
5455   LIBS="$cf_ncurses_SAVE"
5456 else
5457   cf_ncurses_LIBS="-lgpm"
5458 fi
5459
5460 fi
5461
5462 case $host_os in #(vi
5463 freebsd*)
5464         # This is only necessary if you are linking against an obsolete
5465         # version of ncurses (but it should do no harm, since it's static).
5466         if test "$cf_nculib_root" = ncurses ; then
5467                 echo "$as_me:5467: checking for tgoto in -lmytinfo" >&5
5468 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5469 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5470   echo $ECHO_N "(cached) $ECHO_C" >&6
5471 else
5472   ac_check_lib_save_LIBS=$LIBS
5473 LIBS="-lmytinfo  $LIBS"
5474 cat >conftest.$ac_ext <<_ACEOF
5475 #line 5475 "configure"
5476 #include "confdefs.h"
5477
5478 /* Override any gcc2 internal prototype to avoid an error.  */
5479 #ifdef __cplusplus
5480 extern "C"
5481 #endif
5482 /* We use char because int might match the return type of a gcc2
5483    builtin and then its argument prototype would still apply.  */
5484 char tgoto ();
5485 int
5486 main ()
5487 {
5488 tgoto ();
5489   ;
5490   return 0;
5491 }
5492 _ACEOF
5493 rm -f conftest.$ac_objext conftest$ac_exeext
5494 if { (eval echo "$as_me:5494: \"$ac_link\"") >&5
5495   (eval $ac_link) 2>&5
5496   ac_status=$?
5497   echo "$as_me:5497: \$? = $ac_status" >&5
5498   (exit $ac_status); } &&
5499          { ac_try='test -s conftest$ac_exeext'
5500   { (eval echo "$as_me:5500: \"$ac_try\"") >&5
5501   (eval $ac_try) 2>&5
5502   ac_status=$?
5503   echo "$as_me:5503: \$? = $ac_status" >&5
5504   (exit $ac_status); }; }; then
5505   ac_cv_lib_mytinfo_tgoto=yes
5506 else
5507   echo "$as_me: failed program was:" >&5
5508 cat conftest.$ac_ext >&5
5509 ac_cv_lib_mytinfo_tgoto=no
5510 fi
5511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5512 LIBS=$ac_check_lib_save_LIBS
5513 fi
5514 echo "$as_me:5514: result: $ac_cv_lib_mytinfo_tgoto" >&5
5515 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5516 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5517   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5518 fi
5519
5520         fi
5521         ;;
5522 esac
5523
5524 LIBS="$cf_ncurses_LIBS $LIBS"
5525
5526 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5527 then
5528         LIBS="-l$cf_nculib_root $LIBS"
5529 else
5530
5531         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5532         cf_libdir=""
5533         echo "$as_me:5533: checking for initscr" >&5
5534 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5535 if test "${ac_cv_func_initscr+set}" = set; then
5536   echo $ECHO_N "(cached) $ECHO_C" >&6
5537 else
5538   cat >conftest.$ac_ext <<_ACEOF
5539 #line 5539 "configure"
5540 #include "confdefs.h"
5541 /* System header to define __stub macros and hopefully few prototypes,
5542     which can conflict with char initscr (); below.  */
5543 #include <assert.h>
5544 /* Override any gcc2 internal prototype to avoid an error.  */
5545 #ifdef __cplusplus
5546 extern "C"
5547 #endif
5548 /* We use char because int might match the return type of a gcc2
5549    builtin and then its argument prototype would still apply.  */
5550 char initscr ();
5551 char (*f) ();
5552
5553 int
5554 main ()
5555 {
5556 /* The GNU C library defines this for functions which it implements
5557     to always fail with ENOSYS.  Some functions are actually named
5558     something starting with __ and the normal name is an alias.  */
5559 #if defined (__stub_initscr) || defined (__stub___initscr)
5560 choke me
5561 #else
5562 f = initscr;
5563 #endif
5564
5565   ;
5566   return 0;
5567 }
5568 _ACEOF
5569 rm -f conftest.$ac_objext conftest$ac_exeext
5570 if { (eval echo "$as_me:5570: \"$ac_link\"") >&5
5571   (eval $ac_link) 2>&5
5572   ac_status=$?
5573   echo "$as_me:5573: \$? = $ac_status" >&5
5574   (exit $ac_status); } &&
5575          { ac_try='test -s conftest$ac_exeext'
5576   { (eval echo "$as_me:5576: \"$ac_try\"") >&5
5577   (eval $ac_try) 2>&5
5578   ac_status=$?
5579   echo "$as_me:5579: \$? = $ac_status" >&5
5580   (exit $ac_status); }; }; then
5581   ac_cv_func_initscr=yes
5582 else
5583   echo "$as_me: failed program was:" >&5
5584 cat conftest.$ac_ext >&5
5585 ac_cv_func_initscr=no
5586 fi
5587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5588 fi
5589 echo "$as_me:5589: result: $ac_cv_func_initscr" >&5
5590 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5591 if test $ac_cv_func_initscr = yes; then
5592   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5593 else
5594
5595                 cf_save_LIBS="$LIBS"
5596                 echo "$as_me:5596: checking for initscr in -l$cf_nculib_root" >&5
5597 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5598                 LIBS="-l$cf_nculib_root $LIBS"
5599                 cat >conftest.$ac_ext <<_ACEOF
5600 #line 5600 "configure"
5601 #include "confdefs.h"
5602 #include <${cf_cv_ncurses_header:-curses.h}>
5603 int
5604 main ()
5605 {
5606 initscr()
5607   ;
5608   return 0;
5609 }
5610 _ACEOF
5611 rm -f conftest.$ac_objext conftest$ac_exeext
5612 if { (eval echo "$as_me:5612: \"$ac_link\"") >&5
5613   (eval $ac_link) 2>&5
5614   ac_status=$?
5615   echo "$as_me:5615: \$? = $ac_status" >&5
5616   (exit $ac_status); } &&
5617          { ac_try='test -s conftest$ac_exeext'
5618   { (eval echo "$as_me:5618: \"$ac_try\"") >&5
5619   (eval $ac_try) 2>&5
5620   ac_status=$?
5621   echo "$as_me:5621: \$? = $ac_status" >&5
5622   (exit $ac_status); }; }; then
5623   echo "$as_me:5623: result: yes" >&5
5624 echo "${ECHO_T}yes" >&6
5625                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5626
5627 else
5628   echo "$as_me: failed program was:" >&5
5629 cat conftest.$ac_ext >&5
5630 echo "$as_me:5630: result: no" >&5
5631 echo "${ECHO_T}no" >&6
5632
5633 cf_search=
5634 cf_library_path_list=""
5635 if test -n "${LDFLAGS}${LIBS}" ; then
5636         for cf_library_path in $LDFLAGS $LIBS
5637         do
5638                 case $cf_library_path in #(vi
5639                 -L*)
5640                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5641
5642 test "$cf_library_path" != "NONE" && \
5643 test -d "$cf_library_path" && \
5644  {
5645         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5646         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5647         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5648         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5649         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5650         test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
5651 }
5652
5653                         cf_library_path_list="$cf_library_path_list $cf_search"
5654                         ;;
5655                 esac
5656         done
5657 fi
5658
5659 cf_search=
5660
5661 test "/usr" != "$prefix" && \
5662 test -d "/usr" && \
5663 (test $prefix = NONE || test "/usr" != "$prefix") && {
5664         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5665         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5666         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5667         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5668         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5669         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5670 }
5671
5672 test "$prefix" != "NONE" && \
5673 test -d "$prefix" && \
5674  {
5675         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5676         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5677         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5678         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5679         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5680         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5681 }
5682
5683 test "/usr/local" != "$prefix" && \
5684 test -d "/usr/local" && \
5685 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5686         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5687         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5688         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5689         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5690         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5691         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5692 }
5693
5694 test "/opt" != "$prefix" && \
5695 test -d "/opt" && \
5696 (test $prefix = NONE || test "/opt" != "$prefix") && {
5697         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5698         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5699         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5700         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5701         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5702         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5703 }
5704
5705 test "$HOME" != "$prefix" && \
5706 test -d "$HOME" && \
5707 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5708         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5709         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5710         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5711         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5712         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5713         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5714 }
5715
5716 cf_search="$cf_library_path_list $cf_search"
5717
5718                         for cf_libdir in $cf_search
5719                         do
5720                                 echo "$as_me:5720: checking for -l$cf_nculib_root in $cf_libdir" >&5
5721 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5722                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5723                                 cat >conftest.$ac_ext <<_ACEOF
5724 #line 5724 "configure"
5725 #include "confdefs.h"
5726 #include <${cf_cv_ncurses_header:-curses.h}>
5727 int
5728 main ()
5729 {
5730 initscr()
5731   ;
5732   return 0;
5733 }
5734 _ACEOF
5735 rm -f conftest.$ac_objext conftest$ac_exeext
5736 if { (eval echo "$as_me:5736: \"$ac_link\"") >&5
5737   (eval $ac_link) 2>&5
5738   ac_status=$?
5739   echo "$as_me:5739: \$? = $ac_status" >&5
5740   (exit $ac_status); } &&
5741          { ac_try='test -s conftest$ac_exeext'
5742   { (eval echo "$as_me:5742: \"$ac_try\"") >&5
5743   (eval $ac_try) 2>&5
5744   ac_status=$?
5745   echo "$as_me:5745: \$? = $ac_status" >&5
5746   (exit $ac_status); }; }; then
5747   echo "$as_me:5747: result: yes" >&5
5748 echo "${ECHO_T}yes" >&6
5749                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5750                                          break
5751 else
5752   echo "$as_me: failed program was:" >&5
5753 cat conftest.$ac_ext >&5
5754 echo "$as_me:5754: result: no" >&5
5755 echo "${ECHO_T}no" >&6
5756                                          LIBS="$cf_save_LIBS"
5757 fi
5758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5759                         done
5760
5761 fi
5762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5763
5764 fi
5765
5766 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5767
5768 if test $cf_found_library = no ; then
5769         { { echo "$as_me:5769: error: Cannot link $cf_nculib_root library" >&5
5770 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5771    { (exit 1); exit 1; }; }
5772 fi
5773
5774 fi
5775
5776 if test -n "$cf_ncurses_LIBS" ; then
5777         echo "$as_me:5777: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5778 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5779         cf_ncurses_SAVE="$LIBS"
5780         for p in $cf_ncurses_LIBS ; do
5781                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5782                 if test "$q" != "$LIBS" ; then
5783                         LIBS="$q"
5784                 fi
5785         done
5786         cat >conftest.$ac_ext <<_ACEOF
5787 #line 5787 "configure"
5788 #include "confdefs.h"
5789 #include <${cf_cv_ncurses_header:-curses.h}>
5790 int
5791 main ()
5792 {
5793 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5794   ;
5795   return 0;
5796 }
5797 _ACEOF
5798 rm -f conftest.$ac_objext conftest$ac_exeext
5799 if { (eval echo "$as_me:5799: \"$ac_link\"") >&5
5800   (eval $ac_link) 2>&5
5801   ac_status=$?
5802   echo "$as_me:5802: \$? = $ac_status" >&5
5803   (exit $ac_status); } &&
5804          { ac_try='test -s conftest$ac_exeext'
5805   { (eval echo "$as_me:5805: \"$ac_try\"") >&5
5806   (eval $ac_try) 2>&5
5807   ac_status=$?
5808   echo "$as_me:5808: \$? = $ac_status" >&5
5809   (exit $ac_status); }; }; then
5810   echo "$as_me:5810: result: yes" >&5
5811 echo "${ECHO_T}yes" >&6
5812 else
5813   echo "$as_me: failed program was:" >&5
5814 cat conftest.$ac_ext >&5
5815 echo "$as_me:5815: result: no" >&5
5816 echo "${ECHO_T}no" >&6
5817                  LIBS="$cf_ncurses_SAVE"
5818 fi
5819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5820 fi
5821
5822 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5823
5824 cat >>confdefs.h <<EOF
5825 #define $cf_nculib_ROOT 1
5826 EOF
5827
5828 fi
5829
5830 else
5831
5832 cf_ncuconfig_root=ncurses
5833
5834 echo "Looking for ${cf_ncuconfig_root}-config"
5835 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5836 do
5837   # Extract the first word of "$ac_prog", so it can be a program name with args.
5838 set dummy $ac_prog; ac_word=$2
5839 echo "$as_me:5839: checking for $ac_word" >&5
5840 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5841 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5842   echo $ECHO_N "(cached) $ECHO_C" >&6
5843 else
5844   case $NCURSES_CONFIG in
5845   [\\/]* | ?:[\\/]*)
5846   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5847   ;;
5848   *)
5849   ac_save_IFS=$IFS; IFS=$ac_path_separator
5850 ac_dummy="$PATH"
5851 for ac_dir in $ac_dummy; do
5852   IFS=$ac_save_IFS
5853   test -z "$ac_dir" && ac_dir=.
5854   if $as_executable_p "$ac_dir/$ac_word"; then
5855    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5856    echo "$as_me:5856: found $ac_dir/$ac_word" >&5
5857    break
5858 fi
5859 done
5860
5861   ;;
5862 esac
5863 fi
5864 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
5865
5866 if test -n "$NCURSES_CONFIG"; then
5867   echo "$as_me:5867: result: $NCURSES_CONFIG" >&5
5868 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5869 else
5870   echo "$as_me:5870: result: no" >&5
5871 echo "${ECHO_T}no" >&6
5872 fi
5873
5874   test -n "$NCURSES_CONFIG" && break
5875 done
5876 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5877
5878 if test "$NCURSES_CONFIG" != none ; then
5879
5880 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5881 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5882
5883 # even with config script, some packages use no-override for curses.h
5884
5885 echo "$as_me:5885: checking if we have identified curses headers" >&5
5886 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5887 if test "${cf_cv_ncurses_header+set}" = set; then
5888   echo $ECHO_N "(cached) $ECHO_C" >&6
5889 else
5890
5891 cf_cv_ncurses_header=none
5892 for cf_header in  \
5893     ncurses/ncurses.h \
5894         ncurses/curses.h \
5895         ncurses.h \
5896         curses.h
5897 do
5898 cat >conftest.$ac_ext <<_ACEOF
5899 #line 5899 "configure"
5900 #include "confdefs.h"
5901 #include <${cf_header}>
5902 int
5903 main ()
5904 {
5905 initscr(); tgoto("?", 0,0)
5906   ;
5907   return 0;
5908 }
5909 _ACEOF
5910 rm -f conftest.$ac_objext
5911 if { (eval echo "$as_me:5911: \"$ac_compile\"") >&5
5912   (eval $ac_compile) 2>&5
5913   ac_status=$?
5914   echo "$as_me:5914: \$? = $ac_status" >&5
5915   (exit $ac_status); } &&
5916          { ac_try='test -s conftest.$ac_objext'
5917   { (eval echo "$as_me:5917: \"$ac_try\"") >&5
5918   (eval $ac_try) 2>&5
5919   ac_status=$?
5920   echo "$as_me:5920: \$? = $ac_status" >&5
5921   (exit $ac_status); }; }; then
5922   cf_cv_ncurses_header=$cf_header; break
5923 else
5924   echo "$as_me: failed program was:" >&5
5925 cat conftest.$ac_ext >&5
5926 fi
5927 rm -f conftest.$ac_objext conftest.$ac_ext
5928 done
5929
5930 fi
5931 echo "$as_me:5931: result: $cf_cv_ncurses_header" >&5
5932 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5933
5934 if test "$cf_cv_ncurses_header" = none ; then
5935         { { echo "$as_me:5935: error: No curses header-files found" >&5
5936 echo "$as_me: error: No curses header-files found" >&2;}
5937    { (exit 1); exit 1; }; }
5938 fi
5939
5940 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5941
5942 for ac_header in $cf_cv_ncurses_header
5943 do
5944 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5945 echo "$as_me:5945: checking for $ac_header" >&5
5946 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5947 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5948   echo $ECHO_N "(cached) $ECHO_C" >&6
5949 else
5950   cat >conftest.$ac_ext <<_ACEOF
5951 #line 5951 "configure"
5952 #include "confdefs.h"
5953 #include <$ac_header>
5954 _ACEOF
5955 if { (eval echo "$as_me:5955: \"$ac_cpp conftest.$ac_ext\"") >&5
5956   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5957   ac_status=$?
5958   egrep -v '^ *\+' conftest.er1 >conftest.err
5959   rm -f conftest.er1
5960   cat conftest.err >&5
5961   echo "$as_me:5961: \$? = $ac_status" >&5
5962   (exit $ac_status); } >/dev/null; then
5963   if test -s conftest.err; then
5964     ac_cpp_err=$ac_c_preproc_warn_flag
5965   else
5966     ac_cpp_err=
5967   fi
5968 else
5969   ac_cpp_err=yes
5970 fi
5971 if test -z "$ac_cpp_err"; then
5972   eval "$as_ac_Header=yes"
5973 else
5974   echo "$as_me: failed program was:" >&5
5975   cat conftest.$ac_ext >&5
5976   eval "$as_ac_Header=no"
5977 fi
5978 rm -f conftest.err conftest.$ac_ext
5979 fi
5980 echo "$as_me:5980: result: `eval echo '${'$as_ac_Header'}'`" >&5
5981 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5982 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5983   cat >>confdefs.h <<EOF
5984 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5985 EOF
5986
5987 fi
5988 done
5989
5990 cat >>confdefs.h <<\EOF
5991 #define NCURSES 1
5992 EOF
5993
5994 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5995
5996 cat >>confdefs.h <<EOF
5997 #define $cf_nculib_ROOT 1
5998 EOF
5999
6000 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6001
6002 else
6003
6004 cf_ncuhdr_root=ncurses
6005
6006 test -n "$cf_cv_curses_dir" && \
6007 test "$cf_cv_curses_dir" != "no" && { \
6008
6009 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6010   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6011   do
6012         while test $cf_add_incdir != /usr/include
6013         do
6014           if test -d $cf_add_incdir
6015           then
6016                 cf_have_incdir=no
6017                 if test -n "$CFLAGS$CPPFLAGS" ; then
6018                   # a loop is needed to ensure we can add subdirs of existing dirs
6019                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6020                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6021                           cf_have_incdir=yes; break
6022                         fi
6023                   done
6024                 fi
6025
6026                 if test "$cf_have_incdir" = no ; then
6027                   if test "$cf_add_incdir" = /usr/local/include ; then
6028                         if test "$GCC" = yes
6029                         then
6030                           cf_save_CPPFLAGS=$CPPFLAGS
6031                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6032                           cat >conftest.$ac_ext <<_ACEOF
6033 #line 6033 "configure"
6034 #include "confdefs.h"
6035 #include <stdio.h>
6036 int
6037 main ()
6038 {
6039 printf("Hello")
6040   ;
6041   return 0;
6042 }
6043 _ACEOF
6044 rm -f conftest.$ac_objext
6045 if { (eval echo "$as_me:6045: \"$ac_compile\"") >&5
6046   (eval $ac_compile) 2>&5
6047   ac_status=$?
6048   echo "$as_me:6048: \$? = $ac_status" >&5
6049   (exit $ac_status); } &&
6050          { ac_try='test -s conftest.$ac_objext'
6051   { (eval echo "$as_me:6051: \"$ac_try\"") >&5
6052   (eval $ac_try) 2>&5
6053   ac_status=$?
6054   echo "$as_me:6054: \$? = $ac_status" >&5
6055   (exit $ac_status); }; }; then
6056   :
6057 else
6058   echo "$as_me: failed program was:" >&5
6059 cat conftest.$ac_ext >&5
6060 cf_have_incdir=yes
6061 fi
6062 rm -f conftest.$ac_objext conftest.$ac_ext
6063                           CPPFLAGS=$cf_save_CPPFLAGS
6064                         fi
6065                   fi
6066                 fi
6067
6068                 if test "$cf_have_incdir" = no ; then
6069                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6070
6071 echo "${as_me:-configure}:6071: testing adding $cf_add_incdir to include-path ..." 1>&5
6072
6073                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6074
6075                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6076                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6077                   cf_add_incdir="$cf_top_incdir"
6078                 else
6079                   break
6080                 fi
6081           fi
6082         done
6083   done
6084 fi
6085
6086 }
6087
6088 echo "$as_me:6088: checking for $cf_ncuhdr_root header in include-path" >&5
6089 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6090 if test "${cf_cv_ncurses_h+set}" = set; then
6091   echo $ECHO_N "(cached) $ECHO_C" >&6
6092 else
6093
6094         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6095         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6096         for cf_header in $cf_header_list
6097         do
6098
6099         cat >conftest.$ac_ext <<_ACEOF
6100 #line 6100 "configure"
6101 #include "confdefs.h"
6102
6103 #include <$cf_header>
6104 int
6105 main ()
6106 {
6107
6108 #ifdef NCURSES_VERSION
6109
6110 printf("%s\n", NCURSES_VERSION);
6111 #else
6112 #ifdef __NCURSES_H
6113 printf("old\n");
6114 #else
6115         make an error
6116 #endif
6117 #endif
6118
6119   ;
6120   return 0;
6121 }
6122 _ACEOF
6123 rm -f conftest.$ac_objext
6124 if { (eval echo "$as_me:6124: \"$ac_compile\"") >&5
6125   (eval $ac_compile) 2>&5
6126   ac_status=$?
6127   echo "$as_me:6127: \$? = $ac_status" >&5
6128   (exit $ac_status); } &&
6129          { ac_try='test -s conftest.$ac_objext'
6130   { (eval echo "$as_me:6130: \"$ac_try\"") >&5
6131   (eval $ac_try) 2>&5
6132   ac_status=$?
6133   echo "$as_me:6133: \$? = $ac_status" >&5
6134   (exit $ac_status); }; }; then
6135   cf_cv_ncurses_h=$cf_header
6136
6137 else
6138   echo "$as_me: failed program was:" >&5
6139 cat conftest.$ac_ext >&5
6140 cf_cv_ncurses_h=no
6141 fi
6142 rm -f conftest.$ac_objext conftest.$ac_ext
6143
6144                 test "$cf_cv_ncurses_h" != no && break
6145         done
6146
6147 fi
6148 echo "$as_me:6148: result: $cf_cv_ncurses_h" >&5
6149 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6150
6151 if test "$cf_cv_ncurses_h" != no ; then
6152         cf_cv_ncurses_header=$cf_cv_ncurses_h
6153 else
6154
6155 echo "$as_me:6155: checking for $cf_ncuhdr_root include-path" >&5
6156 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6157 if test "${cf_cv_ncurses_h2+set}" = set; then
6158   echo $ECHO_N "(cached) $ECHO_C" >&6
6159 else
6160
6161         test -n "$verbose" && echo
6162
6163 cf_search=
6164
6165 # collect the current set of include-directories from compiler flags
6166 cf_header_path_list=""
6167 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6168         for cf_header_path in $CPPFLAGS $CFLAGS
6169         do
6170                 case $cf_header_path in #(vi
6171                 -I*)
6172                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6173
6174 test "$cf_header_path" != "NONE" && \
6175 test -d "$cf_header_path" && \
6176  {
6177         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6178         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6179         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6180         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6181         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6182         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"
6183 }
6184
6185                         cf_header_path_list="$cf_header_path_list $cf_search"
6186                         ;;
6187                 esac
6188         done
6189 fi
6190
6191 # add the variations for the package we are looking for
6192
6193 cf_search=
6194
6195 test "/usr" != "$prefix" && \
6196 test -d "/usr" && \
6197 (test $prefix = NONE || test "/usr" != "$prefix") && {
6198         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6199         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6200         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6201         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6202         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6203         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6204 }
6205
6206 test "$prefix" != "NONE" && \
6207 test -d "$prefix" && \
6208  {
6209         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6210         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6211         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6212         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6213         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6214         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6215 }
6216
6217 test "/usr/local" != "$prefix" && \
6218 test -d "/usr/local" && \
6219 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6220         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6221         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6222         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6223         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6224         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6225         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6226 }
6227
6228 test "/opt" != "$prefix" && \
6229 test -d "/opt" && \
6230 (test $prefix = NONE || test "/opt" != "$prefix") && {
6231         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6232         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6233         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6234         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6235         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6236         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6237 }
6238
6239 test "$HOME" != "$prefix" && \
6240 test -d "$HOME" && \
6241 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6242         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6243         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6244         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6245         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6246         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6247         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6248 }
6249
6250 test "$includedir" != NONE && \
6251 test "$includedir" != "/usr/include" && \
6252 test -d "$includedir" && {
6253         test -d $includedir &&    cf_search="$cf_search $includedir"
6254         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6255 }
6256
6257 test "$oldincludedir" != NONE && \
6258 test "$oldincludedir" != "/usr/include" && \
6259 test -d "$oldincludedir" && {
6260         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6261         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6262 }
6263
6264 cf_search="$cf_search $cf_header_path_list"
6265
6266         test -n "$verbose" && echo search path $cf_search
6267         cf_save2_CPPFLAGS="$CPPFLAGS"
6268         for cf_incdir in $cf_search
6269         do
6270
6271 if test -n "$cf_incdir" ; then
6272   for cf_add_incdir in $cf_incdir
6273   do
6274         while test $cf_add_incdir != /usr/include
6275         do
6276           if test -d $cf_add_incdir
6277           then
6278                 cf_have_incdir=no
6279                 if test -n "$CFLAGS$CPPFLAGS" ; then
6280                   # a loop is needed to ensure we can add subdirs of existing dirs
6281                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6282                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6283                           cf_have_incdir=yes; break
6284                         fi
6285                   done
6286                 fi
6287
6288                 if test "$cf_have_incdir" = no ; then
6289                   if test "$cf_add_incdir" = /usr/local/include ; then
6290                         if test "$GCC" = yes
6291                         then
6292                           cf_save_CPPFLAGS=$CPPFLAGS
6293                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6294                           cat >conftest.$ac_ext <<_ACEOF
6295 #line 6295 "configure"
6296 #include "confdefs.h"
6297 #include <stdio.h>
6298 int
6299 main ()
6300 {
6301 printf("Hello")
6302   ;
6303   return 0;
6304 }
6305 _ACEOF
6306 rm -f conftest.$ac_objext
6307 if { (eval echo "$as_me:6307: \"$ac_compile\"") >&5
6308   (eval $ac_compile) 2>&5
6309   ac_status=$?
6310   echo "$as_me:6310: \$? = $ac_status" >&5
6311   (exit $ac_status); } &&
6312          { ac_try='test -s conftest.$ac_objext'
6313   { (eval echo "$as_me:6313: \"$ac_try\"") >&5
6314   (eval $ac_try) 2>&5
6315   ac_status=$?
6316   echo "$as_me:6316: \$? = $ac_status" >&5
6317   (exit $ac_status); }; }; then
6318   :
6319 else
6320   echo "$as_me: failed program was:" >&5
6321 cat conftest.$ac_ext >&5
6322 cf_have_incdir=yes
6323 fi
6324 rm -f conftest.$ac_objext conftest.$ac_ext
6325                           CPPFLAGS=$cf_save_CPPFLAGS
6326                         fi
6327                   fi
6328                 fi
6329
6330                 if test "$cf_have_incdir" = no ; then
6331                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6332
6333 echo "${as_me:-configure}:6333: testing adding $cf_add_incdir to include-path ..." 1>&5
6334
6335                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6336
6337                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6338                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6339                   cf_add_incdir="$cf_top_incdir"
6340                 else
6341                   break
6342                 fi
6343           fi
6344         done
6345   done
6346 fi
6347
6348                 for cf_header in \
6349                         ncurses.h \
6350                         curses.h
6351                 do
6352
6353         cat >conftest.$ac_ext <<_ACEOF
6354 #line 6354 "configure"
6355 #include "confdefs.h"
6356
6357 #include <$cf_header>
6358 int
6359 main ()
6360 {
6361
6362 #ifdef NCURSES_VERSION
6363
6364 printf("%s\n", NCURSES_VERSION);
6365 #else
6366 #ifdef __NCURSES_H
6367 printf("old\n");
6368 #else
6369         make an error
6370 #endif
6371 #endif
6372
6373   ;
6374   return 0;
6375 }
6376 _ACEOF
6377 rm -f conftest.$ac_objext
6378 if { (eval echo "$as_me:6378: \"$ac_compile\"") >&5
6379   (eval $ac_compile) 2>&5
6380   ac_status=$?
6381   echo "$as_me:6381: \$? = $ac_status" >&5
6382   (exit $ac_status); } &&
6383          { ac_try='test -s conftest.$ac_objext'
6384   { (eval echo "$as_me:6384: \"$ac_try\"") >&5
6385   (eval $ac_try) 2>&5
6386   ac_status=$?
6387   echo "$as_me:6387: \$? = $ac_status" >&5
6388   (exit $ac_status); }; }; then
6389   cf_cv_ncurses_h2=$cf_header
6390
6391 else
6392   echo "$as_me: failed program was:" >&5
6393 cat conftest.$ac_ext >&5
6394 cf_cv_ncurses_h2=no
6395 fi
6396 rm -f conftest.$ac_objext conftest.$ac_ext
6397
6398                         if test "$cf_cv_ncurses_h2" != no ; then
6399                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6400                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6401                                 break
6402                         fi
6403                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6404                 done
6405                 CPPFLAGS="$cf_save2_CPPFLAGS"
6406                 test "$cf_cv_ncurses_h2" != no && break
6407         done
6408         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6408: error: not found" >&5
6409 echo "$as_me: error: not found" >&2;}
6410    { (exit 1); exit 1; }; }
6411
6412 fi
6413 echo "$as_me:6413: result: $cf_cv_ncurses_h2" >&5
6414 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6415
6416         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6417         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6418         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6419                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6420         fi
6421
6422 if test -n "$cf_1st_incdir" ; then
6423   for cf_add_incdir in $cf_1st_incdir
6424   do
6425         while test $cf_add_incdir != /usr/include
6426         do
6427           if test -d $cf_add_incdir
6428           then
6429                 cf_have_incdir=no
6430                 if test -n "$CFLAGS$CPPFLAGS" ; then
6431                   # a loop is needed to ensure we can add subdirs of existing dirs
6432                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6433                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6434                           cf_have_incdir=yes; break
6435                         fi
6436                   done
6437                 fi
6438
6439                 if test "$cf_have_incdir" = no ; then
6440                   if test "$cf_add_incdir" = /usr/local/include ; then
6441                         if test "$GCC" = yes
6442                         then
6443                           cf_save_CPPFLAGS=$CPPFLAGS
6444                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6445                           cat >conftest.$ac_ext <<_ACEOF
6446 #line 6446 "configure"
6447 #include "confdefs.h"
6448 #include <stdio.h>
6449 int
6450 main ()
6451 {
6452 printf("Hello")
6453   ;
6454   return 0;
6455 }
6456 _ACEOF
6457 rm -f conftest.$ac_objext
6458 if { (eval echo "$as_me:6458: \"$ac_compile\"") >&5
6459   (eval $ac_compile) 2>&5
6460   ac_status=$?
6461   echo "$as_me:6461: \$? = $ac_status" >&5
6462   (exit $ac_status); } &&
6463          { ac_try='test -s conftest.$ac_objext'
6464   { (eval echo "$as_me:6464: \"$ac_try\"") >&5
6465   (eval $ac_try) 2>&5
6466   ac_status=$?
6467   echo "$as_me:6467: \$? = $ac_status" >&5
6468   (exit $ac_status); }; }; then
6469   :
6470 else
6471   echo "$as_me: failed program was:" >&5
6472 cat conftest.$ac_ext >&5
6473 cf_have_incdir=yes
6474 fi
6475 rm -f conftest.$ac_objext conftest.$ac_ext
6476                           CPPFLAGS=$cf_save_CPPFLAGS
6477                         fi
6478                   fi
6479                 fi
6480
6481                 if test "$cf_have_incdir" = no ; then
6482                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6483
6484 echo "${as_me:-configure}:6484: testing adding $cf_add_incdir to include-path ..." 1>&5
6485
6486                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6487
6488                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6489                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6490                   cf_add_incdir="$cf_top_incdir"
6491                 else
6492                   break
6493                 fi
6494           fi
6495         done
6496   done
6497 fi
6498
6499 fi
6500
6501 # Set definitions to allow ifdef'ing for ncurses.h
6502
6503 case $cf_cv_ncurses_header in # (vi
6504 *ncurses.h)
6505         cat >>confdefs.h <<\EOF
6506 #define HAVE_NCURSES_H 1
6507 EOF
6508
6509         ;;
6510 esac
6511
6512 case $cf_cv_ncurses_header in # (vi
6513 ncurses/curses.h|ncurses/ncurses.h)
6514         cat >>confdefs.h <<\EOF
6515 #define HAVE_NCURSES_NCURSES_H 1
6516 EOF
6517
6518         ;;
6519 ncursesw/curses.h|ncursesw/ncurses.h)
6520         cat >>confdefs.h <<\EOF
6521 #define HAVE_NCURSESW_NCURSES_H 1
6522 EOF
6523
6524         ;;
6525 esac
6526
6527 echo "$as_me:6527: checking for terminfo header" >&5
6528 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6529 if test "${cf_cv_term_header+set}" = set; then
6530   echo $ECHO_N "(cached) $ECHO_C" >&6
6531 else
6532
6533 case ${cf_cv_ncurses_header} in #(vi
6534 */ncurses.h|*/ncursesw.h) #(vi
6535         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6536         ;;
6537 *)
6538         cf_term_header=term.h
6539         ;;
6540 esac
6541
6542 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6543 do
6544 cat >conftest.$ac_ext <<_ACEOF
6545 #line 6545 "configure"
6546 #include "confdefs.h"
6547 #include <stdio.h>
6548 #include <${cf_cv_ncurses_header:-curses.h}>
6549 #include <$cf_test>
6550
6551 int
6552 main ()
6553 {
6554 int x = auto_left_margin
6555   ;
6556   return 0;
6557 }
6558 _ACEOF
6559 rm -f conftest.$ac_objext
6560 if { (eval echo "$as_me:6560: \"$ac_compile\"") >&5
6561   (eval $ac_compile) 2>&5
6562   ac_status=$?
6563   echo "$as_me:6563: \$? = $ac_status" >&5
6564   (exit $ac_status); } &&
6565          { ac_try='test -s conftest.$ac_objext'
6566   { (eval echo "$as_me:6566: \"$ac_try\"") >&5
6567   (eval $ac_try) 2>&5
6568   ac_status=$?
6569   echo "$as_me:6569: \$? = $ac_status" >&5
6570   (exit $ac_status); }; }; then
6571
6572         cf_cv_term_header="$cf_test"
6573 else
6574   echo "$as_me: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6576
6577         cf_cv_term_header=unknown
6578
6579 fi
6580 rm -f conftest.$ac_objext conftest.$ac_ext
6581         test "$cf_cv_term_header" != unknown && break
6582 done
6583
6584 fi
6585 echo "$as_me:6585: result: $cf_cv_term_header" >&5
6586 echo "${ECHO_T}$cf_cv_term_header" >&6
6587
6588 # Set definitions to allow ifdef'ing to accommodate subdirectories
6589
6590 case $cf_cv_term_header in # (vi
6591 *term.h)
6592         cat >>confdefs.h <<\EOF
6593 #define HAVE_TERM_H 1
6594 EOF
6595
6596         ;;
6597 esac
6598
6599 case $cf_cv_term_header in # (vi
6600 ncurses/term.h) #(vi
6601         cat >>confdefs.h <<\EOF
6602 #define HAVE_NCURSES_TERM_H 1
6603 EOF
6604
6605         ;;
6606 ncursesw/term.h)
6607         cat >>confdefs.h <<\EOF
6608 #define HAVE_NCURSESW_TERM_H 1
6609 EOF
6610
6611         ;;
6612 esac
6613
6614 # some applications need this, but should check for NCURSES_VERSION
6615 cat >>confdefs.h <<\EOF
6616 #define NCURSES 1
6617 EOF
6618
6619 echo "$as_me:6619: checking for ncurses version" >&5
6620 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6621 if test "${cf_cv_ncurses_version+set}" = set; then
6622   echo $ECHO_N "(cached) $ECHO_C" >&6
6623 else
6624
6625         cf_cv_ncurses_version=no
6626         cf_tempfile=out$$
6627         rm -f $cf_tempfile
6628         if test "$cross_compiling" = yes; then
6629
6630         # This will not work if the preprocessor splits the line after the
6631         # Autoconf token.  The 'unproto' program does that.
6632         cat > conftest.$ac_ext <<EOF
6633 #include <${cf_cv_ncurses_header:-curses.h}>
6634 #undef Autoconf
6635 #ifdef NCURSES_VERSION
6636 Autoconf NCURSES_VERSION
6637 #else
6638 #ifdef __NCURSES_H
6639 Autoconf "old"
6640 #endif
6641 ;
6642 #endif
6643 EOF
6644         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6645         { (eval echo "$as_me:6645: \"$cf_try\"") >&5
6646   (eval $cf_try) 2>&5
6647   ac_status=$?
6648   echo "$as_me:6648: \$? = $ac_status" >&5
6649   (exit $ac_status); }
6650         if test -f conftest.out ; then
6651                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6652                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6653                 rm -f conftest.out
6654         fi
6655
6656 else
6657   cat >conftest.$ac_ext <<_ACEOF
6658 #line 6658 "configure"
6659 #include "confdefs.h"
6660
6661 #include <${cf_cv_ncurses_header:-curses.h}>
6662 #include <stdio.h>
6663 int main()
6664 {
6665         FILE *fp = fopen("$cf_tempfile", "w");
6666 #ifdef NCURSES_VERSION
6667 # ifdef NCURSES_VERSION_PATCH
6668         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6669 # else
6670         fprintf(fp, "%s\n", NCURSES_VERSION);
6671 # endif
6672 #else
6673 # ifdef __NCURSES_H
6674         fprintf(fp, "old\n");
6675 # else
6676         make an error
6677 # endif
6678 #endif
6679         ${cf_cv_main_return:-return}(0);
6680 }
6681 _ACEOF
6682 rm -f conftest$ac_exeext
6683 if { (eval echo "$as_me:6683: \"$ac_link\"") >&5
6684   (eval $ac_link) 2>&5
6685   ac_status=$?
6686   echo "$as_me:6686: \$? = $ac_status" >&5
6687   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6688   { (eval echo "$as_me:6688: \"$ac_try\"") >&5
6689   (eval $ac_try) 2>&5
6690   ac_status=$?
6691   echo "$as_me:6691: \$? = $ac_status" >&5
6692   (exit $ac_status); }; }; then
6693
6694         cf_cv_ncurses_version=`cat $cf_tempfile`
6695 else
6696   echo "$as_me: program exited with status $ac_status" >&5
6697 echo "$as_me: failed program was:" >&5
6698 cat conftest.$ac_ext >&5
6699 fi
6700 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6701 fi
6702         rm -f $cf_tempfile
6703
6704 fi
6705 echo "$as_me:6705: result: $cf_cv_ncurses_version" >&5
6706 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6707 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6708 #define NCURSES 1
6709 EOF
6710
6711 cf_nculib_root=ncurses
6712         # This works, except for the special case where we find gpm, but
6713         # ncurses is in a nonstandard location via $LIBS, and we really want
6714         # to link gpm.
6715 cf_ncurses_LIBS=""
6716 cf_ncurses_SAVE="$LIBS"
6717 echo "$as_me:6717: checking for Gpm_Open in -lgpm" >&5
6718 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6719 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6720   echo $ECHO_N "(cached) $ECHO_C" >&6
6721 else
6722   ac_check_lib_save_LIBS=$LIBS
6723 LIBS="-lgpm  $LIBS"
6724 cat >conftest.$ac_ext <<_ACEOF
6725 #line 6725 "configure"
6726 #include "confdefs.h"
6727
6728 /* Override any gcc2 internal prototype to avoid an error.  */
6729 #ifdef __cplusplus
6730 extern "C"
6731 #endif
6732 /* We use char because int might match the return type of a gcc2
6733    builtin and then its argument prototype would still apply.  */
6734 char Gpm_Open ();
6735 int
6736 main ()
6737 {
6738 Gpm_Open ();
6739   ;
6740   return 0;
6741 }
6742 _ACEOF
6743 rm -f conftest.$ac_objext conftest$ac_exeext
6744 if { (eval echo "$as_me:6744: \"$ac_link\"") >&5
6745   (eval $ac_link) 2>&5
6746   ac_status=$?
6747   echo "$as_me:6747: \$? = $ac_status" >&5
6748   (exit $ac_status); } &&
6749          { ac_try='test -s conftest$ac_exeext'
6750   { (eval echo "$as_me:6750: \"$ac_try\"") >&5
6751   (eval $ac_try) 2>&5
6752   ac_status=$?
6753   echo "$as_me:6753: \$? = $ac_status" >&5
6754   (exit $ac_status); }; }; then
6755   ac_cv_lib_gpm_Gpm_Open=yes
6756 else
6757   echo "$as_me: failed program was:" >&5
6758 cat conftest.$ac_ext >&5
6759 ac_cv_lib_gpm_Gpm_Open=no
6760 fi
6761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6762 LIBS=$ac_check_lib_save_LIBS
6763 fi
6764 echo "$as_me:6764: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6765 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6766 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6767   echo "$as_me:6767: checking for initscr in -lgpm" >&5
6768 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6769 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6770   echo $ECHO_N "(cached) $ECHO_C" >&6
6771 else
6772   ac_check_lib_save_LIBS=$LIBS
6773 LIBS="-lgpm  $LIBS"
6774 cat >conftest.$ac_ext <<_ACEOF
6775 #line 6775 "configure"
6776 #include "confdefs.h"
6777
6778 /* Override any gcc2 internal prototype to avoid an error.  */
6779 #ifdef __cplusplus
6780 extern "C"
6781 #endif
6782 /* We use char because int might match the return type of a gcc2
6783    builtin and then its argument prototype would still apply.  */
6784 char initscr ();
6785 int
6786 main ()
6787 {
6788 initscr ();
6789   ;
6790   return 0;
6791 }
6792 _ACEOF
6793 rm -f conftest.$ac_objext conftest$ac_exeext
6794 if { (eval echo "$as_me:6794: \"$ac_link\"") >&5
6795   (eval $ac_link) 2>&5
6796   ac_status=$?
6797   echo "$as_me:6797: \$? = $ac_status" >&5
6798   (exit $ac_status); } &&
6799          { ac_try='test -s conftest$ac_exeext'
6800   { (eval echo "$as_me:6800: \"$ac_try\"") >&5
6801   (eval $ac_try) 2>&5
6802   ac_status=$?
6803   echo "$as_me:6803: \$? = $ac_status" >&5
6804   (exit $ac_status); }; }; then
6805   ac_cv_lib_gpm_initscr=yes
6806 else
6807   echo "$as_me: failed program was:" >&5
6808 cat conftest.$ac_ext >&5
6809 ac_cv_lib_gpm_initscr=no
6810 fi
6811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6812 LIBS=$ac_check_lib_save_LIBS
6813 fi
6814 echo "$as_me:6814: result: $ac_cv_lib_gpm_initscr" >&5
6815 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6816 if test $ac_cv_lib_gpm_initscr = yes; then
6817   LIBS="$cf_ncurses_SAVE"
6818 else
6819   cf_ncurses_LIBS="-lgpm"
6820 fi
6821
6822 fi
6823
6824 case $host_os in #(vi
6825 freebsd*)
6826         # This is only necessary if you are linking against an obsolete
6827         # version of ncurses (but it should do no harm, since it's static).
6828         if test "$cf_nculib_root" = ncurses ; then
6829                 echo "$as_me:6829: checking for tgoto in -lmytinfo" >&5
6830 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6831 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6832   echo $ECHO_N "(cached) $ECHO_C" >&6
6833 else
6834   ac_check_lib_save_LIBS=$LIBS
6835 LIBS="-lmytinfo  $LIBS"
6836 cat >conftest.$ac_ext <<_ACEOF
6837 #line 6837 "configure"
6838 #include "confdefs.h"
6839
6840 /* Override any gcc2 internal prototype to avoid an error.  */
6841 #ifdef __cplusplus
6842 extern "C"
6843 #endif
6844 /* We use char because int might match the return type of a gcc2
6845    builtin and then its argument prototype would still apply.  */
6846 char tgoto ();
6847 int
6848 main ()
6849 {
6850 tgoto ();
6851   ;
6852   return 0;
6853 }
6854 _ACEOF
6855 rm -f conftest.$ac_objext conftest$ac_exeext
6856 if { (eval echo "$as_me:6856: \"$ac_link\"") >&5
6857   (eval $ac_link) 2>&5
6858   ac_status=$?
6859   echo "$as_me:6859: \$? = $ac_status" >&5
6860   (exit $ac_status); } &&
6861          { ac_try='test -s conftest$ac_exeext'
6862   { (eval echo "$as_me:6862: \"$ac_try\"") >&5
6863   (eval $ac_try) 2>&5
6864   ac_status=$?
6865   echo "$as_me:6865: \$? = $ac_status" >&5
6866   (exit $ac_status); }; }; then
6867   ac_cv_lib_mytinfo_tgoto=yes
6868 else
6869   echo "$as_me: failed program was:" >&5
6870 cat conftest.$ac_ext >&5
6871 ac_cv_lib_mytinfo_tgoto=no
6872 fi
6873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6874 LIBS=$ac_check_lib_save_LIBS
6875 fi
6876 echo "$as_me:6876: result: $ac_cv_lib_mytinfo_tgoto" >&5
6877 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6878 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6879   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6880 fi
6881
6882         fi
6883         ;;
6884 esac
6885
6886 LIBS="$cf_ncurses_LIBS $LIBS"
6887
6888 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6889 then
6890         LIBS="-l$cf_nculib_root $LIBS"
6891 else
6892
6893         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6894         cf_libdir=""
6895         echo "$as_me:6895: checking for initscr" >&5
6896 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6897 if test "${ac_cv_func_initscr+set}" = set; then
6898   echo $ECHO_N "(cached) $ECHO_C" >&6
6899 else
6900   cat >conftest.$ac_ext <<_ACEOF
6901 #line 6901 "configure"
6902 #include "confdefs.h"
6903 /* System header to define __stub macros and hopefully few prototypes,
6904     which can conflict with char initscr (); below.  */
6905 #include <assert.h>
6906 /* Override any gcc2 internal prototype to avoid an error.  */
6907 #ifdef __cplusplus
6908 extern "C"
6909 #endif
6910 /* We use char because int might match the return type of a gcc2
6911    builtin and then its argument prototype would still apply.  */
6912 char initscr ();
6913 char (*f) ();
6914
6915 int
6916 main ()
6917 {
6918 /* The GNU C library defines this for functions which it implements
6919     to always fail with ENOSYS.  Some functions are actually named
6920     something starting with __ and the normal name is an alias.  */
6921 #if defined (__stub_initscr) || defined (__stub___initscr)
6922 choke me
6923 #else
6924 f = initscr;
6925 #endif
6926
6927   ;
6928   return 0;
6929 }
6930 _ACEOF
6931 rm -f conftest.$ac_objext conftest$ac_exeext
6932 if { (eval echo "$as_me:6932: \"$ac_link\"") >&5
6933   (eval $ac_link) 2>&5
6934   ac_status=$?
6935   echo "$as_me:6935: \$? = $ac_status" >&5
6936   (exit $ac_status); } &&
6937          { ac_try='test -s conftest$ac_exeext'
6938   { (eval echo "$as_me:6938: \"$ac_try\"") >&5
6939   (eval $ac_try) 2>&5
6940   ac_status=$?
6941   echo "$as_me:6941: \$? = $ac_status" >&5
6942   (exit $ac_status); }; }; then
6943   ac_cv_func_initscr=yes
6944 else
6945   echo "$as_me: failed program was:" >&5
6946 cat conftest.$ac_ext >&5
6947 ac_cv_func_initscr=no
6948 fi
6949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6950 fi
6951 echo "$as_me:6951: result: $ac_cv_func_initscr" >&5
6952 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6953 if test $ac_cv_func_initscr = yes; then
6954   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6955 else
6956
6957                 cf_save_LIBS="$LIBS"
6958                 echo "$as_me:6958: checking for initscr in -l$cf_nculib_root" >&5
6959 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6960                 LIBS="-l$cf_nculib_root $LIBS"
6961                 cat >conftest.$ac_ext <<_ACEOF
6962 #line 6962 "configure"
6963 #include "confdefs.h"
6964 #include <${cf_cv_ncurses_header:-curses.h}>
6965 int
6966 main ()
6967 {
6968 initscr()
6969   ;
6970   return 0;
6971 }
6972 _ACEOF
6973 rm -f conftest.$ac_objext conftest$ac_exeext
6974 if { (eval echo "$as_me:6974: \"$ac_link\"") >&5
6975   (eval $ac_link) 2>&5
6976   ac_status=$?
6977   echo "$as_me:6977: \$? = $ac_status" >&5
6978   (exit $ac_status); } &&
6979          { ac_try='test -s conftest$ac_exeext'
6980   { (eval echo "$as_me:6980: \"$ac_try\"") >&5
6981   (eval $ac_try) 2>&5
6982   ac_status=$?
6983   echo "$as_me:6983: \$? = $ac_status" >&5
6984   (exit $ac_status); }; }; then
6985   echo "$as_me:6985: result: yes" >&5
6986 echo "${ECHO_T}yes" >&6
6987                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6988
6989 else
6990   echo "$as_me: failed program was:" >&5
6991 cat conftest.$ac_ext >&5
6992 echo "$as_me:6992: result: no" >&5
6993 echo "${ECHO_T}no" >&6
6994
6995 cf_search=
6996 cf_library_path_list=""
6997 if test -n "${LDFLAGS}${LIBS}" ; then
6998         for cf_library_path in $LDFLAGS $LIBS
6999         do
7000                 case $cf_library_path in #(vi
7001                 -L*)
7002                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7003
7004 test "$cf_library_path" != "NONE" && \
7005 test -d "$cf_library_path" && \
7006  {
7007         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7008         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7009         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7010         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7011         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7012         test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
7013 }
7014
7015                         cf_library_path_list="$cf_library_path_list $cf_search"
7016                         ;;
7017                 esac
7018         done
7019 fi
7020
7021 cf_search=
7022
7023 test "/usr" != "$prefix" && \
7024 test -d "/usr" && \
7025 (test $prefix = NONE || test "/usr" != "$prefix") && {
7026         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7027         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7028         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7029         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7030         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7031         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7032 }
7033
7034 test "$prefix" != "NONE" && \
7035 test -d "$prefix" && \
7036  {
7037         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7038         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7039         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7040         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7041         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7042         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7043 }
7044
7045 test "/usr/local" != "$prefix" && \
7046 test -d "/usr/local" && \
7047 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7048         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7049         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7050         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7051         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7052         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7053         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7054 }
7055
7056 test "/opt" != "$prefix" && \
7057 test -d "/opt" && \
7058 (test $prefix = NONE || test "/opt" != "$prefix") && {
7059         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7060         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7061         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7062         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7063         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7064         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7065 }
7066
7067 test "$HOME" != "$prefix" && \
7068 test -d "$HOME" && \
7069 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7070         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7071         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7072         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7073         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7074         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7075         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7076 }
7077
7078 cf_search="$cf_library_path_list $cf_search"
7079
7080                         for cf_libdir in $cf_search
7081                         do
7082                                 echo "$as_me:7082: checking for -l$cf_nculib_root in $cf_libdir" >&5
7083 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7084                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7085                                 cat >conftest.$ac_ext <<_ACEOF
7086 #line 7086 "configure"
7087 #include "confdefs.h"
7088 #include <${cf_cv_ncurses_header:-curses.h}>
7089 int
7090 main ()
7091 {
7092 initscr()
7093   ;
7094   return 0;
7095 }
7096 _ACEOF
7097 rm -f conftest.$ac_objext conftest$ac_exeext
7098 if { (eval echo "$as_me:7098: \"$ac_link\"") >&5
7099   (eval $ac_link) 2>&5
7100   ac_status=$?
7101   echo "$as_me:7101: \$? = $ac_status" >&5
7102   (exit $ac_status); } &&
7103          { ac_try='test -s conftest$ac_exeext'
7104   { (eval echo "$as_me:7104: \"$ac_try\"") >&5
7105   (eval $ac_try) 2>&5
7106   ac_status=$?
7107   echo "$as_me:7107: \$? = $ac_status" >&5
7108   (exit $ac_status); }; }; then
7109   echo "$as_me:7109: result: yes" >&5
7110 echo "${ECHO_T}yes" >&6
7111                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7112                                          break
7113 else
7114   echo "$as_me: failed program was:" >&5
7115 cat conftest.$ac_ext >&5
7116 echo "$as_me:7116: result: no" >&5
7117 echo "${ECHO_T}no" >&6
7118                                          LIBS="$cf_save_LIBS"
7119 fi
7120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7121                         done
7122
7123 fi
7124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7125
7126 fi
7127
7128 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7129
7130 if test $cf_found_library = no ; then
7131         { { echo "$as_me:7131: error: Cannot link $cf_nculib_root library" >&5
7132 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7133    { (exit 1); exit 1; }; }
7134 fi
7135
7136 fi
7137
7138 if test -n "$cf_ncurses_LIBS" ; then
7139         echo "$as_me:7139: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7140 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7141         cf_ncurses_SAVE="$LIBS"
7142         for p in $cf_ncurses_LIBS ; do
7143                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7144                 if test "$q" != "$LIBS" ; then
7145                         LIBS="$q"
7146                 fi
7147         done
7148         cat >conftest.$ac_ext <<_ACEOF
7149 #line 7149 "configure"
7150 #include "confdefs.h"
7151 #include <${cf_cv_ncurses_header:-curses.h}>
7152 int
7153 main ()
7154 {
7155 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7156   ;
7157   return 0;
7158 }
7159 _ACEOF
7160 rm -f conftest.$ac_objext conftest$ac_exeext
7161 if { (eval echo "$as_me:7161: \"$ac_link\"") >&5
7162   (eval $ac_link) 2>&5
7163   ac_status=$?
7164   echo "$as_me:7164: \$? = $ac_status" >&5
7165   (exit $ac_status); } &&
7166          { ac_try='test -s conftest$ac_exeext'
7167   { (eval echo "$as_me:7167: \"$ac_try\"") >&5
7168   (eval $ac_try) 2>&5
7169   ac_status=$?
7170   echo "$as_me:7170: \$? = $ac_status" >&5
7171   (exit $ac_status); }; }; then
7172   echo "$as_me:7172: result: yes" >&5
7173 echo "${ECHO_T}yes" >&6
7174 else
7175   echo "$as_me: failed program was:" >&5
7176 cat conftest.$ac_ext >&5
7177 echo "$as_me:7177: result: no" >&5
7178 echo "${ECHO_T}no" >&6
7179                  LIBS="$cf_ncurses_SAVE"
7180 fi
7181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7182 fi
7183
7184 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7185
7186 cat >>confdefs.h <<EOF
7187 #define $cf_nculib_ROOT 1
7188 EOF
7189
7190 fi
7191
7192 fi
7193
7194 if test "$NCURSES_CONFIG" != none ; then
7195
7196 cf_version=`$NCURSES_CONFIG --version`
7197
7198 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7199 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7200 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7201
7202 # ABI version is not available from headers
7203 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7204
7205 else
7206
7207 for cf_name in MAJOR MINOR PATCH
7208 do
7209 cat >conftest.$ac_ext <<CF_EOF
7210 #include <${cf_cv_ncurses_header:-curses.h}>
7211 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7212 CF_EOF
7213         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7214         { (eval echo "$as_me:7214: \"$cf_try\"") >&5
7215   (eval $cf_try) 2>&5
7216   ac_status=$?
7217   echo "$as_me:7217: \$? = $ac_status" >&5
7218   (exit $ac_status); }
7219         if test -f conftest.out ; then
7220                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7221                 eval NCURSES_$cf_name=\"$cf_result\"
7222                 # cat conftest.$ac_ext
7223                 # cat conftest.out
7224         fi
7225 done
7226
7227 cf_cv_abi_version=${NCURSES_MAJOR}
7228
7229 fi
7230
7231 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7232
7233 cf_cv_timestamp=`date`
7234
7235 echo "$as_me:7235: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7236 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7237
7238         case $cf_cv_system_name in #(vi
7239         OS/2*|os2*) #(vi
7240         LIB_PREFIX=''
7241         ;;
7242         *)      LIB_PREFIX='lib'
7243         ;;
7244         esac
7245 cf_prefix=$LIB_PREFIX
7246
7247 LIB_PREFIX=$cf_prefix
7248
7249 LIB_SUFFIX=
7250
7251 ###############################################################################
7252
7253 if test X"$CC_G_OPT" = X"" ; then
7254         CC_G_OPT='-g'
7255         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7256 fi
7257
7258 echo "$as_me:7258: checking for default loader flags" >&5
7259 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7260 case $DFT_LWR_MODEL in
7261 normal)  LD_MODEL=''   ;;
7262 debug)   LD_MODEL=$CC_G_OPT ;;
7263 profile) LD_MODEL='-pg';;
7264 shared)  LD_MODEL=''   ;;
7265 esac
7266 echo "$as_me:7266: result: $LD_MODEL" >&5
7267 echo "${ECHO_T}$LD_MODEL" >&6
7268
7269 LD_RPATH_OPT=
7270 echo "$as_me:7270: checking for an rpath option" >&5
7271 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7272 case $cf_cv_system_name in #(vi
7273 irix*) #(vi
7274         if test "$GCC" = yes; then
7275                 LD_RPATH_OPT="-Wl,-rpath,"
7276         else
7277                 LD_RPATH_OPT="-rpath "
7278         fi
7279         ;;
7280 linux*|gnu*|k*bsd*-gnu) #(vi
7281         LD_RPATH_OPT="-Wl,-rpath,"
7282         ;;
7283 openbsd[2-9].*|mirbsd*) #(vi
7284         LD_RPATH_OPT="-Wl,-rpath,"
7285         ;;
7286 freebsd*) #(vi
7287         LD_RPATH_OPT="-rpath "
7288         ;;
7289 netbsd*) #(vi
7290         LD_RPATH_OPT="-Wl,-rpath,"
7291         ;;
7292 osf*|mls+*) #(vi
7293         LD_RPATH_OPT="-rpath "
7294         ;;
7295 solaris2*) #(vi
7296         LD_RPATH_OPT="-R"
7297         ;;
7298 *)
7299         ;;
7300 esac
7301 echo "$as_me:7301: result: $LD_RPATH_OPT" >&5
7302 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7303
7304 case "x$LD_RPATH_OPT" in #(vi
7305 x-R*)
7306         echo "$as_me:7306: checking if we need a space after rpath option" >&5
7307 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7308         cf_save_LIBS="$LIBS"
7309         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7310         cat >conftest.$ac_ext <<_ACEOF
7311 #line 7311 "configure"
7312 #include "confdefs.h"
7313
7314 int
7315 main ()
7316 {
7317
7318   ;
7319   return 0;
7320 }
7321 _ACEOF
7322 rm -f conftest.$ac_objext conftest$ac_exeext
7323 if { (eval echo "$as_me:7323: \"$ac_link\"") >&5
7324   (eval $ac_link) 2>&5
7325   ac_status=$?
7326   echo "$as_me:7326: \$? = $ac_status" >&5
7327   (exit $ac_status); } &&
7328          { ac_try='test -s conftest$ac_exeext'
7329   { (eval echo "$as_me:7329: \"$ac_try\"") >&5
7330   (eval $ac_try) 2>&5
7331   ac_status=$?
7332   echo "$as_me:7332: \$? = $ac_status" >&5
7333   (exit $ac_status); }; }; then
7334   cf_rpath_space=no
7335 else
7336   echo "$as_me: failed program was:" >&5
7337 cat conftest.$ac_ext >&5
7338 cf_rpath_space=yes
7339 fi
7340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7341         LIBS="$cf_save_LIBS"
7342         echo "$as_me:7342: result: $cf_rpath_space" >&5
7343 echo "${ECHO_T}$cf_rpath_space" >&6
7344         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7345         ;;
7346 esac
7347
7348         LOCAL_LDFLAGS=
7349         LOCAL_LDFLAGS2=
7350         LD_SHARED_OPTS=
7351         INSTALL_LIB="-m 644"
7352
7353         cf_cv_do_symlinks=no
7354         cf_ld_rpath_opt=
7355         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7356
7357         echo "$as_me:7357: checking if release/abi version should be used for shared libs" >&5
7358 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7359
7360 # Check whether --with-shlib-version or --without-shlib-version was given.
7361 if test "${with_shlib_version+set}" = set; then
7362   withval="$with_shlib_version"
7363   test -z "$withval" && withval=auto
7364         case $withval in #(vi
7365         yes) #(vi
7366                 cf_cv_shlib_version=auto
7367                 ;;
7368         rel|abi|auto|no) #(vi
7369                 cf_cv_shlib_version=$withval
7370                 ;;
7371         *)
7372                 { { echo "$as_me:7372: error: option value must be one of: rel, abi, auto or no" >&5
7373 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7374    { (exit 1); exit 1; }; }
7375                 ;;
7376         esac
7377
7378 else
7379   cf_cv_shlib_version=auto
7380 fi;
7381         echo "$as_me:7381: result: $cf_cv_shlib_version" >&5
7382 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7383
7384         cf_cv_rm_so_locs=no
7385
7386         # Some less-capable ports of gcc support only -fpic
7387         CC_SHARED_OPTS=
7388         if test "$GCC" = yes
7389         then
7390                 echo "$as_me:7390: checking which $CC option to use" >&5
7391 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7392                 cf_save_CFLAGS="$CFLAGS"
7393                 for CC_SHARED_OPTS in -fPIC -fpic ''
7394                 do
7395                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7396                         cat >conftest.$ac_ext <<_ACEOF
7397 #line 7397 "configure"
7398 #include "confdefs.h"
7399 #include <stdio.h>
7400 int
7401 main ()
7402 {
7403 int x = 1
7404   ;
7405   return 0;
7406 }
7407 _ACEOF
7408 rm -f conftest.$ac_objext
7409 if { (eval echo "$as_me:7409: \"$ac_compile\"") >&5
7410   (eval $ac_compile) 2>&5
7411   ac_status=$?
7412   echo "$as_me:7412: \$? = $ac_status" >&5
7413   (exit $ac_status); } &&
7414          { ac_try='test -s conftest.$ac_objext'
7415   { (eval echo "$as_me:7415: \"$ac_try\"") >&5
7416   (eval $ac_try) 2>&5
7417   ac_status=$?
7418   echo "$as_me:7418: \$? = $ac_status" >&5
7419   (exit $ac_status); }; }; then
7420   break
7421 else
7422   echo "$as_me: failed program was:" >&5
7423 cat conftest.$ac_ext >&5
7424 fi
7425 rm -f conftest.$ac_objext conftest.$ac_ext
7426                 done
7427                 echo "$as_me:7427: result: $CC_SHARED_OPTS" >&5
7428 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7429                 CFLAGS="$cf_save_CFLAGS"
7430         fi
7431
7432         cf_cv_shlib_version_infix=no
7433
7434         case $cf_cv_system_name in #(vi
7435         aix[56]*) #(vi
7436                 if test "$GCC" = yes; then
7437                         CC_SHARED_OPTS=
7438                         MK_SHARED_LIB='$(CC) -shared'
7439                 fi
7440                 ;;
7441         beos*) #(vi
7442                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7443                 ;;
7444         cygwin*) #(vi
7445                 CC_SHARED_OPTS=
7446                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7447                 cf_cv_shlib_version=cygdll
7448                 cf_cv_shlib_version_infix=cygdll
7449                 cat >mk_shared_lib.sh <<-CF_EOF
7450                 #!/bin/sh
7451                 SHARED_LIB=\$1
7452                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7453                 shift
7454                 cat <<-EOF
7455                 Linking shared library
7456                 ** SHARED_LIB \$SHARED_LIB
7457                 ** IMPORT_LIB \$IMPORT_LIB
7458 EOF
7459                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7460 CF_EOF
7461                 chmod +x mk_shared_lib.sh
7462                 ;;
7463         darwin*) #(vi
7464                 EXTRA_CFLAGS="-no-cpp-precomp"
7465                 CC_SHARED_OPTS="-dynamic"
7466                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7467                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7468                 cf_cv_shlib_version_infix=yes
7469                 echo "$as_me:7469: checking if ld -search_paths_first works" >&5
7470 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7471 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7472   echo $ECHO_N "(cached) $ECHO_C" >&6
7473 else
7474
7475                         cf_save_LDFLAGS=$LDFLAGS
7476                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7477                         cat >conftest.$ac_ext <<_ACEOF
7478 #line 7478 "configure"
7479 #include "confdefs.h"
7480
7481 int
7482 main ()
7483 {
7484 int i;
7485   ;
7486   return 0;
7487 }
7488 _ACEOF
7489 rm -f conftest.$ac_objext conftest$ac_exeext
7490 if { (eval echo "$as_me:7490: \"$ac_link\"") >&5
7491   (eval $ac_link) 2>&5
7492   ac_status=$?
7493   echo "$as_me:7493: \$? = $ac_status" >&5
7494   (exit $ac_status); } &&
7495          { ac_try='test -s conftest$ac_exeext'
7496   { (eval echo "$as_me:7496: \"$ac_try\"") >&5
7497   (eval $ac_try) 2>&5
7498   ac_status=$?
7499   echo "$as_me:7499: \$? = $ac_status" >&5
7500   (exit $ac_status); }; }; then
7501   cf_cv_ldflags_search_paths_first=yes
7502 else
7503   echo "$as_me: failed program was:" >&5
7504 cat conftest.$ac_ext >&5
7505 cf_cv_ldflags_search_paths_first=no
7506 fi
7507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7508                                 LDFLAGS=$cf_save_LDFLAGS
7509 fi
7510 echo "$as_me:7510: result: $cf_cv_ldflags_search_paths_first" >&5
7511 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7512                 if test $cf_cv_ldflags_search_paths_first = yes; then
7513                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7514                 fi
7515                 ;;
7516         hpux*) #(vi
7517                 # (tested with gcc 2.7.2 -- I don't have c89)
7518                 if test "$GCC" = yes; then
7519                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7520                 else
7521                         CC_SHARED_OPTS='+Z'
7522                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7523                 fi
7524                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7525                 # HP-UX shared libraries must be executable, and should be
7526                 # readonly to exploit a quirk in the memory manager.
7527                 INSTALL_LIB="-m 555"
7528                 ;;
7529         interix*)
7530                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7531                 if test "$cf_cv_shlib_version" = rel; then
7532                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
7533                 else
7534                         cf_shared_soname='`basename `'
7535                 fi
7536                 CC_SHARED_OPTS=
7537                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${libdir} -Wl,-h,'$cf_shared_soname' -o '
7538                 ;;
7539         irix*) #(vi
7540                 if test "$cf_cv_enable_rpath" = yes ; then
7541                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7542                 fi
7543                 # tested with IRIX 5.2 and 'cc'.
7544                 if test "$GCC" != yes; then
7545                         CC_SHARED_OPTS='-KPIC'
7546                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7547                 else
7548                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7549                 fi
7550                 cf_cv_rm_so_locs=yes
7551                 ;;
7552         linux*|gnu*|k*bsd*-gnu) #(vi
7553                 if test "$DFT_LWR_MODEL" = "shared" ; then
7554                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7555                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7556                 fi
7557                 if test "$cf_cv_enable_rpath" = yes ; then
7558                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7559                 fi
7560
7561         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7562         if test "$cf_cv_shlib_version" = rel; then
7563                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7564         else
7565                 cf_cv_shared_soname='`basename $@`'
7566         fi
7567
7568                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7569                 ;;
7570         openbsd[2-9].*|mirbsd*) #(vi
7571                 if test "$DFT_LWR_MODEL" = "shared" ; then
7572                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7573                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7574                 fi
7575                 if test "$cf_cv_enable_rpath" = yes ; then
7576                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7577                 fi
7578                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7579
7580         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7581         if test "$cf_cv_shlib_version" = rel; then
7582                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7583         else
7584                 cf_cv_shared_soname='`basename $@`'
7585         fi
7586
7587                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7588                 ;;
7589         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7590                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7591                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7592                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7593                 ;;
7594         freebsd*) #(vi
7595                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7596                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7597                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7598                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
7599                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7600                 fi
7601
7602         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7603         if test "$cf_cv_shlib_version" = rel; then
7604                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7605         else
7606                 cf_cv_shared_soname='`basename $@`'
7607         fi
7608
7609                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7610                 ;;
7611         netbsd*) #(vi
7612                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7613                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7614                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7615                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7616                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7617                         if test "$cf_cv_shlib_version" = auto; then
7618                         if test -f /usr/libexec/ld.elf_so; then
7619                                 cf_cv_shlib_version=abi
7620                         else
7621                                 cf_cv_shlib_version=rel
7622                         fi
7623                         fi
7624
7625         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7626         if test "$cf_cv_shlib_version" = rel; then
7627                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7628         else
7629                 cf_cv_shared_soname='`basename $@`'
7630         fi
7631
7632                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7633                 else
7634                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7635                 fi
7636                 ;;
7637         osf*|mls+*) #(vi
7638                 # tested with OSF/1 V3.2 and 'cc'
7639                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7640                 # link with shared libs).
7641                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7642                 case $host_os in #(vi
7643                 osf4*)
7644                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7645                         ;;
7646                 esac
7647                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7648                 if test "$DFT_LWR_MODEL" = "shared" ; then
7649                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7650                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7651                 fi
7652                 cf_cv_rm_so_locs=yes
7653                 ;;
7654         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7655                 # tested with osr5.0.5
7656                 if test "$GCC" != yes; then
7657                         CC_SHARED_OPTS='-belf -KPIC'
7658                 fi
7659                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7660                 if test "$cf_cv_enable_rpath" = yes ; then
7661                         # only way is to set LD_RUN_PATH but no switch for it
7662                         RUN_PATH=$libdir
7663                 fi
7664                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7665                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7666                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7667                 ;;
7668         sunos4*) #(vi
7669                 # tested with SunOS 4.1.1 and gcc 2.7.0
7670                 if test "$GCC" != yes; then
7671                         CC_SHARED_OPTS='-KPIC'
7672                 fi
7673                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7674                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7675                 ;;
7676         solaris2*) #(vi
7677                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7678                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7679                 if test "$DFT_LWR_MODEL" = "shared" ; then
7680                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7681                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7682                 fi
7683                 if test "$cf_cv_enable_rpath" = yes ; then
7684                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7685                 fi
7686
7687         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7688         if test "$cf_cv_shlib_version" = rel; then
7689                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7690         else
7691                 cf_cv_shared_soname='`basename $@`'
7692         fi
7693
7694                 if test "$GCC" != yes; then
7695                         cf_save_CFLAGS="$CFLAGS"
7696                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7697                         do
7698                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7699                                 cat >conftest.$ac_ext <<_ACEOF
7700 #line 7700 "configure"
7701 #include "confdefs.h"
7702 #include <stdio.h>
7703 int
7704 main ()
7705 {
7706 printf("Hello\n");
7707   ;
7708   return 0;
7709 }
7710 _ACEOF
7711 rm -f conftest.$ac_objext
7712 if { (eval echo "$as_me:7712: \"$ac_compile\"") >&5
7713   (eval $ac_compile) 2>&5
7714   ac_status=$?
7715   echo "$as_me:7715: \$? = $ac_status" >&5
7716   (exit $ac_status); } &&
7717          { ac_try='test -s conftest.$ac_objext'
7718   { (eval echo "$as_me:7718: \"$ac_try\"") >&5
7719   (eval $ac_try) 2>&5
7720   ac_status=$?
7721   echo "$as_me:7721: \$? = $ac_status" >&5
7722   (exit $ac_status); }; }; then
7723   break
7724 else
7725   echo "$as_me: failed program was:" >&5
7726 cat conftest.$ac_ext >&5
7727 fi
7728 rm -f conftest.$ac_objext conftest.$ac_ext
7729                         done
7730                         CFLAGS="$cf_save_CFLAGS"
7731                         CC_SHARED_OPTS=$cf_shared_opts
7732                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7733                 else
7734                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7735                 fi
7736                 ;;
7737         sysv5uw7*|unix_sv*) #(vi
7738                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7739                 if test "$GCC" != yes; then
7740                         CC_SHARED_OPTS='-KPIC'
7741                 fi
7742                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7743                 ;;
7744         *)
7745                 CC_SHARED_OPTS='unknown'
7746                 MK_SHARED_LIB='echo unknown'
7747                 ;;
7748         esac
7749
7750         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7751         case "$cf_cv_shlib_version" in #(vi
7752         rel|abi)
7753                 case "$MK_SHARED_LIB" in #(vi
7754                 *'-o $@') #(vi
7755                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7756                         ;;
7757                 *)
7758                         { echo "$as_me:7758: WARNING: ignored --with-shlib-version" >&5
7759 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7760                         ;;
7761                 esac
7762                 ;;
7763         esac
7764
7765         if test -n "$cf_ld_rpath_opt" ; then
7766                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
7767         fi
7768
7769 # The test/sample programs in the original tree link using rpath option.
7770 # Make it optional for packagers.
7771 if test -n "$LOCAL_LDFLAGS"
7772 then
7773         echo "$as_me:7773: checking if you want to link sample programs with rpath option" >&5
7774 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
7775
7776 # Check whether --enable-rpath-link or --disable-rpath-link was given.
7777 if test "${enable_rpath_link+set}" = set; then
7778   enableval="$enable_rpath_link"
7779   with_rpath_link=$enableval
7780 else
7781   with_rpath_link=yes
7782 fi;
7783         echo "$as_me:7783: result: $with_rpath_link" >&5
7784 echo "${ECHO_T}$with_rpath_link" >&6
7785         if test "$with_rpath_link" = no
7786         then
7787                 LOCAL_LDFLAGS=
7788                 LOCAL_LDFLAGS2=
7789         fi
7790 fi
7791
7792 ###############################################################################
7793
7794         case $cf_cv_system_name in
7795         os2*)   PATH_SEPARATOR=';'  ;;
7796         *)      PATH_SEPARATOR=':'  ;;
7797         esac
7798
7799 ###   use option --enable-broken-linker to force on use of broken-linker support
7800 echo "$as_me:7800: checking if you want broken-linker support code" >&5
7801 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7802
7803 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7804 if test "${enable_broken_linker+set}" = set; then
7805   enableval="$enable_broken_linker"
7806   with_broken_linker=$enableval
7807 else
7808   with_broken_linker=${BROKEN_LINKER:-no}
7809 fi;
7810 echo "$as_me:7810: result: $with_broken_linker" >&5
7811 echo "${ECHO_T}$with_broken_linker" >&6
7812
7813 BROKEN_LINKER=0
7814 if test "$with_broken_linker" = yes ; then
7815         cat >>confdefs.h <<\EOF
7816 #define BROKEN_LINKER 1
7817 EOF
7818
7819         BROKEN_LINKER=1
7820 elif test "$DFT_LWR_MODEL" = shared ; then
7821         case $cf_cv_system_name in #(vi
7822         cygwin*)
7823                 cat >>confdefs.h <<\EOF
7824 #define BROKEN_LINKER 1
7825 EOF
7826
7827                 BROKEN_LINKER=1
7828                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7829
7830 echo "${as_me:-configure}:7830: testing cygwin linker is broken anyway ..." 1>&5
7831
7832                 ;;
7833         esac
7834 fi
7835
7836 # Check to define _XOPEN_SOURCE "automatically"
7837
7838 cf_XOPEN_SOURCE=500
7839 cf_POSIX_C_SOURCE=199506L
7840 cf_xopen_source=
7841
7842 case $host_os in #(vi
7843 aix[456]*) #(vi
7844         cf_xopen_source="-D_ALL_SOURCE"
7845         ;;
7846 cygwin) #(vi
7847         cf_XOPEN_SOURCE=600
7848         ;;
7849 darwin[0-8].*) #(vi
7850         cf_xopen_source="-D_APPLE_C_SOURCE"
7851         ;;
7852 darwin*) #(vi
7853         cf_xopen_source="-D_DARWIN_C_SOURCE"
7854         ;;
7855 freebsd*|dragonfly*) #(vi
7856         # 5.x headers associate
7857         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7858         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7859         cf_POSIX_C_SOURCE=200112L
7860         cf_XOPEN_SOURCE=600
7861         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7862         ;;
7863 hpux11*) #(vi
7864         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7865         ;;
7866 hpux*) #(vi
7867         cf_xopen_source="-D_HPUX_SOURCE"
7868         ;;
7869 irix[56].*) #(vi
7870         cf_xopen_source="-D_SGI_SOURCE"
7871         ;;
7872 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7873
7874 echo "$as_me:7874: checking if we must define _GNU_SOURCE" >&5
7875 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7876 if test "${cf_cv_gnu_source+set}" = set; then
7877   echo $ECHO_N "(cached) $ECHO_C" >&6
7878 else
7879
7880 cat >conftest.$ac_ext <<_ACEOF
7881 #line 7881 "configure"
7882 #include "confdefs.h"
7883 #include <sys/types.h>
7884 int
7885 main ()
7886 {
7887
7888 #ifndef _XOPEN_SOURCE
7889 make an error
7890 #endif
7891   ;
7892   return 0;
7893 }
7894 _ACEOF
7895 rm -f conftest.$ac_objext
7896 if { (eval echo "$as_me:7896: \"$ac_compile\"") >&5
7897   (eval $ac_compile) 2>&5
7898   ac_status=$?
7899   echo "$as_me:7899: \$? = $ac_status" >&5
7900   (exit $ac_status); } &&
7901          { ac_try='test -s conftest.$ac_objext'
7902   { (eval echo "$as_me:7902: \"$ac_try\"") >&5
7903   (eval $ac_try) 2>&5
7904   ac_status=$?
7905   echo "$as_me:7905: \$? = $ac_status" >&5
7906   (exit $ac_status); }; }; then
7907   cf_cv_gnu_source=no
7908 else
7909   echo "$as_me: failed program was:" >&5
7910 cat conftest.$ac_ext >&5
7911 cf_save="$CPPFLAGS"
7912          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7913          cat >conftest.$ac_ext <<_ACEOF
7914 #line 7914 "configure"
7915 #include "confdefs.h"
7916 #include <sys/types.h>
7917 int
7918 main ()
7919 {
7920
7921 #ifdef _XOPEN_SOURCE
7922 make an error
7923 #endif
7924   ;
7925   return 0;
7926 }
7927 _ACEOF
7928 rm -f conftest.$ac_objext
7929 if { (eval echo "$as_me:7929: \"$ac_compile\"") >&5
7930   (eval $ac_compile) 2>&5
7931   ac_status=$?
7932   echo "$as_me:7932: \$? = $ac_status" >&5
7933   (exit $ac_status); } &&
7934          { ac_try='test -s conftest.$ac_objext'
7935   { (eval echo "$as_me:7935: \"$ac_try\"") >&5
7936   (eval $ac_try) 2>&5
7937   ac_status=$?
7938   echo "$as_me:7938: \$? = $ac_status" >&5
7939   (exit $ac_status); }; }; then
7940   cf_cv_gnu_source=no
7941 else
7942   echo "$as_me: failed program was:" >&5
7943 cat conftest.$ac_ext >&5
7944 cf_cv_gnu_source=yes
7945 fi
7946 rm -f conftest.$ac_objext conftest.$ac_ext
7947         CPPFLAGS="$cf_save"
7948
7949 fi
7950 rm -f conftest.$ac_objext conftest.$ac_ext
7951
7952 fi
7953 echo "$as_me:7953: result: $cf_cv_gnu_source" >&5
7954 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7955 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7956
7957         ;;
7958 mirbsd*) #(vi
7959         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7960         ;;
7961 netbsd*) #(vi
7962         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7963         ;;
7964 openbsd*) #(vi
7965         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7966         ;;
7967 osf[45]*) #(vi
7968         cf_xopen_source="-D_OSF_SOURCE"
7969         ;;
7970 nto-qnx*) #(vi
7971         cf_xopen_source="-D_QNX_SOURCE"
7972         ;;
7973 sco*) #(vi
7974         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7975         ;;
7976 solaris2.1[0-9]) #(vi
7977         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7978         ;;
7979 solaris2.[1-9]) #(vi
7980         cf_xopen_source="-D__EXTENSIONS__"
7981         ;;
7982 *)
7983         echo "$as_me:7983: checking if we should define _XOPEN_SOURCE" >&5
7984 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7985 if test "${cf_cv_xopen_source+set}" = set; then
7986   echo $ECHO_N "(cached) $ECHO_C" >&6
7987 else
7988
7989         cat >conftest.$ac_ext <<_ACEOF
7990 #line 7990 "configure"
7991 #include "confdefs.h"
7992 #include <sys/types.h>
7993 int
7994 main ()
7995 {
7996
7997 #ifndef _XOPEN_SOURCE
7998 make an error
7999 #endif
8000   ;
8001   return 0;
8002 }
8003 _ACEOF
8004 rm -f conftest.$ac_objext
8005 if { (eval echo "$as_me:8005: \"$ac_compile\"") >&5
8006   (eval $ac_compile) 2>&5
8007   ac_status=$?
8008   echo "$as_me:8008: \$? = $ac_status" >&5
8009   (exit $ac_status); } &&
8010          { ac_try='test -s conftest.$ac_objext'
8011   { (eval echo "$as_me:8011: \"$ac_try\"") >&5
8012   (eval $ac_try) 2>&5
8013   ac_status=$?
8014   echo "$as_me:8014: \$? = $ac_status" >&5
8015   (exit $ac_status); }; }; then
8016   cf_cv_xopen_source=no
8017 else
8018   echo "$as_me: failed program was:" >&5
8019 cat conftest.$ac_ext >&5
8020 cf_save="$CPPFLAGS"
8021          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8022          cat >conftest.$ac_ext <<_ACEOF
8023 #line 8023 "configure"
8024 #include "confdefs.h"
8025 #include <sys/types.h>
8026 int
8027 main ()
8028 {
8029
8030 #ifdef _XOPEN_SOURCE
8031 make an error
8032 #endif
8033   ;
8034   return 0;
8035 }
8036 _ACEOF
8037 rm -f conftest.$ac_objext
8038 if { (eval echo "$as_me:8038: \"$ac_compile\"") >&5
8039   (eval $ac_compile) 2>&5
8040   ac_status=$?
8041   echo "$as_me:8041: \$? = $ac_status" >&5
8042   (exit $ac_status); } &&
8043          { ac_try='test -s conftest.$ac_objext'
8044   { (eval echo "$as_me:8044: \"$ac_try\"") >&5
8045   (eval $ac_try) 2>&5
8046   ac_status=$?
8047   echo "$as_me:8047: \$? = $ac_status" >&5
8048   (exit $ac_status); }; }; then
8049   cf_cv_xopen_source=no
8050 else
8051   echo "$as_me: failed program was:" >&5
8052 cat conftest.$ac_ext >&5
8053 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8054 fi
8055 rm -f conftest.$ac_objext conftest.$ac_ext
8056         CPPFLAGS="$cf_save"
8057
8058 fi
8059 rm -f conftest.$ac_objext conftest.$ac_ext
8060
8061 fi
8062 echo "$as_me:8062: result: $cf_cv_xopen_source" >&5
8063 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8064         if test "$cf_cv_xopen_source" != no ; then
8065
8066 CFLAGS=`echo "$CFLAGS" | \
8067         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8068                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8069
8070 CPPFLAGS=`echo "$CPPFLAGS" | \
8071         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8072                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8073
8074                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8075
8076 cf_fix_cppflags=no
8077 cf_new_cflags=
8078 cf_new_cppflags=
8079 cf_new_extra_cppflags=
8080
8081 for cf_add_cflags in $cf_temp_xopen_source
8082 do
8083 case $cf_fix_cppflags in
8084 no)
8085         case $cf_add_cflags in #(vi
8086         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8087                 case $cf_add_cflags in
8088                 -D*)
8089                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8090
8091                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8092                                 && test -z "${cf_tst_cflags}" \
8093                                 && cf_fix_cppflags=yes
8094
8095                         if test $cf_fix_cppflags = yes ; then
8096                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8097                                 continue
8098                         elif test "${cf_tst_cflags}" = "\"'" ; then
8099                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8100                                 continue
8101                         fi
8102                         ;;
8103                 esac
8104                 case "$CPPFLAGS" in
8105                 *$cf_add_cflags) #(vi
8106                         ;;
8107                 *) #(vi
8108                         case $cf_add_cflags in #(vi
8109                         -D*)
8110                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8111
8112 CPPFLAGS=`echo "$CPPFLAGS" | \
8113         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8114                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8115
8116                                 ;;
8117                         esac
8118                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8119                         ;;
8120                 esac
8121                 ;;
8122         *)
8123                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8124                 ;;
8125         esac
8126         ;;
8127 yes)
8128         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8129
8130         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8131
8132         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8133                 && test -z "${cf_tst_cflags}" \
8134                 && cf_fix_cppflags=no
8135         ;;
8136 esac
8137 done
8138
8139 if test -n "$cf_new_cflags" ; then
8140
8141         CFLAGS="$CFLAGS $cf_new_cflags"
8142 fi
8143
8144 if test -n "$cf_new_cppflags" ; then
8145
8146         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8147 fi
8148
8149 if test -n "$cf_new_extra_cppflags" ; then
8150
8151         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8152 fi
8153
8154         fi
8155
8156 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8157
8158 cf_save_CFLAGS="$CFLAGS"
8159 cf_save_CPPFLAGS="$CPPFLAGS"
8160
8161 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8162         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8163                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8164
8165 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8166         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8167                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8168
8169 echo "$as_me:8169: checking if we should define _POSIX_C_SOURCE" >&5
8170 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8171 if test "${cf_cv_posix_c_source+set}" = set; then
8172   echo $ECHO_N "(cached) $ECHO_C" >&6
8173 else
8174
8175 echo "${as_me:-configure}:8175: testing if the symbol is already defined go no further ..." 1>&5
8176
8177         cat >conftest.$ac_ext <<_ACEOF
8178 #line 8178 "configure"
8179 #include "confdefs.h"
8180 #include <sys/types.h>
8181 int
8182 main ()
8183 {
8184
8185 #ifndef _POSIX_C_SOURCE
8186 make an error
8187 #endif
8188   ;
8189   return 0;
8190 }
8191 _ACEOF
8192 rm -f conftest.$ac_objext
8193 if { (eval echo "$as_me:8193: \"$ac_compile\"") >&5
8194   (eval $ac_compile) 2>&5
8195   ac_status=$?
8196   echo "$as_me:8196: \$? = $ac_status" >&5
8197   (exit $ac_status); } &&
8198          { ac_try='test -s conftest.$ac_objext'
8199   { (eval echo "$as_me:8199: \"$ac_try\"") >&5
8200   (eval $ac_try) 2>&5
8201   ac_status=$?
8202   echo "$as_me:8202: \$? = $ac_status" >&5
8203   (exit $ac_status); }; }; then
8204   cf_cv_posix_c_source=no
8205 else
8206   echo "$as_me: failed program was:" >&5
8207 cat conftest.$ac_ext >&5
8208 cf_want_posix_source=no
8209          case .$cf_POSIX_C_SOURCE in #(vi
8210          .[12]??*) #(vi
8211                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8212                 ;;
8213          .2) #(vi
8214                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8215                 cf_want_posix_source=yes
8216                 ;;
8217          .*)
8218                 cf_want_posix_source=yes
8219                 ;;
8220          esac
8221          if test "$cf_want_posix_source" = yes ; then
8222                 cat >conftest.$ac_ext <<_ACEOF
8223 #line 8223 "configure"
8224 #include "confdefs.h"
8225 #include <sys/types.h>
8226 int
8227 main ()
8228 {
8229
8230 #ifdef _POSIX_SOURCE
8231 make an error
8232 #endif
8233   ;
8234   return 0;
8235 }
8236 _ACEOF
8237 rm -f conftest.$ac_objext
8238 if { (eval echo "$as_me:8238: \"$ac_compile\"") >&5
8239   (eval $ac_compile) 2>&5
8240   ac_status=$?
8241   echo "$as_me:8241: \$? = $ac_status" >&5
8242   (exit $ac_status); } &&
8243          { ac_try='test -s conftest.$ac_objext'
8244   { (eval echo "$as_me:8244: \"$ac_try\"") >&5
8245   (eval $ac_try) 2>&5
8246   ac_status=$?
8247   echo "$as_me:8247: \$? = $ac_status" >&5
8248   (exit $ac_status); }; }; then
8249   :
8250 else
8251   echo "$as_me: failed program was:" >&5
8252 cat conftest.$ac_ext >&5
8253 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8254 fi
8255 rm -f conftest.$ac_objext conftest.$ac_ext
8256          fi
8257
8258 echo "${as_me:-configure}:8258: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8259
8260          CFLAGS="$cf_trim_CFLAGS"
8261          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8262
8263 echo "${as_me:-configure}:8263: testing if the second compile does not leave our definition intact error ..." 1>&5
8264
8265          cat >conftest.$ac_ext <<_ACEOF
8266 #line 8266 "configure"
8267 #include "confdefs.h"
8268 #include <sys/types.h>
8269 int
8270 main ()
8271 {
8272
8273 #ifndef _POSIX_C_SOURCE
8274 make an error
8275 #endif
8276   ;
8277   return 0;
8278 }
8279 _ACEOF
8280 rm -f conftest.$ac_objext
8281 if { (eval echo "$as_me:8281: \"$ac_compile\"") >&5
8282   (eval $ac_compile) 2>&5
8283   ac_status=$?
8284   echo "$as_me:8284: \$? = $ac_status" >&5
8285   (exit $ac_status); } &&
8286          { ac_try='test -s conftest.$ac_objext'
8287   { (eval echo "$as_me:8287: \"$ac_try\"") >&5
8288   (eval $ac_try) 2>&5
8289   ac_status=$?
8290   echo "$as_me:8290: \$? = $ac_status" >&5
8291   (exit $ac_status); }; }; then
8292   :
8293 else
8294   echo "$as_me: failed program was:" >&5
8295 cat conftest.$ac_ext >&5
8296 cf_cv_posix_c_source=no
8297 fi
8298 rm -f conftest.$ac_objext conftest.$ac_ext
8299          CFLAGS="$cf_save_CFLAGS"
8300          CPPFLAGS="$cf_save_CPPFLAGS"
8301
8302 fi
8303 rm -f conftest.$ac_objext conftest.$ac_ext
8304
8305 fi
8306 echo "$as_me:8306: result: $cf_cv_posix_c_source" >&5
8307 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8308
8309 if test "$cf_cv_posix_c_source" != no ; then
8310         CFLAGS="$cf_trim_CFLAGS"
8311         CPPFLAGS="$cf_trim_CPPFLAGS"
8312
8313 cf_fix_cppflags=no
8314 cf_new_cflags=
8315 cf_new_cppflags=
8316 cf_new_extra_cppflags=
8317
8318 for cf_add_cflags in $cf_cv_posix_c_source
8319 do
8320 case $cf_fix_cppflags in
8321 no)
8322         case $cf_add_cflags in #(vi
8323         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8324                 case $cf_add_cflags in
8325                 -D*)
8326                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8327
8328                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8329                                 && test -z "${cf_tst_cflags}" \
8330                                 && cf_fix_cppflags=yes
8331
8332                         if test $cf_fix_cppflags = yes ; then
8333                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8334                                 continue
8335                         elif test "${cf_tst_cflags}" = "\"'" ; then
8336                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8337                                 continue
8338                         fi
8339                         ;;
8340                 esac
8341                 case "$CPPFLAGS" in
8342                 *$cf_add_cflags) #(vi
8343                         ;;
8344                 *) #(vi
8345                         case $cf_add_cflags in #(vi
8346                         -D*)
8347                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8348
8349 CPPFLAGS=`echo "$CPPFLAGS" | \
8350         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8351                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8352
8353                                 ;;
8354                         esac
8355                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8356                         ;;
8357                 esac
8358                 ;;
8359         *)
8360                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8361                 ;;
8362         esac
8363         ;;
8364 yes)
8365         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8366
8367         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8368
8369         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8370                 && test -z "${cf_tst_cflags}" \
8371                 && cf_fix_cppflags=no
8372         ;;
8373 esac
8374 done
8375
8376 if test -n "$cf_new_cflags" ; then
8377
8378         CFLAGS="$CFLAGS $cf_new_cflags"
8379 fi
8380
8381 if test -n "$cf_new_cppflags" ; then
8382
8383         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8384 fi
8385
8386 if test -n "$cf_new_extra_cppflags" ; then
8387
8388         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8389 fi
8390
8391 fi
8392
8393         ;;
8394 esac
8395
8396 if test -n "$cf_xopen_source" ; then
8397
8398 cf_fix_cppflags=no
8399 cf_new_cflags=
8400 cf_new_cppflags=
8401 cf_new_extra_cppflags=
8402
8403 for cf_add_cflags in $cf_xopen_source
8404 do
8405 case $cf_fix_cppflags in
8406 no)
8407         case $cf_add_cflags in #(vi
8408         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8409                 case $cf_add_cflags in
8410                 -D*)
8411                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8412
8413                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8414                                 && test -z "${cf_tst_cflags}" \
8415                                 && cf_fix_cppflags=yes
8416
8417                         if test $cf_fix_cppflags = yes ; then
8418                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8419                                 continue
8420                         elif test "${cf_tst_cflags}" = "\"'" ; then
8421                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8422                                 continue
8423                         fi
8424                         ;;
8425                 esac
8426                 case "$CPPFLAGS" in
8427                 *$cf_add_cflags) #(vi
8428                         ;;
8429                 *) #(vi
8430                         case $cf_add_cflags in #(vi
8431                         -D*)
8432                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8433
8434 CPPFLAGS=`echo "$CPPFLAGS" | \
8435         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8436                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8437
8438                                 ;;
8439                         esac
8440                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8441                         ;;
8442                 esac
8443                 ;;
8444         *)
8445                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8446                 ;;
8447         esac
8448         ;;
8449 yes)
8450         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8451
8452         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8453
8454         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8455                 && test -z "${cf_tst_cflags}" \
8456                 && cf_fix_cppflags=no
8457         ;;
8458 esac
8459 done
8460
8461 if test -n "$cf_new_cflags" ; then
8462
8463         CFLAGS="$CFLAGS $cf_new_cflags"
8464 fi
8465
8466 if test -n "$cf_new_cppflags" ; then
8467
8468         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8469 fi
8470
8471 if test -n "$cf_new_extra_cppflags" ; then
8472
8473         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8474 fi
8475
8476 fi
8477
8478 # Check whether --enable-largefile or --disable-largefile was given.
8479 if test "${enable_largefile+set}" = set; then
8480   enableval="$enable_largefile"
8481
8482 fi;
8483 if test "$enable_largefile" != no; then
8484
8485   echo "$as_me:8485: checking for special C compiler options needed for large files" >&5
8486 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8487 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8488   echo $ECHO_N "(cached) $ECHO_C" >&6
8489 else
8490   ac_cv_sys_largefile_CC=no
8491      if test "$GCC" != yes; then
8492        ac_save_CC=$CC
8493        while :; do
8494          # IRIX 6.2 and later do not support large files by default,
8495          # so use the C compiler's -n32 option if that helps.
8496          cat >conftest.$ac_ext <<_ACEOF
8497 #line 8497 "configure"
8498 #include "confdefs.h"
8499 #include <sys/types.h>
8500  /* Check that off_t can represent 2**63 - 1 correctly.
8501     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8502     since some C++ compilers masquerading as C compilers
8503     incorrectly reject 9223372036854775807.  */
8504 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8505   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8506                        && LARGE_OFF_T % 2147483647 == 1)
8507                       ? 1 : -1];
8508 int
8509 main ()
8510 {
8511
8512   ;
8513   return 0;
8514 }
8515 _ACEOF
8516          rm -f conftest.$ac_objext
8517 if { (eval echo "$as_me:8517: \"$ac_compile\"") >&5
8518   (eval $ac_compile) 2>&5
8519   ac_status=$?
8520   echo "$as_me:8520: \$? = $ac_status" >&5
8521   (exit $ac_status); } &&
8522          { ac_try='test -s conftest.$ac_objext'
8523   { (eval echo "$as_me:8523: \"$ac_try\"") >&5
8524   (eval $ac_try) 2>&5
8525   ac_status=$?
8526   echo "$as_me:8526: \$? = $ac_status" >&5
8527   (exit $ac_status); }; }; then
8528   break
8529 else
8530   echo "$as_me: failed program was:" >&5
8531 cat conftest.$ac_ext >&5
8532 fi
8533 rm -f conftest.$ac_objext
8534          CC="$CC -n32"
8535          rm -f conftest.$ac_objext
8536 if { (eval echo "$as_me:8536: \"$ac_compile\"") >&5
8537   (eval $ac_compile) 2>&5
8538   ac_status=$?
8539   echo "$as_me:8539: \$? = $ac_status" >&5
8540   (exit $ac_status); } &&
8541          { ac_try='test -s conftest.$ac_objext'
8542   { (eval echo "$as_me:8542: \"$ac_try\"") >&5
8543   (eval $ac_try) 2>&5
8544   ac_status=$?
8545   echo "$as_me:8545: \$? = $ac_status" >&5
8546   (exit $ac_status); }; }; then
8547   ac_cv_sys_largefile_CC=' -n32'; break
8548 else
8549   echo "$as_me: failed program was:" >&5
8550 cat conftest.$ac_ext >&5
8551 fi
8552 rm -f conftest.$ac_objext
8553          break
8554        done
8555        CC=$ac_save_CC
8556        rm -f conftest.$ac_ext
8557     fi
8558 fi
8559 echo "$as_me:8559: result: $ac_cv_sys_largefile_CC" >&5
8560 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8561   if test "$ac_cv_sys_largefile_CC" != no; then
8562     CC=$CC$ac_cv_sys_largefile_CC
8563   fi
8564
8565   echo "$as_me:8565: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8566 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8567 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8568   echo $ECHO_N "(cached) $ECHO_C" >&6
8569 else
8570   while :; do
8571   ac_cv_sys_file_offset_bits=no
8572   cat >conftest.$ac_ext <<_ACEOF
8573 #line 8573 "configure"
8574 #include "confdefs.h"
8575 #include <sys/types.h>
8576  /* Check that off_t can represent 2**63 - 1 correctly.
8577     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8578     since some C++ compilers masquerading as C compilers
8579     incorrectly reject 9223372036854775807.  */
8580 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8581   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8582                        && LARGE_OFF_T % 2147483647 == 1)
8583                       ? 1 : -1];
8584 int
8585 main ()
8586 {
8587
8588   ;
8589   return 0;
8590 }
8591 _ACEOF
8592 rm -f conftest.$ac_objext
8593 if { (eval echo "$as_me:8593: \"$ac_compile\"") >&5
8594   (eval $ac_compile) 2>&5
8595   ac_status=$?
8596   echo "$as_me:8596: \$? = $ac_status" >&5
8597   (exit $ac_status); } &&
8598          { ac_try='test -s conftest.$ac_objext'
8599   { (eval echo "$as_me:8599: \"$ac_try\"") >&5
8600   (eval $ac_try) 2>&5
8601   ac_status=$?
8602   echo "$as_me:8602: \$? = $ac_status" >&5
8603   (exit $ac_status); }; }; then
8604   break
8605 else
8606   echo "$as_me: failed program was:" >&5
8607 cat conftest.$ac_ext >&5
8608 fi
8609 rm -f conftest.$ac_objext conftest.$ac_ext
8610   cat >conftest.$ac_ext <<_ACEOF
8611 #line 8611 "configure"
8612 #include "confdefs.h"
8613 #define _FILE_OFFSET_BITS 64
8614 #include <sys/types.h>
8615  /* Check that off_t can represent 2**63 - 1 correctly.
8616     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8617     since some C++ compilers masquerading as C compilers
8618     incorrectly reject 9223372036854775807.  */
8619 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8620   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8621                        && LARGE_OFF_T % 2147483647 == 1)
8622                       ? 1 : -1];
8623 int
8624 main ()
8625 {
8626
8627   ;
8628   return 0;
8629 }
8630 _ACEOF
8631 rm -f conftest.$ac_objext
8632 if { (eval echo "$as_me:8632: \"$ac_compile\"") >&5
8633   (eval $ac_compile) 2>&5
8634   ac_status=$?
8635   echo "$as_me:8635: \$? = $ac_status" >&5
8636   (exit $ac_status); } &&
8637          { ac_try='test -s conftest.$ac_objext'
8638   { (eval echo "$as_me:8638: \"$ac_try\"") >&5
8639   (eval $ac_try) 2>&5
8640   ac_status=$?
8641   echo "$as_me:8641: \$? = $ac_status" >&5
8642   (exit $ac_status); }; }; then
8643   ac_cv_sys_file_offset_bits=64; break
8644 else
8645   echo "$as_me: failed program was:" >&5
8646 cat conftest.$ac_ext >&5
8647 fi
8648 rm -f conftest.$ac_objext conftest.$ac_ext
8649   break
8650 done
8651 fi
8652 echo "$as_me:8652: result: $ac_cv_sys_file_offset_bits" >&5
8653 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8654 if test "$ac_cv_sys_file_offset_bits" != no; then
8655
8656 cat >>confdefs.h <<EOF
8657 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8658 EOF
8659
8660 fi
8661 rm -rf conftest*
8662   echo "$as_me:8662: checking for _LARGE_FILES value needed for large files" >&5
8663 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8664 if test "${ac_cv_sys_large_files+set}" = set; then
8665   echo $ECHO_N "(cached) $ECHO_C" >&6
8666 else
8667   while :; do
8668   ac_cv_sys_large_files=no
8669   cat >conftest.$ac_ext <<_ACEOF
8670 #line 8670 "configure"
8671 #include "confdefs.h"
8672 #include <sys/types.h>
8673  /* Check that off_t can represent 2**63 - 1 correctly.
8674     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8675     since some C++ compilers masquerading as C compilers
8676     incorrectly reject 9223372036854775807.  */
8677 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8678   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8679                        && LARGE_OFF_T % 2147483647 == 1)
8680                       ? 1 : -1];
8681 int
8682 main ()
8683 {
8684
8685   ;
8686   return 0;
8687 }
8688 _ACEOF
8689 rm -f conftest.$ac_objext
8690 if { (eval echo "$as_me:8690: \"$ac_compile\"") >&5
8691   (eval $ac_compile) 2>&5
8692   ac_status=$?
8693   echo "$as_me:8693: \$? = $ac_status" >&5
8694   (exit $ac_status); } &&
8695          { ac_try='test -s conftest.$ac_objext'
8696   { (eval echo "$as_me:8696: \"$ac_try\"") >&5
8697   (eval $ac_try) 2>&5
8698   ac_status=$?
8699   echo "$as_me:8699: \$? = $ac_status" >&5
8700   (exit $ac_status); }; }; then
8701   break
8702 else
8703   echo "$as_me: failed program was:" >&5
8704 cat conftest.$ac_ext >&5
8705 fi
8706 rm -f conftest.$ac_objext conftest.$ac_ext
8707   cat >conftest.$ac_ext <<_ACEOF
8708 #line 8708 "configure"
8709 #include "confdefs.h"
8710 #define _LARGE_FILES 1
8711 #include <sys/types.h>
8712  /* Check that off_t can represent 2**63 - 1 correctly.
8713     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8714     since some C++ compilers masquerading as C compilers
8715     incorrectly reject 9223372036854775807.  */
8716 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8717   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8718                        && LARGE_OFF_T % 2147483647 == 1)
8719                       ? 1 : -1];
8720 int
8721 main ()
8722 {
8723
8724   ;
8725   return 0;
8726 }
8727 _ACEOF
8728 rm -f conftest.$ac_objext
8729 if { (eval echo "$as_me:8729: \"$ac_compile\"") >&5
8730   (eval $ac_compile) 2>&5
8731   ac_status=$?
8732   echo "$as_me:8732: \$? = $ac_status" >&5
8733   (exit $ac_status); } &&
8734          { ac_try='test -s conftest.$ac_objext'
8735   { (eval echo "$as_me:8735: \"$ac_try\"") >&5
8736   (eval $ac_try) 2>&5
8737   ac_status=$?
8738   echo "$as_me:8738: \$? = $ac_status" >&5
8739   (exit $ac_status); }; }; then
8740   ac_cv_sys_large_files=1; break
8741 else
8742   echo "$as_me: failed program was:" >&5
8743 cat conftest.$ac_ext >&5
8744 fi
8745 rm -f conftest.$ac_objext conftest.$ac_ext
8746   break
8747 done
8748 fi
8749 echo "$as_me:8749: result: $ac_cv_sys_large_files" >&5
8750 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8751 if test "$ac_cv_sys_large_files" != no; then
8752
8753 cat >>confdefs.h <<EOF
8754 #define _LARGE_FILES $ac_cv_sys_large_files
8755 EOF
8756
8757 fi
8758 rm -rf conftest*
8759 fi
8760
8761     if test "$enable_largefile" != no ; then
8762         echo "$as_me:8762: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8763 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8764 if test "${ac_cv_sys_largefile_source+set}" = set; then
8765   echo $ECHO_N "(cached) $ECHO_C" >&6
8766 else
8767   while :; do
8768   ac_cv_sys_largefile_source=no
8769   cat >conftest.$ac_ext <<_ACEOF
8770 #line 8770 "configure"
8771 #include "confdefs.h"
8772 #include <stdio.h>
8773 int
8774 main ()
8775 {
8776 return !fseeko;
8777   ;
8778   return 0;
8779 }
8780 _ACEOF
8781 rm -f conftest.$ac_objext
8782 if { (eval echo "$as_me:8782: \"$ac_compile\"") >&5
8783   (eval $ac_compile) 2>&5
8784   ac_status=$?
8785   echo "$as_me:8785: \$? = $ac_status" >&5
8786   (exit $ac_status); } &&
8787          { ac_try='test -s conftest.$ac_objext'
8788   { (eval echo "$as_me:8788: \"$ac_try\"") >&5
8789   (eval $ac_try) 2>&5
8790   ac_status=$?
8791   echo "$as_me:8791: \$? = $ac_status" >&5
8792   (exit $ac_status); }; }; then
8793   break
8794 else
8795   echo "$as_me: failed program was:" >&5
8796 cat conftest.$ac_ext >&5
8797 fi
8798 rm -f conftest.$ac_objext conftest.$ac_ext
8799   cat >conftest.$ac_ext <<_ACEOF
8800 #line 8800 "configure"
8801 #include "confdefs.h"
8802 #define _LARGEFILE_SOURCE 1
8803 #include <stdio.h>
8804 int
8805 main ()
8806 {
8807 return !fseeko;
8808   ;
8809   return 0;
8810 }
8811 _ACEOF
8812 rm -f conftest.$ac_objext
8813 if { (eval echo "$as_me:8813: \"$ac_compile\"") >&5
8814   (eval $ac_compile) 2>&5
8815   ac_status=$?
8816   echo "$as_me:8816: \$? = $ac_status" >&5
8817   (exit $ac_status); } &&
8818          { ac_try='test -s conftest.$ac_objext'
8819   { (eval echo "$as_me:8819: \"$ac_try\"") >&5
8820   (eval $ac_try) 2>&5
8821   ac_status=$?
8822   echo "$as_me:8822: \$? = $ac_status" >&5
8823   (exit $ac_status); }; }; then
8824   ac_cv_sys_largefile_source=1; break
8825 else
8826   echo "$as_me: failed program was:" >&5
8827 cat conftest.$ac_ext >&5
8828 fi
8829 rm -f conftest.$ac_objext conftest.$ac_ext
8830   break
8831 done
8832 fi
8833 echo "$as_me:8833: result: $ac_cv_sys_largefile_source" >&5
8834 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8835 if test "$ac_cv_sys_largefile_source" != no; then
8836
8837 cat >>confdefs.h <<EOF
8838 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8839 EOF
8840
8841 fi
8842 rm -rf conftest*
8843
8844 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8845 # in glibc 2.1.3, but that breaks too many other things.
8846 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8847 echo "$as_me:8847: checking for fseeko" >&5
8848 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8849 if test "${ac_cv_func_fseeko+set}" = set; then
8850   echo $ECHO_N "(cached) $ECHO_C" >&6
8851 else
8852   cat >conftest.$ac_ext <<_ACEOF
8853 #line 8853 "configure"
8854 #include "confdefs.h"
8855 #include <stdio.h>
8856 int
8857 main ()
8858 {
8859 return fseeko && fseeko (stdin, 0, 0);
8860   ;
8861   return 0;
8862 }
8863 _ACEOF
8864 rm -f conftest.$ac_objext conftest$ac_exeext
8865 if { (eval echo "$as_me:8865: \"$ac_link\"") >&5
8866   (eval $ac_link) 2>&5
8867   ac_status=$?
8868   echo "$as_me:8868: \$? = $ac_status" >&5
8869   (exit $ac_status); } &&
8870          { ac_try='test -s conftest$ac_exeext'
8871   { (eval echo "$as_me:8871: \"$ac_try\"") >&5
8872   (eval $ac_try) 2>&5
8873   ac_status=$?
8874   echo "$as_me:8874: \$? = $ac_status" >&5
8875   (exit $ac_status); }; }; then
8876   ac_cv_func_fseeko=yes
8877 else
8878   echo "$as_me: failed program was:" >&5
8879 cat conftest.$ac_ext >&5
8880 ac_cv_func_fseeko=no
8881 fi
8882 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8883 fi
8884 echo "$as_me:8884: result: $ac_cv_func_fseeko" >&5
8885 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8886 if test $ac_cv_func_fseeko = yes; then
8887
8888 cat >>confdefs.h <<\EOF
8889 #define HAVE_FSEEKO 1
8890 EOF
8891
8892 fi
8893
8894         # Normally we would collect these definitions in the config.h,
8895         # but (like _XOPEN_SOURCE), some environments rely on having these
8896         # defined before any of the system headers are included.  Another
8897         # case comes up with C++, e.g., on AIX the compiler compiles the
8898         # header files by themselves before looking at the body files it is
8899         # told to compile.  For ncurses, those header files do not include
8900         # the config.h
8901         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8902         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8903         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8904
8905         echo "$as_me:8905: checking whether to use struct dirent64" >&5
8906 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8907 if test "${cf_cv_struct_dirent64+set}" = set; then
8908   echo $ECHO_N "(cached) $ECHO_C" >&6
8909 else
8910
8911                 cat >conftest.$ac_ext <<_ACEOF
8912 #line 8912 "configure"
8913 #include "confdefs.h"
8914
8915 #include <sys/types.h>
8916 #include <dirent.h>
8917
8918 int
8919 main ()
8920 {
8921
8922                 /* if transitional largefile support is setup, this is true */
8923                 extern struct dirent64 * readdir(DIR *);
8924                 struct dirent64 *x = readdir((DIR *)0);
8925                 struct dirent *y = readdir((DIR *)0);
8926                 int z = x - y;
8927
8928   ;
8929   return 0;
8930 }
8931 _ACEOF
8932 rm -f conftest.$ac_objext
8933 if { (eval echo "$as_me:8933: \"$ac_compile\"") >&5
8934   (eval $ac_compile) 2>&5
8935   ac_status=$?
8936   echo "$as_me:8936: \$? = $ac_status" >&5
8937   (exit $ac_status); } &&
8938          { ac_try='test -s conftest.$ac_objext'
8939   { (eval echo "$as_me:8939: \"$ac_try\"") >&5
8940   (eval $ac_try) 2>&5
8941   ac_status=$?
8942   echo "$as_me:8942: \$? = $ac_status" >&5
8943   (exit $ac_status); }; }; then
8944   cf_cv_struct_dirent64=yes
8945 else
8946   echo "$as_me: failed program was:" >&5
8947 cat conftest.$ac_ext >&5
8948 cf_cv_struct_dirent64=no
8949 fi
8950 rm -f conftest.$ac_objext conftest.$ac_ext
8951
8952 fi
8953 echo "$as_me:8953: result: $cf_cv_struct_dirent64" >&5
8954 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8955         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8956 #define HAVE_STRUCT_DIRENT64 1
8957 EOF
8958
8959     fi
8960
8961 ### Enable compiling-in rcs id's
8962 echo "$as_me:8962: checking if RCS identifiers should be compiled-in" >&5
8963 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8964
8965 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8966 if test "${with_rcs_ids+set}" = set; then
8967   withval="$with_rcs_ids"
8968   with_rcs_ids=$withval
8969 else
8970   with_rcs_ids=no
8971 fi;
8972 echo "$as_me:8972: result: $with_rcs_ids" >&5
8973 echo "${ECHO_T}$with_rcs_ids" >&6
8974 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8975 #define USE_RCS_IDS 1
8976 EOF
8977
8978 ###############################################################################
8979
8980 ### Note that some functions (such as const) are normally disabled anyway.
8981 echo "$as_me:8981: checking if you want to build with function extensions" >&5
8982 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8983
8984 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8985 if test "${enable_ext_funcs+set}" = set; then
8986   enableval="$enable_ext_funcs"
8987   with_ext_funcs=$enableval
8988 else
8989   with_ext_funcs=yes
8990 fi;
8991 echo "$as_me:8991: result: $with_ext_funcs" >&5
8992 echo "${ECHO_T}$with_ext_funcs" >&6
8993 if test "$with_ext_funcs" = yes ; then
8994         NCURSES_EXT_FUNCS=1
8995         cat >>confdefs.h <<\EOF
8996 #define HAVE_USE_DEFAULT_COLORS 1
8997 EOF
8998
8999         cat >>confdefs.h <<\EOF
9000 #define NCURSES_EXT_FUNCS 1
9001 EOF
9002
9003 else
9004         NCURSES_EXT_FUNCS=0
9005 fi
9006
9007 ###   use option --enable-const to turn on use of const beyond that in XSI.
9008 echo "$as_me:9008: checking for extended use of const keyword" >&5
9009 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9010
9011 # Check whether --enable-const or --disable-const was given.
9012 if test "${enable_const+set}" = set; then
9013   enableval="$enable_const"
9014   with_ext_const=$enableval
9015 else
9016   with_ext_const=no
9017 fi;
9018 echo "$as_me:9018: result: $with_ext_const" >&5
9019 echo "${ECHO_T}$with_ext_const" >&6
9020 NCURSES_CONST='/*nothing*/'
9021 if test "$with_ext_const" = yes ; then
9022         NCURSES_CONST=const
9023 fi
9024
9025 ###############################################################################
9026 # These options are relatively safe to experiment with.
9027
9028 echo "$as_me:9028: checking if you want all development code" >&5
9029 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9030
9031 # Check whether --with-develop or --without-develop was given.
9032 if test "${with_develop+set}" = set; then
9033   withval="$with_develop"
9034   with_develop=$withval
9035 else
9036   with_develop=no
9037 fi;
9038 echo "$as_me:9038: result: $with_develop" >&5
9039 echo "${ECHO_T}$with_develop" >&6
9040
9041 ###############################################################################
9042 # These are just experimental, probably should not be in a package:
9043
9044 # This is still experimental (20080329), but should ultimately be moved to
9045 # the script-block --with-normal, etc.
9046
9047 echo "$as_me:9047: checking if you want to link with the pthread library" >&5
9048 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9049
9050 # Check whether --with-pthread or --without-pthread was given.
9051 if test "${with_pthread+set}" = set; then
9052   withval="$with_pthread"
9053   with_pthread=$withval
9054 else
9055   with_pthread=no
9056 fi;
9057 echo "$as_me:9057: result: $with_pthread" >&5
9058 echo "${ECHO_T}$with_pthread" >&6
9059
9060 if test "$with_pthread" != no ; then
9061     echo "$as_me:9061: checking for pthread.h" >&5
9062 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9063 if test "${ac_cv_header_pthread_h+set}" = set; then
9064   echo $ECHO_N "(cached) $ECHO_C" >&6
9065 else
9066   cat >conftest.$ac_ext <<_ACEOF
9067 #line 9067 "configure"
9068 #include "confdefs.h"
9069 #include <pthread.h>
9070 _ACEOF
9071 if { (eval echo "$as_me:9071: \"$ac_cpp conftest.$ac_ext\"") >&5
9072   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9073   ac_status=$?
9074   egrep -v '^ *\+' conftest.er1 >conftest.err
9075   rm -f conftest.er1
9076   cat conftest.err >&5
9077   echo "$as_me:9077: \$? = $ac_status" >&5
9078   (exit $ac_status); } >/dev/null; then
9079   if test -s conftest.err; then
9080     ac_cpp_err=$ac_c_preproc_warn_flag
9081   else
9082     ac_cpp_err=
9083   fi
9084 else
9085   ac_cpp_err=yes
9086 fi
9087 if test -z "$ac_cpp_err"; then
9088   ac_cv_header_pthread_h=yes
9089 else
9090   echo "$as_me: failed program was:" >&5
9091   cat conftest.$ac_ext >&5
9092   ac_cv_header_pthread_h=no
9093 fi
9094 rm -f conftest.err conftest.$ac_ext
9095 fi
9096 echo "$as_me:9096: result: $ac_cv_header_pthread_h" >&5
9097 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9098 if test $ac_cv_header_pthread_h = yes; then
9099
9100         cat >>confdefs.h <<\EOF
9101 #define HAVE_PTHREADS_H 1
9102 EOF
9103
9104         echo "$as_me:9104: checking if we can link with the pthread library" >&5
9105 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9106         cf_save_LIBS="$LIBS"
9107         LIBS="-lpthread $LIBS"
9108         cat >conftest.$ac_ext <<_ACEOF
9109 #line 9109 "configure"
9110 #include "confdefs.h"
9111
9112 #include <pthread.h>
9113
9114 int
9115 main ()
9116 {
9117
9118         int rc = pthread_create(0,0,0,0);
9119
9120   ;
9121   return 0;
9122 }
9123 _ACEOF
9124 rm -f conftest.$ac_objext conftest$ac_exeext
9125 if { (eval echo "$as_me:9125: \"$ac_link\"") >&5
9126   (eval $ac_link) 2>&5
9127   ac_status=$?
9128   echo "$as_me:9128: \$? = $ac_status" >&5
9129   (exit $ac_status); } &&
9130          { ac_try='test -s conftest$ac_exeext'
9131   { (eval echo "$as_me:9131: \"$ac_try\"") >&5
9132   (eval $ac_try) 2>&5
9133   ac_status=$?
9134   echo "$as_me:9134: \$? = $ac_status" >&5
9135   (exit $ac_status); }; }; then
9136   with_pthread=yes
9137 else
9138   echo "$as_me: failed program was:" >&5
9139 cat conftest.$ac_ext >&5
9140 with_pthread=no
9141 fi
9142 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9143         LIBS="$cf_save_LIBS"
9144         echo "$as_me:9144: result: $with_pthread" >&5
9145 echo "${ECHO_T}$with_pthread" >&6
9146
9147         if test "$with_pthread" = yes ; then
9148             LIBS="-lpthread $LIBS"
9149             cat >>confdefs.h <<\EOF
9150 #define HAVE_LIBPTHREADS 1
9151 EOF
9152
9153         else
9154             { { echo "$as_me:9154: error: Cannot link with pthread library" >&5
9155 echo "$as_me: error: Cannot link with pthread library" >&2;}
9156    { (exit 1); exit 1; }; }
9157         fi
9158
9159 fi
9160
9161 fi
9162
9163 echo "$as_me:9163: checking if you want to use weak-symbols for pthreads" >&5
9164 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9165
9166 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9167 if test "${enable_weak_symbols+set}" = set; then
9168   enableval="$enable_weak_symbols"
9169   use_weak_symbols=$withval
9170 else
9171   use_weak_symbols=no
9172 fi;
9173 echo "$as_me:9173: result: $use_weak_symbols" >&5
9174 echo "${ECHO_T}$use_weak_symbols" >&6
9175 if test "$use_weak_symbols" = yes ; then
9176
9177 echo "$as_me:9177: checking if $CC supports weak symbols" >&5
9178 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9179 if test "${cf_cv_weak_symbols+set}" = set; then
9180   echo $ECHO_N "(cached) $ECHO_C" >&6
9181 else
9182
9183 cat >conftest.$ac_ext <<_ACEOF
9184 #line 9184 "configure"
9185 #include "confdefs.h"
9186
9187 #include <stdio.h>
9188 int
9189 main ()
9190 {
9191
9192 #if defined(__GNUC__)
9193 #  if defined __USE_ISOC99
9194 #    define _cat_pragma(exp)    _Pragma(#exp)
9195 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9196 #  else
9197 #    define _weak_pragma(exp)
9198 #  endif
9199 #  define _declare(name)        __extension__ extern __typeof__(name) name
9200 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9201 #endif
9202
9203 weak_symbol(fopen);
9204
9205   ;
9206   return 0;
9207 }
9208 _ACEOF
9209 rm -f conftest.$ac_objext
9210 if { (eval echo "$as_me:9210: \"$ac_compile\"") >&5
9211   (eval $ac_compile) 2>&5
9212   ac_status=$?
9213   echo "$as_me:9213: \$? = $ac_status" >&5
9214   (exit $ac_status); } &&
9215          { ac_try='test -s conftest.$ac_objext'
9216   { (eval echo "$as_me:9216: \"$ac_try\"") >&5
9217   (eval $ac_try) 2>&5
9218   ac_status=$?
9219   echo "$as_me:9219: \$? = $ac_status" >&5
9220   (exit $ac_status); }; }; then
9221   cf_cv_weak_symbols=yes
9222 else
9223   echo "$as_me: failed program was:" >&5
9224 cat conftest.$ac_ext >&5
9225 cf_cv_weak_symbols=no
9226 fi
9227 rm -f conftest.$ac_objext conftest.$ac_ext
9228
9229 fi
9230 echo "$as_me:9230: result: $cf_cv_weak_symbols" >&5
9231 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9232
9233 else
9234     cf_cv_weak_symbols=no
9235 fi
9236
9237 if test $cf_cv_weak_symbols = yes ; then
9238     cat >>confdefs.h <<\EOF
9239 #define USE_WEAK_SYMBOLS 1
9240 EOF
9241
9242 fi
9243
9244 PTHREAD=
9245 if test "$with_pthread" = "yes" ; then
9246     cat >>confdefs.h <<\EOF
9247 #define USE_PTHREADS 1
9248 EOF
9249
9250     enable_reentrant=yes
9251     if test $cf_cv_weak_symbols = yes ; then
9252         PTHREAD=-lpthread
9253     fi
9254 fi
9255
9256 # OpenSUSE is installing ncurses6, using reentrant option.
9257 echo "$as_me:9257: checking for _nc_TABSIZE" >&5
9258 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
9259 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
9260   echo $ECHO_N "(cached) $ECHO_C" >&6
9261 else
9262   cat >conftest.$ac_ext <<_ACEOF
9263 #line 9263 "configure"
9264 #include "confdefs.h"
9265 /* System header to define __stub macros and hopefully few prototypes,
9266     which can conflict with char _nc_TABSIZE (); below.  */
9267 #include <assert.h>
9268 /* Override any gcc2 internal prototype to avoid an error.  */
9269 #ifdef __cplusplus
9270 extern "C"
9271 #endif
9272 /* We use char because int might match the return type of a gcc2
9273    builtin and then its argument prototype would still apply.  */
9274 char _nc_TABSIZE ();
9275 char (*f) ();
9276
9277 int
9278 main ()
9279 {
9280 /* The GNU C library defines this for functions which it implements
9281     to always fail with ENOSYS.  Some functions are actually named
9282     something starting with __ and the normal name is an alias.  */
9283 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
9284 choke me
9285 #else
9286 f = _nc_TABSIZE;
9287 #endif
9288
9289   ;
9290   return 0;
9291 }
9292 _ACEOF
9293 rm -f conftest.$ac_objext conftest$ac_exeext
9294 if { (eval echo "$as_me:9294: \"$ac_link\"") >&5
9295   (eval $ac_link) 2>&5
9296   ac_status=$?
9297   echo "$as_me:9297: \$? = $ac_status" >&5
9298   (exit $ac_status); } &&
9299          { ac_try='test -s conftest$ac_exeext'
9300   { (eval echo "$as_me:9300: \"$ac_try\"") >&5
9301   (eval $ac_try) 2>&5
9302   ac_status=$?
9303   echo "$as_me:9303: \$? = $ac_status" >&5
9304   (exit $ac_status); }; }; then
9305   ac_cv_func__nc_TABSIZE=yes
9306 else
9307   echo "$as_me: failed program was:" >&5
9308 cat conftest.$ac_ext >&5
9309 ac_cv_func__nc_TABSIZE=no
9310 fi
9311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9312 fi
9313 echo "$as_me:9313: result: $ac_cv_func__nc_TABSIZE" >&5
9314 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
9315 if test $ac_cv_func__nc_TABSIZE = yes; then
9316   assume_reentrant=yes
9317 else
9318   assume_reentrant=no
9319 fi
9320
9321 # Reentrant code has to be opaque; there's little advantage to making ncurses
9322 # opaque outside of that, so there is no --enable-opaque option.  We can use
9323 # this option without --with-pthreads, but this will be always set for
9324 # pthreads.
9325 echo "$as_me:9325: checking if you want experimental reentrant code" >&5
9326 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9327
9328 # Check whether --enable-reentrant or --disable-reentrant was given.
9329 if test "${enable_reentrant+set}" = set; then
9330   enableval="$enable_reentrant"
9331   with_reentrant=$enableval
9332 else
9333   with_reentrant=$assume_reentrant
9334 fi;
9335 echo "$as_me:9335: result: $with_reentrant" >&5
9336 echo "${ECHO_T}$with_reentrant" >&6
9337 if test "$with_reentrant" = yes ; then
9338         cf_cv_enable_reentrant=1
9339         if test $cf_cv_weak_symbols = yes ; then
9340
9341 # remove pthread library from $LIBS
9342 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9343
9344         elif test "$assume_reentrant" = no ; then
9345                 LIB_SUFFIX="t${LIB_SUFFIX}"
9346         fi
9347         cat >>confdefs.h <<\EOF
9348 #define USE_REENTRANT 1
9349 EOF
9350
9351 else
9352         cf_cv_enable_reentrant=0
9353 fi
9354
9355 ### Allow using a different wrap-prefix
9356 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9357         echo "$as_me:9357: checking for prefix used to wrap public variables" >&5
9358 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9359
9360 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9361 if test "${with_wrap_prefix+set}" = set; then
9362   withval="$with_wrap_prefix"
9363   NCURSES_WRAP_PREFIX=$withval
9364 else
9365   NCURSES_WRAP_PREFIX=_nc_
9366 fi;
9367         echo "$as_me:9367: result: $NCURSES_WRAP_PREFIX" >&5
9368 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9369 else
9370         NCURSES_WRAP_PREFIX=_nc_
9371 fi
9372
9373 cat >>confdefs.h <<EOF
9374 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
9375 EOF
9376
9377 ###############################################################################
9378
9379 ###     use option --disable-echo to suppress full display compiling commands
9380 echo "$as_me:9380: checking if you want to display full commands during build" >&5
9381 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9382
9383 # Check whether --enable-echo or --disable-echo was given.
9384 if test "${enable_echo+set}" = set; then
9385   enableval="$enable_echo"
9386   with_echo=$enableval
9387 else
9388   with_echo=yes
9389 fi;
9390 if test "$with_echo" = yes; then
9391         ECHO_LINK=
9392 else
9393         ECHO_LINK='@ echo linking $@ ... ;'
9394 fi
9395 echo "$as_me:9395: result: $with_echo" >&5
9396 echo "${ECHO_T}$with_echo" >&6
9397
9398 ###     use option --enable-warnings to turn on all gcc warnings
9399 echo "$as_me:9399: checking if you want to see compiler warnings" >&5
9400 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9401
9402 # Check whether --enable-warnings or --disable-warnings was given.
9403 if test "${enable_warnings+set}" = set; then
9404   enableval="$enable_warnings"
9405   with_warnings=$enableval
9406 fi;
9407 echo "$as_me:9407: result: $with_warnings" >&5
9408 echo "${ECHO_T}$with_warnings" >&6
9409
9410 if test "x$with_warnings" = "xyes"; then
9411
9412         ADAFLAGS="$ADAFLAGS -gnatg"
9413
9414 INTEL_COMPILER=no
9415
9416 if test "$GCC" = yes ; then
9417         case $host_os in
9418         linux*|gnu*)
9419                 echo "$as_me:9419: checking if this is really Intel C compiler" >&5
9420 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9421                 cf_save_CFLAGS="$CFLAGS"
9422                 CFLAGS="$CFLAGS -no-gcc"
9423                 cat >conftest.$ac_ext <<_ACEOF
9424 #line 9424 "configure"
9425 #include "confdefs.h"
9426
9427 int
9428 main ()
9429 {
9430
9431 #ifdef __INTEL_COMPILER
9432 #else
9433 make an error
9434 #endif
9435
9436   ;
9437   return 0;
9438 }
9439 _ACEOF
9440 rm -f conftest.$ac_objext
9441 if { (eval echo "$as_me:9441: \"$ac_compile\"") >&5
9442   (eval $ac_compile) 2>&5
9443   ac_status=$?
9444   echo "$as_me:9444: \$? = $ac_status" >&5
9445   (exit $ac_status); } &&
9446          { ac_try='test -s conftest.$ac_objext'
9447   { (eval echo "$as_me:9447: \"$ac_try\"") >&5
9448   (eval $ac_try) 2>&5
9449   ac_status=$?
9450   echo "$as_me:9450: \$? = $ac_status" >&5
9451   (exit $ac_status); }; }; then
9452   INTEL_COMPILER=yes
9453 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9454
9455 else
9456   echo "$as_me: failed program was:" >&5
9457 cat conftest.$ac_ext >&5
9458 fi
9459 rm -f conftest.$ac_objext conftest.$ac_ext
9460                 CFLAGS="$cf_save_CFLAGS"
9461                 echo "$as_me:9461: result: $INTEL_COMPILER" >&5
9462 echo "${ECHO_T}$INTEL_COMPILER" >&6
9463                 ;;
9464         esac
9465 fi
9466
9467 cat > conftest.$ac_ext <<EOF
9468 #line 9468 "${as_me:-configure}"
9469 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9470 EOF
9471
9472 if test "$INTEL_COMPILER" = yes
9473 then
9474 # The "-wdXXX" options suppress warnings:
9475 # remark #1419: external declaration in primary source file
9476 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9477 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9478 # remark #193: zero used for undefined preprocessing identifier
9479 # remark #593: variable "curs_sb_left_arrow" was set but never used
9480 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9481 # remark #869: parameter "tw" was never referenced
9482 # remark #981: operands are evaluated in unspecified order
9483 # warning #279: controlling expression is constant
9484
9485         { echo "$as_me:9485: checking for $CC warning options..." >&5
9486 echo "$as_me: checking for $CC warning options..." >&6;}
9487         cf_save_CFLAGS="$CFLAGS"
9488         EXTRA_CFLAGS="-Wall"
9489         for cf_opt in \
9490                 wd1419 \
9491                 wd1683 \
9492                 wd1684 \
9493                 wd193 \
9494                 wd593 \
9495                 wd279 \
9496                 wd810 \
9497                 wd869 \
9498                 wd981
9499         do
9500                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9501                 if { (eval echo "$as_me:9501: \"$ac_compile\"") >&5
9502   (eval $ac_compile) 2>&5
9503   ac_status=$?
9504   echo "$as_me:9504: \$? = $ac_status" >&5
9505   (exit $ac_status); }; then
9506                         test -n "$verbose" && echo "$as_me:9506: result: ... -$cf_opt" >&5
9507 echo "${ECHO_T}... -$cf_opt" >&6
9508                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9509                 fi
9510         done
9511         CFLAGS="$cf_save_CFLAGS"
9512
9513 elif test "$GCC" = yes
9514 then
9515         { echo "$as_me:9515: checking for $CC warning options..." >&5
9516 echo "$as_me: checking for $CC warning options..." >&6;}
9517         cf_save_CFLAGS="$CFLAGS"
9518         EXTRA_CFLAGS=
9519         cf_warn_CONST=""
9520         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9521         for cf_opt in W Wall \
9522                 Wbad-function-cast \
9523                 Wcast-align \
9524                 Wcast-qual \
9525                 Winline \
9526                 Wmissing-declarations \
9527                 Wmissing-prototypes \
9528                 Wnested-externs \
9529                 Wpointer-arith \
9530                 Wshadow \
9531                 Wstrict-prototypes \
9532                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9533         do
9534                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9535                 if { (eval echo "$as_me:9535: \"$ac_compile\"") >&5
9536   (eval $ac_compile) 2>&5
9537   ac_status=$?
9538   echo "$as_me:9538: \$? = $ac_status" >&5
9539   (exit $ac_status); }; then
9540                         test -n "$verbose" && echo "$as_me:9540: result: ... -$cf_opt" >&5
9541 echo "${ECHO_T}... -$cf_opt" >&6
9542                         case $cf_opt in #(vi
9543                         Wcast-qual) #(vi
9544                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9545                                 ;;
9546                         Winline) #(vi
9547                                 case $GCC_VERSION in
9548                                 [34].*)
9549                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9550
9551 echo "${as_me:-configure}:9551: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9552
9553                                         continue;;
9554                                 esac
9555                                 ;;
9556                         esac
9557                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9558                 fi
9559         done
9560         CFLAGS="$cf_save_CFLAGS"
9561 fi
9562 rm -rf conftest*
9563
9564 fi
9565
9566 if test "$GCC" = yes
9567 then
9568 cat > conftest.i <<EOF
9569 #ifndef GCC_PRINTF
9570 #define GCC_PRINTF 0
9571 #endif
9572 #ifndef GCC_SCANF
9573 #define GCC_SCANF 0
9574 #endif
9575 #ifndef GCC_NORETURN
9576 #define GCC_NORETURN /* nothing */
9577 #endif
9578 #ifndef GCC_UNUSED
9579 #define GCC_UNUSED /* nothing */
9580 #endif
9581 EOF
9582 if test "$GCC" = yes
9583 then
9584         { echo "$as_me:9584: checking for $CC __attribute__ directives..." >&5
9585 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9586 cat > conftest.$ac_ext <<EOF
9587 #line 9587 "${as_me:-configure}"
9588 #include "confdefs.h"
9589 #include "conftest.h"
9590 #include "conftest.i"
9591 #if     GCC_PRINTF
9592 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9593 #else
9594 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9595 #endif
9596 #if     GCC_SCANF
9597 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9598 #else
9599 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9600 #endif
9601 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9602 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9603 extern void foo(void) GCC_NORETURN;
9604 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9605 EOF
9606         cf_printf_attribute=no
9607         cf_scanf_attribute=no
9608         for cf_attribute in scanf printf unused noreturn
9609         do
9610
9611 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9612
9613                 cf_directive="__attribute__(($cf_attribute))"
9614                 echo "checking for $CC $cf_directive" 1>&5
9615
9616                 case $cf_attribute in #(vi
9617                 printf) #(vi
9618                         cf_printf_attribute=yes
9619                         cat >conftest.h <<EOF
9620 #define GCC_$cf_ATTRIBUTE 1
9621 EOF
9622                         ;;
9623                 scanf) #(vi
9624                         cf_scanf_attribute=yes
9625                         cat >conftest.h <<EOF
9626 #define GCC_$cf_ATTRIBUTE 1
9627 EOF
9628                         ;;
9629                 *) #(vi
9630                         cat >conftest.h <<EOF
9631 #define GCC_$cf_ATTRIBUTE $cf_directive
9632 EOF
9633                         ;;
9634                 esac
9635
9636                 if { (eval echo "$as_me:9636: \"$ac_compile\"") >&5
9637   (eval $ac_compile) 2>&5
9638   ac_status=$?
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit $ac_status); }; then
9641                         test -n "$verbose" && echo "$as_me:9641: result: ... $cf_attribute" >&5
9642 echo "${ECHO_T}... $cf_attribute" >&6
9643                         cat conftest.h >>confdefs.h
9644                         case $cf_attribute in #(vi
9645                         printf) #(vi
9646                                 if test "$cf_printf_attribute" = no ; then
9647                                         cat >>confdefs.h <<EOF
9648 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
9649 EOF
9650                                 else
9651                                         cat >>confdefs.h <<EOF
9652 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9653 EOF
9654                                 fi
9655                                 ;;
9656                         scanf) #(vi
9657                                 if test "$cf_scanf_attribute" = no ; then
9658                                         cat >>confdefs.h <<EOF
9659 #define GCC_SCANFLIKE(fmt,var) /* nothing */
9660 EOF
9661                                 else
9662                                         cat >>confdefs.h <<EOF
9663 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9664 EOF
9665                                 fi
9666                                 ;;
9667                         esac
9668                 fi
9669         done
9670 else
9671         fgrep define conftest.i >>confdefs.h
9672 fi
9673 rm -rf conftest*
9674 fi
9675
9676 ###     use option --enable-assertions to turn on generation of assertion code
9677 echo "$as_me:9677: checking if you want to enable runtime assertions" >&5
9678 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9679
9680 # Check whether --enable-assertions or --disable-assertions was given.
9681 if test "${enable_assertions+set}" = set; then
9682   enableval="$enable_assertions"
9683   with_assertions=$enableval
9684 else
9685   with_assertions=no
9686 fi;
9687 echo "$as_me:9687: result: $with_assertions" >&5
9688 echo "${ECHO_T}$with_assertions" >&6
9689 if test -n "$GCC"
9690 then
9691         if test "$with_assertions" = no
9692         then
9693                 cat >>confdefs.h <<\EOF
9694 #define NDEBUG 1
9695 EOF
9696
9697                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9698         else
9699
9700         ADAFLAGS="$ADAFLAGS -gnata"
9701
9702         fi
9703 fi
9704
9705 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9706 cat >>confdefs.h <<\EOF
9707 #define HAVE_NC_ALLOC_H 1
9708 EOF
9709
9710 ###     use option --enable-expanded to generate certain macros as functions
9711
9712 # Check whether --enable-expanded or --disable-expanded was given.
9713 if test "${enable_expanded+set}" = set; then
9714   enableval="$enable_expanded"
9715   test "$enableval" = yes && cat >>confdefs.h <<\EOF
9716 #define NCURSES_EXPANDED 1
9717 EOF
9718
9719 fi;
9720
9721 ###     use option --disable-macros to suppress macros in favor of functions
9722
9723 # Check whether --enable-macros or --disable-macros was given.
9724 if test "${enable_macros+set}" = set; then
9725   enableval="$enable_macros"
9726   test "$enableval" = no && cat >>confdefs.h <<\EOF
9727 #define NCURSES_NOMACROS 1
9728 EOF
9729
9730 fi;
9731
9732 # Normally we only add trace() to the debug-library.  Allow this to be
9733 # extended to all models of the ncurses library:
9734 cf_all_traces=no
9735 case "$CFLAGS $CPPFLAGS" in
9736 *-DTRACE*)
9737         cf_all_traces=yes
9738         ;;
9739 esac
9740
9741 echo "$as_me:9741: checking whether to add trace feature to all models" >&5
9742 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
9743
9744 # Check whether --with-trace or --without-trace was given.
9745 if test "${with_trace+set}" = set; then
9746   withval="$with_trace"
9747   cf_with_trace=$withval
9748 else
9749   cf_with_trace=$cf_all_traces
9750 fi;
9751 echo "$as_me:9751: result: $cf_with_trace" >&5
9752 echo "${ECHO_T}$cf_with_trace" >&6
9753
9754 if test "$cf_with_trace" = yes ; then
9755         ADA_TRACE=TRUE
9756
9757 cf_fix_cppflags=no
9758 cf_new_cflags=
9759 cf_new_cppflags=
9760 cf_new_extra_cppflags=
9761
9762 for cf_add_cflags in -DTRACE
9763 do
9764 case $cf_fix_cppflags in
9765 no)
9766         case $cf_add_cflags in #(vi
9767         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9768                 case $cf_add_cflags in
9769                 -D*)
9770                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9771
9772                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9773                                 && test -z "${cf_tst_cflags}" \
9774                                 && cf_fix_cppflags=yes
9775
9776                         if test $cf_fix_cppflags = yes ; then
9777                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9778                                 continue
9779                         elif test "${cf_tst_cflags}" = "\"'" ; then
9780                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9781                                 continue
9782                         fi
9783                         ;;
9784                 esac
9785                 case "$CPPFLAGS" in
9786                 *$cf_add_cflags) #(vi
9787                         ;;
9788                 *) #(vi
9789                         case $cf_add_cflags in #(vi
9790                         -D*)
9791                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9792
9793 CPPFLAGS=`echo "$CPPFLAGS" | \
9794         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9795                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9796
9797                                 ;;
9798                         esac
9799                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9800                         ;;
9801                 esac
9802                 ;;
9803         *)
9804                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9805                 ;;
9806         esac
9807         ;;
9808 yes)
9809         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9810
9811         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9812
9813         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9814                 && test -z "${cf_tst_cflags}" \
9815                 && cf_fix_cppflags=no
9816         ;;
9817 esac
9818 done
9819
9820 if test -n "$cf_new_cflags" ; then
9821
9822         CFLAGS="$CFLAGS $cf_new_cflags"
9823 fi
9824
9825 if test -n "$cf_new_cppflags" ; then
9826
9827         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9828 fi
9829
9830 if test -n "$cf_new_extra_cppflags" ; then
9831
9832         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9833 fi
9834
9835 else
9836         ADA_TRACE=FALSE
9837 fi
9838
9839 ###     Checks for libraries.
9840 case $cf_cv_system_name in #(vi
9841 *mingw32*) #(vi
9842         ;;
9843 *)
9844 echo "$as_me:9844: checking for gettimeofday" >&5
9845 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
9846 if test "${ac_cv_func_gettimeofday+set}" = set; then
9847   echo $ECHO_N "(cached) $ECHO_C" >&6
9848 else
9849   cat >conftest.$ac_ext <<_ACEOF
9850 #line 9850 "configure"
9851 #include "confdefs.h"
9852 /* System header to define __stub macros and hopefully few prototypes,
9853     which can conflict with char gettimeofday (); below.  */
9854 #include <assert.h>
9855 /* Override any gcc2 internal prototype to avoid an error.  */
9856 #ifdef __cplusplus
9857 extern "C"
9858 #endif
9859 /* We use char because int might match the return type of a gcc2
9860    builtin and then its argument prototype would still apply.  */
9861 char gettimeofday ();
9862 char (*f) ();
9863
9864 int
9865 main ()
9866 {
9867 /* The GNU C library defines this for functions which it implements
9868     to always fail with ENOSYS.  Some functions are actually named
9869     something starting with __ and the normal name is an alias.  */
9870 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
9871 choke me
9872 #else
9873 f = gettimeofday;
9874 #endif
9875
9876   ;
9877   return 0;
9878 }
9879 _ACEOF
9880 rm -f conftest.$ac_objext conftest$ac_exeext
9881 if { (eval echo "$as_me:9881: \"$ac_link\"") >&5
9882   (eval $ac_link) 2>&5
9883   ac_status=$?
9884   echo "$as_me:9884: \$? = $ac_status" >&5
9885   (exit $ac_status); } &&
9886          { ac_try='test -s conftest$ac_exeext'
9887   { (eval echo "$as_me:9887: \"$ac_try\"") >&5
9888   (eval $ac_try) 2>&5
9889   ac_status=$?
9890   echo "$as_me:9890: \$? = $ac_status" >&5
9891   (exit $ac_status); }; }; then
9892   ac_cv_func_gettimeofday=yes
9893 else
9894   echo "$as_me: failed program was:" >&5
9895 cat conftest.$ac_ext >&5
9896 ac_cv_func_gettimeofday=no
9897 fi
9898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9899 fi
9900 echo "$as_me:9900: result: $ac_cv_func_gettimeofday" >&5
9901 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
9902 if test $ac_cv_func_gettimeofday = yes; then
9903   cat >>confdefs.h <<\EOF
9904 #define HAVE_GETTIMEOFDAY 1
9905 EOF
9906
9907 else
9908
9909 echo "$as_me:9909: checking for gettimeofday in -lbsd" >&5
9910 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
9911 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
9912   echo $ECHO_N "(cached) $ECHO_C" >&6
9913 else
9914   ac_check_lib_save_LIBS=$LIBS
9915 LIBS="-lbsd  $LIBS"
9916 cat >conftest.$ac_ext <<_ACEOF
9917 #line 9917 "configure"
9918 #include "confdefs.h"
9919
9920 /* Override any gcc2 internal prototype to avoid an error.  */
9921 #ifdef __cplusplus
9922 extern "C"
9923 #endif
9924 /* We use char because int might match the return type of a gcc2
9925    builtin and then its argument prototype would still apply.  */
9926 char gettimeofday ();
9927 int
9928 main ()
9929 {
9930 gettimeofday ();
9931   ;
9932   return 0;
9933 }
9934 _ACEOF
9935 rm -f conftest.$ac_objext conftest$ac_exeext
9936 if { (eval echo "$as_me:9936: \"$ac_link\"") >&5
9937   (eval $ac_link) 2>&5
9938   ac_status=$?
9939   echo "$as_me:9939: \$? = $ac_status" >&5
9940   (exit $ac_status); } &&
9941          { ac_try='test -s conftest$ac_exeext'
9942   { (eval echo "$as_me:9942: \"$ac_try\"") >&5
9943   (eval $ac_try) 2>&5
9944   ac_status=$?
9945   echo "$as_me:9945: \$? = $ac_status" >&5
9946   (exit $ac_status); }; }; then
9947   ac_cv_lib_bsd_gettimeofday=yes
9948 else
9949   echo "$as_me: failed program was:" >&5
9950 cat conftest.$ac_ext >&5
9951 ac_cv_lib_bsd_gettimeofday=no
9952 fi
9953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9954 LIBS=$ac_check_lib_save_LIBS
9955 fi
9956 echo "$as_me:9956: result: $ac_cv_lib_bsd_gettimeofday" >&5
9957 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
9958 if test $ac_cv_lib_bsd_gettimeofday = yes; then
9959   cat >>confdefs.h <<\EOF
9960 #define HAVE_GETTIMEOFDAY 1
9961 EOF
9962
9963         LIBS="$LIBS -lbsd"
9964 fi
9965
9966 fi
9967         ;;
9968 esac
9969
9970 ###     Checks for header files.
9971 echo "$as_me:9971: checking for ANSI C header files" >&5
9972 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9973 if test "${ac_cv_header_stdc+set}" = set; then
9974   echo $ECHO_N "(cached) $ECHO_C" >&6
9975 else
9976   cat >conftest.$ac_ext <<_ACEOF
9977 #line 9977 "configure"
9978 #include "confdefs.h"
9979 #include <stdlib.h>
9980 #include <stdarg.h>
9981 #include <string.h>
9982 #include <float.h>
9983
9984 _ACEOF
9985 if { (eval echo "$as_me:9985: \"$ac_cpp conftest.$ac_ext\"") >&5
9986   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9987   ac_status=$?
9988   egrep -v '^ *\+' conftest.er1 >conftest.err
9989   rm -f conftest.er1
9990   cat conftest.err >&5
9991   echo "$as_me:9991: \$? = $ac_status" >&5
9992   (exit $ac_status); } >/dev/null; then
9993   if test -s conftest.err; then
9994     ac_cpp_err=$ac_c_preproc_warn_flag
9995   else
9996     ac_cpp_err=
9997   fi
9998 else
9999   ac_cpp_err=yes
10000 fi
10001 if test -z "$ac_cpp_err"; then
10002   ac_cv_header_stdc=yes
10003 else
10004   echo "$as_me: failed program was:" >&5
10005   cat conftest.$ac_ext >&5
10006   ac_cv_header_stdc=no
10007 fi
10008 rm -f conftest.err conftest.$ac_ext
10009
10010 if test $ac_cv_header_stdc = yes; then
10011   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10012   cat >conftest.$ac_ext <<_ACEOF
10013 #line 10013 "configure"
10014 #include "confdefs.h"
10015 #include <string.h>
10016
10017 _ACEOF
10018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10019   egrep "memchr" >/dev/null 2>&1; then
10020   :
10021 else
10022   ac_cv_header_stdc=no
10023 fi
10024 rm -rf conftest*
10025
10026 fi
10027
10028 if test $ac_cv_header_stdc = yes; then
10029   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10030   cat >conftest.$ac_ext <<_ACEOF
10031 #line 10031 "configure"
10032 #include "confdefs.h"
10033 #include <stdlib.h>
10034
10035 _ACEOF
10036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10037   egrep "free" >/dev/null 2>&1; then
10038   :
10039 else
10040   ac_cv_header_stdc=no
10041 fi
10042 rm -rf conftest*
10043
10044 fi
10045
10046 if test $ac_cv_header_stdc = yes; then
10047   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10048   if test "$cross_compiling" = yes; then
10049   :
10050 else
10051   cat >conftest.$ac_ext <<_ACEOF
10052 #line 10052 "configure"
10053 #include "confdefs.h"
10054 #include <ctype.h>
10055 #if ((' ' & 0x0FF) == 0x020)
10056 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10057 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10058 #else
10059 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10060                      || ('j' <= (c) && (c) <= 'r') \
10061                      || ('s' <= (c) && (c) <= 'z'))
10062 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10063 #endif
10064
10065 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10066 int
10067 main ()
10068 {
10069   int i;
10070   for (i = 0; i < 256; i++)
10071     if (XOR (islower (i), ISLOWER (i))
10072         || toupper (i) != TOUPPER (i))
10073       $ac_main_return(2);
10074   $ac_main_return (0);
10075 }
10076 _ACEOF
10077 rm -f conftest$ac_exeext
10078 if { (eval echo "$as_me:10078: \"$ac_link\"") >&5
10079   (eval $ac_link) 2>&5
10080   ac_status=$?
10081   echo "$as_me:10081: \$? = $ac_status" >&5
10082   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10083   { (eval echo "$as_me:10083: \"$ac_try\"") >&5
10084   (eval $ac_try) 2>&5
10085   ac_status=$?
10086   echo "$as_me:10086: \$? = $ac_status" >&5
10087   (exit $ac_status); }; }; then
10088   :
10089 else
10090   echo "$as_me: program exited with status $ac_status" >&5
10091 echo "$as_me: failed program was:" >&5
10092 cat conftest.$ac_ext >&5
10093 ac_cv_header_stdc=no
10094 fi
10095 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10096 fi
10097 fi
10098 fi
10099 echo "$as_me:10099: result: $ac_cv_header_stdc" >&5
10100 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10101 if test $ac_cv_header_stdc = yes; then
10102
10103 cat >>confdefs.h <<\EOF
10104 #define STDC_HEADERS 1
10105 EOF
10106
10107 fi
10108
10109 ac_header_dirent=no
10110 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10111   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10112 echo "$as_me:10112: checking for $ac_hdr that defines DIR" >&5
10113 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10114 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10115   echo $ECHO_N "(cached) $ECHO_C" >&6
10116 else
10117   cat >conftest.$ac_ext <<_ACEOF
10118 #line 10118 "configure"
10119 #include "confdefs.h"
10120 #include <sys/types.h>
10121 #include <$ac_hdr>
10122
10123 int
10124 main ()
10125 {
10126 if ((DIR *) 0)
10127 return 0;
10128   ;
10129   return 0;
10130 }
10131 _ACEOF
10132 rm -f conftest.$ac_objext
10133 if { (eval echo "$as_me:10133: \"$ac_compile\"") >&5
10134   (eval $ac_compile) 2>&5
10135   ac_status=$?
10136   echo "$as_me:10136: \$? = $ac_status" >&5
10137   (exit $ac_status); } &&
10138          { ac_try='test -s conftest.$ac_objext'
10139   { (eval echo "$as_me:10139: \"$ac_try\"") >&5
10140   (eval $ac_try) 2>&5
10141   ac_status=$?
10142   echo "$as_me:10142: \$? = $ac_status" >&5
10143   (exit $ac_status); }; }; then
10144   eval "$as_ac_Header=yes"
10145 else
10146   echo "$as_me: failed program was:" >&5
10147 cat conftest.$ac_ext >&5
10148 eval "$as_ac_Header=no"
10149 fi
10150 rm -f conftest.$ac_objext conftest.$ac_ext
10151 fi
10152 echo "$as_me:10152: result: `eval echo '${'$as_ac_Header'}'`" >&5
10153 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10154 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10155   cat >>confdefs.h <<EOF
10156 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10157 EOF
10158
10159 ac_header_dirent=$ac_hdr; break
10160 fi
10161
10162 done
10163 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10164 if test $ac_header_dirent = dirent.h; then
10165   echo "$as_me:10165: checking for opendir in -ldir" >&5
10166 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10167 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10168   echo $ECHO_N "(cached) $ECHO_C" >&6
10169 else
10170   ac_check_lib_save_LIBS=$LIBS
10171 LIBS="-ldir  $LIBS"
10172 cat >conftest.$ac_ext <<_ACEOF
10173 #line 10173 "configure"
10174 #include "confdefs.h"
10175
10176 /* Override any gcc2 internal prototype to avoid an error.  */
10177 #ifdef __cplusplus
10178 extern "C"
10179 #endif
10180 /* We use char because int might match the return type of a gcc2
10181    builtin and then its argument prototype would still apply.  */
10182 char opendir ();
10183 int
10184 main ()
10185 {
10186 opendir ();
10187   ;
10188   return 0;
10189 }
10190 _ACEOF
10191 rm -f conftest.$ac_objext conftest$ac_exeext
10192 if { (eval echo "$as_me:10192: \"$ac_link\"") >&5
10193   (eval $ac_link) 2>&5
10194   ac_status=$?
10195   echo "$as_me:10195: \$? = $ac_status" >&5
10196   (exit $ac_status); } &&
10197          { ac_try='test -s conftest$ac_exeext'
10198   { (eval echo "$as_me:10198: \"$ac_try\"") >&5
10199   (eval $ac_try) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit $ac_status); }; }; then
10203   ac_cv_lib_dir_opendir=yes
10204 else
10205   echo "$as_me: failed program was:" >&5
10206 cat conftest.$ac_ext >&5
10207 ac_cv_lib_dir_opendir=no
10208 fi
10209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10210 LIBS=$ac_check_lib_save_LIBS
10211 fi
10212 echo "$as_me:10212: result: $ac_cv_lib_dir_opendir" >&5
10213 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10214 if test $ac_cv_lib_dir_opendir = yes; then
10215   LIBS="$LIBS -ldir"
10216 fi
10217
10218 else
10219   echo "$as_me:10219: checking for opendir in -lx" >&5
10220 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10221 if test "${ac_cv_lib_x_opendir+set}" = set; then
10222   echo $ECHO_N "(cached) $ECHO_C" >&6
10223 else
10224   ac_check_lib_save_LIBS=$LIBS
10225 LIBS="-lx  $LIBS"
10226 cat >conftest.$ac_ext <<_ACEOF
10227 #line 10227 "configure"
10228 #include "confdefs.h"
10229
10230 /* Override any gcc2 internal prototype to avoid an error.  */
10231 #ifdef __cplusplus
10232 extern "C"
10233 #endif
10234 /* We use char because int might match the return type of a gcc2
10235    builtin and then its argument prototype would still apply.  */
10236 char opendir ();
10237 int
10238 main ()
10239 {
10240 opendir ();
10241   ;
10242   return 0;
10243 }
10244 _ACEOF
10245 rm -f conftest.$ac_objext conftest$ac_exeext
10246 if { (eval echo "$as_me:10246: \"$ac_link\"") >&5
10247   (eval $ac_link) 2>&5
10248   ac_status=$?
10249   echo "$as_me:10249: \$? = $ac_status" >&5
10250   (exit $ac_status); } &&
10251          { ac_try='test -s conftest$ac_exeext'
10252   { (eval echo "$as_me:10252: \"$ac_try\"") >&5
10253   (eval $ac_try) 2>&5
10254   ac_status=$?
10255   echo "$as_me:10255: \$? = $ac_status" >&5
10256   (exit $ac_status); }; }; then
10257   ac_cv_lib_x_opendir=yes
10258 else
10259   echo "$as_me: failed program was:" >&5
10260 cat conftest.$ac_ext >&5
10261 ac_cv_lib_x_opendir=no
10262 fi
10263 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10264 LIBS=$ac_check_lib_save_LIBS
10265 fi
10266 echo "$as_me:10266: result: $ac_cv_lib_x_opendir" >&5
10267 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10268 if test $ac_cv_lib_x_opendir = yes; then
10269   LIBS="$LIBS -lx"
10270 fi
10271
10272 fi
10273
10274 echo "$as_me:10274: checking whether time.h and sys/time.h may both be included" >&5
10275 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10276 if test "${ac_cv_header_time+set}" = set; then
10277   echo $ECHO_N "(cached) $ECHO_C" >&6
10278 else
10279   cat >conftest.$ac_ext <<_ACEOF
10280 #line 10280 "configure"
10281 #include "confdefs.h"
10282 #include <sys/types.h>
10283 #include <sys/time.h>
10284 #include <time.h>
10285
10286 int
10287 main ()
10288 {
10289 if ((struct tm *) 0)
10290 return 0;
10291   ;
10292   return 0;
10293 }
10294 _ACEOF
10295 rm -f conftest.$ac_objext
10296 if { (eval echo "$as_me:10296: \"$ac_compile\"") >&5
10297   (eval $ac_compile) 2>&5
10298   ac_status=$?
10299   echo "$as_me:10299: \$? = $ac_status" >&5
10300   (exit $ac_status); } &&
10301          { ac_try='test -s conftest.$ac_objext'
10302   { (eval echo "$as_me:10302: \"$ac_try\"") >&5
10303   (eval $ac_try) 2>&5
10304   ac_status=$?
10305   echo "$as_me:10305: \$? = $ac_status" >&5
10306   (exit $ac_status); }; }; then
10307   ac_cv_header_time=yes
10308 else
10309   echo "$as_me: failed program was:" >&5
10310 cat conftest.$ac_ext >&5
10311 ac_cv_header_time=no
10312 fi
10313 rm -f conftest.$ac_objext conftest.$ac_ext
10314 fi
10315 echo "$as_me:10315: result: $ac_cv_header_time" >&5
10316 echo "${ECHO_T}$ac_cv_header_time" >&6
10317 if test $ac_cv_header_time = yes; then
10318
10319 cat >>confdefs.h <<\EOF
10320 #define TIME_WITH_SYS_TIME 1
10321 EOF
10322
10323 fi
10324
10325 ###     checks for compiler characteristics
10326 ac_ext=c
10327 ac_cpp='$CPP $CPPFLAGS'
10328 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10329 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10330 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10331 ac_main_return=return
10332
10333 echo "$as_me:10333: checking for $CC option to accept ANSI C" >&5
10334 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
10335 if test "${ac_cv_prog_cc_stdc+set}" = set; then
10336   echo $ECHO_N "(cached) $ECHO_C" >&6
10337 else
10338   ac_cv_prog_cc_stdc=no
10339 ac_save_CC=$CC
10340 cat >conftest.$ac_ext <<_ACEOF
10341 #line 10341 "configure"
10342 #include "confdefs.h"
10343 #include <stdarg.h>
10344 #include <stdio.h>
10345 #include <sys/types.h>
10346 #include <sys/stat.h>
10347 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
10348 struct buf { int x; };
10349 FILE * (*rcsopen) (struct buf *, struct stat *, int);
10350 static char *e (p, i)
10351      char **p;
10352      int i;
10353 {
10354   return p[i];
10355 }
10356 static char *f (char * (*g) (char **, int), char **p, ...)
10357 {
10358   char *s;
10359   va_list v;
10360   va_start (v,p);
10361   s = g (p, va_arg (v,int));
10362   va_end (v);
10363   return s;
10364 }
10365 int test (int i, double x);
10366 struct s1 {int (*f) (int a);};
10367 struct s2 {int (*f) (double a);};
10368 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
10369 int argc;
10370 char **argv;
10371 int
10372 main ()
10373 {
10374 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
10375   ;
10376   return 0;
10377 }
10378 _ACEOF
10379 # Don't try gcc -ansi; that turns off useful extensions and
10380 # breaks some systems' header files.
10381 # AIX                   -qlanglvl=ansi
10382 # Ultrix and OSF/1      -std1
10383 # HP-UX 10.20 and later -Ae
10384 # HP-UX older versions  -Aa -D_HPUX_SOURCE
10385 # SVR4                  -Xc -D__EXTENSIONS__
10386 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10387 do
10388   CC="$ac_save_CC $ac_arg"
10389   rm -f conftest.$ac_objext
10390 if { (eval echo "$as_me:10390: \"$ac_compile\"") >&5
10391   (eval $ac_compile) 2>&5
10392   ac_status=$?
10393   echo "$as_me:10393: \$? = $ac_status" >&5
10394   (exit $ac_status); } &&
10395          { ac_try='test -s conftest.$ac_objext'
10396   { (eval echo "$as_me:10396: \"$ac_try\"") >&5
10397   (eval $ac_try) 2>&5
10398   ac_status=$?
10399   echo "$as_me:10399: \$? = $ac_status" >&5
10400   (exit $ac_status); }; }; then
10401   ac_cv_prog_cc_stdc=$ac_arg
10402 break
10403 else
10404   echo "$as_me: failed program was:" >&5
10405 cat conftest.$ac_ext >&5
10406 fi
10407 rm -f conftest.$ac_objext
10408 done
10409 rm -f conftest.$ac_ext conftest.$ac_objext
10410 CC=$ac_save_CC
10411
10412 fi
10413
10414 case "x$ac_cv_prog_cc_stdc" in
10415   x|xno)
10416     echo "$as_me:10416: result: none needed" >&5
10417 echo "${ECHO_T}none needed" >&6 ;;
10418   *)
10419     echo "$as_me:10419: result: $ac_cv_prog_cc_stdc" >&5
10420 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
10421     CC="$CC $ac_cv_prog_cc_stdc" ;;
10422 esac
10423
10424 echo "$as_me:10424: checking for an ANSI C-conforming const" >&5
10425 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10426 if test "${ac_cv_c_const+set}" = set; then
10427   echo $ECHO_N "(cached) $ECHO_C" >&6
10428 else
10429   cat >conftest.$ac_ext <<_ACEOF
10430 #line 10430 "configure"
10431 #include "confdefs.h"
10432
10433 int
10434 main ()
10435 {
10436 /* FIXME: Include the comments suggested by Paul. */
10437 #ifndef __cplusplus
10438   /* Ultrix mips cc rejects this.  */
10439   typedef int charset[2];
10440   const charset x;
10441   /* SunOS 4.1.1 cc rejects this.  */
10442   char const *const *ccp;
10443   char **p;
10444   /* NEC SVR4.0.2 mips cc rejects this.  */
10445   struct point {int x, y;};
10446   static struct point const zero = {0,0};
10447   /* AIX XL C 1.02.0.0 rejects this.
10448      It does not let you subtract one const X* pointer from another in
10449      an arm of an if-expression whose if-part is not a constant
10450      expression */
10451   const char *g = "string";
10452   ccp = &g + (g ? g-g : 0);
10453   /* HPUX 7.0 cc rejects these. */
10454   ++ccp;
10455   p = (char**) ccp;
10456   ccp = (char const *const *) p;
10457   { /* SCO 3.2v4 cc rejects this.  */
10458     char *t;
10459     char const *s = 0 ? (char *) 0 : (char const *) 0;
10460
10461     *t++ = 0;
10462   }
10463   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10464     int x[] = {25, 17};
10465     const int *foo = &x[0];
10466     ++foo;
10467   }
10468   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10469     typedef const int *iptr;
10470     iptr p = 0;
10471     ++p;
10472   }
10473   { /* AIX XL C 1.02.0.0 rejects this saying
10474        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10475     struct s { int j; const int *ap[3]; };
10476     struct s *b; b->j = 5;
10477   }
10478   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10479     const int foo = 10;
10480   }
10481 #endif
10482
10483   ;
10484   return 0;
10485 }
10486 _ACEOF
10487 rm -f conftest.$ac_objext
10488 if { (eval echo "$as_me:10488: \"$ac_compile\"") >&5
10489   (eval $ac_compile) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit $ac_status); } &&
10493          { ac_try='test -s conftest.$ac_objext'
10494   { (eval echo "$as_me:10494: \"$ac_try\"") >&5
10495   (eval $ac_try) 2>&5
10496   ac_status=$?
10497   echo "$as_me:10497: \$? = $ac_status" >&5
10498   (exit $ac_status); }; }; then
10499   ac_cv_c_const=yes
10500 else
10501   echo "$as_me: failed program was:" >&5
10502 cat conftest.$ac_ext >&5
10503 ac_cv_c_const=no
10504 fi
10505 rm -f conftest.$ac_objext conftest.$ac_ext
10506 fi
10507 echo "$as_me:10507: result: $ac_cv_c_const" >&5
10508 echo "${ECHO_T}$ac_cv_c_const" >&6
10509 if test $ac_cv_c_const = no; then
10510
10511 cat >>confdefs.h <<\EOF
10512 #define const
10513 EOF
10514
10515 fi
10516
10517 ###     Checks for external-data
10518
10519 echo "$as_me:10519: checking if data-only library module links" >&5
10520 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
10521 if test "${cf_cv_link_dataonly+set}" = set; then
10522   echo $ECHO_N "(cached) $ECHO_C" >&6
10523 else
10524
10525         rm -f conftest.a
10526         cat >conftest.$ac_ext <<EOF
10527 #line 10527 "configure"
10528 int     testdata[3] = { 123, 456, 789 };
10529 EOF
10530         if { (eval echo "$as_me:10530: \"$ac_compile\"") >&5
10531   (eval $ac_compile) 2>&5
10532   ac_status=$?
10533   echo "$as_me:10533: \$? = $ac_status" >&5
10534   (exit $ac_status); } ; then
10535                 mv conftest.o data.o && \
10536                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
10537         fi
10538         rm -f conftest.$ac_ext data.o
10539         cat >conftest.$ac_ext <<EOF
10540 #line 10540 "configure"
10541 int     testfunc()
10542 {
10543 #if defined(NeXT)
10544         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
10545 #else
10546         extern int testdata[3];
10547         return testdata[0] == 123
10548            &&  testdata[1] == 456
10549            &&  testdata[2] == 789;
10550 #endif
10551 }
10552 EOF
10553         if { (eval echo "$as_me:10553: \"$ac_compile\"") >&5
10554   (eval $ac_compile) 2>&5
10555   ac_status=$?
10556   echo "$as_me:10556: \$? = $ac_status" >&5
10557   (exit $ac_status); }; then
10558                 mv conftest.o func.o && \
10559                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
10560         fi
10561         rm -f conftest.$ac_ext func.o
10562         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
10563         cf_saveLIBS="$LIBS"
10564         LIBS="conftest.a $LIBS"
10565         if test "$cross_compiling" = yes; then
10566   cf_cv_link_dataonly=unknown
10567 else
10568   cat >conftest.$ac_ext <<_ACEOF
10569 #line 10569 "configure"
10570 #include "confdefs.h"
10571
10572         int main()
10573         {
10574                 extern int testfunc();
10575                 ${cf_cv_main_return:-return} (!testfunc());
10576         }
10577
10578 _ACEOF
10579 rm -f conftest$ac_exeext
10580 if { (eval echo "$as_me:10580: \"$ac_link\"") >&5
10581   (eval $ac_link) 2>&5
10582   ac_status=$?
10583   echo "$as_me:10583: \$? = $ac_status" >&5
10584   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10585   { (eval echo "$as_me:10585: \"$ac_try\"") >&5
10586   (eval $ac_try) 2>&5
10587   ac_status=$?
10588   echo "$as_me:10588: \$? = $ac_status" >&5
10589   (exit $ac_status); }; }; then
10590   cf_cv_link_dataonly=yes
10591 else
10592   echo "$as_me: program exited with status $ac_status" >&5
10593 echo "$as_me: failed program was:" >&5
10594 cat conftest.$ac_ext >&5
10595 cf_cv_link_dataonly=no
10596 fi
10597 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10598 fi
10599         LIBS="$cf_saveLIBS"
10600
10601 fi
10602
10603 echo "$as_me:10603: result: $cf_cv_link_dataonly" >&5
10604 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
10605
10606 if test "$cf_cv_link_dataonly" = no ; then
10607         cat >>confdefs.h <<\EOF
10608 #define BROKEN_LINKER 1
10609 EOF
10610
10611         BROKEN_LINKER=1
10612 fi
10613
10614 ###     Checks for library functions.
10615
10616 echo "$as_me:10616: checking for working mkstemp" >&5
10617 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
10618 if test "${cf_cv_func_mkstemp+set}" = set; then
10619   echo $ECHO_N "(cached) $ECHO_C" >&6
10620 else
10621
10622 rm -rf conftest*
10623 if test "$cross_compiling" = yes; then
10624   echo "$as_me:10624: checking for mkstemp" >&5
10625 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
10626 if test "${ac_cv_func_mkstemp+set}" = set; then
10627   echo $ECHO_N "(cached) $ECHO_C" >&6
10628 else
10629   cat >conftest.$ac_ext <<_ACEOF
10630 #line 10630 "configure"
10631 #include "confdefs.h"
10632 /* System header to define __stub macros and hopefully few prototypes,
10633     which can conflict with char mkstemp (); below.  */
10634 #include <assert.h>
10635 /* Override any gcc2 internal prototype to avoid an error.  */
10636 #ifdef __cplusplus
10637 extern "C"
10638 #endif
10639 /* We use char because int might match the return type of a gcc2
10640    builtin and then its argument prototype would still apply.  */
10641 char mkstemp ();
10642 char (*f) ();
10643
10644 int
10645 main ()
10646 {
10647 /* The GNU C library defines this for functions which it implements
10648     to always fail with ENOSYS.  Some functions are actually named
10649     something starting with __ and the normal name is an alias.  */
10650 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
10651 choke me
10652 #else
10653 f = mkstemp;
10654 #endif
10655
10656   ;
10657   return 0;
10658 }
10659 _ACEOF
10660 rm -f conftest.$ac_objext conftest$ac_exeext
10661 if { (eval echo "$as_me:10661: \"$ac_link\"") >&5
10662   (eval $ac_link) 2>&5
10663   ac_status=$?
10664   echo "$as_me:10664: \$? = $ac_status" >&5
10665   (exit $ac_status); } &&
10666          { ac_try='test -s conftest$ac_exeext'
10667   { (eval echo "$as_me:10667: \"$ac_try\"") >&5
10668   (eval $ac_try) 2>&5
10669   ac_status=$?
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit $ac_status); }; }; then
10672   ac_cv_func_mkstemp=yes
10673 else
10674   echo "$as_me: failed program was:" >&5
10675 cat conftest.$ac_ext >&5
10676 ac_cv_func_mkstemp=no
10677 fi
10678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10679 fi
10680 echo "$as_me:10680: result: $ac_cv_func_mkstemp" >&5
10681 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
10682
10683 else
10684   cat >conftest.$ac_ext <<_ACEOF
10685 #line 10685 "configure"
10686 #include "confdefs.h"
10687
10688 #include <sys/types.h>
10689 #include <stdlib.h>
10690 #include <stdio.h>
10691 #include <string.h>
10692 #include <sys/stat.h>
10693 int main()
10694 {
10695         char *tmpl = "conftestXXXXXX";
10696         char name[2][80];
10697         int n;
10698         int result = 0;
10699         int fd;
10700         struct stat sb;
10701
10702         umask(077);
10703         for (n = 0; n < 2; ++n) {
10704                 strcpy(name[n], tmpl);
10705                 if ((fd = mkstemp(name[n])) >= 0) {
10706                         if (!strcmp(name[n], tmpl)
10707                          || stat(name[n], &sb) != 0
10708                          || (sb.st_mode & S_IFMT) != S_IFREG
10709                          || (sb.st_mode & 077) != 0) {
10710                                 result = 1;
10711                         }
10712                         close(fd);
10713                 }
10714         }
10715         if (result == 0
10716          && !strcmp(name[0], name[1]))
10717                 result = 1;
10718         ${cf_cv_main_return:-return}(result);
10719 }
10720
10721 _ACEOF
10722 rm -f conftest$ac_exeext
10723 if { (eval echo "$as_me:10723: \"$ac_link\"") >&5
10724   (eval $ac_link) 2>&5
10725   ac_status=$?
10726   echo "$as_me:10726: \$? = $ac_status" >&5
10727   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10728   { (eval echo "$as_me:10728: \"$ac_try\"") >&5
10729   (eval $ac_try) 2>&5
10730   ac_status=$?
10731   echo "$as_me:10731: \$? = $ac_status" >&5
10732   (exit $ac_status); }; }; then
10733   cf_cv_func_mkstemp=yes
10734
10735 else
10736   echo "$as_me: program exited with status $ac_status" >&5
10737 echo "$as_me: failed program was:" >&5
10738 cat conftest.$ac_ext >&5
10739 cf_cv_func_mkstemp=no
10740
10741 fi
10742 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10743 fi
10744
10745 fi
10746 echo "$as_me:10746: result: $cf_cv_func_mkstemp" >&5
10747 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
10748 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
10749         cat >>confdefs.h <<\EOF
10750 #define HAVE_MKSTEMP 1
10751 EOF
10752
10753 fi
10754
10755 echo "$as_me:10755: checking return type of signal handlers" >&5
10756 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10757 if test "${ac_cv_type_signal+set}" = set; then
10758   echo $ECHO_N "(cached) $ECHO_C" >&6
10759 else
10760   cat >conftest.$ac_ext <<_ACEOF
10761 #line 10761 "configure"
10762 #include "confdefs.h"
10763 #include <sys/types.h>
10764 #include <signal.h>
10765 #ifdef signal
10766 # undef signal
10767 #endif
10768 #ifdef __cplusplus
10769 extern "C" void (*signal (int, void (*)(int)))(int);
10770 #else
10771 void (*signal ()) ();
10772 #endif
10773
10774 int
10775 main ()
10776 {
10777 int i;
10778   ;
10779   return 0;
10780 }
10781 _ACEOF
10782 rm -f conftest.$ac_objext
10783 if { (eval echo "$as_me:10783: \"$ac_compile\"") >&5
10784   (eval $ac_compile) 2>&5
10785   ac_status=$?
10786   echo "$as_me:10786: \$? = $ac_status" >&5
10787   (exit $ac_status); } &&
10788          { ac_try='test -s conftest.$ac_objext'
10789   { (eval echo "$as_me:10789: \"$ac_try\"") >&5
10790   (eval $ac_try) 2>&5
10791   ac_status=$?
10792   echo "$as_me:10792: \$? = $ac_status" >&5
10793   (exit $ac_status); }; }; then
10794   ac_cv_type_signal=void
10795 else
10796   echo "$as_me: failed program was:" >&5
10797 cat conftest.$ac_ext >&5
10798 ac_cv_type_signal=int
10799 fi
10800 rm -f conftest.$ac_objext conftest.$ac_ext
10801 fi
10802 echo "$as_me:10802: result: $ac_cv_type_signal" >&5
10803 echo "${ECHO_T}$ac_cv_type_signal" >&6
10804
10805 cat >>confdefs.h <<EOF
10806 #define RETSIGTYPE $ac_cv_type_signal
10807 EOF
10808
10809 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
10810         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10811         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10812 fi
10813
10814 if test "$cf_with_ada" != "no" ; then
10815
10816 cf_ada_make=gnatmake
10817 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
10818 set dummy $cf_ada_make; ac_word=$2
10819 echo "$as_me:10819: checking for $ac_word" >&5
10820 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10821 if test "${ac_cv_prog_gnat_exists+set}" = set; then
10822   echo $ECHO_N "(cached) $ECHO_C" >&6
10823 else
10824   if test -n "$gnat_exists"; then
10825   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
10826 else
10827   ac_save_IFS=$IFS; IFS=$ac_path_separator
10828 ac_dummy="$PATH"
10829 for ac_dir in $ac_dummy; do
10830   IFS=$ac_save_IFS
10831   test -z "$ac_dir" && ac_dir=.
10832   $as_executable_p "$ac_dir/$ac_word" || continue
10833 ac_cv_prog_gnat_exists="yes"
10834 echo "$as_me:10834: found $ac_dir/$ac_word" >&5
10835 break
10836 done
10837
10838   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
10839 fi
10840 fi
10841 gnat_exists=$ac_cv_prog_gnat_exists
10842 if test -n "$gnat_exists"; then
10843   echo "$as_me:10843: result: $gnat_exists" >&5
10844 echo "${ECHO_T}$gnat_exists" >&6
10845 else
10846   echo "$as_me:10846: result: no" >&5
10847 echo "${ECHO_T}no" >&6
10848 fi
10849
10850 if test "$ac_cv_prog_gnat_exists" = no; then
10851    cf_ada_make=
10852 else
10853
10854 echo "$as_me:10854: checking for gnat version" >&5
10855 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
10856 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
10857         grep '[0-9].[0-9][0-9]*' |\
10858     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
10859 echo "$as_me:10859: result: $cf_gnat_version" >&5
10860 echo "${ECHO_T}$cf_gnat_version" >&6
10861
10862 case $cf_gnat_version in #(vi
10863 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
10864         cf_cv_prog_gnat_correct=yes
10865         ;;
10866 *)
10867         { echo "$as_me:10867: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
10868 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
10869         cf_cv_prog_gnat_correct=no
10870         ;;
10871 esac
10872
10873    # Extract the first word of "m4", so it can be a program name with args.
10874 set dummy m4; ac_word=$2
10875 echo "$as_me:10875: checking for $ac_word" >&5
10876 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10877 if test "${ac_cv_prog_M4_exists+set}" = set; then
10878   echo $ECHO_N "(cached) $ECHO_C" >&6
10879 else
10880   if test -n "$M4_exists"; then
10881   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
10882 else
10883   ac_save_IFS=$IFS; IFS=$ac_path_separator
10884 ac_dummy="$PATH"
10885 for ac_dir in $ac_dummy; do
10886   IFS=$ac_save_IFS
10887   test -z "$ac_dir" && ac_dir=.
10888   $as_executable_p "$ac_dir/$ac_word" || continue
10889 ac_cv_prog_M4_exists="yes"
10890 echo "$as_me:10890: found $ac_dir/$ac_word" >&5
10891 break
10892 done
10893
10894   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
10895 fi
10896 fi
10897 M4_exists=$ac_cv_prog_M4_exists
10898 if test -n "$M4_exists"; then
10899   echo "$as_me:10899: result: $M4_exists" >&5
10900 echo "${ECHO_T}$M4_exists" >&6
10901 else
10902   echo "$as_me:10902: result: no" >&5
10903 echo "${ECHO_T}no" >&6
10904 fi
10905
10906    if test "$ac_cv_prog_M4_exists" = no; then
10907       cf_cv_prog_gnat_correct=no
10908       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
10909    fi
10910    if test "$cf_cv_prog_gnat_correct" = yes; then
10911       echo "$as_me:10911: checking if GNAT works" >&5
10912 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
10913
10914 rm -rf conftest* *~conftest*
10915 cat >>conftest.ads <<CF_EOF
10916 procedure conftest;
10917 CF_EOF
10918 cat >>conftest.adb <<CF_EOF
10919 with Text_IO;
10920 with GNAT.OS_Lib;
10921 procedure conftest is
10922 begin
10923    Text_IO.Put ("Hello World");
10924    Text_IO.New_Line;
10925    GNAT.OS_Lib.OS_Exit (0);
10926 end conftest;
10927 CF_EOF
10928 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
10929    if ( ./conftest 1>&5 2>&1 ) ; then
10930       cf_cv_prog_gnat_correct=yes
10931    else
10932       cf_cv_prog_gnat_correct=no
10933    fi
10934 else
10935    cf_cv_prog_gnat_correct=no
10936 fi
10937 rm -rf conftest* *~conftest*
10938
10939       echo "$as_me:10939: result: $cf_cv_prog_gnat_correct" >&5
10940 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
10941    fi
10942 fi
10943
10944         if test "$cf_cv_prog_gnat_correct" = yes; then
10945
10946                 # make ADAFLAGS consistent with CFLAGS
10947                 case "$CFLAGS" in
10948                 *-g*)
10949
10950         ADAFLAGS="$ADAFLAGS -g"
10951
10952                         ;;
10953                 esac
10954                 case "$CFLAGS" in
10955                 *-O*)
10956
10957         ADAFLAGS="$ADAFLAGS -O3"
10958
10959                         ;;
10960                 esac
10961
10962 echo "$as_me:10962: checking if GNAT supports generics" >&5
10963 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
10964 case $cf_gnat_version in #(vi
10965 3.[1-9]*|[4-9].*) #(vi
10966         cf_gnat_generics=yes
10967         ;;
10968 *)
10969         cf_gnat_generics=no
10970         ;;
10971 esac
10972 echo "$as_me:10972: result: $cf_gnat_generics" >&5
10973 echo "${ECHO_T}$cf_gnat_generics" >&6
10974
10975 if test "$cf_gnat_generics" = yes
10976 then
10977         cf_compile_generics=generics
10978         cf_generic_objects="\${GENOBJS}"
10979 else
10980         cf_compile_generics=
10981         cf_generic_objects=
10982 fi
10983
10984 echo "$as_me:10984: checking if GNAT supports SIGINT" >&5
10985 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
10986 if test "${cf_cv_gnat_sigint+set}" = set; then
10987   echo $ECHO_N "(cached) $ECHO_C" >&6
10988 else
10989
10990 rm -rf conftest* *~conftest*
10991 cat >>conftest.ads <<CF_EOF
10992 with Ada.Interrupts.Names;
10993
10994 package ConfTest is
10995
10996    pragma Warnings (Off);  --  the next pragma exists since 3.11p
10997    pragma Unreserve_All_Interrupts;
10998    pragma Warnings (On);
10999
11000    protected Process is
11001       procedure Stop;
11002       function Continue return Boolean;
11003       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
11004    private
11005       Done : Boolean := False;
11006    end Process;
11007
11008 end ConfTest;
11009 CF_EOF
11010 cat >>conftest.adb <<CF_EOF
11011 package body ConfTest is
11012    protected body Process is
11013       procedure Stop is
11014       begin
11015          Done := True;
11016       end Stop;
11017       function Continue return Boolean is
11018       begin
11019          return not Done;
11020       end Continue;
11021    end Process;
11022 end ConfTest;
11023 CF_EOF
11024 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11025       cf_cv_gnat_sigint=yes
11026 else
11027    cf_cv_gnat_sigint=no
11028 fi
11029 rm -rf conftest* *~conftest*
11030
11031 fi
11032 echo "$as_me:11032: result: $cf_cv_gnat_sigint" >&5
11033 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11034
11035 if test $cf_cv_gnat_sigint = yes ; then
11036         USE_GNAT_SIGINT=""
11037 else
11038         USE_GNAT_SIGINT="#"
11039 fi
11040
11041 echo "$as_me:11041: checking if GNAT pragma Unreferenced works" >&5
11042 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
11043 if test "${cf_cv_pragma_unreferenced+set}" = set; then
11044   echo $ECHO_N "(cached) $ECHO_C" >&6
11045 else
11046
11047 rm -rf conftest* *~conftest*
11048 cat >>conftest.ads <<CF_EOF
11049 procedure conftest;
11050 CF_EOF
11051 cat >>conftest.adb <<CF_EOF
11052 with Text_IO;
11053 with GNAT.OS_Lib;
11054 procedure conftest is
11055    test : Integer;
11056    pragma Unreferenced (test);
11057 begin
11058    test := 1;
11059    Text_IO.Put ("Hello World");
11060    Text_IO.New_Line;
11061    GNAT.OS_Lib.OS_Exit (0);
11062 end conftest;
11063 CF_EOF
11064 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11065       cf_cv_pragma_unreferenced=yes
11066 else
11067    cf_cv_pragma_unreferenced=no
11068 fi
11069 rm -rf conftest* *~conftest*
11070
11071 fi
11072 echo "$as_me:11072: result: $cf_cv_pragma_unreferenced" >&5
11073 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
11074
11075 # if the pragma is supported, use it (needed in the Trace code).
11076 if test $cf_cv_pragma_unreferenced = yes ; then
11077         PRAGMA_UNREF=TRUE
11078 else
11079         PRAGMA_UNREF=FALSE
11080 fi
11081
11082 cf_gnat_libraries=no
11083 cf_gnat_projects=no
11084
11085 echo "$as_me:11085: checking if GNAT supports project files" >&5
11086 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11087 case $cf_gnat_version in #(vi
11088 3.[0-9]*) #(vi
11089         ;;
11090 *)
11091         case $cf_cv_system_name in #(vi
11092         cygwin*) #(vi
11093                 ;;
11094         *)
11095                 mkdir conftest.src conftest.bin conftest.lib
11096                 cd conftest.src
11097                 rm -rf conftest* *~conftest*
11098                 cat >>library.gpr <<CF_EOF
11099 project Library is
11100   Kind := External ("LIB_KIND");
11101   for Library_Name use "ConfTest";
11102   for Object_Dir use ".";
11103   for Library_ALI_Dir use External("LIBRARY_DIR");
11104   for Library_Version use External ("SONAME");
11105   for Library_Kind use Kind;
11106   for Library_Dir use External("BUILD_DIR");
11107   Source_Dir := External ("SOURCE_DIR");
11108   for Source_Dirs use (Source_Dir);
11109   package Compiler is
11110      for Default_Switches ("Ada") use
11111        ("-g",
11112         "-O2",
11113         "-gnatafno",
11114         "-gnatVa",   -- All validity checks
11115         "-gnatwa");  -- Activate all optional errors
11116   end Compiler;
11117 end Library;
11118 CF_EOF
11119                 cat >>confpackage.ads <<CF_EOF
11120 package ConfPackage is
11121    procedure conftest;
11122 end ConfPackage;
11123 CF_EOF
11124                 cat >>confpackage.adb <<CF_EOF
11125 with Text_IO;
11126 package body ConfPackage is
11127    procedure conftest is
11128    begin
11129       Text_IO.Put ("Hello World");
11130       Text_IO.New_Line;
11131    end conftest;
11132 end ConfPackage;
11133 CF_EOF
11134                 if ( $cf_ada_make $ADAFLAGS \
11135                                 -Plibrary.gpr \
11136                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11137                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11138                                 -XSOURCE_DIR=`pwd` \
11139                                 -XSONAME=libConfTest.so.1 \
11140                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11141                         cf_gnat_projects=yes
11142                 fi
11143                 cd ..
11144                 if test -f conftest.lib/confpackage.ali
11145                 then
11146                         cf_gnat_libraries=yes
11147                 fi
11148                 rm -rf conftest* *~conftest*
11149                 ;;
11150         esac
11151         ;;
11152 esac
11153 echo "$as_me:11153: result: $cf_gnat_projects" >&5
11154 echo "${ECHO_T}$cf_gnat_projects" >&6
11155
11156 if test $cf_gnat_projects = yes
11157 then
11158         echo "$as_me:11158: checking if GNAT supports libraries" >&5
11159 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11160         echo "$as_me:11160: result: $cf_gnat_libraries" >&5
11161 echo "${ECHO_T}$cf_gnat_libraries" >&6
11162 fi
11163
11164 if test "$cf_gnat_projects" = yes
11165 then
11166         USE_OLD_MAKERULES="#"
11167         USE_GNAT_PROJECTS=""
11168 else
11169         USE_OLD_MAKERULES=""
11170         USE_GNAT_PROJECTS="#"
11171 fi
11172
11173 if test "$cf_gnat_libraries" = yes
11174 then
11175         USE_GNAT_LIBRARIES=""
11176 else
11177         USE_GNAT_LIBRARIES="#"
11178 fi
11179
11180 echo "$as_me:11180: checking for ada-compiler" >&5
11181 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11182
11183 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11184 if test "${with_ada_compiler+set}" = set; then
11185   withval="$with_ada_compiler"
11186   cf_ada_compiler=$withval
11187 else
11188   cf_ada_compiler=gnatmake
11189 fi;
11190
11191 echo "$as_me:11191: result: $cf_ada_compiler" >&5
11192 echo "${ECHO_T}$cf_ada_compiler" >&6
11193
11194                 cf_ada_package=terminal_interface
11195
11196 echo "$as_me:11196: checking for ada-include" >&5
11197 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11198
11199 # Check whether --with-ada-include or --without-ada-include was given.
11200 if test "${with_ada_include+set}" = set; then
11201   withval="$with_ada_include"
11202
11203 else
11204   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
11205 fi; if test -n "$prefix/share/ada/adainclude" ; then
11206
11207 if test "x$prefix" != xNONE; then
11208   cf_path_syntax="$prefix"
11209 else
11210   cf_path_syntax="$ac_default_prefix"
11211 fi
11212
11213 case ".$withval" in #(vi
11214 .\$\(*\)*|.\'*\'*) #(vi
11215   ;;
11216 ..|./*|.\\*) #(vi
11217   ;;
11218 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11219   ;;
11220 .\${*prefix}*) #(vi
11221   eval withval="$withval"
11222   case ".$withval" in #(vi
11223   .NONE/*)
11224     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11225     ;;
11226   esac
11227   ;; #(vi
11228 .no|.NONE/*)
11229   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11230   ;;
11231 *)
11232   { { echo "$as_me:11232: error: expected a pathname, not \"$withval\"" >&5
11233 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11234    { (exit 1); exit 1; }; }
11235   ;;
11236 esac
11237
11238 fi
11239 ADA_INCLUDE="$withval"
11240
11241 echo "$as_me:11241: result: $ADA_INCLUDE" >&5
11242 echo "${ECHO_T}$ADA_INCLUDE" >&6
11243
11244 echo "$as_me:11244: checking for ada-objects" >&5
11245 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
11246
11247 # Check whether --with-ada-objects or --without-ada-objects was given.
11248 if test "${with_ada_objects+set}" = set; then
11249   withval="$with_ada_objects"
11250
11251 else
11252   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
11253 fi; if test -n "$prefix/lib/ada/adalib" ; then
11254
11255 if test "x$prefix" != xNONE; then
11256   cf_path_syntax="$prefix"
11257 else
11258   cf_path_syntax="$ac_default_prefix"
11259 fi
11260
11261 case ".$withval" in #(vi
11262 .\$\(*\)*|.\'*\'*) #(vi
11263   ;;
11264 ..|./*|.\\*) #(vi
11265   ;;
11266 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11267   ;;
11268 .\${*prefix}*) #(vi
11269   eval withval="$withval"
11270   case ".$withval" in #(vi
11271   .NONE/*)
11272     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11273     ;;
11274   esac
11275   ;; #(vi
11276 .no|.NONE/*)
11277   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11278   ;;
11279 *)
11280   { { echo "$as_me:11280: error: expected a pathname, not \"$withval\"" >&5
11281 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11282    { (exit 1); exit 1; }; }
11283   ;;
11284 esac
11285
11286 fi
11287 ADA_OBJECTS="$withval"
11288
11289 echo "$as_me:11289: result: $ADA_OBJECTS" >&5
11290 echo "${ECHO_T}$ADA_OBJECTS" >&6
11291
11292 echo "$as_me:11292: checking if an Ada95 shared-library should be built" >&5
11293 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
11294
11295 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
11296 if test "${with_ada_sharedlib+set}" = set; then
11297   withval="$with_ada_sharedlib"
11298   with_ada_sharedlib=$withval
11299 else
11300   with_ada_sharedlib=no
11301 fi;
11302 echo "$as_me:11302: result: $with_ada_sharedlib" >&5
11303 echo "${ECHO_T}$with_ada_sharedlib" >&6
11304
11305 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
11306 MAKE_ADA_SHAREDLIB="#"
11307
11308 if test "x$with_ada_sharedlib" != xno
11309 then
11310         MAKE_ADA_SHAREDLIB=
11311         if test "x$with_ada_sharedlib" != xyes
11312         then
11313                 ADA_SHAREDLIB="$with_ada_sharedlib"
11314         fi
11315 fi
11316
11317         else
11318                 { { echo "$as_me:11318: error: No usable Ada compiler found" >&5
11319 echo "$as_me: error: No usable Ada compiler found" >&2;}
11320    { (exit 1); exit 1; }; }
11321         fi
11322 else
11323         { { echo "$as_me:11323: error: The Ada compiler is needed for this package" >&5
11324 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
11325    { (exit 1); exit 1; }; }
11326 fi
11327
11328 ################################################################################
11329
11330 # not needed
11331 TINFO_ARGS2=
11332
11333 ### Construct the list of include-directories to be generated
11334
11335 CPPFLAGS="$CPPFLAGS -I. -I../include"
11336 if test "$srcdir" != "."; then
11337         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
11338 fi
11339 if test "$GCC" != yes; then
11340         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11341 elif test "$includedir" != "/usr/include"; then
11342         if test "$includedir" = '${prefix}/include' ; then
11343                 if test $prefix != /usr ; then
11344                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11345                 fi
11346         else
11347                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
11348         fi
11349 fi
11350
11351 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
11352 if test "$srcdir" != "."; then
11353         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
11354 fi
11355 if test "$GCC" != yes; then
11356         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11357 elif test "$includedir" != "/usr/include"; then
11358         if test "$includedir" = '${prefix}/include' ; then
11359                 if test $prefix != /usr ; then
11360                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11361                 fi
11362         else
11363                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11364         fi
11365 fi
11366
11367 ### Build up pieces for makefile rules
11368 echo "$as_me:11368: checking default library suffix" >&5
11369 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
11370
11371         case $DFT_LWR_MODEL in
11372         libtool) DFT_ARG_SUFFIX=''   ;;
11373         normal)  DFT_ARG_SUFFIX=''   ;;
11374         debug)   DFT_ARG_SUFFIX='_g' ;;
11375         profile) DFT_ARG_SUFFIX='_p' ;;
11376         shared)  DFT_ARG_SUFFIX=''   ;;
11377         esac
11378         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
11379 echo "$as_me:11379: result: $DFT_ARG_SUFFIX" >&5
11380 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
11381
11382 echo "$as_me:11382: checking default library-dependency suffix" >&5
11383 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
11384
11385         case $DFT_LWR_MODEL in #(vi
11386         libtool) #(vi
11387                 DFT_LIB_SUFFIX='.la'
11388                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11389                 ;;
11390         normal) #(vi
11391                 DFT_LIB_SUFFIX='.a'
11392                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11393                 ;;
11394         debug) #(vi
11395                 DFT_LIB_SUFFIX='_g.a'
11396                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11397                 ;;
11398         profile) #(vi
11399                 DFT_LIB_SUFFIX='_p.a'
11400                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11401                 ;;
11402         shared) #(vi
11403                 case $cf_cv_system_name in
11404                 aix[56]*) #(vi
11405                         DFT_LIB_SUFFIX='.a'
11406                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11407                         ;;
11408                 cygwin*) #(vi
11409                         DFT_LIB_SUFFIX='.dll'
11410                         DFT_DEP_SUFFIX='.dll.a'
11411                         ;;
11412                 darwin*) #(vi
11413                         DFT_LIB_SUFFIX='.dylib'
11414                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11415                         ;;
11416                 hpux*) #(vi
11417                         case $target in
11418                         ia64*) #(vi
11419                                 DFT_LIB_SUFFIX='.so'
11420                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11421                                 ;;
11422                         *) #(vi
11423                                 DFT_LIB_SUFFIX='.sl'
11424                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11425                                 ;;
11426                         esac
11427                         ;;
11428                 *)      DFT_LIB_SUFFIX='.so'
11429                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11430                         ;;
11431                 esac
11432         esac
11433         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
11434         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
11435 echo "$as_me:11435: result: $DFT_DEP_SUFFIX" >&5
11436 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
11437
11438 echo "$as_me:11438: checking default object directory" >&5
11439 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
11440
11441         case $DFT_LWR_MODEL in
11442         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
11443         normal)  DFT_OBJ_SUBDIR='objects' ;;
11444         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
11445         profile) DFT_OBJ_SUBDIR='obj_p' ;;
11446         shared)
11447                 case $cf_cv_system_name in #(vi
11448                 cygwin) #(vi
11449                         DFT_OBJ_SUBDIR='objects' ;;
11450                 *)
11451                         DFT_OBJ_SUBDIR='obj_s' ;;
11452                 esac
11453         esac
11454 echo "$as_me:11454: result: $DFT_OBJ_SUBDIR" >&5
11455 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
11456
11457 ### Set up low-level terminfo dependencies for makefiles.
11458
11459 if test "$DFT_LWR_MODEL" = shared ; then
11460         case $cf_cv_system_name in #(vi
11461         cygwin*)
11462                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
11463                 ;;
11464         esac
11465 fi
11466
11467 ### Construct the list of subdirectories for which we'll customize makefiles
11468 ### with the appropriate compile-rules.
11469
11470 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
11471
11472 cat >>confdefs.h <<EOF
11473 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
11474 EOF
11475
11476 ### Now that we're done running tests, add the compiler-warnings, if any
11477
11478 cf_fix_cppflags=no
11479 cf_new_cflags=
11480 cf_new_cppflags=
11481 cf_new_extra_cppflags=
11482
11483 for cf_add_cflags in $EXTRA_CFLAGS
11484 do
11485 case $cf_fix_cppflags in
11486 no)
11487         case $cf_add_cflags in #(vi
11488         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11489                 case $cf_add_cflags in
11490                 -D*)
11491                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11492
11493                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11494                                 && test -z "${cf_tst_cflags}" \
11495                                 && cf_fix_cppflags=yes
11496
11497                         if test $cf_fix_cppflags = yes ; then
11498                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11499                                 continue
11500                         elif test "${cf_tst_cflags}" = "\"'" ; then
11501                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11502                                 continue
11503                         fi
11504                         ;;
11505                 esac
11506                 case "$CPPFLAGS" in
11507                 *$cf_add_cflags) #(vi
11508                         ;;
11509                 *) #(vi
11510                         case $cf_add_cflags in #(vi
11511                         -D*)
11512                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11513
11514 CPPFLAGS=`echo "$CPPFLAGS" | \
11515         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11516                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11517
11518                                 ;;
11519                         esac
11520                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11521                         ;;
11522                 esac
11523                 ;;
11524         *)
11525                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11526                 ;;
11527         esac
11528         ;;
11529 yes)
11530         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11531
11532         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11533
11534         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11535                 && test -z "${cf_tst_cflags}" \
11536                 && cf_fix_cppflags=no
11537         ;;
11538 esac
11539 done
11540
11541 if test -n "$cf_new_cflags" ; then
11542
11543         CFLAGS="$CFLAGS $cf_new_cflags"
11544 fi
11545
11546 if test -n "$cf_new_cppflags" ; then
11547
11548         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11549 fi
11550
11551 if test -n "$cf_new_extra_cppflags" ; then
11552
11553         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11554 fi
11555
11556 ################################################################################
11557
11558 if test x"$enable_pc_files" = xyes ; then \
11559 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
11560 MAKE_PC_FILES=
11561 else
11562 MAKE_PC_FILES="#"
11563 fi
11564
11565 ################################################################################
11566
11567 TEST_ARG2=
11568
11569 TEST_LIBS2=
11570
11571 NCURSES_SHLIB2="sh -c"
11572
11573 ADA_SUBDIRS="include gen src doc"
11574 if test "x$cf_with_tests" != "xno" ; then
11575         ADA_SUBDIRS="$ADA_SUBDIRS samples"
11576 fi
11577 for cf_dir in $ADA_SUBDIRS
11578 do
11579         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
11580 done
11581
11582 NCURSES_TREE="#"
11583
11584 EXTERNAL_TREE=
11585
11586 # match layout used by make-tar.sh
11587 ADAHTML_DIR=../doc/ada
11588
11589 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
11590 ac_config_commands="$ac_config_commands default"
11591 cat >confcache <<\_ACEOF
11592 # This file is a shell script that caches the results of configure
11593 # tests run on this system so they can be shared between configure
11594 # scripts and configure runs, see configure's option --config-cache.
11595 # It is not useful on other systems.  If it contains results you don't
11596 # want to keep, you may remove or edit it.
11597 #
11598 # config.status only pays attention to the cache file if you give it
11599 # the --recheck option to rerun configure.
11600 #
11601 # `ac_cv_env_foo' variables (set or unset) will be overriden when
11602 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11603 # following values.
11604
11605 _ACEOF
11606
11607 # The following way of writing the cache mishandles newlines in values,
11608 # but we know of no workaround that is simple, portable, and efficient.
11609 # So, don't put newlines in cache variables' values.
11610 # Ultrix sh set writes to stderr and can't be redirected directly,
11611 # and sets the high bit in the cache file unless we assign to the vars.
11612 {
11613   (set) 2>&1 |
11614     case `(ac_space=' '; set | grep ac_space) 2>&1` in
11615     *ac_space=\ *)
11616       # `set' does not quote correctly, so add quotes (double-quote
11617       # substitution turns \\\\ into \\, and sed turns \\ into \).
11618       sed -n \
11619         "s/'/'\\\\''/g;
11620           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11621       ;;
11622     *)
11623       # `set' quotes correctly as required by POSIX, so do not add quotes.
11624       sed -n \
11625         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11626       ;;
11627     esac;
11628 } |
11629   sed '
11630      t clear
11631      : clear
11632      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11633      t end
11634      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11635      : end' >>confcache
11636 if cmp -s $cache_file confcache; then :; else
11637   if test -w $cache_file; then
11638     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11639     cat confcache >$cache_file
11640   else
11641     echo "not updating unwritable cache $cache_file"
11642   fi
11643 fi
11644 rm -f confcache
11645
11646 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11647 # Let make expand exec_prefix.
11648 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11649
11650 # VPATH may cause trouble with some makes, so we remove $(srcdir),
11651 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11652 # trailing colons and then remove the whole line if VPATH becomes empty
11653 # (actually we leave an empty line to preserve line numbers).
11654 if test "x$srcdir" = x.; then
11655   ac_vpsub='/^[         ]*VPATH[        ]*=/{
11656 s/:*\$(srcdir):*/:/;
11657 s/:*\${srcdir}:*/:/;
11658 s/:*@srcdir@:*/:/;
11659 s/^\([^=]*=[    ]*\):*/\1/;
11660 s/:*$//;
11661 s/^[^=]*=[      ]*$//;
11662 }'
11663 fi
11664
11665 DEFS=-DHAVE_CONFIG_H
11666
11667 : ${CONFIG_STATUS=./config.status}
11668 ac_clean_files_save=$ac_clean_files
11669 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11670 { echo "$as_me:11670: creating $CONFIG_STATUS" >&5
11671 echo "$as_me: creating $CONFIG_STATUS" >&6;}
11672 cat >$CONFIG_STATUS <<_ACEOF
11673 #! $SHELL
11674 # Generated automatically by configure.
11675 # Run this file to recreate the current configuration.
11676 # Compiler output produced by configure, useful for debugging
11677 # configure, is in config.log if it exists.
11678
11679 debug=false
11680 SHELL=\${CONFIG_SHELL-$SHELL}
11681 ac_cs_invocation="\$0 \$@"
11682
11683 _ACEOF
11684
11685 cat >>$CONFIG_STATUS <<\_ACEOF
11686 # Be Bourne compatible
11687 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11688   emulate sh
11689   NULLCMD=:
11690 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11691   set -o posix
11692 fi
11693
11694 # Name of the executable.
11695 as_me=`echo "$0" |sed 's,.*[\\/],,'`
11696
11697 if expr a : '\(a\)' >/dev/null 2>&1; then
11698   as_expr=expr
11699 else
11700   as_expr=false
11701 fi
11702
11703 rm -f conf$$ conf$$.exe conf$$.file
11704 echo >conf$$.file
11705 if ln -s conf$$.file conf$$ 2>/dev/null; then
11706   # We could just check for DJGPP; but this test a) works b) is more generic
11707   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11708   if test -f conf$$.exe; then
11709     # Don't use ln at all; we don't have any links
11710     as_ln_s='cp -p'
11711   else
11712     as_ln_s='ln -s'
11713   fi
11714 elif ln conf$$.file conf$$ 2>/dev/null; then
11715   as_ln_s=ln
11716 else
11717   as_ln_s='cp -p'
11718 fi
11719 rm -f conf$$ conf$$.exe conf$$.file
11720
11721 as_executable_p="test -f"
11722
11723 # Support unset when possible.
11724 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11725   as_unset=unset
11726 else
11727   as_unset=false
11728 fi
11729
11730 # NLS nuisances.
11731 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
11732 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
11733 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
11734 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
11735 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
11736 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
11737 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
11738 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
11739
11740 # IFS
11741 # We need space, tab and new line, in precisely that order.
11742 as_nl='
11743 '
11744 IFS="   $as_nl"
11745
11746 # CDPATH.
11747 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
11748
11749 exec 6>&1
11750
11751 _ACEOF
11752
11753 # Files that config.status was made for.
11754 if test -n "$ac_config_files"; then
11755   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
11756 fi
11757
11758 if test -n "$ac_config_headers"; then
11759   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
11760 fi
11761
11762 if test -n "$ac_config_links"; then
11763   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
11764 fi
11765
11766 if test -n "$ac_config_commands"; then
11767   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
11768 fi
11769
11770 cat >>$CONFIG_STATUS <<\EOF
11771
11772 ac_cs_usage="\
11773 \`$as_me' instantiates files from templates according to the
11774 current configuration.
11775
11776 Usage: $0 [OPTIONS] [FILE]...
11777
11778   -h, --help       print this help, then exit
11779   -V, --version    print version number, then exit
11780   -d, --debug      don't remove temporary files
11781       --recheck    update $as_me by reconfiguring in the same conditions
11782   --file=FILE[:TEMPLATE]
11783                    instantiate the configuration file FILE
11784   --header=FILE[:TEMPLATE]
11785                    instantiate the configuration header FILE
11786
11787 Configuration files:
11788 $config_files
11789
11790 Configuration headers:
11791 $config_headers
11792
11793 Configuration commands:
11794 $config_commands
11795
11796 Report bugs to <dickey@invisible-island.net>."
11797 EOF
11798
11799 cat >>$CONFIG_STATUS <<EOF
11800 ac_cs_version="\\
11801 config.status
11802 configured by $0, generated by GNU Autoconf 2.52.20101002,
11803   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
11804
11805 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
11806 Free Software Foundation, Inc.
11807 This config.status script is free software; the Free Software Foundation
11808 gives unlimited permission to copy, distribute and modify it."
11809 srcdir=$srcdir
11810 INSTALL="$INSTALL"
11811 EOF
11812
11813 cat >>$CONFIG_STATUS <<\EOF
11814 # If no file are specified by the user, then we need to provide default
11815 # value.  By we need to know if files were specified by the user.
11816 ac_need_defaults=:
11817 while test $# != 0
11818 do
11819   case $1 in
11820   --*=*)
11821     ac_option=`expr "x$1" : 'x\([^=]*\)='`
11822     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
11823     shift
11824     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
11825     shift
11826     ;;
11827   -*);;
11828   *) # This is not an option, so the user has probably given explicit
11829      # arguments.
11830      ac_need_defaults=false;;
11831   esac
11832
11833   case $1 in
11834   # Handling of the options.
11835 EOF
11836 cat >>$CONFIG_STATUS <<EOF
11837   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11838     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
11839     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
11840 EOF
11841 cat >>$CONFIG_STATUS <<\EOF
11842   --version | --vers* | -V )
11843     echo "$ac_cs_version"; exit 0 ;;
11844   --he | --h)
11845     # Conflict between --help and --header
11846     { { echo "$as_me:11846: error: ambiguous option: $1
11847 Try \`$0 --help' for more information." >&5
11848 echo "$as_me: error: ambiguous option: $1
11849 Try \`$0 --help' for more information." >&2;}
11850    { (exit 1); exit 1; }; };;
11851   --help | --hel | -h )
11852     echo "$ac_cs_usage"; exit 0 ;;
11853   --debug | --d* | -d )
11854     debug=: ;;
11855   --file | --fil | --fi | --f )
11856     shift
11857     CONFIG_FILES="$CONFIG_FILES $1"
11858     ac_need_defaults=false;;
11859   --header | --heade | --head | --hea )
11860     shift
11861     CONFIG_HEADERS="$CONFIG_HEADERS $1"
11862     ac_need_defaults=false;;
11863
11864   # This is an error.
11865   -*) { { echo "$as_me:11865: error: unrecognized option: $1
11866 Try \`$0 --help' for more information." >&5
11867 echo "$as_me: error: unrecognized option: $1
11868 Try \`$0 --help' for more information." >&2;}
11869    { (exit 1); exit 1; }; } ;;
11870
11871   *) ac_config_targets="$ac_config_targets $1" ;;
11872
11873   esac
11874   shift
11875 done
11876
11877 exec 5>>config.log
11878 cat >&5 << _ACEOF
11879
11880 ## ----------------------- ##
11881 ## Running config.status.  ##
11882 ## ----------------------- ##
11883
11884 This file was extended by $as_me 2.52.20101002, executed with
11885   CONFIG_FILES    = $CONFIG_FILES
11886   CONFIG_HEADERS  = $CONFIG_HEADERS
11887   CONFIG_LINKS    = $CONFIG_LINKS
11888   CONFIG_COMMANDS = $CONFIG_COMMANDS
11889   > $ac_cs_invocation
11890 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11891
11892 _ACEOF
11893 EOF
11894
11895 cat >>$CONFIG_STATUS <<EOF
11896 #
11897 # INIT-COMMANDS section.
11898 #
11899
11900 ### Special initialization commands, used to pass information from the
11901 ### configuration-run into config.status
11902
11903 AWK="$AWK"
11904 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
11905 DFT_LWR_MODEL="$DFT_LWR_MODEL"
11906 ECHO_LINK="$ECHO_LINK"
11907 LIB_NAME="$LIB_NAME"
11908 LIB_SUFFIX="$LIB_SUFFIX"
11909 LN_S="$LN_S"
11910 NCURSES_MAJOR="$NCURSES_MAJOR"
11911 NCURSES_MINOR="$NCURSES_MINOR"
11912 NCURSES_PATCH="$NCURSES_PATCH"
11913 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
11914 cf_cv_abi_version="$cf_cv_abi_version"
11915 cf_cv_rel_version="$cf_cv_rel_version"
11916 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
11917 cf_cv_shared_soname='$cf_cv_shared_soname'
11918 cf_cv_shlib_version="$cf_cv_shlib_version"
11919 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
11920 cf_cv_system_name="$cf_cv_system_name"
11921 host="$host"
11922 target="$target"
11923
11924 EOF
11925
11926 cat >>$CONFIG_STATUS <<\EOF
11927 for ac_config_target in $ac_config_targets
11928 do
11929   case "$ac_config_target" in
11930   # Handling of arguments.
11931   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
11932   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
11933   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11934   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
11935   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
11936   *) { { echo "$as_me:11936: error: invalid argument: $ac_config_target" >&5
11937 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11938    { (exit 1); exit 1; }; };;
11939   esac
11940 done
11941
11942 # If the user did not use the arguments to specify the items to instantiate,
11943 # then the envvar interface is used.  Set only those that are not.
11944 # We use the long form for the default assignment because of an extremely
11945 # bizarre bug on SunOS 4.1.3.
11946 if $ac_need_defaults; then
11947   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11948   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11949   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11950 fi
11951
11952 # Create a temporary directory, and hook for its removal unless debugging.
11953 $debug ||
11954 {
11955   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
11956   trap '{ (exit 1); exit 1; }' 1 2 13 15
11957 }
11958
11959 # Create a (secure) tmp directory for tmp files.
11960 : ${TMPDIR=/tmp}
11961 {
11962   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
11963   test -n "$tmp" && test -d "$tmp"
11964 }  ||
11965 {
11966   tmp=$TMPDIR/cs$$-$RANDOM
11967   (umask 077 && mkdir $tmp)
11968 } ||
11969 {
11970    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
11971    { (exit 1); exit 1; }
11972 }
11973
11974 EOF
11975
11976 cat >>$CONFIG_STATUS <<EOF
11977
11978 #
11979 # CONFIG_FILES section.
11980 #
11981
11982 # No need to generate the scripts if there are no CONFIG_FILES.
11983 # This happens for instance when ./config.status config.h
11984 if test -n "\$CONFIG_FILES"; then
11985   # Protect against being on the right side of a sed subst in config.status.
11986   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
11987    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
11988 s,@SHELL@,$SHELL,;t t
11989 s,@exec_prefix@,$exec_prefix,;t t
11990 s,@prefix@,$prefix,;t t
11991 s,@program_transform_name@,$program_transform_name,;t t
11992 s,@bindir@,$bindir,;t t
11993 s,@sbindir@,$sbindir,;t t
11994 s,@libexecdir@,$libexecdir,;t t
11995 s,@datadir@,$datadir,;t t
11996 s,@sysconfdir@,$sysconfdir,;t t
11997 s,@sharedstatedir@,$sharedstatedir,;t t
11998 s,@localstatedir@,$localstatedir,;t t
11999 s,@libdir@,$libdir,;t t
12000 s,@includedir@,$includedir,;t t
12001 s,@oldincludedir@,$oldincludedir,;t t
12002 s,@infodir@,$infodir,;t t
12003 s,@mandir@,$mandir,;t t
12004 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12005 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12006 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12007 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12008 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12009 s,@build_alias@,$build_alias,;t t
12010 s,@host_alias@,$host_alias,;t t
12011 s,@target_alias@,$target_alias,;t t
12012 s,@ECHO_C@,$ECHO_C,;t t
12013 s,@ECHO_N@,$ECHO_N,;t t
12014 s,@ECHO_T@,$ECHO_T,;t t
12015 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12016 s,@DEFS@,$DEFS,;t t
12017 s,@LIBS@,$LIBS,;t t
12018 s,@top_builddir@,$top_builddir,;t t
12019 s,@build@,$build,;t t
12020 s,@build_cpu@,$build_cpu,;t t
12021 s,@build_vendor@,$build_vendor,;t t
12022 s,@build_os@,$build_os,;t t
12023 s,@host@,$host,;t t
12024 s,@host_cpu@,$host_cpu,;t t
12025 s,@host_vendor@,$host_vendor,;t t
12026 s,@host_os@,$host_os,;t t
12027 s,@target@,$target,;t t
12028 s,@target_cpu@,$target_cpu,;t t
12029 s,@target_vendor@,$target_vendor,;t t
12030 s,@target_os@,$target_os,;t t
12031 s,@CC@,$CC,;t t
12032 s,@CFLAGS@,$CFLAGS,;t t
12033 s,@LDFLAGS@,$LDFLAGS,;t t
12034 s,@CPPFLAGS@,$CPPFLAGS,;t t
12035 s,@ac_ct_CC@,$ac_ct_CC,;t t
12036 s,@EXEEXT@,$EXEEXT,;t t
12037 s,@OBJEXT@,$OBJEXT,;t t
12038 s,@CPP@,$CPP,;t t
12039 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12040 s,@PROG_EXT@,$PROG_EXT,;t t
12041 s,@AWK@,$AWK,;t t
12042 s,@EGREP@,$EGREP,;t t
12043 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12044 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12045 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12046 s,@LN_S@,$LN_S,;t t
12047 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12048 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12049 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12050 s,@SET_MAKE@,$SET_MAKE,;t t
12051 s,@CTAGS@,$CTAGS,;t t
12052 s,@ETAGS@,$ETAGS,;t t
12053 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12054 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12055 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12056 s,@RANLIB@,$RANLIB,;t t
12057 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12058 s,@LD@,$LD,;t t
12059 s,@ac_ct_LD@,$ac_ct_LD,;t t
12060 s,@AR@,$AR,;t t
12061 s,@ac_ct_AR@,$ac_ct_AR,;t t
12062 s,@ARFLAGS@,$ARFLAGS,;t t
12063 s,@DESTDIR@,$DESTDIR,;t t
12064 s,@BUILD_CC@,$BUILD_CC,;t t
12065 s,@BUILD_CPP@,$BUILD_CPP,;t t
12066 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12067 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12068 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12069 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12070 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12071 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12072 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12073 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12074 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12075 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12076 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12077 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12078 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12079 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12080 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12081 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12082 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12083 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12084 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12085 s,@CC_G_OPT@,$CC_G_OPT,;t t
12086 s,@LD_MODEL@,$LD_MODEL,;t t
12087 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12088 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12089 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12090 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12091 s,@LINK_PROGS@,$LINK_PROGS,;t t
12092 s,@LINK_TESTS@,$LINK_TESTS,;t t
12093 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12094 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12095 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12096 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12097 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12098 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12099 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12100 s,@PTHREAD@,$PTHREAD,;t t
12101 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12102 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12103 s,@ECHO_LINK@,$ECHO_LINK,;t t
12104 s,@ADAFLAGS@,$ADAFLAGS,;t t
12105 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12106 s,@ADA_TRACE@,$ADA_TRACE,;t t
12107 s,@gnat_exists@,$gnat_exists,;t t
12108 s,@M4_exists@,$M4_exists,;t t
12109 s,@cf_ada_make@,$cf_ada_make,;t t
12110 s,@cf_compile_generics@,$cf_compile_generics,;t t
12111 s,@cf_generic_objects@,$cf_generic_objects,;t t
12112 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12113 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
12114 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12115 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12116 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12117 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12118 s,@cf_ada_package@,$cf_ada_package,;t t
12119 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12120 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12121 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12122 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12123 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
12124 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12125 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12126 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12127 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12128 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
12129 s,@cross_compiling@,$cross_compiling,;t t
12130 s,@TEST_ARG2@,$TEST_ARG2,;t t
12131 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12132 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12133 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12134 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12135 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12136 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12137 CEOF
12138
12139 EOF
12140
12141   cat >>$CONFIG_STATUS <<\EOF
12142   # Split the substitutions into bite-sized pieces for seds with
12143   # small command number limits, like on Digital OSF/1 and HP-UX.
12144   ac_max_sed_lines=48
12145   ac_sed_frag=1 # Number of current file.
12146   ac_beg=1 # First line for current file.
12147   ac_end=$ac_max_sed_lines # Line after last line for current file.
12148   ac_more_lines=:
12149   ac_sed_cmds=
12150   while $ac_more_lines; do
12151     if test $ac_beg -gt 1; then
12152       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12153     else
12154       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12155     fi
12156     if test ! -s $tmp/subs.frag; then
12157       ac_more_lines=false
12158     else
12159       # The purpose of the label and of the branching condition is to
12160       # speed up the sed processing (if there are no `@' at all, there
12161       # is no need to browse any of the substitutions).
12162       # These are the two extra sed commands mentioned above.
12163       (echo ':t
12164   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12165       if test -z "$ac_sed_cmds"; then
12166         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12167       else
12168         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12169       fi
12170       ac_sed_frag=`expr $ac_sed_frag + 1`
12171       ac_beg=$ac_end
12172       ac_end=`expr $ac_end + $ac_max_sed_lines`
12173     fi
12174   done
12175   if test -z "$ac_sed_cmds"; then
12176     ac_sed_cmds=cat
12177   fi
12178 fi # test -n "$CONFIG_FILES"
12179
12180 EOF
12181 cat >>$CONFIG_STATUS <<\EOF
12182 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12183   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12184   case $ac_file in
12185   - | *:- | *:-:* ) # input from stdin
12186         cat >$tmp/stdin
12187         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12188         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12189   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12190         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12191   * )   ac_file_in=$ac_file.in ;;
12192   esac
12193
12194   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12195   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12196          X"$ac_file" : 'X\(//\)[^/]' \| \
12197          X"$ac_file" : 'X\(//\)$' \| \
12198          X"$ac_file" : 'X\(/\)' \| \
12199          .     : '\(.\)' 2>/dev/null ||
12200 echo X"$ac_file" |
12201     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12202           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12203           /^X\(\/\/\)$/{ s//\1/; q; }
12204           /^X\(\/\).*/{ s//\1/; q; }
12205           s/.*/./; q'`
12206   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12207     { case "$ac_dir" in
12208   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12209   *)                      as_incr_dir=.;;
12210 esac
12211 as_dummy="$ac_dir"
12212 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12213   case $as_mkdir_dir in
12214     # Skip DOS drivespec
12215     ?:) as_incr_dir=$as_mkdir_dir ;;
12216     *)
12217       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12218       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12219     ;;
12220   esac
12221 done; }
12222
12223     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12224     # A "../" for each directory in $ac_dir_suffix.
12225     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12226   else
12227     ac_dir_suffix= ac_dots=
12228   fi
12229
12230   case $srcdir in
12231   .)  ac_srcdir=.
12232       if test -z "$ac_dots"; then
12233          ac_top_srcdir=.
12234       else
12235          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12236       fi ;;
12237   [\\/]* | ?:[\\/]* )
12238       ac_srcdir=$srcdir$ac_dir_suffix;
12239       ac_top_srcdir=$srcdir ;;
12240   *) # Relative path.
12241     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12242     ac_top_srcdir=$ac_dots$srcdir ;;
12243   esac
12244
12245   case $INSTALL in
12246   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12247   *) ac_INSTALL=$ac_dots$INSTALL ;;
12248   esac
12249
12250   if test x"$ac_file" != x-; then
12251     { echo "$as_me:12251: creating $ac_file" >&5
12252 echo "$as_me: creating $ac_file" >&6;}
12253     rm -f "$ac_file"
12254   fi
12255   # Let's still pretend it is `configure' which instantiates (i.e., don't
12256   # use $as_me), people would be surprised to read:
12257   #    /* config.h.  Generated automatically by config.status.  */
12258   configure_input="Generated automatically from `echo $ac_file_in |
12259                                                  sed 's,.*/,,'` by configure."
12260
12261   # First look for the input files in the build tree, otherwise in the
12262   # src tree.
12263   ac_file_inputs=`IFS=:
12264     for f in $ac_file_in; do
12265       case $f in
12266       -) echo $tmp/stdin ;;
12267       [\\/$]*)
12268          # Absolute (can't be DOS-style, as IFS=:)
12269          test -f "$f" || { { echo "$as_me:12269: error: cannot find input file: $f" >&5
12270 echo "$as_me: error: cannot find input file: $f" >&2;}
12271    { (exit 1); exit 1; }; }
12272          echo $f;;
12273       *) # Relative
12274          if test -f "$f"; then
12275            # Build tree
12276            echo $f
12277          elif test -f "$srcdir/$f"; then
12278            # Source tree
12279            echo $srcdir/$f
12280          else
12281            # /dev/null tree
12282            { { echo "$as_me:12282: error: cannot find input file: $f" >&5
12283 echo "$as_me: error: cannot find input file: $f" >&2;}
12284    { (exit 1); exit 1; }; }
12285          fi;;
12286       esac
12287     done` || { (exit 1); exit 1; }
12288 EOF
12289 cat >>$CONFIG_STATUS <<EOF
12290   sed "$ac_vpsub
12291 $extrasub
12292 EOF
12293 cat >>$CONFIG_STATUS <<\EOF
12294 :t
12295 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12296 s,@configure_input@,$configure_input,;t t
12297 s,@srcdir@,$ac_srcdir,;t t
12298 s,@top_srcdir@,$ac_top_srcdir,;t t
12299 s,@INSTALL@,$ac_INSTALL,;t t
12300 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12301   rm -f $tmp/stdin
12302   if test x"$ac_file" != x-; then
12303     mv $tmp/out $ac_file
12304   else
12305     cat $tmp/out
12306     rm -f $tmp/out
12307   fi
12308
12309 done
12310 EOF
12311 cat >>$CONFIG_STATUS <<\EOF
12312
12313 #
12314 # CONFIG_HEADER section.
12315 #
12316
12317 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12318 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12319 #
12320 # ac_d sets the value in "#define NAME VALUE" lines.
12321 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12322 ac_dB='[        ].*$,\1#\2'
12323 ac_dC=' '
12324 ac_dD=',;t'
12325 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12326 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12327 ac_iB='\([      ]\),\1#\2define\3'
12328 ac_iC=' '
12329 ac_iD='\4,;t'
12330 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12331 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12332 ac_uB='$,\1#\2define\3'
12333 ac_uC=' '
12334 ac_uD=',;t'
12335
12336 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
12337   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12338   case $ac_file in
12339   - | *:- | *:-:* ) # input from stdin
12340         cat >$tmp/stdin
12341         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12342         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12343   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12344         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12345   * )   ac_file_in=$ac_file.in ;;
12346   esac
12347
12348   test x"$ac_file" != x- && { echo "$as_me:12348: creating $ac_file" >&5
12349 echo "$as_me: creating $ac_file" >&6;}
12350
12351   # First look for the input files in the build tree, otherwise in the
12352   # src tree.
12353   ac_file_inputs=`IFS=:
12354     for f in $ac_file_in; do
12355       case $f in
12356       -) echo $tmp/stdin ;;
12357       [\\/$]*)
12358          # Absolute (can't be DOS-style, as IFS=:)
12359          test -f "$f" || { { echo "$as_me:12359: error: cannot find input file: $f" >&5
12360 echo "$as_me: error: cannot find input file: $f" >&2;}
12361    { (exit 1); exit 1; }; }
12362          echo $f;;
12363       *) # Relative
12364          if test -f "$f"; then
12365            # Build tree
12366            echo $f
12367          elif test -f "$srcdir/$f"; then
12368            # Source tree
12369            echo $srcdir/$f
12370          else
12371            # /dev/null tree
12372            { { echo "$as_me:12372: error: cannot find input file: $f" >&5
12373 echo "$as_me: error: cannot find input file: $f" >&2;}
12374    { (exit 1); exit 1; }; }
12375          fi;;
12376       esac
12377     done` || { (exit 1); exit 1; }
12378   # Remove the trailing spaces.
12379   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
12380
12381 EOF
12382
12383 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
12384 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
12385 # be either 'cat' or 'sort'.
12386 cat confdefs.h | uniq >conftest.vals
12387
12388 # Break up conftest.vals because some shells have a limit on
12389 # the size of here documents, and old seds have small limits too.
12390
12391 rm -f conftest.tail
12392 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
12393 while grep . conftest.vals >/dev/null
12394 do
12395   # Write chunks of a limited-size here document to conftest.frag.
12396   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
12397   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
12398   echo 'CEOF' >> $CONFIG_STATUS
12399   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12400   rm -f conftest.vals
12401   mv conftest.tail conftest.vals
12402 done
12403 rm -f conftest.vals
12404
12405 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
12406 # marker @DEFS@.
12407 echo '  cat >> conftest.edit <<CEOF
12408 /@DEFS@/r conftest.frag
12409 /@DEFS@/d
12410 CEOF
12411 sed -f conftest.edit $tmp/in > $tmp/out
12412 rm -f $tmp/in
12413 mv $tmp/out $tmp/in
12414 rm -f conftest.edit conftest.frag
12415 ' >> $CONFIG_STATUS
12416
12417 cat >>$CONFIG_STATUS <<\EOF
12418   # Let's still pretend it is `configure' which instantiates (i.e., don't
12419   # use $as_me), people would be surprised to read:
12420   #    /* config.h.  Generated automatically by config.status.  */
12421   if test x"$ac_file" = x-; then
12422     echo "/* Generated automatically by configure.  */" >$tmp/config.h
12423   else
12424     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
12425   fi
12426   cat $tmp/in >>$tmp/config.h
12427   rm -f $tmp/in
12428   if test x"$ac_file" != x-; then
12429     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
12430       { echo "$as_me:12430: $ac_file is unchanged" >&5
12431 echo "$as_me: $ac_file is unchanged" >&6;}
12432     else
12433       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12434          X"$ac_file" : 'X\(//\)[^/]' \| \
12435          X"$ac_file" : 'X\(//\)$' \| \
12436          X"$ac_file" : 'X\(/\)' \| \
12437          .     : '\(.\)' 2>/dev/null ||
12438 echo X"$ac_file" |
12439     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12440           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12441           /^X\(\/\/\)$/{ s//\1/; q; }
12442           /^X\(\/\).*/{ s//\1/; q; }
12443           s/.*/./; q'`
12444       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12445         { case "$ac_dir" in
12446   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12447   *)                      as_incr_dir=.;;
12448 esac
12449 as_dummy="$ac_dir"
12450 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12451   case $as_mkdir_dir in
12452     # Skip DOS drivespec
12453     ?:) as_incr_dir=$as_mkdir_dir ;;
12454     *)
12455       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12456       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12457     ;;
12458   esac
12459 done; }
12460
12461       fi
12462       rm -f $ac_file
12463       mv $tmp/config.h $ac_file
12464     fi
12465   else
12466     cat $tmp/config.h
12467     rm -f $tmp/config.h
12468   fi
12469 done
12470 EOF
12471 cat >>$CONFIG_STATUS <<\EOF
12472 #
12473 # CONFIG_COMMANDS section.
12474 #
12475 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12476   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12477   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12478
12479   case $ac_dest in
12480     default )
12481 if test -z "$USE_OLD_MAKERULES" ; then
12482         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
12483 fi
12484  ;;
12485   esac
12486 done
12487 EOF
12488
12489 cat >>$CONFIG_STATUS <<\EOF
12490
12491 { (exit 0); exit 0; }
12492 EOF
12493 chmod +x $CONFIG_STATUS
12494 ac_clean_files=$ac_clean_files_save
12495
12496 # configure is writing to config.log, and then calls config.status.
12497 # config.status does its own redirection, appending to config.log.
12498 # Unfortunately, on DOS this fails, as config.log is still kept open
12499 # by configure, so config.status won't be able to write to it; its
12500 # output is simply discarded.  So we exec the FD to /dev/null,
12501 # effectively closing config.log, so it can be properly (re)opened and
12502 # appended to by config.status.  When coming back to configure, we
12503 # need to make the FD available again.
12504 if test "$no_create" != yes; then
12505   ac_cs_success=:
12506   exec 5>/dev/null
12507   $SHELL $CONFIG_STATUS || ac_cs_success=false
12508   exec 5>>config.log
12509   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12510   # would make configure fail if this is the last instruction.
12511   $ac_cs_success || { (exit 1); exit 1; }
12512 fi
12513 ${MAKE:-make} preinstall