]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.9 - patch 20110716
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.32 .
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 # This should have been defined by AC_PROG_CC
2202 : ${CC:=cc}
2203
2204 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2205 # into CC.  This will not help with broken scripts that wrap the compiler with
2206 # options, but eliminates a more common category of user confusion.
2207 echo "$as_me:2207: checking \$CC variable" >&5
2208 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2209 case "$CC" in #(vi
2210 *[\ \   ]-[IUD]*)
2211         echo "$as_me:2211: result: broken" >&5
2212 echo "${ECHO_T}broken" >&6
2213         { echo "$as_me:2213: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2214 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2215         # humor him...
2216         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2217         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2218
2219 cf_fix_cppflags=no
2220 cf_new_cflags=
2221 cf_new_cppflags=
2222 cf_new_extra_cppflags=
2223
2224 for cf_add_cflags in $cf_flags
2225 do
2226 case $cf_fix_cppflags in
2227 no)
2228         case $cf_add_cflags in #(vi
2229         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2230                 case $cf_add_cflags in
2231                 -D*)
2232                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2233
2234                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2235                                 && test -z "${cf_tst_cflags}" \
2236                                 && cf_fix_cppflags=yes
2237
2238                         if test $cf_fix_cppflags = yes ; then
2239                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2240                                 continue
2241                         elif test "${cf_tst_cflags}" = "\"'" ; then
2242                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2243                                 continue
2244                         fi
2245                         ;;
2246                 esac
2247                 case "$CPPFLAGS" in
2248                 *$cf_add_cflags) #(vi
2249                         ;;
2250                 *) #(vi
2251                         case $cf_add_cflags in #(vi
2252                         -D*)
2253                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2254
2255 CPPFLAGS=`echo "$CPPFLAGS" | \
2256         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2257                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2258
2259                                 ;;
2260                         esac
2261                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2262                         ;;
2263                 esac
2264                 ;;
2265         *)
2266                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2267                 ;;
2268         esac
2269         ;;
2270 yes)
2271         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2272
2273         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2274
2275         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2276                 && test -z "${cf_tst_cflags}" \
2277                 && cf_fix_cppflags=no
2278         ;;
2279 esac
2280 done
2281
2282 if test -n "$cf_new_cflags" ; then
2283
2284         CFLAGS="$CFLAGS $cf_new_cflags"
2285 fi
2286
2287 if test -n "$cf_new_cppflags" ; then
2288
2289         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2290 fi
2291
2292 if test -n "$cf_new_extra_cppflags" ; then
2293
2294         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2295 fi
2296
2297         ;;
2298 *)
2299         echo "$as_me:2299: result: ok" >&5
2300 echo "${ECHO_T}ok" >&6
2301         ;;
2302 esac
2303
2304 echo "$as_me:2304: checking for ${CC:-cc} option to accept ANSI C" >&5
2305 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2306 if test "${cf_cv_ansi_cc+set}" = set; then
2307   echo $ECHO_N "(cached) $ECHO_C" >&6
2308 else
2309
2310 cf_cv_ansi_cc=no
2311 cf_save_CFLAGS="$CFLAGS"
2312 cf_save_CPPFLAGS="$CPPFLAGS"
2313 # Don't try gcc -ansi; that turns off useful extensions and
2314 # breaks some systems' header files.
2315 # AIX                   -qlanglvl=ansi
2316 # Ultrix and OSF/1      -std1
2317 # HP-UX                 -Aa -D_HPUX_SOURCE
2318 # SVR4                  -Xc
2319 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2320 for cf_arg in "-DCC_HAS_PROTOS" \
2321         "" \
2322         -qlanglvl=ansi \
2323         -std1 \
2324         -Ae \
2325         "-Aa -D_HPUX_SOURCE" \
2326         -Xc
2327 do
2328
2329 cf_fix_cppflags=no
2330 cf_new_cflags=
2331 cf_new_cppflags=
2332 cf_new_extra_cppflags=
2333
2334 for cf_add_cflags in $cf_arg
2335 do
2336 case $cf_fix_cppflags in
2337 no)
2338         case $cf_add_cflags in #(vi
2339         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2340                 case $cf_add_cflags in
2341                 -D*)
2342                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2343
2344                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2345                                 && test -z "${cf_tst_cflags}" \
2346                                 && cf_fix_cppflags=yes
2347
2348                         if test $cf_fix_cppflags = yes ; then
2349                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2350                                 continue
2351                         elif test "${cf_tst_cflags}" = "\"'" ; then
2352                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2353                                 continue
2354                         fi
2355                         ;;
2356                 esac
2357                 case "$CPPFLAGS" in
2358                 *$cf_add_cflags) #(vi
2359                         ;;
2360                 *) #(vi
2361                         case $cf_add_cflags in #(vi
2362                         -D*)
2363                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2364
2365 CPPFLAGS=`echo "$CPPFLAGS" | \
2366         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2367                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2368
2369                                 ;;
2370                         esac
2371                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2372                         ;;
2373                 esac
2374                 ;;
2375         *)
2376                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2377                 ;;
2378         esac
2379         ;;
2380 yes)
2381         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2382
2383         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2384
2385         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2386                 && test -z "${cf_tst_cflags}" \
2387                 && cf_fix_cppflags=no
2388         ;;
2389 esac
2390 done
2391
2392 if test -n "$cf_new_cflags" ; then
2393
2394         CFLAGS="$CFLAGS $cf_new_cflags"
2395 fi
2396
2397 if test -n "$cf_new_cppflags" ; then
2398
2399         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2400 fi
2401
2402 if test -n "$cf_new_extra_cppflags" ; then
2403
2404         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2405 fi
2406
2407         cat >conftest.$ac_ext <<_ACEOF
2408 #line 2408 "configure"
2409 #include "confdefs.h"
2410
2411 #ifndef CC_HAS_PROTOS
2412 #if !defined(__STDC__) || (__STDC__ != 1)
2413 choke me
2414 #endif
2415 #endif
2416
2417 int
2418 main ()
2419 {
2420
2421         int test (int i, double x);
2422         struct s1 {int (*f) (int a);};
2423         struct s2 {int (*f) (double a);};
2424   ;
2425   return 0;
2426 }
2427 _ACEOF
2428 rm -f conftest.$ac_objext
2429 if { (eval echo "$as_me:2429: \"$ac_compile\"") >&5
2430   (eval $ac_compile) 2>&5
2431   ac_status=$?
2432   echo "$as_me:2432: \$? = $ac_status" >&5
2433   (exit $ac_status); } &&
2434          { ac_try='test -s conftest.$ac_objext'
2435   { (eval echo "$as_me:2435: \"$ac_try\"") >&5
2436   (eval $ac_try) 2>&5
2437   ac_status=$?
2438   echo "$as_me:2438: \$? = $ac_status" >&5
2439   (exit $ac_status); }; }; then
2440   cf_cv_ansi_cc="$cf_arg"; break
2441 else
2442   echo "$as_me: failed program was:" >&5
2443 cat conftest.$ac_ext >&5
2444 fi
2445 rm -f conftest.$ac_objext conftest.$ac_ext
2446 done
2447 CFLAGS="$cf_save_CFLAGS"
2448 CPPFLAGS="$cf_save_CPPFLAGS"
2449
2450 fi
2451 echo "$as_me:2451: result: $cf_cv_ansi_cc" >&5
2452 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2453
2454 if test "$cf_cv_ansi_cc" != "no"; then
2455 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2456
2457 cf_fix_cppflags=no
2458 cf_new_cflags=
2459 cf_new_cppflags=
2460 cf_new_extra_cppflags=
2461
2462 for cf_add_cflags in $cf_cv_ansi_cc
2463 do
2464 case $cf_fix_cppflags in
2465 no)
2466         case $cf_add_cflags in #(vi
2467         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2468                 case $cf_add_cflags in
2469                 -D*)
2470                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2471
2472                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2473                                 && test -z "${cf_tst_cflags}" \
2474                                 && cf_fix_cppflags=yes
2475
2476                         if test $cf_fix_cppflags = yes ; then
2477                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2478                                 continue
2479                         elif test "${cf_tst_cflags}" = "\"'" ; then
2480                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2481                                 continue
2482                         fi
2483                         ;;
2484                 esac
2485                 case "$CPPFLAGS" in
2486                 *$cf_add_cflags) #(vi
2487                         ;;
2488                 *) #(vi
2489                         case $cf_add_cflags in #(vi
2490                         -D*)
2491                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2492
2493 CPPFLAGS=`echo "$CPPFLAGS" | \
2494         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2495                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2496
2497                                 ;;
2498                         esac
2499                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2500                         ;;
2501                 esac
2502                 ;;
2503         *)
2504                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2505                 ;;
2506         esac
2507         ;;
2508 yes)
2509         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2510
2511         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2512
2513         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2514                 && test -z "${cf_tst_cflags}" \
2515                 && cf_fix_cppflags=no
2516         ;;
2517 esac
2518 done
2519
2520 if test -n "$cf_new_cflags" ; then
2521
2522         CFLAGS="$CFLAGS $cf_new_cflags"
2523 fi
2524
2525 if test -n "$cf_new_cppflags" ; then
2526
2527         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2528 fi
2529
2530 if test -n "$cf_new_extra_cppflags" ; then
2531
2532         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2533 fi
2534
2535 else
2536         cat >>confdefs.h <<\EOF
2537 #define CC_HAS_PROTOS 1
2538 EOF
2539
2540 fi
2541 fi
2542
2543 if test "$cf_cv_ansi_cc" = "no"; then
2544         { { echo "$as_me:2544: error: Your compiler does not appear to recognize prototypes.
2545 You have the following choices:
2546         a. adjust your compiler options
2547         b. get an up-to-date compiler
2548         c. use a wrapper such as unproto" >&5
2549 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2550 You have the following choices:
2551         a. adjust your compiler options
2552         b. get an up-to-date compiler
2553         c. use a wrapper such as unproto" >&2;}
2554    { (exit 1); exit 1; }; }
2555 fi
2556
2557 case $cf_cv_system_name in
2558 os2*)
2559     CFLAGS="$CFLAGS -Zmt"
2560     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2561     CXXFLAGS="$CXXFLAGS -Zmt"
2562     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2563     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2564     ac_cv_exeext=.exe
2565     ;;
2566 esac
2567
2568 PROG_EXT="$EXEEXT"
2569
2570 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2571 #define PROG_EXT "$PROG_EXT"
2572 EOF
2573
2574 test "$program_prefix" != NONE &&
2575   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2576 # Use a double $ so make ignores it.
2577 test "$program_suffix" != NONE &&
2578   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2579 # Double any \ or $.  echo might interpret backslashes.
2580 # By default was `s,x,x', remove it if useless.
2581 cat <<\_ACEOF >conftest.sed
2582 s/[\\$]/&&/g;s/;s,x,x,$//
2583 _ACEOF
2584 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2585 rm conftest.sed
2586
2587 for ac_prog in mawk gawk nawk awk
2588 do
2589   # Extract the first word of "$ac_prog", so it can be a program name with args.
2590 set dummy $ac_prog; ac_word=$2
2591 echo "$as_me:2591: checking for $ac_word" >&5
2592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2593 if test "${ac_cv_prog_AWK+set}" = set; then
2594   echo $ECHO_N "(cached) $ECHO_C" >&6
2595 else
2596   if test -n "$AWK"; then
2597   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2598 else
2599   ac_save_IFS=$IFS; IFS=$ac_path_separator
2600 ac_dummy="$PATH"
2601 for ac_dir in $ac_dummy; do
2602   IFS=$ac_save_IFS
2603   test -z "$ac_dir" && ac_dir=.
2604   $as_executable_p "$ac_dir/$ac_word" || continue
2605 ac_cv_prog_AWK="$ac_prog"
2606 echo "$as_me:2606: found $ac_dir/$ac_word" >&5
2607 break
2608 done
2609
2610 fi
2611 fi
2612 AWK=$ac_cv_prog_AWK
2613 if test -n "$AWK"; then
2614   echo "$as_me:2614: result: $AWK" >&5
2615 echo "${ECHO_T}$AWK" >&6
2616 else
2617   echo "$as_me:2617: result: no" >&5
2618 echo "${ECHO_T}no" >&6
2619 fi
2620
2621   test -n "$AWK" && break
2622 done
2623
2624 test -z "$AWK" && { { echo "$as_me:2624: error: No awk program found" >&5
2625 echo "$as_me: error: No awk program found" >&2;}
2626    { (exit 1); exit 1; }; }
2627
2628 echo "$as_me:2628: checking for egrep" >&5
2629 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2630 if test "${ac_cv_prog_egrep+set}" = set; then
2631   echo $ECHO_N "(cached) $ECHO_C" >&6
2632 else
2633   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2634     then ac_cv_prog_egrep='grep -E'
2635     else ac_cv_prog_egrep='egrep'
2636     fi
2637 fi
2638 echo "$as_me:2638: result: $ac_cv_prog_egrep" >&5
2639 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2640  EGREP=$ac_cv_prog_egrep
2641
2642 test -z "$EGREP" && { { echo "$as_me:2642: error: No egrep program found" >&5
2643 echo "$as_me: error: No egrep program found" >&2;}
2644    { (exit 1); exit 1; }; }
2645
2646 # Find a good install program.  We prefer a C program (faster),
2647 # so one script is as good as another.  But avoid the broken or
2648 # incompatible versions:
2649 # SysV /etc/install, /usr/sbin/install
2650 # SunOS /usr/etc/install
2651 # IRIX /sbin/install
2652 # AIX /bin/install
2653 # AmigaOS /C/install, which installs bootblocks on floppy discs
2654 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2655 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2656 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2657 # ./install, which can be erroneously created by make from ./install.sh.
2658 echo "$as_me:2658: checking for a BSD compatible install" >&5
2659 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2660 if test -z "$INSTALL"; then
2661 if test "${ac_cv_path_install+set}" = set; then
2662   echo $ECHO_N "(cached) $ECHO_C" >&6
2663 else
2664     ac_save_IFS=$IFS; IFS=$ac_path_separator
2665   for ac_dir in $PATH; do
2666     IFS=$ac_save_IFS
2667     # Account for people who put trailing slashes in PATH elements.
2668     case $ac_dir/ in
2669     / | ./ | .// | /cC/* \
2670     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2671     | /usr/ucb/* ) ;;
2672     *)
2673       # OSF1 and SCO ODT 3.0 have their own names for install.
2674       # Don't use installbsd from OSF since it installs stuff as root
2675       # by default.
2676       for ac_prog in ginstall scoinst install; do
2677         if $as_executable_p "$ac_dir/$ac_prog"; then
2678           if test $ac_prog = install &&
2679             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2680             # AIX install.  It has an incompatible calling convention.
2681             :
2682           elif test $ac_prog = install &&
2683             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2684             # program-specific install script used by HP pwplus--don't use.
2685             :
2686           else
2687             ac_cv_path_install="$ac_dir/$ac_prog -c"
2688             break 2
2689           fi
2690         fi
2691       done
2692       ;;
2693     esac
2694   done
2695
2696 fi
2697   if test "${ac_cv_path_install+set}" = set; then
2698     INSTALL=$ac_cv_path_install
2699   else
2700     # As a last resort, use the slow shell script.  We don't cache a
2701     # path for INSTALL within a source directory, because that will
2702     # break other packages using the cache if that directory is
2703     # removed, or if the path is relative.
2704     INSTALL=$ac_install_sh
2705   fi
2706 fi
2707 echo "$as_me:2707: result: $INSTALL" >&5
2708 echo "${ECHO_T}$INSTALL" >&6
2709
2710 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2711 # It thinks the first close brace ends the variable substitution.
2712 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2713
2714 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2715
2716 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2717
2718 echo "$as_me:2718: checking whether ln -s works" >&5
2719 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2720 LN_S=$as_ln_s
2721 if test "$LN_S" = "ln -s"; then
2722   echo "$as_me:2722: result: yes" >&5
2723 echo "${ECHO_T}yes" >&6
2724 else
2725   echo "$as_me:2725: result: no, using $LN_S" >&5
2726 echo "${ECHO_T}no, using $LN_S" >&6
2727 fi
2728
2729 echo "$as_me:2729: checking if $LN_S -f options work" >&5
2730 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2731
2732 rm -f conf$$.src conf$$dst
2733 echo >conf$$.dst
2734 echo first >conf$$.src
2735 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2736         cf_prog_ln_sf=yes
2737 else
2738         cf_prog_ln_sf=no
2739 fi
2740 rm -f conf$$.dst conf$$src
2741 echo "$as_me:2741: result: $cf_prog_ln_sf" >&5
2742 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2743
2744 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2745
2746 echo "$as_me:2746: checking for long file names" >&5
2747 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2748 if test "${ac_cv_sys_long_file_names+set}" = set; then
2749   echo $ECHO_N "(cached) $ECHO_C" >&6
2750 else
2751   ac_cv_sys_long_file_names=yes
2752 # Test for long file names in all the places we know might matter:
2753 #      .                the current directory, where building will happen
2754 #      $prefix/lib      where we will be installing things
2755 #      $exec_prefix/lib likewise
2756 # eval it to expand exec_prefix.
2757 #      $TMPDIR          if set, where it might want to write temporary files
2758 # if $TMPDIR is not set:
2759 #      /tmp             where it might want to write temporary files
2760 #      /var/tmp         likewise
2761 #      /usr/tmp         likewise
2762 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2763   ac_tmpdirs=$TMPDIR
2764 else
2765   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2766 fi
2767 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2768   test -d $ac_dir || continue
2769   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2770   ac_xdir=$ac_dir/cf$$
2771   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2772   ac_tf1=$ac_xdir/conftest9012345
2773   ac_tf2=$ac_xdir/conftest9012346
2774   (echo 1 >$ac_tf1) 2>/dev/null
2775   (echo 2 >$ac_tf2) 2>/dev/null
2776   ac_val=`cat $ac_tf1 2>/dev/null`
2777   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2778     ac_cv_sys_long_file_names=no
2779     rm -rf $ac_xdir 2>/dev/null
2780     break
2781   fi
2782   rm -rf $ac_xdir 2>/dev/null
2783 done
2784 fi
2785 echo "$as_me:2785: result: $ac_cv_sys_long_file_names" >&5
2786 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2787 if test $ac_cv_sys_long_file_names = yes; then
2788
2789 cat >>confdefs.h <<\EOF
2790 #define HAVE_LONG_FILE_NAMES 1
2791 EOF
2792
2793 fi
2794
2795 # if we find pkg-config, check if we should install the ".pc" files.
2796
2797 echo "$as_me:2797: checking if you want to use pkg-config" >&5
2798 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2799
2800 # Check whether --with-pkg-config or --without-pkg-config was given.
2801 if test "${with_pkg_config+set}" = set; then
2802   withval="$with_pkg_config"
2803   cf_pkg_config=$withval
2804 else
2805   cf_pkg_config=yes
2806 fi;
2807 echo "$as_me:2807: result: $cf_pkg_config" >&5
2808 echo "${ECHO_T}$cf_pkg_config" >&6
2809
2810 case $cf_pkg_config in #(vi
2811 no) #(vi
2812         PKG_CONFIG=none
2813         ;;
2814 yes) #(vi
2815
2816 if test -n "$ac_tool_prefix"; then
2817   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2818 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2819 echo "$as_me:2819: checking for $ac_word" >&5
2820 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2821 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2822   echo $ECHO_N "(cached) $ECHO_C" >&6
2823 else
2824   case $PKG_CONFIG in
2825   [\\/]* | ?:[\\/]*)
2826   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2827   ;;
2828   *)
2829   ac_save_IFS=$IFS; IFS=$ac_path_separator
2830 ac_dummy="$PATH"
2831 for ac_dir in $ac_dummy; do
2832   IFS=$ac_save_IFS
2833   test -z "$ac_dir" && ac_dir=.
2834   if $as_executable_p "$ac_dir/$ac_word"; then
2835    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2836    echo "$as_me:2836: found $ac_dir/$ac_word" >&5
2837    break
2838 fi
2839 done
2840
2841   ;;
2842 esac
2843 fi
2844 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2845
2846 if test -n "$PKG_CONFIG"; then
2847   echo "$as_me:2847: result: $PKG_CONFIG" >&5
2848 echo "${ECHO_T}$PKG_CONFIG" >&6
2849 else
2850   echo "$as_me:2850: result: no" >&5
2851 echo "${ECHO_T}no" >&6
2852 fi
2853
2854 fi
2855 if test -z "$ac_cv_path_PKG_CONFIG"; then
2856   ac_pt_PKG_CONFIG=$PKG_CONFIG
2857   # Extract the first word of "pkg-config", so it can be a program name with args.
2858 set dummy pkg-config; ac_word=$2
2859 echo "$as_me:2859: checking for $ac_word" >&5
2860 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2861 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2862   echo $ECHO_N "(cached) $ECHO_C" >&6
2863 else
2864   case $ac_pt_PKG_CONFIG in
2865   [\\/]* | ?:[\\/]*)
2866   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2867   ;;
2868   *)
2869   ac_save_IFS=$IFS; IFS=$ac_path_separator
2870 ac_dummy="$PATH"
2871 for ac_dir in $ac_dummy; do
2872   IFS=$ac_save_IFS
2873   test -z "$ac_dir" && ac_dir=.
2874   if $as_executable_p "$ac_dir/$ac_word"; then
2875    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2876    echo "$as_me:2876: found $ac_dir/$ac_word" >&5
2877    break
2878 fi
2879 done
2880
2881   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2882   ;;
2883 esac
2884 fi
2885 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2886
2887 if test -n "$ac_pt_PKG_CONFIG"; then
2888   echo "$as_me:2888: result: $ac_pt_PKG_CONFIG" >&5
2889 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2890 else
2891   echo "$as_me:2891: result: no" >&5
2892 echo "${ECHO_T}no" >&6
2893 fi
2894
2895   PKG_CONFIG=$ac_pt_PKG_CONFIG
2896 else
2897   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2898 fi
2899
2900         ;;
2901 *)
2902         PKG_CONFIG=$withval
2903         ;;
2904 esac
2905
2906 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2907 if test "$PKG_CONFIG" != none ; then
2908
2909 if test "x$prefix" != xNONE; then
2910   cf_path_syntax="$prefix"
2911 else
2912   cf_path_syntax="$ac_default_prefix"
2913 fi
2914
2915 case ".$PKG_CONFIG" in #(vi
2916 .\$\(*\)*|.\'*\'*) #(vi
2917   ;;
2918 ..|./*|.\\*) #(vi
2919   ;;
2920 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2921   ;;
2922 .\${*prefix}*) #(vi
2923   eval PKG_CONFIG="$PKG_CONFIG"
2924   case ".$PKG_CONFIG" in #(vi
2925   .NONE/*)
2926     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2927     ;;
2928   esac
2929   ;; #(vi
2930 .no|.NONE/*)
2931   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2932   ;;
2933 *)
2934   { { echo "$as_me:2934: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2935 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2936    { (exit 1); exit 1; }; }
2937   ;;
2938 esac
2939
2940 fi
2941
2942         case $cf_cv_system_name in
2943         os2*)   PATH_SEPARATOR=';'  ;;
2944         *)      PATH_SEPARATOR=':'  ;;
2945         esac
2946
2947 if test "$PKG_CONFIG" != no ; then
2948         echo "$as_me:2948: checking if we should install .pc files for $PKG_CONFIG" >&5
2949 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2950
2951         # Leave this as something that can be overridden in the environment.
2952         if test -z "$PKG_CONFIG_LIBDIR" ; then
2953                 if test -n "$PKG_CONFIG_PATH" ; then
2954                         for cf_config in `echo "$PKG_CONFIG_PATH" | sed -e 's/'$PATH_SEPARATOR'/ /g'`
2955                         do
2956                                 if test -n "$cf_config" && test -d "$cf_config"
2957                                 then
2958                                         PKG_CONFIG_LIBDIR=$cf_config
2959                                         break
2960                                 fi
2961                         done
2962                 fi
2963                 if test -z "$PKG_CONFIG_LIBDIR" ; then
2964                         cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2965                         case x`arch 2>/dev/null` in #(vi
2966                         *64) #(vi
2967                                 for cf_config in $cf_path/lib64 $cf_path/lib32 $cf_path/lib
2968                                 do
2969                                         if test -d $cf_config/pkgconfig
2970                                         then
2971                                                 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2972                                                 break
2973                                         fi
2974                                 done
2975                                 ;;
2976                         *)
2977                                 PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
2978                                 ;;
2979                         esac
2980                 fi
2981         else
2982                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
2983         fi
2984         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
2985
2986 # Check whether --enable-pc-files or --disable-pc-files was given.
2987 if test "${enable_pc_files+set}" = set; then
2988   enableval="$enable_pc_files"
2989   enable_pc_files=$enableval
2990 else
2991   enable_pc_files=no
2992 fi;
2993                 echo "$as_me:2993: result: $enable_pc_files" >&5
2994 echo "${ECHO_T}$enable_pc_files" >&6
2995                 test -n "$verbose" && echo "    found library $PKG_CONFIG_LIBDIR" 1>&6
2996
2997 echo "${as_me:-configure}:2997: testing found library $PKG_CONFIG_LIBDIR ..." 1>&5
2998
2999         else
3000                 echo "$as_me:3000: result: no" >&5
3001 echo "${ECHO_T}no" >&6
3002                 { echo "$as_me:3002: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3003 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3004                 enable_pc_files=no
3005         fi
3006 fi
3007
3008 echo "$as_me:3008: checking if you want to build test-programs" >&5
3009 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3010
3011 # Check whether --with-tests or --without-tests was given.
3012 if test "${with_tests+set}" = set; then
3013   withval="$with_tests"
3014   cf_with_tests=$withval
3015 else
3016   cf_with_tests=yes
3017 fi;
3018 echo "$as_me:3018: result: $cf_with_tests" >&5
3019 echo "${ECHO_T}$cf_with_tests" >&6
3020
3021 echo "$as_me:3021: checking if we should assume mixed-case filenames" >&5
3022 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3023
3024 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3025 if test "${enable_mixed_case+set}" = set; then
3026   enableval="$enable_mixed_case"
3027   enable_mixedcase=$enableval
3028 else
3029   enable_mixedcase=auto
3030 fi;
3031 echo "$as_me:3031: result: $enable_mixedcase" >&5
3032 echo "${ECHO_T}$enable_mixedcase" >&6
3033 if test "$enable_mixedcase" = "auto" ; then
3034
3035 echo "$as_me:3035: checking if filesystem supports mixed-case filenames" >&5
3036 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3037 if test "${cf_cv_mixedcase+set}" = set; then
3038   echo $ECHO_N "(cached) $ECHO_C" >&6
3039 else
3040
3041 if test "$cross_compiling" = yes ; then
3042         case $target_alias in #(vi
3043         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3044                 cf_cv_mixedcase=no
3045                 ;;
3046         *)
3047                 cf_cv_mixedcase=yes
3048                 ;;
3049         esac
3050 else
3051         rm -f conftest CONFTEST
3052         echo test >conftest
3053         if test -f CONFTEST ; then
3054                 cf_cv_mixedcase=no
3055         else
3056                 cf_cv_mixedcase=yes
3057         fi
3058         rm -f conftest CONFTEST
3059 fi
3060
3061 fi
3062 echo "$as_me:3062: result: $cf_cv_mixedcase" >&5
3063 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3064 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3065 #define MIXEDCASE_FILENAMES 1
3066 EOF
3067
3068 else
3069     cf_cv_mixedcase=$enable_mixedcase
3070     if test "$enable_mixedcase" = "yes" ; then
3071         cat >>confdefs.h <<\EOF
3072 #define MIXEDCASE_FILENAMES 1
3073 EOF
3074
3075     fi
3076 fi
3077
3078 # do this after mixed-case option (tags/TAGS is not as important as tic).
3079 echo "$as_me:3079: checking whether ${MAKE-make} sets \${MAKE}" >&5
3080 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3081 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3082 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3083   echo $ECHO_N "(cached) $ECHO_C" >&6
3084 else
3085   cat >conftest.make <<\EOF
3086 all:
3087         @echo 'ac_maketemp="${MAKE}"'
3088 EOF
3089 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3090 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3091 if test -n "$ac_maketemp"; then
3092   eval ac_cv_prog_make_${ac_make}_set=yes
3093 else
3094   eval ac_cv_prog_make_${ac_make}_set=no
3095 fi
3096 rm -f conftest.make
3097 fi
3098 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3099   echo "$as_me:3099: result: yes" >&5
3100 echo "${ECHO_T}yes" >&6
3101   SET_MAKE=
3102 else
3103   echo "$as_me:3103: result: no" >&5
3104 echo "${ECHO_T}no" >&6
3105   SET_MAKE="MAKE=${MAKE-make}"
3106 fi
3107
3108 for ac_prog in exctags ctags
3109 do
3110   # Extract the first word of "$ac_prog", so it can be a program name with args.
3111 set dummy $ac_prog; ac_word=$2
3112 echo "$as_me:3112: checking for $ac_word" >&5
3113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3114 if test "${ac_cv_prog_CTAGS+set}" = set; then
3115   echo $ECHO_N "(cached) $ECHO_C" >&6
3116 else
3117   if test -n "$CTAGS"; then
3118   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3119 else
3120   ac_save_IFS=$IFS; IFS=$ac_path_separator
3121 ac_dummy="$PATH"
3122 for ac_dir in $ac_dummy; do
3123   IFS=$ac_save_IFS
3124   test -z "$ac_dir" && ac_dir=.
3125   $as_executable_p "$ac_dir/$ac_word" || continue
3126 ac_cv_prog_CTAGS="$ac_prog"
3127 echo "$as_me:3127: found $ac_dir/$ac_word" >&5
3128 break
3129 done
3130
3131 fi
3132 fi
3133 CTAGS=$ac_cv_prog_CTAGS
3134 if test -n "$CTAGS"; then
3135   echo "$as_me:3135: result: $CTAGS" >&5
3136 echo "${ECHO_T}$CTAGS" >&6
3137 else
3138   echo "$as_me:3138: result: no" >&5
3139 echo "${ECHO_T}no" >&6
3140 fi
3141
3142   test -n "$CTAGS" && break
3143 done
3144
3145 for ac_prog in exetags etags
3146 do
3147   # Extract the first word of "$ac_prog", so it can be a program name with args.
3148 set dummy $ac_prog; ac_word=$2
3149 echo "$as_me:3149: checking for $ac_word" >&5
3150 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3151 if test "${ac_cv_prog_ETAGS+set}" = set; then
3152   echo $ECHO_N "(cached) $ECHO_C" >&6
3153 else
3154   if test -n "$ETAGS"; then
3155   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3156 else
3157   ac_save_IFS=$IFS; IFS=$ac_path_separator
3158 ac_dummy="$PATH"
3159 for ac_dir in $ac_dummy; do
3160   IFS=$ac_save_IFS
3161   test -z "$ac_dir" && ac_dir=.
3162   $as_executable_p "$ac_dir/$ac_word" || continue
3163 ac_cv_prog_ETAGS="$ac_prog"
3164 echo "$as_me:3164: found $ac_dir/$ac_word" >&5
3165 break
3166 done
3167
3168 fi
3169 fi
3170 ETAGS=$ac_cv_prog_ETAGS
3171 if test -n "$ETAGS"; then
3172   echo "$as_me:3172: result: $ETAGS" >&5
3173 echo "${ECHO_T}$ETAGS" >&6
3174 else
3175   echo "$as_me:3175: result: no" >&5
3176 echo "${ECHO_T}no" >&6
3177 fi
3178
3179   test -n "$ETAGS" && break
3180 done
3181
3182 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3183 set dummy ${CTAGS:-ctags}; ac_word=$2
3184 echo "$as_me:3184: checking for $ac_word" >&5
3185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3186 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3187   echo $ECHO_N "(cached) $ECHO_C" >&6
3188 else
3189   if test -n "$MAKE_LOWER_TAGS"; then
3190   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3191 else
3192   ac_save_IFS=$IFS; IFS=$ac_path_separator
3193 ac_dummy="$PATH"
3194 for ac_dir in $ac_dummy; do
3195   IFS=$ac_save_IFS
3196   test -z "$ac_dir" && ac_dir=.
3197   $as_executable_p "$ac_dir/$ac_word" || continue
3198 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3199 echo "$as_me:3199: found $ac_dir/$ac_word" >&5
3200 break
3201 done
3202
3203   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3204 fi
3205 fi
3206 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3207 if test -n "$MAKE_LOWER_TAGS"; then
3208   echo "$as_me:3208: result: $MAKE_LOWER_TAGS" >&5
3209 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3210 else
3211   echo "$as_me:3211: result: no" >&5
3212 echo "${ECHO_T}no" >&6
3213 fi
3214
3215 if test "$cf_cv_mixedcase" = yes ; then
3216         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3217 set dummy ${ETAGS:-etags}; ac_word=$2
3218 echo "$as_me:3218: checking for $ac_word" >&5
3219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3220 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3221   echo $ECHO_N "(cached) $ECHO_C" >&6
3222 else
3223   if test -n "$MAKE_UPPER_TAGS"; then
3224   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3225 else
3226   ac_save_IFS=$IFS; IFS=$ac_path_separator
3227 ac_dummy="$PATH"
3228 for ac_dir in $ac_dummy; do
3229   IFS=$ac_save_IFS
3230   test -z "$ac_dir" && ac_dir=.
3231   $as_executable_p "$ac_dir/$ac_word" || continue
3232 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3233 echo "$as_me:3233: found $ac_dir/$ac_word" >&5
3234 break
3235 done
3236
3237   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3238 fi
3239 fi
3240 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3241 if test -n "$MAKE_UPPER_TAGS"; then
3242   echo "$as_me:3242: result: $MAKE_UPPER_TAGS" >&5
3243 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3244 else
3245   echo "$as_me:3245: result: no" >&5
3246 echo "${ECHO_T}no" >&6
3247 fi
3248
3249 else
3250         MAKE_UPPER_TAGS=no
3251 fi
3252
3253 if test "$MAKE_UPPER_TAGS" = yes ; then
3254         MAKE_UPPER_TAGS=
3255 else
3256         MAKE_UPPER_TAGS="#"
3257 fi
3258
3259 if test "$MAKE_LOWER_TAGS" = yes ; then
3260         MAKE_LOWER_TAGS=
3261 else
3262         MAKE_LOWER_TAGS="#"
3263 fi
3264
3265 echo "$as_me:3265: checking for makeflags variable" >&5
3266 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3267 if test "${cf_cv_makeflags+set}" = set; then
3268   echo $ECHO_N "(cached) $ECHO_C" >&6
3269 else
3270
3271         cf_cv_makeflags=''
3272         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3273         do
3274                 cat >cf_makeflags.tmp <<CF_EOF
3275 SHELL = /bin/sh
3276 all :
3277         @ echo '.$cf_option'
3278 CF_EOF
3279                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3280                 case "$cf_result" in
3281                 .*k)
3282                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3283                         case "$cf_result" in
3284                         .*CC=*) cf_cv_makeflags=
3285                                 ;;
3286                         *)      cf_cv_makeflags=$cf_option
3287                                 ;;
3288                         esac
3289                         break
3290                         ;;
3291                 .-)     ;;
3292                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3293                         ;;
3294                 esac
3295         done
3296         rm -f cf_makeflags.tmp
3297
3298 fi
3299 echo "$as_me:3299: result: $cf_cv_makeflags" >&5
3300 echo "${ECHO_T}$cf_cv_makeflags" >&6
3301
3302 if test -n "$ac_tool_prefix"; then
3303   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3304 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3305 echo "$as_me:3305: checking for $ac_word" >&5
3306 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3307 if test "${ac_cv_prog_RANLIB+set}" = set; then
3308   echo $ECHO_N "(cached) $ECHO_C" >&6
3309 else
3310   if test -n "$RANLIB"; then
3311   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3312 else
3313   ac_save_IFS=$IFS; IFS=$ac_path_separator
3314 ac_dummy="$PATH"
3315 for ac_dir in $ac_dummy; do
3316   IFS=$ac_save_IFS
3317   test -z "$ac_dir" && ac_dir=.
3318   $as_executable_p "$ac_dir/$ac_word" || continue
3319 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3320 echo "$as_me:3320: found $ac_dir/$ac_word" >&5
3321 break
3322 done
3323
3324 fi
3325 fi
3326 RANLIB=$ac_cv_prog_RANLIB
3327 if test -n "$RANLIB"; then
3328   echo "$as_me:3328: result: $RANLIB" >&5
3329 echo "${ECHO_T}$RANLIB" >&6
3330 else
3331   echo "$as_me:3331: result: no" >&5
3332 echo "${ECHO_T}no" >&6
3333 fi
3334
3335 fi
3336 if test -z "$ac_cv_prog_RANLIB"; then
3337   ac_ct_RANLIB=$RANLIB
3338   # Extract the first word of "ranlib", so it can be a program name with args.
3339 set dummy ranlib; ac_word=$2
3340 echo "$as_me:3340: checking for $ac_word" >&5
3341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3342 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3343   echo $ECHO_N "(cached) $ECHO_C" >&6
3344 else
3345   if test -n "$ac_ct_RANLIB"; then
3346   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3347 else
3348   ac_save_IFS=$IFS; IFS=$ac_path_separator
3349 ac_dummy="$PATH"
3350 for ac_dir in $ac_dummy; do
3351   IFS=$ac_save_IFS
3352   test -z "$ac_dir" && ac_dir=.
3353   $as_executable_p "$ac_dir/$ac_word" || continue
3354 ac_cv_prog_ac_ct_RANLIB="ranlib"
3355 echo "$as_me:3355: found $ac_dir/$ac_word" >&5
3356 break
3357 done
3358
3359   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3360 fi
3361 fi
3362 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3363 if test -n "$ac_ct_RANLIB"; then
3364   echo "$as_me:3364: result: $ac_ct_RANLIB" >&5
3365 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3366 else
3367   echo "$as_me:3367: result: no" >&5
3368 echo "${ECHO_T}no" >&6
3369 fi
3370
3371   RANLIB=$ac_ct_RANLIB
3372 else
3373   RANLIB="$ac_cv_prog_RANLIB"
3374 fi
3375
3376 if test -n "$ac_tool_prefix"; then
3377   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3378 set dummy ${ac_tool_prefix}ld; ac_word=$2
3379 echo "$as_me:3379: checking for $ac_word" >&5
3380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3381 if test "${ac_cv_prog_LD+set}" = set; then
3382   echo $ECHO_N "(cached) $ECHO_C" >&6
3383 else
3384   if test -n "$LD"; then
3385   ac_cv_prog_LD="$LD" # Let the user override the test.
3386 else
3387   ac_save_IFS=$IFS; IFS=$ac_path_separator
3388 ac_dummy="$PATH"
3389 for ac_dir in $ac_dummy; do
3390   IFS=$ac_save_IFS
3391   test -z "$ac_dir" && ac_dir=.
3392   $as_executable_p "$ac_dir/$ac_word" || continue
3393 ac_cv_prog_LD="${ac_tool_prefix}ld"
3394 echo "$as_me:3394: found $ac_dir/$ac_word" >&5
3395 break
3396 done
3397
3398 fi
3399 fi
3400 LD=$ac_cv_prog_LD
3401 if test -n "$LD"; then
3402   echo "$as_me:3402: result: $LD" >&5
3403 echo "${ECHO_T}$LD" >&6
3404 else
3405   echo "$as_me:3405: result: no" >&5
3406 echo "${ECHO_T}no" >&6
3407 fi
3408
3409 fi
3410 if test -z "$ac_cv_prog_LD"; then
3411   ac_ct_LD=$LD
3412   # Extract the first word of "ld", so it can be a program name with args.
3413 set dummy ld; ac_word=$2
3414 echo "$as_me:3414: checking for $ac_word" >&5
3415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3416 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3417   echo $ECHO_N "(cached) $ECHO_C" >&6
3418 else
3419   if test -n "$ac_ct_LD"; then
3420   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3421 else
3422   ac_save_IFS=$IFS; IFS=$ac_path_separator
3423 ac_dummy="$PATH"
3424 for ac_dir in $ac_dummy; do
3425   IFS=$ac_save_IFS
3426   test -z "$ac_dir" && ac_dir=.
3427   $as_executable_p "$ac_dir/$ac_word" || continue
3428 ac_cv_prog_ac_ct_LD="ld"
3429 echo "$as_me:3429: found $ac_dir/$ac_word" >&5
3430 break
3431 done
3432
3433   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3434 fi
3435 fi
3436 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3437 if test -n "$ac_ct_LD"; then
3438   echo "$as_me:3438: result: $ac_ct_LD" >&5
3439 echo "${ECHO_T}$ac_ct_LD" >&6
3440 else
3441   echo "$as_me:3441: result: no" >&5
3442 echo "${ECHO_T}no" >&6
3443 fi
3444
3445   LD=$ac_ct_LD
3446 else
3447   LD="$ac_cv_prog_LD"
3448 fi
3449
3450 if test -n "$ac_tool_prefix"; then
3451   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3452 set dummy ${ac_tool_prefix}ar; ac_word=$2
3453 echo "$as_me:3453: checking for $ac_word" >&5
3454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3455 if test "${ac_cv_prog_AR+set}" = set; then
3456   echo $ECHO_N "(cached) $ECHO_C" >&6
3457 else
3458   if test -n "$AR"; then
3459   ac_cv_prog_AR="$AR" # Let the user override the test.
3460 else
3461   ac_save_IFS=$IFS; IFS=$ac_path_separator
3462 ac_dummy="$PATH"
3463 for ac_dir in $ac_dummy; do
3464   IFS=$ac_save_IFS
3465   test -z "$ac_dir" && ac_dir=.
3466   $as_executable_p "$ac_dir/$ac_word" || continue
3467 ac_cv_prog_AR="${ac_tool_prefix}ar"
3468 echo "$as_me:3468: found $ac_dir/$ac_word" >&5
3469 break
3470 done
3471
3472 fi
3473 fi
3474 AR=$ac_cv_prog_AR
3475 if test -n "$AR"; then
3476   echo "$as_me:3476: result: $AR" >&5
3477 echo "${ECHO_T}$AR" >&6
3478 else
3479   echo "$as_me:3479: result: no" >&5
3480 echo "${ECHO_T}no" >&6
3481 fi
3482
3483 fi
3484 if test -z "$ac_cv_prog_AR"; then
3485   ac_ct_AR=$AR
3486   # Extract the first word of "ar", so it can be a program name with args.
3487 set dummy ar; ac_word=$2
3488 echo "$as_me:3488: checking for $ac_word" >&5
3489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3490 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3491   echo $ECHO_N "(cached) $ECHO_C" >&6
3492 else
3493   if test -n "$ac_ct_AR"; then
3494   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3495 else
3496   ac_save_IFS=$IFS; IFS=$ac_path_separator
3497 ac_dummy="$PATH"
3498 for ac_dir in $ac_dummy; do
3499   IFS=$ac_save_IFS
3500   test -z "$ac_dir" && ac_dir=.
3501   $as_executable_p "$ac_dir/$ac_word" || continue
3502 ac_cv_prog_ac_ct_AR="ar"
3503 echo "$as_me:3503: found $ac_dir/$ac_word" >&5
3504 break
3505 done
3506
3507   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3508 fi
3509 fi
3510 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3511 if test -n "$ac_ct_AR"; then
3512   echo "$as_me:3512: result: $ac_ct_AR" >&5
3513 echo "${ECHO_T}$ac_ct_AR" >&6
3514 else
3515   echo "$as_me:3515: result: no" >&5
3516 echo "${ECHO_T}no" >&6
3517 fi
3518
3519   AR=$ac_ct_AR
3520 else
3521   AR="$ac_cv_prog_AR"
3522 fi
3523
3524 if test -n "$ac_tool_prefix"; then
3525   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3526 set dummy ${ac_tool_prefix}ar; ac_word=$2
3527 echo "$as_me:3527: checking for $ac_word" >&5
3528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3529 if test "${ac_cv_prog_AR+set}" = set; then
3530   echo $ECHO_N "(cached) $ECHO_C" >&6
3531 else
3532   if test -n "$AR"; then
3533   ac_cv_prog_AR="$AR" # Let the user override the test.
3534 else
3535   ac_save_IFS=$IFS; IFS=$ac_path_separator
3536 ac_dummy="$PATH"
3537 for ac_dir in $ac_dummy; do
3538   IFS=$ac_save_IFS
3539   test -z "$ac_dir" && ac_dir=.
3540   $as_executable_p "$ac_dir/$ac_word" || continue
3541 ac_cv_prog_AR="${ac_tool_prefix}ar"
3542 echo "$as_me:3542: found $ac_dir/$ac_word" >&5
3543 break
3544 done
3545
3546 fi
3547 fi
3548 AR=$ac_cv_prog_AR
3549 if test -n "$AR"; then
3550   echo "$as_me:3550: result: $AR" >&5
3551 echo "${ECHO_T}$AR" >&6
3552 else
3553   echo "$as_me:3553: result: no" >&5
3554 echo "${ECHO_T}no" >&6
3555 fi
3556
3557 fi
3558 if test -z "$ac_cv_prog_AR"; then
3559   ac_ct_AR=$AR
3560   # Extract the first word of "ar", so it can be a program name with args.
3561 set dummy ar; ac_word=$2
3562 echo "$as_me:3562: checking for $ac_word" >&5
3563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3564 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3565   echo $ECHO_N "(cached) $ECHO_C" >&6
3566 else
3567   if test -n "$ac_ct_AR"; then
3568   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3569 else
3570   ac_save_IFS=$IFS; IFS=$ac_path_separator
3571 ac_dummy="$PATH"
3572 for ac_dir in $ac_dummy; do
3573   IFS=$ac_save_IFS
3574   test -z "$ac_dir" && ac_dir=.
3575   $as_executable_p "$ac_dir/$ac_word" || continue
3576 ac_cv_prog_ac_ct_AR="ar"
3577 echo "$as_me:3577: found $ac_dir/$ac_word" >&5
3578 break
3579 done
3580
3581   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3582 fi
3583 fi
3584 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3585 if test -n "$ac_ct_AR"; then
3586   echo "$as_me:3586: result: $ac_ct_AR" >&5
3587 echo "${ECHO_T}$ac_ct_AR" >&6
3588 else
3589   echo "$as_me:3589: result: no" >&5
3590 echo "${ECHO_T}no" >&6
3591 fi
3592
3593   AR=$ac_ct_AR
3594 else
3595   AR="$ac_cv_prog_AR"
3596 fi
3597
3598 echo "$as_me:3598: checking for options to update archives" >&5
3599 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3600 if test "${cf_cv_ar_flags+set}" = set; then
3601   echo $ECHO_N "(cached) $ECHO_C" >&6
3602 else
3603
3604         cf_cv_ar_flags=unknown
3605         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3606         do
3607
3608                 # check if $ARFLAGS already contains this choice
3609                 if test "x$ARFLAGS" != "x" ; then
3610                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3611                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3612                                 cf_cv_ar_flags=
3613                                 break
3614                         fi
3615                 fi
3616
3617                 rm -f conftest.$ac_cv_objext
3618                 rm -f conftest.a
3619
3620                 cat >conftest.$ac_ext <<EOF
3621 #line 3621 "configure"
3622 int     testdata[3] = { 123, 456, 789 };
3623 EOF
3624                 if { (eval echo "$as_me:3624: \"$ac_compile\"") >&5
3625   (eval $ac_compile) 2>&5
3626   ac_status=$?
3627   echo "$as_me:3627: \$? = $ac_status" >&5
3628   (exit $ac_status); } ; then
3629                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3630                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3631                         if test -f conftest.a ; then
3632                                 cf_cv_ar_flags=$cf_ar_flags
3633                                 break
3634                         fi
3635                 else
3636                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3637
3638 echo "${as_me:-configure}:3638: testing cannot compile test-program ..." 1>&5
3639
3640                         break
3641                 fi
3642         done
3643         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3644
3645 fi
3646 echo "$as_me:3646: result: $cf_cv_ar_flags" >&5
3647 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3648
3649 if test -n "$ARFLAGS" ; then
3650         if test -n "$cf_cv_ar_flags" ; then
3651                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3652         fi
3653 else
3654         ARFLAGS=$cf_cv_ar_flags
3655 fi
3656
3657 echo "$as_me:3657: checking if you have specified an install-prefix" >&5
3658 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3659
3660 # Check whether --with-install-prefix or --without-install-prefix was given.
3661 if test "${with_install_prefix+set}" = set; then
3662   withval="$with_install_prefix"
3663   case "$withval" in #(vi
3664         yes|no) #(vi
3665                 ;;
3666         *)      DESTDIR="$withval"
3667                 ;;
3668         esac
3669 fi;
3670 echo "$as_me:3670: result: $DESTDIR" >&5
3671 echo "${ECHO_T}$DESTDIR" >&6
3672
3673 ###############################################################################
3674
3675 # If we're cross-compiling, allow the user to override the tools and their
3676 # options.  The configure script is oriented toward identifying the host
3677 # compiler, etc., but we need a build compiler to generate parts of the source.
3678
3679 if test "$cross_compiling" = yes ; then
3680
3681         # defaults that we might want to override
3682         : ${BUILD_CFLAGS:=''}
3683         : ${BUILD_CPPFLAGS:=''}
3684         : ${BUILD_LDFLAGS:=''}
3685         : ${BUILD_LIBS:=''}
3686         : ${BUILD_EXEEXT:='$x'}
3687         : ${BUILD_OBJEXT:='o'}
3688
3689 # Check whether --with-build-cc or --without-build-cc was given.
3690 if test "${with_build_cc+set}" = set; then
3691   withval="$with_build_cc"
3692   BUILD_CC="$withval"
3693 else
3694   for ac_prog in gcc cc cl
3695 do
3696   # Extract the first word of "$ac_prog", so it can be a program name with args.
3697 set dummy $ac_prog; ac_word=$2
3698 echo "$as_me:3698: checking for $ac_word" >&5
3699 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3700 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3701   echo $ECHO_N "(cached) $ECHO_C" >&6
3702 else
3703   if test -n "$BUILD_CC"; then
3704   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3705 else
3706   ac_save_IFS=$IFS; IFS=$ac_path_separator
3707 ac_dummy="$PATH"
3708 for ac_dir in $ac_dummy; do
3709   IFS=$ac_save_IFS
3710   test -z "$ac_dir" && ac_dir=.
3711   $as_executable_p "$ac_dir/$ac_word" || continue
3712 ac_cv_prog_BUILD_CC="$ac_prog"
3713 echo "$as_me:3713: found $ac_dir/$ac_word" >&5
3714 break
3715 done
3716
3717 fi
3718 fi
3719 BUILD_CC=$ac_cv_prog_BUILD_CC
3720 if test -n "$BUILD_CC"; then
3721   echo "$as_me:3721: result: $BUILD_CC" >&5
3722 echo "${ECHO_T}$BUILD_CC" >&6
3723 else
3724   echo "$as_me:3724: result: no" >&5
3725 echo "${ECHO_T}no" >&6
3726 fi
3727
3728   test -n "$BUILD_CC" && break
3729 done
3730
3731 fi;
3732         echo "$as_me:3732: checking for native build C compiler" >&5
3733 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3734         echo "$as_me:3734: result: $BUILD_CC" >&5
3735 echo "${ECHO_T}$BUILD_CC" >&6
3736
3737         echo "$as_me:3737: checking for native build C preprocessor" >&5
3738 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3739
3740 # Check whether --with-build-cpp or --without-build-cpp was given.
3741 if test "${with_build_cpp+set}" = set; then
3742   withval="$with_build_cpp"
3743   BUILD_CPP="$withval"
3744 else
3745   BUILD_CPP='${BUILD_CC} -E'
3746 fi;
3747         echo "$as_me:3747: result: $BUILD_CPP" >&5
3748 echo "${ECHO_T}$BUILD_CPP" >&6
3749
3750         echo "$as_me:3750: checking for native build C flags" >&5
3751 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3752
3753 # Check whether --with-build-cflags or --without-build-cflags was given.
3754 if test "${with_build_cflags+set}" = set; then
3755   withval="$with_build_cflags"
3756   BUILD_CFLAGS="$withval"
3757 fi;
3758         echo "$as_me:3758: result: $BUILD_CFLAGS" >&5
3759 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3760
3761         echo "$as_me:3761: checking for native build C preprocessor-flags" >&5
3762 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3763
3764 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3765 if test "${with_build_cppflags+set}" = set; then
3766   withval="$with_build_cppflags"
3767   BUILD_CPPFLAGS="$withval"
3768 fi;
3769         echo "$as_me:3769: result: $BUILD_CPPFLAGS" >&5
3770 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3771
3772         echo "$as_me:3772: checking for native build linker-flags" >&5
3773 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3774
3775 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3776 if test "${with_build_ldflags+set}" = set; then
3777   withval="$with_build_ldflags"
3778   BUILD_LDFLAGS="$withval"
3779 fi;
3780         echo "$as_me:3780: result: $BUILD_LDFLAGS" >&5
3781 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3782
3783         echo "$as_me:3783: checking for native build linker-libraries" >&5
3784 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3785
3786 # Check whether --with-build-libs or --without-build-libs was given.
3787 if test "${with_build_libs+set}" = set; then
3788   withval="$with_build_libs"
3789   BUILD_LIBS="$withval"
3790 fi;
3791         echo "$as_me:3791: result: $BUILD_LIBS" >&5
3792 echo "${ECHO_T}$BUILD_LIBS" >&6
3793
3794         # this assumes we're on Unix.
3795         BUILD_EXEEXT=
3796         BUILD_OBJEXT=o
3797
3798         : ${BUILD_CC:='${CC}'}
3799
3800         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3801                 { { echo "$as_me:3801: error: Cross-build requires two compilers.
3802 Use --with-build-cc to specify the native compiler." >&5
3803 echo "$as_me: error: Cross-build requires two compilers.
3804 Use --with-build-cc to specify the native compiler." >&2;}
3805    { (exit 1); exit 1; }; }
3806         fi
3807
3808 else
3809         : ${BUILD_CC:='${CC}'}
3810         : ${BUILD_CPP:='${CPP}'}
3811         : ${BUILD_CFLAGS:='${CFLAGS}'}
3812         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3813         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3814         : ${BUILD_LIBS:='${LIBS}'}
3815         : ${BUILD_EXEEXT:='$x'}
3816         : ${BUILD_OBJEXT:='o'}
3817 fi
3818
3819 ###############################################################################
3820
3821 ### Options to allow the user to specify the set of libraries which are used.
3822 ### Use "--without-normal --with-shared" to allow the default model to be
3823 ### shared, for example.
3824 cf_list_models=""
3825
3826 echo "$as_me:3826: checking if you want to build shared C-objects" >&5
3827 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3828
3829 # Check whether --with-shared or --without-shared was given.
3830 if test "${with_shared+set}" = set; then
3831   withval="$with_shared"
3832   with_shared=$withval
3833 else
3834   with_shared=no
3835 fi;
3836 echo "$as_me:3836: result: $with_shared" >&5
3837 echo "${ECHO_T}$with_shared" >&6
3838 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3839
3840 echo "$as_me:3840: checking for specified models" >&5
3841 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3842 test -z "$cf_list_models" && cf_list_models=normal
3843 echo "$as_me:3843: result: $cf_list_models" >&5
3844 echo "${ECHO_T}$cf_list_models" >&6
3845
3846 ### Use the first model as the default, and save its suffix for use in building
3847 ### up test-applications.
3848 echo "$as_me:3848: checking for default model" >&5
3849 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3850 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3851 echo "$as_me:3851: result: $DFT_LWR_MODEL" >&5
3852 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3853
3854 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3855
3856 echo "$as_me:3856: checking for specific curses-directory" >&5
3857 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3858
3859 # Check whether --with-curses-dir or --without-curses-dir was given.
3860 if test "${with_curses_dir+set}" = set; then
3861   withval="$with_curses_dir"
3862   cf_cv_curses_dir=$withval
3863 else
3864   cf_cv_curses_dir=no
3865 fi;
3866 echo "$as_me:3866: result: $cf_cv_curses_dir" >&5
3867 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3868
3869 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3870 then
3871
3872 if test "x$prefix" != xNONE; then
3873   cf_path_syntax="$prefix"
3874 else
3875   cf_path_syntax="$ac_default_prefix"
3876 fi
3877
3878 case ".$withval" in #(vi
3879 .\$\(*\)*|.\'*\'*) #(vi
3880   ;;
3881 ..|./*|.\\*) #(vi
3882   ;;
3883 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3884   ;;
3885 .\${*prefix}*) #(vi
3886   eval withval="$withval"
3887   case ".$withval" in #(vi
3888   .NONE/*)
3889     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3890     ;;
3891   esac
3892   ;; #(vi
3893 .no|.NONE/*)
3894   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3895   ;;
3896 *)
3897   { { echo "$as_me:3897: error: expected a pathname, not \"$withval\"" >&5
3898 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3899    { (exit 1); exit 1; }; }
3900   ;;
3901 esac
3902
3903         if test -d "$cf_cv_curses_dir"
3904         then
3905
3906 if test -n "$cf_cv_curses_dir/include" ; then
3907   for cf_add_incdir in $cf_cv_curses_dir/include
3908   do
3909         while test $cf_add_incdir != /usr/include
3910         do
3911           if test -d $cf_add_incdir
3912           then
3913                 cf_have_incdir=no
3914                 if test -n "$CFLAGS$CPPFLAGS" ; then
3915                   # a loop is needed to ensure we can add subdirs of existing dirs
3916                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3917                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3918                           cf_have_incdir=yes; break
3919                         fi
3920                   done
3921                 fi
3922
3923                 if test "$cf_have_incdir" = no ; then
3924                   if test "$cf_add_incdir" = /usr/local/include ; then
3925                         if test "$GCC" = yes
3926                         then
3927                           cf_save_CPPFLAGS=$CPPFLAGS
3928                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3929                           cat >conftest.$ac_ext <<_ACEOF
3930 #line 3930 "configure"
3931 #include "confdefs.h"
3932 #include <stdio.h>
3933 int
3934 main ()
3935 {
3936 printf("Hello")
3937   ;
3938   return 0;
3939 }
3940 _ACEOF
3941 rm -f conftest.$ac_objext
3942 if { (eval echo "$as_me:3942: \"$ac_compile\"") >&5
3943   (eval $ac_compile) 2>&5
3944   ac_status=$?
3945   echo "$as_me:3945: \$? = $ac_status" >&5
3946   (exit $ac_status); } &&
3947          { ac_try='test -s conftest.$ac_objext'
3948   { (eval echo "$as_me:3948: \"$ac_try\"") >&5
3949   (eval $ac_try) 2>&5
3950   ac_status=$?
3951   echo "$as_me:3951: \$? = $ac_status" >&5
3952   (exit $ac_status); }; }; then
3953   :
3954 else
3955   echo "$as_me: failed program was:" >&5
3956 cat conftest.$ac_ext >&5
3957 cf_have_incdir=yes
3958 fi
3959 rm -f conftest.$ac_objext conftest.$ac_ext
3960                           CPPFLAGS=$cf_save_CPPFLAGS
3961                         fi
3962                   fi
3963                 fi
3964
3965                 if test "$cf_have_incdir" = no ; then
3966                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3967
3968 echo "${as_me:-configure}:3968: testing adding $cf_add_incdir to include-path ..." 1>&5
3969
3970                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3971
3972                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3973                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3974                   cf_add_incdir="$cf_top_incdir"
3975                 else
3976                   break
3977                 fi
3978           fi
3979         done
3980   done
3981 fi
3982
3983 if test -n "$cf_cv_curses_dir/lib" ; then
3984   for cf_add_libdir in $cf_cv_curses_dir/lib
3985   do
3986     if test $cf_add_libdir = /usr/lib ; then
3987       :
3988     elif test -d $cf_add_libdir
3989     then
3990       cf_have_libdir=no
3991       if test -n "$LDFLAGS$LIBS" ; then
3992         # a loop is needed to ensure we can add subdirs of existing dirs
3993         for cf_test_libdir in $LDFLAGS $LIBS ; do
3994           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3995             cf_have_libdir=yes; break
3996           fi
3997         done
3998       fi
3999       if test "$cf_have_libdir" = no ; then
4000         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4001
4002 echo "${as_me:-configure}:4002: testing adding $cf_add_libdir to library-path ..." 1>&5
4003
4004         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4005       fi
4006     fi
4007   done
4008 fi
4009
4010         fi
4011 fi
4012
4013 echo "$as_me:4013: checking if you want wide-character code" >&5
4014 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
4015
4016 # Check whether --enable-widec or --disable-widec was given.
4017 if test "${enable_widec+set}" = set; then
4018   enableval="$enable_widec"
4019   with_widec=$enableval
4020 else
4021   with_widec=no
4022 fi;
4023 echo "$as_me:4023: result: $with_widec" >&5
4024 echo "${ECHO_T}$with_widec" >&6
4025 if test "$with_widec" = yes ; then
4026
4027 echo "$as_me:4027: checking for multibyte character support" >&5
4028 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
4029 if test "${cf_cv_utf8_lib+set}" = set; then
4030   echo $ECHO_N "(cached) $ECHO_C" >&6
4031 else
4032
4033         cf_save_LIBS="$LIBS"
4034         cat >conftest.$ac_ext <<_ACEOF
4035 #line 4035 "configure"
4036 #include "confdefs.h"
4037
4038 #include <stdlib.h>
4039 int
4040 main ()
4041 {
4042 putwc(0,0);
4043   ;
4044   return 0;
4045 }
4046 _ACEOF
4047 rm -f conftest.$ac_objext conftest$ac_exeext
4048 if { (eval echo "$as_me:4048: \"$ac_link\"") >&5
4049   (eval $ac_link) 2>&5
4050   ac_status=$?
4051   echo "$as_me:4051: \$? = $ac_status" >&5
4052   (exit $ac_status); } &&
4053          { ac_try='test -s conftest$ac_exeext'
4054   { (eval echo "$as_me:4054: \"$ac_try\"") >&5
4055   (eval $ac_try) 2>&5
4056   ac_status=$?
4057   echo "$as_me:4057: \$? = $ac_status" >&5
4058   (exit $ac_status); }; }; then
4059   cf_cv_utf8_lib=yes
4060 else
4061   echo "$as_me: failed program was:" >&5
4062 cat conftest.$ac_ext >&5
4063
4064 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
4065 # will be set on completion of the AC_TRY_LINK below.
4066 cf_cv_header_path_utf8=
4067 cf_cv_library_path_utf8=
4068
4069 echo "${as_me:-configure}:4069: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
4070
4071 cf_save_LIBS="$LIBS"
4072
4073 cat >conftest.$ac_ext <<_ACEOF
4074 #line 4074 "configure"
4075 #include "confdefs.h"
4076
4077 #include <libutf8.h>
4078 int
4079 main ()
4080 {
4081 putwc(0,0);
4082   ;
4083   return 0;
4084 }
4085 _ACEOF
4086 rm -f conftest.$ac_objext conftest$ac_exeext
4087 if { (eval echo "$as_me:4087: \"$ac_link\"") >&5
4088   (eval $ac_link) 2>&5
4089   ac_status=$?
4090   echo "$as_me:4090: \$? = $ac_status" >&5
4091   (exit $ac_status); } &&
4092          { ac_try='test -s conftest$ac_exeext'
4093   { (eval echo "$as_me:4093: \"$ac_try\"") >&5
4094   (eval $ac_try) 2>&5
4095   ac_status=$?
4096   echo "$as_me:4096: \$? = $ac_status" >&5
4097   (exit $ac_status); }; }; then
4098
4099         cf_cv_find_linkage_utf8=yes
4100         cf_cv_header_path_utf8=/usr/include
4101         cf_cv_library_path_utf8=/usr/lib
4102
4103 else
4104   echo "$as_me: failed program was:" >&5
4105 cat conftest.$ac_ext >&5
4106
4107 LIBS="-lutf8  $cf_save_LIBS"
4108
4109 cat >conftest.$ac_ext <<_ACEOF
4110 #line 4110 "configure"
4111 #include "confdefs.h"
4112
4113 #include <libutf8.h>
4114 int
4115 main ()
4116 {
4117 putwc(0,0);
4118   ;
4119   return 0;
4120 }
4121 _ACEOF
4122 rm -f conftest.$ac_objext conftest$ac_exeext
4123 if { (eval echo "$as_me:4123: \"$ac_link\"") >&5
4124   (eval $ac_link) 2>&5
4125   ac_status=$?
4126   echo "$as_me:4126: \$? = $ac_status" >&5
4127   (exit $ac_status); } &&
4128          { ac_try='test -s conftest$ac_exeext'
4129   { (eval echo "$as_me:4129: \"$ac_try\"") >&5
4130   (eval $ac_try) 2>&5
4131   ac_status=$?
4132   echo "$as_me:4132: \$? = $ac_status" >&5
4133   (exit $ac_status); }; }; then
4134
4135         cf_cv_find_linkage_utf8=yes
4136         cf_cv_header_path_utf8=/usr/include
4137         cf_cv_library_path_utf8=/usr/lib
4138         cf_cv_library_file_utf8="-lutf8"
4139
4140 else
4141   echo "$as_me: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
4143
4144         cf_cv_find_linkage_utf8=no
4145         LIBS="$cf_save_LIBS"
4146
4147     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
4148
4149 echo "${as_me:-configure}:4149: testing find linkage for utf8 library ..." 1>&5
4150
4151 echo "${as_me:-configure}:4151: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4152
4153     cf_save_CPPFLAGS="$CPPFLAGS"
4154     cf_test_CPPFLAGS="$CPPFLAGS"
4155
4156 cf_search=
4157
4158 # collect the current set of include-directories from compiler flags
4159 cf_header_path_list=""
4160 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4161         for cf_header_path in $CPPFLAGS $CFLAGS
4162         do
4163                 case $cf_header_path in #(vi
4164                 -I*)
4165                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4166
4167 test "$cf_header_path" != "NONE" && \
4168 test -d "$cf_header_path" && \
4169  {
4170         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4171         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4172         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
4173         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
4174         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
4175         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4176 }
4177
4178                         cf_header_path_list="$cf_header_path_list $cf_search"
4179                         ;;
4180                 esac
4181         done
4182 fi
4183
4184 # add the variations for the package we are looking for
4185
4186 cf_search=
4187
4188 test "/usr" != "$prefix" && \
4189 test -d "/usr" && \
4190 (test $prefix = NONE || test "/usr" != "$prefix") && {
4191         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4192         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4193         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
4194         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
4195         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
4196         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
4197 }
4198
4199 test "$prefix" != "NONE" && \
4200 test -d "$prefix" && \
4201  {
4202         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4203         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4204         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
4205         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
4206         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
4207         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
4208 }
4209
4210 test "/usr/local" != "$prefix" && \
4211 test -d "/usr/local" && \
4212 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4213         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4214         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4215         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
4216         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
4217         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
4218         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
4219 }
4220
4221 test "/opt" != "$prefix" && \
4222 test -d "/opt" && \
4223 (test $prefix = NONE || test "/opt" != "$prefix") && {
4224         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4225         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4226         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
4227         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
4228         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
4229         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
4230 }
4231
4232 test "$HOME" != "$prefix" && \
4233 test -d "$HOME" && \
4234 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4235         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4236         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4237         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
4238         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
4239         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
4240         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
4241 }
4242
4243 test "$includedir" != NONE && \
4244 test "$includedir" != "/usr/include" && \
4245 test -d "$includedir" && {
4246         test -d $includedir &&    cf_search="$cf_search $includedir"
4247         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4248 }
4249
4250 test "$oldincludedir" != NONE && \
4251 test "$oldincludedir" != "/usr/include" && \
4252 test -d "$oldincludedir" && {
4253         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4254         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4255 }
4256
4257 cf_search="$cf_search $cf_header_path_list"
4258
4259     for cf_cv_header_path_utf8 in $cf_search
4260     do
4261       if test -d $cf_cv_header_path_utf8 ; then
4262         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
4263
4264 echo "${as_me:-configure}:4264: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4265
4266         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4267         cat >conftest.$ac_ext <<_ACEOF
4268 #line 4268 "configure"
4269 #include "confdefs.h"
4270
4271 #include <libutf8.h>
4272 int
4273 main ()
4274 {
4275 putwc(0,0);
4276   ;
4277   return 0;
4278 }
4279 _ACEOF
4280 rm -f conftest.$ac_objext
4281 if { (eval echo "$as_me:4281: \"$ac_compile\"") >&5
4282   (eval $ac_compile) 2>&5
4283   ac_status=$?
4284   echo "$as_me:4284: \$? = $ac_status" >&5
4285   (exit $ac_status); } &&
4286          { ac_try='test -s conftest.$ac_objext'
4287   { (eval echo "$as_me:4287: \"$ac_try\"") >&5
4288   (eval $ac_try) 2>&5
4289   ac_status=$?
4290   echo "$as_me:4290: \$? = $ac_status" >&5
4291   (exit $ac_status); }; }; then
4292
4293             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4294
4295 echo "${as_me:-configure}:4295: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4296
4297             cf_cv_find_linkage_utf8=maybe
4298             cf_test_CPPFLAGS="$CPPFLAGS"
4299             break
4300 else
4301   echo "$as_me: failed program was:" >&5
4302 cat conftest.$ac_ext >&5
4303
4304             CPPFLAGS="$cf_save_CPPFLAGS"
4305
4306 fi
4307 rm -f conftest.$ac_objext conftest.$ac_ext
4308       fi
4309     done
4310
4311     if test "$cf_cv_find_linkage_utf8" = maybe ; then
4312
4313 echo "${as_me:-configure}:4313: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4314
4315       cf_save_LIBS="$LIBS"
4316       cf_save_LDFLAGS="$LDFLAGS"
4317
4318       if test "$cf_cv_find_linkage_utf8" != yes ; then
4319
4320 cf_search=
4321 cf_library_path_list=""
4322 if test -n "${LDFLAGS}${LIBS}" ; then
4323         for cf_library_path in $LDFLAGS $LIBS
4324         do
4325                 case $cf_library_path in #(vi
4326                 -L*)
4327                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4328
4329 test "$cf_library_path" != "NONE" && \
4330 test -d "$cf_library_path" && \
4331  {
4332         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4333         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4334         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4335         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4336         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4337         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4338 }
4339
4340                         cf_library_path_list="$cf_library_path_list $cf_search"
4341                         ;;
4342                 esac
4343         done
4344 fi
4345
4346 cf_search=
4347
4348 test "/usr" != "$prefix" && \
4349 test -d "/usr" && \
4350 (test $prefix = NONE || test "/usr" != "$prefix") && {
4351         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4352         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4353         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4354         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4355         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4356         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4357 }
4358
4359 test "$prefix" != "NONE" && \
4360 test -d "$prefix" && \
4361  {
4362         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4363         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4364         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4365         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4366         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4367         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4368 }
4369
4370 test "/usr/local" != "$prefix" && \
4371 test -d "/usr/local" && \
4372 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4373         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4374         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4375         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4376         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4377         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4378         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4379 }
4380
4381 test "/opt" != "$prefix" && \
4382 test -d "/opt" && \
4383 (test $prefix = NONE || test "/opt" != "$prefix") && {
4384         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4385         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4386         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4387         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4388         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4389         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4390 }
4391
4392 test "$HOME" != "$prefix" && \
4393 test -d "$HOME" && \
4394 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4395         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4396         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4397         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4398         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4399         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4400         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4401 }
4402
4403 cf_search="$cf_library_path_list $cf_search"
4404
4405         for cf_cv_library_path_utf8 in $cf_search
4406         do
4407           if test -d $cf_cv_library_path_utf8 ; then
4408             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4409
4410 echo "${as_me:-configure}:4410: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4411
4412             CPPFLAGS="$cf_test_CPPFLAGS"
4413             LIBS="-lutf8  $cf_save_LIBS"
4414             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4415             cat >conftest.$ac_ext <<_ACEOF
4416 #line 4416 "configure"
4417 #include "confdefs.h"
4418
4419 #include <libutf8.h>
4420 int
4421 main ()
4422 {
4423 putwc(0,0);
4424   ;
4425   return 0;
4426 }
4427 _ACEOF
4428 rm -f conftest.$ac_objext conftest$ac_exeext
4429 if { (eval echo "$as_me:4429: \"$ac_link\"") >&5
4430   (eval $ac_link) 2>&5
4431   ac_status=$?
4432   echo "$as_me:4432: \$? = $ac_status" >&5
4433   (exit $ac_status); } &&
4434          { ac_try='test -s conftest$ac_exeext'
4435   { (eval echo "$as_me:4435: \"$ac_try\"") >&5
4436   (eval $ac_try) 2>&5
4437   ac_status=$?
4438   echo "$as_me:4438: \$? = $ac_status" >&5
4439   (exit $ac_status); }; }; then
4440
4441                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4442
4443 echo "${as_me:-configure}:4443: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4444
4445                 cf_cv_find_linkage_utf8=yes
4446                 cf_cv_library_file_utf8="-lutf8"
4447                 break
4448 else
4449   echo "$as_me: failed program was:" >&5
4450 cat conftest.$ac_ext >&5
4451
4452                 CPPFLAGS="$cf_save_CPPFLAGS"
4453                 LIBS="$cf_save_LIBS"
4454                 LDFLAGS="$cf_save_LDFLAGS"
4455
4456 fi
4457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4458           fi
4459         done
4460         CPPFLAGS="$cf_save_CPPFLAGS"
4461         LDFLAGS="$cf_save_LDFLAGS"
4462       fi
4463
4464     else
4465       cf_cv_find_linkage_utf8=no
4466     fi
4467
4468 fi
4469 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4470
4471 fi
4472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4473
4474 LIBS="$cf_save_LIBS"
4475
4476 if test "$cf_cv_find_linkage_utf8" = yes ; then
4477 cf_cv_utf8_lib=add-on
4478 else
4479 cf_cv_utf8_lib=no
4480 fi
4481
4482 fi
4483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4484 fi
4485 echo "$as_me:4485: result: $cf_cv_utf8_lib" >&5
4486 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4487
4488 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4489 # ncurses/ncursesw:
4490 if test "$cf_cv_utf8_lib" = "add-on" ; then
4491         cat >>confdefs.h <<\EOF
4492 #define HAVE_LIBUTF8_H 1
4493 EOF
4494
4495 if test -n "$cf_cv_header_path_utf8" ; then
4496   for cf_add_incdir in $cf_cv_header_path_utf8
4497   do
4498         while test $cf_add_incdir != /usr/include
4499         do
4500           if test -d $cf_add_incdir
4501           then
4502                 cf_have_incdir=no
4503                 if test -n "$CFLAGS$CPPFLAGS" ; then
4504                   # a loop is needed to ensure we can add subdirs of existing dirs
4505                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4506                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4507                           cf_have_incdir=yes; break
4508                         fi
4509                   done
4510                 fi
4511
4512                 if test "$cf_have_incdir" = no ; then
4513                   if test "$cf_add_incdir" = /usr/local/include ; then
4514                         if test "$GCC" = yes
4515                         then
4516                           cf_save_CPPFLAGS=$CPPFLAGS
4517                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4518                           cat >conftest.$ac_ext <<_ACEOF
4519 #line 4519 "configure"
4520 #include "confdefs.h"
4521 #include <stdio.h>
4522 int
4523 main ()
4524 {
4525 printf("Hello")
4526   ;
4527   return 0;
4528 }
4529 _ACEOF
4530 rm -f conftest.$ac_objext
4531 if { (eval echo "$as_me:4531: \"$ac_compile\"") >&5
4532   (eval $ac_compile) 2>&5
4533   ac_status=$?
4534   echo "$as_me:4534: \$? = $ac_status" >&5
4535   (exit $ac_status); } &&
4536          { ac_try='test -s conftest.$ac_objext'
4537   { (eval echo "$as_me:4537: \"$ac_try\"") >&5
4538   (eval $ac_try) 2>&5
4539   ac_status=$?
4540   echo "$as_me:4540: \$? = $ac_status" >&5
4541   (exit $ac_status); }; }; then
4542   :
4543 else
4544   echo "$as_me: failed program was:" >&5
4545 cat conftest.$ac_ext >&5
4546 cf_have_incdir=yes
4547 fi
4548 rm -f conftest.$ac_objext conftest.$ac_ext
4549                           CPPFLAGS=$cf_save_CPPFLAGS
4550                         fi
4551                   fi
4552                 fi
4553
4554                 if test "$cf_have_incdir" = no ; then
4555                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4556
4557 echo "${as_me:-configure}:4557: testing adding $cf_add_incdir to include-path ..." 1>&5
4558
4559                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4560
4561                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4562                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4563                   cf_add_incdir="$cf_top_incdir"
4564                 else
4565                   break
4566                 fi
4567           fi
4568         done
4569   done
4570 fi
4571
4572 if test -n "$cf_cv_library_path_utf8" ; then
4573   for cf_add_libdir in $cf_cv_library_path_utf8
4574   do
4575     if test $cf_add_libdir = /usr/lib ; then
4576       :
4577     elif test -d $cf_add_libdir
4578     then
4579       cf_have_libdir=no
4580       if test -n "$LDFLAGS$LIBS" ; then
4581         # a loop is needed to ensure we can add subdirs of existing dirs
4582         for cf_test_libdir in $LDFLAGS $LIBS ; do
4583           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4584             cf_have_libdir=yes; break
4585           fi
4586         done
4587       fi
4588       if test "$cf_have_libdir" = no ; then
4589         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4590
4591 echo "${as_me:-configure}:4591: testing adding $cf_add_libdir to library-path ..." 1>&5
4592
4593         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4594       fi
4595     fi
4596   done
4597 fi
4598
4599         LIBS="$cf_cv_library_file_utf8 $LIBS"
4600 fi
4601
4602 cf_ncuconfig_root=ncursesw
4603
4604 echo "Looking for ${cf_ncuconfig_root}-config"
4605 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4606 do
4607   # Extract the first word of "$ac_prog", so it can be a program name with args.
4608 set dummy $ac_prog; ac_word=$2
4609 echo "$as_me:4609: checking for $ac_word" >&5
4610 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4611 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
4612   echo $ECHO_N "(cached) $ECHO_C" >&6
4613 else
4614   case $NCURSES_CONFIG in
4615   [\\/]* | ?:[\\/]*)
4616   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4617   ;;
4618   *)
4619   ac_save_IFS=$IFS; IFS=$ac_path_separator
4620 ac_dummy="$PATH"
4621 for ac_dir in $ac_dummy; do
4622   IFS=$ac_save_IFS
4623   test -z "$ac_dir" && ac_dir=.
4624   if $as_executable_p "$ac_dir/$ac_word"; then
4625    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4626    echo "$as_me:4626: found $ac_dir/$ac_word" >&5
4627    break
4628 fi
4629 done
4630
4631   ;;
4632 esac
4633 fi
4634 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
4635
4636 if test -n "$NCURSES_CONFIG"; then
4637   echo "$as_me:4637: result: $NCURSES_CONFIG" >&5
4638 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4639 else
4640   echo "$as_me:4640: result: no" >&5
4641 echo "${ECHO_T}no" >&6
4642 fi
4643
4644   test -n "$NCURSES_CONFIG" && break
4645 done
4646 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4647
4648 if test "$NCURSES_CONFIG" != none ; then
4649
4650 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4651 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4652
4653 # even with config script, some packages use no-override for curses.h
4654
4655 echo "$as_me:4655: checking if we have identified curses headers" >&5
4656 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4657 if test "${cf_cv_ncurses_header+set}" = set; then
4658   echo $ECHO_N "(cached) $ECHO_C" >&6
4659 else
4660
4661 cf_cv_ncurses_header=none
4662 for cf_header in  \
4663     ncursesw/ncurses.h \
4664         ncursesw/curses.h \
4665         ncurses.h \
4666         curses.h
4667 do
4668 cat >conftest.$ac_ext <<_ACEOF
4669 #line 4669 "configure"
4670 #include "confdefs.h"
4671 #include <${cf_header}>
4672 int
4673 main ()
4674 {
4675 initscr(); tgoto("?", 0,0)
4676   ;
4677   return 0;
4678 }
4679 _ACEOF
4680 rm -f conftest.$ac_objext
4681 if { (eval echo "$as_me:4681: \"$ac_compile\"") >&5
4682   (eval $ac_compile) 2>&5
4683   ac_status=$?
4684   echo "$as_me:4684: \$? = $ac_status" >&5
4685   (exit $ac_status); } &&
4686          { ac_try='test -s conftest.$ac_objext'
4687   { (eval echo "$as_me:4687: \"$ac_try\"") >&5
4688   (eval $ac_try) 2>&5
4689   ac_status=$?
4690   echo "$as_me:4690: \$? = $ac_status" >&5
4691   (exit $ac_status); }; }; then
4692   cf_cv_ncurses_header=$cf_header; break
4693 else
4694   echo "$as_me: failed program was:" >&5
4695 cat conftest.$ac_ext >&5
4696 fi
4697 rm -f conftest.$ac_objext conftest.$ac_ext
4698 done
4699
4700 fi
4701 echo "$as_me:4701: result: $cf_cv_ncurses_header" >&5
4702 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4703
4704 if test "$cf_cv_ncurses_header" = none ; then
4705         { { echo "$as_me:4705: error: No curses header-files found" >&5
4706 echo "$as_me: error: No curses header-files found" >&2;}
4707    { (exit 1); exit 1; }; }
4708 fi
4709
4710 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4711
4712 for ac_header in $cf_cv_ncurses_header
4713 do
4714 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4715 echo "$as_me:4715: checking for $ac_header" >&5
4716 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4717 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4718   echo $ECHO_N "(cached) $ECHO_C" >&6
4719 else
4720   cat >conftest.$ac_ext <<_ACEOF
4721 #line 4721 "configure"
4722 #include "confdefs.h"
4723 #include <$ac_header>
4724 _ACEOF
4725 if { (eval echo "$as_me:4725: \"$ac_cpp conftest.$ac_ext\"") >&5
4726   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4727   ac_status=$?
4728   egrep -v '^ *\+' conftest.er1 >conftest.err
4729   rm -f conftest.er1
4730   cat conftest.err >&5
4731   echo "$as_me:4731: \$? = $ac_status" >&5
4732   (exit $ac_status); } >/dev/null; then
4733   if test -s conftest.err; then
4734     ac_cpp_err=$ac_c_preproc_warn_flag
4735   else
4736     ac_cpp_err=
4737   fi
4738 else
4739   ac_cpp_err=yes
4740 fi
4741 if test -z "$ac_cpp_err"; then
4742   eval "$as_ac_Header=yes"
4743 else
4744   echo "$as_me: failed program was:" >&5
4745   cat conftest.$ac_ext >&5
4746   eval "$as_ac_Header=no"
4747 fi
4748 rm -f conftest.err conftest.$ac_ext
4749 fi
4750 echo "$as_me:4750: result: `eval echo '${'$as_ac_Header'}'`" >&5
4751 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4752 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4753   cat >>confdefs.h <<EOF
4754 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4755 EOF
4756
4757 fi
4758 done
4759
4760 cat >>confdefs.h <<\EOF
4761 #define NCURSES 1
4762 EOF
4763
4764 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4765
4766 cat >>confdefs.h <<EOF
4767 #define $cf_nculib_ROOT 1
4768 EOF
4769
4770 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4771
4772 else
4773
4774 cf_ncuhdr_root=ncursesw
4775
4776 test -n "$cf_cv_curses_dir" && \
4777 test "$cf_cv_curses_dir" != "no" && { \
4778
4779 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4780   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4781   do
4782         while test $cf_add_incdir != /usr/include
4783         do
4784           if test -d $cf_add_incdir
4785           then
4786                 cf_have_incdir=no
4787                 if test -n "$CFLAGS$CPPFLAGS" ; then
4788                   # a loop is needed to ensure we can add subdirs of existing dirs
4789                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4790                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4791                           cf_have_incdir=yes; break
4792                         fi
4793                   done
4794                 fi
4795
4796                 if test "$cf_have_incdir" = no ; then
4797                   if test "$cf_add_incdir" = /usr/local/include ; then
4798                         if test "$GCC" = yes
4799                         then
4800                           cf_save_CPPFLAGS=$CPPFLAGS
4801                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4802                           cat >conftest.$ac_ext <<_ACEOF
4803 #line 4803 "configure"
4804 #include "confdefs.h"
4805 #include <stdio.h>
4806 int
4807 main ()
4808 {
4809 printf("Hello")
4810   ;
4811   return 0;
4812 }
4813 _ACEOF
4814 rm -f conftest.$ac_objext
4815 if { (eval echo "$as_me:4815: \"$ac_compile\"") >&5
4816   (eval $ac_compile) 2>&5
4817   ac_status=$?
4818   echo "$as_me:4818: \$? = $ac_status" >&5
4819   (exit $ac_status); } &&
4820          { ac_try='test -s conftest.$ac_objext'
4821   { (eval echo "$as_me:4821: \"$ac_try\"") >&5
4822   (eval $ac_try) 2>&5
4823   ac_status=$?
4824   echo "$as_me:4824: \$? = $ac_status" >&5
4825   (exit $ac_status); }; }; then
4826   :
4827 else
4828   echo "$as_me: failed program was:" >&5
4829 cat conftest.$ac_ext >&5
4830 cf_have_incdir=yes
4831 fi
4832 rm -f conftest.$ac_objext conftest.$ac_ext
4833                           CPPFLAGS=$cf_save_CPPFLAGS
4834                         fi
4835                   fi
4836                 fi
4837
4838                 if test "$cf_have_incdir" = no ; then
4839                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4840
4841 echo "${as_me:-configure}:4841: testing adding $cf_add_incdir to include-path ..." 1>&5
4842
4843                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4844
4845                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4846                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4847                   cf_add_incdir="$cf_top_incdir"
4848                 else
4849                   break
4850                 fi
4851           fi
4852         done
4853   done
4854 fi
4855
4856 }
4857
4858 echo "$as_me:4858: checking for $cf_ncuhdr_root header in include-path" >&5
4859 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4860 if test "${cf_cv_ncurses_h+set}" = set; then
4861   echo $ECHO_N "(cached) $ECHO_C" >&6
4862 else
4863
4864         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4865         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4866         for cf_header in $cf_header_list
4867         do
4868
4869         cat >conftest.$ac_ext <<_ACEOF
4870 #line 4870 "configure"
4871 #include "confdefs.h"
4872
4873 #define _XOPEN_SOURCE_EXTENDED
4874 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4875 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4876
4877 #include <$cf_header>
4878 int
4879 main ()
4880 {
4881
4882 #ifdef NCURSES_VERSION
4883
4884 #ifndef WACS_BSSB
4885         make an error
4886 #endif
4887
4888 printf("%s\n", NCURSES_VERSION);
4889 #else
4890 #ifdef __NCURSES_H
4891 printf("old\n");
4892 #else
4893         make an error
4894 #endif
4895 #endif
4896
4897   ;
4898   return 0;
4899 }
4900 _ACEOF
4901 rm -f conftest.$ac_objext
4902 if { (eval echo "$as_me:4902: \"$ac_compile\"") >&5
4903   (eval $ac_compile) 2>&5
4904   ac_status=$?
4905   echo "$as_me:4905: \$? = $ac_status" >&5
4906   (exit $ac_status); } &&
4907          { ac_try='test -s conftest.$ac_objext'
4908   { (eval echo "$as_me:4908: \"$ac_try\"") >&5
4909   (eval $ac_try) 2>&5
4910   ac_status=$?
4911   echo "$as_me:4911: \$? = $ac_status" >&5
4912   (exit $ac_status); }; }; then
4913   cf_cv_ncurses_h=$cf_header
4914
4915 else
4916   echo "$as_me: failed program was:" >&5
4917 cat conftest.$ac_ext >&5
4918 cf_cv_ncurses_h=no
4919 fi
4920 rm -f conftest.$ac_objext conftest.$ac_ext
4921
4922                 test "$cf_cv_ncurses_h" != no && break
4923         done
4924
4925 fi
4926 echo "$as_me:4926: result: $cf_cv_ncurses_h" >&5
4927 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4928
4929 if test "$cf_cv_ncurses_h" != no ; then
4930         cf_cv_ncurses_header=$cf_cv_ncurses_h
4931 else
4932
4933 echo "$as_me:4933: checking for $cf_ncuhdr_root include-path" >&5
4934 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4935 if test "${cf_cv_ncurses_h2+set}" = set; then
4936   echo $ECHO_N "(cached) $ECHO_C" >&6
4937 else
4938
4939         test -n "$verbose" && echo
4940
4941 cf_search=
4942
4943 # collect the current set of include-directories from compiler flags
4944 cf_header_path_list=""
4945 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4946         for cf_header_path in $CPPFLAGS $CFLAGS
4947         do
4948                 case $cf_header_path in #(vi
4949                 -I*)
4950                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4951
4952 test "$cf_header_path" != "NONE" && \
4953 test -d "$cf_header_path" && \
4954  {
4955         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4956         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4957         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4958         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4959         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4960         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"
4961 }
4962
4963                         cf_header_path_list="$cf_header_path_list $cf_search"
4964                         ;;
4965                 esac
4966         done
4967 fi
4968
4969 # add the variations for the package we are looking for
4970
4971 cf_search=
4972
4973 test "/usr" != "$prefix" && \
4974 test -d "/usr" && \
4975 (test $prefix = NONE || test "/usr" != "$prefix") && {
4976         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4977         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4978         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4979         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4980         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4981         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4982 }
4983
4984 test "$prefix" != "NONE" && \
4985 test -d "$prefix" && \
4986  {
4987         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4988         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4989         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4990         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4991         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4992         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4993 }
4994
4995 test "/usr/local" != "$prefix" && \
4996 test -d "/usr/local" && \
4997 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4998         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4999         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
5000         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5001         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5002         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5003         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5004 }
5005
5006 test "/opt" != "$prefix" && \
5007 test -d "/opt" && \
5008 (test $prefix = NONE || test "/opt" != "$prefix") && {
5009         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
5010         test -d /opt/include &&          cf_search="$cf_search /opt/include"
5011         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5012         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5013         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5014         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5015 }
5016
5017 test "$HOME" != "$prefix" && \
5018 test -d "$HOME" && \
5019 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5020         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
5021         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
5022         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5023         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5024         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5025         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5026 }
5027
5028 test "$includedir" != NONE && \
5029 test "$includedir" != "/usr/include" && \
5030 test -d "$includedir" && {
5031         test -d $includedir &&    cf_search="$cf_search $includedir"
5032         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5033 }
5034
5035 test "$oldincludedir" != NONE && \
5036 test "$oldincludedir" != "/usr/include" && \
5037 test -d "$oldincludedir" && {
5038         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
5039         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5040 }
5041
5042 cf_search="$cf_search $cf_header_path_list"
5043
5044         test -n "$verbose" && echo search path $cf_search
5045         cf_save2_CPPFLAGS="$CPPFLAGS"
5046         for cf_incdir in $cf_search
5047         do
5048
5049 if test -n "$cf_incdir" ; then
5050   for cf_add_incdir in $cf_incdir
5051   do
5052         while test $cf_add_incdir != /usr/include
5053         do
5054           if test -d $cf_add_incdir
5055           then
5056                 cf_have_incdir=no
5057                 if test -n "$CFLAGS$CPPFLAGS" ; then
5058                   # a loop is needed to ensure we can add subdirs of existing dirs
5059                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5060                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5061                           cf_have_incdir=yes; break
5062                         fi
5063                   done
5064                 fi
5065
5066                 if test "$cf_have_incdir" = no ; then
5067                   if test "$cf_add_incdir" = /usr/local/include ; then
5068                         if test "$GCC" = yes
5069                         then
5070                           cf_save_CPPFLAGS=$CPPFLAGS
5071                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5072                           cat >conftest.$ac_ext <<_ACEOF
5073 #line 5073 "configure"
5074 #include "confdefs.h"
5075 #include <stdio.h>
5076 int
5077 main ()
5078 {
5079 printf("Hello")
5080   ;
5081   return 0;
5082 }
5083 _ACEOF
5084 rm -f conftest.$ac_objext
5085 if { (eval echo "$as_me:5085: \"$ac_compile\"") >&5
5086   (eval $ac_compile) 2>&5
5087   ac_status=$?
5088   echo "$as_me:5088: \$? = $ac_status" >&5
5089   (exit $ac_status); } &&
5090          { ac_try='test -s conftest.$ac_objext'
5091   { (eval echo "$as_me:5091: \"$ac_try\"") >&5
5092   (eval $ac_try) 2>&5
5093   ac_status=$?
5094   echo "$as_me:5094: \$? = $ac_status" >&5
5095   (exit $ac_status); }; }; then
5096   :
5097 else
5098   echo "$as_me: failed program was:" >&5
5099 cat conftest.$ac_ext >&5
5100 cf_have_incdir=yes
5101 fi
5102 rm -f conftest.$ac_objext conftest.$ac_ext
5103                           CPPFLAGS=$cf_save_CPPFLAGS
5104                         fi
5105                   fi
5106                 fi
5107
5108                 if test "$cf_have_incdir" = no ; then
5109                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5110
5111 echo "${as_me:-configure}:5111: testing adding $cf_add_incdir to include-path ..." 1>&5
5112
5113                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5114
5115                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5116                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5117                   cf_add_incdir="$cf_top_incdir"
5118                 else
5119                   break
5120                 fi
5121           fi
5122         done
5123   done
5124 fi
5125
5126                 for cf_header in \
5127                         ncurses.h \
5128                         curses.h
5129                 do
5130
5131         cat >conftest.$ac_ext <<_ACEOF
5132 #line 5132 "configure"
5133 #include "confdefs.h"
5134
5135 #include <$cf_header>
5136 int
5137 main ()
5138 {
5139
5140 #ifdef NCURSES_VERSION
5141
5142 printf("%s\n", NCURSES_VERSION);
5143 #else
5144 #ifdef __NCURSES_H
5145 printf("old\n");
5146 #else
5147         make an error
5148 #endif
5149 #endif
5150
5151   ;
5152   return 0;
5153 }
5154 _ACEOF
5155 rm -f conftest.$ac_objext
5156 if { (eval echo "$as_me:5156: \"$ac_compile\"") >&5
5157   (eval $ac_compile) 2>&5
5158   ac_status=$?
5159   echo "$as_me:5159: \$? = $ac_status" >&5
5160   (exit $ac_status); } &&
5161          { ac_try='test -s conftest.$ac_objext'
5162   { (eval echo "$as_me:5162: \"$ac_try\"") >&5
5163   (eval $ac_try) 2>&5
5164   ac_status=$?
5165   echo "$as_me:5165: \$? = $ac_status" >&5
5166   (exit $ac_status); }; }; then
5167   cf_cv_ncurses_h2=$cf_header
5168
5169 else
5170   echo "$as_me: failed program was:" >&5
5171 cat conftest.$ac_ext >&5
5172 cf_cv_ncurses_h2=no
5173 fi
5174 rm -f conftest.$ac_objext conftest.$ac_ext
5175
5176                         if test "$cf_cv_ncurses_h2" != no ; then
5177                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5178                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
5179                                 break
5180                         fi
5181                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
5182                 done
5183                 CPPFLAGS="$cf_save2_CPPFLAGS"
5184                 test "$cf_cv_ncurses_h2" != no && break
5185         done
5186         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5186: error: not found" >&5
5187 echo "$as_me: error: not found" >&2;}
5188    { (exit 1); exit 1; }; }
5189
5190 fi
5191 echo "$as_me:5191: result: $cf_cv_ncurses_h2" >&5
5192 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5193
5194         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5195         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5196         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5197                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5198         fi
5199
5200 if test -n "$cf_1st_incdir" ; then
5201   for cf_add_incdir in $cf_1st_incdir
5202   do
5203         while test $cf_add_incdir != /usr/include
5204         do
5205           if test -d $cf_add_incdir
5206           then
5207                 cf_have_incdir=no
5208                 if test -n "$CFLAGS$CPPFLAGS" ; then
5209                   # a loop is needed to ensure we can add subdirs of existing dirs
5210                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5211                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5212                           cf_have_incdir=yes; break
5213                         fi
5214                   done
5215                 fi
5216
5217                 if test "$cf_have_incdir" = no ; then
5218                   if test "$cf_add_incdir" = /usr/local/include ; then
5219                         if test "$GCC" = yes
5220                         then
5221                           cf_save_CPPFLAGS=$CPPFLAGS
5222                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5223                           cat >conftest.$ac_ext <<_ACEOF
5224 #line 5224 "configure"
5225 #include "confdefs.h"
5226 #include <stdio.h>
5227 int
5228 main ()
5229 {
5230 printf("Hello")
5231   ;
5232   return 0;
5233 }
5234 _ACEOF
5235 rm -f conftest.$ac_objext
5236 if { (eval echo "$as_me:5236: \"$ac_compile\"") >&5
5237   (eval $ac_compile) 2>&5
5238   ac_status=$?
5239   echo "$as_me:5239: \$? = $ac_status" >&5
5240   (exit $ac_status); } &&
5241          { ac_try='test -s conftest.$ac_objext'
5242   { (eval echo "$as_me:5242: \"$ac_try\"") >&5
5243   (eval $ac_try) 2>&5
5244   ac_status=$?
5245   echo "$as_me:5245: \$? = $ac_status" >&5
5246   (exit $ac_status); }; }; then
5247   :
5248 else
5249   echo "$as_me: failed program was:" >&5
5250 cat conftest.$ac_ext >&5
5251 cf_have_incdir=yes
5252 fi
5253 rm -f conftest.$ac_objext conftest.$ac_ext
5254                           CPPFLAGS=$cf_save_CPPFLAGS
5255                         fi
5256                   fi
5257                 fi
5258
5259                 if test "$cf_have_incdir" = no ; then
5260                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5261
5262 echo "${as_me:-configure}:5262: testing adding $cf_add_incdir to include-path ..." 1>&5
5263
5264                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5265
5266                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5267                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5268                   cf_add_incdir="$cf_top_incdir"
5269                 else
5270                   break
5271                 fi
5272           fi
5273         done
5274   done
5275 fi
5276
5277 fi
5278
5279 # Set definitions to allow ifdef'ing for ncurses.h
5280
5281 case $cf_cv_ncurses_header in # (vi
5282 *ncurses.h)
5283         cat >>confdefs.h <<\EOF
5284 #define HAVE_NCURSES_H 1
5285 EOF
5286
5287         ;;
5288 esac
5289
5290 case $cf_cv_ncurses_header in # (vi
5291 ncurses/curses.h|ncurses/ncurses.h)
5292         cat >>confdefs.h <<\EOF
5293 #define HAVE_NCURSES_NCURSES_H 1
5294 EOF
5295
5296         ;;
5297 ncursesw/curses.h|ncursesw/ncurses.h)
5298         cat >>confdefs.h <<\EOF
5299 #define HAVE_NCURSESW_NCURSES_H 1
5300 EOF
5301
5302         ;;
5303 esac
5304
5305 echo "$as_me:5305: checking for terminfo header" >&5
5306 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5307 if test "${cf_cv_term_header+set}" = set; then
5308   echo $ECHO_N "(cached) $ECHO_C" >&6
5309 else
5310
5311 case ${cf_cv_ncurses_header} in #(vi
5312 */ncurses.h|*/ncursesw.h) #(vi
5313         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5314         ;;
5315 *)
5316         cf_term_header=term.h
5317         ;;
5318 esac
5319
5320 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5321 do
5322 cat >conftest.$ac_ext <<_ACEOF
5323 #line 5323 "configure"
5324 #include "confdefs.h"
5325 #include <stdio.h>
5326 #include <${cf_cv_ncurses_header:-curses.h}>
5327 #include <$cf_test>
5328
5329 int
5330 main ()
5331 {
5332 int x = auto_left_margin
5333   ;
5334   return 0;
5335 }
5336 _ACEOF
5337 rm -f conftest.$ac_objext
5338 if { (eval echo "$as_me:5338: \"$ac_compile\"") >&5
5339   (eval $ac_compile) 2>&5
5340   ac_status=$?
5341   echo "$as_me:5341: \$? = $ac_status" >&5
5342   (exit $ac_status); } &&
5343          { ac_try='test -s conftest.$ac_objext'
5344   { (eval echo "$as_me:5344: \"$ac_try\"") >&5
5345   (eval $ac_try) 2>&5
5346   ac_status=$?
5347   echo "$as_me:5347: \$? = $ac_status" >&5
5348   (exit $ac_status); }; }; then
5349
5350         cf_cv_term_header="$cf_test"
5351 else
5352   echo "$as_me: failed program was:" >&5
5353 cat conftest.$ac_ext >&5
5354
5355         cf_cv_term_header=unknown
5356
5357 fi
5358 rm -f conftest.$ac_objext conftest.$ac_ext
5359         test "$cf_cv_term_header" != unknown && break
5360 done
5361
5362 fi
5363 echo "$as_me:5363: result: $cf_cv_term_header" >&5
5364 echo "${ECHO_T}$cf_cv_term_header" >&6
5365
5366 # Set definitions to allow ifdef'ing to accommodate subdirectories
5367
5368 case $cf_cv_term_header in # (vi
5369 *term.h)
5370         cat >>confdefs.h <<\EOF
5371 #define HAVE_TERM_H 1
5372 EOF
5373
5374         ;;
5375 esac
5376
5377 case $cf_cv_term_header in # (vi
5378 ncurses/term.h) #(vi
5379         cat >>confdefs.h <<\EOF
5380 #define HAVE_NCURSES_TERM_H 1
5381 EOF
5382
5383         ;;
5384 ncursesw/term.h)
5385         cat >>confdefs.h <<\EOF
5386 #define HAVE_NCURSESW_TERM_H 1
5387 EOF
5388
5389         ;;
5390 esac
5391
5392 # some applications need this, but should check for NCURSES_VERSION
5393 cat >>confdefs.h <<\EOF
5394 #define NCURSES 1
5395 EOF
5396
5397 echo "$as_me:5397: checking for ncurses version" >&5
5398 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5399 if test "${cf_cv_ncurses_version+set}" = set; then
5400   echo $ECHO_N "(cached) $ECHO_C" >&6
5401 else
5402
5403         cf_cv_ncurses_version=no
5404         cf_tempfile=out$$
5405         rm -f $cf_tempfile
5406         if test "$cross_compiling" = yes; then
5407
5408         # This will not work if the preprocessor splits the line after the
5409         # Autoconf token.  The 'unproto' program does that.
5410         cat > conftest.$ac_ext <<EOF
5411 #include <${cf_cv_ncurses_header:-curses.h}>
5412 #undef Autoconf
5413 #ifdef NCURSES_VERSION
5414 Autoconf NCURSES_VERSION
5415 #else
5416 #ifdef __NCURSES_H
5417 Autoconf "old"
5418 #endif
5419 ;
5420 #endif
5421 EOF
5422         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5423         { (eval echo "$as_me:5423: \"$cf_try\"") >&5
5424   (eval $cf_try) 2>&5
5425   ac_status=$?
5426   echo "$as_me:5426: \$? = $ac_status" >&5
5427   (exit $ac_status); }
5428         if test -f conftest.out ; then
5429                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5430                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5431                 rm -f conftest.out
5432         fi
5433
5434 else
5435   cat >conftest.$ac_ext <<_ACEOF
5436 #line 5436 "configure"
5437 #include "confdefs.h"
5438
5439 #include <${cf_cv_ncurses_header:-curses.h}>
5440 #include <stdio.h>
5441 int main()
5442 {
5443         FILE *fp = fopen("$cf_tempfile", "w");
5444 #ifdef NCURSES_VERSION
5445 # ifdef NCURSES_VERSION_PATCH
5446         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5447 # else
5448         fprintf(fp, "%s\n", NCURSES_VERSION);
5449 # endif
5450 #else
5451 # ifdef __NCURSES_H
5452         fprintf(fp, "old\n");
5453 # else
5454         make an error
5455 # endif
5456 #endif
5457         ${cf_cv_main_return:-return}(0);
5458 }
5459 _ACEOF
5460 rm -f conftest$ac_exeext
5461 if { (eval echo "$as_me:5461: \"$ac_link\"") >&5
5462   (eval $ac_link) 2>&5
5463   ac_status=$?
5464   echo "$as_me:5464: \$? = $ac_status" >&5
5465   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5466   { (eval echo "$as_me:5466: \"$ac_try\"") >&5
5467   (eval $ac_try) 2>&5
5468   ac_status=$?
5469   echo "$as_me:5469: \$? = $ac_status" >&5
5470   (exit $ac_status); }; }; then
5471
5472         cf_cv_ncurses_version=`cat $cf_tempfile`
5473 else
5474   echo "$as_me: program exited with status $ac_status" >&5
5475 echo "$as_me: failed program was:" >&5
5476 cat conftest.$ac_ext >&5
5477 fi
5478 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5479 fi
5480         rm -f $cf_tempfile
5481
5482 fi
5483 echo "$as_me:5483: result: $cf_cv_ncurses_version" >&5
5484 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5485 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5486 #define NCURSES 1
5487 EOF
5488
5489 cf_nculib_root=ncursesw
5490         # This works, except for the special case where we find gpm, but
5491         # ncurses is in a nonstandard location via $LIBS, and we really want
5492         # to link gpm.
5493 cf_ncurses_LIBS=""
5494 cf_ncurses_SAVE="$LIBS"
5495 echo "$as_me:5495: checking for Gpm_Open in -lgpm" >&5
5496 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5497 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5498   echo $ECHO_N "(cached) $ECHO_C" >&6
5499 else
5500   ac_check_lib_save_LIBS=$LIBS
5501 LIBS="-lgpm  $LIBS"
5502 cat >conftest.$ac_ext <<_ACEOF
5503 #line 5503 "configure"
5504 #include "confdefs.h"
5505
5506 /* Override any gcc2 internal prototype to avoid an error.  */
5507 #ifdef __cplusplus
5508 extern "C"
5509 #endif
5510 /* We use char because int might match the return type of a gcc2
5511    builtin and then its argument prototype would still apply.  */
5512 char Gpm_Open ();
5513 int
5514 main ()
5515 {
5516 Gpm_Open ();
5517   ;
5518   return 0;
5519 }
5520 _ACEOF
5521 rm -f conftest.$ac_objext conftest$ac_exeext
5522 if { (eval echo "$as_me:5522: \"$ac_link\"") >&5
5523   (eval $ac_link) 2>&5
5524   ac_status=$?
5525   echo "$as_me:5525: \$? = $ac_status" >&5
5526   (exit $ac_status); } &&
5527          { ac_try='test -s conftest$ac_exeext'
5528   { (eval echo "$as_me:5528: \"$ac_try\"") >&5
5529   (eval $ac_try) 2>&5
5530   ac_status=$?
5531   echo "$as_me:5531: \$? = $ac_status" >&5
5532   (exit $ac_status); }; }; then
5533   ac_cv_lib_gpm_Gpm_Open=yes
5534 else
5535   echo "$as_me: failed program was:" >&5
5536 cat conftest.$ac_ext >&5
5537 ac_cv_lib_gpm_Gpm_Open=no
5538 fi
5539 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5540 LIBS=$ac_check_lib_save_LIBS
5541 fi
5542 echo "$as_me:5542: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5543 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5544 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5545   echo "$as_me:5545: checking for initscr in -lgpm" >&5
5546 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5547 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5548   echo $ECHO_N "(cached) $ECHO_C" >&6
5549 else
5550   ac_check_lib_save_LIBS=$LIBS
5551 LIBS="-lgpm  $LIBS"
5552 cat >conftest.$ac_ext <<_ACEOF
5553 #line 5553 "configure"
5554 #include "confdefs.h"
5555
5556 /* Override any gcc2 internal prototype to avoid an error.  */
5557 #ifdef __cplusplus
5558 extern "C"
5559 #endif
5560 /* We use char because int might match the return type of a gcc2
5561    builtin and then its argument prototype would still apply.  */
5562 char initscr ();
5563 int
5564 main ()
5565 {
5566 initscr ();
5567   ;
5568   return 0;
5569 }
5570 _ACEOF
5571 rm -f conftest.$ac_objext conftest$ac_exeext
5572 if { (eval echo "$as_me:5572: \"$ac_link\"") >&5
5573   (eval $ac_link) 2>&5
5574   ac_status=$?
5575   echo "$as_me:5575: \$? = $ac_status" >&5
5576   (exit $ac_status); } &&
5577          { ac_try='test -s conftest$ac_exeext'
5578   { (eval echo "$as_me:5578: \"$ac_try\"") >&5
5579   (eval $ac_try) 2>&5
5580   ac_status=$?
5581   echo "$as_me:5581: \$? = $ac_status" >&5
5582   (exit $ac_status); }; }; then
5583   ac_cv_lib_gpm_initscr=yes
5584 else
5585   echo "$as_me: failed program was:" >&5
5586 cat conftest.$ac_ext >&5
5587 ac_cv_lib_gpm_initscr=no
5588 fi
5589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5590 LIBS=$ac_check_lib_save_LIBS
5591 fi
5592 echo "$as_me:5592: result: $ac_cv_lib_gpm_initscr" >&5
5593 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5594 if test $ac_cv_lib_gpm_initscr = yes; then
5595   LIBS="$cf_ncurses_SAVE"
5596 else
5597   cf_ncurses_LIBS="-lgpm"
5598 fi
5599
5600 fi
5601
5602 case $host_os in #(vi
5603 freebsd*)
5604         # This is only necessary if you are linking against an obsolete
5605         # version of ncurses (but it should do no harm, since it's static).
5606         if test "$cf_nculib_root" = ncurses ; then
5607                 echo "$as_me:5607: checking for tgoto in -lmytinfo" >&5
5608 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5609 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5610   echo $ECHO_N "(cached) $ECHO_C" >&6
5611 else
5612   ac_check_lib_save_LIBS=$LIBS
5613 LIBS="-lmytinfo  $LIBS"
5614 cat >conftest.$ac_ext <<_ACEOF
5615 #line 5615 "configure"
5616 #include "confdefs.h"
5617
5618 /* Override any gcc2 internal prototype to avoid an error.  */
5619 #ifdef __cplusplus
5620 extern "C"
5621 #endif
5622 /* We use char because int might match the return type of a gcc2
5623    builtin and then its argument prototype would still apply.  */
5624 char tgoto ();
5625 int
5626 main ()
5627 {
5628 tgoto ();
5629   ;
5630   return 0;
5631 }
5632 _ACEOF
5633 rm -f conftest.$ac_objext conftest$ac_exeext
5634 if { (eval echo "$as_me:5634: \"$ac_link\"") >&5
5635   (eval $ac_link) 2>&5
5636   ac_status=$?
5637   echo "$as_me:5637: \$? = $ac_status" >&5
5638   (exit $ac_status); } &&
5639          { ac_try='test -s conftest$ac_exeext'
5640   { (eval echo "$as_me:5640: \"$ac_try\"") >&5
5641   (eval $ac_try) 2>&5
5642   ac_status=$?
5643   echo "$as_me:5643: \$? = $ac_status" >&5
5644   (exit $ac_status); }; }; then
5645   ac_cv_lib_mytinfo_tgoto=yes
5646 else
5647   echo "$as_me: failed program was:" >&5
5648 cat conftest.$ac_ext >&5
5649 ac_cv_lib_mytinfo_tgoto=no
5650 fi
5651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5652 LIBS=$ac_check_lib_save_LIBS
5653 fi
5654 echo "$as_me:5654: result: $ac_cv_lib_mytinfo_tgoto" >&5
5655 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5656 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5657   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5658 fi
5659
5660         fi
5661         ;;
5662 esac
5663
5664 LIBS="$cf_ncurses_LIBS $LIBS"
5665
5666 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5667 then
5668         LIBS="-l$cf_nculib_root $LIBS"
5669 else
5670
5671         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5672         cf_libdir=""
5673         echo "$as_me:5673: checking for initscr" >&5
5674 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5675 if test "${ac_cv_func_initscr+set}" = set; then
5676   echo $ECHO_N "(cached) $ECHO_C" >&6
5677 else
5678   cat >conftest.$ac_ext <<_ACEOF
5679 #line 5679 "configure"
5680 #include "confdefs.h"
5681 /* System header to define __stub macros and hopefully few prototypes,
5682     which can conflict with char initscr (); below.  */
5683 #include <assert.h>
5684 /* Override any gcc2 internal prototype to avoid an error.  */
5685 #ifdef __cplusplus
5686 extern "C"
5687 #endif
5688 /* We use char because int might match the return type of a gcc2
5689    builtin and then its argument prototype would still apply.  */
5690 char initscr ();
5691 char (*f) ();
5692
5693 int
5694 main ()
5695 {
5696 /* The GNU C library defines this for functions which it implements
5697     to always fail with ENOSYS.  Some functions are actually named
5698     something starting with __ and the normal name is an alias.  */
5699 #if defined (__stub_initscr) || defined (__stub___initscr)
5700 choke me
5701 #else
5702 f = initscr;
5703 #endif
5704
5705   ;
5706   return 0;
5707 }
5708 _ACEOF
5709 rm -f conftest.$ac_objext conftest$ac_exeext
5710 if { (eval echo "$as_me:5710: \"$ac_link\"") >&5
5711   (eval $ac_link) 2>&5
5712   ac_status=$?
5713   echo "$as_me:5713: \$? = $ac_status" >&5
5714   (exit $ac_status); } &&
5715          { ac_try='test -s conftest$ac_exeext'
5716   { (eval echo "$as_me:5716: \"$ac_try\"") >&5
5717   (eval $ac_try) 2>&5
5718   ac_status=$?
5719   echo "$as_me:5719: \$? = $ac_status" >&5
5720   (exit $ac_status); }; }; then
5721   ac_cv_func_initscr=yes
5722 else
5723   echo "$as_me: failed program was:" >&5
5724 cat conftest.$ac_ext >&5
5725 ac_cv_func_initscr=no
5726 fi
5727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5728 fi
5729 echo "$as_me:5729: result: $ac_cv_func_initscr" >&5
5730 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5731 if test $ac_cv_func_initscr = yes; then
5732   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5733 else
5734
5735                 cf_save_LIBS="$LIBS"
5736                 echo "$as_me:5736: checking for initscr in -l$cf_nculib_root" >&5
5737 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5738                 LIBS="-l$cf_nculib_root $LIBS"
5739                 cat >conftest.$ac_ext <<_ACEOF
5740 #line 5740 "configure"
5741 #include "confdefs.h"
5742 #include <${cf_cv_ncurses_header:-curses.h}>
5743 int
5744 main ()
5745 {
5746 initscr()
5747   ;
5748   return 0;
5749 }
5750 _ACEOF
5751 rm -f conftest.$ac_objext conftest$ac_exeext
5752 if { (eval echo "$as_me:5752: \"$ac_link\"") >&5
5753   (eval $ac_link) 2>&5
5754   ac_status=$?
5755   echo "$as_me:5755: \$? = $ac_status" >&5
5756   (exit $ac_status); } &&
5757          { ac_try='test -s conftest$ac_exeext'
5758   { (eval echo "$as_me:5758: \"$ac_try\"") >&5
5759   (eval $ac_try) 2>&5
5760   ac_status=$?
5761   echo "$as_me:5761: \$? = $ac_status" >&5
5762   (exit $ac_status); }; }; then
5763   echo "$as_me:5763: result: yes" >&5
5764 echo "${ECHO_T}yes" >&6
5765                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5766
5767 else
5768   echo "$as_me: failed program was:" >&5
5769 cat conftest.$ac_ext >&5
5770 echo "$as_me:5770: result: no" >&5
5771 echo "${ECHO_T}no" >&6
5772
5773 cf_search=
5774 cf_library_path_list=""
5775 if test -n "${LDFLAGS}${LIBS}" ; then
5776         for cf_library_path in $LDFLAGS $LIBS
5777         do
5778                 case $cf_library_path in #(vi
5779                 -L*)
5780                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5781
5782 test "$cf_library_path" != "NONE" && \
5783 test -d "$cf_library_path" && \
5784  {
5785         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5786         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5787         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5788         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5789         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5790         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"
5791 }
5792
5793                         cf_library_path_list="$cf_library_path_list $cf_search"
5794                         ;;
5795                 esac
5796         done
5797 fi
5798
5799 cf_search=
5800
5801 test "/usr" != "$prefix" && \
5802 test -d "/usr" && \
5803 (test $prefix = NONE || test "/usr" != "$prefix") && {
5804         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5805         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5806         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5807         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5808         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5809         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5810 }
5811
5812 test "$prefix" != "NONE" && \
5813 test -d "$prefix" && \
5814  {
5815         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5816         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5817         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5818         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5819         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5820         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5821 }
5822
5823 test "/usr/local" != "$prefix" && \
5824 test -d "/usr/local" && \
5825 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5826         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5827         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5828         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5829         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5830         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5831         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5832 }
5833
5834 test "/opt" != "$prefix" && \
5835 test -d "/opt" && \
5836 (test $prefix = NONE || test "/opt" != "$prefix") && {
5837         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5838         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5839         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5840         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5841         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5842         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5843 }
5844
5845 test "$HOME" != "$prefix" && \
5846 test -d "$HOME" && \
5847 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5848         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5849         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5850         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5851         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5852         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5853         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5854 }
5855
5856 cf_search="$cf_library_path_list $cf_search"
5857
5858                         for cf_libdir in $cf_search
5859                         do
5860                                 echo "$as_me:5860: checking for -l$cf_nculib_root in $cf_libdir" >&5
5861 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5862                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5863                                 cat >conftest.$ac_ext <<_ACEOF
5864 #line 5864 "configure"
5865 #include "confdefs.h"
5866 #include <${cf_cv_ncurses_header:-curses.h}>
5867 int
5868 main ()
5869 {
5870 initscr()
5871   ;
5872   return 0;
5873 }
5874 _ACEOF
5875 rm -f conftest.$ac_objext conftest$ac_exeext
5876 if { (eval echo "$as_me:5876: \"$ac_link\"") >&5
5877   (eval $ac_link) 2>&5
5878   ac_status=$?
5879   echo "$as_me:5879: \$? = $ac_status" >&5
5880   (exit $ac_status); } &&
5881          { ac_try='test -s conftest$ac_exeext'
5882   { (eval echo "$as_me:5882: \"$ac_try\"") >&5
5883   (eval $ac_try) 2>&5
5884   ac_status=$?
5885   echo "$as_me:5885: \$? = $ac_status" >&5
5886   (exit $ac_status); }; }; then
5887   echo "$as_me:5887: result: yes" >&5
5888 echo "${ECHO_T}yes" >&6
5889                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5890                                          break
5891 else
5892   echo "$as_me: failed program was:" >&5
5893 cat conftest.$ac_ext >&5
5894 echo "$as_me:5894: result: no" >&5
5895 echo "${ECHO_T}no" >&6
5896                                          LIBS="$cf_save_LIBS"
5897 fi
5898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5899                         done
5900
5901 fi
5902 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5903
5904 fi
5905
5906 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5907
5908 if test $cf_found_library = no ; then
5909         { { echo "$as_me:5909: error: Cannot link $cf_nculib_root library" >&5
5910 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5911    { (exit 1); exit 1; }; }
5912 fi
5913
5914 fi
5915
5916 if test -n "$cf_ncurses_LIBS" ; then
5917         echo "$as_me:5917: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5918 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5919         cf_ncurses_SAVE="$LIBS"
5920         for p in $cf_ncurses_LIBS ; do
5921                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5922                 if test "$q" != "$LIBS" ; then
5923                         LIBS="$q"
5924                 fi
5925         done
5926         cat >conftest.$ac_ext <<_ACEOF
5927 #line 5927 "configure"
5928 #include "confdefs.h"
5929 #include <${cf_cv_ncurses_header:-curses.h}>
5930 int
5931 main ()
5932 {
5933 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5934   ;
5935   return 0;
5936 }
5937 _ACEOF
5938 rm -f conftest.$ac_objext conftest$ac_exeext
5939 if { (eval echo "$as_me:5939: \"$ac_link\"") >&5
5940   (eval $ac_link) 2>&5
5941   ac_status=$?
5942   echo "$as_me:5942: \$? = $ac_status" >&5
5943   (exit $ac_status); } &&
5944          { ac_try='test -s conftest$ac_exeext'
5945   { (eval echo "$as_me:5945: \"$ac_try\"") >&5
5946   (eval $ac_try) 2>&5
5947   ac_status=$?
5948   echo "$as_me:5948: \$? = $ac_status" >&5
5949   (exit $ac_status); }; }; then
5950   echo "$as_me:5950: result: yes" >&5
5951 echo "${ECHO_T}yes" >&6
5952 else
5953   echo "$as_me: failed program was:" >&5
5954 cat conftest.$ac_ext >&5
5955 echo "$as_me:5955: result: no" >&5
5956 echo "${ECHO_T}no" >&6
5957                  LIBS="$cf_ncurses_SAVE"
5958 fi
5959 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5960 fi
5961
5962 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5963
5964 cat >>confdefs.h <<EOF
5965 #define $cf_nculib_ROOT 1
5966 EOF
5967
5968 fi
5969
5970 else
5971
5972 cf_ncuconfig_root=ncurses
5973
5974 echo "Looking for ${cf_ncuconfig_root}-config"
5975 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5976 do
5977   # Extract the first word of "$ac_prog", so it can be a program name with args.
5978 set dummy $ac_prog; ac_word=$2
5979 echo "$as_me:5979: checking for $ac_word" >&5
5980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5981 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5982   echo $ECHO_N "(cached) $ECHO_C" >&6
5983 else
5984   case $NCURSES_CONFIG in
5985   [\\/]* | ?:[\\/]*)
5986   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5987   ;;
5988   *)
5989   ac_save_IFS=$IFS; IFS=$ac_path_separator
5990 ac_dummy="$PATH"
5991 for ac_dir in $ac_dummy; do
5992   IFS=$ac_save_IFS
5993   test -z "$ac_dir" && ac_dir=.
5994   if $as_executable_p "$ac_dir/$ac_word"; then
5995    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5996    echo "$as_me:5996: found $ac_dir/$ac_word" >&5
5997    break
5998 fi
5999 done
6000
6001   ;;
6002 esac
6003 fi
6004 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
6005
6006 if test -n "$NCURSES_CONFIG"; then
6007   echo "$as_me:6007: result: $NCURSES_CONFIG" >&5
6008 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6009 else
6010   echo "$as_me:6010: result: no" >&5
6011 echo "${ECHO_T}no" >&6
6012 fi
6013
6014   test -n "$NCURSES_CONFIG" && break
6015 done
6016 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
6017
6018 if test "$NCURSES_CONFIG" != none ; then
6019
6020 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6021 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
6022
6023 # even with config script, some packages use no-override for curses.h
6024
6025 echo "$as_me:6025: checking if we have identified curses headers" >&5
6026 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6027 if test "${cf_cv_ncurses_header+set}" = set; then
6028   echo $ECHO_N "(cached) $ECHO_C" >&6
6029 else
6030
6031 cf_cv_ncurses_header=none
6032 for cf_header in  \
6033     ncurses/ncurses.h \
6034         ncurses/curses.h \
6035         ncurses.h \
6036         curses.h
6037 do
6038 cat >conftest.$ac_ext <<_ACEOF
6039 #line 6039 "configure"
6040 #include "confdefs.h"
6041 #include <${cf_header}>
6042 int
6043 main ()
6044 {
6045 initscr(); tgoto("?", 0,0)
6046   ;
6047   return 0;
6048 }
6049 _ACEOF
6050 rm -f conftest.$ac_objext
6051 if { (eval echo "$as_me:6051: \"$ac_compile\"") >&5
6052   (eval $ac_compile) 2>&5
6053   ac_status=$?
6054   echo "$as_me:6054: \$? = $ac_status" >&5
6055   (exit $ac_status); } &&
6056          { ac_try='test -s conftest.$ac_objext'
6057   { (eval echo "$as_me:6057: \"$ac_try\"") >&5
6058   (eval $ac_try) 2>&5
6059   ac_status=$?
6060   echo "$as_me:6060: \$? = $ac_status" >&5
6061   (exit $ac_status); }; }; then
6062   cf_cv_ncurses_header=$cf_header; break
6063 else
6064   echo "$as_me: failed program was:" >&5
6065 cat conftest.$ac_ext >&5
6066 fi
6067 rm -f conftest.$ac_objext conftest.$ac_ext
6068 done
6069
6070 fi
6071 echo "$as_me:6071: result: $cf_cv_ncurses_header" >&5
6072 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6073
6074 if test "$cf_cv_ncurses_header" = none ; then
6075         { { echo "$as_me:6075: error: No curses header-files found" >&5
6076 echo "$as_me: error: No curses header-files found" >&2;}
6077    { (exit 1); exit 1; }; }
6078 fi
6079
6080 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6081
6082 for ac_header in $cf_cv_ncurses_header
6083 do
6084 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6085 echo "$as_me:6085: checking for $ac_header" >&5
6086 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6087 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6088   echo $ECHO_N "(cached) $ECHO_C" >&6
6089 else
6090   cat >conftest.$ac_ext <<_ACEOF
6091 #line 6091 "configure"
6092 #include "confdefs.h"
6093 #include <$ac_header>
6094 _ACEOF
6095 if { (eval echo "$as_me:6095: \"$ac_cpp conftest.$ac_ext\"") >&5
6096   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6097   ac_status=$?
6098   egrep -v '^ *\+' conftest.er1 >conftest.err
6099   rm -f conftest.er1
6100   cat conftest.err >&5
6101   echo "$as_me:6101: \$? = $ac_status" >&5
6102   (exit $ac_status); } >/dev/null; then
6103   if test -s conftest.err; then
6104     ac_cpp_err=$ac_c_preproc_warn_flag
6105   else
6106     ac_cpp_err=
6107   fi
6108 else
6109   ac_cpp_err=yes
6110 fi
6111 if test -z "$ac_cpp_err"; then
6112   eval "$as_ac_Header=yes"
6113 else
6114   echo "$as_me: failed program was:" >&5
6115   cat conftest.$ac_ext >&5
6116   eval "$as_ac_Header=no"
6117 fi
6118 rm -f conftest.err conftest.$ac_ext
6119 fi
6120 echo "$as_me:6120: result: `eval echo '${'$as_ac_Header'}'`" >&5
6121 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6122 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6123   cat >>confdefs.h <<EOF
6124 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6125 EOF
6126
6127 fi
6128 done
6129
6130 cat >>confdefs.h <<\EOF
6131 #define NCURSES 1
6132 EOF
6133
6134 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6135
6136 cat >>confdefs.h <<EOF
6137 #define $cf_nculib_ROOT 1
6138 EOF
6139
6140 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6141
6142 else
6143
6144 cf_ncuhdr_root=ncurses
6145
6146 test -n "$cf_cv_curses_dir" && \
6147 test "$cf_cv_curses_dir" != "no" && { \
6148
6149 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6150   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6151   do
6152         while test $cf_add_incdir != /usr/include
6153         do
6154           if test -d $cf_add_incdir
6155           then
6156                 cf_have_incdir=no
6157                 if test -n "$CFLAGS$CPPFLAGS" ; then
6158                   # a loop is needed to ensure we can add subdirs of existing dirs
6159                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6160                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6161                           cf_have_incdir=yes; break
6162                         fi
6163                   done
6164                 fi
6165
6166                 if test "$cf_have_incdir" = no ; then
6167                   if test "$cf_add_incdir" = /usr/local/include ; then
6168                         if test "$GCC" = yes
6169                         then
6170                           cf_save_CPPFLAGS=$CPPFLAGS
6171                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6172                           cat >conftest.$ac_ext <<_ACEOF
6173 #line 6173 "configure"
6174 #include "confdefs.h"
6175 #include <stdio.h>
6176 int
6177 main ()
6178 {
6179 printf("Hello")
6180   ;
6181   return 0;
6182 }
6183 _ACEOF
6184 rm -f conftest.$ac_objext
6185 if { (eval echo "$as_me:6185: \"$ac_compile\"") >&5
6186   (eval $ac_compile) 2>&5
6187   ac_status=$?
6188   echo "$as_me:6188: \$? = $ac_status" >&5
6189   (exit $ac_status); } &&
6190          { ac_try='test -s conftest.$ac_objext'
6191   { (eval echo "$as_me:6191: \"$ac_try\"") >&5
6192   (eval $ac_try) 2>&5
6193   ac_status=$?
6194   echo "$as_me:6194: \$? = $ac_status" >&5
6195   (exit $ac_status); }; }; then
6196   :
6197 else
6198   echo "$as_me: failed program was:" >&5
6199 cat conftest.$ac_ext >&5
6200 cf_have_incdir=yes
6201 fi
6202 rm -f conftest.$ac_objext conftest.$ac_ext
6203                           CPPFLAGS=$cf_save_CPPFLAGS
6204                         fi
6205                   fi
6206                 fi
6207
6208                 if test "$cf_have_incdir" = no ; then
6209                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6210
6211 echo "${as_me:-configure}:6211: testing adding $cf_add_incdir to include-path ..." 1>&5
6212
6213                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6214
6215                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6216                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6217                   cf_add_incdir="$cf_top_incdir"
6218                 else
6219                   break
6220                 fi
6221           fi
6222         done
6223   done
6224 fi
6225
6226 }
6227
6228 echo "$as_me:6228: checking for $cf_ncuhdr_root header in include-path" >&5
6229 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6230 if test "${cf_cv_ncurses_h+set}" = set; then
6231   echo $ECHO_N "(cached) $ECHO_C" >&6
6232 else
6233
6234         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6235         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6236         for cf_header in $cf_header_list
6237         do
6238
6239         cat >conftest.$ac_ext <<_ACEOF
6240 #line 6240 "configure"
6241 #include "confdefs.h"
6242
6243 #include <$cf_header>
6244 int
6245 main ()
6246 {
6247
6248 #ifdef NCURSES_VERSION
6249
6250 printf("%s\n", NCURSES_VERSION);
6251 #else
6252 #ifdef __NCURSES_H
6253 printf("old\n");
6254 #else
6255         make an error
6256 #endif
6257 #endif
6258
6259   ;
6260   return 0;
6261 }
6262 _ACEOF
6263 rm -f conftest.$ac_objext
6264 if { (eval echo "$as_me:6264: \"$ac_compile\"") >&5
6265   (eval $ac_compile) 2>&5
6266   ac_status=$?
6267   echo "$as_me:6267: \$? = $ac_status" >&5
6268   (exit $ac_status); } &&
6269          { ac_try='test -s conftest.$ac_objext'
6270   { (eval echo "$as_me:6270: \"$ac_try\"") >&5
6271   (eval $ac_try) 2>&5
6272   ac_status=$?
6273   echo "$as_me:6273: \$? = $ac_status" >&5
6274   (exit $ac_status); }; }; then
6275   cf_cv_ncurses_h=$cf_header
6276
6277 else
6278   echo "$as_me: failed program was:" >&5
6279 cat conftest.$ac_ext >&5
6280 cf_cv_ncurses_h=no
6281 fi
6282 rm -f conftest.$ac_objext conftest.$ac_ext
6283
6284                 test "$cf_cv_ncurses_h" != no && break
6285         done
6286
6287 fi
6288 echo "$as_me:6288: result: $cf_cv_ncurses_h" >&5
6289 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6290
6291 if test "$cf_cv_ncurses_h" != no ; then
6292         cf_cv_ncurses_header=$cf_cv_ncurses_h
6293 else
6294
6295 echo "$as_me:6295: checking for $cf_ncuhdr_root include-path" >&5
6296 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6297 if test "${cf_cv_ncurses_h2+set}" = set; then
6298   echo $ECHO_N "(cached) $ECHO_C" >&6
6299 else
6300
6301         test -n "$verbose" && echo
6302
6303 cf_search=
6304
6305 # collect the current set of include-directories from compiler flags
6306 cf_header_path_list=""
6307 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6308         for cf_header_path in $CPPFLAGS $CFLAGS
6309         do
6310                 case $cf_header_path in #(vi
6311                 -I*)
6312                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6313
6314 test "$cf_header_path" != "NONE" && \
6315 test -d "$cf_header_path" && \
6316  {
6317         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6318         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6319         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6320         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6321         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6322         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"
6323 }
6324
6325                         cf_header_path_list="$cf_header_path_list $cf_search"
6326                         ;;
6327                 esac
6328         done
6329 fi
6330
6331 # add the variations for the package we are looking for
6332
6333 cf_search=
6334
6335 test "/usr" != "$prefix" && \
6336 test -d "/usr" && \
6337 (test $prefix = NONE || test "/usr" != "$prefix") && {
6338         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6339         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6340         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6341         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6342         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6343         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6344 }
6345
6346 test "$prefix" != "NONE" && \
6347 test -d "$prefix" && \
6348  {
6349         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6350         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6351         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6352         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6353         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6354         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6355 }
6356
6357 test "/usr/local" != "$prefix" && \
6358 test -d "/usr/local" && \
6359 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6360         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6361         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6362         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6363         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6364         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6365         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6366 }
6367
6368 test "/opt" != "$prefix" && \
6369 test -d "/opt" && \
6370 (test $prefix = NONE || test "/opt" != "$prefix") && {
6371         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6372         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6373         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6374         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6375         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6376         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6377 }
6378
6379 test "$HOME" != "$prefix" && \
6380 test -d "$HOME" && \
6381 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6382         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6383         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6384         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6385         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6386         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6387         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6388 }
6389
6390 test "$includedir" != NONE && \
6391 test "$includedir" != "/usr/include" && \
6392 test -d "$includedir" && {
6393         test -d $includedir &&    cf_search="$cf_search $includedir"
6394         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6395 }
6396
6397 test "$oldincludedir" != NONE && \
6398 test "$oldincludedir" != "/usr/include" && \
6399 test -d "$oldincludedir" && {
6400         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6401         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6402 }
6403
6404 cf_search="$cf_search $cf_header_path_list"
6405
6406         test -n "$verbose" && echo search path $cf_search
6407         cf_save2_CPPFLAGS="$CPPFLAGS"
6408         for cf_incdir in $cf_search
6409         do
6410
6411 if test -n "$cf_incdir" ; then
6412   for cf_add_incdir in $cf_incdir
6413   do
6414         while test $cf_add_incdir != /usr/include
6415         do
6416           if test -d $cf_add_incdir
6417           then
6418                 cf_have_incdir=no
6419                 if test -n "$CFLAGS$CPPFLAGS" ; then
6420                   # a loop is needed to ensure we can add subdirs of existing dirs
6421                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6422                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6423                           cf_have_incdir=yes; break
6424                         fi
6425                   done
6426                 fi
6427
6428                 if test "$cf_have_incdir" = no ; then
6429                   if test "$cf_add_incdir" = /usr/local/include ; then
6430                         if test "$GCC" = yes
6431                         then
6432                           cf_save_CPPFLAGS=$CPPFLAGS
6433                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6434                           cat >conftest.$ac_ext <<_ACEOF
6435 #line 6435 "configure"
6436 #include "confdefs.h"
6437 #include <stdio.h>
6438 int
6439 main ()
6440 {
6441 printf("Hello")
6442   ;
6443   return 0;
6444 }
6445 _ACEOF
6446 rm -f conftest.$ac_objext
6447 if { (eval echo "$as_me:6447: \"$ac_compile\"") >&5
6448   (eval $ac_compile) 2>&5
6449   ac_status=$?
6450   echo "$as_me:6450: \$? = $ac_status" >&5
6451   (exit $ac_status); } &&
6452          { ac_try='test -s conftest.$ac_objext'
6453   { (eval echo "$as_me:6453: \"$ac_try\"") >&5
6454   (eval $ac_try) 2>&5
6455   ac_status=$?
6456   echo "$as_me:6456: \$? = $ac_status" >&5
6457   (exit $ac_status); }; }; then
6458   :
6459 else
6460   echo "$as_me: failed program was:" >&5
6461 cat conftest.$ac_ext >&5
6462 cf_have_incdir=yes
6463 fi
6464 rm -f conftest.$ac_objext conftest.$ac_ext
6465                           CPPFLAGS=$cf_save_CPPFLAGS
6466                         fi
6467                   fi
6468                 fi
6469
6470                 if test "$cf_have_incdir" = no ; then
6471                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6472
6473 echo "${as_me:-configure}:6473: testing adding $cf_add_incdir to include-path ..." 1>&5
6474
6475                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6476
6477                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6478                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6479                   cf_add_incdir="$cf_top_incdir"
6480                 else
6481                   break
6482                 fi
6483           fi
6484         done
6485   done
6486 fi
6487
6488                 for cf_header in \
6489                         ncurses.h \
6490                         curses.h
6491                 do
6492
6493         cat >conftest.$ac_ext <<_ACEOF
6494 #line 6494 "configure"
6495 #include "confdefs.h"
6496
6497 #include <$cf_header>
6498 int
6499 main ()
6500 {
6501
6502 #ifdef NCURSES_VERSION
6503
6504 printf("%s\n", NCURSES_VERSION);
6505 #else
6506 #ifdef __NCURSES_H
6507 printf("old\n");
6508 #else
6509         make an error
6510 #endif
6511 #endif
6512
6513   ;
6514   return 0;
6515 }
6516 _ACEOF
6517 rm -f conftest.$ac_objext
6518 if { (eval echo "$as_me:6518: \"$ac_compile\"") >&5
6519   (eval $ac_compile) 2>&5
6520   ac_status=$?
6521   echo "$as_me:6521: \$? = $ac_status" >&5
6522   (exit $ac_status); } &&
6523          { ac_try='test -s conftest.$ac_objext'
6524   { (eval echo "$as_me:6524: \"$ac_try\"") >&5
6525   (eval $ac_try) 2>&5
6526   ac_status=$?
6527   echo "$as_me:6527: \$? = $ac_status" >&5
6528   (exit $ac_status); }; }; then
6529   cf_cv_ncurses_h2=$cf_header
6530
6531 else
6532   echo "$as_me: failed program was:" >&5
6533 cat conftest.$ac_ext >&5
6534 cf_cv_ncurses_h2=no
6535 fi
6536 rm -f conftest.$ac_objext conftest.$ac_ext
6537
6538                         if test "$cf_cv_ncurses_h2" != no ; then
6539                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6540                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6541                                 break
6542                         fi
6543                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6544                 done
6545                 CPPFLAGS="$cf_save2_CPPFLAGS"
6546                 test "$cf_cv_ncurses_h2" != no && break
6547         done
6548         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6548: error: not found" >&5
6549 echo "$as_me: error: not found" >&2;}
6550    { (exit 1); exit 1; }; }
6551
6552 fi
6553 echo "$as_me:6553: result: $cf_cv_ncurses_h2" >&5
6554 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6555
6556         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6557         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6558         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6559                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6560         fi
6561
6562 if test -n "$cf_1st_incdir" ; then
6563   for cf_add_incdir in $cf_1st_incdir
6564   do
6565         while test $cf_add_incdir != /usr/include
6566         do
6567           if test -d $cf_add_incdir
6568           then
6569                 cf_have_incdir=no
6570                 if test -n "$CFLAGS$CPPFLAGS" ; then
6571                   # a loop is needed to ensure we can add subdirs of existing dirs
6572                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6573                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6574                           cf_have_incdir=yes; break
6575                         fi
6576                   done
6577                 fi
6578
6579                 if test "$cf_have_incdir" = no ; then
6580                   if test "$cf_add_incdir" = /usr/local/include ; then
6581                         if test "$GCC" = yes
6582                         then
6583                           cf_save_CPPFLAGS=$CPPFLAGS
6584                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6585                           cat >conftest.$ac_ext <<_ACEOF
6586 #line 6586 "configure"
6587 #include "confdefs.h"
6588 #include <stdio.h>
6589 int
6590 main ()
6591 {
6592 printf("Hello")
6593   ;
6594   return 0;
6595 }
6596 _ACEOF
6597 rm -f conftest.$ac_objext
6598 if { (eval echo "$as_me:6598: \"$ac_compile\"") >&5
6599   (eval $ac_compile) 2>&5
6600   ac_status=$?
6601   echo "$as_me:6601: \$? = $ac_status" >&5
6602   (exit $ac_status); } &&
6603          { ac_try='test -s conftest.$ac_objext'
6604   { (eval echo "$as_me:6604: \"$ac_try\"") >&5
6605   (eval $ac_try) 2>&5
6606   ac_status=$?
6607   echo "$as_me:6607: \$? = $ac_status" >&5
6608   (exit $ac_status); }; }; then
6609   :
6610 else
6611   echo "$as_me: failed program was:" >&5
6612 cat conftest.$ac_ext >&5
6613 cf_have_incdir=yes
6614 fi
6615 rm -f conftest.$ac_objext conftest.$ac_ext
6616                           CPPFLAGS=$cf_save_CPPFLAGS
6617                         fi
6618                   fi
6619                 fi
6620
6621                 if test "$cf_have_incdir" = no ; then
6622                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6623
6624 echo "${as_me:-configure}:6624: testing adding $cf_add_incdir to include-path ..." 1>&5
6625
6626                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6627
6628                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6629                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6630                   cf_add_incdir="$cf_top_incdir"
6631                 else
6632                   break
6633                 fi
6634           fi
6635         done
6636   done
6637 fi
6638
6639 fi
6640
6641 # Set definitions to allow ifdef'ing for ncurses.h
6642
6643 case $cf_cv_ncurses_header in # (vi
6644 *ncurses.h)
6645         cat >>confdefs.h <<\EOF
6646 #define HAVE_NCURSES_H 1
6647 EOF
6648
6649         ;;
6650 esac
6651
6652 case $cf_cv_ncurses_header in # (vi
6653 ncurses/curses.h|ncurses/ncurses.h)
6654         cat >>confdefs.h <<\EOF
6655 #define HAVE_NCURSES_NCURSES_H 1
6656 EOF
6657
6658         ;;
6659 ncursesw/curses.h|ncursesw/ncurses.h)
6660         cat >>confdefs.h <<\EOF
6661 #define HAVE_NCURSESW_NCURSES_H 1
6662 EOF
6663
6664         ;;
6665 esac
6666
6667 echo "$as_me:6667: checking for terminfo header" >&5
6668 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6669 if test "${cf_cv_term_header+set}" = set; then
6670   echo $ECHO_N "(cached) $ECHO_C" >&6
6671 else
6672
6673 case ${cf_cv_ncurses_header} in #(vi
6674 */ncurses.h|*/ncursesw.h) #(vi
6675         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6676         ;;
6677 *)
6678         cf_term_header=term.h
6679         ;;
6680 esac
6681
6682 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6683 do
6684 cat >conftest.$ac_ext <<_ACEOF
6685 #line 6685 "configure"
6686 #include "confdefs.h"
6687 #include <stdio.h>
6688 #include <${cf_cv_ncurses_header:-curses.h}>
6689 #include <$cf_test>
6690
6691 int
6692 main ()
6693 {
6694 int x = auto_left_margin
6695   ;
6696   return 0;
6697 }
6698 _ACEOF
6699 rm -f conftest.$ac_objext
6700 if { (eval echo "$as_me:6700: \"$ac_compile\"") >&5
6701   (eval $ac_compile) 2>&5
6702   ac_status=$?
6703   echo "$as_me:6703: \$? = $ac_status" >&5
6704   (exit $ac_status); } &&
6705          { ac_try='test -s conftest.$ac_objext'
6706   { (eval echo "$as_me:6706: \"$ac_try\"") >&5
6707   (eval $ac_try) 2>&5
6708   ac_status=$?
6709   echo "$as_me:6709: \$? = $ac_status" >&5
6710   (exit $ac_status); }; }; then
6711
6712         cf_cv_term_header="$cf_test"
6713 else
6714   echo "$as_me: failed program was:" >&5
6715 cat conftest.$ac_ext >&5
6716
6717         cf_cv_term_header=unknown
6718
6719 fi
6720 rm -f conftest.$ac_objext conftest.$ac_ext
6721         test "$cf_cv_term_header" != unknown && break
6722 done
6723
6724 fi
6725 echo "$as_me:6725: result: $cf_cv_term_header" >&5
6726 echo "${ECHO_T}$cf_cv_term_header" >&6
6727
6728 # Set definitions to allow ifdef'ing to accommodate subdirectories
6729
6730 case $cf_cv_term_header in # (vi
6731 *term.h)
6732         cat >>confdefs.h <<\EOF
6733 #define HAVE_TERM_H 1
6734 EOF
6735
6736         ;;
6737 esac
6738
6739 case $cf_cv_term_header in # (vi
6740 ncurses/term.h) #(vi
6741         cat >>confdefs.h <<\EOF
6742 #define HAVE_NCURSES_TERM_H 1
6743 EOF
6744
6745         ;;
6746 ncursesw/term.h)
6747         cat >>confdefs.h <<\EOF
6748 #define HAVE_NCURSESW_TERM_H 1
6749 EOF
6750
6751         ;;
6752 esac
6753
6754 # some applications need this, but should check for NCURSES_VERSION
6755 cat >>confdefs.h <<\EOF
6756 #define NCURSES 1
6757 EOF
6758
6759 echo "$as_me:6759: checking for ncurses version" >&5
6760 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6761 if test "${cf_cv_ncurses_version+set}" = set; then
6762   echo $ECHO_N "(cached) $ECHO_C" >&6
6763 else
6764
6765         cf_cv_ncurses_version=no
6766         cf_tempfile=out$$
6767         rm -f $cf_tempfile
6768         if test "$cross_compiling" = yes; then
6769
6770         # This will not work if the preprocessor splits the line after the
6771         # Autoconf token.  The 'unproto' program does that.
6772         cat > conftest.$ac_ext <<EOF
6773 #include <${cf_cv_ncurses_header:-curses.h}>
6774 #undef Autoconf
6775 #ifdef NCURSES_VERSION
6776 Autoconf NCURSES_VERSION
6777 #else
6778 #ifdef __NCURSES_H
6779 Autoconf "old"
6780 #endif
6781 ;
6782 #endif
6783 EOF
6784         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6785         { (eval echo "$as_me:6785: \"$cf_try\"") >&5
6786   (eval $cf_try) 2>&5
6787   ac_status=$?
6788   echo "$as_me:6788: \$? = $ac_status" >&5
6789   (exit $ac_status); }
6790         if test -f conftest.out ; then
6791                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6792                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6793                 rm -f conftest.out
6794         fi
6795
6796 else
6797   cat >conftest.$ac_ext <<_ACEOF
6798 #line 6798 "configure"
6799 #include "confdefs.h"
6800
6801 #include <${cf_cv_ncurses_header:-curses.h}>
6802 #include <stdio.h>
6803 int main()
6804 {
6805         FILE *fp = fopen("$cf_tempfile", "w");
6806 #ifdef NCURSES_VERSION
6807 # ifdef NCURSES_VERSION_PATCH
6808         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6809 # else
6810         fprintf(fp, "%s\n", NCURSES_VERSION);
6811 # endif
6812 #else
6813 # ifdef __NCURSES_H
6814         fprintf(fp, "old\n");
6815 # else
6816         make an error
6817 # endif
6818 #endif
6819         ${cf_cv_main_return:-return}(0);
6820 }
6821 _ACEOF
6822 rm -f conftest$ac_exeext
6823 if { (eval echo "$as_me:6823: \"$ac_link\"") >&5
6824   (eval $ac_link) 2>&5
6825   ac_status=$?
6826   echo "$as_me:6826: \$? = $ac_status" >&5
6827   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6828   { (eval echo "$as_me:6828: \"$ac_try\"") >&5
6829   (eval $ac_try) 2>&5
6830   ac_status=$?
6831   echo "$as_me:6831: \$? = $ac_status" >&5
6832   (exit $ac_status); }; }; then
6833
6834         cf_cv_ncurses_version=`cat $cf_tempfile`
6835 else
6836   echo "$as_me: program exited with status $ac_status" >&5
6837 echo "$as_me: failed program was:" >&5
6838 cat conftest.$ac_ext >&5
6839 fi
6840 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6841 fi
6842         rm -f $cf_tempfile
6843
6844 fi
6845 echo "$as_me:6845: result: $cf_cv_ncurses_version" >&5
6846 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6847 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6848 #define NCURSES 1
6849 EOF
6850
6851 cf_nculib_root=ncurses
6852         # This works, except for the special case where we find gpm, but
6853         # ncurses is in a nonstandard location via $LIBS, and we really want
6854         # to link gpm.
6855 cf_ncurses_LIBS=""
6856 cf_ncurses_SAVE="$LIBS"
6857 echo "$as_me:6857: checking for Gpm_Open in -lgpm" >&5
6858 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6859 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6860   echo $ECHO_N "(cached) $ECHO_C" >&6
6861 else
6862   ac_check_lib_save_LIBS=$LIBS
6863 LIBS="-lgpm  $LIBS"
6864 cat >conftest.$ac_ext <<_ACEOF
6865 #line 6865 "configure"
6866 #include "confdefs.h"
6867
6868 /* Override any gcc2 internal prototype to avoid an error.  */
6869 #ifdef __cplusplus
6870 extern "C"
6871 #endif
6872 /* We use char because int might match the return type of a gcc2
6873    builtin and then its argument prototype would still apply.  */
6874 char Gpm_Open ();
6875 int
6876 main ()
6877 {
6878 Gpm_Open ();
6879   ;
6880   return 0;
6881 }
6882 _ACEOF
6883 rm -f conftest.$ac_objext conftest$ac_exeext
6884 if { (eval echo "$as_me:6884: \"$ac_link\"") >&5
6885   (eval $ac_link) 2>&5
6886   ac_status=$?
6887   echo "$as_me:6887: \$? = $ac_status" >&5
6888   (exit $ac_status); } &&
6889          { ac_try='test -s conftest$ac_exeext'
6890   { (eval echo "$as_me:6890: \"$ac_try\"") >&5
6891   (eval $ac_try) 2>&5
6892   ac_status=$?
6893   echo "$as_me:6893: \$? = $ac_status" >&5
6894   (exit $ac_status); }; }; then
6895   ac_cv_lib_gpm_Gpm_Open=yes
6896 else
6897   echo "$as_me: failed program was:" >&5
6898 cat conftest.$ac_ext >&5
6899 ac_cv_lib_gpm_Gpm_Open=no
6900 fi
6901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6902 LIBS=$ac_check_lib_save_LIBS
6903 fi
6904 echo "$as_me:6904: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6905 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6906 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6907   echo "$as_me:6907: checking for initscr in -lgpm" >&5
6908 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6909 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6910   echo $ECHO_N "(cached) $ECHO_C" >&6
6911 else
6912   ac_check_lib_save_LIBS=$LIBS
6913 LIBS="-lgpm  $LIBS"
6914 cat >conftest.$ac_ext <<_ACEOF
6915 #line 6915 "configure"
6916 #include "confdefs.h"
6917
6918 /* Override any gcc2 internal prototype to avoid an error.  */
6919 #ifdef __cplusplus
6920 extern "C"
6921 #endif
6922 /* We use char because int might match the return type of a gcc2
6923    builtin and then its argument prototype would still apply.  */
6924 char initscr ();
6925 int
6926 main ()
6927 {
6928 initscr ();
6929   ;
6930   return 0;
6931 }
6932 _ACEOF
6933 rm -f conftest.$ac_objext conftest$ac_exeext
6934 if { (eval echo "$as_me:6934: \"$ac_link\"") >&5
6935   (eval $ac_link) 2>&5
6936   ac_status=$?
6937   echo "$as_me:6937: \$? = $ac_status" >&5
6938   (exit $ac_status); } &&
6939          { ac_try='test -s conftest$ac_exeext'
6940   { (eval echo "$as_me:6940: \"$ac_try\"") >&5
6941   (eval $ac_try) 2>&5
6942   ac_status=$?
6943   echo "$as_me:6943: \$? = $ac_status" >&5
6944   (exit $ac_status); }; }; then
6945   ac_cv_lib_gpm_initscr=yes
6946 else
6947   echo "$as_me: failed program was:" >&5
6948 cat conftest.$ac_ext >&5
6949 ac_cv_lib_gpm_initscr=no
6950 fi
6951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6952 LIBS=$ac_check_lib_save_LIBS
6953 fi
6954 echo "$as_me:6954: result: $ac_cv_lib_gpm_initscr" >&5
6955 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6956 if test $ac_cv_lib_gpm_initscr = yes; then
6957   LIBS="$cf_ncurses_SAVE"
6958 else
6959   cf_ncurses_LIBS="-lgpm"
6960 fi
6961
6962 fi
6963
6964 case $host_os in #(vi
6965 freebsd*)
6966         # This is only necessary if you are linking against an obsolete
6967         # version of ncurses (but it should do no harm, since it's static).
6968         if test "$cf_nculib_root" = ncurses ; then
6969                 echo "$as_me:6969: checking for tgoto in -lmytinfo" >&5
6970 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6971 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6972   echo $ECHO_N "(cached) $ECHO_C" >&6
6973 else
6974   ac_check_lib_save_LIBS=$LIBS
6975 LIBS="-lmytinfo  $LIBS"
6976 cat >conftest.$ac_ext <<_ACEOF
6977 #line 6977 "configure"
6978 #include "confdefs.h"
6979
6980 /* Override any gcc2 internal prototype to avoid an error.  */
6981 #ifdef __cplusplus
6982 extern "C"
6983 #endif
6984 /* We use char because int might match the return type of a gcc2
6985    builtin and then its argument prototype would still apply.  */
6986 char tgoto ();
6987 int
6988 main ()
6989 {
6990 tgoto ();
6991   ;
6992   return 0;
6993 }
6994 _ACEOF
6995 rm -f conftest.$ac_objext conftest$ac_exeext
6996 if { (eval echo "$as_me:6996: \"$ac_link\"") >&5
6997   (eval $ac_link) 2>&5
6998   ac_status=$?
6999   echo "$as_me:6999: \$? = $ac_status" >&5
7000   (exit $ac_status); } &&
7001          { ac_try='test -s conftest$ac_exeext'
7002   { (eval echo "$as_me:7002: \"$ac_try\"") >&5
7003   (eval $ac_try) 2>&5
7004   ac_status=$?
7005   echo "$as_me:7005: \$? = $ac_status" >&5
7006   (exit $ac_status); }; }; then
7007   ac_cv_lib_mytinfo_tgoto=yes
7008 else
7009   echo "$as_me: failed program was:" >&5
7010 cat conftest.$ac_ext >&5
7011 ac_cv_lib_mytinfo_tgoto=no
7012 fi
7013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7014 LIBS=$ac_check_lib_save_LIBS
7015 fi
7016 echo "$as_me:7016: result: $ac_cv_lib_mytinfo_tgoto" >&5
7017 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7018 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7019   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7020 fi
7021
7022         fi
7023         ;;
7024 esac
7025
7026 LIBS="$cf_ncurses_LIBS $LIBS"
7027
7028 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7029 then
7030         LIBS="-l$cf_nculib_root $LIBS"
7031 else
7032
7033         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7034         cf_libdir=""
7035         echo "$as_me:7035: checking for initscr" >&5
7036 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7037 if test "${ac_cv_func_initscr+set}" = set; then
7038   echo $ECHO_N "(cached) $ECHO_C" >&6
7039 else
7040   cat >conftest.$ac_ext <<_ACEOF
7041 #line 7041 "configure"
7042 #include "confdefs.h"
7043 /* System header to define __stub macros and hopefully few prototypes,
7044     which can conflict with char initscr (); below.  */
7045 #include <assert.h>
7046 /* Override any gcc2 internal prototype to avoid an error.  */
7047 #ifdef __cplusplus
7048 extern "C"
7049 #endif
7050 /* We use char because int might match the return type of a gcc2
7051    builtin and then its argument prototype would still apply.  */
7052 char initscr ();
7053 char (*f) ();
7054
7055 int
7056 main ()
7057 {
7058 /* The GNU C library defines this for functions which it implements
7059     to always fail with ENOSYS.  Some functions are actually named
7060     something starting with __ and the normal name is an alias.  */
7061 #if defined (__stub_initscr) || defined (__stub___initscr)
7062 choke me
7063 #else
7064 f = initscr;
7065 #endif
7066
7067   ;
7068   return 0;
7069 }
7070 _ACEOF
7071 rm -f conftest.$ac_objext conftest$ac_exeext
7072 if { (eval echo "$as_me:7072: \"$ac_link\"") >&5
7073   (eval $ac_link) 2>&5
7074   ac_status=$?
7075   echo "$as_me:7075: \$? = $ac_status" >&5
7076   (exit $ac_status); } &&
7077          { ac_try='test -s conftest$ac_exeext'
7078   { (eval echo "$as_me:7078: \"$ac_try\"") >&5
7079   (eval $ac_try) 2>&5
7080   ac_status=$?
7081   echo "$as_me:7081: \$? = $ac_status" >&5
7082   (exit $ac_status); }; }; then
7083   ac_cv_func_initscr=yes
7084 else
7085   echo "$as_me: failed program was:" >&5
7086 cat conftest.$ac_ext >&5
7087 ac_cv_func_initscr=no
7088 fi
7089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7090 fi
7091 echo "$as_me:7091: result: $ac_cv_func_initscr" >&5
7092 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7093 if test $ac_cv_func_initscr = yes; then
7094   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7095 else
7096
7097                 cf_save_LIBS="$LIBS"
7098                 echo "$as_me:7098: checking for initscr in -l$cf_nculib_root" >&5
7099 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7100                 LIBS="-l$cf_nculib_root $LIBS"
7101                 cat >conftest.$ac_ext <<_ACEOF
7102 #line 7102 "configure"
7103 #include "confdefs.h"
7104 #include <${cf_cv_ncurses_header:-curses.h}>
7105 int
7106 main ()
7107 {
7108 initscr()
7109   ;
7110   return 0;
7111 }
7112 _ACEOF
7113 rm -f conftest.$ac_objext conftest$ac_exeext
7114 if { (eval echo "$as_me:7114: \"$ac_link\"") >&5
7115   (eval $ac_link) 2>&5
7116   ac_status=$?
7117   echo "$as_me:7117: \$? = $ac_status" >&5
7118   (exit $ac_status); } &&
7119          { ac_try='test -s conftest$ac_exeext'
7120   { (eval echo "$as_me:7120: \"$ac_try\"") >&5
7121   (eval $ac_try) 2>&5
7122   ac_status=$?
7123   echo "$as_me:7123: \$? = $ac_status" >&5
7124   (exit $ac_status); }; }; then
7125   echo "$as_me:7125: result: yes" >&5
7126 echo "${ECHO_T}yes" >&6
7127                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7128
7129 else
7130   echo "$as_me: failed program was:" >&5
7131 cat conftest.$ac_ext >&5
7132 echo "$as_me:7132: result: no" >&5
7133 echo "${ECHO_T}no" >&6
7134
7135 cf_search=
7136 cf_library_path_list=""
7137 if test -n "${LDFLAGS}${LIBS}" ; then
7138         for cf_library_path in $LDFLAGS $LIBS
7139         do
7140                 case $cf_library_path in #(vi
7141                 -L*)
7142                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7143
7144 test "$cf_library_path" != "NONE" && \
7145 test -d "$cf_library_path" && \
7146  {
7147         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7148         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7149         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7150         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7151         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7152         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"
7153 }
7154
7155                         cf_library_path_list="$cf_library_path_list $cf_search"
7156                         ;;
7157                 esac
7158         done
7159 fi
7160
7161 cf_search=
7162
7163 test "/usr" != "$prefix" && \
7164 test -d "/usr" && \
7165 (test $prefix = NONE || test "/usr" != "$prefix") && {
7166         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7167         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7168         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7169         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7170         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7171         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7172 }
7173
7174 test "$prefix" != "NONE" && \
7175 test -d "$prefix" && \
7176  {
7177         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7178         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7179         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7180         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7181         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7182         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7183 }
7184
7185 test "/usr/local" != "$prefix" && \
7186 test -d "/usr/local" && \
7187 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7188         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7189         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7190         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7191         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7192         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7193         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7194 }
7195
7196 test "/opt" != "$prefix" && \
7197 test -d "/opt" && \
7198 (test $prefix = NONE || test "/opt" != "$prefix") && {
7199         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7200         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7201         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7202         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7203         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7204         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7205 }
7206
7207 test "$HOME" != "$prefix" && \
7208 test -d "$HOME" && \
7209 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7210         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7211         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7212         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7213         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7214         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7215         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7216 }
7217
7218 cf_search="$cf_library_path_list $cf_search"
7219
7220                         for cf_libdir in $cf_search
7221                         do
7222                                 echo "$as_me:7222: checking for -l$cf_nculib_root in $cf_libdir" >&5
7223 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7224                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7225                                 cat >conftest.$ac_ext <<_ACEOF
7226 #line 7226 "configure"
7227 #include "confdefs.h"
7228 #include <${cf_cv_ncurses_header:-curses.h}>
7229 int
7230 main ()
7231 {
7232 initscr()
7233   ;
7234   return 0;
7235 }
7236 _ACEOF
7237 rm -f conftest.$ac_objext conftest$ac_exeext
7238 if { (eval echo "$as_me:7238: \"$ac_link\"") >&5
7239   (eval $ac_link) 2>&5
7240   ac_status=$?
7241   echo "$as_me:7241: \$? = $ac_status" >&5
7242   (exit $ac_status); } &&
7243          { ac_try='test -s conftest$ac_exeext'
7244   { (eval echo "$as_me:7244: \"$ac_try\"") >&5
7245   (eval $ac_try) 2>&5
7246   ac_status=$?
7247   echo "$as_me:7247: \$? = $ac_status" >&5
7248   (exit $ac_status); }; }; then
7249   echo "$as_me:7249: result: yes" >&5
7250 echo "${ECHO_T}yes" >&6
7251                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7252                                          break
7253 else
7254   echo "$as_me: failed program was:" >&5
7255 cat conftest.$ac_ext >&5
7256 echo "$as_me:7256: result: no" >&5
7257 echo "${ECHO_T}no" >&6
7258                                          LIBS="$cf_save_LIBS"
7259 fi
7260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7261                         done
7262
7263 fi
7264 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7265
7266 fi
7267
7268 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7269
7270 if test $cf_found_library = no ; then
7271         { { echo "$as_me:7271: error: Cannot link $cf_nculib_root library" >&5
7272 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7273    { (exit 1); exit 1; }; }
7274 fi
7275
7276 fi
7277
7278 if test -n "$cf_ncurses_LIBS" ; then
7279         echo "$as_me:7279: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7280 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7281         cf_ncurses_SAVE="$LIBS"
7282         for p in $cf_ncurses_LIBS ; do
7283                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7284                 if test "$q" != "$LIBS" ; then
7285                         LIBS="$q"
7286                 fi
7287         done
7288         cat >conftest.$ac_ext <<_ACEOF
7289 #line 7289 "configure"
7290 #include "confdefs.h"
7291 #include <${cf_cv_ncurses_header:-curses.h}>
7292 int
7293 main ()
7294 {
7295 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7296   ;
7297   return 0;
7298 }
7299 _ACEOF
7300 rm -f conftest.$ac_objext conftest$ac_exeext
7301 if { (eval echo "$as_me:7301: \"$ac_link\"") >&5
7302   (eval $ac_link) 2>&5
7303   ac_status=$?
7304   echo "$as_me:7304: \$? = $ac_status" >&5
7305   (exit $ac_status); } &&
7306          { ac_try='test -s conftest$ac_exeext'
7307   { (eval echo "$as_me:7307: \"$ac_try\"") >&5
7308   (eval $ac_try) 2>&5
7309   ac_status=$?
7310   echo "$as_me:7310: \$? = $ac_status" >&5
7311   (exit $ac_status); }; }; then
7312   echo "$as_me:7312: result: yes" >&5
7313 echo "${ECHO_T}yes" >&6
7314 else
7315   echo "$as_me: failed program was:" >&5
7316 cat conftest.$ac_ext >&5
7317 echo "$as_me:7317: result: no" >&5
7318 echo "${ECHO_T}no" >&6
7319                  LIBS="$cf_ncurses_SAVE"
7320 fi
7321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7322 fi
7323
7324 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7325
7326 cat >>confdefs.h <<EOF
7327 #define $cf_nculib_ROOT 1
7328 EOF
7329
7330 fi
7331
7332 fi
7333
7334 if test "$NCURSES_CONFIG" != none ; then
7335
7336 cf_version=`$NCURSES_CONFIG --version`
7337
7338 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7339 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7340 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7341
7342 # ABI version is not available from headers
7343 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7344
7345 else
7346
7347 for cf_name in MAJOR MINOR PATCH
7348 do
7349 cat >conftest.$ac_ext <<CF_EOF
7350 #include <${cf_cv_ncurses_header:-curses.h}>
7351 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7352 CF_EOF
7353         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7354         { (eval echo "$as_me:7354: \"$cf_try\"") >&5
7355   (eval $cf_try) 2>&5
7356   ac_status=$?
7357   echo "$as_me:7357: \$? = $ac_status" >&5
7358   (exit $ac_status); }
7359         if test -f conftest.out ; then
7360                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7361                 eval NCURSES_$cf_name=\"$cf_result\"
7362                 # cat conftest.$ac_ext
7363                 # cat conftest.out
7364         fi
7365 done
7366
7367 cf_cv_abi_version=${NCURSES_MAJOR}
7368
7369 fi
7370
7371 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7372
7373 cf_cv_timestamp=`date`
7374
7375 echo "$as_me:7375: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7376 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7377
7378         case $cf_cv_system_name in #(vi
7379         OS/2*|os2*) #(vi
7380         LIB_PREFIX=''
7381         ;;
7382         *)      LIB_PREFIX='lib'
7383         ;;
7384         esac
7385 cf_prefix=$LIB_PREFIX
7386
7387 LIB_PREFIX=$cf_prefix
7388
7389 LIB_SUFFIX=
7390
7391 ###############################################################################
7392
7393 if test X"$CC_G_OPT" = X"" ; then
7394         CC_G_OPT='-g'
7395         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7396 fi
7397
7398 echo "$as_me:7398: checking for default loader flags" >&5
7399 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7400 case $DFT_LWR_MODEL in
7401 normal)  LD_MODEL=''   ;;
7402 debug)   LD_MODEL=$CC_G_OPT ;;
7403 profile) LD_MODEL='-pg';;
7404 shared)  LD_MODEL=''   ;;
7405 esac
7406 echo "$as_me:7406: result: $LD_MODEL" >&5
7407 echo "${ECHO_T}$LD_MODEL" >&6
7408
7409 LD_RPATH_OPT=
7410 echo "$as_me:7410: checking for an rpath option" >&5
7411 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7412 case $cf_cv_system_name in #(vi
7413 irix*) #(vi
7414         if test "$GCC" = yes; then
7415                 LD_RPATH_OPT="-Wl,-rpath,"
7416         else
7417                 LD_RPATH_OPT="-rpath "
7418         fi
7419         ;;
7420 linux*|gnu*|k*bsd*-gnu) #(vi
7421         LD_RPATH_OPT="-Wl,-rpath,"
7422         ;;
7423 openbsd[2-9].*|mirbsd*) #(vi
7424         LD_RPATH_OPT="-Wl,-rpath,"
7425         ;;
7426 freebsd*) #(vi
7427         LD_RPATH_OPT="-rpath "
7428         ;;
7429 netbsd*) #(vi
7430         LD_RPATH_OPT="-Wl,-rpath,"
7431         ;;
7432 osf*|mls+*) #(vi
7433         LD_RPATH_OPT="-rpath "
7434         ;;
7435 solaris2*) #(vi
7436         LD_RPATH_OPT="-R"
7437         ;;
7438 *)
7439         ;;
7440 esac
7441 echo "$as_me:7441: result: $LD_RPATH_OPT" >&5
7442 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7443
7444 case "x$LD_RPATH_OPT" in #(vi
7445 x-R*)
7446         echo "$as_me:7446: checking if we need a space after rpath option" >&5
7447 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7448         cf_save_LIBS="$LIBS"
7449         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7450         cat >conftest.$ac_ext <<_ACEOF
7451 #line 7451 "configure"
7452 #include "confdefs.h"
7453
7454 int
7455 main ()
7456 {
7457
7458   ;
7459   return 0;
7460 }
7461 _ACEOF
7462 rm -f conftest.$ac_objext conftest$ac_exeext
7463 if { (eval echo "$as_me:7463: \"$ac_link\"") >&5
7464   (eval $ac_link) 2>&5
7465   ac_status=$?
7466   echo "$as_me:7466: \$? = $ac_status" >&5
7467   (exit $ac_status); } &&
7468          { ac_try='test -s conftest$ac_exeext'
7469   { (eval echo "$as_me:7469: \"$ac_try\"") >&5
7470   (eval $ac_try) 2>&5
7471   ac_status=$?
7472   echo "$as_me:7472: \$? = $ac_status" >&5
7473   (exit $ac_status); }; }; then
7474   cf_rpath_space=no
7475 else
7476   echo "$as_me: failed program was:" >&5
7477 cat conftest.$ac_ext >&5
7478 cf_rpath_space=yes
7479 fi
7480 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7481         LIBS="$cf_save_LIBS"
7482         echo "$as_me:7482: result: $cf_rpath_space" >&5
7483 echo "${ECHO_T}$cf_rpath_space" >&6
7484         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7485         ;;
7486 esac
7487
7488         LOCAL_LDFLAGS=
7489         LOCAL_LDFLAGS2=
7490         LD_SHARED_OPTS=
7491         INSTALL_LIB="-m 644"
7492
7493         cf_cv_do_symlinks=no
7494         cf_ld_rpath_opt=
7495         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7496
7497         echo "$as_me:7497: checking if release/abi version should be used for shared libs" >&5
7498 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7499
7500 # Check whether --with-shlib-version or --without-shlib-version was given.
7501 if test "${with_shlib_version+set}" = set; then
7502   withval="$with_shlib_version"
7503   test -z "$withval" && withval=auto
7504         case $withval in #(vi
7505         yes) #(vi
7506                 cf_cv_shlib_version=auto
7507                 ;;
7508         rel|abi|auto|no) #(vi
7509                 cf_cv_shlib_version=$withval
7510                 ;;
7511         *)
7512                 { { echo "$as_me:7512: error: option value must be one of: rel, abi, auto or no" >&5
7513 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7514    { (exit 1); exit 1; }; }
7515                 ;;
7516         esac
7517
7518 else
7519   cf_cv_shlib_version=auto
7520 fi;
7521         echo "$as_me:7521: result: $cf_cv_shlib_version" >&5
7522 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7523
7524         cf_cv_rm_so_locs=no
7525
7526         # Some less-capable ports of gcc support only -fpic
7527         CC_SHARED_OPTS=
7528         if test "$GCC" = yes
7529         then
7530                 echo "$as_me:7530: checking which $CC option to use" >&5
7531 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7532                 cf_save_CFLAGS="$CFLAGS"
7533                 for CC_SHARED_OPTS in -fPIC -fpic ''
7534                 do
7535                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7536                         cat >conftest.$ac_ext <<_ACEOF
7537 #line 7537 "configure"
7538 #include "confdefs.h"
7539 #include <stdio.h>
7540 int
7541 main ()
7542 {
7543 int x = 1
7544   ;
7545   return 0;
7546 }
7547 _ACEOF
7548 rm -f conftest.$ac_objext
7549 if { (eval echo "$as_me:7549: \"$ac_compile\"") >&5
7550   (eval $ac_compile) 2>&5
7551   ac_status=$?
7552   echo "$as_me:7552: \$? = $ac_status" >&5
7553   (exit $ac_status); } &&
7554          { ac_try='test -s conftest.$ac_objext'
7555   { (eval echo "$as_me:7555: \"$ac_try\"") >&5
7556   (eval $ac_try) 2>&5
7557   ac_status=$?
7558   echo "$as_me:7558: \$? = $ac_status" >&5
7559   (exit $ac_status); }; }; then
7560   break
7561 else
7562   echo "$as_me: failed program was:" >&5
7563 cat conftest.$ac_ext >&5
7564 fi
7565 rm -f conftest.$ac_objext conftest.$ac_ext
7566                 done
7567                 echo "$as_me:7567: result: $CC_SHARED_OPTS" >&5
7568 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7569                 CFLAGS="$cf_save_CFLAGS"
7570         fi
7571
7572         cf_cv_shlib_version_infix=no
7573
7574         case $cf_cv_system_name in #(vi
7575         aix4.3-9*|aix[5-7]*) #(vi
7576                 if test "$GCC" = yes; then
7577                         CC_SHARED_OPTS=
7578                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${libdir}:/usr/lib -o $@'
7579                 else
7580                         # CC_SHARED_OPTS='-qpic=large -G'
7581                         # perhaps "-bM:SRE -bnoentry -bexpall"
7582                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${libdir}:/usr/lib -o $@'
7583                 fi
7584                 ;;
7585         beos*) #(vi
7586                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7587                 ;;
7588         cygwin*) #(vi
7589                 CC_SHARED_OPTS=
7590                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7591                 cf_cv_shlib_version=cygdll
7592                 cf_cv_shlib_version_infix=cygdll
7593                 cat >mk_shared_lib.sh <<-CF_EOF
7594                 #!/bin/sh
7595                 SHARED_LIB=\$1
7596                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7597                 shift
7598                 cat <<-EOF
7599                 Linking shared library
7600                 ** SHARED_LIB \$SHARED_LIB
7601                 ** IMPORT_LIB \$IMPORT_LIB
7602 EOF
7603                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7604 CF_EOF
7605                 chmod +x mk_shared_lib.sh
7606                 ;;
7607         darwin*) #(vi
7608                 EXTRA_CFLAGS="-no-cpp-precomp"
7609                 CC_SHARED_OPTS="-dynamic"
7610                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7611                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7612                 cf_cv_shlib_version_infix=yes
7613                 echo "$as_me:7613: checking if ld -search_paths_first works" >&5
7614 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7615 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7616   echo $ECHO_N "(cached) $ECHO_C" >&6
7617 else
7618
7619                         cf_save_LDFLAGS=$LDFLAGS
7620                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7621                         cat >conftest.$ac_ext <<_ACEOF
7622 #line 7622 "configure"
7623 #include "confdefs.h"
7624
7625 int
7626 main ()
7627 {
7628 int i;
7629   ;
7630   return 0;
7631 }
7632 _ACEOF
7633 rm -f conftest.$ac_objext conftest$ac_exeext
7634 if { (eval echo "$as_me:7634: \"$ac_link\"") >&5
7635   (eval $ac_link) 2>&5
7636   ac_status=$?
7637   echo "$as_me:7637: \$? = $ac_status" >&5
7638   (exit $ac_status); } &&
7639          { ac_try='test -s conftest$ac_exeext'
7640   { (eval echo "$as_me:7640: \"$ac_try\"") >&5
7641   (eval $ac_try) 2>&5
7642   ac_status=$?
7643   echo "$as_me:7643: \$? = $ac_status" >&5
7644   (exit $ac_status); }; }; then
7645   cf_cv_ldflags_search_paths_first=yes
7646 else
7647   echo "$as_me: failed program was:" >&5
7648 cat conftest.$ac_ext >&5
7649 cf_cv_ldflags_search_paths_first=no
7650 fi
7651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7652                                 LDFLAGS=$cf_save_LDFLAGS
7653 fi
7654 echo "$as_me:7654: result: $cf_cv_ldflags_search_paths_first" >&5
7655 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7656                 if test $cf_cv_ldflags_search_paths_first = yes; then
7657                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7658                 fi
7659                 ;;
7660         hpux*) #(vi
7661                 # (tested with gcc 2.7.2 -- I don't have c89)
7662                 if test "$GCC" = yes; then
7663                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7664                 else
7665                         CC_SHARED_OPTS='+Z'
7666                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7667                 fi
7668                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7669                 # HP-UX shared libraries must be executable, and should be
7670                 # readonly to exploit a quirk in the memory manager.
7671                 INSTALL_LIB="-m 555"
7672                 ;;
7673         interix*)
7674                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7675                 if test "$cf_cv_shlib_version" = rel; then
7676                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
7677                 else
7678                         cf_shared_soname='`basename `'
7679                 fi
7680                 CC_SHARED_OPTS=
7681                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${libdir} -Wl,-h,'$cf_shared_soname' -o '
7682                 ;;
7683         irix*) #(vi
7684                 if test "$cf_cv_enable_rpath" = yes ; then
7685                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7686                 fi
7687                 # tested with IRIX 5.2 and 'cc'.
7688                 if test "$GCC" != yes; then
7689                         CC_SHARED_OPTS='-KPIC'
7690                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7691                 else
7692                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7693                 fi
7694                 cf_cv_rm_so_locs=yes
7695                 ;;
7696         linux*|gnu*|k*bsd*-gnu) #(vi
7697                 if test "$DFT_LWR_MODEL" = "shared" ; then
7698                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7699                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7700                 fi
7701                 if test "$cf_cv_enable_rpath" = yes ; then
7702                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7703                 fi
7704
7705         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7706         if test "$cf_cv_shlib_version" = rel; then
7707                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7708         else
7709                 cf_cv_shared_soname='`basename $@`'
7710         fi
7711
7712                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7713                 ;;
7714         openbsd[2-9].*|mirbsd*) #(vi
7715                 if test "$DFT_LWR_MODEL" = "shared" ; then
7716                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7717                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7718                 fi
7719                 if test "$cf_cv_enable_rpath" = yes ; then
7720                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7721                 fi
7722                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7723
7724         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7725         if test "$cf_cv_shlib_version" = rel; then
7726                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7727         else
7728                 cf_cv_shared_soname='`basename $@`'
7729         fi
7730
7731                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7732                 ;;
7733         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7734                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7735                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7736                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7737                 ;;
7738         freebsd*) #(vi
7739                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7740                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7741                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7742                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
7743                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7744                 fi
7745
7746         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7747         if test "$cf_cv_shlib_version" = rel; then
7748                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7749         else
7750                 cf_cv_shared_soname='`basename $@`'
7751         fi
7752
7753                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7754                 ;;
7755         netbsd*) #(vi
7756                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7757                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7758                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7759                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7760                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7761                         if test "$cf_cv_shlib_version" = auto; then
7762                         if test -f /usr/libexec/ld.elf_so; then
7763                                 cf_cv_shlib_version=abi
7764                         else
7765                                 cf_cv_shlib_version=rel
7766                         fi
7767                         fi
7768
7769         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7770         if test "$cf_cv_shlib_version" = rel; then
7771                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7772         else
7773                 cf_cv_shared_soname='`basename $@`'
7774         fi
7775
7776                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7777                 else
7778                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7779                 fi
7780                 ;;
7781         osf*|mls+*) #(vi
7782                 # tested with OSF/1 V3.2 and 'cc'
7783                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7784                 # link with shared libs).
7785                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7786                 case $host_os in #(vi
7787                 osf4*)
7788                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7789                         ;;
7790                 esac
7791                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7792                 if test "$DFT_LWR_MODEL" = "shared" ; then
7793                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7794                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7795                 fi
7796                 cf_cv_rm_so_locs=yes
7797                 ;;
7798         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7799                 # tested with osr5.0.5
7800                 if test "$GCC" != yes; then
7801                         CC_SHARED_OPTS='-belf -KPIC'
7802                 fi
7803                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7804                 if test "$cf_cv_enable_rpath" = yes ; then
7805                         # only way is to set LD_RUN_PATH but no switch for it
7806                         RUN_PATH=$libdir
7807                 fi
7808                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7809                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7810                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7811                 ;;
7812         sunos4*) #(vi
7813                 # tested with SunOS 4.1.1 and gcc 2.7.0
7814                 if test "$GCC" != yes; then
7815                         CC_SHARED_OPTS='-KPIC'
7816                 fi
7817                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7818                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7819                 ;;
7820         solaris2*) #(vi
7821                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7822                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7823                 if test "$DFT_LWR_MODEL" = "shared" ; then
7824                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7825                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7826                 fi
7827                 if test "$cf_cv_enable_rpath" = yes ; then
7828                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7829                 fi
7830
7831         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7832         if test "$cf_cv_shlib_version" = rel; then
7833                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7834         else
7835                 cf_cv_shared_soname='`basename $@`'
7836         fi
7837
7838                 if test "$GCC" != yes; then
7839                         cf_save_CFLAGS="$CFLAGS"
7840                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7841                         do
7842                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7843                                 cat >conftest.$ac_ext <<_ACEOF
7844 #line 7844 "configure"
7845 #include "confdefs.h"
7846 #include <stdio.h>
7847 int
7848 main ()
7849 {
7850 printf("Hello\n");
7851   ;
7852   return 0;
7853 }
7854 _ACEOF
7855 rm -f conftest.$ac_objext
7856 if { (eval echo "$as_me:7856: \"$ac_compile\"") >&5
7857   (eval $ac_compile) 2>&5
7858   ac_status=$?
7859   echo "$as_me:7859: \$? = $ac_status" >&5
7860   (exit $ac_status); } &&
7861          { ac_try='test -s conftest.$ac_objext'
7862   { (eval echo "$as_me:7862: \"$ac_try\"") >&5
7863   (eval $ac_try) 2>&5
7864   ac_status=$?
7865   echo "$as_me:7865: \$? = $ac_status" >&5
7866   (exit $ac_status); }; }; then
7867   break
7868 else
7869   echo "$as_me: failed program was:" >&5
7870 cat conftest.$ac_ext >&5
7871 fi
7872 rm -f conftest.$ac_objext conftest.$ac_ext
7873                         done
7874                         CFLAGS="$cf_save_CFLAGS"
7875                         CC_SHARED_OPTS=$cf_shared_opts
7876                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7877                 else
7878                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7879                 fi
7880                 ;;
7881         sysv5uw7*|unix_sv*) #(vi
7882                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7883                 if test "$GCC" != yes; then
7884                         CC_SHARED_OPTS='-KPIC'
7885                 fi
7886                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7887                 ;;
7888         *)
7889                 CC_SHARED_OPTS='unknown'
7890                 MK_SHARED_LIB='echo unknown'
7891                 ;;
7892         esac
7893
7894         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7895         case "$cf_cv_shlib_version" in #(vi
7896         rel|abi)
7897                 case "$MK_SHARED_LIB" in #(vi
7898                 *'-o $@') #(vi
7899                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7900                         ;;
7901                 *)
7902                         { echo "$as_me:7902: WARNING: ignored --with-shlib-version" >&5
7903 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7904                         ;;
7905                 esac
7906                 ;;
7907         esac
7908
7909         if test -n "$cf_ld_rpath_opt" ; then
7910                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
7911         fi
7912
7913 # The test/sample programs in the original tree link using rpath option.
7914 # Make it optional for packagers.
7915 if test -n "$LOCAL_LDFLAGS"
7916 then
7917         echo "$as_me:7917: checking if you want to link sample programs with rpath option" >&5
7918 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
7919
7920 # Check whether --enable-rpath-link or --disable-rpath-link was given.
7921 if test "${enable_rpath_link+set}" = set; then
7922   enableval="$enable_rpath_link"
7923   with_rpath_link=$enableval
7924 else
7925   with_rpath_link=yes
7926 fi;
7927         echo "$as_me:7927: result: $with_rpath_link" >&5
7928 echo "${ECHO_T}$with_rpath_link" >&6
7929         if test "$with_rpath_link" = no
7930         then
7931                 LOCAL_LDFLAGS=
7932                 LOCAL_LDFLAGS2=
7933         fi
7934 fi
7935
7936 ###############################################################################
7937
7938 ###   use option --enable-broken-linker to force on use of broken-linker support
7939 echo "$as_me:7939: checking if you want broken-linker support code" >&5
7940 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7941
7942 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7943 if test "${enable_broken_linker+set}" = set; then
7944   enableval="$enable_broken_linker"
7945   with_broken_linker=$enableval
7946 else
7947   with_broken_linker=${BROKEN_LINKER:-no}
7948 fi;
7949 echo "$as_me:7949: result: $with_broken_linker" >&5
7950 echo "${ECHO_T}$with_broken_linker" >&6
7951
7952 BROKEN_LINKER=0
7953 if test "$with_broken_linker" = yes ; then
7954         cat >>confdefs.h <<\EOF
7955 #define BROKEN_LINKER 1
7956 EOF
7957
7958         BROKEN_LINKER=1
7959 elif test "$DFT_LWR_MODEL" = shared ; then
7960         case $cf_cv_system_name in #(vi
7961         cygwin*)
7962                 cat >>confdefs.h <<\EOF
7963 #define BROKEN_LINKER 1
7964 EOF
7965
7966                 BROKEN_LINKER=1
7967                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7968
7969 echo "${as_me:-configure}:7969: testing cygwin linker is broken anyway ..." 1>&5
7970
7971                 ;;
7972         esac
7973 fi
7974
7975 # Check to define _XOPEN_SOURCE "automatically"
7976
7977 cf_XOPEN_SOURCE=500
7978 cf_POSIX_C_SOURCE=199506L
7979 cf_xopen_source=
7980
7981 case $host_os in #(vi
7982 aix[4-7]*) #(vi
7983         cf_xopen_source="-D_ALL_SOURCE"
7984         ;;
7985 cygwin) #(vi
7986         cf_XOPEN_SOURCE=600
7987         ;;
7988 darwin[0-8].*) #(vi
7989         cf_xopen_source="-D_APPLE_C_SOURCE"
7990         ;;
7991 darwin*) #(vi
7992         cf_xopen_source="-D_DARWIN_C_SOURCE"
7993         ;;
7994 freebsd*|dragonfly*) #(vi
7995         # 5.x headers associate
7996         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7997         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7998         cf_POSIX_C_SOURCE=200112L
7999         cf_XOPEN_SOURCE=600
8000         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8001         ;;
8002 hpux11*) #(vi
8003         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8004         ;;
8005 hpux*) #(vi
8006         cf_xopen_source="-D_HPUX_SOURCE"
8007         ;;
8008 irix[56].*) #(vi
8009         cf_xopen_source="-D_SGI_SOURCE"
8010         ;;
8011 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
8012
8013 echo "$as_me:8013: checking if we must define _GNU_SOURCE" >&5
8014 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8015 if test "${cf_cv_gnu_source+set}" = set; then
8016   echo $ECHO_N "(cached) $ECHO_C" >&6
8017 else
8018
8019 cat >conftest.$ac_ext <<_ACEOF
8020 #line 8020 "configure"
8021 #include "confdefs.h"
8022 #include <sys/types.h>
8023 int
8024 main ()
8025 {
8026
8027 #ifndef _XOPEN_SOURCE
8028 make an error
8029 #endif
8030   ;
8031   return 0;
8032 }
8033 _ACEOF
8034 rm -f conftest.$ac_objext
8035 if { (eval echo "$as_me:8035: \"$ac_compile\"") >&5
8036   (eval $ac_compile) 2>&5
8037   ac_status=$?
8038   echo "$as_me:8038: \$? = $ac_status" >&5
8039   (exit $ac_status); } &&
8040          { ac_try='test -s conftest.$ac_objext'
8041   { (eval echo "$as_me:8041: \"$ac_try\"") >&5
8042   (eval $ac_try) 2>&5
8043   ac_status=$?
8044   echo "$as_me:8044: \$? = $ac_status" >&5
8045   (exit $ac_status); }; }; then
8046   cf_cv_gnu_source=no
8047 else
8048   echo "$as_me: failed program was:" >&5
8049 cat conftest.$ac_ext >&5
8050 cf_save="$CPPFLAGS"
8051          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8052          cat >conftest.$ac_ext <<_ACEOF
8053 #line 8053 "configure"
8054 #include "confdefs.h"
8055 #include <sys/types.h>
8056 int
8057 main ()
8058 {
8059
8060 #ifdef _XOPEN_SOURCE
8061 make an error
8062 #endif
8063   ;
8064   return 0;
8065 }
8066 _ACEOF
8067 rm -f conftest.$ac_objext
8068 if { (eval echo "$as_me:8068: \"$ac_compile\"") >&5
8069   (eval $ac_compile) 2>&5
8070   ac_status=$?
8071   echo "$as_me:8071: \$? = $ac_status" >&5
8072   (exit $ac_status); } &&
8073          { ac_try='test -s conftest.$ac_objext'
8074   { (eval echo "$as_me:8074: \"$ac_try\"") >&5
8075   (eval $ac_try) 2>&5
8076   ac_status=$?
8077   echo "$as_me:8077: \$? = $ac_status" >&5
8078   (exit $ac_status); }; }; then
8079   cf_cv_gnu_source=no
8080 else
8081   echo "$as_me: failed program was:" >&5
8082 cat conftest.$ac_ext >&5
8083 cf_cv_gnu_source=yes
8084 fi
8085 rm -f conftest.$ac_objext conftest.$ac_ext
8086         CPPFLAGS="$cf_save"
8087
8088 fi
8089 rm -f conftest.$ac_objext conftest.$ac_ext
8090
8091 fi
8092 echo "$as_me:8092: result: $cf_cv_gnu_source" >&5
8093 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8094 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8095
8096         ;;
8097 mirbsd*) #(vi
8098         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
8099         ;;
8100 netbsd*) #(vi
8101         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8102         ;;
8103 openbsd*) #(vi
8104         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8105         ;;
8106 osf[45]*) #(vi
8107         cf_xopen_source="-D_OSF_SOURCE"
8108         ;;
8109 nto-qnx*) #(vi
8110         cf_xopen_source="-D_QNX_SOURCE"
8111         ;;
8112 sco*) #(vi
8113         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8114         ;;
8115 solaris2.1[0-9]) #(vi
8116         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8117         ;;
8118 solaris2.[1-9]) #(vi
8119         cf_xopen_source="-D__EXTENSIONS__"
8120         ;;
8121 *)
8122         echo "$as_me:8122: checking if we should define _XOPEN_SOURCE" >&5
8123 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8124 if test "${cf_cv_xopen_source+set}" = set; then
8125   echo $ECHO_N "(cached) $ECHO_C" >&6
8126 else
8127
8128         cat >conftest.$ac_ext <<_ACEOF
8129 #line 8129 "configure"
8130 #include "confdefs.h"
8131 #include <sys/types.h>
8132 int
8133 main ()
8134 {
8135
8136 #ifndef _XOPEN_SOURCE
8137 make an error
8138 #endif
8139   ;
8140   return 0;
8141 }
8142 _ACEOF
8143 rm -f conftest.$ac_objext
8144 if { (eval echo "$as_me:8144: \"$ac_compile\"") >&5
8145   (eval $ac_compile) 2>&5
8146   ac_status=$?
8147   echo "$as_me:8147: \$? = $ac_status" >&5
8148   (exit $ac_status); } &&
8149          { ac_try='test -s conftest.$ac_objext'
8150   { (eval echo "$as_me:8150: \"$ac_try\"") >&5
8151   (eval $ac_try) 2>&5
8152   ac_status=$?
8153   echo "$as_me:8153: \$? = $ac_status" >&5
8154   (exit $ac_status); }; }; then
8155   cf_cv_xopen_source=no
8156 else
8157   echo "$as_me: failed program was:" >&5
8158 cat conftest.$ac_ext >&5
8159 cf_save="$CPPFLAGS"
8160          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8161          cat >conftest.$ac_ext <<_ACEOF
8162 #line 8162 "configure"
8163 #include "confdefs.h"
8164 #include <sys/types.h>
8165 int
8166 main ()
8167 {
8168
8169 #ifdef _XOPEN_SOURCE
8170 make an error
8171 #endif
8172   ;
8173   return 0;
8174 }
8175 _ACEOF
8176 rm -f conftest.$ac_objext
8177 if { (eval echo "$as_me:8177: \"$ac_compile\"") >&5
8178   (eval $ac_compile) 2>&5
8179   ac_status=$?
8180   echo "$as_me:8180: \$? = $ac_status" >&5
8181   (exit $ac_status); } &&
8182          { ac_try='test -s conftest.$ac_objext'
8183   { (eval echo "$as_me:8183: \"$ac_try\"") >&5
8184   (eval $ac_try) 2>&5
8185   ac_status=$?
8186   echo "$as_me:8186: \$? = $ac_status" >&5
8187   (exit $ac_status); }; }; then
8188   cf_cv_xopen_source=no
8189 else
8190   echo "$as_me: failed program was:" >&5
8191 cat conftest.$ac_ext >&5
8192 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8193 fi
8194 rm -f conftest.$ac_objext conftest.$ac_ext
8195         CPPFLAGS="$cf_save"
8196
8197 fi
8198 rm -f conftest.$ac_objext conftest.$ac_ext
8199
8200 fi
8201 echo "$as_me:8201: result: $cf_cv_xopen_source" >&5
8202 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8203         if test "$cf_cv_xopen_source" != no ; then
8204
8205 CFLAGS=`echo "$CFLAGS" | \
8206         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8207                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8208
8209 CPPFLAGS=`echo "$CPPFLAGS" | \
8210         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8211                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8212
8213                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8214
8215 cf_fix_cppflags=no
8216 cf_new_cflags=
8217 cf_new_cppflags=
8218 cf_new_extra_cppflags=
8219
8220 for cf_add_cflags in $cf_temp_xopen_source
8221 do
8222 case $cf_fix_cppflags in
8223 no)
8224         case $cf_add_cflags in #(vi
8225         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8226                 case $cf_add_cflags in
8227                 -D*)
8228                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8229
8230                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8231                                 && test -z "${cf_tst_cflags}" \
8232                                 && cf_fix_cppflags=yes
8233
8234                         if test $cf_fix_cppflags = yes ; then
8235                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8236                                 continue
8237                         elif test "${cf_tst_cflags}" = "\"'" ; then
8238                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8239                                 continue
8240                         fi
8241                         ;;
8242                 esac
8243                 case "$CPPFLAGS" in
8244                 *$cf_add_cflags) #(vi
8245                         ;;
8246                 *) #(vi
8247                         case $cf_add_cflags in #(vi
8248                         -D*)
8249                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8250
8251 CPPFLAGS=`echo "$CPPFLAGS" | \
8252         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8253                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8254
8255                                 ;;
8256                         esac
8257                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8258                         ;;
8259                 esac
8260                 ;;
8261         *)
8262                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8263                 ;;
8264         esac
8265         ;;
8266 yes)
8267         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8268
8269         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8270
8271         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8272                 && test -z "${cf_tst_cflags}" \
8273                 && cf_fix_cppflags=no
8274         ;;
8275 esac
8276 done
8277
8278 if test -n "$cf_new_cflags" ; then
8279
8280         CFLAGS="$CFLAGS $cf_new_cflags"
8281 fi
8282
8283 if test -n "$cf_new_cppflags" ; then
8284
8285         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8286 fi
8287
8288 if test -n "$cf_new_extra_cppflags" ; then
8289
8290         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8291 fi
8292
8293         fi
8294
8295 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8296
8297 cf_save_CFLAGS="$CFLAGS"
8298 cf_save_CPPFLAGS="$CPPFLAGS"
8299
8300 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8301         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8302                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8303
8304 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8305         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8306                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8307
8308 echo "$as_me:8308: checking if we should define _POSIX_C_SOURCE" >&5
8309 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8310 if test "${cf_cv_posix_c_source+set}" = set; then
8311   echo $ECHO_N "(cached) $ECHO_C" >&6
8312 else
8313
8314 echo "${as_me:-configure}:8314: testing if the symbol is already defined go no further ..." 1>&5
8315
8316         cat >conftest.$ac_ext <<_ACEOF
8317 #line 8317 "configure"
8318 #include "confdefs.h"
8319 #include <sys/types.h>
8320 int
8321 main ()
8322 {
8323
8324 #ifndef _POSIX_C_SOURCE
8325 make an error
8326 #endif
8327   ;
8328   return 0;
8329 }
8330 _ACEOF
8331 rm -f conftest.$ac_objext
8332 if { (eval echo "$as_me:8332: \"$ac_compile\"") >&5
8333   (eval $ac_compile) 2>&5
8334   ac_status=$?
8335   echo "$as_me:8335: \$? = $ac_status" >&5
8336   (exit $ac_status); } &&
8337          { ac_try='test -s conftest.$ac_objext'
8338   { (eval echo "$as_me:8338: \"$ac_try\"") >&5
8339   (eval $ac_try) 2>&5
8340   ac_status=$?
8341   echo "$as_me:8341: \$? = $ac_status" >&5
8342   (exit $ac_status); }; }; then
8343   cf_cv_posix_c_source=no
8344 else
8345   echo "$as_me: failed program was:" >&5
8346 cat conftest.$ac_ext >&5
8347 cf_want_posix_source=no
8348          case .$cf_POSIX_C_SOURCE in #(vi
8349          .[12]??*) #(vi
8350                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8351                 ;;
8352          .2) #(vi
8353                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8354                 cf_want_posix_source=yes
8355                 ;;
8356          .*)
8357                 cf_want_posix_source=yes
8358                 ;;
8359          esac
8360          if test "$cf_want_posix_source" = yes ; then
8361                 cat >conftest.$ac_ext <<_ACEOF
8362 #line 8362 "configure"
8363 #include "confdefs.h"
8364 #include <sys/types.h>
8365 int
8366 main ()
8367 {
8368
8369 #ifdef _POSIX_SOURCE
8370 make an error
8371 #endif
8372   ;
8373   return 0;
8374 }
8375 _ACEOF
8376 rm -f conftest.$ac_objext
8377 if { (eval echo "$as_me:8377: \"$ac_compile\"") >&5
8378   (eval $ac_compile) 2>&5
8379   ac_status=$?
8380   echo "$as_me:8380: \$? = $ac_status" >&5
8381   (exit $ac_status); } &&
8382          { ac_try='test -s conftest.$ac_objext'
8383   { (eval echo "$as_me:8383: \"$ac_try\"") >&5
8384   (eval $ac_try) 2>&5
8385   ac_status=$?
8386   echo "$as_me:8386: \$? = $ac_status" >&5
8387   (exit $ac_status); }; }; then
8388   :
8389 else
8390   echo "$as_me: failed program was:" >&5
8391 cat conftest.$ac_ext >&5
8392 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8393 fi
8394 rm -f conftest.$ac_objext conftest.$ac_ext
8395          fi
8396
8397 echo "${as_me:-configure}:8397: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8398
8399          CFLAGS="$cf_trim_CFLAGS"
8400          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8401
8402 echo "${as_me:-configure}:8402: testing if the second compile does not leave our definition intact error ..." 1>&5
8403
8404          cat >conftest.$ac_ext <<_ACEOF
8405 #line 8405 "configure"
8406 #include "confdefs.h"
8407 #include <sys/types.h>
8408 int
8409 main ()
8410 {
8411
8412 #ifndef _POSIX_C_SOURCE
8413 make an error
8414 #endif
8415   ;
8416   return 0;
8417 }
8418 _ACEOF
8419 rm -f conftest.$ac_objext
8420 if { (eval echo "$as_me:8420: \"$ac_compile\"") >&5
8421   (eval $ac_compile) 2>&5
8422   ac_status=$?
8423   echo "$as_me:8423: \$? = $ac_status" >&5
8424   (exit $ac_status); } &&
8425          { ac_try='test -s conftest.$ac_objext'
8426   { (eval echo "$as_me:8426: \"$ac_try\"") >&5
8427   (eval $ac_try) 2>&5
8428   ac_status=$?
8429   echo "$as_me:8429: \$? = $ac_status" >&5
8430   (exit $ac_status); }; }; then
8431   :
8432 else
8433   echo "$as_me: failed program was:" >&5
8434 cat conftest.$ac_ext >&5
8435 cf_cv_posix_c_source=no
8436 fi
8437 rm -f conftest.$ac_objext conftest.$ac_ext
8438          CFLAGS="$cf_save_CFLAGS"
8439          CPPFLAGS="$cf_save_CPPFLAGS"
8440
8441 fi
8442 rm -f conftest.$ac_objext conftest.$ac_ext
8443
8444 fi
8445 echo "$as_me:8445: result: $cf_cv_posix_c_source" >&5
8446 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8447
8448 if test "$cf_cv_posix_c_source" != no ; then
8449         CFLAGS="$cf_trim_CFLAGS"
8450         CPPFLAGS="$cf_trim_CPPFLAGS"
8451
8452 cf_fix_cppflags=no
8453 cf_new_cflags=
8454 cf_new_cppflags=
8455 cf_new_extra_cppflags=
8456
8457 for cf_add_cflags in $cf_cv_posix_c_source
8458 do
8459 case $cf_fix_cppflags in
8460 no)
8461         case $cf_add_cflags in #(vi
8462         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8463                 case $cf_add_cflags in
8464                 -D*)
8465                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8466
8467                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8468                                 && test -z "${cf_tst_cflags}" \
8469                                 && cf_fix_cppflags=yes
8470
8471                         if test $cf_fix_cppflags = yes ; then
8472                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8473                                 continue
8474                         elif test "${cf_tst_cflags}" = "\"'" ; then
8475                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8476                                 continue
8477                         fi
8478                         ;;
8479                 esac
8480                 case "$CPPFLAGS" in
8481                 *$cf_add_cflags) #(vi
8482                         ;;
8483                 *) #(vi
8484                         case $cf_add_cflags in #(vi
8485                         -D*)
8486                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8487
8488 CPPFLAGS=`echo "$CPPFLAGS" | \
8489         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8490                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8491
8492                                 ;;
8493                         esac
8494                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8495                         ;;
8496                 esac
8497                 ;;
8498         *)
8499                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8500                 ;;
8501         esac
8502         ;;
8503 yes)
8504         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8505
8506         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8507
8508         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8509                 && test -z "${cf_tst_cflags}" \
8510                 && cf_fix_cppflags=no
8511         ;;
8512 esac
8513 done
8514
8515 if test -n "$cf_new_cflags" ; then
8516
8517         CFLAGS="$CFLAGS $cf_new_cflags"
8518 fi
8519
8520 if test -n "$cf_new_cppflags" ; then
8521
8522         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8523 fi
8524
8525 if test -n "$cf_new_extra_cppflags" ; then
8526
8527         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8528 fi
8529
8530 fi
8531
8532         ;;
8533 esac
8534
8535 if test -n "$cf_xopen_source" ; then
8536
8537 cf_fix_cppflags=no
8538 cf_new_cflags=
8539 cf_new_cppflags=
8540 cf_new_extra_cppflags=
8541
8542 for cf_add_cflags in $cf_xopen_source
8543 do
8544 case $cf_fix_cppflags in
8545 no)
8546         case $cf_add_cflags in #(vi
8547         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8548                 case $cf_add_cflags in
8549                 -D*)
8550                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8551
8552                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8553                                 && test -z "${cf_tst_cflags}" \
8554                                 && cf_fix_cppflags=yes
8555
8556                         if test $cf_fix_cppflags = yes ; then
8557                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8558                                 continue
8559                         elif test "${cf_tst_cflags}" = "\"'" ; then
8560                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8561                                 continue
8562                         fi
8563                         ;;
8564                 esac
8565                 case "$CPPFLAGS" in
8566                 *$cf_add_cflags) #(vi
8567                         ;;
8568                 *) #(vi
8569                         case $cf_add_cflags in #(vi
8570                         -D*)
8571                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8572
8573 CPPFLAGS=`echo "$CPPFLAGS" | \
8574         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8575                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8576
8577                                 ;;
8578                         esac
8579                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8580                         ;;
8581                 esac
8582                 ;;
8583         *)
8584                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8585                 ;;
8586         esac
8587         ;;
8588 yes)
8589         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8590
8591         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8592
8593         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8594                 && test -z "${cf_tst_cflags}" \
8595                 && cf_fix_cppflags=no
8596         ;;
8597 esac
8598 done
8599
8600 if test -n "$cf_new_cflags" ; then
8601
8602         CFLAGS="$CFLAGS $cf_new_cflags"
8603 fi
8604
8605 if test -n "$cf_new_cppflags" ; then
8606
8607         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8608 fi
8609
8610 if test -n "$cf_new_extra_cppflags" ; then
8611
8612         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8613 fi
8614
8615 fi
8616
8617 # Check whether --enable-largefile or --disable-largefile was given.
8618 if test "${enable_largefile+set}" = set; then
8619   enableval="$enable_largefile"
8620
8621 fi;
8622 if test "$enable_largefile" != no; then
8623
8624   echo "$as_me:8624: checking for special C compiler options needed for large files" >&5
8625 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8626 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8627   echo $ECHO_N "(cached) $ECHO_C" >&6
8628 else
8629   ac_cv_sys_largefile_CC=no
8630      if test "$GCC" != yes; then
8631        ac_save_CC=$CC
8632        while :; do
8633          # IRIX 6.2 and later do not support large files by default,
8634          # so use the C compiler's -n32 option if that helps.
8635          cat >conftest.$ac_ext <<_ACEOF
8636 #line 8636 "configure"
8637 #include "confdefs.h"
8638 #include <sys/types.h>
8639  /* Check that off_t can represent 2**63 - 1 correctly.
8640     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8641     since some C++ compilers masquerading as C compilers
8642     incorrectly reject 9223372036854775807.  */
8643 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8644   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8645                        && LARGE_OFF_T % 2147483647 == 1)
8646                       ? 1 : -1];
8647 int
8648 main ()
8649 {
8650
8651   ;
8652   return 0;
8653 }
8654 _ACEOF
8655          rm -f conftest.$ac_objext
8656 if { (eval echo "$as_me:8656: \"$ac_compile\"") >&5
8657   (eval $ac_compile) 2>&5
8658   ac_status=$?
8659   echo "$as_me:8659: \$? = $ac_status" >&5
8660   (exit $ac_status); } &&
8661          { ac_try='test -s conftest.$ac_objext'
8662   { (eval echo "$as_me:8662: \"$ac_try\"") >&5
8663   (eval $ac_try) 2>&5
8664   ac_status=$?
8665   echo "$as_me:8665: \$? = $ac_status" >&5
8666   (exit $ac_status); }; }; then
8667   break
8668 else
8669   echo "$as_me: failed program was:" >&5
8670 cat conftest.$ac_ext >&5
8671 fi
8672 rm -f conftest.$ac_objext
8673          CC="$CC -n32"
8674          rm -f conftest.$ac_objext
8675 if { (eval echo "$as_me:8675: \"$ac_compile\"") >&5
8676   (eval $ac_compile) 2>&5
8677   ac_status=$?
8678   echo "$as_me:8678: \$? = $ac_status" >&5
8679   (exit $ac_status); } &&
8680          { ac_try='test -s conftest.$ac_objext'
8681   { (eval echo "$as_me:8681: \"$ac_try\"") >&5
8682   (eval $ac_try) 2>&5
8683   ac_status=$?
8684   echo "$as_me:8684: \$? = $ac_status" >&5
8685   (exit $ac_status); }; }; then
8686   ac_cv_sys_largefile_CC=' -n32'; break
8687 else
8688   echo "$as_me: failed program was:" >&5
8689 cat conftest.$ac_ext >&5
8690 fi
8691 rm -f conftest.$ac_objext
8692          break
8693        done
8694        CC=$ac_save_CC
8695        rm -f conftest.$ac_ext
8696     fi
8697 fi
8698 echo "$as_me:8698: result: $ac_cv_sys_largefile_CC" >&5
8699 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8700   if test "$ac_cv_sys_largefile_CC" != no; then
8701     CC=$CC$ac_cv_sys_largefile_CC
8702   fi
8703
8704   echo "$as_me:8704: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8705 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8706 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8707   echo $ECHO_N "(cached) $ECHO_C" >&6
8708 else
8709   while :; do
8710   ac_cv_sys_file_offset_bits=no
8711   cat >conftest.$ac_ext <<_ACEOF
8712 #line 8712 "configure"
8713 #include "confdefs.h"
8714 #include <sys/types.h>
8715  /* Check that off_t can represent 2**63 - 1 correctly.
8716     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8717     since some C++ compilers masquerading as C compilers
8718     incorrectly reject 9223372036854775807.  */
8719 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8720   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8721                        && LARGE_OFF_T % 2147483647 == 1)
8722                       ? 1 : -1];
8723 int
8724 main ()
8725 {
8726
8727   ;
8728   return 0;
8729 }
8730 _ACEOF
8731 rm -f conftest.$ac_objext
8732 if { (eval echo "$as_me:8732: \"$ac_compile\"") >&5
8733   (eval $ac_compile) 2>&5
8734   ac_status=$?
8735   echo "$as_me:8735: \$? = $ac_status" >&5
8736   (exit $ac_status); } &&
8737          { ac_try='test -s conftest.$ac_objext'
8738   { (eval echo "$as_me:8738: \"$ac_try\"") >&5
8739   (eval $ac_try) 2>&5
8740   ac_status=$?
8741   echo "$as_me:8741: \$? = $ac_status" >&5
8742   (exit $ac_status); }; }; then
8743   break
8744 else
8745   echo "$as_me: failed program was:" >&5
8746 cat conftest.$ac_ext >&5
8747 fi
8748 rm -f conftest.$ac_objext conftest.$ac_ext
8749   cat >conftest.$ac_ext <<_ACEOF
8750 #line 8750 "configure"
8751 #include "confdefs.h"
8752 #define _FILE_OFFSET_BITS 64
8753 #include <sys/types.h>
8754  /* Check that off_t can represent 2**63 - 1 correctly.
8755     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8756     since some C++ compilers masquerading as C compilers
8757     incorrectly reject 9223372036854775807.  */
8758 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8759   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8760                        && LARGE_OFF_T % 2147483647 == 1)
8761                       ? 1 : -1];
8762 int
8763 main ()
8764 {
8765
8766   ;
8767   return 0;
8768 }
8769 _ACEOF
8770 rm -f conftest.$ac_objext
8771 if { (eval echo "$as_me:8771: \"$ac_compile\"") >&5
8772   (eval $ac_compile) 2>&5
8773   ac_status=$?
8774   echo "$as_me:8774: \$? = $ac_status" >&5
8775   (exit $ac_status); } &&
8776          { ac_try='test -s conftest.$ac_objext'
8777   { (eval echo "$as_me:8777: \"$ac_try\"") >&5
8778   (eval $ac_try) 2>&5
8779   ac_status=$?
8780   echo "$as_me:8780: \$? = $ac_status" >&5
8781   (exit $ac_status); }; }; then
8782   ac_cv_sys_file_offset_bits=64; break
8783 else
8784   echo "$as_me: failed program was:" >&5
8785 cat conftest.$ac_ext >&5
8786 fi
8787 rm -f conftest.$ac_objext conftest.$ac_ext
8788   break
8789 done
8790 fi
8791 echo "$as_me:8791: result: $ac_cv_sys_file_offset_bits" >&5
8792 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8793 if test "$ac_cv_sys_file_offset_bits" != no; then
8794
8795 cat >>confdefs.h <<EOF
8796 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8797 EOF
8798
8799 fi
8800 rm -rf conftest*
8801   echo "$as_me:8801: checking for _LARGE_FILES value needed for large files" >&5
8802 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8803 if test "${ac_cv_sys_large_files+set}" = set; then
8804   echo $ECHO_N "(cached) $ECHO_C" >&6
8805 else
8806   while :; do
8807   ac_cv_sys_large_files=no
8808   cat >conftest.$ac_ext <<_ACEOF
8809 #line 8809 "configure"
8810 #include "confdefs.h"
8811 #include <sys/types.h>
8812  /* Check that off_t can represent 2**63 - 1 correctly.
8813     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8814     since some C++ compilers masquerading as C compilers
8815     incorrectly reject 9223372036854775807.  */
8816 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8817   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8818                        && LARGE_OFF_T % 2147483647 == 1)
8819                       ? 1 : -1];
8820 int
8821 main ()
8822 {
8823
8824   ;
8825   return 0;
8826 }
8827 _ACEOF
8828 rm -f conftest.$ac_objext
8829 if { (eval echo "$as_me:8829: \"$ac_compile\"") >&5
8830   (eval $ac_compile) 2>&5
8831   ac_status=$?
8832   echo "$as_me:8832: \$? = $ac_status" >&5
8833   (exit $ac_status); } &&
8834          { ac_try='test -s conftest.$ac_objext'
8835   { (eval echo "$as_me:8835: \"$ac_try\"") >&5
8836   (eval $ac_try) 2>&5
8837   ac_status=$?
8838   echo "$as_me:8838: \$? = $ac_status" >&5
8839   (exit $ac_status); }; }; then
8840   break
8841 else
8842   echo "$as_me: failed program was:" >&5
8843 cat conftest.$ac_ext >&5
8844 fi
8845 rm -f conftest.$ac_objext conftest.$ac_ext
8846   cat >conftest.$ac_ext <<_ACEOF
8847 #line 8847 "configure"
8848 #include "confdefs.h"
8849 #define _LARGE_FILES 1
8850 #include <sys/types.h>
8851  /* Check that off_t can represent 2**63 - 1 correctly.
8852     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8853     since some C++ compilers masquerading as C compilers
8854     incorrectly reject 9223372036854775807.  */
8855 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8856   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8857                        && LARGE_OFF_T % 2147483647 == 1)
8858                       ? 1 : -1];
8859 int
8860 main ()
8861 {
8862
8863   ;
8864   return 0;
8865 }
8866 _ACEOF
8867 rm -f conftest.$ac_objext
8868 if { (eval echo "$as_me:8868: \"$ac_compile\"") >&5
8869   (eval $ac_compile) 2>&5
8870   ac_status=$?
8871   echo "$as_me:8871: \$? = $ac_status" >&5
8872   (exit $ac_status); } &&
8873          { ac_try='test -s conftest.$ac_objext'
8874   { (eval echo "$as_me:8874: \"$ac_try\"") >&5
8875   (eval $ac_try) 2>&5
8876   ac_status=$?
8877   echo "$as_me:8877: \$? = $ac_status" >&5
8878   (exit $ac_status); }; }; then
8879   ac_cv_sys_large_files=1; break
8880 else
8881   echo "$as_me: failed program was:" >&5
8882 cat conftest.$ac_ext >&5
8883 fi
8884 rm -f conftest.$ac_objext conftest.$ac_ext
8885   break
8886 done
8887 fi
8888 echo "$as_me:8888: result: $ac_cv_sys_large_files" >&5
8889 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8890 if test "$ac_cv_sys_large_files" != no; then
8891
8892 cat >>confdefs.h <<EOF
8893 #define _LARGE_FILES $ac_cv_sys_large_files
8894 EOF
8895
8896 fi
8897 rm -rf conftest*
8898 fi
8899
8900     if test "$enable_largefile" != no ; then
8901         echo "$as_me:8901: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8902 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8903 if test "${ac_cv_sys_largefile_source+set}" = set; then
8904   echo $ECHO_N "(cached) $ECHO_C" >&6
8905 else
8906   while :; do
8907   ac_cv_sys_largefile_source=no
8908   cat >conftest.$ac_ext <<_ACEOF
8909 #line 8909 "configure"
8910 #include "confdefs.h"
8911 #include <stdio.h>
8912 int
8913 main ()
8914 {
8915 return !fseeko;
8916   ;
8917   return 0;
8918 }
8919 _ACEOF
8920 rm -f conftest.$ac_objext
8921 if { (eval echo "$as_me:8921: \"$ac_compile\"") >&5
8922   (eval $ac_compile) 2>&5
8923   ac_status=$?
8924   echo "$as_me:8924: \$? = $ac_status" >&5
8925   (exit $ac_status); } &&
8926          { ac_try='test -s conftest.$ac_objext'
8927   { (eval echo "$as_me:8927: \"$ac_try\"") >&5
8928   (eval $ac_try) 2>&5
8929   ac_status=$?
8930   echo "$as_me:8930: \$? = $ac_status" >&5
8931   (exit $ac_status); }; }; then
8932   break
8933 else
8934   echo "$as_me: failed program was:" >&5
8935 cat conftest.$ac_ext >&5
8936 fi
8937 rm -f conftest.$ac_objext conftest.$ac_ext
8938   cat >conftest.$ac_ext <<_ACEOF
8939 #line 8939 "configure"
8940 #include "confdefs.h"
8941 #define _LARGEFILE_SOURCE 1
8942 #include <stdio.h>
8943 int
8944 main ()
8945 {
8946 return !fseeko;
8947   ;
8948   return 0;
8949 }
8950 _ACEOF
8951 rm -f conftest.$ac_objext
8952 if { (eval echo "$as_me:8952: \"$ac_compile\"") >&5
8953   (eval $ac_compile) 2>&5
8954   ac_status=$?
8955   echo "$as_me:8955: \$? = $ac_status" >&5
8956   (exit $ac_status); } &&
8957          { ac_try='test -s conftest.$ac_objext'
8958   { (eval echo "$as_me:8958: \"$ac_try\"") >&5
8959   (eval $ac_try) 2>&5
8960   ac_status=$?
8961   echo "$as_me:8961: \$? = $ac_status" >&5
8962   (exit $ac_status); }; }; then
8963   ac_cv_sys_largefile_source=1; break
8964 else
8965   echo "$as_me: failed program was:" >&5
8966 cat conftest.$ac_ext >&5
8967 fi
8968 rm -f conftest.$ac_objext conftest.$ac_ext
8969   break
8970 done
8971 fi
8972 echo "$as_me:8972: result: $ac_cv_sys_largefile_source" >&5
8973 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8974 if test "$ac_cv_sys_largefile_source" != no; then
8975
8976 cat >>confdefs.h <<EOF
8977 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8978 EOF
8979
8980 fi
8981 rm -rf conftest*
8982
8983 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8984 # in glibc 2.1.3, but that breaks too many other things.
8985 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8986 echo "$as_me:8986: checking for fseeko" >&5
8987 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8988 if test "${ac_cv_func_fseeko+set}" = set; then
8989   echo $ECHO_N "(cached) $ECHO_C" >&6
8990 else
8991   cat >conftest.$ac_ext <<_ACEOF
8992 #line 8992 "configure"
8993 #include "confdefs.h"
8994 #include <stdio.h>
8995 int
8996 main ()
8997 {
8998 return fseeko && fseeko (stdin, 0, 0);
8999   ;
9000   return 0;
9001 }
9002 _ACEOF
9003 rm -f conftest.$ac_objext conftest$ac_exeext
9004 if { (eval echo "$as_me:9004: \"$ac_link\"") >&5
9005   (eval $ac_link) 2>&5
9006   ac_status=$?
9007   echo "$as_me:9007: \$? = $ac_status" >&5
9008   (exit $ac_status); } &&
9009          { ac_try='test -s conftest$ac_exeext'
9010   { (eval echo "$as_me:9010: \"$ac_try\"") >&5
9011   (eval $ac_try) 2>&5
9012   ac_status=$?
9013   echo "$as_me:9013: \$? = $ac_status" >&5
9014   (exit $ac_status); }; }; then
9015   ac_cv_func_fseeko=yes
9016 else
9017   echo "$as_me: failed program was:" >&5
9018 cat conftest.$ac_ext >&5
9019 ac_cv_func_fseeko=no
9020 fi
9021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9022 fi
9023 echo "$as_me:9023: result: $ac_cv_func_fseeko" >&5
9024 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9025 if test $ac_cv_func_fseeko = yes; then
9026
9027 cat >>confdefs.h <<\EOF
9028 #define HAVE_FSEEKO 1
9029 EOF
9030
9031 fi
9032
9033         # Normally we would collect these definitions in the config.h,
9034         # but (like _XOPEN_SOURCE), some environments rely on having these
9035         # defined before any of the system headers are included.  Another
9036         # case comes up with C++, e.g., on AIX the compiler compiles the
9037         # header files by themselves before looking at the body files it is
9038         # told to compile.  For ncurses, those header files do not include
9039         # the config.h
9040         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9041         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9042         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9043
9044         echo "$as_me:9044: checking whether to use struct dirent64" >&5
9045 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9046 if test "${cf_cv_struct_dirent64+set}" = set; then
9047   echo $ECHO_N "(cached) $ECHO_C" >&6
9048 else
9049
9050                 cat >conftest.$ac_ext <<_ACEOF
9051 #line 9051 "configure"
9052 #include "confdefs.h"
9053
9054 #include <sys/types.h>
9055 #include <dirent.h>
9056
9057 int
9058 main ()
9059 {
9060
9061                 /* if transitional largefile support is setup, this is true */
9062                 extern struct dirent64 * readdir(DIR *);
9063                 struct dirent64 *x = readdir((DIR *)0);
9064                 struct dirent *y = readdir((DIR *)0);
9065                 int z = x - y;
9066
9067   ;
9068   return 0;
9069 }
9070 _ACEOF
9071 rm -f conftest.$ac_objext
9072 if { (eval echo "$as_me:9072: \"$ac_compile\"") >&5
9073   (eval $ac_compile) 2>&5
9074   ac_status=$?
9075   echo "$as_me:9075: \$? = $ac_status" >&5
9076   (exit $ac_status); } &&
9077          { ac_try='test -s conftest.$ac_objext'
9078   { (eval echo "$as_me:9078: \"$ac_try\"") >&5
9079   (eval $ac_try) 2>&5
9080   ac_status=$?
9081   echo "$as_me:9081: \$? = $ac_status" >&5
9082   (exit $ac_status); }; }; then
9083   cf_cv_struct_dirent64=yes
9084 else
9085   echo "$as_me: failed program was:" >&5
9086 cat conftest.$ac_ext >&5
9087 cf_cv_struct_dirent64=no
9088 fi
9089 rm -f conftest.$ac_objext conftest.$ac_ext
9090
9091 fi
9092 echo "$as_me:9092: result: $cf_cv_struct_dirent64" >&5
9093 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9094         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9095 #define HAVE_STRUCT_DIRENT64 1
9096 EOF
9097
9098     fi
9099
9100 ### Enable compiling-in rcs id's
9101 echo "$as_me:9101: checking if RCS identifiers should be compiled-in" >&5
9102 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9103
9104 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9105 if test "${with_rcs_ids+set}" = set; then
9106   withval="$with_rcs_ids"
9107   with_rcs_ids=$withval
9108 else
9109   with_rcs_ids=no
9110 fi;
9111 echo "$as_me:9111: result: $with_rcs_ids" >&5
9112 echo "${ECHO_T}$with_rcs_ids" >&6
9113 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9114 #define USE_RCS_IDS 1
9115 EOF
9116
9117 ###############################################################################
9118
9119 ### Note that some functions (such as const) are normally disabled anyway.
9120 echo "$as_me:9120: checking if you want to build with function extensions" >&5
9121 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9122
9123 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9124 if test "${enable_ext_funcs+set}" = set; then
9125   enableval="$enable_ext_funcs"
9126   with_ext_funcs=$enableval
9127 else
9128   with_ext_funcs=yes
9129 fi;
9130 echo "$as_me:9130: result: $with_ext_funcs" >&5
9131 echo "${ECHO_T}$with_ext_funcs" >&6
9132 if test "$with_ext_funcs" = yes ; then
9133         NCURSES_EXT_FUNCS=1
9134         cat >>confdefs.h <<\EOF
9135 #define HAVE_USE_DEFAULT_COLORS 1
9136 EOF
9137
9138         cat >>confdefs.h <<\EOF
9139 #define NCURSES_EXT_FUNCS 1
9140 EOF
9141
9142 else
9143         NCURSES_EXT_FUNCS=0
9144 fi
9145
9146 ###   use option --enable-const to turn on use of const beyond that in XSI.
9147 echo "$as_me:9147: checking for extended use of const keyword" >&5
9148 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9149
9150 # Check whether --enable-const or --disable-const was given.
9151 if test "${enable_const+set}" = set; then
9152   enableval="$enable_const"
9153   with_ext_const=$enableval
9154 else
9155   with_ext_const=no
9156 fi;
9157 echo "$as_me:9157: result: $with_ext_const" >&5
9158 echo "${ECHO_T}$with_ext_const" >&6
9159 NCURSES_CONST='/*nothing*/'
9160 if test "$with_ext_const" = yes ; then
9161         NCURSES_CONST=const
9162 fi
9163
9164 ###############################################################################
9165 # These options are relatively safe to experiment with.
9166
9167 echo "$as_me:9167: checking if you want all development code" >&5
9168 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9169
9170 # Check whether --with-develop or --without-develop was given.
9171 if test "${with_develop+set}" = set; then
9172   withval="$with_develop"
9173   with_develop=$withval
9174 else
9175   with_develop=no
9176 fi;
9177 echo "$as_me:9177: result: $with_develop" >&5
9178 echo "${ECHO_T}$with_develop" >&6
9179
9180 ###############################################################################
9181 # These are just experimental, probably should not be in a package:
9182
9183 # This is still experimental (20080329), but should ultimately be moved to
9184 # the script-block --with-normal, etc.
9185
9186 echo "$as_me:9186: checking if you want to link with the pthread library" >&5
9187 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9188
9189 # Check whether --with-pthread or --without-pthread was given.
9190 if test "${with_pthread+set}" = set; then
9191   withval="$with_pthread"
9192   with_pthread=$withval
9193 else
9194   with_pthread=no
9195 fi;
9196 echo "$as_me:9196: result: $with_pthread" >&5
9197 echo "${ECHO_T}$with_pthread" >&6
9198
9199 if test "$with_pthread" != no ; then
9200     echo "$as_me:9200: checking for pthread.h" >&5
9201 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9202 if test "${ac_cv_header_pthread_h+set}" = set; then
9203   echo $ECHO_N "(cached) $ECHO_C" >&6
9204 else
9205   cat >conftest.$ac_ext <<_ACEOF
9206 #line 9206 "configure"
9207 #include "confdefs.h"
9208 #include <pthread.h>
9209 _ACEOF
9210 if { (eval echo "$as_me:9210: \"$ac_cpp conftest.$ac_ext\"") >&5
9211   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9212   ac_status=$?
9213   egrep -v '^ *\+' conftest.er1 >conftest.err
9214   rm -f conftest.er1
9215   cat conftest.err >&5
9216   echo "$as_me:9216: \$? = $ac_status" >&5
9217   (exit $ac_status); } >/dev/null; then
9218   if test -s conftest.err; then
9219     ac_cpp_err=$ac_c_preproc_warn_flag
9220   else
9221     ac_cpp_err=
9222   fi
9223 else
9224   ac_cpp_err=yes
9225 fi
9226 if test -z "$ac_cpp_err"; then
9227   ac_cv_header_pthread_h=yes
9228 else
9229   echo "$as_me: failed program was:" >&5
9230   cat conftest.$ac_ext >&5
9231   ac_cv_header_pthread_h=no
9232 fi
9233 rm -f conftest.err conftest.$ac_ext
9234 fi
9235 echo "$as_me:9235: result: $ac_cv_header_pthread_h" >&5
9236 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9237 if test $ac_cv_header_pthread_h = yes; then
9238
9239         cat >>confdefs.h <<\EOF
9240 #define HAVE_PTHREADS_H 1
9241 EOF
9242
9243         echo "$as_me:9243: checking if we can link with the pthread library" >&5
9244 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9245         cf_save_LIBS="$LIBS"
9246         LIBS="-lpthread $LIBS"
9247         cat >conftest.$ac_ext <<_ACEOF
9248 #line 9248 "configure"
9249 #include "confdefs.h"
9250
9251 #include <pthread.h>
9252
9253 int
9254 main ()
9255 {
9256
9257         int rc = pthread_create(0,0,0,0);
9258
9259   ;
9260   return 0;
9261 }
9262 _ACEOF
9263 rm -f conftest.$ac_objext conftest$ac_exeext
9264 if { (eval echo "$as_me:9264: \"$ac_link\"") >&5
9265   (eval $ac_link) 2>&5
9266   ac_status=$?
9267   echo "$as_me:9267: \$? = $ac_status" >&5
9268   (exit $ac_status); } &&
9269          { ac_try='test -s conftest$ac_exeext'
9270   { (eval echo "$as_me:9270: \"$ac_try\"") >&5
9271   (eval $ac_try) 2>&5
9272   ac_status=$?
9273   echo "$as_me:9273: \$? = $ac_status" >&5
9274   (exit $ac_status); }; }; then
9275   with_pthread=yes
9276 else
9277   echo "$as_me: failed program was:" >&5
9278 cat conftest.$ac_ext >&5
9279 with_pthread=no
9280 fi
9281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9282         LIBS="$cf_save_LIBS"
9283         echo "$as_me:9283: result: $with_pthread" >&5
9284 echo "${ECHO_T}$with_pthread" >&6
9285
9286         if test "$with_pthread" = yes ; then
9287             LIBS="-lpthread $LIBS"
9288             cat >>confdefs.h <<\EOF
9289 #define HAVE_LIBPTHREADS 1
9290 EOF
9291
9292         else
9293             { { echo "$as_me:9293: error: Cannot link with pthread library" >&5
9294 echo "$as_me: error: Cannot link with pthread library" >&2;}
9295    { (exit 1); exit 1; }; }
9296         fi
9297
9298 fi
9299
9300 fi
9301
9302 echo "$as_me:9302: checking if you want to use weak-symbols for pthreads" >&5
9303 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9304
9305 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9306 if test "${enable_weak_symbols+set}" = set; then
9307   enableval="$enable_weak_symbols"
9308   use_weak_symbols=$withval
9309 else
9310   use_weak_symbols=no
9311 fi;
9312 echo "$as_me:9312: result: $use_weak_symbols" >&5
9313 echo "${ECHO_T}$use_weak_symbols" >&6
9314 if test "$use_weak_symbols" = yes ; then
9315
9316 echo "$as_me:9316: checking if $CC supports weak symbols" >&5
9317 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9318 if test "${cf_cv_weak_symbols+set}" = set; then
9319   echo $ECHO_N "(cached) $ECHO_C" >&6
9320 else
9321
9322 cat >conftest.$ac_ext <<_ACEOF
9323 #line 9323 "configure"
9324 #include "confdefs.h"
9325
9326 #include <stdio.h>
9327 int
9328 main ()
9329 {
9330
9331 #if defined(__GNUC__)
9332 #  if defined __USE_ISOC99
9333 #    define _cat_pragma(exp)    _Pragma(#exp)
9334 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9335 #  else
9336 #    define _weak_pragma(exp)
9337 #  endif
9338 #  define _declare(name)        __extension__ extern __typeof__(name) name
9339 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9340 #endif
9341
9342 weak_symbol(fopen);
9343
9344   ;
9345   return 0;
9346 }
9347 _ACEOF
9348 rm -f conftest.$ac_objext
9349 if { (eval echo "$as_me:9349: \"$ac_compile\"") >&5
9350   (eval $ac_compile) 2>&5
9351   ac_status=$?
9352   echo "$as_me:9352: \$? = $ac_status" >&5
9353   (exit $ac_status); } &&
9354          { ac_try='test -s conftest.$ac_objext'
9355   { (eval echo "$as_me:9355: \"$ac_try\"") >&5
9356   (eval $ac_try) 2>&5
9357   ac_status=$?
9358   echo "$as_me:9358: \$? = $ac_status" >&5
9359   (exit $ac_status); }; }; then
9360   cf_cv_weak_symbols=yes
9361 else
9362   echo "$as_me: failed program was:" >&5
9363 cat conftest.$ac_ext >&5
9364 cf_cv_weak_symbols=no
9365 fi
9366 rm -f conftest.$ac_objext conftest.$ac_ext
9367
9368 fi
9369 echo "$as_me:9369: result: $cf_cv_weak_symbols" >&5
9370 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9371
9372 else
9373     cf_cv_weak_symbols=no
9374 fi
9375
9376 if test $cf_cv_weak_symbols = yes ; then
9377     cat >>confdefs.h <<\EOF
9378 #define USE_WEAK_SYMBOLS 1
9379 EOF
9380
9381 fi
9382
9383 PTHREAD=
9384 if test "$with_pthread" = "yes" ; then
9385     cat >>confdefs.h <<\EOF
9386 #define USE_PTHREADS 1
9387 EOF
9388
9389     enable_reentrant=yes
9390     if test $cf_cv_weak_symbols = yes ; then
9391         PTHREAD=-lpthread
9392     fi
9393 fi
9394
9395 # OpenSUSE is installing ncurses6, using reentrant option.
9396 echo "$as_me:9396: checking for _nc_TABSIZE" >&5
9397 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
9398 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
9399   echo $ECHO_N "(cached) $ECHO_C" >&6
9400 else
9401   cat >conftest.$ac_ext <<_ACEOF
9402 #line 9402 "configure"
9403 #include "confdefs.h"
9404 /* System header to define __stub macros and hopefully few prototypes,
9405     which can conflict with char _nc_TABSIZE (); below.  */
9406 #include <assert.h>
9407 /* Override any gcc2 internal prototype to avoid an error.  */
9408 #ifdef __cplusplus
9409 extern "C"
9410 #endif
9411 /* We use char because int might match the return type of a gcc2
9412    builtin and then its argument prototype would still apply.  */
9413 char _nc_TABSIZE ();
9414 char (*f) ();
9415
9416 int
9417 main ()
9418 {
9419 /* The GNU C library defines this for functions which it implements
9420     to always fail with ENOSYS.  Some functions are actually named
9421     something starting with __ and the normal name is an alias.  */
9422 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
9423 choke me
9424 #else
9425 f = _nc_TABSIZE;
9426 #endif
9427
9428   ;
9429   return 0;
9430 }
9431 _ACEOF
9432 rm -f conftest.$ac_objext conftest$ac_exeext
9433 if { (eval echo "$as_me:9433: \"$ac_link\"") >&5
9434   (eval $ac_link) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); } &&
9438          { ac_try='test -s conftest$ac_exeext'
9439   { (eval echo "$as_me:9439: \"$ac_try\"") >&5
9440   (eval $ac_try) 2>&5
9441   ac_status=$?
9442   echo "$as_me:9442: \$? = $ac_status" >&5
9443   (exit $ac_status); }; }; then
9444   ac_cv_func__nc_TABSIZE=yes
9445 else
9446   echo "$as_me: failed program was:" >&5
9447 cat conftest.$ac_ext >&5
9448 ac_cv_func__nc_TABSIZE=no
9449 fi
9450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9451 fi
9452 echo "$as_me:9452: result: $ac_cv_func__nc_TABSIZE" >&5
9453 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
9454 if test $ac_cv_func__nc_TABSIZE = yes; then
9455   assume_reentrant=yes
9456 else
9457   assume_reentrant=no
9458 fi
9459
9460 # Reentrant code has to be opaque; there's little advantage to making ncurses
9461 # opaque outside of that, so there is no --enable-opaque option.  We can use
9462 # this option without --with-pthreads, but this will be always set for
9463 # pthreads.
9464 echo "$as_me:9464: checking if you want experimental reentrant code" >&5
9465 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9466
9467 # Check whether --enable-reentrant or --disable-reentrant was given.
9468 if test "${enable_reentrant+set}" = set; then
9469   enableval="$enable_reentrant"
9470   with_reentrant=$enableval
9471 else
9472   with_reentrant=$assume_reentrant
9473 fi;
9474 echo "$as_me:9474: result: $with_reentrant" >&5
9475 echo "${ECHO_T}$with_reentrant" >&6
9476 if test "$with_reentrant" = yes ; then
9477         cf_cv_enable_reentrant=1
9478         if test $cf_cv_weak_symbols = yes ; then
9479
9480 # remove pthread library from $LIBS
9481 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9482
9483         elif test "$assume_reentrant" = no ; then
9484                 LIB_SUFFIX="t${LIB_SUFFIX}"
9485         fi
9486         cat >>confdefs.h <<\EOF
9487 #define USE_REENTRANT 1
9488 EOF
9489
9490 else
9491         cf_cv_enable_reentrant=0
9492 fi
9493
9494 ### Allow using a different wrap-prefix
9495 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9496         echo "$as_me:9496: checking for prefix used to wrap public variables" >&5
9497 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9498
9499 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9500 if test "${with_wrap_prefix+set}" = set; then
9501   withval="$with_wrap_prefix"
9502   NCURSES_WRAP_PREFIX=$withval
9503 else
9504   NCURSES_WRAP_PREFIX=_nc_
9505 fi;
9506         echo "$as_me:9506: result: $NCURSES_WRAP_PREFIX" >&5
9507 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9508 else
9509         NCURSES_WRAP_PREFIX=_nc_
9510 fi
9511
9512 cat >>confdefs.h <<EOF
9513 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
9514 EOF
9515
9516 ###############################################################################
9517
9518 ###     use option --disable-echo to suppress full display compiling commands
9519 echo "$as_me:9519: checking if you want to display full commands during build" >&5
9520 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9521
9522 # Check whether --enable-echo or --disable-echo was given.
9523 if test "${enable_echo+set}" = set; then
9524   enableval="$enable_echo"
9525   with_echo=$enableval
9526 else
9527   with_echo=yes
9528 fi;
9529 if test "$with_echo" = yes; then
9530         ECHO_LINK=
9531 else
9532         ECHO_LINK='@ echo linking $@ ... ;'
9533 fi
9534 echo "$as_me:9534: result: $with_echo" >&5
9535 echo "${ECHO_T}$with_echo" >&6
9536
9537 ###     use option --enable-warnings to turn on all gcc warnings
9538 echo "$as_me:9538: checking if you want to see compiler warnings" >&5
9539 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9540
9541 # Check whether --enable-warnings or --disable-warnings was given.
9542 if test "${enable_warnings+set}" = set; then
9543   enableval="$enable_warnings"
9544   with_warnings=$enableval
9545 fi;
9546 echo "$as_me:9546: result: $with_warnings" >&5
9547 echo "${ECHO_T}$with_warnings" >&6
9548
9549 if test "x$with_warnings" = "xyes"; then
9550
9551         ADAFLAGS="$ADAFLAGS -gnatg"
9552
9553 INTEL_COMPILER=no
9554
9555 if test "$GCC" = yes ; then
9556         case $host_os in
9557         linux*|gnu*)
9558                 echo "$as_me:9558: checking if this is really Intel C compiler" >&5
9559 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9560                 cf_save_CFLAGS="$CFLAGS"
9561                 CFLAGS="$CFLAGS -no-gcc"
9562                 cat >conftest.$ac_ext <<_ACEOF
9563 #line 9563 "configure"
9564 #include "confdefs.h"
9565
9566 int
9567 main ()
9568 {
9569
9570 #ifdef __INTEL_COMPILER
9571 #else
9572 make an error
9573 #endif
9574
9575   ;
9576   return 0;
9577 }
9578 _ACEOF
9579 rm -f conftest.$ac_objext
9580 if { (eval echo "$as_me:9580: \"$ac_compile\"") >&5
9581   (eval $ac_compile) 2>&5
9582   ac_status=$?
9583   echo "$as_me:9583: \$? = $ac_status" >&5
9584   (exit $ac_status); } &&
9585          { ac_try='test -s conftest.$ac_objext'
9586   { (eval echo "$as_me:9586: \"$ac_try\"") >&5
9587   (eval $ac_try) 2>&5
9588   ac_status=$?
9589   echo "$as_me:9589: \$? = $ac_status" >&5
9590   (exit $ac_status); }; }; then
9591   INTEL_COMPILER=yes
9592 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9593
9594 else
9595   echo "$as_me: failed program was:" >&5
9596 cat conftest.$ac_ext >&5
9597 fi
9598 rm -f conftest.$ac_objext conftest.$ac_ext
9599                 CFLAGS="$cf_save_CFLAGS"
9600                 echo "$as_me:9600: result: $INTEL_COMPILER" >&5
9601 echo "${ECHO_T}$INTEL_COMPILER" >&6
9602                 ;;
9603         esac
9604 fi
9605
9606 cat > conftest.$ac_ext <<EOF
9607 #line 9607 "${as_me:-configure}"
9608 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9609 EOF
9610
9611 if test "$INTEL_COMPILER" = yes
9612 then
9613 # The "-wdXXX" options suppress warnings:
9614 # remark #1419: external declaration in primary source file
9615 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9616 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9617 # remark #193: zero used for undefined preprocessing identifier
9618 # remark #593: variable "curs_sb_left_arrow" was set but never used
9619 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9620 # remark #869: parameter "tw" was never referenced
9621 # remark #981: operands are evaluated in unspecified order
9622 # warning #279: controlling expression is constant
9623
9624         { echo "$as_me:9624: checking for $CC warning options..." >&5
9625 echo "$as_me: checking for $CC warning options..." >&6;}
9626         cf_save_CFLAGS="$CFLAGS"
9627         EXTRA_CFLAGS="-Wall"
9628         for cf_opt in \
9629                 wd1419 \
9630                 wd1683 \
9631                 wd1684 \
9632                 wd193 \
9633                 wd593 \
9634                 wd279 \
9635                 wd810 \
9636                 wd869 \
9637                 wd981
9638         do
9639                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9640                 if { (eval echo "$as_me:9640: \"$ac_compile\"") >&5
9641   (eval $ac_compile) 2>&5
9642   ac_status=$?
9643   echo "$as_me:9643: \$? = $ac_status" >&5
9644   (exit $ac_status); }; then
9645                         test -n "$verbose" && echo "$as_me:9645: result: ... -$cf_opt" >&5
9646 echo "${ECHO_T}... -$cf_opt" >&6
9647                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9648                 fi
9649         done
9650         CFLAGS="$cf_save_CFLAGS"
9651
9652 elif test "$GCC" = yes
9653 then
9654         { echo "$as_me:9654: checking for $CC warning options..." >&5
9655 echo "$as_me: checking for $CC warning options..." >&6;}
9656         cf_save_CFLAGS="$CFLAGS"
9657         EXTRA_CFLAGS=
9658         cf_warn_CONST=""
9659         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9660         for cf_opt in W Wall \
9661                 Wbad-function-cast \
9662                 Wcast-align \
9663                 Wcast-qual \
9664                 Winline \
9665                 Wmissing-declarations \
9666                 Wmissing-prototypes \
9667                 Wnested-externs \
9668                 Wpointer-arith \
9669                 Wshadow \
9670                 Wstrict-prototypes \
9671                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9672         do
9673                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9674                 if { (eval echo "$as_me:9674: \"$ac_compile\"") >&5
9675   (eval $ac_compile) 2>&5
9676   ac_status=$?
9677   echo "$as_me:9677: \$? = $ac_status" >&5
9678   (exit $ac_status); }; then
9679                         test -n "$verbose" && echo "$as_me:9679: result: ... -$cf_opt" >&5
9680 echo "${ECHO_T}... -$cf_opt" >&6
9681                         case $cf_opt in #(vi
9682                         Wcast-qual) #(vi
9683                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9684                                 ;;
9685                         Winline) #(vi
9686                                 case $GCC_VERSION in
9687                                 [34].*)
9688                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9689
9690 echo "${as_me:-configure}:9690: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9691
9692                                         continue;;
9693                                 esac
9694                                 ;;
9695                         esac
9696                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9697                 fi
9698         done
9699         CFLAGS="$cf_save_CFLAGS"
9700 fi
9701 rm -rf conftest*
9702
9703 fi
9704
9705 if test "$GCC" = yes
9706 then
9707 cat > conftest.i <<EOF
9708 #ifndef GCC_PRINTF
9709 #define GCC_PRINTF 0
9710 #endif
9711 #ifndef GCC_SCANF
9712 #define GCC_SCANF 0
9713 #endif
9714 #ifndef GCC_NORETURN
9715 #define GCC_NORETURN /* nothing */
9716 #endif
9717 #ifndef GCC_UNUSED
9718 #define GCC_UNUSED /* nothing */
9719 #endif
9720 EOF
9721 if test "$GCC" = yes
9722 then
9723         { echo "$as_me:9723: checking for $CC __attribute__ directives..." >&5
9724 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9725 cat > conftest.$ac_ext <<EOF
9726 #line 9726 "${as_me:-configure}"
9727 #include "confdefs.h"
9728 #include "conftest.h"
9729 #include "conftest.i"
9730 #if     GCC_PRINTF
9731 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9732 #else
9733 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9734 #endif
9735 #if     GCC_SCANF
9736 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9737 #else
9738 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9739 #endif
9740 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9741 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9742 extern void foo(void) GCC_NORETURN;
9743 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9744 EOF
9745         cf_printf_attribute=no
9746         cf_scanf_attribute=no
9747         for cf_attribute in scanf printf unused noreturn
9748         do
9749
9750 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9751
9752                 cf_directive="__attribute__(($cf_attribute))"
9753                 echo "checking for $CC $cf_directive" 1>&5
9754
9755                 case $cf_attribute in #(vi
9756                 printf) #(vi
9757                         cf_printf_attribute=yes
9758                         cat >conftest.h <<EOF
9759 #define GCC_$cf_ATTRIBUTE 1
9760 EOF
9761                         ;;
9762                 scanf) #(vi
9763                         cf_scanf_attribute=yes
9764                         cat >conftest.h <<EOF
9765 #define GCC_$cf_ATTRIBUTE 1
9766 EOF
9767                         ;;
9768                 *) #(vi
9769                         cat >conftest.h <<EOF
9770 #define GCC_$cf_ATTRIBUTE $cf_directive
9771 EOF
9772                         ;;
9773                 esac
9774
9775                 if { (eval echo "$as_me:9775: \"$ac_compile\"") >&5
9776   (eval $ac_compile) 2>&5
9777   ac_status=$?
9778   echo "$as_me:9778: \$? = $ac_status" >&5
9779   (exit $ac_status); }; then
9780                         test -n "$verbose" && echo "$as_me:9780: result: ... $cf_attribute" >&5
9781 echo "${ECHO_T}... $cf_attribute" >&6
9782                         cat conftest.h >>confdefs.h
9783                         case $cf_attribute in #(vi
9784                         printf) #(vi
9785                                 if test "$cf_printf_attribute" = no ; then
9786                                         cat >>confdefs.h <<EOF
9787 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
9788 EOF
9789                                 else
9790                                         cat >>confdefs.h <<EOF
9791 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9792 EOF
9793                                 fi
9794                                 ;;
9795                         scanf) #(vi
9796                                 if test "$cf_scanf_attribute" = no ; then
9797                                         cat >>confdefs.h <<EOF
9798 #define GCC_SCANFLIKE(fmt,var) /* nothing */
9799 EOF
9800                                 else
9801                                         cat >>confdefs.h <<EOF
9802 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9803 EOF
9804                                 fi
9805                                 ;;
9806                         esac
9807                 fi
9808         done
9809 else
9810         fgrep define conftest.i >>confdefs.h
9811 fi
9812 rm -rf conftest*
9813 fi
9814
9815 ###     use option --enable-assertions to turn on generation of assertion code
9816 echo "$as_me:9816: checking if you want to enable runtime assertions" >&5
9817 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9818
9819 # Check whether --enable-assertions or --disable-assertions was given.
9820 if test "${enable_assertions+set}" = set; then
9821   enableval="$enable_assertions"
9822   with_assertions=$enableval
9823 else
9824   with_assertions=no
9825 fi;
9826 echo "$as_me:9826: result: $with_assertions" >&5
9827 echo "${ECHO_T}$with_assertions" >&6
9828 if test -n "$GCC"
9829 then
9830         if test "$with_assertions" = no
9831         then
9832                 cat >>confdefs.h <<\EOF
9833 #define NDEBUG 1
9834 EOF
9835
9836                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9837         else
9838
9839         ADAFLAGS="$ADAFLAGS -gnata"
9840
9841         fi
9842 fi
9843
9844 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9845 cat >>confdefs.h <<\EOF
9846 #define HAVE_NC_ALLOC_H 1
9847 EOF
9848
9849 ###     use option --enable-expanded to generate certain macros as functions
9850
9851 # Check whether --enable-expanded or --disable-expanded was given.
9852 if test "${enable_expanded+set}" = set; then
9853   enableval="$enable_expanded"
9854   test "$enableval" = yes && cat >>confdefs.h <<\EOF
9855 #define NCURSES_EXPANDED 1
9856 EOF
9857
9858 fi;
9859
9860 ###     use option --disable-macros to suppress macros in favor of functions
9861
9862 # Check whether --enable-macros or --disable-macros was given.
9863 if test "${enable_macros+set}" = set; then
9864   enableval="$enable_macros"
9865   test "$enableval" = no && cat >>confdefs.h <<\EOF
9866 #define NCURSES_NOMACROS 1
9867 EOF
9868
9869 fi;
9870
9871 # Normally we only add trace() to the debug-library.  Allow this to be
9872 # extended to all models of the ncurses library:
9873 cf_all_traces=no
9874 case "$CFLAGS $CPPFLAGS" in
9875 *-DTRACE*)
9876         cf_all_traces=yes
9877         ;;
9878 esac
9879
9880 echo "$as_me:9880: checking whether to add trace feature to all models" >&5
9881 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
9882
9883 # Check whether --with-trace or --without-trace was given.
9884 if test "${with_trace+set}" = set; then
9885   withval="$with_trace"
9886   cf_with_trace=$withval
9887 else
9888   cf_with_trace=$cf_all_traces
9889 fi;
9890 echo "$as_me:9890: result: $cf_with_trace" >&5
9891 echo "${ECHO_T}$cf_with_trace" >&6
9892
9893 if test "$cf_with_trace" = yes ; then
9894         ADA_TRACE=TRUE
9895
9896 cf_fix_cppflags=no
9897 cf_new_cflags=
9898 cf_new_cppflags=
9899 cf_new_extra_cppflags=
9900
9901 for cf_add_cflags in -DTRACE
9902 do
9903 case $cf_fix_cppflags in
9904 no)
9905         case $cf_add_cflags in #(vi
9906         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9907                 case $cf_add_cflags in
9908                 -D*)
9909                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9910
9911                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9912                                 && test -z "${cf_tst_cflags}" \
9913                                 && cf_fix_cppflags=yes
9914
9915                         if test $cf_fix_cppflags = yes ; then
9916                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9917                                 continue
9918                         elif test "${cf_tst_cflags}" = "\"'" ; then
9919                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9920                                 continue
9921                         fi
9922                         ;;
9923                 esac
9924                 case "$CPPFLAGS" in
9925                 *$cf_add_cflags) #(vi
9926                         ;;
9927                 *) #(vi
9928                         case $cf_add_cflags in #(vi
9929                         -D*)
9930                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9931
9932 CPPFLAGS=`echo "$CPPFLAGS" | \
9933         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9934                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9935
9936                                 ;;
9937                         esac
9938                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9939                         ;;
9940                 esac
9941                 ;;
9942         *)
9943                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9944                 ;;
9945         esac
9946         ;;
9947 yes)
9948         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9949
9950         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9951
9952         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9953                 && test -z "${cf_tst_cflags}" \
9954                 && cf_fix_cppflags=no
9955         ;;
9956 esac
9957 done
9958
9959 if test -n "$cf_new_cflags" ; then
9960
9961         CFLAGS="$CFLAGS $cf_new_cflags"
9962 fi
9963
9964 if test -n "$cf_new_cppflags" ; then
9965
9966         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9967 fi
9968
9969 if test -n "$cf_new_extra_cppflags" ; then
9970
9971         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9972 fi
9973
9974 else
9975         ADA_TRACE=FALSE
9976 fi
9977
9978 ###     Checks for libraries.
9979 case $cf_cv_system_name in #(vi
9980 *mingw32*) #(vi
9981         ;;
9982 *)
9983 echo "$as_me:9983: checking for gettimeofday" >&5
9984 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
9985 if test "${ac_cv_func_gettimeofday+set}" = set; then
9986   echo $ECHO_N "(cached) $ECHO_C" >&6
9987 else
9988   cat >conftest.$ac_ext <<_ACEOF
9989 #line 9989 "configure"
9990 #include "confdefs.h"
9991 /* System header to define __stub macros and hopefully few prototypes,
9992     which can conflict with char gettimeofday (); below.  */
9993 #include <assert.h>
9994 /* Override any gcc2 internal prototype to avoid an error.  */
9995 #ifdef __cplusplus
9996 extern "C"
9997 #endif
9998 /* We use char because int might match the return type of a gcc2
9999    builtin and then its argument prototype would still apply.  */
10000 char gettimeofday ();
10001 char (*f) ();
10002
10003 int
10004 main ()
10005 {
10006 /* The GNU C library defines this for functions which it implements
10007     to always fail with ENOSYS.  Some functions are actually named
10008     something starting with __ and the normal name is an alias.  */
10009 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10010 choke me
10011 #else
10012 f = gettimeofday;
10013 #endif
10014
10015   ;
10016   return 0;
10017 }
10018 _ACEOF
10019 rm -f conftest.$ac_objext conftest$ac_exeext
10020 if { (eval echo "$as_me:10020: \"$ac_link\"") >&5
10021   (eval $ac_link) 2>&5
10022   ac_status=$?
10023   echo "$as_me:10023: \$? = $ac_status" >&5
10024   (exit $ac_status); } &&
10025          { ac_try='test -s conftest$ac_exeext'
10026   { (eval echo "$as_me:10026: \"$ac_try\"") >&5
10027   (eval $ac_try) 2>&5
10028   ac_status=$?
10029   echo "$as_me:10029: \$? = $ac_status" >&5
10030   (exit $ac_status); }; }; then
10031   ac_cv_func_gettimeofday=yes
10032 else
10033   echo "$as_me: failed program was:" >&5
10034 cat conftest.$ac_ext >&5
10035 ac_cv_func_gettimeofday=no
10036 fi
10037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10038 fi
10039 echo "$as_me:10039: result: $ac_cv_func_gettimeofday" >&5
10040 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10041 if test $ac_cv_func_gettimeofday = yes; then
10042   cat >>confdefs.h <<\EOF
10043 #define HAVE_GETTIMEOFDAY 1
10044 EOF
10045
10046 else
10047
10048 echo "$as_me:10048: checking for gettimeofday in -lbsd" >&5
10049 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10050 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10051   echo $ECHO_N "(cached) $ECHO_C" >&6
10052 else
10053   ac_check_lib_save_LIBS=$LIBS
10054 LIBS="-lbsd  $LIBS"
10055 cat >conftest.$ac_ext <<_ACEOF
10056 #line 10056 "configure"
10057 #include "confdefs.h"
10058
10059 /* Override any gcc2 internal prototype to avoid an error.  */
10060 #ifdef __cplusplus
10061 extern "C"
10062 #endif
10063 /* We use char because int might match the return type of a gcc2
10064    builtin and then its argument prototype would still apply.  */
10065 char gettimeofday ();
10066 int
10067 main ()
10068 {
10069 gettimeofday ();
10070   ;
10071   return 0;
10072 }
10073 _ACEOF
10074 rm -f conftest.$ac_objext conftest$ac_exeext
10075 if { (eval echo "$as_me:10075: \"$ac_link\"") >&5
10076   (eval $ac_link) 2>&5
10077   ac_status=$?
10078   echo "$as_me:10078: \$? = $ac_status" >&5
10079   (exit $ac_status); } &&
10080          { ac_try='test -s conftest$ac_exeext'
10081   { (eval echo "$as_me:10081: \"$ac_try\"") >&5
10082   (eval $ac_try) 2>&5
10083   ac_status=$?
10084   echo "$as_me:10084: \$? = $ac_status" >&5
10085   (exit $ac_status); }; }; then
10086   ac_cv_lib_bsd_gettimeofday=yes
10087 else
10088   echo "$as_me: failed program was:" >&5
10089 cat conftest.$ac_ext >&5
10090 ac_cv_lib_bsd_gettimeofday=no
10091 fi
10092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10093 LIBS=$ac_check_lib_save_LIBS
10094 fi
10095 echo "$as_me:10095: result: $ac_cv_lib_bsd_gettimeofday" >&5
10096 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10097 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10098   cat >>confdefs.h <<\EOF
10099 #define HAVE_GETTIMEOFDAY 1
10100 EOF
10101
10102         LIBS="$LIBS -lbsd"
10103 fi
10104
10105 fi
10106         ;;
10107 esac
10108
10109 ###     Checks for header files.
10110 echo "$as_me:10110: checking for ANSI C header files" >&5
10111 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10112 if test "${ac_cv_header_stdc+set}" = set; then
10113   echo $ECHO_N "(cached) $ECHO_C" >&6
10114 else
10115   cat >conftest.$ac_ext <<_ACEOF
10116 #line 10116 "configure"
10117 #include "confdefs.h"
10118 #include <stdlib.h>
10119 #include <stdarg.h>
10120 #include <string.h>
10121 #include <float.h>
10122
10123 _ACEOF
10124 if { (eval echo "$as_me:10124: \"$ac_cpp conftest.$ac_ext\"") >&5
10125   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10126   ac_status=$?
10127   egrep -v '^ *\+' conftest.er1 >conftest.err
10128   rm -f conftest.er1
10129   cat conftest.err >&5
10130   echo "$as_me:10130: \$? = $ac_status" >&5
10131   (exit $ac_status); } >/dev/null; then
10132   if test -s conftest.err; then
10133     ac_cpp_err=$ac_c_preproc_warn_flag
10134   else
10135     ac_cpp_err=
10136   fi
10137 else
10138   ac_cpp_err=yes
10139 fi
10140 if test -z "$ac_cpp_err"; then
10141   ac_cv_header_stdc=yes
10142 else
10143   echo "$as_me: failed program was:" >&5
10144   cat conftest.$ac_ext >&5
10145   ac_cv_header_stdc=no
10146 fi
10147 rm -f conftest.err conftest.$ac_ext
10148
10149 if test $ac_cv_header_stdc = yes; then
10150   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10151   cat >conftest.$ac_ext <<_ACEOF
10152 #line 10152 "configure"
10153 #include "confdefs.h"
10154 #include <string.h>
10155
10156 _ACEOF
10157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10158   egrep "memchr" >/dev/null 2>&1; then
10159   :
10160 else
10161   ac_cv_header_stdc=no
10162 fi
10163 rm -rf conftest*
10164
10165 fi
10166
10167 if test $ac_cv_header_stdc = yes; then
10168   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10169   cat >conftest.$ac_ext <<_ACEOF
10170 #line 10170 "configure"
10171 #include "confdefs.h"
10172 #include <stdlib.h>
10173
10174 _ACEOF
10175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10176   egrep "free" >/dev/null 2>&1; then
10177   :
10178 else
10179   ac_cv_header_stdc=no
10180 fi
10181 rm -rf conftest*
10182
10183 fi
10184
10185 if test $ac_cv_header_stdc = yes; then
10186   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10187   if test "$cross_compiling" = yes; then
10188   :
10189 else
10190   cat >conftest.$ac_ext <<_ACEOF
10191 #line 10191 "configure"
10192 #include "confdefs.h"
10193 #include <ctype.h>
10194 #if ((' ' & 0x0FF) == 0x020)
10195 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10196 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10197 #else
10198 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10199                      || ('j' <= (c) && (c) <= 'r') \
10200                      || ('s' <= (c) && (c) <= 'z'))
10201 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10202 #endif
10203
10204 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10205 int
10206 main ()
10207 {
10208   int i;
10209   for (i = 0; i < 256; i++)
10210     if (XOR (islower (i), ISLOWER (i))
10211         || toupper (i) != TOUPPER (i))
10212       $ac_main_return(2);
10213   $ac_main_return (0);
10214 }
10215 _ACEOF
10216 rm -f conftest$ac_exeext
10217 if { (eval echo "$as_me:10217: \"$ac_link\"") >&5
10218   (eval $ac_link) 2>&5
10219   ac_status=$?
10220   echo "$as_me:10220: \$? = $ac_status" >&5
10221   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10222   { (eval echo "$as_me:10222: \"$ac_try\"") >&5
10223   (eval $ac_try) 2>&5
10224   ac_status=$?
10225   echo "$as_me:10225: \$? = $ac_status" >&5
10226   (exit $ac_status); }; }; then
10227   :
10228 else
10229   echo "$as_me: program exited with status $ac_status" >&5
10230 echo "$as_me: failed program was:" >&5
10231 cat conftest.$ac_ext >&5
10232 ac_cv_header_stdc=no
10233 fi
10234 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10235 fi
10236 fi
10237 fi
10238 echo "$as_me:10238: result: $ac_cv_header_stdc" >&5
10239 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10240 if test $ac_cv_header_stdc = yes; then
10241
10242 cat >>confdefs.h <<\EOF
10243 #define STDC_HEADERS 1
10244 EOF
10245
10246 fi
10247
10248 ac_header_dirent=no
10249 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10250   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10251 echo "$as_me:10251: checking for $ac_hdr that defines DIR" >&5
10252 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10253 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10254   echo $ECHO_N "(cached) $ECHO_C" >&6
10255 else
10256   cat >conftest.$ac_ext <<_ACEOF
10257 #line 10257 "configure"
10258 #include "confdefs.h"
10259 #include <sys/types.h>
10260 #include <$ac_hdr>
10261
10262 int
10263 main ()
10264 {
10265 if ((DIR *) 0)
10266 return 0;
10267   ;
10268   return 0;
10269 }
10270 _ACEOF
10271 rm -f conftest.$ac_objext
10272 if { (eval echo "$as_me:10272: \"$ac_compile\"") >&5
10273   (eval $ac_compile) 2>&5
10274   ac_status=$?
10275   echo "$as_me:10275: \$? = $ac_status" >&5
10276   (exit $ac_status); } &&
10277          { ac_try='test -s conftest.$ac_objext'
10278   { (eval echo "$as_me:10278: \"$ac_try\"") >&5
10279   (eval $ac_try) 2>&5
10280   ac_status=$?
10281   echo "$as_me:10281: \$? = $ac_status" >&5
10282   (exit $ac_status); }; }; then
10283   eval "$as_ac_Header=yes"
10284 else
10285   echo "$as_me: failed program was:" >&5
10286 cat conftest.$ac_ext >&5
10287 eval "$as_ac_Header=no"
10288 fi
10289 rm -f conftest.$ac_objext conftest.$ac_ext
10290 fi
10291 echo "$as_me:10291: result: `eval echo '${'$as_ac_Header'}'`" >&5
10292 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10293 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10294   cat >>confdefs.h <<EOF
10295 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10296 EOF
10297
10298 ac_header_dirent=$ac_hdr; break
10299 fi
10300
10301 done
10302 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10303 if test $ac_header_dirent = dirent.h; then
10304   echo "$as_me:10304: checking for opendir in -ldir" >&5
10305 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10306 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10307   echo $ECHO_N "(cached) $ECHO_C" >&6
10308 else
10309   ac_check_lib_save_LIBS=$LIBS
10310 LIBS="-ldir  $LIBS"
10311 cat >conftest.$ac_ext <<_ACEOF
10312 #line 10312 "configure"
10313 #include "confdefs.h"
10314
10315 /* Override any gcc2 internal prototype to avoid an error.  */
10316 #ifdef __cplusplus
10317 extern "C"
10318 #endif
10319 /* We use char because int might match the return type of a gcc2
10320    builtin and then its argument prototype would still apply.  */
10321 char opendir ();
10322 int
10323 main ()
10324 {
10325 opendir ();
10326   ;
10327   return 0;
10328 }
10329 _ACEOF
10330 rm -f conftest.$ac_objext conftest$ac_exeext
10331 if { (eval echo "$as_me:10331: \"$ac_link\"") >&5
10332   (eval $ac_link) 2>&5
10333   ac_status=$?
10334   echo "$as_me:10334: \$? = $ac_status" >&5
10335   (exit $ac_status); } &&
10336          { ac_try='test -s conftest$ac_exeext'
10337   { (eval echo "$as_me:10337: \"$ac_try\"") >&5
10338   (eval $ac_try) 2>&5
10339   ac_status=$?
10340   echo "$as_me:10340: \$? = $ac_status" >&5
10341   (exit $ac_status); }; }; then
10342   ac_cv_lib_dir_opendir=yes
10343 else
10344   echo "$as_me: failed program was:" >&5
10345 cat conftest.$ac_ext >&5
10346 ac_cv_lib_dir_opendir=no
10347 fi
10348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10349 LIBS=$ac_check_lib_save_LIBS
10350 fi
10351 echo "$as_me:10351: result: $ac_cv_lib_dir_opendir" >&5
10352 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10353 if test $ac_cv_lib_dir_opendir = yes; then
10354   LIBS="$LIBS -ldir"
10355 fi
10356
10357 else
10358   echo "$as_me:10358: checking for opendir in -lx" >&5
10359 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10360 if test "${ac_cv_lib_x_opendir+set}" = set; then
10361   echo $ECHO_N "(cached) $ECHO_C" >&6
10362 else
10363   ac_check_lib_save_LIBS=$LIBS
10364 LIBS="-lx  $LIBS"
10365 cat >conftest.$ac_ext <<_ACEOF
10366 #line 10366 "configure"
10367 #include "confdefs.h"
10368
10369 /* Override any gcc2 internal prototype to avoid an error.  */
10370 #ifdef __cplusplus
10371 extern "C"
10372 #endif
10373 /* We use char because int might match the return type of a gcc2
10374    builtin and then its argument prototype would still apply.  */
10375 char opendir ();
10376 int
10377 main ()
10378 {
10379 opendir ();
10380   ;
10381   return 0;
10382 }
10383 _ACEOF
10384 rm -f conftest.$ac_objext conftest$ac_exeext
10385 if { (eval echo "$as_me:10385: \"$ac_link\"") >&5
10386   (eval $ac_link) 2>&5
10387   ac_status=$?
10388   echo "$as_me:10388: \$? = $ac_status" >&5
10389   (exit $ac_status); } &&
10390          { ac_try='test -s conftest$ac_exeext'
10391   { (eval echo "$as_me:10391: \"$ac_try\"") >&5
10392   (eval $ac_try) 2>&5
10393   ac_status=$?
10394   echo "$as_me:10394: \$? = $ac_status" >&5
10395   (exit $ac_status); }; }; then
10396   ac_cv_lib_x_opendir=yes
10397 else
10398   echo "$as_me: failed program was:" >&5
10399 cat conftest.$ac_ext >&5
10400 ac_cv_lib_x_opendir=no
10401 fi
10402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10403 LIBS=$ac_check_lib_save_LIBS
10404 fi
10405 echo "$as_me:10405: result: $ac_cv_lib_x_opendir" >&5
10406 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10407 if test $ac_cv_lib_x_opendir = yes; then
10408   LIBS="$LIBS -lx"
10409 fi
10410
10411 fi
10412
10413 echo "$as_me:10413: checking whether time.h and sys/time.h may both be included" >&5
10414 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10415 if test "${ac_cv_header_time+set}" = set; then
10416   echo $ECHO_N "(cached) $ECHO_C" >&6
10417 else
10418   cat >conftest.$ac_ext <<_ACEOF
10419 #line 10419 "configure"
10420 #include "confdefs.h"
10421 #include <sys/types.h>
10422 #include <sys/time.h>
10423 #include <time.h>
10424
10425 int
10426 main ()
10427 {
10428 if ((struct tm *) 0)
10429 return 0;
10430   ;
10431   return 0;
10432 }
10433 _ACEOF
10434 rm -f conftest.$ac_objext
10435 if { (eval echo "$as_me:10435: \"$ac_compile\"") >&5
10436   (eval $ac_compile) 2>&5
10437   ac_status=$?
10438   echo "$as_me:10438: \$? = $ac_status" >&5
10439   (exit $ac_status); } &&
10440          { ac_try='test -s conftest.$ac_objext'
10441   { (eval echo "$as_me:10441: \"$ac_try\"") >&5
10442   (eval $ac_try) 2>&5
10443   ac_status=$?
10444   echo "$as_me:10444: \$? = $ac_status" >&5
10445   (exit $ac_status); }; }; then
10446   ac_cv_header_time=yes
10447 else
10448   echo "$as_me: failed program was:" >&5
10449 cat conftest.$ac_ext >&5
10450 ac_cv_header_time=no
10451 fi
10452 rm -f conftest.$ac_objext conftest.$ac_ext
10453 fi
10454 echo "$as_me:10454: result: $ac_cv_header_time" >&5
10455 echo "${ECHO_T}$ac_cv_header_time" >&6
10456 if test $ac_cv_header_time = yes; then
10457
10458 cat >>confdefs.h <<\EOF
10459 #define TIME_WITH_SYS_TIME 1
10460 EOF
10461
10462 fi
10463
10464 ###     checks for compiler characteristics
10465 ac_ext=c
10466 ac_cpp='$CPP $CPPFLAGS'
10467 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10468 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10469 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10470 ac_main_return=return
10471
10472 echo "$as_me:10472: checking for $CC option to accept ANSI C" >&5
10473 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
10474 if test "${ac_cv_prog_cc_stdc+set}" = set; then
10475   echo $ECHO_N "(cached) $ECHO_C" >&6
10476 else
10477   ac_cv_prog_cc_stdc=no
10478 ac_save_CC=$CC
10479 cat >conftest.$ac_ext <<_ACEOF
10480 #line 10480 "configure"
10481 #include "confdefs.h"
10482 #include <stdarg.h>
10483 #include <stdio.h>
10484 #include <sys/types.h>
10485 #include <sys/stat.h>
10486 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
10487 struct buf { int x; };
10488 FILE * (*rcsopen) (struct buf *, struct stat *, int);
10489 static char *e (p, i)
10490      char **p;
10491      int i;
10492 {
10493   return p[i];
10494 }
10495 static char *f (char * (*g) (char **, int), char **p, ...)
10496 {
10497   char *s;
10498   va_list v;
10499   va_start (v,p);
10500   s = g (p, va_arg (v,int));
10501   va_end (v);
10502   return s;
10503 }
10504 int test (int i, double x);
10505 struct s1 {int (*f) (int a);};
10506 struct s2 {int (*f) (double a);};
10507 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
10508 int argc;
10509 char **argv;
10510 int
10511 main ()
10512 {
10513 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
10514   ;
10515   return 0;
10516 }
10517 _ACEOF
10518 # Don't try gcc -ansi; that turns off useful extensions and
10519 # breaks some systems' header files.
10520 # AIX                   -qlanglvl=ansi
10521 # Ultrix and OSF/1      -std1
10522 # HP-UX 10.20 and later -Ae
10523 # HP-UX older versions  -Aa -D_HPUX_SOURCE
10524 # SVR4                  -Xc -D__EXTENSIONS__
10525 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10526 do
10527   CC="$ac_save_CC $ac_arg"
10528   rm -f conftest.$ac_objext
10529 if { (eval echo "$as_me:10529: \"$ac_compile\"") >&5
10530   (eval $ac_compile) 2>&5
10531   ac_status=$?
10532   echo "$as_me:10532: \$? = $ac_status" >&5
10533   (exit $ac_status); } &&
10534          { ac_try='test -s conftest.$ac_objext'
10535   { (eval echo "$as_me:10535: \"$ac_try\"") >&5
10536   (eval $ac_try) 2>&5
10537   ac_status=$?
10538   echo "$as_me:10538: \$? = $ac_status" >&5
10539   (exit $ac_status); }; }; then
10540   ac_cv_prog_cc_stdc=$ac_arg
10541 break
10542 else
10543   echo "$as_me: failed program was:" >&5
10544 cat conftest.$ac_ext >&5
10545 fi
10546 rm -f conftest.$ac_objext
10547 done
10548 rm -f conftest.$ac_ext conftest.$ac_objext
10549 CC=$ac_save_CC
10550
10551 fi
10552
10553 case "x$ac_cv_prog_cc_stdc" in
10554   x|xno)
10555     echo "$as_me:10555: result: none needed" >&5
10556 echo "${ECHO_T}none needed" >&6 ;;
10557   *)
10558     echo "$as_me:10558: result: $ac_cv_prog_cc_stdc" >&5
10559 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
10560     CC="$CC $ac_cv_prog_cc_stdc" ;;
10561 esac
10562
10563 echo "$as_me:10563: checking for an ANSI C-conforming const" >&5
10564 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10565 if test "${ac_cv_c_const+set}" = set; then
10566   echo $ECHO_N "(cached) $ECHO_C" >&6
10567 else
10568   cat >conftest.$ac_ext <<_ACEOF
10569 #line 10569 "configure"
10570 #include "confdefs.h"
10571
10572 int
10573 main ()
10574 {
10575 /* FIXME: Include the comments suggested by Paul. */
10576 #ifndef __cplusplus
10577   /* Ultrix mips cc rejects this.  */
10578   typedef int charset[2];
10579   const charset x;
10580   /* SunOS 4.1.1 cc rejects this.  */
10581   char const *const *ccp;
10582   char **p;
10583   /* NEC SVR4.0.2 mips cc rejects this.  */
10584   struct point {int x, y;};
10585   static struct point const zero = {0,0};
10586   /* AIX XL C 1.02.0.0 rejects this.
10587      It does not let you subtract one const X* pointer from another in
10588      an arm of an if-expression whose if-part is not a constant
10589      expression */
10590   const char *g = "string";
10591   ccp = &g + (g ? g-g : 0);
10592   /* HPUX 7.0 cc rejects these. */
10593   ++ccp;
10594   p = (char**) ccp;
10595   ccp = (char const *const *) p;
10596   { /* SCO 3.2v4 cc rejects this.  */
10597     char *t;
10598     char const *s = 0 ? (char *) 0 : (char const *) 0;
10599
10600     *t++ = 0;
10601   }
10602   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10603     int x[] = {25, 17};
10604     const int *foo = &x[0];
10605     ++foo;
10606   }
10607   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10608     typedef const int *iptr;
10609     iptr p = 0;
10610     ++p;
10611   }
10612   { /* AIX XL C 1.02.0.0 rejects this saying
10613        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10614     struct s { int j; const int *ap[3]; };
10615     struct s *b; b->j = 5;
10616   }
10617   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10618     const int foo = 10;
10619   }
10620 #endif
10621
10622   ;
10623   return 0;
10624 }
10625 _ACEOF
10626 rm -f conftest.$ac_objext
10627 if { (eval echo "$as_me:10627: \"$ac_compile\"") >&5
10628   (eval $ac_compile) 2>&5
10629   ac_status=$?
10630   echo "$as_me:10630: \$? = $ac_status" >&5
10631   (exit $ac_status); } &&
10632          { ac_try='test -s conftest.$ac_objext'
10633   { (eval echo "$as_me:10633: \"$ac_try\"") >&5
10634   (eval $ac_try) 2>&5
10635   ac_status=$?
10636   echo "$as_me:10636: \$? = $ac_status" >&5
10637   (exit $ac_status); }; }; then
10638   ac_cv_c_const=yes
10639 else
10640   echo "$as_me: failed program was:" >&5
10641 cat conftest.$ac_ext >&5
10642 ac_cv_c_const=no
10643 fi
10644 rm -f conftest.$ac_objext conftest.$ac_ext
10645 fi
10646 echo "$as_me:10646: result: $ac_cv_c_const" >&5
10647 echo "${ECHO_T}$ac_cv_c_const" >&6
10648 if test $ac_cv_c_const = no; then
10649
10650 cat >>confdefs.h <<\EOF
10651 #define const
10652 EOF
10653
10654 fi
10655
10656 ###     Checks for external-data
10657
10658 echo "$as_me:10658: checking if data-only library module links" >&5
10659 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
10660 if test "${cf_cv_link_dataonly+set}" = set; then
10661   echo $ECHO_N "(cached) $ECHO_C" >&6
10662 else
10663
10664         rm -f conftest.a
10665         cat >conftest.$ac_ext <<EOF
10666 #line 10666 "configure"
10667 int     testdata[3] = { 123, 456, 789 };
10668 EOF
10669         if { (eval echo "$as_me:10669: \"$ac_compile\"") >&5
10670   (eval $ac_compile) 2>&5
10671   ac_status=$?
10672   echo "$as_me:10672: \$? = $ac_status" >&5
10673   (exit $ac_status); } ; then
10674                 mv conftest.o data.o && \
10675                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
10676         fi
10677         rm -f conftest.$ac_ext data.o
10678         cat >conftest.$ac_ext <<EOF
10679 #line 10679 "configure"
10680 int     testfunc()
10681 {
10682 #if defined(NeXT)
10683         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
10684 #else
10685         extern int testdata[3];
10686         return testdata[0] == 123
10687            &&  testdata[1] == 456
10688            &&  testdata[2] == 789;
10689 #endif
10690 }
10691 EOF
10692         if { (eval echo "$as_me:10692: \"$ac_compile\"") >&5
10693   (eval $ac_compile) 2>&5
10694   ac_status=$?
10695   echo "$as_me:10695: \$? = $ac_status" >&5
10696   (exit $ac_status); }; then
10697                 mv conftest.o func.o && \
10698                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
10699         fi
10700         rm -f conftest.$ac_ext func.o
10701         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
10702         cf_saveLIBS="$LIBS"
10703         LIBS="conftest.a $LIBS"
10704         if test "$cross_compiling" = yes; then
10705   cf_cv_link_dataonly=unknown
10706 else
10707   cat >conftest.$ac_ext <<_ACEOF
10708 #line 10708 "configure"
10709 #include "confdefs.h"
10710
10711         int main()
10712         {
10713                 extern int testfunc();
10714                 ${cf_cv_main_return:-return} (!testfunc());
10715         }
10716
10717 _ACEOF
10718 rm -f conftest$ac_exeext
10719 if { (eval echo "$as_me:10719: \"$ac_link\"") >&5
10720   (eval $ac_link) 2>&5
10721   ac_status=$?
10722   echo "$as_me:10722: \$? = $ac_status" >&5
10723   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10724   { (eval echo "$as_me:10724: \"$ac_try\"") >&5
10725   (eval $ac_try) 2>&5
10726   ac_status=$?
10727   echo "$as_me:10727: \$? = $ac_status" >&5
10728   (exit $ac_status); }; }; then
10729   cf_cv_link_dataonly=yes
10730 else
10731   echo "$as_me: program exited with status $ac_status" >&5
10732 echo "$as_me: failed program was:" >&5
10733 cat conftest.$ac_ext >&5
10734 cf_cv_link_dataonly=no
10735 fi
10736 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10737 fi
10738         LIBS="$cf_saveLIBS"
10739
10740 fi
10741
10742 echo "$as_me:10742: result: $cf_cv_link_dataonly" >&5
10743 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
10744
10745 if test "$cf_cv_link_dataonly" = no ; then
10746         cat >>confdefs.h <<\EOF
10747 #define BROKEN_LINKER 1
10748 EOF
10749
10750         BROKEN_LINKER=1
10751 fi
10752
10753 ###     Checks for library functions.
10754
10755 echo "$as_me:10755: checking for working mkstemp" >&5
10756 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
10757 if test "${cf_cv_func_mkstemp+set}" = set; then
10758   echo $ECHO_N "(cached) $ECHO_C" >&6
10759 else
10760
10761 rm -rf conftest*
10762 if test "$cross_compiling" = yes; then
10763   echo "$as_me:10763: checking for mkstemp" >&5
10764 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
10765 if test "${ac_cv_func_mkstemp+set}" = set; then
10766   echo $ECHO_N "(cached) $ECHO_C" >&6
10767 else
10768   cat >conftest.$ac_ext <<_ACEOF
10769 #line 10769 "configure"
10770 #include "confdefs.h"
10771 /* System header to define __stub macros and hopefully few prototypes,
10772     which can conflict with char mkstemp (); below.  */
10773 #include <assert.h>
10774 /* Override any gcc2 internal prototype to avoid an error.  */
10775 #ifdef __cplusplus
10776 extern "C"
10777 #endif
10778 /* We use char because int might match the return type of a gcc2
10779    builtin and then its argument prototype would still apply.  */
10780 char mkstemp ();
10781 char (*f) ();
10782
10783 int
10784 main ()
10785 {
10786 /* The GNU C library defines this for functions which it implements
10787     to always fail with ENOSYS.  Some functions are actually named
10788     something starting with __ and the normal name is an alias.  */
10789 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
10790 choke me
10791 #else
10792 f = mkstemp;
10793 #endif
10794
10795   ;
10796   return 0;
10797 }
10798 _ACEOF
10799 rm -f conftest.$ac_objext conftest$ac_exeext
10800 if { (eval echo "$as_me:10800: \"$ac_link\"") >&5
10801   (eval $ac_link) 2>&5
10802   ac_status=$?
10803   echo "$as_me:10803: \$? = $ac_status" >&5
10804   (exit $ac_status); } &&
10805          { ac_try='test -s conftest$ac_exeext'
10806   { (eval echo "$as_me:10806: \"$ac_try\"") >&5
10807   (eval $ac_try) 2>&5
10808   ac_status=$?
10809   echo "$as_me:10809: \$? = $ac_status" >&5
10810   (exit $ac_status); }; }; then
10811   ac_cv_func_mkstemp=yes
10812 else
10813   echo "$as_me: failed program was:" >&5
10814 cat conftest.$ac_ext >&5
10815 ac_cv_func_mkstemp=no
10816 fi
10817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10818 fi
10819 echo "$as_me:10819: result: $ac_cv_func_mkstemp" >&5
10820 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
10821
10822 else
10823   cat >conftest.$ac_ext <<_ACEOF
10824 #line 10824 "configure"
10825 #include "confdefs.h"
10826
10827 #include <sys/types.h>
10828 #include <stdlib.h>
10829 #include <stdio.h>
10830 #include <string.h>
10831 #include <sys/stat.h>
10832 int main()
10833 {
10834         char *tmpl = "conftestXXXXXX";
10835         char name[2][80];
10836         int n;
10837         int result = 0;
10838         int fd;
10839         struct stat sb;
10840
10841         umask(077);
10842         for (n = 0; n < 2; ++n) {
10843                 strcpy(name[n], tmpl);
10844                 if ((fd = mkstemp(name[n])) >= 0) {
10845                         if (!strcmp(name[n], tmpl)
10846                          || stat(name[n], &sb) != 0
10847                          || (sb.st_mode & S_IFMT) != S_IFREG
10848                          || (sb.st_mode & 077) != 0) {
10849                                 result = 1;
10850                         }
10851                         close(fd);
10852                 }
10853         }
10854         if (result == 0
10855          && !strcmp(name[0], name[1]))
10856                 result = 1;
10857         ${cf_cv_main_return:-return}(result);
10858 }
10859
10860 _ACEOF
10861 rm -f conftest$ac_exeext
10862 if { (eval echo "$as_me:10862: \"$ac_link\"") >&5
10863   (eval $ac_link) 2>&5
10864   ac_status=$?
10865   echo "$as_me:10865: \$? = $ac_status" >&5
10866   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10867   { (eval echo "$as_me:10867: \"$ac_try\"") >&5
10868   (eval $ac_try) 2>&5
10869   ac_status=$?
10870   echo "$as_me:10870: \$? = $ac_status" >&5
10871   (exit $ac_status); }; }; then
10872   cf_cv_func_mkstemp=yes
10873
10874 else
10875   echo "$as_me: program exited with status $ac_status" >&5
10876 echo "$as_me: failed program was:" >&5
10877 cat conftest.$ac_ext >&5
10878 cf_cv_func_mkstemp=no
10879
10880 fi
10881 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10882 fi
10883
10884 fi
10885 echo "$as_me:10885: result: $cf_cv_func_mkstemp" >&5
10886 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
10887 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
10888         cat >>confdefs.h <<\EOF
10889 #define HAVE_MKSTEMP 1
10890 EOF
10891
10892 fi
10893
10894 echo "$as_me:10894: checking return type of signal handlers" >&5
10895 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10896 if test "${ac_cv_type_signal+set}" = set; then
10897   echo $ECHO_N "(cached) $ECHO_C" >&6
10898 else
10899   cat >conftest.$ac_ext <<_ACEOF
10900 #line 10900 "configure"
10901 #include "confdefs.h"
10902 #include <sys/types.h>
10903 #include <signal.h>
10904 #ifdef signal
10905 # undef signal
10906 #endif
10907 #ifdef __cplusplus
10908 extern "C" void (*signal (int, void (*)(int)))(int);
10909 #else
10910 void (*signal ()) ();
10911 #endif
10912
10913 int
10914 main ()
10915 {
10916 int i;
10917   ;
10918   return 0;
10919 }
10920 _ACEOF
10921 rm -f conftest.$ac_objext
10922 if { (eval echo "$as_me:10922: \"$ac_compile\"") >&5
10923   (eval $ac_compile) 2>&5
10924   ac_status=$?
10925   echo "$as_me:10925: \$? = $ac_status" >&5
10926   (exit $ac_status); } &&
10927          { ac_try='test -s conftest.$ac_objext'
10928   { (eval echo "$as_me:10928: \"$ac_try\"") >&5
10929   (eval $ac_try) 2>&5
10930   ac_status=$?
10931   echo "$as_me:10931: \$? = $ac_status" >&5
10932   (exit $ac_status); }; }; then
10933   ac_cv_type_signal=void
10934 else
10935   echo "$as_me: failed program was:" >&5
10936 cat conftest.$ac_ext >&5
10937 ac_cv_type_signal=int
10938 fi
10939 rm -f conftest.$ac_objext conftest.$ac_ext
10940 fi
10941 echo "$as_me:10941: result: $ac_cv_type_signal" >&5
10942 echo "${ECHO_T}$ac_cv_type_signal" >&6
10943
10944 cat >>confdefs.h <<EOF
10945 #define RETSIGTYPE $ac_cv_type_signal
10946 EOF
10947
10948 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
10949         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10950         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10951 fi
10952
10953 if test "$cf_with_ada" != "no" ; then
10954
10955 cf_ada_make=gnatmake
10956 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
10957 set dummy $cf_ada_make; ac_word=$2
10958 echo "$as_me:10958: checking for $ac_word" >&5
10959 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10960 if test "${ac_cv_prog_gnat_exists+set}" = set; then
10961   echo $ECHO_N "(cached) $ECHO_C" >&6
10962 else
10963   if test -n "$gnat_exists"; then
10964   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
10965 else
10966   ac_save_IFS=$IFS; IFS=$ac_path_separator
10967 ac_dummy="$PATH"
10968 for ac_dir in $ac_dummy; do
10969   IFS=$ac_save_IFS
10970   test -z "$ac_dir" && ac_dir=.
10971   $as_executable_p "$ac_dir/$ac_word" || continue
10972 ac_cv_prog_gnat_exists="yes"
10973 echo "$as_me:10973: found $ac_dir/$ac_word" >&5
10974 break
10975 done
10976
10977   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
10978 fi
10979 fi
10980 gnat_exists=$ac_cv_prog_gnat_exists
10981 if test -n "$gnat_exists"; then
10982   echo "$as_me:10982: result: $gnat_exists" >&5
10983 echo "${ECHO_T}$gnat_exists" >&6
10984 else
10985   echo "$as_me:10985: result: no" >&5
10986 echo "${ECHO_T}no" >&6
10987 fi
10988
10989 if test "$ac_cv_prog_gnat_exists" = no; then
10990    cf_ada_make=
10991 else
10992
10993 echo "$as_me:10993: checking for gnat version" >&5
10994 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
10995 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
10996         grep '[0-9].[0-9][0-9]*' |\
10997     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
10998 echo "$as_me:10998: result: $cf_gnat_version" >&5
10999 echo "${ECHO_T}$cf_gnat_version" >&6
11000
11001 case $cf_gnat_version in #(vi
11002 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
11003         cf_cv_prog_gnat_correct=yes
11004         ;;
11005 *)
11006         { echo "$as_me:11006: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
11007 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
11008         cf_cv_prog_gnat_correct=no
11009         ;;
11010 esac
11011
11012    # Extract the first word of "m4", so it can be a program name with args.
11013 set dummy m4; ac_word=$2
11014 echo "$as_me:11014: checking for $ac_word" >&5
11015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11016 if test "${ac_cv_prog_M4_exists+set}" = set; then
11017   echo $ECHO_N "(cached) $ECHO_C" >&6
11018 else
11019   if test -n "$M4_exists"; then
11020   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
11021 else
11022   ac_save_IFS=$IFS; IFS=$ac_path_separator
11023 ac_dummy="$PATH"
11024 for ac_dir in $ac_dummy; do
11025   IFS=$ac_save_IFS
11026   test -z "$ac_dir" && ac_dir=.
11027   $as_executable_p "$ac_dir/$ac_word" || continue
11028 ac_cv_prog_M4_exists="yes"
11029 echo "$as_me:11029: found $ac_dir/$ac_word" >&5
11030 break
11031 done
11032
11033   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
11034 fi
11035 fi
11036 M4_exists=$ac_cv_prog_M4_exists
11037 if test -n "$M4_exists"; then
11038   echo "$as_me:11038: result: $M4_exists" >&5
11039 echo "${ECHO_T}$M4_exists" >&6
11040 else
11041   echo "$as_me:11041: result: no" >&5
11042 echo "${ECHO_T}no" >&6
11043 fi
11044
11045    if test "$ac_cv_prog_M4_exists" = no; then
11046       cf_cv_prog_gnat_correct=no
11047       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
11048    fi
11049    if test "$cf_cv_prog_gnat_correct" = yes; then
11050       echo "$as_me:11050: checking if GNAT works" >&5
11051 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
11052
11053 rm -rf conftest* *~conftest*
11054 cat >>conftest.ads <<CF_EOF
11055 procedure conftest;
11056 CF_EOF
11057 cat >>conftest.adb <<CF_EOF
11058 with Text_IO;
11059 with GNAT.OS_Lib;
11060 procedure conftest is
11061 begin
11062    Text_IO.Put ("Hello World");
11063    Text_IO.New_Line;
11064    GNAT.OS_Lib.OS_Exit (0);
11065 end conftest;
11066 CF_EOF
11067 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11068    if ( ./conftest 1>&5 2>&1 ) ; then
11069       cf_cv_prog_gnat_correct=yes
11070    else
11071       cf_cv_prog_gnat_correct=no
11072    fi
11073 else
11074    cf_cv_prog_gnat_correct=no
11075 fi
11076 rm -rf conftest* *~conftest*
11077
11078       echo "$as_me:11078: result: $cf_cv_prog_gnat_correct" >&5
11079 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
11080    fi
11081 fi
11082
11083         if test "$cf_cv_prog_gnat_correct" = yes; then
11084
11085                 # make ADAFLAGS consistent with CFLAGS
11086                 case "$CFLAGS" in
11087                 *-g*)
11088
11089         ADAFLAGS="$ADAFLAGS -g"
11090
11091                         ;;
11092                 esac
11093                 case "$CFLAGS" in
11094                 *-O*)
11095
11096         ADAFLAGS="$ADAFLAGS -O3"
11097
11098                         ;;
11099                 esac
11100
11101 echo "$as_me:11101: checking if GNAT supports generics" >&5
11102 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
11103 case $cf_gnat_version in #(vi
11104 3.[1-9]*|[4-9].*) #(vi
11105         cf_gnat_generics=yes
11106         ;;
11107 *)
11108         cf_gnat_generics=no
11109         ;;
11110 esac
11111 echo "$as_me:11111: result: $cf_gnat_generics" >&5
11112 echo "${ECHO_T}$cf_gnat_generics" >&6
11113
11114 if test "$cf_gnat_generics" = yes
11115 then
11116         cf_compile_generics=generics
11117         cf_generic_objects="\${GENOBJS}"
11118 else
11119         cf_compile_generics=
11120         cf_generic_objects=
11121 fi
11122
11123 echo "$as_me:11123: checking if GNAT supports SIGINT" >&5
11124 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
11125 if test "${cf_cv_gnat_sigint+set}" = set; then
11126   echo $ECHO_N "(cached) $ECHO_C" >&6
11127 else
11128
11129 rm -rf conftest* *~conftest*
11130 cat >>conftest.ads <<CF_EOF
11131 with Ada.Interrupts.Names;
11132
11133 package ConfTest is
11134
11135    pragma Warnings (Off);  --  the next pragma exists since 3.11p
11136    pragma Unreserve_All_Interrupts;
11137    pragma Warnings (On);
11138
11139    protected Process is
11140       procedure Stop;
11141       function Continue return Boolean;
11142       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
11143    private
11144       Done : Boolean := False;
11145    end Process;
11146
11147 end ConfTest;
11148 CF_EOF
11149 cat >>conftest.adb <<CF_EOF
11150 package body ConfTest is
11151    protected body Process is
11152       procedure Stop is
11153       begin
11154          Done := True;
11155       end Stop;
11156       function Continue return Boolean is
11157       begin
11158          return not Done;
11159       end Continue;
11160    end Process;
11161 end ConfTest;
11162 CF_EOF
11163 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11164       cf_cv_gnat_sigint=yes
11165 else
11166    cf_cv_gnat_sigint=no
11167 fi
11168 rm -rf conftest* *~conftest*
11169
11170 fi
11171 echo "$as_me:11171: result: $cf_cv_gnat_sigint" >&5
11172 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11173
11174 if test $cf_cv_gnat_sigint = yes ; then
11175         USE_GNAT_SIGINT=""
11176 else
11177         USE_GNAT_SIGINT="#"
11178 fi
11179
11180 echo "$as_me:11180: checking if GNAT pragma Unreferenced works" >&5
11181 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
11182 if test "${cf_cv_pragma_unreferenced+set}" = set; then
11183   echo $ECHO_N "(cached) $ECHO_C" >&6
11184 else
11185
11186 rm -rf conftest* *~conftest*
11187 cat >>conftest.ads <<CF_EOF
11188 procedure conftest;
11189 CF_EOF
11190 cat >>conftest.adb <<CF_EOF
11191 with Text_IO;
11192 with GNAT.OS_Lib;
11193 procedure conftest is
11194    test : Integer;
11195    pragma Unreferenced (test);
11196 begin
11197    test := 1;
11198    Text_IO.Put ("Hello World");
11199    Text_IO.New_Line;
11200    GNAT.OS_Lib.OS_Exit (0);
11201 end conftest;
11202 CF_EOF
11203 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11204       cf_cv_pragma_unreferenced=yes
11205 else
11206    cf_cv_pragma_unreferenced=no
11207 fi
11208 rm -rf conftest* *~conftest*
11209
11210 fi
11211 echo "$as_me:11211: result: $cf_cv_pragma_unreferenced" >&5
11212 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
11213
11214 # if the pragma is supported, use it (needed in the Trace code).
11215 if test $cf_cv_pragma_unreferenced = yes ; then
11216         PRAGMA_UNREF=TRUE
11217 else
11218         PRAGMA_UNREF=FALSE
11219 fi
11220
11221 cf_gnat_libraries=no
11222 cf_gnat_projects=no
11223
11224 echo "$as_me:11224: checking if GNAT supports project files" >&5
11225 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11226 case $cf_gnat_version in #(vi
11227 3.[0-9]*) #(vi
11228         ;;
11229 *)
11230         case $cf_cv_system_name in #(vi
11231         cygwin*) #(vi
11232                 ;;
11233         *)
11234                 mkdir conftest.src conftest.bin conftest.lib
11235                 cd conftest.src
11236                 rm -rf conftest* *~conftest*
11237                 cat >>library.gpr <<CF_EOF
11238 project Library is
11239   Kind := External ("LIB_KIND");
11240   for Library_Name use "ConfTest";
11241   for Object_Dir use ".";
11242   for Library_ALI_Dir use External("LIBRARY_DIR");
11243   for Library_Version use External ("SONAME");
11244   for Library_Kind use Kind;
11245   for Library_Dir use External("BUILD_DIR");
11246   Source_Dir := External ("SOURCE_DIR");
11247   for Source_Dirs use (Source_Dir);
11248   package Compiler is
11249      for Default_Switches ("Ada") use
11250        ("-g",
11251         "-O2",
11252         "-gnatafno",
11253         "-gnatVa",   -- All validity checks
11254         "-gnatwa");  -- Activate all optional errors
11255   end Compiler;
11256 end Library;
11257 CF_EOF
11258                 cat >>confpackage.ads <<CF_EOF
11259 package ConfPackage is
11260    procedure conftest;
11261 end ConfPackage;
11262 CF_EOF
11263                 cat >>confpackage.adb <<CF_EOF
11264 with Text_IO;
11265 package body ConfPackage is
11266    procedure conftest is
11267    begin
11268       Text_IO.Put ("Hello World");
11269       Text_IO.New_Line;
11270    end conftest;
11271 end ConfPackage;
11272 CF_EOF
11273                 if ( $cf_ada_make $ADAFLAGS \
11274                                 -Plibrary.gpr \
11275                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11276                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11277                                 -XSOURCE_DIR=`pwd` \
11278                                 -XSONAME=libConfTest.so.1 \
11279                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11280                         cf_gnat_projects=yes
11281                 fi
11282                 cd ..
11283                 if test -f conftest.lib/confpackage.ali
11284                 then
11285                         cf_gnat_libraries=yes
11286                 fi
11287                 rm -rf conftest* *~conftest*
11288                 ;;
11289         esac
11290         ;;
11291 esac
11292 echo "$as_me:11292: result: $cf_gnat_projects" >&5
11293 echo "${ECHO_T}$cf_gnat_projects" >&6
11294
11295 if test $cf_gnat_projects = yes
11296 then
11297         echo "$as_me:11297: checking if GNAT supports libraries" >&5
11298 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11299         echo "$as_me:11299: result: $cf_gnat_libraries" >&5
11300 echo "${ECHO_T}$cf_gnat_libraries" >&6
11301 fi
11302
11303 if test "$cf_gnat_projects" = yes
11304 then
11305         USE_OLD_MAKERULES="#"
11306         USE_GNAT_PROJECTS=""
11307 else
11308         USE_OLD_MAKERULES=""
11309         USE_GNAT_PROJECTS="#"
11310 fi
11311
11312 if test "$cf_gnat_libraries" = yes
11313 then
11314         USE_GNAT_LIBRARIES=""
11315 else
11316         USE_GNAT_LIBRARIES="#"
11317 fi
11318
11319 echo "$as_me:11319: checking for ada-compiler" >&5
11320 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11321
11322 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11323 if test "${with_ada_compiler+set}" = set; then
11324   withval="$with_ada_compiler"
11325   cf_ada_compiler=$withval
11326 else
11327   cf_ada_compiler=gnatmake
11328 fi;
11329
11330 echo "$as_me:11330: result: $cf_ada_compiler" >&5
11331 echo "${ECHO_T}$cf_ada_compiler" >&6
11332
11333                 cf_ada_package=terminal_interface
11334
11335 echo "$as_me:11335: checking for ada-include" >&5
11336 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11337
11338 # Check whether --with-ada-include or --without-ada-include was given.
11339 if test "${with_ada_include+set}" = set; then
11340   withval="$with_ada_include"
11341
11342 else
11343   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
11344 fi; if test -n "$prefix/share/ada/adainclude" ; then
11345
11346 if test "x$prefix" != xNONE; then
11347   cf_path_syntax="$prefix"
11348 else
11349   cf_path_syntax="$ac_default_prefix"
11350 fi
11351
11352 case ".$withval" in #(vi
11353 .\$\(*\)*|.\'*\'*) #(vi
11354   ;;
11355 ..|./*|.\\*) #(vi
11356   ;;
11357 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11358   ;;
11359 .\${*prefix}*) #(vi
11360   eval withval="$withval"
11361   case ".$withval" in #(vi
11362   .NONE/*)
11363     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11364     ;;
11365   esac
11366   ;; #(vi
11367 .no|.NONE/*)
11368   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11369   ;;
11370 *)
11371   { { echo "$as_me:11371: error: expected a pathname, not \"$withval\"" >&5
11372 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11373    { (exit 1); exit 1; }; }
11374   ;;
11375 esac
11376
11377 fi
11378 ADA_INCLUDE="$withval"
11379
11380 echo "$as_me:11380: result: $ADA_INCLUDE" >&5
11381 echo "${ECHO_T}$ADA_INCLUDE" >&6
11382
11383 echo "$as_me:11383: checking for ada-objects" >&5
11384 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
11385
11386 # Check whether --with-ada-objects or --without-ada-objects was given.
11387 if test "${with_ada_objects+set}" = set; then
11388   withval="$with_ada_objects"
11389
11390 else
11391   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
11392 fi; if test -n "$prefix/lib/ada/adalib" ; then
11393
11394 if test "x$prefix" != xNONE; then
11395   cf_path_syntax="$prefix"
11396 else
11397   cf_path_syntax="$ac_default_prefix"
11398 fi
11399
11400 case ".$withval" in #(vi
11401 .\$\(*\)*|.\'*\'*) #(vi
11402   ;;
11403 ..|./*|.\\*) #(vi
11404   ;;
11405 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11406   ;;
11407 .\${*prefix}*) #(vi
11408   eval withval="$withval"
11409   case ".$withval" in #(vi
11410   .NONE/*)
11411     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11412     ;;
11413   esac
11414   ;; #(vi
11415 .no|.NONE/*)
11416   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11417   ;;
11418 *)
11419   { { echo "$as_me:11419: error: expected a pathname, not \"$withval\"" >&5
11420 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11421    { (exit 1); exit 1; }; }
11422   ;;
11423 esac
11424
11425 fi
11426 ADA_OBJECTS="$withval"
11427
11428 echo "$as_me:11428: result: $ADA_OBJECTS" >&5
11429 echo "${ECHO_T}$ADA_OBJECTS" >&6
11430
11431 echo "$as_me:11431: checking if an Ada95 shared-library should be built" >&5
11432 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
11433
11434 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
11435 if test "${with_ada_sharedlib+set}" = set; then
11436   withval="$with_ada_sharedlib"
11437   with_ada_sharedlib=$withval
11438 else
11439   with_ada_sharedlib=no
11440 fi;
11441 echo "$as_me:11441: result: $with_ada_sharedlib" >&5
11442 echo "${ECHO_T}$with_ada_sharedlib" >&6
11443
11444 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
11445 MAKE_ADA_SHAREDLIB="#"
11446
11447 if test "x$with_ada_sharedlib" != xno
11448 then
11449         MAKE_ADA_SHAREDLIB=
11450         if test "x$with_ada_sharedlib" != xyes
11451         then
11452                 ADA_SHAREDLIB="$with_ada_sharedlib"
11453         fi
11454 fi
11455
11456         else
11457                 { { echo "$as_me:11457: error: No usable Ada compiler found" >&5
11458 echo "$as_me: error: No usable Ada compiler found" >&2;}
11459    { (exit 1); exit 1; }; }
11460         fi
11461 else
11462         { { echo "$as_me:11462: error: The Ada compiler is needed for this package" >&5
11463 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
11464    { (exit 1); exit 1; }; }
11465 fi
11466
11467 ################################################################################
11468
11469 # not needed
11470 TINFO_ARGS2=
11471
11472 ### Construct the list of include-directories to be generated
11473
11474 CPPFLAGS="$CPPFLAGS -I. -I../include"
11475 if test "$srcdir" != "."; then
11476         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
11477 fi
11478 if test "$GCC" != yes; then
11479         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11480 elif test "$includedir" != "/usr/include"; then
11481         if test "$includedir" = '${prefix}/include' ; then
11482                 if test $prefix != /usr ; then
11483                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11484                 fi
11485         else
11486                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
11487         fi
11488 fi
11489
11490 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
11491 if test "$srcdir" != "."; then
11492         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
11493 fi
11494 if test "$GCC" != yes; then
11495         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11496 elif test "$includedir" != "/usr/include"; then
11497         if test "$includedir" = '${prefix}/include' ; then
11498                 if test $prefix != /usr ; then
11499                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11500                 fi
11501         else
11502                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11503         fi
11504 fi
11505
11506 ### Build up pieces for makefile rules
11507 echo "$as_me:11507: checking default library suffix" >&5
11508 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
11509
11510         case $DFT_LWR_MODEL in
11511         libtool) DFT_ARG_SUFFIX=''   ;;
11512         normal)  DFT_ARG_SUFFIX=''   ;;
11513         debug)   DFT_ARG_SUFFIX='_g' ;;
11514         profile) DFT_ARG_SUFFIX='_p' ;;
11515         shared)  DFT_ARG_SUFFIX=''   ;;
11516         esac
11517         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
11518 echo "$as_me:11518: result: $DFT_ARG_SUFFIX" >&5
11519 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
11520
11521 echo "$as_me:11521: checking default library-dependency suffix" >&5
11522 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
11523
11524         case $DFT_LWR_MODEL in #(vi
11525         libtool) #(vi
11526                 DFT_LIB_SUFFIX='.la'
11527                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11528                 ;;
11529         normal) #(vi
11530                 DFT_LIB_SUFFIX='.a'
11531                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11532                 ;;
11533         debug) #(vi
11534                 DFT_LIB_SUFFIX='_g.a'
11535                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11536                 ;;
11537         profile) #(vi
11538                 DFT_LIB_SUFFIX='_p.a'
11539                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11540                 ;;
11541         shared) #(vi
11542                 case $cf_cv_system_name in
11543                 aix[5-7]*) #(vi
11544                         DFT_LIB_SUFFIX='.a'
11545                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11546                         ;;
11547                 cygwin*) #(vi
11548                         DFT_LIB_SUFFIX='.dll'
11549                         DFT_DEP_SUFFIX='.dll.a'
11550                         ;;
11551                 darwin*) #(vi
11552                         DFT_LIB_SUFFIX='.dylib'
11553                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11554                         ;;
11555                 hpux*) #(vi
11556                         case $target in
11557                         ia64*) #(vi
11558                                 DFT_LIB_SUFFIX='.so'
11559                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11560                                 ;;
11561                         *) #(vi
11562                                 DFT_LIB_SUFFIX='.sl'
11563                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11564                                 ;;
11565                         esac
11566                         ;;
11567                 *)      DFT_LIB_SUFFIX='.so'
11568                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11569                         ;;
11570                 esac
11571         esac
11572         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
11573         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
11574 echo "$as_me:11574: result: $DFT_DEP_SUFFIX" >&5
11575 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
11576
11577 echo "$as_me:11577: checking default object directory" >&5
11578 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
11579
11580         case $DFT_LWR_MODEL in
11581         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
11582         normal)  DFT_OBJ_SUBDIR='objects' ;;
11583         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
11584         profile) DFT_OBJ_SUBDIR='obj_p' ;;
11585         shared)
11586                 case $cf_cv_system_name in #(vi
11587                 cygwin) #(vi
11588                         DFT_OBJ_SUBDIR='objects' ;;
11589                 *)
11590                         DFT_OBJ_SUBDIR='obj_s' ;;
11591                 esac
11592         esac
11593 echo "$as_me:11593: result: $DFT_OBJ_SUBDIR" >&5
11594 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
11595
11596 ### Set up low-level terminfo dependencies for makefiles.
11597
11598 if test "$DFT_LWR_MODEL" = shared ; then
11599         case $cf_cv_system_name in #(vi
11600         cygwin*)
11601                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
11602                 ;;
11603         esac
11604 fi
11605
11606 ### Construct the list of subdirectories for which we'll customize makefiles
11607 ### with the appropriate compile-rules.
11608
11609 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
11610
11611 cat >>confdefs.h <<EOF
11612 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
11613 EOF
11614
11615 ### Now that we're done running tests, add the compiler-warnings, if any
11616
11617 cf_fix_cppflags=no
11618 cf_new_cflags=
11619 cf_new_cppflags=
11620 cf_new_extra_cppflags=
11621
11622 for cf_add_cflags in $EXTRA_CFLAGS
11623 do
11624 case $cf_fix_cppflags in
11625 no)
11626         case $cf_add_cflags in #(vi
11627         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11628                 case $cf_add_cflags in
11629                 -D*)
11630                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11631
11632                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11633                                 && test -z "${cf_tst_cflags}" \
11634                                 && cf_fix_cppflags=yes
11635
11636                         if test $cf_fix_cppflags = yes ; then
11637                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11638                                 continue
11639                         elif test "${cf_tst_cflags}" = "\"'" ; then
11640                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11641                                 continue
11642                         fi
11643                         ;;
11644                 esac
11645                 case "$CPPFLAGS" in
11646                 *$cf_add_cflags) #(vi
11647                         ;;
11648                 *) #(vi
11649                         case $cf_add_cflags in #(vi
11650                         -D*)
11651                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11652
11653 CPPFLAGS=`echo "$CPPFLAGS" | \
11654         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11655                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11656
11657                                 ;;
11658                         esac
11659                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11660                         ;;
11661                 esac
11662                 ;;
11663         *)
11664                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11665                 ;;
11666         esac
11667         ;;
11668 yes)
11669         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11670
11671         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11672
11673         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11674                 && test -z "${cf_tst_cflags}" \
11675                 && cf_fix_cppflags=no
11676         ;;
11677 esac
11678 done
11679
11680 if test -n "$cf_new_cflags" ; then
11681
11682         CFLAGS="$CFLAGS $cf_new_cflags"
11683 fi
11684
11685 if test -n "$cf_new_cppflags" ; then
11686
11687         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11688 fi
11689
11690 if test -n "$cf_new_extra_cppflags" ; then
11691
11692         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11693 fi
11694
11695 ################################################################################
11696
11697 if test x"$enable_pc_files" = xyes ; then \
11698 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
11699 MAKE_PC_FILES=
11700 else
11701 MAKE_PC_FILES="#"
11702 fi
11703
11704 ################################################################################
11705
11706 TEST_ARG2=
11707
11708 TEST_LIBS2=
11709
11710 NCURSES_SHLIB2="sh -c"
11711
11712 ADA_SUBDIRS="include gen src doc"
11713 if test "x$cf_with_tests" != "xno" ; then
11714         ADA_SUBDIRS="$ADA_SUBDIRS samples"
11715 fi
11716 for cf_dir in $ADA_SUBDIRS
11717 do
11718         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
11719 done
11720
11721 NCURSES_TREE="#"
11722
11723 EXTERNAL_TREE=
11724
11725 # match layout used by make-tar.sh
11726 ADAHTML_DIR=../doc/ada
11727
11728 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
11729 ac_config_commands="$ac_config_commands default"
11730 cat >confcache <<\_ACEOF
11731 # This file is a shell script that caches the results of configure
11732 # tests run on this system so they can be shared between configure
11733 # scripts and configure runs, see configure's option --config-cache.
11734 # It is not useful on other systems.  If it contains results you don't
11735 # want to keep, you may remove or edit it.
11736 #
11737 # config.status only pays attention to the cache file if you give it
11738 # the --recheck option to rerun configure.
11739 #
11740 # `ac_cv_env_foo' variables (set or unset) will be overriden when
11741 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11742 # following values.
11743
11744 _ACEOF
11745
11746 # The following way of writing the cache mishandles newlines in values,
11747 # but we know of no workaround that is simple, portable, and efficient.
11748 # So, don't put newlines in cache variables' values.
11749 # Ultrix sh set writes to stderr and can't be redirected directly,
11750 # and sets the high bit in the cache file unless we assign to the vars.
11751 {
11752   (set) 2>&1 |
11753     case `(ac_space=' '; set | grep ac_space) 2>&1` in
11754     *ac_space=\ *)
11755       # `set' does not quote correctly, so add quotes (double-quote
11756       # substitution turns \\\\ into \\, and sed turns \\ into \).
11757       sed -n \
11758         "s/'/'\\\\''/g;
11759           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11760       ;;
11761     *)
11762       # `set' quotes correctly as required by POSIX, so do not add quotes.
11763       sed -n \
11764         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11765       ;;
11766     esac;
11767 } |
11768   sed '
11769      t clear
11770      : clear
11771      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11772      t end
11773      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11774      : end' >>confcache
11775 if cmp -s $cache_file confcache; then :; else
11776   if test -w $cache_file; then
11777     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11778     cat confcache >$cache_file
11779   else
11780     echo "not updating unwritable cache $cache_file"
11781   fi
11782 fi
11783 rm -f confcache
11784
11785 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11786 # Let make expand exec_prefix.
11787 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11788
11789 # VPATH may cause trouble with some makes, so we remove $(srcdir),
11790 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11791 # trailing colons and then remove the whole line if VPATH becomes empty
11792 # (actually we leave an empty line to preserve line numbers).
11793 if test "x$srcdir" = x.; then
11794   ac_vpsub='/^[         ]*VPATH[        ]*=/{
11795 s/:*\$(srcdir):*/:/;
11796 s/:*\${srcdir}:*/:/;
11797 s/:*@srcdir@:*/:/;
11798 s/^\([^=]*=[    ]*\):*/\1/;
11799 s/:*$//;
11800 s/^[^=]*=[      ]*$//;
11801 }'
11802 fi
11803
11804 DEFS=-DHAVE_CONFIG_H
11805
11806 : ${CONFIG_STATUS=./config.status}
11807 ac_clean_files_save=$ac_clean_files
11808 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11809 { echo "$as_me:11809: creating $CONFIG_STATUS" >&5
11810 echo "$as_me: creating $CONFIG_STATUS" >&6;}
11811 cat >$CONFIG_STATUS <<_ACEOF
11812 #! $SHELL
11813 # Generated automatically by configure.
11814 # Run this file to recreate the current configuration.
11815 # Compiler output produced by configure, useful for debugging
11816 # configure, is in config.log if it exists.
11817
11818 debug=false
11819 SHELL=\${CONFIG_SHELL-$SHELL}
11820 ac_cs_invocation="\$0 \$@"
11821
11822 _ACEOF
11823
11824 cat >>$CONFIG_STATUS <<\_ACEOF
11825 # Be Bourne compatible
11826 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11827   emulate sh
11828   NULLCMD=:
11829 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11830   set -o posix
11831 fi
11832
11833 # Name of the executable.
11834 as_me=`echo "$0" |sed 's,.*[\\/],,'`
11835
11836 if expr a : '\(a\)' >/dev/null 2>&1; then
11837   as_expr=expr
11838 else
11839   as_expr=false
11840 fi
11841
11842 rm -f conf$$ conf$$.exe conf$$.file
11843 echo >conf$$.file
11844 if ln -s conf$$.file conf$$ 2>/dev/null; then
11845   # We could just check for DJGPP; but this test a) works b) is more generic
11846   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11847   if test -f conf$$.exe; then
11848     # Don't use ln at all; we don't have any links
11849     as_ln_s='cp -p'
11850   else
11851     as_ln_s='ln -s'
11852   fi
11853 elif ln conf$$.file conf$$ 2>/dev/null; then
11854   as_ln_s=ln
11855 else
11856   as_ln_s='cp -p'
11857 fi
11858 rm -f conf$$ conf$$.exe conf$$.file
11859
11860 as_executable_p="test -f"
11861
11862 # Support unset when possible.
11863 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11864   as_unset=unset
11865 else
11866   as_unset=false
11867 fi
11868
11869 # NLS nuisances.
11870 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
11871 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
11872 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
11873 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
11874 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
11875 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
11876 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
11877 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
11878
11879 # IFS
11880 # We need space, tab and new line, in precisely that order.
11881 as_nl='
11882 '
11883 IFS="   $as_nl"
11884
11885 # CDPATH.
11886 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
11887
11888 exec 6>&1
11889
11890 _ACEOF
11891
11892 # Files that config.status was made for.
11893 if test -n "$ac_config_files"; then
11894   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
11895 fi
11896
11897 if test -n "$ac_config_headers"; then
11898   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
11899 fi
11900
11901 if test -n "$ac_config_links"; then
11902   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
11903 fi
11904
11905 if test -n "$ac_config_commands"; then
11906   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
11907 fi
11908
11909 cat >>$CONFIG_STATUS <<\EOF
11910
11911 ac_cs_usage="\
11912 \`$as_me' instantiates files from templates according to the
11913 current configuration.
11914
11915 Usage: $0 [OPTIONS] [FILE]...
11916
11917   -h, --help       print this help, then exit
11918   -V, --version    print version number, then exit
11919   -d, --debug      don't remove temporary files
11920       --recheck    update $as_me by reconfiguring in the same conditions
11921   --file=FILE[:TEMPLATE]
11922                    instantiate the configuration file FILE
11923   --header=FILE[:TEMPLATE]
11924                    instantiate the configuration header FILE
11925
11926 Configuration files:
11927 $config_files
11928
11929 Configuration headers:
11930 $config_headers
11931
11932 Configuration commands:
11933 $config_commands
11934
11935 Report bugs to <dickey@invisible-island.net>."
11936 EOF
11937
11938 cat >>$CONFIG_STATUS <<EOF
11939 ac_cs_version="\\
11940 config.status
11941 configured by $0, generated by GNU Autoconf 2.52.20101002,
11942   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
11943
11944 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
11945 Free Software Foundation, Inc.
11946 This config.status script is free software; the Free Software Foundation
11947 gives unlimited permission to copy, distribute and modify it."
11948 srcdir=$srcdir
11949 INSTALL="$INSTALL"
11950 EOF
11951
11952 cat >>$CONFIG_STATUS <<\EOF
11953 # If no file are specified by the user, then we need to provide default
11954 # value.  By we need to know if files were specified by the user.
11955 ac_need_defaults=:
11956 while test $# != 0
11957 do
11958   case $1 in
11959   --*=*)
11960     ac_option=`expr "x$1" : 'x\([^=]*\)='`
11961     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
11962     shift
11963     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
11964     shift
11965     ;;
11966   -*);;
11967   *) # This is not an option, so the user has probably given explicit
11968      # arguments.
11969      ac_need_defaults=false;;
11970   esac
11971
11972   case $1 in
11973   # Handling of the options.
11974 EOF
11975 cat >>$CONFIG_STATUS <<EOF
11976   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11977     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
11978     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
11979 EOF
11980 cat >>$CONFIG_STATUS <<\EOF
11981   --version | --vers* | -V )
11982     echo "$ac_cs_version"; exit 0 ;;
11983   --he | --h)
11984     # Conflict between --help and --header
11985     { { echo "$as_me:11985: error: ambiguous option: $1
11986 Try \`$0 --help' for more information." >&5
11987 echo "$as_me: error: ambiguous option: $1
11988 Try \`$0 --help' for more information." >&2;}
11989    { (exit 1); exit 1; }; };;
11990   --help | --hel | -h )
11991     echo "$ac_cs_usage"; exit 0 ;;
11992   --debug | --d* | -d )
11993     debug=: ;;
11994   --file | --fil | --fi | --f )
11995     shift
11996     CONFIG_FILES="$CONFIG_FILES $1"
11997     ac_need_defaults=false;;
11998   --header | --heade | --head | --hea )
11999     shift
12000     CONFIG_HEADERS="$CONFIG_HEADERS $1"
12001     ac_need_defaults=false;;
12002
12003   # This is an error.
12004   -*) { { echo "$as_me:12004: error: unrecognized option: $1
12005 Try \`$0 --help' for more information." >&5
12006 echo "$as_me: error: unrecognized option: $1
12007 Try \`$0 --help' for more information." >&2;}
12008    { (exit 1); exit 1; }; } ;;
12009
12010   *) ac_config_targets="$ac_config_targets $1" ;;
12011
12012   esac
12013   shift
12014 done
12015
12016 exec 5>>config.log
12017 cat >&5 << _ACEOF
12018
12019 ## ----------------------- ##
12020 ## Running config.status.  ##
12021 ## ----------------------- ##
12022
12023 This file was extended by $as_me 2.52.20101002, executed with
12024   CONFIG_FILES    = $CONFIG_FILES
12025   CONFIG_HEADERS  = $CONFIG_HEADERS
12026   CONFIG_LINKS    = $CONFIG_LINKS
12027   CONFIG_COMMANDS = $CONFIG_COMMANDS
12028   > $ac_cs_invocation
12029 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12030
12031 _ACEOF
12032 EOF
12033
12034 cat >>$CONFIG_STATUS <<EOF
12035 #
12036 # INIT-COMMANDS section.
12037 #
12038
12039 ### Special initialization commands, used to pass information from the
12040 ### configuration-run into config.status
12041
12042 AWK="$AWK"
12043 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
12044 DFT_LWR_MODEL="$DFT_LWR_MODEL"
12045 ECHO_LINK="$ECHO_LINK"
12046 LIB_NAME="$LIB_NAME"
12047 LIB_SUFFIX="$LIB_SUFFIX"
12048 LN_S="$LN_S"
12049 NCURSES_MAJOR="$NCURSES_MAJOR"
12050 NCURSES_MINOR="$NCURSES_MINOR"
12051 NCURSES_PATCH="$NCURSES_PATCH"
12052 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
12053 cf_cv_abi_version="$cf_cv_abi_version"
12054 cf_cv_rel_version="$cf_cv_rel_version"
12055 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
12056 cf_cv_shared_soname='$cf_cv_shared_soname'
12057 cf_cv_shlib_version="$cf_cv_shlib_version"
12058 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
12059 cf_cv_system_name="$cf_cv_system_name"
12060 host="$host"
12061 target="$target"
12062
12063 EOF
12064
12065 cat >>$CONFIG_STATUS <<\EOF
12066 for ac_config_target in $ac_config_targets
12067 do
12068   case "$ac_config_target" in
12069   # Handling of arguments.
12070   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
12071   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
12072   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12073   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12074   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
12075   *) { { echo "$as_me:12075: error: invalid argument: $ac_config_target" >&5
12076 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12077    { (exit 1); exit 1; }; };;
12078   esac
12079 done
12080
12081 # If the user did not use the arguments to specify the items to instantiate,
12082 # then the envvar interface is used.  Set only those that are not.
12083 # We use the long form for the default assignment because of an extremely
12084 # bizarre bug on SunOS 4.1.3.
12085 if $ac_need_defaults; then
12086   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12087   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12088   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12089 fi
12090
12091 # Create a temporary directory, and hook for its removal unless debugging.
12092 $debug ||
12093 {
12094   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12095   trap '{ (exit 1); exit 1; }' 1 2 13 15
12096 }
12097
12098 # Create a (secure) tmp directory for tmp files.
12099 : ${TMPDIR=/tmp}
12100 {
12101   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12102   test -n "$tmp" && test -d "$tmp"
12103 }  ||
12104 {
12105   tmp=$TMPDIR/cs$$-$RANDOM
12106   (umask 077 && mkdir $tmp)
12107 } ||
12108 {
12109    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12110    { (exit 1); exit 1; }
12111 }
12112
12113 EOF
12114
12115 cat >>$CONFIG_STATUS <<EOF
12116
12117 #
12118 # CONFIG_FILES section.
12119 #
12120
12121 # No need to generate the scripts if there are no CONFIG_FILES.
12122 # This happens for instance when ./config.status config.h
12123 if test -n "\$CONFIG_FILES"; then
12124   # Protect against being on the right side of a sed subst in config.status.
12125   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12126    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12127 s,@SHELL@,$SHELL,;t t
12128 s,@exec_prefix@,$exec_prefix,;t t
12129 s,@prefix@,$prefix,;t t
12130 s,@program_transform_name@,$program_transform_name,;t t
12131 s,@bindir@,$bindir,;t t
12132 s,@sbindir@,$sbindir,;t t
12133 s,@libexecdir@,$libexecdir,;t t
12134 s,@datadir@,$datadir,;t t
12135 s,@sysconfdir@,$sysconfdir,;t t
12136 s,@sharedstatedir@,$sharedstatedir,;t t
12137 s,@localstatedir@,$localstatedir,;t t
12138 s,@libdir@,$libdir,;t t
12139 s,@includedir@,$includedir,;t t
12140 s,@oldincludedir@,$oldincludedir,;t t
12141 s,@infodir@,$infodir,;t t
12142 s,@mandir@,$mandir,;t t
12143 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12144 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12145 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12146 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12147 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12148 s,@build_alias@,$build_alias,;t t
12149 s,@host_alias@,$host_alias,;t t
12150 s,@target_alias@,$target_alias,;t t
12151 s,@ECHO_C@,$ECHO_C,;t t
12152 s,@ECHO_N@,$ECHO_N,;t t
12153 s,@ECHO_T@,$ECHO_T,;t t
12154 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12155 s,@DEFS@,$DEFS,;t t
12156 s,@LIBS@,$LIBS,;t t
12157 s,@top_builddir@,$top_builddir,;t t
12158 s,@build@,$build,;t t
12159 s,@build_cpu@,$build_cpu,;t t
12160 s,@build_vendor@,$build_vendor,;t t
12161 s,@build_os@,$build_os,;t t
12162 s,@host@,$host,;t t
12163 s,@host_cpu@,$host_cpu,;t t
12164 s,@host_vendor@,$host_vendor,;t t
12165 s,@host_os@,$host_os,;t t
12166 s,@target@,$target,;t t
12167 s,@target_cpu@,$target_cpu,;t t
12168 s,@target_vendor@,$target_vendor,;t t
12169 s,@target_os@,$target_os,;t t
12170 s,@CC@,$CC,;t t
12171 s,@CFLAGS@,$CFLAGS,;t t
12172 s,@LDFLAGS@,$LDFLAGS,;t t
12173 s,@CPPFLAGS@,$CPPFLAGS,;t t
12174 s,@ac_ct_CC@,$ac_ct_CC,;t t
12175 s,@EXEEXT@,$EXEEXT,;t t
12176 s,@OBJEXT@,$OBJEXT,;t t
12177 s,@CPP@,$CPP,;t t
12178 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12179 s,@PROG_EXT@,$PROG_EXT,;t t
12180 s,@AWK@,$AWK,;t t
12181 s,@EGREP@,$EGREP,;t t
12182 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12183 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12184 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12185 s,@LN_S@,$LN_S,;t t
12186 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12187 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12188 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12189 s,@SET_MAKE@,$SET_MAKE,;t t
12190 s,@CTAGS@,$CTAGS,;t t
12191 s,@ETAGS@,$ETAGS,;t t
12192 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12193 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12194 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12195 s,@RANLIB@,$RANLIB,;t t
12196 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12197 s,@LD@,$LD,;t t
12198 s,@ac_ct_LD@,$ac_ct_LD,;t t
12199 s,@AR@,$AR,;t t
12200 s,@ac_ct_AR@,$ac_ct_AR,;t t
12201 s,@ARFLAGS@,$ARFLAGS,;t t
12202 s,@DESTDIR@,$DESTDIR,;t t
12203 s,@BUILD_CC@,$BUILD_CC,;t t
12204 s,@BUILD_CPP@,$BUILD_CPP,;t t
12205 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12206 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12207 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12208 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12209 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12210 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12211 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12212 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12213 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12214 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12215 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12216 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12217 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12218 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12219 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12220 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12221 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12222 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12223 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12224 s,@CC_G_OPT@,$CC_G_OPT,;t t
12225 s,@LD_MODEL@,$LD_MODEL,;t t
12226 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12227 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12228 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12229 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12230 s,@LINK_PROGS@,$LINK_PROGS,;t t
12231 s,@LINK_TESTS@,$LINK_TESTS,;t t
12232 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12233 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12234 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12235 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12236 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12237 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12238 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12239 s,@PTHREAD@,$PTHREAD,;t t
12240 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12241 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12242 s,@ECHO_LINK@,$ECHO_LINK,;t t
12243 s,@ADAFLAGS@,$ADAFLAGS,;t t
12244 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12245 s,@ADA_TRACE@,$ADA_TRACE,;t t
12246 s,@gnat_exists@,$gnat_exists,;t t
12247 s,@M4_exists@,$M4_exists,;t t
12248 s,@cf_ada_make@,$cf_ada_make,;t t
12249 s,@cf_compile_generics@,$cf_compile_generics,;t t
12250 s,@cf_generic_objects@,$cf_generic_objects,;t t
12251 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12252 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
12253 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12254 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12255 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12256 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12257 s,@cf_ada_package@,$cf_ada_package,;t t
12258 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12259 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12260 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12261 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12262 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
12263 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12264 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12265 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12266 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12267 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
12268 s,@cross_compiling@,$cross_compiling,;t t
12269 s,@TEST_ARG2@,$TEST_ARG2,;t t
12270 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12271 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12272 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12273 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12274 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12275 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12276 CEOF
12277
12278 EOF
12279
12280   cat >>$CONFIG_STATUS <<\EOF
12281   # Split the substitutions into bite-sized pieces for seds with
12282   # small command number limits, like on Digital OSF/1 and HP-UX.
12283   ac_max_sed_lines=48
12284   ac_sed_frag=1 # Number of current file.
12285   ac_beg=1 # First line for current file.
12286   ac_end=$ac_max_sed_lines # Line after last line for current file.
12287   ac_more_lines=:
12288   ac_sed_cmds=
12289   while $ac_more_lines; do
12290     if test $ac_beg -gt 1; then
12291       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12292     else
12293       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12294     fi
12295     if test ! -s $tmp/subs.frag; then
12296       ac_more_lines=false
12297     else
12298       # The purpose of the label and of the branching condition is to
12299       # speed up the sed processing (if there are no `@' at all, there
12300       # is no need to browse any of the substitutions).
12301       # These are the two extra sed commands mentioned above.
12302       (echo ':t
12303   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12304       if test -z "$ac_sed_cmds"; then
12305         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12306       else
12307         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12308       fi
12309       ac_sed_frag=`expr $ac_sed_frag + 1`
12310       ac_beg=$ac_end
12311       ac_end=`expr $ac_end + $ac_max_sed_lines`
12312     fi
12313   done
12314   if test -z "$ac_sed_cmds"; then
12315     ac_sed_cmds=cat
12316   fi
12317 fi # test -n "$CONFIG_FILES"
12318
12319 EOF
12320 cat >>$CONFIG_STATUS <<\EOF
12321 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12322   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12323   case $ac_file in
12324   - | *:- | *:-:* ) # input from stdin
12325         cat >$tmp/stdin
12326         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12327         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12328   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12329         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12330   * )   ac_file_in=$ac_file.in ;;
12331   esac
12332
12333   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12334   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12335          X"$ac_file" : 'X\(//\)[^/]' \| \
12336          X"$ac_file" : 'X\(//\)$' \| \
12337          X"$ac_file" : 'X\(/\)' \| \
12338          .     : '\(.\)' 2>/dev/null ||
12339 echo X"$ac_file" |
12340     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12341           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12342           /^X\(\/\/\)$/{ s//\1/; q; }
12343           /^X\(\/\).*/{ s//\1/; q; }
12344           s/.*/./; q'`
12345   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12346     { case "$ac_dir" in
12347   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12348   *)                      as_incr_dir=.;;
12349 esac
12350 as_dummy="$ac_dir"
12351 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12352   case $as_mkdir_dir in
12353     # Skip DOS drivespec
12354     ?:) as_incr_dir=$as_mkdir_dir ;;
12355     *)
12356       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12357       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12358     ;;
12359   esac
12360 done; }
12361
12362     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12363     # A "../" for each directory in $ac_dir_suffix.
12364     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12365   else
12366     ac_dir_suffix= ac_dots=
12367   fi
12368
12369   case $srcdir in
12370   .)  ac_srcdir=.
12371       if test -z "$ac_dots"; then
12372          ac_top_srcdir=.
12373       else
12374          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12375       fi ;;
12376   [\\/]* | ?:[\\/]* )
12377       ac_srcdir=$srcdir$ac_dir_suffix;
12378       ac_top_srcdir=$srcdir ;;
12379   *) # Relative path.
12380     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12381     ac_top_srcdir=$ac_dots$srcdir ;;
12382   esac
12383
12384   case $INSTALL in
12385   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12386   *) ac_INSTALL=$ac_dots$INSTALL ;;
12387   esac
12388
12389   if test x"$ac_file" != x-; then
12390     { echo "$as_me:12390: creating $ac_file" >&5
12391 echo "$as_me: creating $ac_file" >&6;}
12392     rm -f "$ac_file"
12393   fi
12394   # Let's still pretend it is `configure' which instantiates (i.e., don't
12395   # use $as_me), people would be surprised to read:
12396   #    /* config.h.  Generated automatically by config.status.  */
12397   configure_input="Generated automatically from `echo $ac_file_in |
12398                                                  sed 's,.*/,,'` by configure."
12399
12400   # First look for the input files in the build tree, otherwise in the
12401   # src tree.
12402   ac_file_inputs=`IFS=:
12403     for f in $ac_file_in; do
12404       case $f in
12405       -) echo $tmp/stdin ;;
12406       [\\/$]*)
12407          # Absolute (can't be DOS-style, as IFS=:)
12408          test -f "$f" || { { echo "$as_me:12408: error: cannot find input file: $f" >&5
12409 echo "$as_me: error: cannot find input file: $f" >&2;}
12410    { (exit 1); exit 1; }; }
12411          echo $f;;
12412       *) # Relative
12413          if test -f "$f"; then
12414            # Build tree
12415            echo $f
12416          elif test -f "$srcdir/$f"; then
12417            # Source tree
12418            echo $srcdir/$f
12419          else
12420            # /dev/null tree
12421            { { echo "$as_me:12421: error: cannot find input file: $f" >&5
12422 echo "$as_me: error: cannot find input file: $f" >&2;}
12423    { (exit 1); exit 1; }; }
12424          fi;;
12425       esac
12426     done` || { (exit 1); exit 1; }
12427 EOF
12428 cat >>$CONFIG_STATUS <<EOF
12429   sed "$ac_vpsub
12430 $extrasub
12431 EOF
12432 cat >>$CONFIG_STATUS <<\EOF
12433 :t
12434 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12435 s,@configure_input@,$configure_input,;t t
12436 s,@srcdir@,$ac_srcdir,;t t
12437 s,@top_srcdir@,$ac_top_srcdir,;t t
12438 s,@INSTALL@,$ac_INSTALL,;t t
12439 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12440   rm -f $tmp/stdin
12441   if test x"$ac_file" != x-; then
12442     mv $tmp/out $ac_file
12443   else
12444     cat $tmp/out
12445     rm -f $tmp/out
12446   fi
12447
12448 done
12449 EOF
12450 cat >>$CONFIG_STATUS <<\EOF
12451
12452 #
12453 # CONFIG_HEADER section.
12454 #
12455
12456 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12457 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12458 #
12459 # ac_d sets the value in "#define NAME VALUE" lines.
12460 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12461 ac_dB='[        ].*$,\1#\2'
12462 ac_dC=' '
12463 ac_dD=',;t'
12464 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12465 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12466 ac_iB='\([      ]\),\1#\2define\3'
12467 ac_iC=' '
12468 ac_iD='\4,;t'
12469 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12470 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12471 ac_uB='$,\1#\2define\3'
12472 ac_uC=' '
12473 ac_uD=',;t'
12474
12475 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
12476   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12477   case $ac_file in
12478   - | *:- | *:-:* ) # input from stdin
12479         cat >$tmp/stdin
12480         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12481         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12482   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12483         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12484   * )   ac_file_in=$ac_file.in ;;
12485   esac
12486
12487   test x"$ac_file" != x- && { echo "$as_me:12487: creating $ac_file" >&5
12488 echo "$as_me: creating $ac_file" >&6;}
12489
12490   # First look for the input files in the build tree, otherwise in the
12491   # src tree.
12492   ac_file_inputs=`IFS=:
12493     for f in $ac_file_in; do
12494       case $f in
12495       -) echo $tmp/stdin ;;
12496       [\\/$]*)
12497          # Absolute (can't be DOS-style, as IFS=:)
12498          test -f "$f" || { { echo "$as_me:12498: error: cannot find input file: $f" >&5
12499 echo "$as_me: error: cannot find input file: $f" >&2;}
12500    { (exit 1); exit 1; }; }
12501          echo $f;;
12502       *) # Relative
12503          if test -f "$f"; then
12504            # Build tree
12505            echo $f
12506          elif test -f "$srcdir/$f"; then
12507            # Source tree
12508            echo $srcdir/$f
12509          else
12510            # /dev/null tree
12511            { { echo "$as_me:12511: error: cannot find input file: $f" >&5
12512 echo "$as_me: error: cannot find input file: $f" >&2;}
12513    { (exit 1); exit 1; }; }
12514          fi;;
12515       esac
12516     done` || { (exit 1); exit 1; }
12517   # Remove the trailing spaces.
12518   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
12519
12520 EOF
12521
12522 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
12523 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
12524 # be either 'cat' or 'sort'.
12525 cat confdefs.h | uniq >conftest.vals
12526
12527 # Break up conftest.vals because some shells have a limit on
12528 # the size of here documents, and old seds have small limits too.
12529
12530 rm -f conftest.tail
12531 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
12532 while grep . conftest.vals >/dev/null
12533 do
12534   # Write chunks of a limited-size here document to conftest.frag.
12535   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
12536   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
12537   echo 'CEOF' >> $CONFIG_STATUS
12538   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12539   rm -f conftest.vals
12540   mv conftest.tail conftest.vals
12541 done
12542 rm -f conftest.vals
12543
12544 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
12545 # marker @DEFS@.
12546 echo '  cat >> conftest.edit <<CEOF
12547 /@DEFS@/r conftest.frag
12548 /@DEFS@/d
12549 CEOF
12550 sed -f conftest.edit $tmp/in > $tmp/out
12551 rm -f $tmp/in
12552 mv $tmp/out $tmp/in
12553 rm -f conftest.edit conftest.frag
12554 ' >> $CONFIG_STATUS
12555
12556 cat >>$CONFIG_STATUS <<\EOF
12557   # Let's still pretend it is `configure' which instantiates (i.e., don't
12558   # use $as_me), people would be surprised to read:
12559   #    /* config.h.  Generated automatically by config.status.  */
12560   if test x"$ac_file" = x-; then
12561     echo "/* Generated automatically by configure.  */" >$tmp/config.h
12562   else
12563     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
12564   fi
12565   cat $tmp/in >>$tmp/config.h
12566   rm -f $tmp/in
12567   if test x"$ac_file" != x-; then
12568     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
12569       { echo "$as_me:12569: $ac_file is unchanged" >&5
12570 echo "$as_me: $ac_file is unchanged" >&6;}
12571     else
12572       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12573          X"$ac_file" : 'X\(//\)[^/]' \| \
12574          X"$ac_file" : 'X\(//\)$' \| \
12575          X"$ac_file" : 'X\(/\)' \| \
12576          .     : '\(.\)' 2>/dev/null ||
12577 echo X"$ac_file" |
12578     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12579           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12580           /^X\(\/\/\)$/{ s//\1/; q; }
12581           /^X\(\/\).*/{ s//\1/; q; }
12582           s/.*/./; q'`
12583       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12584         { case "$ac_dir" in
12585   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12586   *)                      as_incr_dir=.;;
12587 esac
12588 as_dummy="$ac_dir"
12589 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12590   case $as_mkdir_dir in
12591     # Skip DOS drivespec
12592     ?:) as_incr_dir=$as_mkdir_dir ;;
12593     *)
12594       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12595       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12596     ;;
12597   esac
12598 done; }
12599
12600       fi
12601       rm -f $ac_file
12602       mv $tmp/config.h $ac_file
12603     fi
12604   else
12605     cat $tmp/config.h
12606     rm -f $tmp/config.h
12607   fi
12608 done
12609 EOF
12610 cat >>$CONFIG_STATUS <<\EOF
12611 #
12612 # CONFIG_COMMANDS section.
12613 #
12614 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12615   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12616   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12617
12618   case $ac_dest in
12619     default )
12620 if test -z "$USE_OLD_MAKERULES" ; then
12621         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
12622 fi
12623  ;;
12624   esac
12625 done
12626 EOF
12627
12628 cat >>$CONFIG_STATUS <<\EOF
12629
12630 { (exit 0); exit 0; }
12631 EOF
12632 chmod +x $CONFIG_STATUS
12633 ac_clean_files=$ac_clean_files_save
12634
12635 # configure is writing to config.log, and then calls config.status.
12636 # config.status does its own redirection, appending to config.log.
12637 # Unfortunately, on DOS this fails, as config.log is still kept open
12638 # by configure, so config.status won't be able to write to it; its
12639 # output is simply discarded.  So we exec the FD to /dev/null,
12640 # effectively closing config.log, so it can be properly (re)opened and
12641 # appended to by config.status.  When coming back to configure, we
12642 # need to make the FD available again.
12643 if test "$no_create" != yes; then
12644   ac_cs_success=:
12645   exec 5>/dev/null
12646   $SHELL $CONFIG_STATUS || ac_cs_success=false
12647   exec 5>>config.log
12648   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12649   # would make configure fail if this is the last instruction.
12650   $ac_cs_success || { (exit 1); exit 1; }
12651 fi
12652 ${MAKE:-make} preinstall