]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
1b61da53889345ba63e94fcf645d930c32f05867
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.54 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20121002.
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 datarootdir='${prefix}/share'
139 datadir='${datarootdir}'
140 sysconfdir='${prefix}/etc'
141 sharedstatedir='${prefix}/com'
142 localstatedir='${prefix}/var'
143 libdir='${exec_prefix}/lib'
144 includedir='${prefix}/include'
145 oldincludedir='/usr/include'
146 infodir='${datarootdir}/info'
147 mandir='${datarootdir}/man'
148
149 # Identity of this package.
150 PACKAGE_NAME=
151 PACKAGE_TARNAME=
152 PACKAGE_VERSION=
153 PACKAGE_STRING=
154 PACKAGE_BUGREPORT=
155
156 ac_prev=
157 for ac_option
158 do
159   # If the previous option needs an argument, assign it.
160   if test -n "$ac_prev"; then
161     eval "$ac_prev=\$ac_option"
162     ac_prev=
163     continue
164   fi
165
166   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
167
168   # Accept the important Cygnus configure options, so we can diagnose typos.
169
170   case $ac_option in
171
172   -bindir | --bindir | --bindi | --bind | --bin | --bi)
173     ac_prev=bindir ;;
174   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
175     bindir=$ac_optarg ;;
176
177   -build | --build | --buil | --bui | --bu)
178     ac_prev=build_alias ;;
179   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
180     build_alias=$ac_optarg ;;
181
182   -cache-file | --cache-file | --cache-fil | --cache-fi \
183   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
184     ac_prev=cache_file ;;
185   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
186   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
187     cache_file=$ac_optarg ;;
188
189   --config-cache | -C)
190     cache_file=config.cache ;;
191
192   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193     ac_prev=datadir ;;
194   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195   | --da=*)
196     datadir=$ac_optarg ;;
197
198   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
199   | --dataroo | --dataro | --datar)
200     ac_prev=datarootdir ;;
201   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
202   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
203     datarootdir=$ac_optarg ;;
204
205   -disable-* | --disable-*)
206     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
207     # Reject names that are not valid shell variable names.
208     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210    { (exit 1); exit 1; }; }
211     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212     eval "enable_$ac_feature=no" ;;
213
214   -enable-* | --enable-*)
215     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
216     # Reject names that are not valid shell variable names.
217     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
218       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
219    { (exit 1); exit 1; }; }
220     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
221     case $ac_option in
222       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
223       *) ac_optarg=yes ;;
224     esac
225     eval "enable_$ac_feature='$ac_optarg'" ;;
226
227   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
228   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
229   | --exec | --exe | --ex)
230     ac_prev=exec_prefix ;;
231   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
232   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
233   | --exec=* | --exe=* | --ex=*)
234     exec_prefix=$ac_optarg ;;
235
236   -gas | --gas | --ga | --g)
237     # Obsolete; use --with-gas.
238     with_gas=yes ;;
239
240   -help | --help | --hel | --he | -h)
241     ac_init_help=long ;;
242   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
243     ac_init_help=recursive ;;
244   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
245     ac_init_help=short ;;
246
247   -host | --host | --hos | --ho)
248     ac_prev=host_alias ;;
249   -host=* | --host=* | --hos=* | --ho=*)
250     host_alias=$ac_optarg ;;
251
252   -includedir | --includedir | --includedi | --included | --include \
253   | --includ | --inclu | --incl | --inc)
254     ac_prev=includedir ;;
255   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
256   | --includ=* | --inclu=* | --incl=* | --inc=*)
257     includedir=$ac_optarg ;;
258
259   -infodir | --infodir | --infodi | --infod | --info | --inf)
260     ac_prev=infodir ;;
261   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
262     infodir=$ac_optarg ;;
263
264   -libdir | --libdir | --libdi | --libd)
265     ac_prev=libdir ;;
266   -libdir=* | --libdir=* | --libdi=* | --libd=*)
267     libdir=$ac_optarg ;;
268
269   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
270   | --libexe | --libex | --libe)
271     ac_prev=libexecdir ;;
272   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
273   | --libexe=* | --libex=* | --libe=*)
274     libexecdir=$ac_optarg ;;
275
276   -localstatedir | --localstatedir | --localstatedi | --localstated \
277   | --localstate | --localstat | --localsta | --localst \
278   | --locals | --local | --loca | --loc | --lo)
279     ac_prev=localstatedir ;;
280   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
281   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
282   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
283     localstatedir=$ac_optarg ;;
284
285   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
286     ac_prev=mandir ;;
287   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
288     mandir=$ac_optarg ;;
289
290   -nfp | --nfp | --nf)
291     # Obsolete; use --without-fp.
292     with_fp=no ;;
293
294   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
295   | --no-cr | --no-c)
296     no_create=yes ;;
297
298   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
299   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
300     no_recursion=yes ;;
301
302   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
303   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
304   | --oldin | --oldi | --old | --ol | --o)
305     ac_prev=oldincludedir ;;
306   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
307   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
308   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
309     oldincludedir=$ac_optarg ;;
310
311   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
312     ac_prev=prefix ;;
313   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
314     prefix=$ac_optarg ;;
315
316   -program-prefix | --program-prefix | --program-prefi | --program-pref \
317   | --program-pre | --program-pr | --program-p)
318     ac_prev=program_prefix ;;
319   -program-prefix=* | --program-prefix=* | --program-prefi=* \
320   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
321     program_prefix=$ac_optarg ;;
322
323   -program-suffix | --program-suffix | --program-suffi | --program-suff \
324   | --program-suf | --program-su | --program-s)
325     ac_prev=program_suffix ;;
326   -program-suffix=* | --program-suffix=* | --program-suffi=* \
327   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
328     program_suffix=$ac_optarg ;;
329
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     ac_prev=program_transform_name ;;
338   -program-transform-name=* | --program-transform-name=* \
339   | --program-transform-nam=* | --program-transform-na=* \
340   | --program-transform-n=* | --program-transform-=* \
341   | --program-transform=* | --program-transfor=* \
342   | --program-transfo=* | --program-transf=* \
343   | --program-trans=* | --program-tran=* \
344   | --progr-tra=* | --program-tr=* | --program-t=*)
345     program_transform_name=$ac_optarg ;;
346
347   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
348   | -silent | --silent | --silen | --sile | --sil)
349     silent=yes ;;
350
351   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
352     ac_prev=sbindir ;;
353   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
354   | --sbi=* | --sb=*)
355     sbindir=$ac_optarg ;;
356
357   -sharedstatedir | --sharedstatedir | --sharedstatedi \
358   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
359   | --sharedst | --shareds | --shared | --share | --shar \
360   | --sha | --sh)
361     ac_prev=sharedstatedir ;;
362   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
363   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
364   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
365   | --sha=* | --sh=*)
366     sharedstatedir=$ac_optarg ;;
367
368   -site | --site | --sit)
369     ac_prev=site ;;
370   -site=* | --site=* | --sit=*)
371     site=$ac_optarg ;;
372
373   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374     ac_prev=srcdir ;;
375   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376     srcdir=$ac_optarg ;;
377
378   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379   | --syscon | --sysco | --sysc | --sys | --sy)
380     ac_prev=sysconfdir ;;
381   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383     sysconfdir=$ac_optarg ;;
384
385   -target | --target | --targe | --targ | --tar | --ta | --t)
386     ac_prev=target_alias ;;
387   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388     target_alias=$ac_optarg ;;
389
390   -v | -verbose | --verbose | --verbos | --verbo | --verb)
391     verbose=yes ;;
392
393   -version | --version | --versio | --versi | --vers | -V)
394     ac_init_version=: ;;
395
396   -with-* | --with-*)
397     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
398     # Reject names that are not valid shell variable names.
399     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400       { echo "$as_me: error: invalid package name: $ac_package" >&2
401    { (exit 1); exit 1; }; }
402     ac_package=`echo $ac_package| sed 's/-/_/g'`
403     case $ac_option in
404       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
405       *) ac_optarg=yes ;;
406     esac
407     eval "with_$ac_package='$ac_optarg'" ;;
408
409   -without-* | --without-*)
410     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
411     # Reject names that are not valid shell variable names.
412     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413       { echo "$as_me: error: invalid package name: $ac_package" >&2
414    { (exit 1); exit 1; }; }
415     ac_package=`echo $ac_package | sed 's/-/_/g'`
416     eval "with_$ac_package=no" ;;
417
418   --x)
419     # Obsolete; use --with-x.
420     with_x=yes ;;
421
422   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
423   | --x-incl | --x-inc | --x-in | --x-i)
424     ac_prev=x_includes ;;
425   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
426   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
427     x_includes=$ac_optarg ;;
428
429   -x-libraries | --x-libraries | --x-librarie | --x-librari \
430   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
431     ac_prev=x_libraries ;;
432   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
433   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
434     x_libraries=$ac_optarg ;;
435
436   -*) { echo "$as_me: error: unrecognized option: $ac_option
437 Try \`$0 --help' for more information." >&2
438    { (exit 1); exit 1; }; }
439     ;;
440
441   *=*)
442     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
443     # Reject names that are not valid shell variable names.
444     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
445       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
446    { (exit 1); exit 1; }; }
447     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
448     eval "$ac_envvar='$ac_optarg'"
449     export $ac_envvar ;;
450
451   *)
452     # FIXME: should be removed in autoconf 3.0.
453     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
454     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
455       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
456     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
457     ;;
458
459   esac
460 done
461
462 if test -n "$ac_prev"; then
463   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
464   { echo "$as_me: error: missing argument to $ac_option" >&2
465    { (exit 1); exit 1; }; }
466 fi
467
468 # Be sure to have absolute paths.
469 for ac_var in exec_prefix prefix
470 do
471   eval ac_val=$`echo $ac_var`
472   case $ac_val in
473     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
474     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
475    { (exit 1); exit 1; }; };;
476   esac
477 done
478
479 # Be sure to have absolute paths.
480 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
481               localstatedir libdir includedir oldincludedir infodir mandir
482 do
483   eval ac_val=$`echo $ac_var`
484   case $ac_val in
485     [\\/$]* | ?:[\\/]* ) ;;
486     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
487    { (exit 1); exit 1; }; };;
488   esac
489 done
490
491 # There might be people who depend on the old broken behavior: `$host'
492 # used to hold the argument of --host etc.
493 build=$build_alias
494 host=$host_alias
495 target=$target_alias
496
497 # FIXME: should be removed in autoconf 3.0.
498 if test "x$host_alias" != x; then
499   if test "x$build_alias" = x; then
500     cross_compiling=maybe
501     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
502     If a cross compiler is detected then cross compile mode will be used." >&2
503   elif test "x$build_alias" != "x$host_alias"; then
504     cross_compiling=yes
505   fi
506 fi
507
508 ac_tool_prefix=
509 test -n "$host_alias" && ac_tool_prefix=$host_alias-
510
511 test "$silent" = yes && exec 6>/dev/null
512
513 # Find the source files, if location was not specified.
514 if test -z "$srcdir"; then
515   ac_srcdir_defaulted=yes
516   # Try the directory containing this script, then its parent.
517   ac_prog=$0
518   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
519   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
520   srcdir=$ac_confdir
521   if test ! -r $srcdir/$ac_unique_file; then
522     srcdir=..
523   fi
524 else
525   ac_srcdir_defaulted=no
526 fi
527 if test ! -r $srcdir/$ac_unique_file; then
528   if test "$ac_srcdir_defaulted" = yes; then
529     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
530    { (exit 1); exit 1; }; }
531   else
532     { echo "$as_me: error: cannot find sources in $srcdir" >&2
533    { (exit 1); exit 1; }; }
534   fi
535 fi
536 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
537 ac_env_build_alias_set=${build_alias+set}
538 ac_env_build_alias_value=$build_alias
539 ac_cv_env_build_alias_set=${build_alias+set}
540 ac_cv_env_build_alias_value=$build_alias
541 ac_env_host_alias_set=${host_alias+set}
542 ac_env_host_alias_value=$host_alias
543 ac_cv_env_host_alias_set=${host_alias+set}
544 ac_cv_env_host_alias_value=$host_alias
545 ac_env_target_alias_set=${target_alias+set}
546 ac_env_target_alias_value=$target_alias
547 ac_cv_env_target_alias_set=${target_alias+set}
548 ac_cv_env_target_alias_value=$target_alias
549 ac_env_CC_set=${CC+set}
550 ac_env_CC_value=$CC
551 ac_cv_env_CC_set=${CC+set}
552 ac_cv_env_CC_value=$CC
553 ac_env_CFLAGS_set=${CFLAGS+set}
554 ac_env_CFLAGS_value=$CFLAGS
555 ac_cv_env_CFLAGS_set=${CFLAGS+set}
556 ac_cv_env_CFLAGS_value=$CFLAGS
557 ac_env_LDFLAGS_set=${LDFLAGS+set}
558 ac_env_LDFLAGS_value=$LDFLAGS
559 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
560 ac_cv_env_LDFLAGS_value=$LDFLAGS
561 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
562 ac_env_CPPFLAGS_value=$CPPFLAGS
563 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
564 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
565 ac_env_CPP_set=${CPP+set}
566 ac_env_CPP_value=$CPP
567 ac_cv_env_CPP_set=${CPP+set}
568 ac_cv_env_CPP_value=$CPP
569
570 #
571 # Report the --help message.
572 #
573 if test "$ac_init_help" = "long"; then
574   # Omit some internal or obsolete options to make the list less imposing.
575   # This message is too long to be a string in the A/UX 3.1 sh.
576   cat <<EOF
577 \`configure' configures this package to adapt to many kinds of systems.
578
579 Usage: $0 [OPTION]... [VAR=VALUE]...
580
581 To assign environment variables (e.g., CC, CFLAGS...), specify them as
582 VAR=VALUE.  See below for descriptions of some of the useful variables.
583
584 Defaults for the options are specified in brackets.
585
586 Configuration:
587   -h, --help              display this help and exit
588       --help=short        display options specific to this package
589       --help=recursive    display the short help of all the included packages
590   -V, --version           display version information and exit
591   -q, --quiet, --silent   do not print \`checking...' messages
592       --cache-file=FILE   cache test results in FILE [disabled]
593   -C, --config-cache      alias for \`--cache-file=config.cache'
594   -n, --no-create         do not create output files
595       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
596
597 EOF
598
599   cat <<EOF
600 Installation directories:
601   --prefix=PREFIX         install architecture-independent files in PREFIX
602                           [$ac_default_prefix]
603   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
604                           [PREFIX]
605
606 By default, \`make install' will install all the files in
607 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
608 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
609 for instance \`--prefix=\$HOME'.
610
611 For better control, use the options below.
612
613 Fine tuning of the installation directories:
614   --bindir=DIR            user executables [EPREFIX/bin]
615   --sbindir=DIR           system admin executables [EPREFIX/sbin]
616   --libexecdir=DIR        program executables [EPREFIX/libexec]
617   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
618   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
619   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
620   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
621   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
622   --libdir=DIR            object code libraries [EPREFIX/lib]
623   --includedir=DIR        C header files [PREFIX/include]
624   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
625   --infodir=DIR           info documentation [DATAROOTDIR/info]
626   --mandir=DIR            man documentation [DATAROOTDIR/man]
627 EOF
628
629   cat <<\EOF
630
631 Program names:
632   --program-prefix=PREFIX            prepend PREFIX to installed program names
633   --program-suffix=SUFFIX            append SUFFIX to installed program names
634   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
635
636 System types:
637   --build=BUILD           configure for building on BUILD [guessed]
638   --host=HOST       build programs to run on HOST [BUILD]
639   --target=TARGET   configure for building compilers for TARGET [HOST]
640 EOF
641 fi
642
643 if test -n "$ac_init_help"; then
644
645   cat <<\EOF
646
647 Optional Packages:
648   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
649   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
650
651 Optional Features:
652   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
653   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
654
655   --with-system-type=XXX  test: override derived host system-type
656   --with-pkg-config{=path} enable/disable use of pkg-config
657   --with-pkg-config-libdir=XXX use given directory for installing pc-files
658   --enable-pc-files       generate and install .pc files for pkg-config
659   --without-tests         suppress build with test-programs
660   --enable-mixed-case     tic should assume mixed-case filenames
661   --with-install-prefix   prefixes actual install-location ($DESTDIR)
662 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
663   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
664   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
665   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
666   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
667   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
668   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
669 Options to Specify the Libraries Built/Used:
670   --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
671   --enable-widec          compile with wide-char/UTF-8 code
672   --with-curses-dir=DIR   directory in which (n)curses is installed
673   --with-lib-prefix       override library-prefix
674   --with-shlib-version=X  Specify rel or abi version for shared libs
675   --enable-rpath-link     link sample programs with rpath option
676 Fine-Tuning Your Configuration:
677   --enable-broken_linker  compile with broken-linker support code
678   --disable-largefile     omit support for large files
679   --with-rcs-ids          compile-in RCS identifiers
680 Extensions:
681   --disable-ext-funcs     disable function-extensions
682   --enable-const          compile with extra/non-standard const
683 Development Code:
684   --without-develop       disable development options
685 Experimental Code:
686   --with-pthread          use POSIX thread library
687   --enable-weak-symbols   enable weak-symbols for pthreads
688   --enable-reentrant      compile with experimental reentrant code
689   --with-wrap-prefix=XXX  override prefix used for public variables
690 Testing/development Options:
691   --disable-echo          do not display "compiling" commands
692   --enable-warnings       build: turn on GCC compiler warnings
693   --enable-assertions     test: turn on generation of assertion code
694   --enable-expanded       test: generate functions for certain macros
695   --disable-macros        test: use functions rather than macros
696   --with-trace            test: add trace() function to all models of ncurses
697   --disable-gnat-projects test: disable GNAT projects even if usable
698 Ada95 Binding Options:
699   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
700   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
701   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
702   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
703
704 Some influential environment variables:
705   CC          C compiler command
706   CFLAGS      C compiler flags
707   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
708               nonstandard directory <lib dir>
709   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
710               headers in a nonstandard directory <include dir>
711   CPP         C preprocessor
712
713 Use these variables to override the choices made by `configure' or to help
714 it to find libraries and programs with nonstandard names/locations.
715
716 EOF
717 fi
718
719 if test "$ac_init_help" = "recursive"; then
720   # If there are subdirs, report their specific --help.
721   ac_popdir=`pwd`
722   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
723     cd $ac_subdir
724     # A "../" for each directory in /$ac_subdir.
725     ac_dots=`echo $ac_subdir |
726              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
727
728     case $srcdir in
729     .) # No --srcdir option.  We are building in place.
730       ac_sub_srcdir=$srcdir ;;
731     [\\/]* | ?:[\\/]* ) # Absolute path.
732       ac_sub_srcdir=$srcdir/$ac_subdir ;;
733     *) # Relative path.
734       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
735     esac
736
737     # Check for guested configure; otherwise get Cygnus style configure.
738     if test -f $ac_sub_srcdir/configure.gnu; then
739       echo
740       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
741     elif test -f $ac_sub_srcdir/configure; then
742       echo
743       $SHELL $ac_sub_srcdir/configure  --help=recursive
744     elif test -f $ac_sub_srcdir/configure.ac ||
745            test -f $ac_sub_srcdir/configure.in; then
746       echo
747       $ac_configure --help
748     else
749       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
750     fi
751     cd $ac_popdir
752   done
753 fi
754
755 test -n "$ac_init_help" && exit 0
756 if $ac_init_version; then
757   cat <<\EOF
758
759 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
760 Free Software Foundation, Inc.
761 This configure script is free software; the Free Software Foundation
762 gives unlimited permission to copy, distribute and modify it.
763 EOF
764   exit 0
765 fi
766 exec 5>config.log
767 cat >&5 <<EOF
768 This file contains any messages produced by compilers while
769 running configure, to aid debugging if configure makes a mistake.
770
771 It was created by $as_me, which was
772 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
773
774   $ $0 $@
775
776 EOF
777 {
778 cat <<_ASUNAME
779 ## ---------- ##
780 ## Platform.  ##
781 ## ---------- ##
782
783 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
784 uname -m = `(uname -m) 2>/dev/null || echo unknown`
785 uname -r = `(uname -r) 2>/dev/null || echo unknown`
786 uname -s = `(uname -s) 2>/dev/null || echo unknown`
787 uname -v = `(uname -v) 2>/dev/null || echo unknown`
788
789 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
790 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
791
792 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
793 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
794 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
795 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
796 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
797 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
798 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
799
800 PATH = $PATH
801
802 _ASUNAME
803 } >&5
804
805 cat >&5 <<EOF
806 ## ------------ ##
807 ## Core tests.  ##
808 ## ------------ ##
809
810 EOF
811
812 # Keep a trace of the command line.
813 # Strip out --no-create and --no-recursion so they do not pile up.
814 # Also quote any args containing shell meta-characters.
815 ac_configure_args=
816 ac_sep=
817 for ac_arg
818 do
819   case $ac_arg in
820   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
821   | --no-cr | --no-c) ;;
822   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
823   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
824   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
825     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
826     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
827     ac_sep=" " ;;
828   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
829      ac_sep=" " ;;
830   esac
831   # Get rid of the leading space.
832 done
833
834 # When interrupted or exit'd, cleanup temporary files, and complete
835 # config.log.  We remove comments because anyway the quotes in there
836 # would cause problems or look ugly.
837 trap 'exit_status=$?
838   # Save into config.log some information that might help in debugging.
839   echo >&5
840   echo "## ----------------- ##" >&5
841   echo "## Cache variables.  ##" >&5
842   echo "## ----------------- ##" >&5
843   echo >&5
844   # The following way of writing the cache mishandles newlines in values,
845 {
846   (set) 2>&1 |
847     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
848     *ac_space=\ *)
849       sed -n \
850         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
851           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
852       ;;
853     *)
854       sed -n \
855         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
856       ;;
857     esac;
858 } >&5
859   sed "/^$/d" confdefs.h >conftest.log
860   if test -s conftest.log; then
861     echo >&5
862     echo "## ------------ ##" >&5
863     echo "## confdefs.h.  ##" >&5
864     echo "## ------------ ##" >&5
865     echo >&5
866     cat conftest.log >&5
867   fi
868   (echo; echo) >&5
869   test "$ac_signal" != 0 &&
870     echo "$as_me: caught signal $ac_signal" >&5
871   echo "$as_me: exit $exit_status" >&5
872   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
873     exit $exit_status
874      ' 0
875 for ac_signal in 1 2 13 15; do
876   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
877 done
878 ac_signal=0
879
880 # confdefs.h avoids OS command line length limits that DEFS can exceed.
881 rm -rf conftest* confdefs.h
882 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
883 echo >confdefs.h
884
885 # Let the site file select an alternate cache file if it wants to.
886 # Prefer explicitly selected file to automatically selected ones.
887 if test -z "$CONFIG_SITE"; then
888   if test "x$prefix" != xNONE; then
889     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
890   else
891     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
892   fi
893 fi
894 for ac_site_file in $CONFIG_SITE; do
895   if test -r "$ac_site_file"; then
896     { echo "$as_me:896: loading site script $ac_site_file" >&5
897 echo "$as_me: loading site script $ac_site_file" >&6;}
898     cat "$ac_site_file" >&5
899     . "$ac_site_file"
900   fi
901 done
902
903 if test -r "$cache_file"; then
904   # Some versions of bash will fail to source /dev/null (special
905   # files actually), so we avoid doing that.
906   if test -f "$cache_file"; then
907     { echo "$as_me:907: loading cache $cache_file" >&5
908 echo "$as_me: loading cache $cache_file" >&6;}
909     case $cache_file in
910       [\\/]* | ?:[\\/]* ) . $cache_file;;
911       *)                      . ./$cache_file;;
912     esac
913   fi
914 else
915   { echo "$as_me:915: creating cache $cache_file" >&5
916 echo "$as_me: creating cache $cache_file" >&6;}
917   >$cache_file
918 fi
919
920 # Check that the precious variables saved in the cache have kept the same
921 # value.
922 ac_cache_corrupted=false
923 for ac_var in `(set) 2>&1 |
924                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
925   eval ac_old_set=\$ac_cv_env_${ac_var}_set
926   eval ac_new_set=\$ac_env_${ac_var}_set
927   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
928   eval ac_new_val="\$ac_env_${ac_var}_value"
929   case $ac_old_set,$ac_new_set in
930     set,)
931       { echo "$as_me:931: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
932 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
933       ac_cache_corrupted=: ;;
934     ,set)
935       { echo "$as_me:935: error: \`$ac_var' was not set in the previous run" >&5
936 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
937       ac_cache_corrupted=: ;;
938     ,);;
939     *)
940       if test "x$ac_old_val" != "x$ac_new_val"; then
941         { echo "$as_me:941: error: \`$ac_var' has changed since the previous run:" >&5
942 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
943         { echo "$as_me:943:   former value:  $ac_old_val" >&5
944 echo "$as_me:   former value:  $ac_old_val" >&2;}
945         { echo "$as_me:945:   current value: $ac_new_val" >&5
946 echo "$as_me:   current value: $ac_new_val" >&2;}
947         ac_cache_corrupted=:
948       fi;;
949   esac
950   # Pass precious variables to config.status.  It doesn't matter if
951   # we pass some twice (in addition to the command line arguments).
952   if test "$ac_new_set" = set; then
953     case $ac_new_val in
954     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
955       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
956       ac_configure_args="$ac_configure_args '$ac_arg'"
957       ;;
958     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
959        ;;
960     esac
961   fi
962 done
963 if $ac_cache_corrupted; then
964   { echo "$as_me:964: error: changes in the environment can compromise the build" >&5
965 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
966   { { echo "$as_me:966: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
967 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
968    { (exit 1); exit 1; }; }
969 fi
970
971 ac_ext=c
972 ac_cpp='$CPP $CPPFLAGS'
973 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
974 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
975 ac_compiler_gnu=$ac_cv_c_compiler_gnu
976 ac_main_return=return
977
978 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
979   *c*,-n*) ECHO_N= ECHO_C='
980 ' ECHO_T='      ' ;;
981   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
982   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
983 esac
984 echo "#! $SHELL" >conftest.sh
985 echo  "exit 0"   >>conftest.sh
986 chmod +x conftest.sh
987 if { (echo "$as_me:987: PATH=\".;.\"; conftest.sh") >&5
988   (PATH=".;."; conftest.sh) 2>&5
989   ac_status=$?
990   echo "$as_me:990: \$? = $ac_status" >&5
991   (exit $ac_status); }; then
992   ac_path_separator=';'
993 else
994   ac_path_separator=:
995 fi
996 PATH_SEPARATOR="$ac_path_separator"
997 rm -f conftest.sh
998
999 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1000
1001 top_builddir=`pwd`
1002
1003 ac_aux_dir=
1004 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1005   if test -f $ac_dir/install-sh; then
1006     ac_aux_dir=$ac_dir
1007     ac_install_sh="$ac_aux_dir/install-sh -c"
1008     break
1009   elif test -f $ac_dir/install.sh; then
1010     ac_aux_dir=$ac_dir
1011     ac_install_sh="$ac_aux_dir/install.sh -c"
1012     break
1013   elif test -f $ac_dir/shtool; then
1014     ac_aux_dir=$ac_dir
1015     ac_install_sh="$ac_aux_dir/shtool install -c"
1016     break
1017   fi
1018 done
1019 if test -z "$ac_aux_dir"; then
1020   { { echo "$as_me:1020: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1021 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1022    { (exit 1); exit 1; }; }
1023 fi
1024 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1025 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1026 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1027
1028 # Make sure we can run config.sub.
1029 $ac_config_sub sun4 >/dev/null 2>&1 ||
1030   { { echo "$as_me:1030: error: cannot run $ac_config_sub" >&5
1031 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1032    { (exit 1); exit 1; }; }
1033
1034 echo "$as_me:1034: checking build system type" >&5
1035 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1036 if test "${ac_cv_build+set}" = set; then
1037   echo $ECHO_N "(cached) $ECHO_C" >&6
1038 else
1039   ac_cv_build_alias=$build_alias
1040 test -z "$ac_cv_build_alias" &&
1041   ac_cv_build_alias=`$ac_config_guess`
1042 test -z "$ac_cv_build_alias" &&
1043   { { echo "$as_me:1043: error: cannot guess build type; you must specify one" >&5
1044 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1045    { (exit 1); exit 1; }; }
1046 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1047   { { echo "$as_me:1047: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1048 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1049    { (exit 1); exit 1; }; }
1050
1051 fi
1052 echo "$as_me:1052: result: $ac_cv_build" >&5
1053 echo "${ECHO_T}$ac_cv_build" >&6
1054 build=$ac_cv_build
1055 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1056 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1057 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1058
1059 echo "$as_me:1059: checking host system type" >&5
1060 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1061 if test "${ac_cv_host+set}" = set; then
1062   echo $ECHO_N "(cached) $ECHO_C" >&6
1063 else
1064   ac_cv_host_alias=$host_alias
1065 test -z "$ac_cv_host_alias" &&
1066   ac_cv_host_alias=$ac_cv_build_alias
1067 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1068   { { echo "$as_me:1068: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1069 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1070    { (exit 1); exit 1; }; }
1071
1072 fi
1073 echo "$as_me:1073: result: $ac_cv_host" >&5
1074 echo "${ECHO_T}$ac_cv_host" >&6
1075 host=$ac_cv_host
1076 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1077 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1078 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1079
1080 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1081         echo "$as_me:1081: checking target system type" >&5
1082 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1083 if test "${ac_cv_target+set}" = set; then
1084   echo $ECHO_N "(cached) $ECHO_C" >&6
1085 else
1086   ac_cv_target_alias=$target_alias
1087 test "x$ac_cv_target_alias" = "x" &&
1088   ac_cv_target_alias=$ac_cv_host_alias
1089 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1090   { { echo "$as_me:1090: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1091 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1092    { (exit 1); exit 1; }; }
1093
1094 fi
1095 echo "$as_me:1095: result: $ac_cv_target" >&5
1096 echo "${ECHO_T}$ac_cv_target" >&6
1097 target=$ac_cv_target
1098 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1099 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1100 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1101
1102 # The aliases save the names the user supplied, while $host etc.
1103 # will get canonicalized.
1104 test -n "$target_alias" &&
1105   test "$program_prefix$program_suffix$program_transform_name" = \
1106     NONENONEs,x,x, &&
1107   program_prefix=${target_alias}-
1108         system_name="$host_os"
1109 else
1110         system_name="`(uname -s -r) 2>/dev/null`"
1111         if test -z "$system_name" ; then
1112                 system_name="`(hostname) 2>/dev/null`"
1113         fi
1114 fi
1115 test -n "$system_name" &&
1116 cat >>confdefs.h <<EOF
1117 #define SYSTEM_NAME "$system_name"
1118 EOF
1119
1120 if test "${cf_cv_system_name+set}" = set; then
1121   echo $ECHO_N "(cached) $ECHO_C" >&6
1122 else
1123   cf_cv_system_name="$system_name"
1124 fi
1125
1126 test -z "$system_name" && system_name="$cf_cv_system_name"
1127 test -n "$cf_cv_system_name" && echo "$as_me:1127: result: Configuring for $cf_cv_system_name" >&5
1128 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1129
1130 if test ".$system_name" != ".$cf_cv_system_name" ; then
1131         echo "$as_me:1131: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1132 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1133         { { echo "$as_me:1133: error: \"Please remove config.cache and try again.\"" >&5
1134 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1135    { (exit 1); exit 1; }; }
1136 fi
1137
1138 # Check whether --with-system-type or --without-system-type was given.
1139 if test "${with_system_type+set}" = set; then
1140   withval="$with_system_type"
1141   { echo "$as_me:1141: WARNING: overriding system type to $withval" >&5
1142 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1143         cf_cv_system_name=$withval
1144         host_os=$withval
1145
1146 fi;
1147
1148 ###     Save the given $CFLAGS to allow user-override.
1149 cf_user_CFLAGS="$CFLAGS"
1150
1151 ###     Default install-location
1152
1153 echo "$as_me:1153: checking for prefix" >&5
1154 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1155 if test "x$prefix" = "xNONE" ; then
1156         case "$cf_cv_system_name" in
1157                 # non-vendor systems don't have a conflict
1158         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1159                 prefix=/usr
1160                 ;;
1161         *)      prefix=$ac_default_prefix
1162                 ;;
1163         esac
1164 fi
1165 echo "$as_me:1165: result: $prefix" >&5
1166 echo "${ECHO_T}$prefix" >&6
1167
1168 if test "x$prefix" = "xNONE" ; then
1169 echo "$as_me:1169: checking for default include-directory" >&5
1170 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1171 test -n "$verbose" && echo 1>&6
1172 for cf_symbol in \
1173         $includedir \
1174         $includedir/ncurses \
1175         $prefix/include \
1176         $prefix/include/ncurses \
1177         /usr/local/include \
1178         /usr/local/include/ncurses \
1179         /usr/include \
1180         /usr/include/ncurses
1181 do
1182         cf_dir=`eval echo $cf_symbol`
1183         if test -f $cf_dir/curses.h ; then
1184         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1185                 includedir="$cf_symbol"
1186                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1187                 break
1188         fi
1189         fi
1190         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1191 done
1192 echo "$as_me:1192: result: $includedir" >&5
1193 echo "${ECHO_T}$includedir" >&6
1194 fi
1195
1196 ###     Checks for programs.
1197
1198 ac_ext=c
1199 ac_cpp='$CPP $CPPFLAGS'
1200 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1201 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1202 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1203 ac_main_return=return
1204 if test -n "$ac_tool_prefix"; then
1205   for ac_prog in gnatgcc gcc cc
1206   do
1207     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1208 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1209 echo "$as_me:1209: checking for $ac_word" >&5
1210 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1211 if test "${ac_cv_prog_CC+set}" = set; then
1212   echo $ECHO_N "(cached) $ECHO_C" >&6
1213 else
1214   if test -n "$CC"; then
1215   ac_cv_prog_CC="$CC" # Let the user override the test.
1216 else
1217   ac_save_IFS=$IFS; IFS=$ac_path_separator
1218 ac_dummy="$PATH"
1219 for ac_dir in $ac_dummy; do
1220   IFS=$ac_save_IFS
1221   test -z "$ac_dir" && ac_dir=.
1222   $as_executable_p "$ac_dir/$ac_word" || continue
1223 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1224 echo "$as_me:1224: found $ac_dir/$ac_word" >&5
1225 break
1226 done
1227
1228 fi
1229 fi
1230 CC=$ac_cv_prog_CC
1231 if test -n "$CC"; then
1232   echo "$as_me:1232: result: $CC" >&5
1233 echo "${ECHO_T}$CC" >&6
1234 else
1235   echo "$as_me:1235: result: no" >&5
1236 echo "${ECHO_T}no" >&6
1237 fi
1238
1239     test -n "$CC" && break
1240   done
1241 fi
1242 if test -z "$CC"; then
1243   ac_ct_CC=$CC
1244   for ac_prog in gnatgcc gcc cc
1245 do
1246   # Extract the first word of "$ac_prog", so it can be a program name with args.
1247 set dummy $ac_prog; ac_word=$2
1248 echo "$as_me:1248: checking for $ac_word" >&5
1249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1250 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1251   echo $ECHO_N "(cached) $ECHO_C" >&6
1252 else
1253   if test -n "$ac_ct_CC"; then
1254   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1255 else
1256   ac_save_IFS=$IFS; IFS=$ac_path_separator
1257 ac_dummy="$PATH"
1258 for ac_dir in $ac_dummy; do
1259   IFS=$ac_save_IFS
1260   test -z "$ac_dir" && ac_dir=.
1261   $as_executable_p "$ac_dir/$ac_word" || continue
1262 ac_cv_prog_ac_ct_CC="$ac_prog"
1263 echo "$as_me:1263: found $ac_dir/$ac_word" >&5
1264 break
1265 done
1266
1267 fi
1268 fi
1269 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1270 if test -n "$ac_ct_CC"; then
1271   echo "$as_me:1271: result: $ac_ct_CC" >&5
1272 echo "${ECHO_T}$ac_ct_CC" >&6
1273 else
1274   echo "$as_me:1274: result: no" >&5
1275 echo "${ECHO_T}no" >&6
1276 fi
1277
1278   test -n "$ac_ct_CC" && break
1279 done
1280
1281   CC=$ac_ct_CC
1282 fi
1283
1284 test -z "$CC" && { { echo "$as_me:1284: error: no acceptable cc found in \$PATH" >&5
1285 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1286    { (exit 1); exit 1; }; }
1287
1288 # Provide some information about the compiler.
1289 echo "$as_me:1289:" \
1290      "checking for C compiler version" >&5
1291 ac_compiler=`set X $ac_compile; echo $2`
1292 { (eval echo "$as_me:1292: \"$ac_compiler --version </dev/null >&5\"") >&5
1293   (eval $ac_compiler --version </dev/null >&5) 2>&5
1294   ac_status=$?
1295   echo "$as_me:1295: \$? = $ac_status" >&5
1296   (exit $ac_status); }
1297 { (eval echo "$as_me:1297: \"$ac_compiler -v </dev/null >&5\"") >&5
1298   (eval $ac_compiler -v </dev/null >&5) 2>&5
1299   ac_status=$?
1300   echo "$as_me:1300: \$? = $ac_status" >&5
1301   (exit $ac_status); }
1302 { (eval echo "$as_me:1302: \"$ac_compiler -V </dev/null >&5\"") >&5
1303   (eval $ac_compiler -V </dev/null >&5) 2>&5
1304   ac_status=$?
1305   echo "$as_me:1305: \$? = $ac_status" >&5
1306   (exit $ac_status); }
1307
1308 cat >conftest.$ac_ext <<_ACEOF
1309 #line 1309 "configure"
1310 #include "confdefs.h"
1311
1312 int
1313 main ()
1314 {
1315
1316   ;
1317   return 0;
1318 }
1319 _ACEOF
1320 ac_clean_files_save=$ac_clean_files
1321 ac_clean_files="$ac_clean_files a.out a.exe"
1322 # Try to create an executable without -o first, disregard a.out.
1323 # It will help us diagnose broken compilers, and finding out an intuition
1324 # of exeext.
1325 echo "$as_me:1325: checking for C compiler default output" >&5
1326 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1327 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1328 if { (eval echo "$as_me:1328: \"$ac_link_default\"") >&5
1329   (eval $ac_link_default) 2>&5
1330   ac_status=$?
1331   echo "$as_me:1331: \$? = $ac_status" >&5
1332   (exit $ac_status); }; then
1333   # Find the output, starting from the most likely.  This scheme is
1334 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1335 # resort.
1336 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1337                 ls a.out conftest 2>/dev/null;
1338                 ls a.* conftest.* 2>/dev/null`; do
1339   case $ac_file in
1340     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1341     a.out ) # We found the default executable, but exeext='' is most
1342             # certainly right.
1343             break;;
1344     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1345           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1346           export ac_cv_exeext
1347           break;;
1348     * ) break;;
1349   esac
1350 done
1351 else
1352   echo "$as_me: failed program was:" >&5
1353 cat conftest.$ac_ext >&5
1354 { { echo "$as_me:1354: error: C compiler cannot create executables" >&5
1355 echo "$as_me: error: C compiler cannot create executables" >&2;}
1356    { (exit 77); exit 77; }; }
1357 fi
1358
1359 ac_exeext=$ac_cv_exeext
1360 echo "$as_me:1360: result: $ac_file" >&5
1361 echo "${ECHO_T}$ac_file" >&6
1362
1363 # Check the compiler produces executables we can run.  If not, either
1364 # the compiler is broken, or we cross compile.
1365 echo "$as_me:1365: checking whether the C compiler works" >&5
1366 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1367 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1368 # If not cross compiling, check that we can run a simple program.
1369 if test "$cross_compiling" != yes; then
1370   if { ac_try='./$ac_file'
1371   { (eval echo "$as_me:1371: \"$ac_try\"") >&5
1372   (eval $ac_try) 2>&5
1373   ac_status=$?
1374   echo "$as_me:1374: \$? = $ac_status" >&5
1375   (exit $ac_status); }; }; then
1376     cross_compiling=no
1377   else
1378     if test "$cross_compiling" = maybe; then
1379         cross_compiling=yes
1380     else
1381         { { echo "$as_me:1381: error: cannot run C compiled programs.
1382 If you meant to cross compile, use \`--host'." >&5
1383 echo "$as_me: error: cannot run C compiled programs.
1384 If you meant to cross compile, use \`--host'." >&2;}
1385    { (exit 1); exit 1; }; }
1386     fi
1387   fi
1388 fi
1389 echo "$as_me:1389: result: yes" >&5
1390 echo "${ECHO_T}yes" >&6
1391
1392 rm -f a.out a.exe conftest$ac_cv_exeext
1393 ac_clean_files=$ac_clean_files_save
1394 # Check the compiler produces executables we can run.  If not, either
1395 # the compiler is broken, or we cross compile.
1396 echo "$as_me:1396: checking whether we are cross compiling" >&5
1397 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1398 echo "$as_me:1398: result: $cross_compiling" >&5
1399 echo "${ECHO_T}$cross_compiling" >&6
1400
1401 echo "$as_me:1401: checking for executable suffix" >&5
1402 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1403 if { (eval echo "$as_me:1403: \"$ac_link\"") >&5
1404   (eval $ac_link) 2>&5
1405   ac_status=$?
1406   echo "$as_me:1406: \$? = $ac_status" >&5
1407   (exit $ac_status); }; then
1408   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1409 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1410 # work properly (i.e., refer to `conftest.exe'), while it won't with
1411 # `rm'.
1412 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1413   case $ac_file in
1414     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1415     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1416           export ac_cv_exeext
1417           break;;
1418     * ) break;;
1419   esac
1420 done
1421 else
1422   { { echo "$as_me:1422: error: cannot compute EXEEXT: cannot compile and link" >&5
1423 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1424    { (exit 1); exit 1; }; }
1425 fi
1426
1427 rm -f conftest$ac_cv_exeext
1428 echo "$as_me:1428: result: $ac_cv_exeext" >&5
1429 echo "${ECHO_T}$ac_cv_exeext" >&6
1430
1431 rm -f conftest.$ac_ext
1432 EXEEXT=$ac_cv_exeext
1433 ac_exeext=$EXEEXT
1434 echo "$as_me:1434: checking for object suffix" >&5
1435 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1436 if test "${ac_cv_objext+set}" = set; then
1437   echo $ECHO_N "(cached) $ECHO_C" >&6
1438 else
1439   cat >conftest.$ac_ext <<_ACEOF
1440 #line 1440 "configure"
1441 #include "confdefs.h"
1442
1443 int
1444 main ()
1445 {
1446
1447   ;
1448   return 0;
1449 }
1450 _ACEOF
1451 rm -f conftest.o conftest.obj
1452 if { (eval echo "$as_me:1452: \"$ac_compile\"") >&5
1453   (eval $ac_compile) 2>&5
1454   ac_status=$?
1455   echo "$as_me:1455: \$? = $ac_status" >&5
1456   (exit $ac_status); }; then
1457   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1458   case $ac_file in
1459     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1460     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1461        break;;
1462   esac
1463 done
1464 else
1465   echo "$as_me: failed program was:" >&5
1466 cat conftest.$ac_ext >&5
1467 { { echo "$as_me:1467: error: cannot compute OBJEXT: cannot compile" >&5
1468 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1469    { (exit 1); exit 1; }; }
1470 fi
1471
1472 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1473 fi
1474 echo "$as_me:1474: result: $ac_cv_objext" >&5
1475 echo "${ECHO_T}$ac_cv_objext" >&6
1476 OBJEXT=$ac_cv_objext
1477 ac_objext=$OBJEXT
1478 echo "$as_me:1478: checking whether we are using the GNU C compiler" >&5
1479 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1480 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1481   echo $ECHO_N "(cached) $ECHO_C" >&6
1482 else
1483   cat >conftest.$ac_ext <<_ACEOF
1484 #line 1484 "configure"
1485 #include "confdefs.h"
1486
1487 int
1488 main ()
1489 {
1490 #ifndef __GNUC__
1491        choke me
1492 #endif
1493
1494   ;
1495   return 0;
1496 }
1497 _ACEOF
1498 rm -f conftest.$ac_objext
1499 if { (eval echo "$as_me:1499: \"$ac_compile\"") >&5
1500   (eval $ac_compile) 2>&5
1501   ac_status=$?
1502   echo "$as_me:1502: \$? = $ac_status" >&5
1503   (exit $ac_status); } &&
1504          { ac_try='test -s conftest.$ac_objext'
1505   { (eval echo "$as_me:1505: \"$ac_try\"") >&5
1506   (eval $ac_try) 2>&5
1507   ac_status=$?
1508   echo "$as_me:1508: \$? = $ac_status" >&5
1509   (exit $ac_status); }; }; then
1510   ac_compiler_gnu=yes
1511 else
1512   echo "$as_me: failed program was:" >&5
1513 cat conftest.$ac_ext >&5
1514 ac_compiler_gnu=no
1515 fi
1516 rm -f conftest.$ac_objext conftest.$ac_ext
1517 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1518
1519 fi
1520 echo "$as_me:1520: result: $ac_cv_c_compiler_gnu" >&5
1521 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1522 GCC=`test $ac_compiler_gnu = yes && echo yes`
1523 ac_test_CFLAGS=${CFLAGS+set}
1524 ac_save_CFLAGS=$CFLAGS
1525 CFLAGS="-g"
1526 echo "$as_me:1526: checking whether $CC accepts -g" >&5
1527 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1528 if test "${ac_cv_prog_cc_g+set}" = set; then
1529   echo $ECHO_N "(cached) $ECHO_C" >&6
1530 else
1531   cat >conftest.$ac_ext <<_ACEOF
1532 #line 1532 "configure"
1533 #include "confdefs.h"
1534
1535 int
1536 main ()
1537 {
1538
1539   ;
1540   return 0;
1541 }
1542 _ACEOF
1543 rm -f conftest.$ac_objext
1544 if { (eval echo "$as_me:1544: \"$ac_compile\"") >&5
1545   (eval $ac_compile) 2>&5
1546   ac_status=$?
1547   echo "$as_me:1547: \$? = $ac_status" >&5
1548   (exit $ac_status); } &&
1549          { ac_try='test -s conftest.$ac_objext'
1550   { (eval echo "$as_me:1550: \"$ac_try\"") >&5
1551   (eval $ac_try) 2>&5
1552   ac_status=$?
1553   echo "$as_me:1553: \$? = $ac_status" >&5
1554   (exit $ac_status); }; }; then
1555   ac_cv_prog_cc_g=yes
1556 else
1557   echo "$as_me: failed program was:" >&5
1558 cat conftest.$ac_ext >&5
1559 ac_cv_prog_cc_g=no
1560 fi
1561 rm -f conftest.$ac_objext conftest.$ac_ext
1562 fi
1563 echo "$as_me:1563: result: $ac_cv_prog_cc_g" >&5
1564 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1565 if test "$ac_test_CFLAGS" = set; then
1566   CFLAGS=$ac_save_CFLAGS
1567 elif test $ac_cv_prog_cc_g = yes; then
1568   if test "$GCC" = yes; then
1569     CFLAGS="-g -O2"
1570   else
1571     CFLAGS="-g"
1572   fi
1573 else
1574   if test "$GCC" = yes; then
1575     CFLAGS="-O2"
1576   else
1577     CFLAGS=
1578   fi
1579 fi
1580 # Some people use a C++ compiler to compile C.  Since we use `exit',
1581 # in C++ we need to declare it.  In case someone uses the same compiler
1582 # for both compiling C and C++ we need to have the C++ compiler decide
1583 # the declaration of exit, since it's the most demanding environment.
1584 cat >conftest.$ac_ext <<_ACEOF
1585 #ifndef __cplusplus
1586   choke me
1587 #endif
1588 _ACEOF
1589 rm -f conftest.$ac_objext
1590 if { (eval echo "$as_me:1590: \"$ac_compile\"") >&5
1591   (eval $ac_compile) 2>&5
1592   ac_status=$?
1593   echo "$as_me:1593: \$? = $ac_status" >&5
1594   (exit $ac_status); } &&
1595          { ac_try='test -s conftest.$ac_objext'
1596   { (eval echo "$as_me:1596: \"$ac_try\"") >&5
1597   (eval $ac_try) 2>&5
1598   ac_status=$?
1599   echo "$as_me:1599: \$? = $ac_status" >&5
1600   (exit $ac_status); }; }; then
1601   for ac_declaration in \
1602    ''\
1603    '#include <stdlib.h>' \
1604    'extern "C" void std::exit (int) throw (); using std::exit;' \
1605    'extern "C" void std::exit (int); using std::exit;' \
1606    'extern "C" void exit (int) throw ();' \
1607    'extern "C" void exit (int);' \
1608    'void exit (int);'
1609 do
1610   cat >conftest.$ac_ext <<_ACEOF
1611 #line 1611 "configure"
1612 #include "confdefs.h"
1613 #include <stdlib.h>
1614 $ac_declaration
1615 int
1616 main ()
1617 {
1618 exit (42);
1619   ;
1620   return 0;
1621 }
1622 _ACEOF
1623 rm -f conftest.$ac_objext
1624 if { (eval echo "$as_me:1624: \"$ac_compile\"") >&5
1625   (eval $ac_compile) 2>&5
1626   ac_status=$?
1627   echo "$as_me:1627: \$? = $ac_status" >&5
1628   (exit $ac_status); } &&
1629          { ac_try='test -s conftest.$ac_objext'
1630   { (eval echo "$as_me:1630: \"$ac_try\"") >&5
1631   (eval $ac_try) 2>&5
1632   ac_status=$?
1633   echo "$as_me:1633: \$? = $ac_status" >&5
1634   (exit $ac_status); }; }; then
1635   :
1636 else
1637   echo "$as_me: failed program was:" >&5
1638 cat conftest.$ac_ext >&5
1639 continue
1640 fi
1641 rm -f conftest.$ac_objext conftest.$ac_ext
1642   cat >conftest.$ac_ext <<_ACEOF
1643 #line 1643 "configure"
1644 #include "confdefs.h"
1645 $ac_declaration
1646 int
1647 main ()
1648 {
1649 exit (42);
1650   ;
1651   return 0;
1652 }
1653 _ACEOF
1654 rm -f conftest.$ac_objext
1655 if { (eval echo "$as_me:1655: \"$ac_compile\"") >&5
1656   (eval $ac_compile) 2>&5
1657   ac_status=$?
1658   echo "$as_me:1658: \$? = $ac_status" >&5
1659   (exit $ac_status); } &&
1660          { ac_try='test -s conftest.$ac_objext'
1661   { (eval echo "$as_me:1661: \"$ac_try\"") >&5
1662   (eval $ac_try) 2>&5
1663   ac_status=$?
1664   echo "$as_me:1664: \$? = $ac_status" >&5
1665   (exit $ac_status); }; }; then
1666   break
1667 else
1668   echo "$as_me: failed program was:" >&5
1669 cat conftest.$ac_ext >&5
1670 fi
1671 rm -f conftest.$ac_objext conftest.$ac_ext
1672 done
1673 rm -rf conftest*
1674 if test -n "$ac_declaration"; then
1675   echo '#ifdef __cplusplus' >>confdefs.h
1676   echo $ac_declaration      >>confdefs.h
1677   echo '#endif'             >>confdefs.h
1678 fi
1679
1680 else
1681   echo "$as_me: failed program was:" >&5
1682 cat conftest.$ac_ext >&5
1683 fi
1684 rm -f conftest.$ac_objext conftest.$ac_ext
1685 ac_ext=c
1686 ac_cpp='$CPP $CPPFLAGS'
1687 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1688 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1689 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1690 ac_main_return=return
1691
1692 GCC_VERSION=none
1693 if test "$GCC" = yes ; then
1694         echo "$as_me:1694: checking version of $CC" >&5
1695 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1696         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1697         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1698         echo "$as_me:1698: result: $GCC_VERSION" >&5
1699 echo "${ECHO_T}$GCC_VERSION" >&6
1700 fi
1701
1702 echo "$as_me:1702: checking for $CC option to accept ANSI C" >&5
1703 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1704 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1705   echo $ECHO_N "(cached) $ECHO_C" >&6
1706 else
1707   ac_cv_prog_cc_stdc=no
1708 ac_save_CC=$CC
1709 cat >conftest.$ac_ext <<_ACEOF
1710 #line 1710 "configure"
1711 #include "confdefs.h"
1712 #include <stdarg.h>
1713 #include <stdio.h>
1714 #include <sys/types.h>
1715 #include <sys/stat.h>
1716 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1717 struct buf { int x; };
1718 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1719 static char *e (p, i)
1720      char **p;
1721      int i;
1722 {
1723   return p[i];
1724 }
1725 static char *f (char * (*g) (char **, int), char **p, ...)
1726 {
1727   char *s;
1728   va_list v;
1729   va_start (v,p);
1730   s = g (p, va_arg (v,int));
1731   va_end (v);
1732   return s;
1733 }
1734 int test (int i, double x);
1735 struct s1 {int (*f) (int a);};
1736 struct s2 {int (*f) (double a);};
1737 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1738 int argc;
1739 char **argv;
1740 int
1741 main ()
1742 {
1743 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1744   ;
1745   return 0;
1746 }
1747 _ACEOF
1748 # Don't try gcc -ansi; that turns off useful extensions and
1749 # breaks some systems' header files.
1750 # AIX                   -qlanglvl=ansi
1751 # Ultrix and OSF/1      -std1
1752 # HP-UX 10.20 and later -Ae
1753 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1754 # SVR4                  -Xc -D__EXTENSIONS__
1755 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1756 do
1757   CC="$ac_save_CC $ac_arg"
1758   rm -f conftest.$ac_objext
1759 if { (eval echo "$as_me:1759: \"$ac_compile\"") >&5
1760   (eval $ac_compile) 2>&5
1761   ac_status=$?
1762   echo "$as_me:1762: \$? = $ac_status" >&5
1763   (exit $ac_status); } &&
1764          { ac_try='test -s conftest.$ac_objext'
1765   { (eval echo "$as_me:1765: \"$ac_try\"") >&5
1766   (eval $ac_try) 2>&5
1767   ac_status=$?
1768   echo "$as_me:1768: \$? = $ac_status" >&5
1769   (exit $ac_status); }; }; then
1770   ac_cv_prog_cc_stdc=$ac_arg
1771 break
1772 else
1773   echo "$as_me: failed program was:" >&5
1774 cat conftest.$ac_ext >&5
1775 fi
1776 rm -f conftest.$ac_objext
1777 done
1778 rm -f conftest.$ac_ext conftest.$ac_objext
1779 CC=$ac_save_CC
1780
1781 fi
1782
1783 case "x$ac_cv_prog_cc_stdc" in
1784   x|xno)
1785     echo "$as_me:1785: result: none needed" >&5
1786 echo "${ECHO_T}none needed" >&6 ;;
1787   *)
1788     echo "$as_me:1788: result: $ac_cv_prog_cc_stdc" >&5
1789 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1790     CC="$CC $ac_cv_prog_cc_stdc" ;;
1791 esac
1792
1793 # This should have been defined by AC_PROG_CC
1794 : ${CC:=cc}
1795
1796 echo "$as_me:1796: checking \$CC variable" >&5
1797 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1798 case "$CC" in #(vi
1799 *[\ \   ]-[IUD]*)
1800         echo "$as_me:1800: result: broken" >&5
1801 echo "${ECHO_T}broken" >&6
1802         { echo "$as_me:1802: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1803 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1804         # humor him...
1805         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
1806         CC=`echo "$CC" | sed -e 's/[    ].*//'`
1807
1808 cf_fix_cppflags=no
1809 cf_new_cflags=
1810 cf_new_cppflags=
1811 cf_new_extra_cppflags=
1812
1813 for cf_add_cflags in $cf_flags
1814 do
1815 case $cf_fix_cppflags in
1816 no)
1817         case $cf_add_cflags in #(vi
1818         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1819                 case $cf_add_cflags in
1820                 -D*)
1821                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1822
1823                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1824                                 && test -z "${cf_tst_cflags}" \
1825                                 && cf_fix_cppflags=yes
1826
1827                         if test $cf_fix_cppflags = yes ; then
1828                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1829                                 continue
1830                         elif test "${cf_tst_cflags}" = "\"'" ; then
1831                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1832                                 continue
1833                         fi
1834                         ;;
1835                 esac
1836                 case "$CPPFLAGS" in
1837                 *$cf_add_cflags) #(vi
1838                         ;;
1839                 *) #(vi
1840                         case $cf_add_cflags in #(vi
1841                         -D*)
1842                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1843
1844 CPPFLAGS=`echo "$CPPFLAGS" | \
1845         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
1846                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
1847
1848                                 ;;
1849                         esac
1850                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1851                         ;;
1852                 esac
1853                 ;;
1854         *)
1855                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1856                 ;;
1857         esac
1858         ;;
1859 yes)
1860         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1861
1862         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1863
1864         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1865                 && test -z "${cf_tst_cflags}" \
1866                 && cf_fix_cppflags=no
1867         ;;
1868 esac
1869 done
1870
1871 if test -n "$cf_new_cflags" ; then
1872
1873         CFLAGS="$CFLAGS $cf_new_cflags"
1874 fi
1875
1876 if test -n "$cf_new_cppflags" ; then
1877
1878         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1879 fi
1880
1881 if test -n "$cf_new_extra_cppflags" ; then
1882
1883         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1884 fi
1885
1886         ;;
1887 *)
1888         echo "$as_me:1888: result: ok" >&5
1889 echo "${ECHO_T}ok" >&6
1890         ;;
1891 esac
1892
1893 ac_ext=c
1894 ac_cpp='$CPP $CPPFLAGS'
1895 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1896 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1897 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1898 ac_main_return=return
1899 echo "$as_me:1899: checking how to run the C preprocessor" >&5
1900 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1901 # On Suns, sometimes $CPP names a directory.
1902 if test -n "$CPP" && test -d "$CPP"; then
1903   CPP=
1904 fi
1905 if test -z "$CPP"; then
1906   if test "${ac_cv_prog_CPP+set}" = set; then
1907   echo $ECHO_N "(cached) $ECHO_C" >&6
1908 else
1909       # Double quotes because CPP needs to be expanded
1910     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1911     do
1912       ac_preproc_ok=false
1913 for ac_c_preproc_warn_flag in '' yes
1914 do
1915   # Use a header file that comes with gcc, so configuring glibc
1916   # with a fresh cross-compiler works.
1917   # On the NeXT, cc -E runs the code through the compiler's parser,
1918   # not just through cpp. "Syntax error" is here to catch this case.
1919   cat >conftest.$ac_ext <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1922 #include <assert.h>
1923                      Syntax error
1924 _ACEOF
1925 if { (eval echo "$as_me:1925: \"$ac_cpp conftest.$ac_ext\"") >&5
1926   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1927   ac_status=$?
1928   egrep -v '^ *\+' conftest.er1 >conftest.err
1929   rm -f conftest.er1
1930   cat conftest.err >&5
1931   echo "$as_me:1931: \$? = $ac_status" >&5
1932   (exit $ac_status); } >/dev/null; then
1933   if test -s conftest.err; then
1934     ac_cpp_err=$ac_c_preproc_warn_flag
1935   else
1936     ac_cpp_err=
1937   fi
1938 else
1939   ac_cpp_err=yes
1940 fi
1941 if test -z "$ac_cpp_err"; then
1942   :
1943 else
1944   echo "$as_me: failed program was:" >&5
1945   cat conftest.$ac_ext >&5
1946   # Broken: fails on valid input.
1947 continue
1948 fi
1949 rm -f conftest.err conftest.$ac_ext
1950
1951   # OK, works on sane cases.  Now check whether non-existent headers
1952   # can be detected and how.
1953   cat >conftest.$ac_ext <<_ACEOF
1954 #line 1954 "configure"
1955 #include "confdefs.h"
1956 #include <ac_nonexistent.h>
1957 _ACEOF
1958 if { (eval echo "$as_me:1958: \"$ac_cpp conftest.$ac_ext\"") >&5
1959   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1960   ac_status=$?
1961   egrep -v '^ *\+' conftest.er1 >conftest.err
1962   rm -f conftest.er1
1963   cat conftest.err >&5
1964   echo "$as_me:1964: \$? = $ac_status" >&5
1965   (exit $ac_status); } >/dev/null; then
1966   if test -s conftest.err; then
1967     ac_cpp_err=$ac_c_preproc_warn_flag
1968   else
1969     ac_cpp_err=
1970   fi
1971 else
1972   ac_cpp_err=yes
1973 fi
1974 if test -z "$ac_cpp_err"; then
1975   # Broken: success on invalid input.
1976 continue
1977 else
1978   echo "$as_me: failed program was:" >&5
1979   cat conftest.$ac_ext >&5
1980   # Passes both tests.
1981 ac_preproc_ok=:
1982 break
1983 fi
1984 rm -f conftest.err conftest.$ac_ext
1985
1986 done
1987 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1988 rm -f conftest.err conftest.$ac_ext
1989 if $ac_preproc_ok; then
1990   break
1991 fi
1992
1993     done
1994     ac_cv_prog_CPP=$CPP
1995
1996 fi
1997   CPP=$ac_cv_prog_CPP
1998 else
1999   ac_cv_prog_CPP=$CPP
2000 fi
2001 echo "$as_me:2001: result: $CPP" >&5
2002 echo "${ECHO_T}$CPP" >&6
2003 ac_preproc_ok=false
2004 for ac_c_preproc_warn_flag in '' yes
2005 do
2006   # Use a header file that comes with gcc, so configuring glibc
2007   # with a fresh cross-compiler works.
2008   # On the NeXT, cc -E runs the code through the compiler's parser,
2009   # not just through cpp. "Syntax error" is here to catch this case.
2010   cat >conftest.$ac_ext <<_ACEOF
2011 #line 2011 "configure"
2012 #include "confdefs.h"
2013 #include <assert.h>
2014                      Syntax error
2015 _ACEOF
2016 if { (eval echo "$as_me:2016: \"$ac_cpp conftest.$ac_ext\"") >&5
2017   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2018   ac_status=$?
2019   egrep -v '^ *\+' conftest.er1 >conftest.err
2020   rm -f conftest.er1
2021   cat conftest.err >&5
2022   echo "$as_me:2022: \$? = $ac_status" >&5
2023   (exit $ac_status); } >/dev/null; then
2024   if test -s conftest.err; then
2025     ac_cpp_err=$ac_c_preproc_warn_flag
2026   else
2027     ac_cpp_err=
2028   fi
2029 else
2030   ac_cpp_err=yes
2031 fi
2032 if test -z "$ac_cpp_err"; then
2033   :
2034 else
2035   echo "$as_me: failed program was:" >&5
2036   cat conftest.$ac_ext >&5
2037   # Broken: fails on valid input.
2038 continue
2039 fi
2040 rm -f conftest.err conftest.$ac_ext
2041
2042   # OK, works on sane cases.  Now check whether non-existent headers
2043   # can be detected and how.
2044   cat >conftest.$ac_ext <<_ACEOF
2045 #line 2045 "configure"
2046 #include "confdefs.h"
2047 #include <ac_nonexistent.h>
2048 _ACEOF
2049 if { (eval echo "$as_me:2049: \"$ac_cpp conftest.$ac_ext\"") >&5
2050   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2051   ac_status=$?
2052   egrep -v '^ *\+' conftest.er1 >conftest.err
2053   rm -f conftest.er1
2054   cat conftest.err >&5
2055   echo "$as_me:2055: \$? = $ac_status" >&5
2056   (exit $ac_status); } >/dev/null; then
2057   if test -s conftest.err; then
2058     ac_cpp_err=$ac_c_preproc_warn_flag
2059   else
2060     ac_cpp_err=
2061   fi
2062 else
2063   ac_cpp_err=yes
2064 fi
2065 if test -z "$ac_cpp_err"; then
2066   # Broken: success on invalid input.
2067 continue
2068 else
2069   echo "$as_me: failed program was:" >&5
2070   cat conftest.$ac_ext >&5
2071   # Passes both tests.
2072 ac_preproc_ok=:
2073 break
2074 fi
2075 rm -f conftest.err conftest.$ac_ext
2076
2077 done
2078 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2079 rm -f conftest.err conftest.$ac_ext
2080 if $ac_preproc_ok; then
2081   :
2082 else
2083   { { echo "$as_me:2083: error: C preprocessor \"$CPP\" fails sanity check" >&5
2084 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2085    { (exit 1); exit 1; }; }
2086 fi
2087
2088 ac_ext=c
2089 ac_cpp='$CPP $CPPFLAGS'
2090 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2091 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2092 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2093 ac_main_return=return
2094
2095 if test $ac_cv_c_compiler_gnu = yes; then
2096     echo "$as_me:2096: checking whether $CC needs -traditional" >&5
2097 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2098 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2099   echo $ECHO_N "(cached) $ECHO_C" >&6
2100 else
2101     ac_pattern="Autoconf.*'x'"
2102   cat >conftest.$ac_ext <<_ACEOF
2103 #line 2103 "configure"
2104 #include "confdefs.h"
2105 #include <sgtty.h>
2106 int Autoconf = TIOCGETP;
2107 _ACEOF
2108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2109   egrep "$ac_pattern" >/dev/null 2>&1; then
2110   ac_cv_prog_gcc_traditional=yes
2111 else
2112   ac_cv_prog_gcc_traditional=no
2113 fi
2114 rm -rf conftest*
2115
2116   if test $ac_cv_prog_gcc_traditional = no; then
2117     cat >conftest.$ac_ext <<_ACEOF
2118 #line 2118 "configure"
2119 #include "confdefs.h"
2120 #include <termio.h>
2121 int Autoconf = TCGETA;
2122 _ACEOF
2123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2124   egrep "$ac_pattern" >/dev/null 2>&1; then
2125   ac_cv_prog_gcc_traditional=yes
2126 fi
2127 rm -rf conftest*
2128
2129   fi
2130 fi
2131 echo "$as_me:2131: result: $ac_cv_prog_gcc_traditional" >&5
2132 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2133   if test $ac_cv_prog_gcc_traditional = yes; then
2134     CC="$CC -traditional"
2135   fi
2136 fi
2137
2138 echo "$as_me:2138: checking whether $CC understands -c and -o together" >&5
2139 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2140 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2141   echo $ECHO_N "(cached) $ECHO_C" >&6
2142 else
2143
2144 cat > conftest.$ac_ext <<CF_EOF
2145 #include <stdio.h>
2146 int main()
2147 {
2148         ${cf_cv_main_return:-return}(0);
2149 }
2150 CF_EOF
2151 # We do the test twice because some compilers refuse to overwrite an
2152 # existing .o file with -o, though they will create one.
2153 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2154 if { (eval echo "$as_me:2154: \"$ac_try\"") >&5
2155   (eval $ac_try) 2>&5
2156   ac_status=$?
2157   echo "$as_me:2157: \$? = $ac_status" >&5
2158   (exit $ac_status); } &&
2159   test -f conftest2.$ac_objext && { (eval echo "$as_me:2159: \"$ac_try\"") >&5
2160   (eval $ac_try) 2>&5
2161   ac_status=$?
2162   echo "$as_me:2162: \$? = $ac_status" >&5
2163   (exit $ac_status); };
2164 then
2165   eval cf_cv_prog_CC_c_o=yes
2166 else
2167   eval cf_cv_prog_CC_c_o=no
2168 fi
2169 rm -rf conftest*
2170
2171 fi
2172 if test $cf_cv_prog_CC_c_o = yes; then
2173   echo "$as_me:2173: result: yes" >&5
2174 echo "${ECHO_T}yes" >&6
2175 else
2176   echo "$as_me:2176: result: no" >&5
2177 echo "${ECHO_T}no" >&6
2178 fi
2179
2180 test "$program_prefix" != NONE &&
2181   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2182 # Use a double $ so make ignores it.
2183 test "$program_suffix" != NONE &&
2184   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2185 # Double any \ or $.  echo might interpret backslashes.
2186 # By default was `s,x,x', remove it if useless.
2187 cat <<\_ACEOF >conftest.sed
2188 s/[\\$]/&&/g;s/;s,x,x,$//
2189 _ACEOF
2190 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2191 rm conftest.sed
2192
2193 for ac_prog in mawk gawk nawk awk
2194 do
2195   # Extract the first word of "$ac_prog", so it can be a program name with args.
2196 set dummy $ac_prog; ac_word=$2
2197 echo "$as_me:2197: checking for $ac_word" >&5
2198 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2199 if test "${ac_cv_prog_AWK+set}" = set; then
2200   echo $ECHO_N "(cached) $ECHO_C" >&6
2201 else
2202   if test -n "$AWK"; then
2203   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2204 else
2205   ac_save_IFS=$IFS; IFS=$ac_path_separator
2206 ac_dummy="$PATH"
2207 for ac_dir in $ac_dummy; do
2208   IFS=$ac_save_IFS
2209   test -z "$ac_dir" && ac_dir=.
2210   $as_executable_p "$ac_dir/$ac_word" || continue
2211 ac_cv_prog_AWK="$ac_prog"
2212 echo "$as_me:2212: found $ac_dir/$ac_word" >&5
2213 break
2214 done
2215
2216 fi
2217 fi
2218 AWK=$ac_cv_prog_AWK
2219 if test -n "$AWK"; then
2220   echo "$as_me:2220: result: $AWK" >&5
2221 echo "${ECHO_T}$AWK" >&6
2222 else
2223   echo "$as_me:2223: result: no" >&5
2224 echo "${ECHO_T}no" >&6
2225 fi
2226
2227   test -n "$AWK" && break
2228 done
2229
2230 test -z "$AWK" && { { echo "$as_me:2230: error: No awk program found" >&5
2231 echo "$as_me: error: No awk program found" >&2;}
2232    { (exit 1); exit 1; }; }
2233
2234 echo "$as_me:2234: checking for egrep" >&5
2235 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2236 if test "${ac_cv_prog_egrep+set}" = set; then
2237   echo $ECHO_N "(cached) $ECHO_C" >&6
2238 else
2239   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2240     then ac_cv_prog_egrep='grep -E'
2241     else ac_cv_prog_egrep='egrep'
2242     fi
2243 fi
2244 echo "$as_me:2244: result: $ac_cv_prog_egrep" >&5
2245 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2246  EGREP=$ac_cv_prog_egrep
2247
2248 test -z "$EGREP" && { { echo "$as_me:2248: error: No egrep program found" >&5
2249 echo "$as_me: error: No egrep program found" >&2;}
2250    { (exit 1); exit 1; }; }
2251
2252 # Find a good install program.  We prefer a C program (faster),
2253 # so one script is as good as another.  But avoid the broken or
2254 # incompatible versions:
2255 # SysV /etc/install, /usr/sbin/install
2256 # SunOS /usr/etc/install
2257 # IRIX /sbin/install
2258 # AIX /bin/install
2259 # AmigaOS /C/install, which installs bootblocks on floppy discs
2260 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2261 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2262 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2263 # ./install, which can be erroneously created by make from ./install.sh.
2264 echo "$as_me:2264: checking for a BSD compatible install" >&5
2265 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2266 if test -z "$INSTALL"; then
2267 if test "${ac_cv_path_install+set}" = set; then
2268   echo $ECHO_N "(cached) $ECHO_C" >&6
2269 else
2270     ac_save_IFS=$IFS; IFS=$ac_path_separator
2271   for ac_dir in $PATH; do
2272     IFS=$ac_save_IFS
2273     # Account for people who put trailing slashes in PATH elements.
2274     case $ac_dir/ in
2275     / | ./ | .// | /cC/* \
2276     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2277     | /usr/ucb/* ) ;;
2278     *)
2279       # OSF1 and SCO ODT 3.0 have their own names for install.
2280       # Don't use installbsd from OSF since it installs stuff as root
2281       # by default.
2282       for ac_prog in ginstall scoinst install; do
2283         if $as_executable_p "$ac_dir/$ac_prog"; then
2284           if test $ac_prog = install &&
2285             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2286             # AIX install.  It has an incompatible calling convention.
2287             :
2288           elif test $ac_prog = install &&
2289             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2290             # program-specific install script used by HP pwplus--don't use.
2291             :
2292           else
2293             ac_cv_path_install="$ac_dir/$ac_prog -c"
2294             break 2
2295           fi
2296         fi
2297       done
2298       ;;
2299     esac
2300   done
2301
2302 fi
2303   if test "${ac_cv_path_install+set}" = set; then
2304     INSTALL=$ac_cv_path_install
2305   else
2306     # As a last resort, use the slow shell script.  We don't cache a
2307     # path for INSTALL within a source directory, because that will
2308     # break other packages using the cache if that directory is
2309     # removed, or if the path is relative.
2310     INSTALL=$ac_install_sh
2311   fi
2312 fi
2313 echo "$as_me:2313: result: $INSTALL" >&5
2314 echo "${ECHO_T}$INSTALL" >&6
2315
2316 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2317 # It thinks the first close brace ends the variable substitution.
2318 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2319
2320 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2321
2322 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2323
2324 echo "$as_me:2324: checking whether ln -s works" >&5
2325 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2326 LN_S=$as_ln_s
2327 if test "$LN_S" = "ln -s"; then
2328   echo "$as_me:2328: result: yes" >&5
2329 echo "${ECHO_T}yes" >&6
2330 else
2331   echo "$as_me:2331: result: no, using $LN_S" >&5
2332 echo "${ECHO_T}no, using $LN_S" >&6
2333 fi
2334
2335 echo "$as_me:2335: checking if $LN_S -f options work" >&5
2336 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2337
2338 rm -f conf$$.src conf$$dst
2339 echo >conf$$.dst
2340 echo first >conf$$.src
2341 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2342         cf_prog_ln_sf=yes
2343 else
2344         cf_prog_ln_sf=no
2345 fi
2346 rm -f conf$$.dst conf$$src
2347 echo "$as_me:2347: result: $cf_prog_ln_sf" >&5
2348 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2349
2350 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2351
2352 echo "$as_me:2352: checking for long file names" >&5
2353 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2354 if test "${ac_cv_sys_long_file_names+set}" = set; then
2355   echo $ECHO_N "(cached) $ECHO_C" >&6
2356 else
2357   ac_cv_sys_long_file_names=yes
2358 # Test for long file names in all the places we know might matter:
2359 #      .                the current directory, where building will happen
2360 #      $prefix/lib      where we will be installing things
2361 #      $exec_prefix/lib likewise
2362 # eval it to expand exec_prefix.
2363 #      $TMPDIR          if set, where it might want to write temporary files
2364 # if $TMPDIR is not set:
2365 #      /tmp             where it might want to write temporary files
2366 #      /var/tmp         likewise
2367 #      /usr/tmp         likewise
2368 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2369   ac_tmpdirs=$TMPDIR
2370 else
2371   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2372 fi
2373 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2374   test -d $ac_dir || continue
2375   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2376   ac_xdir=$ac_dir/cf$$
2377   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2378   ac_tf1=$ac_xdir/conftest9012345
2379   ac_tf2=$ac_xdir/conftest9012346
2380   (echo 1 >$ac_tf1) 2>/dev/null
2381   (echo 2 >$ac_tf2) 2>/dev/null
2382   ac_val=`cat $ac_tf1 2>/dev/null`
2383   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2384     ac_cv_sys_long_file_names=no
2385     rm -rf $ac_xdir 2>/dev/null
2386     break
2387   fi
2388   rm -rf $ac_xdir 2>/dev/null
2389 done
2390 fi
2391 echo "$as_me:2391: result: $ac_cv_sys_long_file_names" >&5
2392 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2393 if test $ac_cv_sys_long_file_names = yes; then
2394
2395 cat >>confdefs.h <<\EOF
2396 #define HAVE_LONG_FILE_NAMES 1
2397 EOF
2398
2399 fi
2400
2401 # if we find pkg-config, check if we should install the ".pc" files.
2402
2403 echo "$as_me:2403: checking if you want to use pkg-config" >&5
2404 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2405
2406 # Check whether --with-pkg-config or --without-pkg-config was given.
2407 if test "${with_pkg_config+set}" = set; then
2408   withval="$with_pkg_config"
2409   cf_pkg_config=$withval
2410 else
2411   cf_pkg_config=yes
2412 fi;
2413 echo "$as_me:2413: result: $cf_pkg_config" >&5
2414 echo "${ECHO_T}$cf_pkg_config" >&6
2415
2416 case $cf_pkg_config in #(vi
2417 no) #(vi
2418         PKG_CONFIG=none
2419         ;;
2420 yes) #(vi
2421
2422 if test -n "$ac_tool_prefix"; then
2423   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2424 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2425 echo "$as_me:2425: checking for $ac_word" >&5
2426 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2427 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2428   echo $ECHO_N "(cached) $ECHO_C" >&6
2429 else
2430   case $PKG_CONFIG in
2431   [\\/]* | ?:[\\/]*)
2432   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2433   ;;
2434   *)
2435   ac_save_IFS=$IFS; IFS=$ac_path_separator
2436 ac_dummy="$PATH"
2437 for ac_dir in $ac_dummy; do
2438   IFS=$ac_save_IFS
2439   test -z "$ac_dir" && ac_dir=.
2440   if $as_executable_p "$ac_dir/$ac_word"; then
2441    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2442    echo "$as_me:2442: found $ac_dir/$ac_word" >&5
2443    break
2444 fi
2445 done
2446
2447   ;;
2448 esac
2449 fi
2450 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2451
2452 if test -n "$PKG_CONFIG"; then
2453   echo "$as_me:2453: result: $PKG_CONFIG" >&5
2454 echo "${ECHO_T}$PKG_CONFIG" >&6
2455 else
2456   echo "$as_me:2456: result: no" >&5
2457 echo "${ECHO_T}no" >&6
2458 fi
2459
2460 fi
2461 if test -z "$ac_cv_path_PKG_CONFIG"; then
2462   ac_pt_PKG_CONFIG=$PKG_CONFIG
2463   # Extract the first word of "pkg-config", so it can be a program name with args.
2464 set dummy pkg-config; ac_word=$2
2465 echo "$as_me:2465: checking for $ac_word" >&5
2466 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2467 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2468   echo $ECHO_N "(cached) $ECHO_C" >&6
2469 else
2470   case $ac_pt_PKG_CONFIG in
2471   [\\/]* | ?:[\\/]*)
2472   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2473   ;;
2474   *)
2475   ac_save_IFS=$IFS; IFS=$ac_path_separator
2476 ac_dummy="$PATH"
2477 for ac_dir in $ac_dummy; do
2478   IFS=$ac_save_IFS
2479   test -z "$ac_dir" && ac_dir=.
2480   if $as_executable_p "$ac_dir/$ac_word"; then
2481    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2482    echo "$as_me:2482: found $ac_dir/$ac_word" >&5
2483    break
2484 fi
2485 done
2486
2487   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2488   ;;
2489 esac
2490 fi
2491 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2492
2493 if test -n "$ac_pt_PKG_CONFIG"; then
2494   echo "$as_me:2494: result: $ac_pt_PKG_CONFIG" >&5
2495 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2496 else
2497   echo "$as_me:2497: result: no" >&5
2498 echo "${ECHO_T}no" >&6
2499 fi
2500
2501   PKG_CONFIG=$ac_pt_PKG_CONFIG
2502 else
2503   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2504 fi
2505
2506         ;;
2507 *)
2508         PKG_CONFIG=$withval
2509         ;;
2510 esac
2511
2512 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2513 if test "$PKG_CONFIG" != none ; then
2514
2515 if test "x$prefix" != xNONE; then
2516   cf_path_syntax="$prefix"
2517 else
2518   cf_path_syntax="$ac_default_prefix"
2519 fi
2520
2521 case ".$PKG_CONFIG" in #(vi
2522 .\$\(*\)*|.\'*\'*) #(vi
2523   ;;
2524 ..|./*|.\\*) #(vi
2525   ;;
2526 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2527   ;;
2528 .\${*prefix}*|.\${*dir}*) #(vi
2529   eval PKG_CONFIG="$PKG_CONFIG"
2530   case ".$PKG_CONFIG" in #(vi
2531   .NONE/*)
2532     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2533     ;;
2534   esac
2535   ;; #(vi
2536 .no|.NONE/*)
2537   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2538   ;;
2539 *)
2540   { { echo "$as_me:2540: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2541 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2542    { (exit 1); exit 1; }; }
2543   ;;
2544 esac
2545
2546 fi
2547
2548 if test "$PKG_CONFIG" != none ; then
2549         echo "$as_me:2549: checking for $PKG_CONFIG library directory" >&5
2550 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2551
2552 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2553 if test "${with_pkg_config_libdir+set}" = set; then
2554   withval="$with_pkg_config_libdir"
2555   PKG_CONFIG_LIBDIR=$withval
2556 else
2557   PKG_CONFIG_LIBDIR=yes
2558 fi;
2559
2560         case x$PKG_CONFIG_LIBDIR in #(vi
2561         x/*) #(vi
2562                 ;;
2563         xyes) #(vi
2564                 # look for the library directory using the same prefix as the executable
2565                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2566                 case x`(arch) 2>/dev/null` in #(vi
2567                 *64) #(vi
2568                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
2569                         do
2570                                 if test -d $cf_config/pkgconfig
2571                                 then
2572                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2573                                         break
2574                                 fi
2575                         done
2576                         ;;
2577                 *)
2578                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
2579                         ;;
2580                 esac
2581                 ;;
2582         *)
2583                 ;;
2584         esac
2585
2586         echo "$as_me:2586: result: $PKG_CONFIG_LIBDIR" >&5
2587 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2588 fi
2589
2590 if test "$PKG_CONFIG" != none ; then
2591         echo "$as_me:2591: checking if we should install .pc files for $PKG_CONFIG" >&5
2592 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2593
2594 # Check whether --enable-pc-files or --disable-pc-files was given.
2595 if test "${enable_pc_files+set}" = set; then
2596   enableval="$enable_pc_files"
2597   enable_pc_files=$enableval
2598 else
2599   enable_pc_files=no
2600 fi;
2601         echo "$as_me:2601: result: $enable_pc_files" >&5
2602 echo "${ECHO_T}$enable_pc_files" >&6
2603         if test "$enable_pc_files" != no
2604         then
2605
2606 if test "x$prefix" != xNONE; then
2607   cf_path_syntax="$prefix"
2608 else
2609   cf_path_syntax="$ac_default_prefix"
2610 fi
2611
2612 case ".$PKG_CONFIG_LIBDIR" in #(vi
2613 .\$\(*\)*|.\'*\'*) #(vi
2614   ;;
2615 ..|./*|.\\*) #(vi
2616   ;;
2617 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2618   ;;
2619 .\${*prefix}*|.\${*dir}*) #(vi
2620   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
2621   case ".$PKG_CONFIG_LIBDIR" in #(vi
2622   .NONE/*)
2623     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
2624     ;;
2625   esac
2626   ;; #(vi
2627 .no|.NONE/*)
2628   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
2629   ;;
2630 *)
2631   { { echo "$as_me:2631: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
2632 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
2633    { (exit 1); exit 1; }; }
2634   ;;
2635 esac
2636
2637         fi
2638 else
2639         enable_pc_files=no
2640 fi
2641
2642 echo "$as_me:2642: checking if you want to build test-programs" >&5
2643 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2644
2645 # Check whether --with-tests or --without-tests was given.
2646 if test "${with_tests+set}" = set; then
2647   withval="$with_tests"
2648   cf_with_tests=$withval
2649 else
2650   cf_with_tests=yes
2651 fi;
2652 echo "$as_me:2652: result: $cf_with_tests" >&5
2653 echo "${ECHO_T}$cf_with_tests" >&6
2654
2655 echo "$as_me:2655: checking if we should assume mixed-case filenames" >&5
2656 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2657
2658 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2659 if test "${enable_mixed_case+set}" = set; then
2660   enableval="$enable_mixed_case"
2661   enable_mixedcase=$enableval
2662 else
2663   enable_mixedcase=auto
2664 fi;
2665 echo "$as_me:2665: result: $enable_mixedcase" >&5
2666 echo "${ECHO_T}$enable_mixedcase" >&6
2667 if test "$enable_mixedcase" = "auto" ; then
2668
2669 echo "$as_me:2669: checking if filesystem supports mixed-case filenames" >&5
2670 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2671 if test "${cf_cv_mixedcase+set}" = set; then
2672   echo $ECHO_N "(cached) $ECHO_C" >&6
2673 else
2674
2675 if test "$cross_compiling" = yes ; then
2676         case $target_alias in #(vi
2677         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
2678                 cf_cv_mixedcase=no
2679                 ;;
2680         *)
2681                 cf_cv_mixedcase=yes
2682                 ;;
2683         esac
2684 else
2685         rm -f conftest CONFTEST
2686         echo test >conftest
2687         if test -f CONFTEST ; then
2688                 cf_cv_mixedcase=no
2689         else
2690                 cf_cv_mixedcase=yes
2691         fi
2692         rm -f conftest CONFTEST
2693 fi
2694
2695 fi
2696 echo "$as_me:2696: result: $cf_cv_mixedcase" >&5
2697 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2698 test "$cf_cv_mixedcase" = yes &&
2699 cat >>confdefs.h <<\EOF
2700 #define MIXEDCASE_FILENAMES 1
2701 EOF
2702
2703 else
2704     cf_cv_mixedcase=$enable_mixedcase
2705     if test "$enable_mixedcase" = "yes" ; then
2706         cat >>confdefs.h <<\EOF
2707 #define MIXEDCASE_FILENAMES 1
2708 EOF
2709
2710     fi
2711 fi
2712
2713 # do this after mixed-case option (tags/TAGS is not as important as tic).
2714 echo "$as_me:2714: checking whether ${MAKE-make} sets \${MAKE}" >&5
2715 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2716 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2717 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2718   echo $ECHO_N "(cached) $ECHO_C" >&6
2719 else
2720   cat >conftest.make <<\EOF
2721 all:
2722         @echo 'ac_maketemp="${MAKE}"'
2723 EOF
2724 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2725 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2726 if test -n "$ac_maketemp"; then
2727   eval ac_cv_prog_make_${ac_make}_set=yes
2728 else
2729   eval ac_cv_prog_make_${ac_make}_set=no
2730 fi
2731 rm -f conftest.make
2732 fi
2733 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2734   echo "$as_me:2734: result: yes" >&5
2735 echo "${ECHO_T}yes" >&6
2736   SET_MAKE=
2737 else
2738   echo "$as_me:2738: result: no" >&5
2739 echo "${ECHO_T}no" >&6
2740   SET_MAKE="MAKE=${MAKE-make}"
2741 fi
2742
2743 for ac_prog in exctags ctags
2744 do
2745   # Extract the first word of "$ac_prog", so it can be a program name with args.
2746 set dummy $ac_prog; ac_word=$2
2747 echo "$as_me:2747: checking for $ac_word" >&5
2748 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2749 if test "${ac_cv_prog_CTAGS+set}" = set; then
2750   echo $ECHO_N "(cached) $ECHO_C" >&6
2751 else
2752   if test -n "$CTAGS"; then
2753   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2754 else
2755   ac_save_IFS=$IFS; IFS=$ac_path_separator
2756 ac_dummy="$PATH"
2757 for ac_dir in $ac_dummy; do
2758   IFS=$ac_save_IFS
2759   test -z "$ac_dir" && ac_dir=.
2760   $as_executable_p "$ac_dir/$ac_word" || continue
2761 ac_cv_prog_CTAGS="$ac_prog"
2762 echo "$as_me:2762: found $ac_dir/$ac_word" >&5
2763 break
2764 done
2765
2766 fi
2767 fi
2768 CTAGS=$ac_cv_prog_CTAGS
2769 if test -n "$CTAGS"; then
2770   echo "$as_me:2770: result: $CTAGS" >&5
2771 echo "${ECHO_T}$CTAGS" >&6
2772 else
2773   echo "$as_me:2773: result: no" >&5
2774 echo "${ECHO_T}no" >&6
2775 fi
2776
2777   test -n "$CTAGS" && break
2778 done
2779
2780 for ac_prog in exetags etags
2781 do
2782   # Extract the first word of "$ac_prog", so it can be a program name with args.
2783 set dummy $ac_prog; ac_word=$2
2784 echo "$as_me:2784: checking for $ac_word" >&5
2785 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2786 if test "${ac_cv_prog_ETAGS+set}" = set; then
2787   echo $ECHO_N "(cached) $ECHO_C" >&6
2788 else
2789   if test -n "$ETAGS"; then
2790   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2791 else
2792   ac_save_IFS=$IFS; IFS=$ac_path_separator
2793 ac_dummy="$PATH"
2794 for ac_dir in $ac_dummy; do
2795   IFS=$ac_save_IFS
2796   test -z "$ac_dir" && ac_dir=.
2797   $as_executable_p "$ac_dir/$ac_word" || continue
2798 ac_cv_prog_ETAGS="$ac_prog"
2799 echo "$as_me:2799: found $ac_dir/$ac_word" >&5
2800 break
2801 done
2802
2803 fi
2804 fi
2805 ETAGS=$ac_cv_prog_ETAGS
2806 if test -n "$ETAGS"; then
2807   echo "$as_me:2807: result: $ETAGS" >&5
2808 echo "${ECHO_T}$ETAGS" >&6
2809 else
2810   echo "$as_me:2810: result: no" >&5
2811 echo "${ECHO_T}no" >&6
2812 fi
2813
2814   test -n "$ETAGS" && break
2815 done
2816
2817 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2818 set dummy ${CTAGS:-ctags}; 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_prog_MAKE_LOWER_TAGS+set}" = set; then
2822   echo $ECHO_N "(cached) $ECHO_C" >&6
2823 else
2824   if test -n "$MAKE_LOWER_TAGS"; then
2825   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2826 else
2827   ac_save_IFS=$IFS; IFS=$ac_path_separator
2828 ac_dummy="$PATH"
2829 for ac_dir in $ac_dummy; do
2830   IFS=$ac_save_IFS
2831   test -z "$ac_dir" && ac_dir=.
2832   $as_executable_p "$ac_dir/$ac_word" || continue
2833 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2834 echo "$as_me:2834: found $ac_dir/$ac_word" >&5
2835 break
2836 done
2837
2838   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2839 fi
2840 fi
2841 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2842 if test -n "$MAKE_LOWER_TAGS"; then
2843   echo "$as_me:2843: result: $MAKE_LOWER_TAGS" >&5
2844 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2845 else
2846   echo "$as_me:2846: result: no" >&5
2847 echo "${ECHO_T}no" >&6
2848 fi
2849
2850 if test "$cf_cv_mixedcase" = yes ; then
2851         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2852 set dummy ${ETAGS:-etags}; ac_word=$2
2853 echo "$as_me:2853: checking for $ac_word" >&5
2854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2855 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2856   echo $ECHO_N "(cached) $ECHO_C" >&6
2857 else
2858   if test -n "$MAKE_UPPER_TAGS"; then
2859   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2860 else
2861   ac_save_IFS=$IFS; IFS=$ac_path_separator
2862 ac_dummy="$PATH"
2863 for ac_dir in $ac_dummy; do
2864   IFS=$ac_save_IFS
2865   test -z "$ac_dir" && ac_dir=.
2866   $as_executable_p "$ac_dir/$ac_word" || continue
2867 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2868 echo "$as_me:2868: found $ac_dir/$ac_word" >&5
2869 break
2870 done
2871
2872   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2873 fi
2874 fi
2875 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2876 if test -n "$MAKE_UPPER_TAGS"; then
2877   echo "$as_me:2877: result: $MAKE_UPPER_TAGS" >&5
2878 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2879 else
2880   echo "$as_me:2880: result: no" >&5
2881 echo "${ECHO_T}no" >&6
2882 fi
2883
2884 else
2885         MAKE_UPPER_TAGS=no
2886 fi
2887
2888 if test "$MAKE_UPPER_TAGS" = yes ; then
2889         MAKE_UPPER_TAGS=
2890 else
2891         MAKE_UPPER_TAGS="#"
2892 fi
2893
2894 if test "$MAKE_LOWER_TAGS" = yes ; then
2895         MAKE_LOWER_TAGS=
2896 else
2897         MAKE_LOWER_TAGS="#"
2898 fi
2899
2900 echo "$as_me:2900: checking for makeflags variable" >&5
2901 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2902 if test "${cf_cv_makeflags+set}" = set; then
2903   echo $ECHO_N "(cached) $ECHO_C" >&6
2904 else
2905
2906         cf_cv_makeflags=''
2907         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2908         do
2909                 cat >cf_makeflags.tmp <<CF_EOF
2910 SHELL = /bin/sh
2911 all :
2912         @ echo '.$cf_option'
2913 CF_EOF
2914                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
2915                 case "$cf_result" in
2916                 .*k|.*kw)
2917                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2918                         case "$cf_result" in
2919                         .*CC=*) cf_cv_makeflags=
2920                                 ;;
2921                         *)      cf_cv_makeflags=$cf_option
2922                                 ;;
2923                         esac
2924                         break
2925                         ;;
2926                 .-)     ;;
2927                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
2928                         ;;
2929                 esac
2930         done
2931         rm -f cf_makeflags.tmp
2932
2933 fi
2934 echo "$as_me:2934: result: $cf_cv_makeflags" >&5
2935 echo "${ECHO_T}$cf_cv_makeflags" >&6
2936
2937 if test -n "$ac_tool_prefix"; then
2938   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2939 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2940 echo "$as_me:2940: checking for $ac_word" >&5
2941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2942 if test "${ac_cv_prog_RANLIB+set}" = set; then
2943   echo $ECHO_N "(cached) $ECHO_C" >&6
2944 else
2945   if test -n "$RANLIB"; then
2946   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2947 else
2948   ac_save_IFS=$IFS; IFS=$ac_path_separator
2949 ac_dummy="$PATH"
2950 for ac_dir in $ac_dummy; do
2951   IFS=$ac_save_IFS
2952   test -z "$ac_dir" && ac_dir=.
2953   $as_executable_p "$ac_dir/$ac_word" || continue
2954 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2955 echo "$as_me:2955: found $ac_dir/$ac_word" >&5
2956 break
2957 done
2958
2959 fi
2960 fi
2961 RANLIB=$ac_cv_prog_RANLIB
2962 if test -n "$RANLIB"; then
2963   echo "$as_me:2963: result: $RANLIB" >&5
2964 echo "${ECHO_T}$RANLIB" >&6
2965 else
2966   echo "$as_me:2966: result: no" >&5
2967 echo "${ECHO_T}no" >&6
2968 fi
2969
2970 fi
2971 if test -z "$ac_cv_prog_RANLIB"; then
2972   ac_ct_RANLIB=$RANLIB
2973   # Extract the first word of "ranlib", so it can be a program name with args.
2974 set dummy ranlib; ac_word=$2
2975 echo "$as_me:2975: checking for $ac_word" >&5
2976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2977 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2978   echo $ECHO_N "(cached) $ECHO_C" >&6
2979 else
2980   if test -n "$ac_ct_RANLIB"; then
2981   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2982 else
2983   ac_save_IFS=$IFS; IFS=$ac_path_separator
2984 ac_dummy="$PATH"
2985 for ac_dir in $ac_dummy; do
2986   IFS=$ac_save_IFS
2987   test -z "$ac_dir" && ac_dir=.
2988   $as_executable_p "$ac_dir/$ac_word" || continue
2989 ac_cv_prog_ac_ct_RANLIB="ranlib"
2990 echo "$as_me:2990: found $ac_dir/$ac_word" >&5
2991 break
2992 done
2993
2994   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
2995 fi
2996 fi
2997 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2998 if test -n "$ac_ct_RANLIB"; then
2999   echo "$as_me:2999: result: $ac_ct_RANLIB" >&5
3000 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3001 else
3002   echo "$as_me:3002: result: no" >&5
3003 echo "${ECHO_T}no" >&6
3004 fi
3005
3006   RANLIB=$ac_ct_RANLIB
3007 else
3008   RANLIB="$ac_cv_prog_RANLIB"
3009 fi
3010
3011 if test -n "$ac_tool_prefix"; then
3012   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3013 set dummy ${ac_tool_prefix}ld; ac_word=$2
3014 echo "$as_me:3014: checking for $ac_word" >&5
3015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3016 if test "${ac_cv_prog_LD+set}" = set; then
3017   echo $ECHO_N "(cached) $ECHO_C" >&6
3018 else
3019   if test -n "$LD"; then
3020   ac_cv_prog_LD="$LD" # Let the user override the test.
3021 else
3022   ac_save_IFS=$IFS; IFS=$ac_path_separator
3023 ac_dummy="$PATH"
3024 for ac_dir in $ac_dummy; do
3025   IFS=$ac_save_IFS
3026   test -z "$ac_dir" && ac_dir=.
3027   $as_executable_p "$ac_dir/$ac_word" || continue
3028 ac_cv_prog_LD="${ac_tool_prefix}ld"
3029 echo "$as_me:3029: found $ac_dir/$ac_word" >&5
3030 break
3031 done
3032
3033 fi
3034 fi
3035 LD=$ac_cv_prog_LD
3036 if test -n "$LD"; then
3037   echo "$as_me:3037: result: $LD" >&5
3038 echo "${ECHO_T}$LD" >&6
3039 else
3040   echo "$as_me:3040: result: no" >&5
3041 echo "${ECHO_T}no" >&6
3042 fi
3043
3044 fi
3045 if test -z "$ac_cv_prog_LD"; then
3046   ac_ct_LD=$LD
3047   # Extract the first word of "ld", so it can be a program name with args.
3048 set dummy ld; ac_word=$2
3049 echo "$as_me:3049: checking for $ac_word" >&5
3050 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3051 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3052   echo $ECHO_N "(cached) $ECHO_C" >&6
3053 else
3054   if test -n "$ac_ct_LD"; then
3055   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3056 else
3057   ac_save_IFS=$IFS; IFS=$ac_path_separator
3058 ac_dummy="$PATH"
3059 for ac_dir in $ac_dummy; do
3060   IFS=$ac_save_IFS
3061   test -z "$ac_dir" && ac_dir=.
3062   $as_executable_p "$ac_dir/$ac_word" || continue
3063 ac_cv_prog_ac_ct_LD="ld"
3064 echo "$as_me:3064: found $ac_dir/$ac_word" >&5
3065 break
3066 done
3067
3068   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3069 fi
3070 fi
3071 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3072 if test -n "$ac_ct_LD"; then
3073   echo "$as_me:3073: result: $ac_ct_LD" >&5
3074 echo "${ECHO_T}$ac_ct_LD" >&6
3075 else
3076   echo "$as_me:3076: result: no" >&5
3077 echo "${ECHO_T}no" >&6
3078 fi
3079
3080   LD=$ac_ct_LD
3081 else
3082   LD="$ac_cv_prog_LD"
3083 fi
3084
3085 if test -n "$ac_tool_prefix"; then
3086   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3087 set dummy ${ac_tool_prefix}ar; ac_word=$2
3088 echo "$as_me:3088: checking for $ac_word" >&5
3089 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3090 if test "${ac_cv_prog_AR+set}" = set; then
3091   echo $ECHO_N "(cached) $ECHO_C" >&6
3092 else
3093   if test -n "$AR"; then
3094   ac_cv_prog_AR="$AR" # Let the user override the test.
3095 else
3096   ac_save_IFS=$IFS; IFS=$ac_path_separator
3097 ac_dummy="$PATH"
3098 for ac_dir in $ac_dummy; do
3099   IFS=$ac_save_IFS
3100   test -z "$ac_dir" && ac_dir=.
3101   $as_executable_p "$ac_dir/$ac_word" || continue
3102 ac_cv_prog_AR="${ac_tool_prefix}ar"
3103 echo "$as_me:3103: found $ac_dir/$ac_word" >&5
3104 break
3105 done
3106
3107 fi
3108 fi
3109 AR=$ac_cv_prog_AR
3110 if test -n "$AR"; then
3111   echo "$as_me:3111: result: $AR" >&5
3112 echo "${ECHO_T}$AR" >&6
3113 else
3114   echo "$as_me:3114: result: no" >&5
3115 echo "${ECHO_T}no" >&6
3116 fi
3117
3118 fi
3119 if test -z "$ac_cv_prog_AR"; then
3120   ac_ct_AR=$AR
3121   # Extract the first word of "ar", so it can be a program name with args.
3122 set dummy ar; ac_word=$2
3123 echo "$as_me:3123: checking for $ac_word" >&5
3124 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3125 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3126   echo $ECHO_N "(cached) $ECHO_C" >&6
3127 else
3128   if test -n "$ac_ct_AR"; then
3129   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3130 else
3131   ac_save_IFS=$IFS; IFS=$ac_path_separator
3132 ac_dummy="$PATH"
3133 for ac_dir in $ac_dummy; do
3134   IFS=$ac_save_IFS
3135   test -z "$ac_dir" && ac_dir=.
3136   $as_executable_p "$ac_dir/$ac_word" || continue
3137 ac_cv_prog_ac_ct_AR="ar"
3138 echo "$as_me:3138: found $ac_dir/$ac_word" >&5
3139 break
3140 done
3141
3142   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3143 fi
3144 fi
3145 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3146 if test -n "$ac_ct_AR"; then
3147   echo "$as_me:3147: result: $ac_ct_AR" >&5
3148 echo "${ECHO_T}$ac_ct_AR" >&6
3149 else
3150   echo "$as_me:3150: result: no" >&5
3151 echo "${ECHO_T}no" >&6
3152 fi
3153
3154   AR=$ac_ct_AR
3155 else
3156   AR="$ac_cv_prog_AR"
3157 fi
3158
3159 if test -n "$ac_tool_prefix"; then
3160   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3161 set dummy ${ac_tool_prefix}ar; ac_word=$2
3162 echo "$as_me:3162: checking for $ac_word" >&5
3163 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3164 if test "${ac_cv_prog_AR+set}" = set; then
3165   echo $ECHO_N "(cached) $ECHO_C" >&6
3166 else
3167   if test -n "$AR"; then
3168   ac_cv_prog_AR="$AR" # Let the user override the test.
3169 else
3170   ac_save_IFS=$IFS; IFS=$ac_path_separator
3171 ac_dummy="$PATH"
3172 for ac_dir in $ac_dummy; do
3173   IFS=$ac_save_IFS
3174   test -z "$ac_dir" && ac_dir=.
3175   $as_executable_p "$ac_dir/$ac_word" || continue
3176 ac_cv_prog_AR="${ac_tool_prefix}ar"
3177 echo "$as_me:3177: found $ac_dir/$ac_word" >&5
3178 break
3179 done
3180
3181 fi
3182 fi
3183 AR=$ac_cv_prog_AR
3184 if test -n "$AR"; then
3185   echo "$as_me:3185: result: $AR" >&5
3186 echo "${ECHO_T}$AR" >&6
3187 else
3188   echo "$as_me:3188: result: no" >&5
3189 echo "${ECHO_T}no" >&6
3190 fi
3191
3192 fi
3193 if test -z "$ac_cv_prog_AR"; then
3194   ac_ct_AR=$AR
3195   # Extract the first word of "ar", so it can be a program name with args.
3196 set dummy ar; ac_word=$2
3197 echo "$as_me:3197: checking for $ac_word" >&5
3198 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3199 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3200   echo $ECHO_N "(cached) $ECHO_C" >&6
3201 else
3202   if test -n "$ac_ct_AR"; then
3203   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3204 else
3205   ac_save_IFS=$IFS; IFS=$ac_path_separator
3206 ac_dummy="$PATH"
3207 for ac_dir in $ac_dummy; do
3208   IFS=$ac_save_IFS
3209   test -z "$ac_dir" && ac_dir=.
3210   $as_executable_p "$ac_dir/$ac_word" || continue
3211 ac_cv_prog_ac_ct_AR="ar"
3212 echo "$as_me:3212: found $ac_dir/$ac_word" >&5
3213 break
3214 done
3215
3216   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3217 fi
3218 fi
3219 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3220 if test -n "$ac_ct_AR"; then
3221   echo "$as_me:3221: result: $ac_ct_AR" >&5
3222 echo "${ECHO_T}$ac_ct_AR" >&6
3223 else
3224   echo "$as_me:3224: result: no" >&5
3225 echo "${ECHO_T}no" >&6
3226 fi
3227
3228   AR=$ac_ct_AR
3229 else
3230   AR="$ac_cv_prog_AR"
3231 fi
3232
3233 echo "$as_me:3233: checking for options to update archives" >&5
3234 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3235 if test "${cf_cv_ar_flags+set}" = set; then
3236   echo $ECHO_N "(cached) $ECHO_C" >&6
3237 else
3238
3239         cf_cv_ar_flags=unknown
3240         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3241         do
3242
3243                 # check if $ARFLAGS already contains this choice
3244                 if test "x$ARFLAGS" != "x" ; then
3245                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3246                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3247                                 cf_cv_ar_flags=
3248                                 break
3249                         fi
3250                 fi
3251
3252                 rm -f conftest.$ac_cv_objext
3253                 rm -f conftest.a
3254
3255                 cat >conftest.$ac_ext <<EOF
3256 #line 3256 "configure"
3257 int     testdata[3] = { 123, 456, 789 };
3258 EOF
3259                 if { (eval echo "$as_me:3259: \"$ac_compile\"") >&5
3260   (eval $ac_compile) 2>&5
3261   ac_status=$?
3262   echo "$as_me:3262: \$? = $ac_status" >&5
3263   (exit $ac_status); } ; then
3264                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3265                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3266                         if test -f conftest.a ; then
3267                                 cf_cv_ar_flags=$cf_ar_flags
3268                                 break
3269                         fi
3270                 else
3271                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3272
3273 echo "${as_me:-configure}:3273: testing cannot compile test-program ..." 1>&5
3274
3275                         break
3276                 fi
3277         done
3278         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3279
3280 fi
3281 echo "$as_me:3281: result: $cf_cv_ar_flags" >&5
3282 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3283
3284 if test -n "$ARFLAGS" ; then
3285         if test -n "$cf_cv_ar_flags" ; then
3286                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3287         fi
3288 else
3289         ARFLAGS=$cf_cv_ar_flags
3290 fi
3291
3292         echo "$as_me:3292: checking for PATH separator" >&5
3293 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3294         case $cf_cv_system_name in
3295         os2*)   PATH_SEPARATOR=';'  ;;
3296         *)      ${PATH_SEPARATOR:=':'}  ;;
3297         esac
3298
3299         echo "$as_me:3299: result: $PATH_SEPARATOR" >&5
3300 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3301
3302 echo "$as_me:3302: checking if you have specified an install-prefix" >&5
3303 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3304
3305 # Check whether --with-install-prefix or --without-install-prefix was given.
3306 if test "${with_install_prefix+set}" = set; then
3307   withval="$with_install_prefix"
3308   case "$withval" in #(vi
3309         yes|no) #(vi
3310                 ;;
3311         *)      DESTDIR="$withval"
3312                 ;;
3313         esac
3314 fi;
3315 echo "$as_me:3315: result: $DESTDIR" >&5
3316 echo "${ECHO_T}$DESTDIR" >&6
3317
3318 ###############################################################################
3319
3320 # If we're cross-compiling, allow the user to override the tools and their
3321 # options.  The configure script is oriented toward identifying the host
3322 # compiler, etc., but we need a build compiler to generate parts of the source.
3323
3324 if test "$cross_compiling" = yes ; then
3325
3326         # defaults that we might want to override
3327         : ${BUILD_CFLAGS:=''}
3328         : ${BUILD_CPPFLAGS:=''}
3329         : ${BUILD_LDFLAGS:=''}
3330         : ${BUILD_LIBS:=''}
3331         : ${BUILD_EXEEXT:='$x'}
3332         : ${BUILD_OBJEXT:='o'}
3333
3334 # Check whether --with-build-cc or --without-build-cc was given.
3335 if test "${with_build_cc+set}" = set; then
3336   withval="$with_build_cc"
3337   BUILD_CC="$withval"
3338 else
3339   for ac_prog in gcc cc cl
3340 do
3341   # Extract the first word of "$ac_prog", so it can be a program name with args.
3342 set dummy $ac_prog; ac_word=$2
3343 echo "$as_me:3343: checking for $ac_word" >&5
3344 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3345 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3346   echo $ECHO_N "(cached) $ECHO_C" >&6
3347 else
3348   if test -n "$BUILD_CC"; then
3349   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3350 else
3351   ac_save_IFS=$IFS; IFS=$ac_path_separator
3352 ac_dummy="$PATH"
3353 for ac_dir in $ac_dummy; do
3354   IFS=$ac_save_IFS
3355   test -z "$ac_dir" && ac_dir=.
3356   $as_executable_p "$ac_dir/$ac_word" || continue
3357 ac_cv_prog_BUILD_CC="$ac_prog"
3358 echo "$as_me:3358: found $ac_dir/$ac_word" >&5
3359 break
3360 done
3361
3362 fi
3363 fi
3364 BUILD_CC=$ac_cv_prog_BUILD_CC
3365 if test -n "$BUILD_CC"; then
3366   echo "$as_me:3366: result: $BUILD_CC" >&5
3367 echo "${ECHO_T}$BUILD_CC" >&6
3368 else
3369   echo "$as_me:3369: result: no" >&5
3370 echo "${ECHO_T}no" >&6
3371 fi
3372
3373   test -n "$BUILD_CC" && break
3374 done
3375
3376 fi;
3377         echo "$as_me:3377: checking for native build C compiler" >&5
3378 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3379         echo "$as_me:3379: result: $BUILD_CC" >&5
3380 echo "${ECHO_T}$BUILD_CC" >&6
3381
3382         echo "$as_me:3382: checking for native build C preprocessor" >&5
3383 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3384
3385 # Check whether --with-build-cpp or --without-build-cpp was given.
3386 if test "${with_build_cpp+set}" = set; then
3387   withval="$with_build_cpp"
3388   BUILD_CPP="$withval"
3389 else
3390   BUILD_CPP='${BUILD_CC} -E'
3391 fi;
3392         echo "$as_me:3392: result: $BUILD_CPP" >&5
3393 echo "${ECHO_T}$BUILD_CPP" >&6
3394
3395         echo "$as_me:3395: checking for native build C flags" >&5
3396 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3397
3398 # Check whether --with-build-cflags or --without-build-cflags was given.
3399 if test "${with_build_cflags+set}" = set; then
3400   withval="$with_build_cflags"
3401   BUILD_CFLAGS="$withval"
3402 fi;
3403         echo "$as_me:3403: result: $BUILD_CFLAGS" >&5
3404 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3405
3406         echo "$as_me:3406: checking for native build C preprocessor-flags" >&5
3407 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3408
3409 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3410 if test "${with_build_cppflags+set}" = set; then
3411   withval="$with_build_cppflags"
3412   BUILD_CPPFLAGS="$withval"
3413 fi;
3414         echo "$as_me:3414: result: $BUILD_CPPFLAGS" >&5
3415 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3416
3417         echo "$as_me:3417: checking for native build linker-flags" >&5
3418 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3419
3420 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3421 if test "${with_build_ldflags+set}" = set; then
3422   withval="$with_build_ldflags"
3423   BUILD_LDFLAGS="$withval"
3424 fi;
3425         echo "$as_me:3425: result: $BUILD_LDFLAGS" >&5
3426 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3427
3428         echo "$as_me:3428: checking for native build linker-libraries" >&5
3429 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3430
3431 # Check whether --with-build-libs or --without-build-libs was given.
3432 if test "${with_build_libs+set}" = set; then
3433   withval="$with_build_libs"
3434   BUILD_LIBS="$withval"
3435 fi;
3436         echo "$as_me:3436: result: $BUILD_LIBS" >&5
3437 echo "${ECHO_T}$BUILD_LIBS" >&6
3438
3439         # this assumes we're on Unix.
3440         BUILD_EXEEXT=
3441         BUILD_OBJEXT=o
3442
3443         : ${BUILD_CC:='${CC}'}
3444
3445         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3446                 { { echo "$as_me:3446: error: Cross-build requires two compilers.
3447 Use --with-build-cc to specify the native compiler." >&5
3448 echo "$as_me: error: Cross-build requires two compilers.
3449 Use --with-build-cc to specify the native compiler." >&2;}
3450    { (exit 1); exit 1; }; }
3451         fi
3452
3453 else
3454         : ${BUILD_CC:='${CC}'}
3455         : ${BUILD_CPP:='${CPP}'}
3456         : ${BUILD_CFLAGS:='${CFLAGS}'}
3457         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3458         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3459         : ${BUILD_LIBS:='${LIBS}'}
3460         : ${BUILD_EXEEXT:='$x'}
3461         : ${BUILD_OBJEXT:='o'}
3462 fi
3463
3464 ###############################################################################
3465
3466 ### Options to allow the user to specify the set of libraries which are used.
3467 ### Use "--without-normal --with-shared" to allow the default model to be
3468 ### shared, for example.
3469 cf_list_models=""
3470
3471 echo "$as_me:3471: checking if you want to build shared C-objects" >&5
3472 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3473
3474 # Check whether --with-shared or --without-shared was given.
3475 if test "${with_shared+set}" = set; then
3476   withval="$with_shared"
3477   with_shared=$withval
3478 else
3479   with_shared=no
3480 fi;
3481 echo "$as_me:3481: result: $with_shared" >&5
3482 echo "${ECHO_T}$with_shared" >&6
3483 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3484
3485 echo "$as_me:3485: checking for specified models" >&5
3486 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3487 test -z "$cf_list_models" && cf_list_models=normal
3488 echo "$as_me:3488: result: $cf_list_models" >&5
3489 echo "${ECHO_T}$cf_list_models" >&6
3490
3491 ### Use the first model as the default, and save its suffix for use in building
3492 ### up test-applications.
3493 echo "$as_me:3493: checking for default model" >&5
3494 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3495 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3496 echo "$as_me:3496: result: $DFT_LWR_MODEL" >&5
3497 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3498
3499 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3500
3501 echo "$as_me:3501: checking for specific curses-directory" >&5
3502 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3503
3504 # Check whether --with-curses-dir or --without-curses-dir was given.
3505 if test "${with_curses_dir+set}" = set; then
3506   withval="$with_curses_dir"
3507   cf_cv_curses_dir=$withval
3508 else
3509   cf_cv_curses_dir=no
3510 fi;
3511 echo "$as_me:3511: result: $cf_cv_curses_dir" >&5
3512 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3513
3514 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3515 then
3516
3517 if test "x$prefix" != xNONE; then
3518   cf_path_syntax="$prefix"
3519 else
3520   cf_path_syntax="$ac_default_prefix"
3521 fi
3522
3523 case ".$withval" in #(vi
3524 .\$\(*\)*|.\'*\'*) #(vi
3525   ;;
3526 ..|./*|.\\*) #(vi
3527   ;;
3528 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3529   ;;
3530 .\${*prefix}*|.\${*dir}*) #(vi
3531   eval withval="$withval"
3532   case ".$withval" in #(vi
3533   .NONE/*)
3534     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3535     ;;
3536   esac
3537   ;; #(vi
3538 .no|.NONE/*)
3539   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3540   ;;
3541 *)
3542   { { echo "$as_me:3542: error: expected a pathname, not \"$withval\"" >&5
3543 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3544    { (exit 1); exit 1; }; }
3545   ;;
3546 esac
3547
3548         if test -d "$cf_cv_curses_dir"
3549         then
3550
3551 if test -n "$cf_cv_curses_dir/include" ; then
3552   for cf_add_incdir in $cf_cv_curses_dir/include
3553   do
3554         while test $cf_add_incdir != /usr/include
3555         do
3556           if test -d $cf_add_incdir
3557           then
3558                 cf_have_incdir=no
3559                 if test -n "$CFLAGS$CPPFLAGS" ; then
3560                   # a loop is needed to ensure we can add subdirs of existing dirs
3561                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3562                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3563                           cf_have_incdir=yes; break
3564                         fi
3565                   done
3566                 fi
3567
3568                 if test "$cf_have_incdir" = no ; then
3569                   if test "$cf_add_incdir" = /usr/local/include ; then
3570                         if test "$GCC" = yes
3571                         then
3572                           cf_save_CPPFLAGS=$CPPFLAGS
3573                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3574                           cat >conftest.$ac_ext <<_ACEOF
3575 #line 3575 "configure"
3576 #include "confdefs.h"
3577 #include <stdio.h>
3578 int
3579 main ()
3580 {
3581 printf("Hello")
3582   ;
3583   return 0;
3584 }
3585 _ACEOF
3586 rm -f conftest.$ac_objext
3587 if { (eval echo "$as_me:3587: \"$ac_compile\"") >&5
3588   (eval $ac_compile) 2>&5
3589   ac_status=$?
3590   echo "$as_me:3590: \$? = $ac_status" >&5
3591   (exit $ac_status); } &&
3592          { ac_try='test -s conftest.$ac_objext'
3593   { (eval echo "$as_me:3593: \"$ac_try\"") >&5
3594   (eval $ac_try) 2>&5
3595   ac_status=$?
3596   echo "$as_me:3596: \$? = $ac_status" >&5
3597   (exit $ac_status); }; }; then
3598   :
3599 else
3600   echo "$as_me: failed program was:" >&5
3601 cat conftest.$ac_ext >&5
3602 cf_have_incdir=yes
3603 fi
3604 rm -f conftest.$ac_objext conftest.$ac_ext
3605                           CPPFLAGS=$cf_save_CPPFLAGS
3606                         fi
3607                   fi
3608                 fi
3609
3610                 if test "$cf_have_incdir" = no ; then
3611                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3612
3613 echo "${as_me:-configure}:3613: testing adding $cf_add_incdir to include-path ..." 1>&5
3614
3615                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3616
3617                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3618                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3619                   cf_add_incdir="$cf_top_incdir"
3620                 else
3621                   break
3622                 fi
3623           fi
3624         done
3625   done
3626 fi
3627
3628 if test -n "$cf_cv_curses_dir/lib" ; then
3629   for cf_add_libdir in $cf_cv_curses_dir/lib
3630   do
3631     if test $cf_add_libdir = /usr/lib ; then
3632       :
3633     elif test -d $cf_add_libdir
3634     then
3635       cf_have_libdir=no
3636       if test -n "$LDFLAGS$LIBS" ; then
3637         # a loop is needed to ensure we can add subdirs of existing dirs
3638         for cf_test_libdir in $LDFLAGS $LIBS ; do
3639           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3640             cf_have_libdir=yes; break
3641           fi
3642         done
3643       fi
3644       if test "$cf_have_libdir" = no ; then
3645         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
3646
3647 echo "${as_me:-configure}:3647: testing adding $cf_add_libdir to library-path ..." 1>&5
3648
3649         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3650       fi
3651     fi
3652   done
3653 fi
3654
3655         fi
3656 fi
3657
3658 echo "$as_me:3658: checking if you want wide-character code" >&5
3659 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3660
3661 # Check whether --enable-widec or --disable-widec was given.
3662 if test "${enable_widec+set}" = set; then
3663   enableval="$enable_widec"
3664   with_widec=$enableval
3665 else
3666   with_widec=no
3667 fi;
3668 echo "$as_me:3668: result: $with_widec" >&5
3669 echo "${ECHO_T}$with_widec" >&6
3670 if test "$with_widec" = yes ; then
3671
3672 echo "$as_me:3672: checking for multibyte character support" >&5
3673 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3674 if test "${cf_cv_utf8_lib+set}" = set; then
3675   echo $ECHO_N "(cached) $ECHO_C" >&6
3676 else
3677
3678         cf_save_LIBS="$LIBS"
3679         cat >conftest.$ac_ext <<_ACEOF
3680 #line 3680 "configure"
3681 #include "confdefs.h"
3682
3683 #include <stdlib.h>
3684 int
3685 main ()
3686 {
3687 putwc(0,0);
3688   ;
3689   return 0;
3690 }
3691 _ACEOF
3692 rm -f conftest.$ac_objext conftest$ac_exeext
3693 if { (eval echo "$as_me:3693: \"$ac_link\"") >&5
3694   (eval $ac_link) 2>&5
3695   ac_status=$?
3696   echo "$as_me:3696: \$? = $ac_status" >&5
3697   (exit $ac_status); } &&
3698          { ac_try='test -s conftest$ac_exeext'
3699   { (eval echo "$as_me:3699: \"$ac_try\"") >&5
3700   (eval $ac_try) 2>&5
3701   ac_status=$?
3702   echo "$as_me:3702: \$? = $ac_status" >&5
3703   (exit $ac_status); }; }; then
3704   cf_cv_utf8_lib=yes
3705 else
3706   echo "$as_me: failed program was:" >&5
3707 cat conftest.$ac_ext >&5
3708
3709 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3710 # will be set on completion of the AC_TRY_LINK below.
3711 cf_cv_header_path_utf8=
3712 cf_cv_library_path_utf8=
3713
3714 echo "${as_me:-configure}:3714: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3715
3716 cf_save_LIBS="$LIBS"
3717
3718 cat >conftest.$ac_ext <<_ACEOF
3719 #line 3719 "configure"
3720 #include "confdefs.h"
3721
3722 #include <libutf8.h>
3723 int
3724 main ()
3725 {
3726 putwc(0,0);
3727   ;
3728   return 0;
3729 }
3730 _ACEOF
3731 rm -f conftest.$ac_objext conftest$ac_exeext
3732 if { (eval echo "$as_me:3732: \"$ac_link\"") >&5
3733   (eval $ac_link) 2>&5
3734   ac_status=$?
3735   echo "$as_me:3735: \$? = $ac_status" >&5
3736   (exit $ac_status); } &&
3737          { ac_try='test -s conftest$ac_exeext'
3738   { (eval echo "$as_me:3738: \"$ac_try\"") >&5
3739   (eval $ac_try) 2>&5
3740   ac_status=$?
3741   echo "$as_me:3741: \$? = $ac_status" >&5
3742   (exit $ac_status); }; }; then
3743
3744         cf_cv_find_linkage_utf8=yes
3745         cf_cv_header_path_utf8=/usr/include
3746         cf_cv_library_path_utf8=/usr/lib
3747
3748 else
3749   echo "$as_me: failed program was:" >&5
3750 cat conftest.$ac_ext >&5
3751
3752 LIBS="-lutf8  $cf_save_LIBS"
3753
3754 cat >conftest.$ac_ext <<_ACEOF
3755 #line 3755 "configure"
3756 #include "confdefs.h"
3757
3758 #include <libutf8.h>
3759 int
3760 main ()
3761 {
3762 putwc(0,0);
3763   ;
3764   return 0;
3765 }
3766 _ACEOF
3767 rm -f conftest.$ac_objext conftest$ac_exeext
3768 if { (eval echo "$as_me:3768: \"$ac_link\"") >&5
3769   (eval $ac_link) 2>&5
3770   ac_status=$?
3771   echo "$as_me:3771: \$? = $ac_status" >&5
3772   (exit $ac_status); } &&
3773          { ac_try='test -s conftest$ac_exeext'
3774   { (eval echo "$as_me:3774: \"$ac_try\"") >&5
3775   (eval $ac_try) 2>&5
3776   ac_status=$?
3777   echo "$as_me:3777: \$? = $ac_status" >&5
3778   (exit $ac_status); }; }; then
3779
3780         cf_cv_find_linkage_utf8=yes
3781         cf_cv_header_path_utf8=/usr/include
3782         cf_cv_library_path_utf8=/usr/lib
3783         cf_cv_library_file_utf8="-lutf8"
3784
3785 else
3786   echo "$as_me: failed program was:" >&5
3787 cat conftest.$ac_ext >&5
3788
3789         cf_cv_find_linkage_utf8=no
3790         LIBS="$cf_save_LIBS"
3791
3792     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
3793
3794 echo "${as_me:-configure}:3794: testing find linkage for utf8 library ..." 1>&5
3795
3796 echo "${as_me:-configure}:3796: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
3797
3798     cf_save_CPPFLAGS="$CPPFLAGS"
3799     cf_test_CPPFLAGS="$CPPFLAGS"
3800
3801 cf_search=
3802
3803 # collect the current set of include-directories from compiler flags
3804 cf_header_path_list=""
3805 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3806         for cf_header_path in $CPPFLAGS $CFLAGS
3807         do
3808                 case $cf_header_path in #(vi
3809                 -I*)
3810                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3811
3812 test "x$cf_header_path" != "xNONE" && \
3813 test -d "$cf_header_path" && \
3814  {
3815         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
3816         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
3817         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
3818         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
3819         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
3820         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
3821 }
3822
3823                         cf_header_path_list="$cf_header_path_list $cf_search"
3824                         ;;
3825                 esac
3826         done
3827 fi
3828
3829 # add the variations for the package we are looking for
3830
3831 cf_search=
3832
3833 test "x/usr" != "x$prefix" && \
3834 test -d "/usr" && \
3835 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
3836         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
3837         test -d /usr/include &&          cf_search="$cf_search /usr/include"
3838         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
3839         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
3840         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
3841         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
3842 }
3843
3844 test "x$prefix" != "xNONE" && \
3845 test -d "$prefix" && \
3846  {
3847         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
3848         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
3849         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
3850         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
3851         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
3852         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
3853 }
3854
3855 test "x/usr/local" != "x$prefix" && \
3856 test -d "/usr/local" && \
3857 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
3858         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
3859         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
3860         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
3861         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
3862         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
3863         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
3864 }
3865
3866 test "x/opt" != "x$prefix" && \
3867 test -d "/opt" && \
3868 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
3869         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
3870         test -d /opt/include &&          cf_search="$cf_search /opt/include"
3871         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
3872         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
3873         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
3874         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
3875 }
3876
3877 test "x$HOME" != "x$prefix" && \
3878 test -d "$HOME" && \
3879 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
3880         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
3881         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
3882         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
3883         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
3884         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
3885         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
3886 }
3887
3888 test "$includedir" != NONE && \
3889 test "$includedir" != "/usr/include" && \
3890 test -d "$includedir" && {
3891         test -d $includedir &&    cf_search="$cf_search $includedir"
3892         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
3893 }
3894
3895 test "$oldincludedir" != NONE && \
3896 test "$oldincludedir" != "/usr/include" && \
3897 test -d "$oldincludedir" && {
3898         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
3899         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
3900 }
3901
3902 cf_search="$cf_search $cf_header_path_list"
3903
3904     for cf_cv_header_path_utf8 in $cf_search
3905     do
3906       if test -d $cf_cv_header_path_utf8 ; then
3907         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
3908
3909 echo "${as_me:-configure}:3909: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
3910
3911         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
3912         cat >conftest.$ac_ext <<_ACEOF
3913 #line 3913 "configure"
3914 #include "confdefs.h"
3915
3916 #include <libutf8.h>
3917 int
3918 main ()
3919 {
3920 putwc(0,0);
3921   ;
3922   return 0;
3923 }
3924 _ACEOF
3925 rm -f conftest.$ac_objext
3926 if { (eval echo "$as_me:3926: \"$ac_compile\"") >&5
3927   (eval $ac_compile) 2>&5
3928   ac_status=$?
3929   echo "$as_me:3929: \$? = $ac_status" >&5
3930   (exit $ac_status); } &&
3931          { ac_try='test -s conftest.$ac_objext'
3932   { (eval echo "$as_me:3932: \"$ac_try\"") >&5
3933   (eval $ac_try) 2>&5
3934   ac_status=$?
3935   echo "$as_me:3935: \$? = $ac_status" >&5
3936   (exit $ac_status); }; }; then
3937
3938             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
3939
3940 echo "${as_me:-configure}:3940: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
3941
3942             cf_cv_find_linkage_utf8=maybe
3943             cf_test_CPPFLAGS="$CPPFLAGS"
3944             break
3945 else
3946   echo "$as_me: failed program was:" >&5
3947 cat conftest.$ac_ext >&5
3948
3949             CPPFLAGS="$cf_save_CPPFLAGS"
3950
3951 fi
3952 rm -f conftest.$ac_objext conftest.$ac_ext
3953       fi
3954     done
3955
3956     if test "$cf_cv_find_linkage_utf8" = maybe ; then
3957
3958 echo "${as_me:-configure}:3958: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
3959
3960       cf_save_LIBS="$LIBS"
3961       cf_save_LDFLAGS="$LDFLAGS"
3962
3963       if test "$cf_cv_find_linkage_utf8" != yes ; then
3964
3965 cf_search=
3966 cf_library_path_list=""
3967 if test -n "${LDFLAGS}${LIBS}" ; then
3968         for cf_library_path in $LDFLAGS $LIBS
3969         do
3970                 case $cf_library_path in #(vi
3971                 -L*)
3972                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
3973
3974 test "x$cf_library_path" != "xNONE" && \
3975 test -d "$cf_library_path" && \
3976  {
3977         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
3978         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
3979         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
3980         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
3981         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
3982         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
3983 }
3984
3985                         cf_library_path_list="$cf_library_path_list $cf_search"
3986                         ;;
3987                 esac
3988         done
3989 fi
3990
3991 cf_search=
3992
3993 test "x/usr" != "x$prefix" && \
3994 test -d "/usr" && \
3995 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
3996         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
3997         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
3998         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
3999         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4000         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4001         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4002 }
4003
4004 test "x$prefix" != "xNONE" && \
4005 test -d "$prefix" && \
4006  {
4007         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4008         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4009         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4010         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4011         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4012         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4013 }
4014
4015 test "x/usr/local" != "x$prefix" && \
4016 test -d "/usr/local" && \
4017 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
4018         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4019         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4020         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4021         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4022         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4023         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4024 }
4025
4026 test "x/opt" != "x$prefix" && \
4027 test -d "/opt" && \
4028 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
4029         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4030         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4031         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4032         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4033         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4034         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4035 }
4036
4037 test "x$HOME" != "x$prefix" && \
4038 test -d "$HOME" && \
4039 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
4040         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4041         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4042         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4043         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4044         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4045         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4046 }
4047
4048 cf_search="$cf_library_path_list $cf_search"
4049
4050         for cf_cv_library_path_utf8 in $cf_search
4051         do
4052           if test -d $cf_cv_library_path_utf8 ; then
4053             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4054
4055 echo "${as_me:-configure}:4055: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4056
4057             CPPFLAGS="$cf_test_CPPFLAGS"
4058             LIBS="-lutf8  $cf_save_LIBS"
4059             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4060             cat >conftest.$ac_ext <<_ACEOF
4061 #line 4061 "configure"
4062 #include "confdefs.h"
4063
4064 #include <libutf8.h>
4065 int
4066 main ()
4067 {
4068 putwc(0,0);
4069   ;
4070   return 0;
4071 }
4072 _ACEOF
4073 rm -f conftest.$ac_objext conftest$ac_exeext
4074 if { (eval echo "$as_me:4074: \"$ac_link\"") >&5
4075   (eval $ac_link) 2>&5
4076   ac_status=$?
4077   echo "$as_me:4077: \$? = $ac_status" >&5
4078   (exit $ac_status); } &&
4079          { ac_try='test -s conftest$ac_exeext'
4080   { (eval echo "$as_me:4080: \"$ac_try\"") >&5
4081   (eval $ac_try) 2>&5
4082   ac_status=$?
4083   echo "$as_me:4083: \$? = $ac_status" >&5
4084   (exit $ac_status); }; }; then
4085
4086                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4087
4088 echo "${as_me:-configure}:4088: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4089
4090                 cf_cv_find_linkage_utf8=yes
4091                 cf_cv_library_file_utf8="-lutf8"
4092                 break
4093 else
4094   echo "$as_me: failed program was:" >&5
4095 cat conftest.$ac_ext >&5
4096
4097                 CPPFLAGS="$cf_save_CPPFLAGS"
4098                 LIBS="$cf_save_LIBS"
4099                 LDFLAGS="$cf_save_LDFLAGS"
4100
4101 fi
4102 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4103           fi
4104         done
4105         CPPFLAGS="$cf_save_CPPFLAGS"
4106         LDFLAGS="$cf_save_LDFLAGS"
4107       fi
4108
4109     else
4110       cf_cv_find_linkage_utf8=no
4111     fi
4112
4113 fi
4114 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4115
4116 fi
4117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4118
4119 LIBS="$cf_save_LIBS"
4120
4121 if test "$cf_cv_find_linkage_utf8" = yes ; then
4122 cf_cv_utf8_lib=add-on
4123 else
4124 cf_cv_utf8_lib=no
4125 fi
4126
4127 fi
4128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4129 fi
4130 echo "$as_me:4130: result: $cf_cv_utf8_lib" >&5
4131 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4132
4133 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4134 # ncurses/ncursesw:
4135 if test "$cf_cv_utf8_lib" = "add-on" ; then
4136
4137 cat >>confdefs.h <<\EOF
4138 #define HAVE_LIBUTF8_H 1
4139 EOF
4140
4141 if test -n "$cf_cv_header_path_utf8" ; then
4142   for cf_add_incdir in $cf_cv_header_path_utf8
4143   do
4144         while test $cf_add_incdir != /usr/include
4145         do
4146           if test -d $cf_add_incdir
4147           then
4148                 cf_have_incdir=no
4149                 if test -n "$CFLAGS$CPPFLAGS" ; then
4150                   # a loop is needed to ensure we can add subdirs of existing dirs
4151                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4152                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4153                           cf_have_incdir=yes; break
4154                         fi
4155                   done
4156                 fi
4157
4158                 if test "$cf_have_incdir" = no ; then
4159                   if test "$cf_add_incdir" = /usr/local/include ; then
4160                         if test "$GCC" = yes
4161                         then
4162                           cf_save_CPPFLAGS=$CPPFLAGS
4163                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4164                           cat >conftest.$ac_ext <<_ACEOF
4165 #line 4165 "configure"
4166 #include "confdefs.h"
4167 #include <stdio.h>
4168 int
4169 main ()
4170 {
4171 printf("Hello")
4172   ;
4173   return 0;
4174 }
4175 _ACEOF
4176 rm -f conftest.$ac_objext
4177 if { (eval echo "$as_me:4177: \"$ac_compile\"") >&5
4178   (eval $ac_compile) 2>&5
4179   ac_status=$?
4180   echo "$as_me:4180: \$? = $ac_status" >&5
4181   (exit $ac_status); } &&
4182          { ac_try='test -s conftest.$ac_objext'
4183   { (eval echo "$as_me:4183: \"$ac_try\"") >&5
4184   (eval $ac_try) 2>&5
4185   ac_status=$?
4186   echo "$as_me:4186: \$? = $ac_status" >&5
4187   (exit $ac_status); }; }; then
4188   :
4189 else
4190   echo "$as_me: failed program was:" >&5
4191 cat conftest.$ac_ext >&5
4192 cf_have_incdir=yes
4193 fi
4194 rm -f conftest.$ac_objext conftest.$ac_ext
4195                           CPPFLAGS=$cf_save_CPPFLAGS
4196                         fi
4197                   fi
4198                 fi
4199
4200                 if test "$cf_have_incdir" = no ; then
4201                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4202
4203 echo "${as_me:-configure}:4203: testing adding $cf_add_incdir to include-path ..." 1>&5
4204
4205                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4206
4207                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4208                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4209                   cf_add_incdir="$cf_top_incdir"
4210                 else
4211                   break
4212                 fi
4213           fi
4214         done
4215   done
4216 fi
4217
4218 if test -n "$cf_cv_library_path_utf8" ; then
4219   for cf_add_libdir in $cf_cv_library_path_utf8
4220   do
4221     if test $cf_add_libdir = /usr/lib ; then
4222       :
4223     elif test -d $cf_add_libdir
4224     then
4225       cf_have_libdir=no
4226       if test -n "$LDFLAGS$LIBS" ; then
4227         # a loop is needed to ensure we can add subdirs of existing dirs
4228         for cf_test_libdir in $LDFLAGS $LIBS ; do
4229           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4230             cf_have_libdir=yes; break
4231           fi
4232         done
4233       fi
4234       if test "$cf_have_libdir" = no ; then
4235         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4236
4237 echo "${as_me:-configure}:4237: testing adding $cf_add_libdir to library-path ..." 1>&5
4238
4239         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4240       fi
4241     fi
4242   done
4243 fi
4244
4245         LIBS="$cf_cv_library_file_utf8 $LIBS"
4246 fi
4247
4248 cf_ncuconfig_root=ncursesw
4249
4250 echo "Looking for ${cf_ncuconfig_root}-config"
4251
4252 if test -n "$ac_tool_prefix"; then
4253   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4254   do
4255     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4256 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4257 echo "$as_me:4257: checking for $ac_word" >&5
4258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4259 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4260   echo $ECHO_N "(cached) $ECHO_C" >&6
4261 else
4262   if test -n "$NCURSES_CONFIG"; then
4263   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4264 else
4265   ac_save_IFS=$IFS; IFS=$ac_path_separator
4266 ac_dummy="$PATH"
4267 for ac_dir in $ac_dummy; do
4268   IFS=$ac_save_IFS
4269   test -z "$ac_dir" && ac_dir=.
4270   $as_executable_p "$ac_dir/$ac_word" || continue
4271 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4272 echo "$as_me:4272: found $ac_dir/$ac_word" >&5
4273 break
4274 done
4275
4276 fi
4277 fi
4278 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4279 if test -n "$NCURSES_CONFIG"; then
4280   echo "$as_me:4280: result: $NCURSES_CONFIG" >&5
4281 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4282 else
4283   echo "$as_me:4283: result: no" >&5
4284 echo "${ECHO_T}no" >&6
4285 fi
4286
4287     test -n "$NCURSES_CONFIG" && break
4288   done
4289 fi
4290 if test -z "$NCURSES_CONFIG"; then
4291   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4292   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4293 do
4294   # Extract the first word of "$ac_prog", so it can be a program name with args.
4295 set dummy $ac_prog; ac_word=$2
4296 echo "$as_me:4296: checking for $ac_word" >&5
4297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4298 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4299   echo $ECHO_N "(cached) $ECHO_C" >&6
4300 else
4301   if test -n "$ac_ct_NCURSES_CONFIG"; then
4302   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4303 else
4304   ac_save_IFS=$IFS; IFS=$ac_path_separator
4305 ac_dummy="$PATH"
4306 for ac_dir in $ac_dummy; do
4307   IFS=$ac_save_IFS
4308   test -z "$ac_dir" && ac_dir=.
4309   $as_executable_p "$ac_dir/$ac_word" || continue
4310 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4311 echo "$as_me:4311: found $ac_dir/$ac_word" >&5
4312 break
4313 done
4314
4315 fi
4316 fi
4317 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4318 if test -n "$ac_ct_NCURSES_CONFIG"; then
4319   echo "$as_me:4319: result: $ac_ct_NCURSES_CONFIG" >&5
4320 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326   test -n "$ac_ct_NCURSES_CONFIG" && break
4327 done
4328 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4329
4330   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4331 fi
4332
4333 if test "$NCURSES_CONFIG" != none ; then
4334
4335 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4336 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4337
4338 # even with config script, some packages use no-override for curses.h
4339
4340 echo "$as_me:4340: checking if we have identified curses headers" >&5
4341 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4342 if test "${cf_cv_ncurses_header+set}" = set; then
4343   echo $ECHO_N "(cached) $ECHO_C" >&6
4344 else
4345
4346 cf_cv_ncurses_header=none
4347 for cf_header in  \
4348     ncursesw/ncurses.h \
4349         ncursesw/curses.h \
4350         ncurses.h \
4351         curses.h
4352 do
4353 cat >conftest.$ac_ext <<_ACEOF
4354 #line 4354 "configure"
4355 #include "confdefs.h"
4356 #include <${cf_header}>
4357 int
4358 main ()
4359 {
4360 initscr(); tgoto("?", 0,0)
4361   ;
4362   return 0;
4363 }
4364 _ACEOF
4365 rm -f conftest.$ac_objext
4366 if { (eval echo "$as_me:4366: \"$ac_compile\"") >&5
4367   (eval $ac_compile) 2>&5
4368   ac_status=$?
4369   echo "$as_me:4369: \$? = $ac_status" >&5
4370   (exit $ac_status); } &&
4371          { ac_try='test -s conftest.$ac_objext'
4372   { (eval echo "$as_me:4372: \"$ac_try\"") >&5
4373   (eval $ac_try) 2>&5
4374   ac_status=$?
4375   echo "$as_me:4375: \$? = $ac_status" >&5
4376   (exit $ac_status); }; }; then
4377   cf_cv_ncurses_header=$cf_header; break
4378 else
4379   echo "$as_me: failed program was:" >&5
4380 cat conftest.$ac_ext >&5
4381 fi
4382 rm -f conftest.$ac_objext conftest.$ac_ext
4383 done
4384
4385 fi
4386 echo "$as_me:4386: result: $cf_cv_ncurses_header" >&5
4387 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4388
4389 if test "$cf_cv_ncurses_header" = none ; then
4390         { { echo "$as_me:4390: error: No curses header-files found" >&5
4391 echo "$as_me: error: No curses header-files found" >&2;}
4392    { (exit 1); exit 1; }; }
4393 fi
4394
4395 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4396
4397 for ac_header in $cf_cv_ncurses_header
4398 do
4399 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4400 echo "$as_me:4400: checking for $ac_header" >&5
4401 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4402 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4403   echo $ECHO_N "(cached) $ECHO_C" >&6
4404 else
4405   cat >conftest.$ac_ext <<_ACEOF
4406 #line 4406 "configure"
4407 #include "confdefs.h"
4408 #include <$ac_header>
4409 _ACEOF
4410 if { (eval echo "$as_me:4410: \"$ac_cpp conftest.$ac_ext\"") >&5
4411   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4412   ac_status=$?
4413   egrep -v '^ *\+' conftest.er1 >conftest.err
4414   rm -f conftest.er1
4415   cat conftest.err >&5
4416   echo "$as_me:4416: \$? = $ac_status" >&5
4417   (exit $ac_status); } >/dev/null; then
4418   if test -s conftest.err; then
4419     ac_cpp_err=$ac_c_preproc_warn_flag
4420   else
4421     ac_cpp_err=
4422   fi
4423 else
4424   ac_cpp_err=yes
4425 fi
4426 if test -z "$ac_cpp_err"; then
4427   eval "$as_ac_Header=yes"
4428 else
4429   echo "$as_me: failed program was:" >&5
4430   cat conftest.$ac_ext >&5
4431   eval "$as_ac_Header=no"
4432 fi
4433 rm -f conftest.err conftest.$ac_ext
4434 fi
4435 echo "$as_me:4435: result: `eval echo '${'$as_ac_Header'}'`" >&5
4436 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4437 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4438   cat >>confdefs.h <<EOF
4439 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4440 EOF
4441
4442 fi
4443 done
4444
4445 cat >>confdefs.h <<\EOF
4446 #define NCURSES 1
4447 EOF
4448
4449 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4450
4451 cat >>confdefs.h <<EOF
4452 #define $cf_nculib_ROOT 1
4453 EOF
4454
4455 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4456
4457 else
4458
4459 cf_ncuhdr_root=ncursesw
4460
4461 test -n "$cf_cv_curses_dir" && \
4462 test "$cf_cv_curses_dir" != "no" && { \
4463
4464 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4465   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4466   do
4467         while test $cf_add_incdir != /usr/include
4468         do
4469           if test -d $cf_add_incdir
4470           then
4471                 cf_have_incdir=no
4472                 if test -n "$CFLAGS$CPPFLAGS" ; then
4473                   # a loop is needed to ensure we can add subdirs of existing dirs
4474                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4475                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4476                           cf_have_incdir=yes; break
4477                         fi
4478                   done
4479                 fi
4480
4481                 if test "$cf_have_incdir" = no ; then
4482                   if test "$cf_add_incdir" = /usr/local/include ; then
4483                         if test "$GCC" = yes
4484                         then
4485                           cf_save_CPPFLAGS=$CPPFLAGS
4486                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4487                           cat >conftest.$ac_ext <<_ACEOF
4488 #line 4488 "configure"
4489 #include "confdefs.h"
4490 #include <stdio.h>
4491 int
4492 main ()
4493 {
4494 printf("Hello")
4495   ;
4496   return 0;
4497 }
4498 _ACEOF
4499 rm -f conftest.$ac_objext
4500 if { (eval echo "$as_me:4500: \"$ac_compile\"") >&5
4501   (eval $ac_compile) 2>&5
4502   ac_status=$?
4503   echo "$as_me:4503: \$? = $ac_status" >&5
4504   (exit $ac_status); } &&
4505          { ac_try='test -s conftest.$ac_objext'
4506   { (eval echo "$as_me:4506: \"$ac_try\"") >&5
4507   (eval $ac_try) 2>&5
4508   ac_status=$?
4509   echo "$as_me:4509: \$? = $ac_status" >&5
4510   (exit $ac_status); }; }; then
4511   :
4512 else
4513   echo "$as_me: failed program was:" >&5
4514 cat conftest.$ac_ext >&5
4515 cf_have_incdir=yes
4516 fi
4517 rm -f conftest.$ac_objext conftest.$ac_ext
4518                           CPPFLAGS=$cf_save_CPPFLAGS
4519                         fi
4520                   fi
4521                 fi
4522
4523                 if test "$cf_have_incdir" = no ; then
4524                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4525
4526 echo "${as_me:-configure}:4526: testing adding $cf_add_incdir to include-path ..." 1>&5
4527
4528                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4529
4530                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4531                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4532                   cf_add_incdir="$cf_top_incdir"
4533                 else
4534                   break
4535                 fi
4536           fi
4537         done
4538   done
4539 fi
4540
4541 }
4542
4543 echo "$as_me:4543: checking for $cf_ncuhdr_root header in include-path" >&5
4544 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4545 if test "${cf_cv_ncurses_h+set}" = set; then
4546   echo $ECHO_N "(cached) $ECHO_C" >&6
4547 else
4548
4549         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4550         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4551         for cf_header in $cf_header_list
4552         do
4553
4554         cat >conftest.$ac_ext <<_ACEOF
4555 #line 4555 "configure"
4556 #include "confdefs.h"
4557
4558 #define _XOPEN_SOURCE_EXTENDED
4559 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4560 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4561
4562 #include <$cf_header>
4563 int
4564 main ()
4565 {
4566
4567 #ifdef NCURSES_VERSION
4568
4569 #ifndef WACS_BSSB
4570         make an error
4571 #endif
4572
4573 printf("%s\n", NCURSES_VERSION);
4574 #else
4575 #ifdef __NCURSES_H
4576 printf("old\n");
4577 #else
4578         make an error
4579 #endif
4580 #endif
4581
4582   ;
4583   return 0;
4584 }
4585 _ACEOF
4586 rm -f conftest.$ac_objext
4587 if { (eval echo "$as_me:4587: \"$ac_compile\"") >&5
4588   (eval $ac_compile) 2>&5
4589   ac_status=$?
4590   echo "$as_me:4590: \$? = $ac_status" >&5
4591   (exit $ac_status); } &&
4592          { ac_try='test -s conftest.$ac_objext'
4593   { (eval echo "$as_me:4593: \"$ac_try\"") >&5
4594   (eval $ac_try) 2>&5
4595   ac_status=$?
4596   echo "$as_me:4596: \$? = $ac_status" >&5
4597   (exit $ac_status); }; }; then
4598   cf_cv_ncurses_h=$cf_header
4599
4600 else
4601   echo "$as_me: failed program was:" >&5
4602 cat conftest.$ac_ext >&5
4603 cf_cv_ncurses_h=no
4604 fi
4605 rm -f conftest.$ac_objext conftest.$ac_ext
4606
4607                 test "$cf_cv_ncurses_h" != no && break
4608         done
4609
4610 fi
4611 echo "$as_me:4611: result: $cf_cv_ncurses_h" >&5
4612 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4613
4614 if test "$cf_cv_ncurses_h" != no ; then
4615         cf_cv_ncurses_header=$cf_cv_ncurses_h
4616 else
4617
4618 echo "$as_me:4618: checking for $cf_ncuhdr_root include-path" >&5
4619 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4620 if test "${cf_cv_ncurses_h2+set}" = set; then
4621   echo $ECHO_N "(cached) $ECHO_C" >&6
4622 else
4623
4624         test -n "$verbose" && echo
4625
4626 cf_search=
4627
4628 # collect the current set of include-directories from compiler flags
4629 cf_header_path_list=""
4630 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4631         for cf_header_path in $CPPFLAGS $CFLAGS
4632         do
4633                 case $cf_header_path in #(vi
4634                 -I*)
4635                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4636
4637 test "x$cf_header_path" != "xNONE" && \
4638 test -d "$cf_header_path" && \
4639  {
4640         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4641         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4642         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4643         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4644         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4645         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"
4646 }
4647
4648                         cf_header_path_list="$cf_header_path_list $cf_search"
4649                         ;;
4650                 esac
4651         done
4652 fi
4653
4654 # add the variations for the package we are looking for
4655
4656 cf_search=
4657
4658 test "x/usr" != "x$prefix" && \
4659 test -d "/usr" && \
4660 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
4661         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4662         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4663         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4664         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4665         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4666         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4667 }
4668
4669 test "x$prefix" != "xNONE" && \
4670 test -d "$prefix" && \
4671  {
4672         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4673         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4674         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4675         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4676         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4677         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4678 }
4679
4680 test "x/usr/local" != "x$prefix" && \
4681 test -d "/usr/local" && \
4682 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
4683         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4684         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4685         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4686         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4687         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4688         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4689 }
4690
4691 test "x/opt" != "x$prefix" && \
4692 test -d "/opt" && \
4693 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
4694         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4695         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4696         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4697         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4698         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4699         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4700 }
4701
4702 test "x$HOME" != "x$prefix" && \
4703 test -d "$HOME" && \
4704 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
4705         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4706         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4707         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4708         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4709         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4710         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4711 }
4712
4713 test "$includedir" != NONE && \
4714 test "$includedir" != "/usr/include" && \
4715 test -d "$includedir" && {
4716         test -d $includedir &&    cf_search="$cf_search $includedir"
4717         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4718 }
4719
4720 test "$oldincludedir" != NONE && \
4721 test "$oldincludedir" != "/usr/include" && \
4722 test -d "$oldincludedir" && {
4723         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4724         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4725 }
4726
4727 cf_search="$cf_search $cf_header_path_list"
4728
4729         test -n "$verbose" && echo search path $cf_search
4730         cf_save2_CPPFLAGS="$CPPFLAGS"
4731         for cf_incdir in $cf_search
4732         do
4733
4734 if test -n "$cf_incdir" ; then
4735   for cf_add_incdir in $cf_incdir
4736   do
4737         while test $cf_add_incdir != /usr/include
4738         do
4739           if test -d $cf_add_incdir
4740           then
4741                 cf_have_incdir=no
4742                 if test -n "$CFLAGS$CPPFLAGS" ; then
4743                   # a loop is needed to ensure we can add subdirs of existing dirs
4744                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4745                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4746                           cf_have_incdir=yes; break
4747                         fi
4748                   done
4749                 fi
4750
4751                 if test "$cf_have_incdir" = no ; then
4752                   if test "$cf_add_incdir" = /usr/local/include ; then
4753                         if test "$GCC" = yes
4754                         then
4755                           cf_save_CPPFLAGS=$CPPFLAGS
4756                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4757                           cat >conftest.$ac_ext <<_ACEOF
4758 #line 4758 "configure"
4759 #include "confdefs.h"
4760 #include <stdio.h>
4761 int
4762 main ()
4763 {
4764 printf("Hello")
4765   ;
4766   return 0;
4767 }
4768 _ACEOF
4769 rm -f conftest.$ac_objext
4770 if { (eval echo "$as_me:4770: \"$ac_compile\"") >&5
4771   (eval $ac_compile) 2>&5
4772   ac_status=$?
4773   echo "$as_me:4773: \$? = $ac_status" >&5
4774   (exit $ac_status); } &&
4775          { ac_try='test -s conftest.$ac_objext'
4776   { (eval echo "$as_me:4776: \"$ac_try\"") >&5
4777   (eval $ac_try) 2>&5
4778   ac_status=$?
4779   echo "$as_me:4779: \$? = $ac_status" >&5
4780   (exit $ac_status); }; }; then
4781   :
4782 else
4783   echo "$as_me: failed program was:" >&5
4784 cat conftest.$ac_ext >&5
4785 cf_have_incdir=yes
4786 fi
4787 rm -f conftest.$ac_objext conftest.$ac_ext
4788                           CPPFLAGS=$cf_save_CPPFLAGS
4789                         fi
4790                   fi
4791                 fi
4792
4793                 if test "$cf_have_incdir" = no ; then
4794                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4795
4796 echo "${as_me:-configure}:4796: testing adding $cf_add_incdir to include-path ..." 1>&5
4797
4798                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4799
4800                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4801                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4802                   cf_add_incdir="$cf_top_incdir"
4803                 else
4804                   break
4805                 fi
4806           fi
4807         done
4808   done
4809 fi
4810
4811                 for cf_header in \
4812                         ncurses.h \
4813                         curses.h
4814                 do
4815
4816         cat >conftest.$ac_ext <<_ACEOF
4817 #line 4817 "configure"
4818 #include "confdefs.h"
4819
4820 #include <$cf_header>
4821 int
4822 main ()
4823 {
4824
4825 #ifdef NCURSES_VERSION
4826
4827 printf("%s\n", NCURSES_VERSION);
4828 #else
4829 #ifdef __NCURSES_H
4830 printf("old\n");
4831 #else
4832         make an error
4833 #endif
4834 #endif
4835
4836   ;
4837   return 0;
4838 }
4839 _ACEOF
4840 rm -f conftest.$ac_objext
4841 if { (eval echo "$as_me:4841: \"$ac_compile\"") >&5
4842   (eval $ac_compile) 2>&5
4843   ac_status=$?
4844   echo "$as_me:4844: \$? = $ac_status" >&5
4845   (exit $ac_status); } &&
4846          { ac_try='test -s conftest.$ac_objext'
4847   { (eval echo "$as_me:4847: \"$ac_try\"") >&5
4848   (eval $ac_try) 2>&5
4849   ac_status=$?
4850   echo "$as_me:4850: \$? = $ac_status" >&5
4851   (exit $ac_status); }; }; then
4852   cf_cv_ncurses_h2=$cf_header
4853
4854 else
4855   echo "$as_me: failed program was:" >&5
4856 cat conftest.$ac_ext >&5
4857 cf_cv_ncurses_h2=no
4858 fi
4859 rm -f conftest.$ac_objext conftest.$ac_ext
4860
4861                         if test "$cf_cv_ncurses_h2" != no ; then
4862                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4863                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
4864                                 break
4865                         fi
4866                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
4867                 done
4868                 CPPFLAGS="$cf_save2_CPPFLAGS"
4869                 test "$cf_cv_ncurses_h2" != no && break
4870         done
4871         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4871: error: not found" >&5
4872 echo "$as_me: error: not found" >&2;}
4873    { (exit 1); exit 1; }; }
4874
4875 fi
4876 echo "$as_me:4876: result: $cf_cv_ncurses_h2" >&5
4877 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4878
4879         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4880         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4881         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4882                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4883         fi
4884
4885 if test -n "$cf_1st_incdir" ; then
4886   for cf_add_incdir in $cf_1st_incdir
4887   do
4888         while test $cf_add_incdir != /usr/include
4889         do
4890           if test -d $cf_add_incdir
4891           then
4892                 cf_have_incdir=no
4893                 if test -n "$CFLAGS$CPPFLAGS" ; then
4894                   # a loop is needed to ensure we can add subdirs of existing dirs
4895                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4896                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4897                           cf_have_incdir=yes; break
4898                         fi
4899                   done
4900                 fi
4901
4902                 if test "$cf_have_incdir" = no ; then
4903                   if test "$cf_add_incdir" = /usr/local/include ; then
4904                         if test "$GCC" = yes
4905                         then
4906                           cf_save_CPPFLAGS=$CPPFLAGS
4907                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4908                           cat >conftest.$ac_ext <<_ACEOF
4909 #line 4909 "configure"
4910 #include "confdefs.h"
4911 #include <stdio.h>
4912 int
4913 main ()
4914 {
4915 printf("Hello")
4916   ;
4917   return 0;
4918 }
4919 _ACEOF
4920 rm -f conftest.$ac_objext
4921 if { (eval echo "$as_me:4921: \"$ac_compile\"") >&5
4922   (eval $ac_compile) 2>&5
4923   ac_status=$?
4924   echo "$as_me:4924: \$? = $ac_status" >&5
4925   (exit $ac_status); } &&
4926          { ac_try='test -s conftest.$ac_objext'
4927   { (eval echo "$as_me:4927: \"$ac_try\"") >&5
4928   (eval $ac_try) 2>&5
4929   ac_status=$?
4930   echo "$as_me:4930: \$? = $ac_status" >&5
4931   (exit $ac_status); }; }; then
4932   :
4933 else
4934   echo "$as_me: failed program was:" >&5
4935 cat conftest.$ac_ext >&5
4936 cf_have_incdir=yes
4937 fi
4938 rm -f conftest.$ac_objext conftest.$ac_ext
4939                           CPPFLAGS=$cf_save_CPPFLAGS
4940                         fi
4941                   fi
4942                 fi
4943
4944                 if test "$cf_have_incdir" = no ; then
4945                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4946
4947 echo "${as_me:-configure}:4947: testing adding $cf_add_incdir to include-path ..." 1>&5
4948
4949                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4950
4951                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4952                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4953                   cf_add_incdir="$cf_top_incdir"
4954                 else
4955                   break
4956                 fi
4957           fi
4958         done
4959   done
4960 fi
4961
4962 fi
4963
4964 # Set definitions to allow ifdef'ing for ncurses.h
4965
4966 case $cf_cv_ncurses_header in # (vi
4967 *ncurses.h)
4968
4969 cat >>confdefs.h <<\EOF
4970 #define HAVE_NCURSES_H 1
4971 EOF
4972
4973         ;;
4974 esac
4975
4976 case $cf_cv_ncurses_header in # (vi
4977 ncurses/curses.h|ncurses/ncurses.h)
4978
4979 cat >>confdefs.h <<\EOF
4980 #define HAVE_NCURSES_NCURSES_H 1
4981 EOF
4982
4983         ;;
4984 ncursesw/curses.h|ncursesw/ncurses.h)
4985
4986 cat >>confdefs.h <<\EOF
4987 #define HAVE_NCURSESW_NCURSES_H 1
4988 EOF
4989
4990         ;;
4991 esac
4992
4993 echo "$as_me:4993: checking for terminfo header" >&5
4994 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4995 if test "${cf_cv_term_header+set}" = set; then
4996   echo $ECHO_N "(cached) $ECHO_C" >&6
4997 else
4998
4999 case ${cf_cv_ncurses_header} in #(vi
5000 */ncurses.h|*/ncursesw.h) #(vi
5001         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5002         ;;
5003 *)
5004         cf_term_header=term.h
5005         ;;
5006 esac
5007
5008 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5009 do
5010 cat >conftest.$ac_ext <<_ACEOF
5011 #line 5011 "configure"
5012 #include "confdefs.h"
5013 #include <stdio.h>
5014 #include <${cf_cv_ncurses_header:-curses.h}>
5015 #include <$cf_test>
5016
5017 int
5018 main ()
5019 {
5020 int x = auto_left_margin
5021   ;
5022   return 0;
5023 }
5024 _ACEOF
5025 rm -f conftest.$ac_objext
5026 if { (eval echo "$as_me:5026: \"$ac_compile\"") >&5
5027   (eval $ac_compile) 2>&5
5028   ac_status=$?
5029   echo "$as_me:5029: \$? = $ac_status" >&5
5030   (exit $ac_status); } &&
5031          { ac_try='test -s conftest.$ac_objext'
5032   { (eval echo "$as_me:5032: \"$ac_try\"") >&5
5033   (eval $ac_try) 2>&5
5034   ac_status=$?
5035   echo "$as_me:5035: \$? = $ac_status" >&5
5036   (exit $ac_status); }; }; then
5037
5038         cf_cv_term_header="$cf_test"
5039 else
5040   echo "$as_me: failed program was:" >&5
5041 cat conftest.$ac_ext >&5
5042
5043         cf_cv_term_header=unknown
5044
5045 fi
5046 rm -f conftest.$ac_objext conftest.$ac_ext
5047         test "$cf_cv_term_header" != unknown && break
5048 done
5049
5050 fi
5051 echo "$as_me:5051: result: $cf_cv_term_header" >&5
5052 echo "${ECHO_T}$cf_cv_term_header" >&6
5053
5054 # Set definitions to allow ifdef'ing to accommodate subdirectories
5055
5056 case $cf_cv_term_header in # (vi
5057 *term.h)
5058
5059 cat >>confdefs.h <<\EOF
5060 #define HAVE_TERM_H 1
5061 EOF
5062
5063         ;;
5064 esac
5065
5066 case $cf_cv_term_header in # (vi
5067 ncurses/term.h) #(vi
5068
5069 cat >>confdefs.h <<\EOF
5070 #define HAVE_NCURSES_TERM_H 1
5071 EOF
5072
5073         ;;
5074 ncursesw/term.h)
5075
5076 cat >>confdefs.h <<\EOF
5077 #define HAVE_NCURSESW_TERM_H 1
5078 EOF
5079
5080         ;;
5081 esac
5082
5083 # some applications need this, but should check for NCURSES_VERSION
5084
5085 cat >>confdefs.h <<\EOF
5086 #define NCURSES 1
5087 EOF
5088
5089 echo "$as_me:5089: checking for ncurses version" >&5
5090 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5091 if test "${cf_cv_ncurses_version+set}" = set; then
5092   echo $ECHO_N "(cached) $ECHO_C" >&6
5093 else
5094
5095         cf_cv_ncurses_version=no
5096         cf_tempfile=out$$
5097         rm -f $cf_tempfile
5098         if test "$cross_compiling" = yes; then
5099
5100         # This will not work if the preprocessor splits the line after the
5101         # Autoconf token.  The 'unproto' program does that.
5102         cat > conftest.$ac_ext <<EOF
5103 #include <${cf_cv_ncurses_header:-curses.h}>
5104 #undef Autoconf
5105 #ifdef NCURSES_VERSION
5106 Autoconf NCURSES_VERSION
5107 #else
5108 #ifdef __NCURSES_H
5109 Autoconf "old"
5110 #endif
5111 ;
5112 #endif
5113 EOF
5114         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5115         { (eval echo "$as_me:5115: \"$cf_try\"") >&5
5116   (eval $cf_try) 2>&5
5117   ac_status=$?
5118   echo "$as_me:5118: \$? = $ac_status" >&5
5119   (exit $ac_status); }
5120         if test -f conftest.out ; then
5121                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5122                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5123                 rm -f conftest.out
5124         fi
5125
5126 else
5127   cat >conftest.$ac_ext <<_ACEOF
5128 #line 5128 "configure"
5129 #include "confdefs.h"
5130
5131 #include <${cf_cv_ncurses_header:-curses.h}>
5132 #include <stdio.h>
5133 int main()
5134 {
5135         FILE *fp = fopen("$cf_tempfile", "w");
5136 #ifdef NCURSES_VERSION
5137 # ifdef NCURSES_VERSION_PATCH
5138         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5139 # else
5140         fprintf(fp, "%s\n", NCURSES_VERSION);
5141 # endif
5142 #else
5143 # ifdef __NCURSES_H
5144         fprintf(fp, "old\n");
5145 # else
5146         make an error
5147 # endif
5148 #endif
5149         ${cf_cv_main_return:-return}(0);
5150 }
5151 _ACEOF
5152 rm -f conftest$ac_exeext
5153 if { (eval echo "$as_me:5153: \"$ac_link\"") >&5
5154   (eval $ac_link) 2>&5
5155   ac_status=$?
5156   echo "$as_me:5156: \$? = $ac_status" >&5
5157   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5158   { (eval echo "$as_me:5158: \"$ac_try\"") >&5
5159   (eval $ac_try) 2>&5
5160   ac_status=$?
5161   echo "$as_me:5161: \$? = $ac_status" >&5
5162   (exit $ac_status); }; }; then
5163
5164         cf_cv_ncurses_version=`cat $cf_tempfile`
5165 else
5166   echo "$as_me: program exited with status $ac_status" >&5
5167 echo "$as_me: failed program was:" >&5
5168 cat conftest.$ac_ext >&5
5169 fi
5170 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5171 fi
5172         rm -f $cf_tempfile
5173
5174 fi
5175 echo "$as_me:5175: result: $cf_cv_ncurses_version" >&5
5176 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5177 test "$cf_cv_ncurses_version" = no ||
5178 cat >>confdefs.h <<\EOF
5179 #define NCURSES 1
5180 EOF
5181
5182 cf_nculib_root=ncursesw
5183         # This works, except for the special case where we find gpm, but
5184         # ncurses is in a nonstandard location via $LIBS, and we really want
5185         # to link gpm.
5186 cf_ncurses_LIBS=""
5187 cf_ncurses_SAVE="$LIBS"
5188 echo "$as_me:5188: checking for Gpm_Open in -lgpm" >&5
5189 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5190 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5191   echo $ECHO_N "(cached) $ECHO_C" >&6
5192 else
5193   ac_check_lib_save_LIBS=$LIBS
5194 LIBS="-lgpm  $LIBS"
5195 cat >conftest.$ac_ext <<_ACEOF
5196 #line 5196 "configure"
5197 #include "confdefs.h"
5198
5199 /* Override any gcc2 internal prototype to avoid an error.  */
5200 #ifdef __cplusplus
5201 extern "C"
5202 #endif
5203 /* We use char because int might match the return type of a gcc2
5204    builtin and then its argument prototype would still apply.  */
5205 char Gpm_Open ();
5206 int
5207 main ()
5208 {
5209 Gpm_Open ();
5210   ;
5211   return 0;
5212 }
5213 _ACEOF
5214 rm -f conftest.$ac_objext conftest$ac_exeext
5215 if { (eval echo "$as_me:5215: \"$ac_link\"") >&5
5216   (eval $ac_link) 2>&5
5217   ac_status=$?
5218   echo "$as_me:5218: \$? = $ac_status" >&5
5219   (exit $ac_status); } &&
5220          { ac_try='test -s conftest$ac_exeext'
5221   { (eval echo "$as_me:5221: \"$ac_try\"") >&5
5222   (eval $ac_try) 2>&5
5223   ac_status=$?
5224   echo "$as_me:5224: \$? = $ac_status" >&5
5225   (exit $ac_status); }; }; then
5226   ac_cv_lib_gpm_Gpm_Open=yes
5227 else
5228   echo "$as_me: failed program was:" >&5
5229 cat conftest.$ac_ext >&5
5230 ac_cv_lib_gpm_Gpm_Open=no
5231 fi
5232 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5233 LIBS=$ac_check_lib_save_LIBS
5234 fi
5235 echo "$as_me:5235: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5236 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5237 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5238   echo "$as_me:5238: checking for initscr in -lgpm" >&5
5239 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5240 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5241   echo $ECHO_N "(cached) $ECHO_C" >&6
5242 else
5243   ac_check_lib_save_LIBS=$LIBS
5244 LIBS="-lgpm  $LIBS"
5245 cat >conftest.$ac_ext <<_ACEOF
5246 #line 5246 "configure"
5247 #include "confdefs.h"
5248
5249 /* Override any gcc2 internal prototype to avoid an error.  */
5250 #ifdef __cplusplus
5251 extern "C"
5252 #endif
5253 /* We use char because int might match the return type of a gcc2
5254    builtin and then its argument prototype would still apply.  */
5255 char initscr ();
5256 int
5257 main ()
5258 {
5259 initscr ();
5260   ;
5261   return 0;
5262 }
5263 _ACEOF
5264 rm -f conftest.$ac_objext conftest$ac_exeext
5265 if { (eval echo "$as_me:5265: \"$ac_link\"") >&5
5266   (eval $ac_link) 2>&5
5267   ac_status=$?
5268   echo "$as_me:5268: \$? = $ac_status" >&5
5269   (exit $ac_status); } &&
5270          { ac_try='test -s conftest$ac_exeext'
5271   { (eval echo "$as_me:5271: \"$ac_try\"") >&5
5272   (eval $ac_try) 2>&5
5273   ac_status=$?
5274   echo "$as_me:5274: \$? = $ac_status" >&5
5275   (exit $ac_status); }; }; then
5276   ac_cv_lib_gpm_initscr=yes
5277 else
5278   echo "$as_me: failed program was:" >&5
5279 cat conftest.$ac_ext >&5
5280 ac_cv_lib_gpm_initscr=no
5281 fi
5282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5283 LIBS=$ac_check_lib_save_LIBS
5284 fi
5285 echo "$as_me:5285: result: $ac_cv_lib_gpm_initscr" >&5
5286 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5287 if test $ac_cv_lib_gpm_initscr = yes; then
5288   LIBS="$cf_ncurses_SAVE"
5289 else
5290   cf_ncurses_LIBS="-lgpm"
5291 fi
5292
5293 fi
5294
5295 case $host_os in #(vi
5296 freebsd*)
5297         # This is only necessary if you are linking against an obsolete
5298         # version of ncurses (but it should do no harm, since it's static).
5299         if test "$cf_nculib_root" = ncurses ; then
5300                 echo "$as_me:5300: checking for tgoto in -lmytinfo" >&5
5301 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5302 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5303   echo $ECHO_N "(cached) $ECHO_C" >&6
5304 else
5305   ac_check_lib_save_LIBS=$LIBS
5306 LIBS="-lmytinfo  $LIBS"
5307 cat >conftest.$ac_ext <<_ACEOF
5308 #line 5308 "configure"
5309 #include "confdefs.h"
5310
5311 /* Override any gcc2 internal prototype to avoid an error.  */
5312 #ifdef __cplusplus
5313 extern "C"
5314 #endif
5315 /* We use char because int might match the return type of a gcc2
5316    builtin and then its argument prototype would still apply.  */
5317 char tgoto ();
5318 int
5319 main ()
5320 {
5321 tgoto ();
5322   ;
5323   return 0;
5324 }
5325 _ACEOF
5326 rm -f conftest.$ac_objext conftest$ac_exeext
5327 if { (eval echo "$as_me:5327: \"$ac_link\"") >&5
5328   (eval $ac_link) 2>&5
5329   ac_status=$?
5330   echo "$as_me:5330: \$? = $ac_status" >&5
5331   (exit $ac_status); } &&
5332          { ac_try='test -s conftest$ac_exeext'
5333   { (eval echo "$as_me:5333: \"$ac_try\"") >&5
5334   (eval $ac_try) 2>&5
5335   ac_status=$?
5336   echo "$as_me:5336: \$? = $ac_status" >&5
5337   (exit $ac_status); }; }; then
5338   ac_cv_lib_mytinfo_tgoto=yes
5339 else
5340   echo "$as_me: failed program was:" >&5
5341 cat conftest.$ac_ext >&5
5342 ac_cv_lib_mytinfo_tgoto=no
5343 fi
5344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5345 LIBS=$ac_check_lib_save_LIBS
5346 fi
5347 echo "$as_me:5347: result: $ac_cv_lib_mytinfo_tgoto" >&5
5348 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5349 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5350   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5351 fi
5352
5353         fi
5354         ;;
5355 esac
5356
5357 LIBS="$cf_ncurses_LIBS $LIBS"
5358
5359 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5360 then
5361         LIBS="-l$cf_nculib_root $LIBS"
5362 else
5363
5364         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5365         cf_libdir=""
5366         echo "$as_me:5366: checking for initscr" >&5
5367 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5368 if test "${ac_cv_func_initscr+set}" = set; then
5369   echo $ECHO_N "(cached) $ECHO_C" >&6
5370 else
5371   cat >conftest.$ac_ext <<_ACEOF
5372 #line 5372 "configure"
5373 #include "confdefs.h"
5374 /* System header to define __stub macros and hopefully few prototypes,
5375     which can conflict with char initscr (); below.  */
5376 #include <assert.h>
5377 /* Override any gcc2 internal prototype to avoid an error.  */
5378 #ifdef __cplusplus
5379 extern "C"
5380 #endif
5381 /* We use char because int might match the return type of a gcc2
5382    builtin and then its argument prototype would still apply.  */
5383 char initscr ();
5384 char (*f) ();
5385
5386 int
5387 main ()
5388 {
5389 /* The GNU C library defines this for functions which it implements
5390     to always fail with ENOSYS.  Some functions are actually named
5391     something starting with __ and the normal name is an alias.  */
5392 #if defined (__stub_initscr) || defined (__stub___initscr)
5393 choke me
5394 #else
5395 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5396 #endif
5397
5398   ;
5399   return 0;
5400 }
5401 _ACEOF
5402 rm -f conftest.$ac_objext conftest$ac_exeext
5403 if { (eval echo "$as_me:5403: \"$ac_link\"") >&5
5404   (eval $ac_link) 2>&5
5405   ac_status=$?
5406   echo "$as_me:5406: \$? = $ac_status" >&5
5407   (exit $ac_status); } &&
5408          { ac_try='test -s conftest$ac_exeext'
5409   { (eval echo "$as_me:5409: \"$ac_try\"") >&5
5410   (eval $ac_try) 2>&5
5411   ac_status=$?
5412   echo "$as_me:5412: \$? = $ac_status" >&5
5413   (exit $ac_status); }; }; then
5414   ac_cv_func_initscr=yes
5415 else
5416   echo "$as_me: failed program was:" >&5
5417 cat conftest.$ac_ext >&5
5418 ac_cv_func_initscr=no
5419 fi
5420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5421 fi
5422 echo "$as_me:5422: result: $ac_cv_func_initscr" >&5
5423 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5424 if test $ac_cv_func_initscr = yes; then
5425   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5426 else
5427
5428                 cf_save_LIBS="$LIBS"
5429                 echo "$as_me:5429: checking for initscr in -l$cf_nculib_root" >&5
5430 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5431                 LIBS="-l$cf_nculib_root $LIBS"
5432                 cat >conftest.$ac_ext <<_ACEOF
5433 #line 5433 "configure"
5434 #include "confdefs.h"
5435 #include <${cf_cv_ncurses_header:-curses.h}>
5436 int
5437 main ()
5438 {
5439 initscr()
5440   ;
5441   return 0;
5442 }
5443 _ACEOF
5444 rm -f conftest.$ac_objext conftest$ac_exeext
5445 if { (eval echo "$as_me:5445: \"$ac_link\"") >&5
5446   (eval $ac_link) 2>&5
5447   ac_status=$?
5448   echo "$as_me:5448: \$? = $ac_status" >&5
5449   (exit $ac_status); } &&
5450          { ac_try='test -s conftest$ac_exeext'
5451   { (eval echo "$as_me:5451: \"$ac_try\"") >&5
5452   (eval $ac_try) 2>&5
5453   ac_status=$?
5454   echo "$as_me:5454: \$? = $ac_status" >&5
5455   (exit $ac_status); }; }; then
5456   echo "$as_me:5456: result: yes" >&5
5457 echo "${ECHO_T}yes" >&6
5458                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5459
5460 else
5461   echo "$as_me: failed program was:" >&5
5462 cat conftest.$ac_ext >&5
5463 echo "$as_me:5463: result: no" >&5
5464 echo "${ECHO_T}no" >&6
5465
5466 cf_search=
5467 cf_library_path_list=""
5468 if test -n "${LDFLAGS}${LIBS}" ; then
5469         for cf_library_path in $LDFLAGS $LIBS
5470         do
5471                 case $cf_library_path in #(vi
5472                 -L*)
5473                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5474
5475 test "x$cf_library_path" != "xNONE" && \
5476 test -d "$cf_library_path" && \
5477  {
5478         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5479         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5480         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5481         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5482         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5483         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"
5484 }
5485
5486                         cf_library_path_list="$cf_library_path_list $cf_search"
5487                         ;;
5488                 esac
5489         done
5490 fi
5491
5492 cf_search=
5493
5494 test "x/usr" != "x$prefix" && \
5495 test -d "/usr" && \
5496 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
5497         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5498         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5499         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5500         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5501         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5502         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5503 }
5504
5505 test "x$prefix" != "xNONE" && \
5506 test -d "$prefix" && \
5507  {
5508         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5509         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5510         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5511         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5512         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5513         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5514 }
5515
5516 test "x/usr/local" != "x$prefix" && \
5517 test -d "/usr/local" && \
5518 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
5519         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5520         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5521         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5522         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5523         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5524         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5525 }
5526
5527 test "x/opt" != "x$prefix" && \
5528 test -d "/opt" && \
5529 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
5530         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5531         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5532         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5533         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5534         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5535         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5536 }
5537
5538 test "x$HOME" != "x$prefix" && \
5539 test -d "$HOME" && \
5540 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
5541         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5542         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5543         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5544         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5545         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5546         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5547 }
5548
5549 cf_search="$cf_library_path_list $cf_search"
5550
5551                         for cf_libdir in $cf_search
5552                         do
5553                                 echo "$as_me:5553: checking for -l$cf_nculib_root in $cf_libdir" >&5
5554 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5555                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5556                                 cat >conftest.$ac_ext <<_ACEOF
5557 #line 5557 "configure"
5558 #include "confdefs.h"
5559 #include <${cf_cv_ncurses_header:-curses.h}>
5560 int
5561 main ()
5562 {
5563 initscr()
5564   ;
5565   return 0;
5566 }
5567 _ACEOF
5568 rm -f conftest.$ac_objext conftest$ac_exeext
5569 if { (eval echo "$as_me:5569: \"$ac_link\"") >&5
5570   (eval $ac_link) 2>&5
5571   ac_status=$?
5572   echo "$as_me:5572: \$? = $ac_status" >&5
5573   (exit $ac_status); } &&
5574          { ac_try='test -s conftest$ac_exeext'
5575   { (eval echo "$as_me:5575: \"$ac_try\"") >&5
5576   (eval $ac_try) 2>&5
5577   ac_status=$?
5578   echo "$as_me:5578: \$? = $ac_status" >&5
5579   (exit $ac_status); }; }; then
5580   echo "$as_me:5580: result: yes" >&5
5581 echo "${ECHO_T}yes" >&6
5582                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5583                                          break
5584 else
5585   echo "$as_me: failed program was:" >&5
5586 cat conftest.$ac_ext >&5
5587 echo "$as_me:5587: result: no" >&5
5588 echo "${ECHO_T}no" >&6
5589                                          LIBS="$cf_save_LIBS"
5590 fi
5591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5592                         done
5593
5594 fi
5595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5596
5597 fi
5598
5599 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5600
5601 if test $cf_found_library = no ; then
5602         { { echo "$as_me:5602: error: Cannot link $cf_nculib_root library" >&5
5603 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5604    { (exit 1); exit 1; }; }
5605 fi
5606
5607 fi
5608
5609 if test -n "$cf_ncurses_LIBS" ; then
5610         echo "$as_me:5610: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5611 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5612         cf_ncurses_SAVE="$LIBS"
5613         for p in $cf_ncurses_LIBS ; do
5614                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5615                 if test "$q" != "$LIBS" ; then
5616                         LIBS="$q"
5617                 fi
5618         done
5619         cat >conftest.$ac_ext <<_ACEOF
5620 #line 5620 "configure"
5621 #include "confdefs.h"
5622 #include <${cf_cv_ncurses_header:-curses.h}>
5623 int
5624 main ()
5625 {
5626 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5627   ;
5628   return 0;
5629 }
5630 _ACEOF
5631 rm -f conftest.$ac_objext conftest$ac_exeext
5632 if { (eval echo "$as_me:5632: \"$ac_link\"") >&5
5633   (eval $ac_link) 2>&5
5634   ac_status=$?
5635   echo "$as_me:5635: \$? = $ac_status" >&5
5636   (exit $ac_status); } &&
5637          { ac_try='test -s conftest$ac_exeext'
5638   { (eval echo "$as_me:5638: \"$ac_try\"") >&5
5639   (eval $ac_try) 2>&5
5640   ac_status=$?
5641   echo "$as_me:5641: \$? = $ac_status" >&5
5642   (exit $ac_status); }; }; then
5643   echo "$as_me:5643: result: yes" >&5
5644 echo "${ECHO_T}yes" >&6
5645 else
5646   echo "$as_me: failed program was:" >&5
5647 cat conftest.$ac_ext >&5
5648 echo "$as_me:5648: result: no" >&5
5649 echo "${ECHO_T}no" >&6
5650                  LIBS="$cf_ncurses_SAVE"
5651 fi
5652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5653 fi
5654
5655 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5656
5657 cat >>confdefs.h <<EOF
5658 #define $cf_nculib_ROOT 1
5659 EOF
5660
5661 fi
5662
5663 else
5664
5665 cf_ncuconfig_root=ncurses
5666
5667 echo "Looking for ${cf_ncuconfig_root}-config"
5668
5669 if test -n "$ac_tool_prefix"; then
5670   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5671   do
5672     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5673 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5674 echo "$as_me:5674: checking for $ac_word" >&5
5675 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5676 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5677   echo $ECHO_N "(cached) $ECHO_C" >&6
5678 else
5679   if test -n "$NCURSES_CONFIG"; then
5680   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5681 else
5682   ac_save_IFS=$IFS; IFS=$ac_path_separator
5683 ac_dummy="$PATH"
5684 for ac_dir in $ac_dummy; do
5685   IFS=$ac_save_IFS
5686   test -z "$ac_dir" && ac_dir=.
5687   $as_executable_p "$ac_dir/$ac_word" || continue
5688 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5689 echo "$as_me:5689: found $ac_dir/$ac_word" >&5
5690 break
5691 done
5692
5693 fi
5694 fi
5695 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5696 if test -n "$NCURSES_CONFIG"; then
5697   echo "$as_me:5697: result: $NCURSES_CONFIG" >&5
5698 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5699 else
5700   echo "$as_me:5700: result: no" >&5
5701 echo "${ECHO_T}no" >&6
5702 fi
5703
5704     test -n "$NCURSES_CONFIG" && break
5705   done
5706 fi
5707 if test -z "$NCURSES_CONFIG"; then
5708   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5709   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5710 do
5711   # Extract the first word of "$ac_prog", so it can be a program name with args.
5712 set dummy $ac_prog; ac_word=$2
5713 echo "$as_me:5713: checking for $ac_word" >&5
5714 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5715 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5716   echo $ECHO_N "(cached) $ECHO_C" >&6
5717 else
5718   if test -n "$ac_ct_NCURSES_CONFIG"; then
5719   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5720 else
5721   ac_save_IFS=$IFS; IFS=$ac_path_separator
5722 ac_dummy="$PATH"
5723 for ac_dir in $ac_dummy; do
5724   IFS=$ac_save_IFS
5725   test -z "$ac_dir" && ac_dir=.
5726   $as_executable_p "$ac_dir/$ac_word" || continue
5727 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5728 echo "$as_me:5728: found $ac_dir/$ac_word" >&5
5729 break
5730 done
5731
5732 fi
5733 fi
5734 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5735 if test -n "$ac_ct_NCURSES_CONFIG"; then
5736   echo "$as_me:5736: result: $ac_ct_NCURSES_CONFIG" >&5
5737 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5738 else
5739   echo "$as_me:5739: result: no" >&5
5740 echo "${ECHO_T}no" >&6
5741 fi
5742
5743   test -n "$ac_ct_NCURSES_CONFIG" && break
5744 done
5745 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5746
5747   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5748 fi
5749
5750 if test "$NCURSES_CONFIG" != none ; then
5751
5752 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5753 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5754
5755 # even with config script, some packages use no-override for curses.h
5756
5757 echo "$as_me:5757: checking if we have identified curses headers" >&5
5758 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5759 if test "${cf_cv_ncurses_header+set}" = set; then
5760   echo $ECHO_N "(cached) $ECHO_C" >&6
5761 else
5762
5763 cf_cv_ncurses_header=none
5764 for cf_header in  \
5765     ncurses/ncurses.h \
5766         ncurses/curses.h \
5767         ncurses.h \
5768         curses.h
5769 do
5770 cat >conftest.$ac_ext <<_ACEOF
5771 #line 5771 "configure"
5772 #include "confdefs.h"
5773 #include <${cf_header}>
5774 int
5775 main ()
5776 {
5777 initscr(); tgoto("?", 0,0)
5778   ;
5779   return 0;
5780 }
5781 _ACEOF
5782 rm -f conftest.$ac_objext
5783 if { (eval echo "$as_me:5783: \"$ac_compile\"") >&5
5784   (eval $ac_compile) 2>&5
5785   ac_status=$?
5786   echo "$as_me:5786: \$? = $ac_status" >&5
5787   (exit $ac_status); } &&
5788          { ac_try='test -s conftest.$ac_objext'
5789   { (eval echo "$as_me:5789: \"$ac_try\"") >&5
5790   (eval $ac_try) 2>&5
5791   ac_status=$?
5792   echo "$as_me:5792: \$? = $ac_status" >&5
5793   (exit $ac_status); }; }; then
5794   cf_cv_ncurses_header=$cf_header; break
5795 else
5796   echo "$as_me: failed program was:" >&5
5797 cat conftest.$ac_ext >&5
5798 fi
5799 rm -f conftest.$ac_objext conftest.$ac_ext
5800 done
5801
5802 fi
5803 echo "$as_me:5803: result: $cf_cv_ncurses_header" >&5
5804 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5805
5806 if test "$cf_cv_ncurses_header" = none ; then
5807         { { echo "$as_me:5807: error: No curses header-files found" >&5
5808 echo "$as_me: error: No curses header-files found" >&2;}
5809    { (exit 1); exit 1; }; }
5810 fi
5811
5812 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5813
5814 for ac_header in $cf_cv_ncurses_header
5815 do
5816 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5817 echo "$as_me:5817: checking for $ac_header" >&5
5818 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5819 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5820   echo $ECHO_N "(cached) $ECHO_C" >&6
5821 else
5822   cat >conftest.$ac_ext <<_ACEOF
5823 #line 5823 "configure"
5824 #include "confdefs.h"
5825 #include <$ac_header>
5826 _ACEOF
5827 if { (eval echo "$as_me:5827: \"$ac_cpp conftest.$ac_ext\"") >&5
5828   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5829   ac_status=$?
5830   egrep -v '^ *\+' conftest.er1 >conftest.err
5831   rm -f conftest.er1
5832   cat conftest.err >&5
5833   echo "$as_me:5833: \$? = $ac_status" >&5
5834   (exit $ac_status); } >/dev/null; then
5835   if test -s conftest.err; then
5836     ac_cpp_err=$ac_c_preproc_warn_flag
5837   else
5838     ac_cpp_err=
5839   fi
5840 else
5841   ac_cpp_err=yes
5842 fi
5843 if test -z "$ac_cpp_err"; then
5844   eval "$as_ac_Header=yes"
5845 else
5846   echo "$as_me: failed program was:" >&5
5847   cat conftest.$ac_ext >&5
5848   eval "$as_ac_Header=no"
5849 fi
5850 rm -f conftest.err conftest.$ac_ext
5851 fi
5852 echo "$as_me:5852: result: `eval echo '${'$as_ac_Header'}'`" >&5
5853 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5854 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5855   cat >>confdefs.h <<EOF
5856 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5857 EOF
5858
5859 fi
5860 done
5861
5862 cat >>confdefs.h <<\EOF
5863 #define NCURSES 1
5864 EOF
5865
5866 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5867
5868 cat >>confdefs.h <<EOF
5869 #define $cf_nculib_ROOT 1
5870 EOF
5871
5872 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5873
5874 else
5875
5876 cf_ncuhdr_root=ncurses
5877
5878 test -n "$cf_cv_curses_dir" && \
5879 test "$cf_cv_curses_dir" != "no" && { \
5880
5881 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5882   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5883   do
5884         while test $cf_add_incdir != /usr/include
5885         do
5886           if test -d $cf_add_incdir
5887           then
5888                 cf_have_incdir=no
5889                 if test -n "$CFLAGS$CPPFLAGS" ; then
5890                   # a loop is needed to ensure we can add subdirs of existing dirs
5891                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5892                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5893                           cf_have_incdir=yes; break
5894                         fi
5895                   done
5896                 fi
5897
5898                 if test "$cf_have_incdir" = no ; then
5899                   if test "$cf_add_incdir" = /usr/local/include ; then
5900                         if test "$GCC" = yes
5901                         then
5902                           cf_save_CPPFLAGS=$CPPFLAGS
5903                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5904                           cat >conftest.$ac_ext <<_ACEOF
5905 #line 5905 "configure"
5906 #include "confdefs.h"
5907 #include <stdio.h>
5908 int
5909 main ()
5910 {
5911 printf("Hello")
5912   ;
5913   return 0;
5914 }
5915 _ACEOF
5916 rm -f conftest.$ac_objext
5917 if { (eval echo "$as_me:5917: \"$ac_compile\"") >&5
5918   (eval $ac_compile) 2>&5
5919   ac_status=$?
5920   echo "$as_me:5920: \$? = $ac_status" >&5
5921   (exit $ac_status); } &&
5922          { ac_try='test -s conftest.$ac_objext'
5923   { (eval echo "$as_me:5923: \"$ac_try\"") >&5
5924   (eval $ac_try) 2>&5
5925   ac_status=$?
5926   echo "$as_me:5926: \$? = $ac_status" >&5
5927   (exit $ac_status); }; }; then
5928   :
5929 else
5930   echo "$as_me: failed program was:" >&5
5931 cat conftest.$ac_ext >&5
5932 cf_have_incdir=yes
5933 fi
5934 rm -f conftest.$ac_objext conftest.$ac_ext
5935                           CPPFLAGS=$cf_save_CPPFLAGS
5936                         fi
5937                   fi
5938                 fi
5939
5940                 if test "$cf_have_incdir" = no ; then
5941                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5942
5943 echo "${as_me:-configure}:5943: testing adding $cf_add_incdir to include-path ..." 1>&5
5944
5945                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5946
5947                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5948                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5949                   cf_add_incdir="$cf_top_incdir"
5950                 else
5951                   break
5952                 fi
5953           fi
5954         done
5955   done
5956 fi
5957
5958 }
5959
5960 echo "$as_me:5960: checking for $cf_ncuhdr_root header in include-path" >&5
5961 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5962 if test "${cf_cv_ncurses_h+set}" = set; then
5963   echo $ECHO_N "(cached) $ECHO_C" >&6
5964 else
5965
5966         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5967         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5968         for cf_header in $cf_header_list
5969         do
5970
5971         cat >conftest.$ac_ext <<_ACEOF
5972 #line 5972 "configure"
5973 #include "confdefs.h"
5974
5975 #include <$cf_header>
5976 int
5977 main ()
5978 {
5979
5980 #ifdef NCURSES_VERSION
5981
5982 printf("%s\n", NCURSES_VERSION);
5983 #else
5984 #ifdef __NCURSES_H
5985 printf("old\n");
5986 #else
5987         make an error
5988 #endif
5989 #endif
5990
5991   ;
5992   return 0;
5993 }
5994 _ACEOF
5995 rm -f conftest.$ac_objext
5996 if { (eval echo "$as_me:5996: \"$ac_compile\"") >&5
5997   (eval $ac_compile) 2>&5
5998   ac_status=$?
5999   echo "$as_me:5999: \$? = $ac_status" >&5
6000   (exit $ac_status); } &&
6001          { ac_try='test -s conftest.$ac_objext'
6002   { (eval echo "$as_me:6002: \"$ac_try\"") >&5
6003   (eval $ac_try) 2>&5
6004   ac_status=$?
6005   echo "$as_me:6005: \$? = $ac_status" >&5
6006   (exit $ac_status); }; }; then
6007   cf_cv_ncurses_h=$cf_header
6008
6009 else
6010   echo "$as_me: failed program was:" >&5
6011 cat conftest.$ac_ext >&5
6012 cf_cv_ncurses_h=no
6013 fi
6014 rm -f conftest.$ac_objext conftest.$ac_ext
6015
6016                 test "$cf_cv_ncurses_h" != no && break
6017         done
6018
6019 fi
6020 echo "$as_me:6020: result: $cf_cv_ncurses_h" >&5
6021 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6022
6023 if test "$cf_cv_ncurses_h" != no ; then
6024         cf_cv_ncurses_header=$cf_cv_ncurses_h
6025 else
6026
6027 echo "$as_me:6027: checking for $cf_ncuhdr_root include-path" >&5
6028 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6029 if test "${cf_cv_ncurses_h2+set}" = set; then
6030   echo $ECHO_N "(cached) $ECHO_C" >&6
6031 else
6032
6033         test -n "$verbose" && echo
6034
6035 cf_search=
6036
6037 # collect the current set of include-directories from compiler flags
6038 cf_header_path_list=""
6039 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6040         for cf_header_path in $CPPFLAGS $CFLAGS
6041         do
6042                 case $cf_header_path in #(vi
6043                 -I*)
6044                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6045
6046 test "x$cf_header_path" != "xNONE" && \
6047 test -d "$cf_header_path" && \
6048  {
6049         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6050         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6051         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6052         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6053         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6054         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"
6055 }
6056
6057                         cf_header_path_list="$cf_header_path_list $cf_search"
6058                         ;;
6059                 esac
6060         done
6061 fi
6062
6063 # add the variations for the package we are looking for
6064
6065 cf_search=
6066
6067 test "x/usr" != "x$prefix" && \
6068 test -d "/usr" && \
6069 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
6070         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6071         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6072         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6073         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6074         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6075         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6076 }
6077
6078 test "x$prefix" != "xNONE" && \
6079 test -d "$prefix" && \
6080  {
6081         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6082         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6083         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6084         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6085         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6086         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6087 }
6088
6089 test "x/usr/local" != "x$prefix" && \
6090 test -d "/usr/local" && \
6091 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
6092         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6093         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6094         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6095         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6096         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6097         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6098 }
6099
6100 test "x/opt" != "x$prefix" && \
6101 test -d "/opt" && \
6102 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
6103         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6104         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6105         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6106         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6107         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6108         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6109 }
6110
6111 test "x$HOME" != "x$prefix" && \
6112 test -d "$HOME" && \
6113 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
6114         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6115         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6116         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6117         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6118         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6119         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6120 }
6121
6122 test "$includedir" != NONE && \
6123 test "$includedir" != "/usr/include" && \
6124 test -d "$includedir" && {
6125         test -d $includedir &&    cf_search="$cf_search $includedir"
6126         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6127 }
6128
6129 test "$oldincludedir" != NONE && \
6130 test "$oldincludedir" != "/usr/include" && \
6131 test -d "$oldincludedir" && {
6132         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6133         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6134 }
6135
6136 cf_search="$cf_search $cf_header_path_list"
6137
6138         test -n "$verbose" && echo search path $cf_search
6139         cf_save2_CPPFLAGS="$CPPFLAGS"
6140         for cf_incdir in $cf_search
6141         do
6142
6143 if test -n "$cf_incdir" ; then
6144   for cf_add_incdir in $cf_incdir
6145   do
6146         while test $cf_add_incdir != /usr/include
6147         do
6148           if test -d $cf_add_incdir
6149           then
6150                 cf_have_incdir=no
6151                 if test -n "$CFLAGS$CPPFLAGS" ; then
6152                   # a loop is needed to ensure we can add subdirs of existing dirs
6153                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6154                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6155                           cf_have_incdir=yes; break
6156                         fi
6157                   done
6158                 fi
6159
6160                 if test "$cf_have_incdir" = no ; then
6161                   if test "$cf_add_incdir" = /usr/local/include ; then
6162                         if test "$GCC" = yes
6163                         then
6164                           cf_save_CPPFLAGS=$CPPFLAGS
6165                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6166                           cat >conftest.$ac_ext <<_ACEOF
6167 #line 6167 "configure"
6168 #include "confdefs.h"
6169 #include <stdio.h>
6170 int
6171 main ()
6172 {
6173 printf("Hello")
6174   ;
6175   return 0;
6176 }
6177 _ACEOF
6178 rm -f conftest.$ac_objext
6179 if { (eval echo "$as_me:6179: \"$ac_compile\"") >&5
6180   (eval $ac_compile) 2>&5
6181   ac_status=$?
6182   echo "$as_me:6182: \$? = $ac_status" >&5
6183   (exit $ac_status); } &&
6184          { ac_try='test -s conftest.$ac_objext'
6185   { (eval echo "$as_me:6185: \"$ac_try\"") >&5
6186   (eval $ac_try) 2>&5
6187   ac_status=$?
6188   echo "$as_me:6188: \$? = $ac_status" >&5
6189   (exit $ac_status); }; }; then
6190   :
6191 else
6192   echo "$as_me: failed program was:" >&5
6193 cat conftest.$ac_ext >&5
6194 cf_have_incdir=yes
6195 fi
6196 rm -f conftest.$ac_objext conftest.$ac_ext
6197                           CPPFLAGS=$cf_save_CPPFLAGS
6198                         fi
6199                   fi
6200                 fi
6201
6202                 if test "$cf_have_incdir" = no ; then
6203                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6204
6205 echo "${as_me:-configure}:6205: testing adding $cf_add_incdir to include-path ..." 1>&5
6206
6207                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6208
6209                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6210                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6211                   cf_add_incdir="$cf_top_incdir"
6212                 else
6213                   break
6214                 fi
6215           fi
6216         done
6217   done
6218 fi
6219
6220                 for cf_header in \
6221                         ncurses.h \
6222                         curses.h
6223                 do
6224
6225         cat >conftest.$ac_ext <<_ACEOF
6226 #line 6226 "configure"
6227 #include "confdefs.h"
6228
6229 #include <$cf_header>
6230 int
6231 main ()
6232 {
6233
6234 #ifdef NCURSES_VERSION
6235
6236 printf("%s\n", NCURSES_VERSION);
6237 #else
6238 #ifdef __NCURSES_H
6239 printf("old\n");
6240 #else
6241         make an error
6242 #endif
6243 #endif
6244
6245   ;
6246   return 0;
6247 }
6248 _ACEOF
6249 rm -f conftest.$ac_objext
6250 if { (eval echo "$as_me:6250: \"$ac_compile\"") >&5
6251   (eval $ac_compile) 2>&5
6252   ac_status=$?
6253   echo "$as_me:6253: \$? = $ac_status" >&5
6254   (exit $ac_status); } &&
6255          { ac_try='test -s conftest.$ac_objext'
6256   { (eval echo "$as_me:6256: \"$ac_try\"") >&5
6257   (eval $ac_try) 2>&5
6258   ac_status=$?
6259   echo "$as_me:6259: \$? = $ac_status" >&5
6260   (exit $ac_status); }; }; then
6261   cf_cv_ncurses_h2=$cf_header
6262
6263 else
6264   echo "$as_me: failed program was:" >&5
6265 cat conftest.$ac_ext >&5
6266 cf_cv_ncurses_h2=no
6267 fi
6268 rm -f conftest.$ac_objext conftest.$ac_ext
6269
6270                         if test "$cf_cv_ncurses_h2" != no ; then
6271                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6272                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6273                                 break
6274                         fi
6275                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6276                 done
6277                 CPPFLAGS="$cf_save2_CPPFLAGS"
6278                 test "$cf_cv_ncurses_h2" != no && break
6279         done
6280         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6280: error: not found" >&5
6281 echo "$as_me: error: not found" >&2;}
6282    { (exit 1); exit 1; }; }
6283
6284 fi
6285 echo "$as_me:6285: result: $cf_cv_ncurses_h2" >&5
6286 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6287
6288         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6289         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6290         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6291                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6292         fi
6293
6294 if test -n "$cf_1st_incdir" ; then
6295   for cf_add_incdir in $cf_1st_incdir
6296   do
6297         while test $cf_add_incdir != /usr/include
6298         do
6299           if test -d $cf_add_incdir
6300           then
6301                 cf_have_incdir=no
6302                 if test -n "$CFLAGS$CPPFLAGS" ; then
6303                   # a loop is needed to ensure we can add subdirs of existing dirs
6304                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6305                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6306                           cf_have_incdir=yes; break
6307                         fi
6308                   done
6309                 fi
6310
6311                 if test "$cf_have_incdir" = no ; then
6312                   if test "$cf_add_incdir" = /usr/local/include ; then
6313                         if test "$GCC" = yes
6314                         then
6315                           cf_save_CPPFLAGS=$CPPFLAGS
6316                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6317                           cat >conftest.$ac_ext <<_ACEOF
6318 #line 6318 "configure"
6319 #include "confdefs.h"
6320 #include <stdio.h>
6321 int
6322 main ()
6323 {
6324 printf("Hello")
6325   ;
6326   return 0;
6327 }
6328 _ACEOF
6329 rm -f conftest.$ac_objext
6330 if { (eval echo "$as_me:6330: \"$ac_compile\"") >&5
6331   (eval $ac_compile) 2>&5
6332   ac_status=$?
6333   echo "$as_me:6333: \$? = $ac_status" >&5
6334   (exit $ac_status); } &&
6335          { ac_try='test -s conftest.$ac_objext'
6336   { (eval echo "$as_me:6336: \"$ac_try\"") >&5
6337   (eval $ac_try) 2>&5
6338   ac_status=$?
6339   echo "$as_me:6339: \$? = $ac_status" >&5
6340   (exit $ac_status); }; }; then
6341   :
6342 else
6343   echo "$as_me: failed program was:" >&5
6344 cat conftest.$ac_ext >&5
6345 cf_have_incdir=yes
6346 fi
6347 rm -f conftest.$ac_objext conftest.$ac_ext
6348                           CPPFLAGS=$cf_save_CPPFLAGS
6349                         fi
6350                   fi
6351                 fi
6352
6353                 if test "$cf_have_incdir" = no ; then
6354                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6355
6356 echo "${as_me:-configure}:6356: testing adding $cf_add_incdir to include-path ..." 1>&5
6357
6358                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6359
6360                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6361                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6362                   cf_add_incdir="$cf_top_incdir"
6363                 else
6364                   break
6365                 fi
6366           fi
6367         done
6368   done
6369 fi
6370
6371 fi
6372
6373 # Set definitions to allow ifdef'ing for ncurses.h
6374
6375 case $cf_cv_ncurses_header in # (vi
6376 *ncurses.h)
6377
6378 cat >>confdefs.h <<\EOF
6379 #define HAVE_NCURSES_H 1
6380 EOF
6381
6382         ;;
6383 esac
6384
6385 case $cf_cv_ncurses_header in # (vi
6386 ncurses/curses.h|ncurses/ncurses.h)
6387
6388 cat >>confdefs.h <<\EOF
6389 #define HAVE_NCURSES_NCURSES_H 1
6390 EOF
6391
6392         ;;
6393 ncursesw/curses.h|ncursesw/ncurses.h)
6394
6395 cat >>confdefs.h <<\EOF
6396 #define HAVE_NCURSESW_NCURSES_H 1
6397 EOF
6398
6399         ;;
6400 esac
6401
6402 echo "$as_me:6402: checking for terminfo header" >&5
6403 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6404 if test "${cf_cv_term_header+set}" = set; then
6405   echo $ECHO_N "(cached) $ECHO_C" >&6
6406 else
6407
6408 case ${cf_cv_ncurses_header} in #(vi
6409 */ncurses.h|*/ncursesw.h) #(vi
6410         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6411         ;;
6412 *)
6413         cf_term_header=term.h
6414         ;;
6415 esac
6416
6417 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6418 do
6419 cat >conftest.$ac_ext <<_ACEOF
6420 #line 6420 "configure"
6421 #include "confdefs.h"
6422 #include <stdio.h>
6423 #include <${cf_cv_ncurses_header:-curses.h}>
6424 #include <$cf_test>
6425
6426 int
6427 main ()
6428 {
6429 int x = auto_left_margin
6430   ;
6431   return 0;
6432 }
6433 _ACEOF
6434 rm -f conftest.$ac_objext
6435 if { (eval echo "$as_me:6435: \"$ac_compile\"") >&5
6436   (eval $ac_compile) 2>&5
6437   ac_status=$?
6438   echo "$as_me:6438: \$? = $ac_status" >&5
6439   (exit $ac_status); } &&
6440          { ac_try='test -s conftest.$ac_objext'
6441   { (eval echo "$as_me:6441: \"$ac_try\"") >&5
6442   (eval $ac_try) 2>&5
6443   ac_status=$?
6444   echo "$as_me:6444: \$? = $ac_status" >&5
6445   (exit $ac_status); }; }; then
6446
6447         cf_cv_term_header="$cf_test"
6448 else
6449   echo "$as_me: failed program was:" >&5
6450 cat conftest.$ac_ext >&5
6451
6452         cf_cv_term_header=unknown
6453
6454 fi
6455 rm -f conftest.$ac_objext conftest.$ac_ext
6456         test "$cf_cv_term_header" != unknown && break
6457 done
6458
6459 fi
6460 echo "$as_me:6460: result: $cf_cv_term_header" >&5
6461 echo "${ECHO_T}$cf_cv_term_header" >&6
6462
6463 # Set definitions to allow ifdef'ing to accommodate subdirectories
6464
6465 case $cf_cv_term_header in # (vi
6466 *term.h)
6467
6468 cat >>confdefs.h <<\EOF
6469 #define HAVE_TERM_H 1
6470 EOF
6471
6472         ;;
6473 esac
6474
6475 case $cf_cv_term_header in # (vi
6476 ncurses/term.h) #(vi
6477
6478 cat >>confdefs.h <<\EOF
6479 #define HAVE_NCURSES_TERM_H 1
6480 EOF
6481
6482         ;;
6483 ncursesw/term.h)
6484
6485 cat >>confdefs.h <<\EOF
6486 #define HAVE_NCURSESW_TERM_H 1
6487 EOF
6488
6489         ;;
6490 esac
6491
6492 # some applications need this, but should check for NCURSES_VERSION
6493
6494 cat >>confdefs.h <<\EOF
6495 #define NCURSES 1
6496 EOF
6497
6498 echo "$as_me:6498: checking for ncurses version" >&5
6499 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6500 if test "${cf_cv_ncurses_version+set}" = set; then
6501   echo $ECHO_N "(cached) $ECHO_C" >&6
6502 else
6503
6504         cf_cv_ncurses_version=no
6505         cf_tempfile=out$$
6506         rm -f $cf_tempfile
6507         if test "$cross_compiling" = yes; then
6508
6509         # This will not work if the preprocessor splits the line after the
6510         # Autoconf token.  The 'unproto' program does that.
6511         cat > conftest.$ac_ext <<EOF
6512 #include <${cf_cv_ncurses_header:-curses.h}>
6513 #undef Autoconf
6514 #ifdef NCURSES_VERSION
6515 Autoconf NCURSES_VERSION
6516 #else
6517 #ifdef __NCURSES_H
6518 Autoconf "old"
6519 #endif
6520 ;
6521 #endif
6522 EOF
6523         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6524         { (eval echo "$as_me:6524: \"$cf_try\"") >&5
6525   (eval $cf_try) 2>&5
6526   ac_status=$?
6527   echo "$as_me:6527: \$? = $ac_status" >&5
6528   (exit $ac_status); }
6529         if test -f conftest.out ; then
6530                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6531                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6532                 rm -f conftest.out
6533         fi
6534
6535 else
6536   cat >conftest.$ac_ext <<_ACEOF
6537 #line 6537 "configure"
6538 #include "confdefs.h"
6539
6540 #include <${cf_cv_ncurses_header:-curses.h}>
6541 #include <stdio.h>
6542 int main()
6543 {
6544         FILE *fp = fopen("$cf_tempfile", "w");
6545 #ifdef NCURSES_VERSION
6546 # ifdef NCURSES_VERSION_PATCH
6547         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6548 # else
6549         fprintf(fp, "%s\n", NCURSES_VERSION);
6550 # endif
6551 #else
6552 # ifdef __NCURSES_H
6553         fprintf(fp, "old\n");
6554 # else
6555         make an error
6556 # endif
6557 #endif
6558         ${cf_cv_main_return:-return}(0);
6559 }
6560 _ACEOF
6561 rm -f conftest$ac_exeext
6562 if { (eval echo "$as_me:6562: \"$ac_link\"") >&5
6563   (eval $ac_link) 2>&5
6564   ac_status=$?
6565   echo "$as_me:6565: \$? = $ac_status" >&5
6566   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6567   { (eval echo "$as_me:6567: \"$ac_try\"") >&5
6568   (eval $ac_try) 2>&5
6569   ac_status=$?
6570   echo "$as_me:6570: \$? = $ac_status" >&5
6571   (exit $ac_status); }; }; then
6572
6573         cf_cv_ncurses_version=`cat $cf_tempfile`
6574 else
6575   echo "$as_me: program exited with status $ac_status" >&5
6576 echo "$as_me: failed program was:" >&5
6577 cat conftest.$ac_ext >&5
6578 fi
6579 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6580 fi
6581         rm -f $cf_tempfile
6582
6583 fi
6584 echo "$as_me:6584: result: $cf_cv_ncurses_version" >&5
6585 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6586 test "$cf_cv_ncurses_version" = no ||
6587 cat >>confdefs.h <<\EOF
6588 #define NCURSES 1
6589 EOF
6590
6591 cf_nculib_root=ncurses
6592         # This works, except for the special case where we find gpm, but
6593         # ncurses is in a nonstandard location via $LIBS, and we really want
6594         # to link gpm.
6595 cf_ncurses_LIBS=""
6596 cf_ncurses_SAVE="$LIBS"
6597 echo "$as_me:6597: checking for Gpm_Open in -lgpm" >&5
6598 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6599 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6600   echo $ECHO_N "(cached) $ECHO_C" >&6
6601 else
6602   ac_check_lib_save_LIBS=$LIBS
6603 LIBS="-lgpm  $LIBS"
6604 cat >conftest.$ac_ext <<_ACEOF
6605 #line 6605 "configure"
6606 #include "confdefs.h"
6607
6608 /* Override any gcc2 internal prototype to avoid an error.  */
6609 #ifdef __cplusplus
6610 extern "C"
6611 #endif
6612 /* We use char because int might match the return type of a gcc2
6613    builtin and then its argument prototype would still apply.  */
6614 char Gpm_Open ();
6615 int
6616 main ()
6617 {
6618 Gpm_Open ();
6619   ;
6620   return 0;
6621 }
6622 _ACEOF
6623 rm -f conftest.$ac_objext conftest$ac_exeext
6624 if { (eval echo "$as_me:6624: \"$ac_link\"") >&5
6625   (eval $ac_link) 2>&5
6626   ac_status=$?
6627   echo "$as_me:6627: \$? = $ac_status" >&5
6628   (exit $ac_status); } &&
6629          { ac_try='test -s conftest$ac_exeext'
6630   { (eval echo "$as_me:6630: \"$ac_try\"") >&5
6631   (eval $ac_try) 2>&5
6632   ac_status=$?
6633   echo "$as_me:6633: \$? = $ac_status" >&5
6634   (exit $ac_status); }; }; then
6635   ac_cv_lib_gpm_Gpm_Open=yes
6636 else
6637   echo "$as_me: failed program was:" >&5
6638 cat conftest.$ac_ext >&5
6639 ac_cv_lib_gpm_Gpm_Open=no
6640 fi
6641 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6642 LIBS=$ac_check_lib_save_LIBS
6643 fi
6644 echo "$as_me:6644: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6645 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6646 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6647   echo "$as_me:6647: checking for initscr in -lgpm" >&5
6648 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6649 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6650   echo $ECHO_N "(cached) $ECHO_C" >&6
6651 else
6652   ac_check_lib_save_LIBS=$LIBS
6653 LIBS="-lgpm  $LIBS"
6654 cat >conftest.$ac_ext <<_ACEOF
6655 #line 6655 "configure"
6656 #include "confdefs.h"
6657
6658 /* Override any gcc2 internal prototype to avoid an error.  */
6659 #ifdef __cplusplus
6660 extern "C"
6661 #endif
6662 /* We use char because int might match the return type of a gcc2
6663    builtin and then its argument prototype would still apply.  */
6664 char initscr ();
6665 int
6666 main ()
6667 {
6668 initscr ();
6669   ;
6670   return 0;
6671 }
6672 _ACEOF
6673 rm -f conftest.$ac_objext conftest$ac_exeext
6674 if { (eval echo "$as_me:6674: \"$ac_link\"") >&5
6675   (eval $ac_link) 2>&5
6676   ac_status=$?
6677   echo "$as_me:6677: \$? = $ac_status" >&5
6678   (exit $ac_status); } &&
6679          { ac_try='test -s conftest$ac_exeext'
6680   { (eval echo "$as_me:6680: \"$ac_try\"") >&5
6681   (eval $ac_try) 2>&5
6682   ac_status=$?
6683   echo "$as_me:6683: \$? = $ac_status" >&5
6684   (exit $ac_status); }; }; then
6685   ac_cv_lib_gpm_initscr=yes
6686 else
6687   echo "$as_me: failed program was:" >&5
6688 cat conftest.$ac_ext >&5
6689 ac_cv_lib_gpm_initscr=no
6690 fi
6691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6692 LIBS=$ac_check_lib_save_LIBS
6693 fi
6694 echo "$as_me:6694: result: $ac_cv_lib_gpm_initscr" >&5
6695 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6696 if test $ac_cv_lib_gpm_initscr = yes; then
6697   LIBS="$cf_ncurses_SAVE"
6698 else
6699   cf_ncurses_LIBS="-lgpm"
6700 fi
6701
6702 fi
6703
6704 case $host_os in #(vi
6705 freebsd*)
6706         # This is only necessary if you are linking against an obsolete
6707         # version of ncurses (but it should do no harm, since it's static).
6708         if test "$cf_nculib_root" = ncurses ; then
6709                 echo "$as_me:6709: checking for tgoto in -lmytinfo" >&5
6710 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6711 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6712   echo $ECHO_N "(cached) $ECHO_C" >&6
6713 else
6714   ac_check_lib_save_LIBS=$LIBS
6715 LIBS="-lmytinfo  $LIBS"
6716 cat >conftest.$ac_ext <<_ACEOF
6717 #line 6717 "configure"
6718 #include "confdefs.h"
6719
6720 /* Override any gcc2 internal prototype to avoid an error.  */
6721 #ifdef __cplusplus
6722 extern "C"
6723 #endif
6724 /* We use char because int might match the return type of a gcc2
6725    builtin and then its argument prototype would still apply.  */
6726 char tgoto ();
6727 int
6728 main ()
6729 {
6730 tgoto ();
6731   ;
6732   return 0;
6733 }
6734 _ACEOF
6735 rm -f conftest.$ac_objext conftest$ac_exeext
6736 if { (eval echo "$as_me:6736: \"$ac_link\"") >&5
6737   (eval $ac_link) 2>&5
6738   ac_status=$?
6739   echo "$as_me:6739: \$? = $ac_status" >&5
6740   (exit $ac_status); } &&
6741          { ac_try='test -s conftest$ac_exeext'
6742   { (eval echo "$as_me:6742: \"$ac_try\"") >&5
6743   (eval $ac_try) 2>&5
6744   ac_status=$?
6745   echo "$as_me:6745: \$? = $ac_status" >&5
6746   (exit $ac_status); }; }; then
6747   ac_cv_lib_mytinfo_tgoto=yes
6748 else
6749   echo "$as_me: failed program was:" >&5
6750 cat conftest.$ac_ext >&5
6751 ac_cv_lib_mytinfo_tgoto=no
6752 fi
6753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6754 LIBS=$ac_check_lib_save_LIBS
6755 fi
6756 echo "$as_me:6756: result: $ac_cv_lib_mytinfo_tgoto" >&5
6757 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6758 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6759   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6760 fi
6761
6762         fi
6763         ;;
6764 esac
6765
6766 LIBS="$cf_ncurses_LIBS $LIBS"
6767
6768 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6769 then
6770         LIBS="-l$cf_nculib_root $LIBS"
6771 else
6772
6773         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6774         cf_libdir=""
6775         echo "$as_me:6775: checking for initscr" >&5
6776 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6777 if test "${ac_cv_func_initscr+set}" = set; then
6778   echo $ECHO_N "(cached) $ECHO_C" >&6
6779 else
6780   cat >conftest.$ac_ext <<_ACEOF
6781 #line 6781 "configure"
6782 #include "confdefs.h"
6783 /* System header to define __stub macros and hopefully few prototypes,
6784     which can conflict with char initscr (); below.  */
6785 #include <assert.h>
6786 /* Override any gcc2 internal prototype to avoid an error.  */
6787 #ifdef __cplusplus
6788 extern "C"
6789 #endif
6790 /* We use char because int might match the return type of a gcc2
6791    builtin and then its argument prototype would still apply.  */
6792 char initscr ();
6793 char (*f) ();
6794
6795 int
6796 main ()
6797 {
6798 /* The GNU C library defines this for functions which it implements
6799     to always fail with ENOSYS.  Some functions are actually named
6800     something starting with __ and the normal name is an alias.  */
6801 #if defined (__stub_initscr) || defined (__stub___initscr)
6802 choke me
6803 #else
6804 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6805 #endif
6806
6807   ;
6808   return 0;
6809 }
6810 _ACEOF
6811 rm -f conftest.$ac_objext conftest$ac_exeext
6812 if { (eval echo "$as_me:6812: \"$ac_link\"") >&5
6813   (eval $ac_link) 2>&5
6814   ac_status=$?
6815   echo "$as_me:6815: \$? = $ac_status" >&5
6816   (exit $ac_status); } &&
6817          { ac_try='test -s conftest$ac_exeext'
6818   { (eval echo "$as_me:6818: \"$ac_try\"") >&5
6819   (eval $ac_try) 2>&5
6820   ac_status=$?
6821   echo "$as_me:6821: \$? = $ac_status" >&5
6822   (exit $ac_status); }; }; then
6823   ac_cv_func_initscr=yes
6824 else
6825   echo "$as_me: failed program was:" >&5
6826 cat conftest.$ac_ext >&5
6827 ac_cv_func_initscr=no
6828 fi
6829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6830 fi
6831 echo "$as_me:6831: result: $ac_cv_func_initscr" >&5
6832 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6833 if test $ac_cv_func_initscr = yes; then
6834   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6835 else
6836
6837                 cf_save_LIBS="$LIBS"
6838                 echo "$as_me:6838: checking for initscr in -l$cf_nculib_root" >&5
6839 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6840                 LIBS="-l$cf_nculib_root $LIBS"
6841                 cat >conftest.$ac_ext <<_ACEOF
6842 #line 6842 "configure"
6843 #include "confdefs.h"
6844 #include <${cf_cv_ncurses_header:-curses.h}>
6845 int
6846 main ()
6847 {
6848 initscr()
6849   ;
6850   return 0;
6851 }
6852 _ACEOF
6853 rm -f conftest.$ac_objext conftest$ac_exeext
6854 if { (eval echo "$as_me:6854: \"$ac_link\"") >&5
6855   (eval $ac_link) 2>&5
6856   ac_status=$?
6857   echo "$as_me:6857: \$? = $ac_status" >&5
6858   (exit $ac_status); } &&
6859          { ac_try='test -s conftest$ac_exeext'
6860   { (eval echo "$as_me:6860: \"$ac_try\"") >&5
6861   (eval $ac_try) 2>&5
6862   ac_status=$?
6863   echo "$as_me:6863: \$? = $ac_status" >&5
6864   (exit $ac_status); }; }; then
6865   echo "$as_me:6865: result: yes" >&5
6866 echo "${ECHO_T}yes" >&6
6867                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6868
6869 else
6870   echo "$as_me: failed program was:" >&5
6871 cat conftest.$ac_ext >&5
6872 echo "$as_me:6872: result: no" >&5
6873 echo "${ECHO_T}no" >&6
6874
6875 cf_search=
6876 cf_library_path_list=""
6877 if test -n "${LDFLAGS}${LIBS}" ; then
6878         for cf_library_path in $LDFLAGS $LIBS
6879         do
6880                 case $cf_library_path in #(vi
6881                 -L*)
6882                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6883
6884 test "x$cf_library_path" != "xNONE" && \
6885 test -d "$cf_library_path" && \
6886  {
6887         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6888         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6889         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6890         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6891         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6892         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"
6893 }
6894
6895                         cf_library_path_list="$cf_library_path_list $cf_search"
6896                         ;;
6897                 esac
6898         done
6899 fi
6900
6901 cf_search=
6902
6903 test "x/usr" != "x$prefix" && \
6904 test -d "/usr" && \
6905 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
6906         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
6907         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6908         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
6909         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6910         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
6911         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6912 }
6913
6914 test "x$prefix" != "xNONE" && \
6915 test -d "$prefix" && \
6916  {
6917         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6918         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6919         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6920         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6921         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6922         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6923 }
6924
6925 test "x/usr/local" != "x$prefix" && \
6926 test -d "/usr/local" && \
6927 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
6928         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6929         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6930         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6931         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6932         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6933         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6934 }
6935
6936 test "x/opt" != "x$prefix" && \
6937 test -d "/opt" && \
6938 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
6939         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6940         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6941         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
6942         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6943         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
6944         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6945 }
6946
6947 test "x$HOME" != "x$prefix" && \
6948 test -d "$HOME" && \
6949 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
6950         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
6951         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6952         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
6953         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
6954         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
6955         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
6956 }
6957
6958 cf_search="$cf_library_path_list $cf_search"
6959
6960                         for cf_libdir in $cf_search
6961                         do
6962                                 echo "$as_me:6962: checking for -l$cf_nculib_root in $cf_libdir" >&5
6963 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6964                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6965                                 cat >conftest.$ac_ext <<_ACEOF
6966 #line 6966 "configure"
6967 #include "confdefs.h"
6968 #include <${cf_cv_ncurses_header:-curses.h}>
6969 int
6970 main ()
6971 {
6972 initscr()
6973   ;
6974   return 0;
6975 }
6976 _ACEOF
6977 rm -f conftest.$ac_objext conftest$ac_exeext
6978 if { (eval echo "$as_me:6978: \"$ac_link\"") >&5
6979   (eval $ac_link) 2>&5
6980   ac_status=$?
6981   echo "$as_me:6981: \$? = $ac_status" >&5
6982   (exit $ac_status); } &&
6983          { ac_try='test -s conftest$ac_exeext'
6984   { (eval echo "$as_me:6984: \"$ac_try\"") >&5
6985   (eval $ac_try) 2>&5
6986   ac_status=$?
6987   echo "$as_me:6987: \$? = $ac_status" >&5
6988   (exit $ac_status); }; }; then
6989   echo "$as_me:6989: result: yes" >&5
6990 echo "${ECHO_T}yes" >&6
6991                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6992                                          break
6993 else
6994   echo "$as_me: failed program was:" >&5
6995 cat conftest.$ac_ext >&5
6996 echo "$as_me:6996: result: no" >&5
6997 echo "${ECHO_T}no" >&6
6998                                          LIBS="$cf_save_LIBS"
6999 fi
7000 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7001                         done
7002
7003 fi
7004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7005
7006 fi
7007
7008 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7009
7010 if test $cf_found_library = no ; then
7011         { { echo "$as_me:7011: error: Cannot link $cf_nculib_root library" >&5
7012 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7013    { (exit 1); exit 1; }; }
7014 fi
7015
7016 fi
7017
7018 if test -n "$cf_ncurses_LIBS" ; then
7019         echo "$as_me:7019: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7020 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7021         cf_ncurses_SAVE="$LIBS"
7022         for p in $cf_ncurses_LIBS ; do
7023                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7024                 if test "$q" != "$LIBS" ; then
7025                         LIBS="$q"
7026                 fi
7027         done
7028         cat >conftest.$ac_ext <<_ACEOF
7029 #line 7029 "configure"
7030 #include "confdefs.h"
7031 #include <${cf_cv_ncurses_header:-curses.h}>
7032 int
7033 main ()
7034 {
7035 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7036   ;
7037   return 0;
7038 }
7039 _ACEOF
7040 rm -f conftest.$ac_objext conftest$ac_exeext
7041 if { (eval echo "$as_me:7041: \"$ac_link\"") >&5
7042   (eval $ac_link) 2>&5
7043   ac_status=$?
7044   echo "$as_me:7044: \$? = $ac_status" >&5
7045   (exit $ac_status); } &&
7046          { ac_try='test -s conftest$ac_exeext'
7047   { (eval echo "$as_me:7047: \"$ac_try\"") >&5
7048   (eval $ac_try) 2>&5
7049   ac_status=$?
7050   echo "$as_me:7050: \$? = $ac_status" >&5
7051   (exit $ac_status); }; }; then
7052   echo "$as_me:7052: result: yes" >&5
7053 echo "${ECHO_T}yes" >&6
7054 else
7055   echo "$as_me: failed program was:" >&5
7056 cat conftest.$ac_ext >&5
7057 echo "$as_me:7057: result: no" >&5
7058 echo "${ECHO_T}no" >&6
7059                  LIBS="$cf_ncurses_SAVE"
7060 fi
7061 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7062 fi
7063
7064 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7065
7066 cat >>confdefs.h <<EOF
7067 #define $cf_nculib_ROOT 1
7068 EOF
7069
7070 fi
7071
7072 fi
7073
7074 if test "$NCURSES_CONFIG" != none ; then
7075
7076 cf_version=`$NCURSES_CONFIG --version`
7077
7078 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7079 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7080 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7081
7082 # ABI version is not available from headers
7083 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7084
7085 else
7086
7087 for cf_name in MAJOR MINOR PATCH
7088 do
7089 cat >conftest.$ac_ext <<CF_EOF
7090 #include <${cf_cv_ncurses_header:-curses.h}>
7091 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7092 CF_EOF
7093         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7094         { (eval echo "$as_me:7094: \"$cf_try\"") >&5
7095   (eval $cf_try) 2>&5
7096   ac_status=$?
7097   echo "$as_me:7097: \$? = $ac_status" >&5
7098   (exit $ac_status); }
7099         if test -f conftest.out ; then
7100                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7101                 eval NCURSES_$cf_name=\"$cf_result\"
7102                 # cat conftest.$ac_ext
7103                 # cat conftest.out
7104         fi
7105 done
7106
7107 cf_cv_abi_version=${NCURSES_MAJOR}
7108
7109 fi
7110
7111 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7112
7113 cf_cv_timestamp=`date`
7114
7115 echo "$as_me:7115: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7116 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7117
7118 echo "$as_me:7118: checking if you want to have a library-prefix" >&5
7119 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
7120
7121 # Check whether --with-lib-prefix or --without-lib-prefix was given.
7122 if test "${with_lib_prefix+set}" = set; then
7123   withval="$with_lib_prefix"
7124   with_lib_prefix=$withval
7125 else
7126   with_lib_prefix=auto
7127 fi;
7128 echo "$as_me:7128: result: $with_lib_prefix" >&5
7129 echo "${ECHO_T}$with_lib_prefix" >&6
7130
7131 if test $with_lib_prefix = auto
7132 then
7133
7134         case $cf_cv_system_name in #(vi
7135         OS/2*|os2*) #(vi
7136         LIB_PREFIX=''
7137         ;;
7138         *)      LIB_PREFIX='lib'
7139         ;;
7140         esac
7141 cf_prefix=$LIB_PREFIX
7142
7143 elif test $with_lib_prefix = no
7144 then
7145         LIB_PREFIX=
7146 else
7147         LIB_PREFIX=$with_lib_prefix
7148 fi
7149
7150 LIB_SUFFIX=
7151
7152 ###############################################################################
7153
7154 if test X"$CC_G_OPT" = X"" ; then
7155         CC_G_OPT='-g'
7156         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7157 fi
7158
7159 echo "$as_me:7159: checking for default loader flags" >&5
7160 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7161 case $DFT_LWR_MODEL in
7162 normal)  LD_MODEL=''   ;;
7163 debug)   LD_MODEL=$CC_G_OPT ;;
7164 profile) LD_MODEL='-pg';;
7165 shared)  LD_MODEL=''   ;;
7166 esac
7167 echo "$as_me:7167: result: $LD_MODEL" >&5
7168 echo "${ECHO_T}$LD_MODEL" >&6
7169
7170 LD_RPATH_OPT=
7171 echo "$as_me:7171: checking for an rpath option" >&5
7172 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7173 case $cf_cv_system_name in #(vi
7174 irix*) #(vi
7175         if test "$GCC" = yes; then
7176                 LD_RPATH_OPT="-Wl,-rpath,"
7177         else
7178                 LD_RPATH_OPT="-rpath "
7179         fi
7180         ;;
7181 linux*|gnu*|k*bsd*-gnu) #(vi
7182         LD_RPATH_OPT="-Wl,-rpath,"
7183         ;;
7184 openbsd[2-9].*|mirbsd*) #(vi
7185         LD_RPATH_OPT="-Wl,-rpath,"
7186         ;;
7187 dragonfly*|freebsd*) #(vi
7188         LD_RPATH_OPT="-rpath "
7189         ;;
7190 netbsd*) #(vi
7191         LD_RPATH_OPT="-Wl,-rpath,"
7192         ;;
7193 osf*|mls+*) #(vi
7194         LD_RPATH_OPT="-rpath "
7195         ;;
7196 solaris2*) #(vi
7197         LD_RPATH_OPT="-R"
7198         ;;
7199 *)
7200         ;;
7201 esac
7202 echo "$as_me:7202: result: $LD_RPATH_OPT" >&5
7203 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7204
7205 case "x$LD_RPATH_OPT" in #(vi
7206 x-R*)
7207         echo "$as_me:7207: checking if we need a space after rpath option" >&5
7208 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7209         cf_save_LIBS="$LIBS"
7210         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7211         cat >conftest.$ac_ext <<_ACEOF
7212 #line 7212 "configure"
7213 #include "confdefs.h"
7214
7215 int
7216 main ()
7217 {
7218
7219   ;
7220   return 0;
7221 }
7222 _ACEOF
7223 rm -f conftest.$ac_objext conftest$ac_exeext
7224 if { (eval echo "$as_me:7224: \"$ac_link\"") >&5
7225   (eval $ac_link) 2>&5
7226   ac_status=$?
7227   echo "$as_me:7227: \$? = $ac_status" >&5
7228   (exit $ac_status); } &&
7229          { ac_try='test -s conftest$ac_exeext'
7230   { (eval echo "$as_me:7230: \"$ac_try\"") >&5
7231   (eval $ac_try) 2>&5
7232   ac_status=$?
7233   echo "$as_me:7233: \$? = $ac_status" >&5
7234   (exit $ac_status); }; }; then
7235   cf_rpath_space=no
7236 else
7237   echo "$as_me: failed program was:" >&5
7238 cat conftest.$ac_ext >&5
7239 cf_rpath_space=yes
7240 fi
7241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7242         LIBS="$cf_save_LIBS"
7243         echo "$as_me:7243: result: $cf_rpath_space" >&5
7244 echo "${ECHO_T}$cf_rpath_space" >&6
7245         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7246         ;;
7247 esac
7248
7249         RM_SHARED_OPTS=
7250         LOCAL_LDFLAGS=
7251         LOCAL_LDFLAGS2=
7252         LD_SHARED_OPTS=
7253         INSTALL_LIB="-m 644"
7254         : ${rel_builddir:=.}
7255
7256         shlibdir=$libdir
7257
7258         MAKE_DLLS="#"
7259
7260         cf_cv_do_symlinks=no
7261         cf_ld_rpath_opt=
7262         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7263
7264         echo "$as_me:7264: checking if release/abi version should be used for shared libs" >&5
7265 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7266
7267 # Check whether --with-shlib-version or --without-shlib-version was given.
7268 if test "${with_shlib_version+set}" = set; then
7269   withval="$with_shlib_version"
7270   test -z "$withval" && withval=auto
7271         case $withval in #(vi
7272         yes) #(vi
7273                 cf_cv_shlib_version=auto
7274                 ;;
7275         rel|abi|auto|no) #(vi
7276                 cf_cv_shlib_version=$withval
7277                 ;;
7278         *)
7279                 { { echo "$as_me:7279: error: option value must be one of: rel, abi, auto or no" >&5
7280 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7281    { (exit 1); exit 1; }; }
7282                 ;;
7283         esac
7284
7285 else
7286   cf_cv_shlib_version=auto
7287 fi;
7288         echo "$as_me:7288: result: $cf_cv_shlib_version" >&5
7289 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7290
7291         cf_cv_rm_so_locs=no
7292         cf_try_cflags=
7293
7294         # Some less-capable ports of gcc support only -fpic
7295         CC_SHARED_OPTS=
7296         if test "$GCC" = yes
7297         then
7298                 echo "$as_me:7298: checking which $CC option to use" >&5
7299 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7300                 cf_save_CFLAGS="$CFLAGS"
7301                 for CC_SHARED_OPTS in -fPIC -fpic ''
7302                 do
7303                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7304                         cat >conftest.$ac_ext <<_ACEOF
7305 #line 7305 "configure"
7306 #include "confdefs.h"
7307 #include <stdio.h>
7308 int
7309 main ()
7310 {
7311 int x = 1
7312   ;
7313   return 0;
7314 }
7315 _ACEOF
7316 rm -f conftest.$ac_objext
7317 if { (eval echo "$as_me:7317: \"$ac_compile\"") >&5
7318   (eval $ac_compile) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit $ac_status); } &&
7322          { ac_try='test -s conftest.$ac_objext'
7323   { (eval echo "$as_me:7323: \"$ac_try\"") >&5
7324   (eval $ac_try) 2>&5
7325   ac_status=$?
7326   echo "$as_me:7326: \$? = $ac_status" >&5
7327   (exit $ac_status); }; }; then
7328   break
7329 else
7330   echo "$as_me: failed program was:" >&5
7331 cat conftest.$ac_ext >&5
7332 fi
7333 rm -f conftest.$ac_objext conftest.$ac_ext
7334                 done
7335                 echo "$as_me:7335: result: $CC_SHARED_OPTS" >&5
7336 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7337                 CFLAGS="$cf_save_CFLAGS"
7338         fi
7339
7340         cf_cv_shlib_version_infix=no
7341
7342         case $cf_cv_system_name in #(vi
7343         aix4.3-9*|aix[5-7]*) #(vi
7344                 if test "$GCC" = yes; then
7345                         CC_SHARED_OPTS=
7346                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7347                 else
7348                         # CC_SHARED_OPTS='-qpic=large -G'
7349                         # perhaps "-bM:SRE -bnoentry -bexpall"
7350                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7351                 fi
7352                 ;;
7353         beos*) #(vi
7354                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7355                 ;;
7356         cygwin*) #(vi
7357                 CC_SHARED_OPTS=
7358                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7359                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7360                 cf_cv_shlib_version=cygdll
7361                 cf_cv_shlib_version_infix=cygdll
7362                 shlibdir=$bindir
7363                 MAKE_DLLS=
7364                 cat >mk_shared_lib.sh <<-CF_EOF
7365                 #!/bin/sh
7366                 SHARED_LIB=\$1
7367                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7368                 shift
7369                 cat <<-EOF
7370                 Linking shared library
7371                 ** SHARED_LIB \$SHARED_LIB
7372                 ** IMPORT_LIB \$IMPORT_LIB
7373 EOF
7374                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7375 CF_EOF
7376                 chmod +x mk_shared_lib.sh
7377                 ;;
7378         msys*) #(vi
7379                 CC_SHARED_OPTS=
7380                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7381                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7382                 cf_cv_shlib_version=msysdll
7383                 cf_cv_shlib_version_infix=msysdll
7384                 shlibdir=$bindir
7385                 MAKE_DLLS=
7386                 cat >mk_shared_lib.sh <<-CF_EOF
7387                 #!/bin/sh
7388                 SHARED_LIB=\$1
7389                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7390                 shift
7391                 cat <<-EOF
7392                 Linking shared library
7393                 ** SHARED_LIB \$SHARED_LIB
7394                 ** IMPORT_LIB \$IMPORT_LIB
7395 EOF
7396                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7397 CF_EOF
7398                 chmod +x mk_shared_lib.sh
7399                 ;;
7400         darwin*) #(vi
7401                 cf_try_cflags="no-cpp-precomp"
7402                 CC_SHARED_OPTS="-dynamic"
7403                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7404                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7405                 cf_cv_shlib_version_infix=yes
7406                 echo "$as_me:7406: checking if ld -search_paths_first works" >&5
7407 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7408 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7409   echo $ECHO_N "(cached) $ECHO_C" >&6
7410 else
7411
7412                         cf_save_LDFLAGS=$LDFLAGS
7413                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7414                         cat >conftest.$ac_ext <<_ACEOF
7415 #line 7415 "configure"
7416 #include "confdefs.h"
7417
7418 int
7419 main ()
7420 {
7421 int i;
7422   ;
7423   return 0;
7424 }
7425 _ACEOF
7426 rm -f conftest.$ac_objext conftest$ac_exeext
7427 if { (eval echo "$as_me:7427: \"$ac_link\"") >&5
7428   (eval $ac_link) 2>&5
7429   ac_status=$?
7430   echo "$as_me:7430: \$? = $ac_status" >&5
7431   (exit $ac_status); } &&
7432          { ac_try='test -s conftest$ac_exeext'
7433   { (eval echo "$as_me:7433: \"$ac_try\"") >&5
7434   (eval $ac_try) 2>&5
7435   ac_status=$?
7436   echo "$as_me:7436: \$? = $ac_status" >&5
7437   (exit $ac_status); }; }; then
7438   cf_cv_ldflags_search_paths_first=yes
7439 else
7440   echo "$as_me: failed program was:" >&5
7441 cat conftest.$ac_ext >&5
7442 cf_cv_ldflags_search_paths_first=no
7443 fi
7444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7445                                 LDFLAGS=$cf_save_LDFLAGS
7446 fi
7447 echo "$as_me:7447: result: $cf_cv_ldflags_search_paths_first" >&5
7448 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7449                 if test $cf_cv_ldflags_search_paths_first = yes; then
7450                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7451                 fi
7452                 ;;
7453         hpux[7-8]*) #(vi
7454                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
7455                 if test "$GCC" != yes; then
7456                         CC_SHARED_OPTS='+Z'
7457                 fi
7458                 MK_SHARED_LIB='${LD} -b -o $@'
7459                 INSTALL_LIB="-m 555"
7460                 ;;
7461         hpux*) #(vi
7462                 # (tested with gcc 2.7.2 -- I don't have c89)
7463                 if test "$GCC" = yes; then
7464                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7465                 else
7466                         CC_SHARED_OPTS='+Z'
7467                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7468                 fi
7469                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7470                 # HP-UX shared libraries must be executable, and should be
7471                 # readonly to exploit a quirk in the memory manager.
7472                 INSTALL_LIB="-m 555"
7473                 ;;
7474         interix*)
7475                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7476                 if test "$cf_cv_shlib_version" = rel; then
7477                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
7478                 else
7479                         cf_shared_soname='`basename `'
7480                 fi
7481                 CC_SHARED_OPTS=
7482                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
7483                 ;;
7484         irix*) #(vi
7485                 if test "$cf_cv_enable_rpath" = yes ; then
7486                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7487                 fi
7488                 # tested with IRIX 5.2 and 'cc'.
7489                 if test "$GCC" != yes; then
7490                         CC_SHARED_OPTS='-KPIC'
7491                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7492                 else
7493                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7494                 fi
7495                 cf_cv_rm_so_locs=yes
7496                 ;;
7497         linux*|gnu*|k*bsd*-gnu) #(vi
7498                 if test "$DFT_LWR_MODEL" = "shared" ; then
7499                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7500                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7501                 fi
7502                 if test "$cf_cv_enable_rpath" = yes ; then
7503                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7504                 fi
7505
7506         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7507         if test "$cf_cv_shlib_version" = rel; then
7508                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7509         else
7510                 cf_cv_shared_soname='`basename $@`'
7511         fi
7512
7513                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7514                 ;;
7515         mingw*) #(vi
7516                 cf_cv_shlib_version=mingw
7517                 cf_cv_shlib_version_infix=mingw
7518                 shlibdir=$bindir
7519                 MAKE_DLLS=
7520                 if test "$DFT_LWR_MODEL" = "shared" ; then
7521                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
7522                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7523                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
7524                 fi
7525                 CC_SHARED_OPTS=
7526                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7527                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7528                 cat >mk_shared_lib.sh <<-CF_EOF
7529                 #!/bin/sh
7530                 SHARED_LIB=\$1
7531                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
7532                 shift
7533                 cat <<-EOF
7534                 Linking shared library
7535                 ** SHARED_LIB \$SHARED_LIB
7536                 ** IMPORT_LIB \$IMPORT_LIB
7537 EOF
7538                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7539 CF_EOF
7540                 chmod +x mk_shared_lib.sh
7541                 ;;
7542         openbsd[2-9].*|mirbsd*) #(vi
7543                 if test "$DFT_LWR_MODEL" = "shared" ; then
7544                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7545                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7546                 fi
7547                 if test "$cf_cv_enable_rpath" = yes ; then
7548                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7549                 fi
7550                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7551
7552         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7553         if test "$cf_cv_shlib_version" = rel; then
7554                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7555         else
7556                 cf_cv_shared_soname='`basename $@`'
7557         fi
7558
7559                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7560                 ;;
7561         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7562                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7563                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7564                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7565                 ;;
7566         dragonfly*|freebsd*) #(vi
7567                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7568                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7569                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7570                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7571                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7572                 fi
7573
7574         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7575         if test "$cf_cv_shlib_version" = rel; then
7576                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7577         else
7578                 cf_cv_shared_soname='`basename $@`'
7579         fi
7580
7581                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7582                 ;;
7583         netbsd*) #(vi
7584                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7585                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7586                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7587                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7588                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7589                         if test "$cf_cv_shlib_version" = auto; then
7590                         if test -f /usr/libexec/ld.elf_so; then
7591                                 cf_cv_shlib_version=abi
7592                         else
7593                                 cf_cv_shlib_version=rel
7594                         fi
7595                         fi
7596
7597         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7598         if test "$cf_cv_shlib_version" = rel; then
7599                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7600         else
7601                 cf_cv_shared_soname='`basename $@`'
7602         fi
7603
7604                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7605                 else
7606                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
7607                 fi
7608                 ;;
7609         osf*|mls+*) #(vi
7610                 # tested with OSF/1 V3.2 and 'cc'
7611                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7612                 # link with shared libs).
7613                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7614                 case $host_os in #(vi
7615                 osf4*)
7616                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7617                         ;;
7618                 esac
7619                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7620                 if test "$DFT_LWR_MODEL" = "shared" ; then
7621                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7622                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7623                 fi
7624                 cf_cv_rm_so_locs=yes
7625                 ;;
7626         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7627                 # tested with osr5.0.5
7628                 if test "$GCC" != yes; then
7629                         CC_SHARED_OPTS='-belf -KPIC'
7630                 fi
7631                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7632                 if test "$cf_cv_enable_rpath" = yes ; then
7633                         # only way is to set LD_RUN_PATH but no switch for it
7634                         RUN_PATH=$libdir
7635                 fi
7636                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7637                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7638                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7639                 ;;
7640         sunos4*) #(vi
7641                 # tested with SunOS 4.1.1 and gcc 2.7.0
7642                 if test "$GCC" != yes; then
7643                         CC_SHARED_OPTS='-KPIC'
7644                 fi
7645                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7646                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7647                 ;;
7648         solaris2*) #(vi
7649                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7650                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7651                 if test "$DFT_LWR_MODEL" = "shared" ; then
7652                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7653                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7654                 fi
7655                 if test "$cf_cv_enable_rpath" = yes ; then
7656                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7657                 fi
7658
7659         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7660         if test "$cf_cv_shlib_version" = rel; then
7661                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7662         else
7663                 cf_cv_shared_soname='`basename $@`'
7664         fi
7665
7666                 if test "$GCC" != yes; then
7667                         cf_save_CFLAGS="$CFLAGS"
7668                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7669                         do
7670                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7671                                 cat >conftest.$ac_ext <<_ACEOF
7672 #line 7672 "configure"
7673 #include "confdefs.h"
7674 #include <stdio.h>
7675 int
7676 main ()
7677 {
7678 printf("Hello\n");
7679   ;
7680   return 0;
7681 }
7682 _ACEOF
7683 rm -f conftest.$ac_objext
7684 if { (eval echo "$as_me:7684: \"$ac_compile\"") >&5
7685   (eval $ac_compile) 2>&5
7686   ac_status=$?
7687   echo "$as_me:7687: \$? = $ac_status" >&5
7688   (exit $ac_status); } &&
7689          { ac_try='test -s conftest.$ac_objext'
7690   { (eval echo "$as_me:7690: \"$ac_try\"") >&5
7691   (eval $ac_try) 2>&5
7692   ac_status=$?
7693   echo "$as_me:7693: \$? = $ac_status" >&5
7694   (exit $ac_status); }; }; then
7695   break
7696 else
7697   echo "$as_me: failed program was:" >&5
7698 cat conftest.$ac_ext >&5
7699 fi
7700 rm -f conftest.$ac_objext conftest.$ac_ext
7701                         done
7702                         CFLAGS="$cf_save_CFLAGS"
7703                         CC_SHARED_OPTS=$cf_shared_opts
7704                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7705                 else
7706                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7707                 fi
7708                 ;;
7709         sysv5uw7*|unix_sv*) #(vi
7710                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7711                 if test "$GCC" != yes; then
7712                         CC_SHARED_OPTS='-KPIC'
7713                 fi
7714                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7715                 ;;
7716         *)
7717                 CC_SHARED_OPTS='unknown'
7718                 MK_SHARED_LIB='echo unknown'
7719                 ;;
7720         esac
7721
7722         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7723         case "$cf_cv_shlib_version" in #(vi
7724         rel|abi)
7725                 case "$MK_SHARED_LIB" in #(vi
7726                 *'-o $@') #(vi
7727                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7728                         ;;
7729                 *)
7730                         { echo "$as_me:7730: WARNING: ignored --with-shlib-version" >&5
7731 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7732                         ;;
7733                 esac
7734                 ;;
7735         esac
7736
7737         if test -n "$cf_try_cflags"
7738         then
7739 cat > conftest.$ac_ext <<EOF
7740 #line 7740 "${as_me:-configure}"
7741 #include <stdio.h>
7742 int main(int argc, char *argv[])
7743 {
7744         printf("hello\n");
7745         return (argv[argc-1] == 0) ;
7746 }
7747 EOF
7748                 cf_save_CFLAGS="$CFLAGS"
7749                 for cf_opt in $cf_try_cflags
7750                 do
7751                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7752                         echo "$as_me:7752: checking if CFLAGS option -$cf_opt works" >&5
7753 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7754                         if { (eval echo "$as_me:7754: \"$ac_compile\"") >&5
7755   (eval $ac_compile) 2>&5
7756   ac_status=$?
7757   echo "$as_me:7757: \$? = $ac_status" >&5
7758   (exit $ac_status); }; then
7759                                 echo "$as_me:7759: result: yes" >&5
7760 echo "${ECHO_T}yes" >&6
7761                                 cf_save_CFLAGS="$CFLAGS"
7762                         else
7763                                 echo "$as_me:7763: result: no" >&5
7764 echo "${ECHO_T}no" >&6
7765                         fi
7766                 done
7767                 CFLAGS="$cf_save_CFLAGS"
7768         fi
7769
7770         # RPATH_LIST is a colon-separated list of directories
7771         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7772         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7773
7774         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7775
7776         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7777
7778 echo "${as_me:-configure}:7778: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7779
7780         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7781
7782 echo "${as_me:-configure}:7782: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7783
7784 # The test/sample programs in the original tree link using rpath option.
7785 # Make it optional for packagers.
7786 if test -n "$LOCAL_LDFLAGS"
7787 then
7788         echo "$as_me:7788: checking if you want to link sample programs with rpath option" >&5
7789 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
7790
7791 # Check whether --enable-rpath-link or --disable-rpath-link was given.
7792 if test "${enable_rpath_link+set}" = set; then
7793   enableval="$enable_rpath_link"
7794   with_rpath_link=$enableval
7795 else
7796   with_rpath_link=yes
7797 fi;
7798         echo "$as_me:7798: result: $with_rpath_link" >&5
7799 echo "${ECHO_T}$with_rpath_link" >&6
7800         if test "$with_rpath_link" = no
7801         then
7802                 LOCAL_LDFLAGS=
7803                 LOCAL_LDFLAGS2=
7804         fi
7805 fi
7806
7807 ###############################################################################
7808
7809 ###   use option --enable-broken-linker to force on use of broken-linker support
7810 echo "$as_me:7810: checking if you want broken-linker support code" >&5
7811 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7812
7813 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7814 if test "${enable_broken_linker+set}" = set; then
7815   enableval="$enable_broken_linker"
7816   with_broken_linker=$enableval
7817 else
7818   with_broken_linker=${BROKEN_LINKER:-no}
7819 fi;
7820 echo "$as_me:7820: result: $with_broken_linker" >&5
7821 echo "${ECHO_T}$with_broken_linker" >&6
7822
7823 BROKEN_LINKER=0
7824 if test "$with_broken_linker" = yes ; then
7825         cat >>confdefs.h <<\EOF
7826 #define BROKEN_LINKER 1
7827 EOF
7828
7829         BROKEN_LINKER=1
7830 elif test "$DFT_LWR_MODEL" = shared ; then
7831         case $cf_cv_system_name in #(vi
7832         cygwin*)
7833                 cat >>confdefs.h <<\EOF
7834 #define BROKEN_LINKER 1
7835 EOF
7836
7837                 BROKEN_LINKER=1
7838                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7839
7840 echo "${as_me:-configure}:7840: testing cygwin linker is broken anyway ..." 1>&5
7841
7842                 ;;
7843         esac
7844 fi
7845
7846 # Check to define _XOPEN_SOURCE "automatically"
7847
7848 cf_XOPEN_SOURCE=500
7849 cf_POSIX_C_SOURCE=199506L
7850 cf_xopen_source=
7851
7852 case $host_os in #(vi
7853 aix[4-7]*) #(vi
7854         cf_xopen_source="-D_ALL_SOURCE"
7855         ;;
7856 cygwin|msys) #(vi
7857         cf_XOPEN_SOURCE=600
7858         ;;
7859 darwin[0-8].*) #(vi
7860         cf_xopen_source="-D_APPLE_C_SOURCE"
7861         ;;
7862 darwin*) #(vi
7863         cf_xopen_source="-D_DARWIN_C_SOURCE"
7864         cf_XOPEN_SOURCE=
7865         ;;
7866 freebsd*|dragonfly*) #(vi
7867         # 5.x headers associate
7868         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7869         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7870         cf_POSIX_C_SOURCE=200112L
7871         cf_XOPEN_SOURCE=600
7872         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7873         ;;
7874 hpux11*) #(vi
7875         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7876         ;;
7877 hpux*) #(vi
7878         cf_xopen_source="-D_HPUX_SOURCE"
7879         ;;
7880 irix[56].*) #(vi
7881         cf_xopen_source="-D_SGI_SOURCE"
7882         cf_XOPEN_SOURCE=
7883         ;;
7884 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7885
7886 echo "$as_me:7886: checking if we must define _GNU_SOURCE" >&5
7887 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7888 if test "${cf_cv_gnu_source+set}" = set; then
7889   echo $ECHO_N "(cached) $ECHO_C" >&6
7890 else
7891
7892 cat >conftest.$ac_ext <<_ACEOF
7893 #line 7893 "configure"
7894 #include "confdefs.h"
7895 #include <sys/types.h>
7896 int
7897 main ()
7898 {
7899
7900 #ifndef _XOPEN_SOURCE
7901 make an error
7902 #endif
7903   ;
7904   return 0;
7905 }
7906 _ACEOF
7907 rm -f conftest.$ac_objext
7908 if { (eval echo "$as_me:7908: \"$ac_compile\"") >&5
7909   (eval $ac_compile) 2>&5
7910   ac_status=$?
7911   echo "$as_me:7911: \$? = $ac_status" >&5
7912   (exit $ac_status); } &&
7913          { ac_try='test -s conftest.$ac_objext'
7914   { (eval echo "$as_me:7914: \"$ac_try\"") >&5
7915   (eval $ac_try) 2>&5
7916   ac_status=$?
7917   echo "$as_me:7917: \$? = $ac_status" >&5
7918   (exit $ac_status); }; }; then
7919   cf_cv_gnu_source=no
7920 else
7921   echo "$as_me: failed program was:" >&5
7922 cat conftest.$ac_ext >&5
7923 cf_save="$CPPFLAGS"
7924          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7925          cat >conftest.$ac_ext <<_ACEOF
7926 #line 7926 "configure"
7927 #include "confdefs.h"
7928 #include <sys/types.h>
7929 int
7930 main ()
7931 {
7932
7933 #ifdef _XOPEN_SOURCE
7934 make an error
7935 #endif
7936   ;
7937   return 0;
7938 }
7939 _ACEOF
7940 rm -f conftest.$ac_objext
7941 if { (eval echo "$as_me:7941: \"$ac_compile\"") >&5
7942   (eval $ac_compile) 2>&5
7943   ac_status=$?
7944   echo "$as_me:7944: \$? = $ac_status" >&5
7945   (exit $ac_status); } &&
7946          { ac_try='test -s conftest.$ac_objext'
7947   { (eval echo "$as_me:7947: \"$ac_try\"") >&5
7948   (eval $ac_try) 2>&5
7949   ac_status=$?
7950   echo "$as_me:7950: \$? = $ac_status" >&5
7951   (exit $ac_status); }; }; then
7952   cf_cv_gnu_source=no
7953 else
7954   echo "$as_me: failed program was:" >&5
7955 cat conftest.$ac_ext >&5
7956 cf_cv_gnu_source=yes
7957 fi
7958 rm -f conftest.$ac_objext conftest.$ac_ext
7959         CPPFLAGS="$cf_save"
7960
7961 fi
7962 rm -f conftest.$ac_objext conftest.$ac_ext
7963
7964 fi
7965 echo "$as_me:7965: result: $cf_cv_gnu_source" >&5
7966 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7967 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7968
7969         ;;
7970 mirbsd*) #(vi
7971         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7972         cf_XOPEN_SOURCE=
7973
7974 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7975
7976 cf_save_CFLAGS="$CFLAGS"
7977 cf_save_CPPFLAGS="$CPPFLAGS"
7978
7979 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7980         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7981                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7982
7983 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7984         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7985                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7986
7987 echo "$as_me:7987: checking if we should define _POSIX_C_SOURCE" >&5
7988 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7989 if test "${cf_cv_posix_c_source+set}" = set; then
7990   echo $ECHO_N "(cached) $ECHO_C" >&6
7991 else
7992
7993 echo "${as_me:-configure}:7993: testing if the symbol is already defined go no further ..." 1>&5
7994
7995         cat >conftest.$ac_ext <<_ACEOF
7996 #line 7996 "configure"
7997 #include "confdefs.h"
7998 #include <sys/types.h>
7999 int
8000 main ()
8001 {
8002
8003 #ifndef _POSIX_C_SOURCE
8004 make an error
8005 #endif
8006   ;
8007   return 0;
8008 }
8009 _ACEOF
8010 rm -f conftest.$ac_objext
8011 if { (eval echo "$as_me:8011: \"$ac_compile\"") >&5
8012   (eval $ac_compile) 2>&5
8013   ac_status=$?
8014   echo "$as_me:8014: \$? = $ac_status" >&5
8015   (exit $ac_status); } &&
8016          { ac_try='test -s conftest.$ac_objext'
8017   { (eval echo "$as_me:8017: \"$ac_try\"") >&5
8018   (eval $ac_try) 2>&5
8019   ac_status=$?
8020   echo "$as_me:8020: \$? = $ac_status" >&5
8021   (exit $ac_status); }; }; then
8022   cf_cv_posix_c_source=no
8023 else
8024   echo "$as_me: failed program was:" >&5
8025 cat conftest.$ac_ext >&5
8026 cf_want_posix_source=no
8027          case .$cf_POSIX_C_SOURCE in #(vi
8028          .[12]??*) #(vi
8029                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8030                 ;;
8031          .2) #(vi
8032                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8033                 cf_want_posix_source=yes
8034                 ;;
8035          .*)
8036                 cf_want_posix_source=yes
8037                 ;;
8038          esac
8039          if test "$cf_want_posix_source" = yes ; then
8040                 cat >conftest.$ac_ext <<_ACEOF
8041 #line 8041 "configure"
8042 #include "confdefs.h"
8043 #include <sys/types.h>
8044 int
8045 main ()
8046 {
8047
8048 #ifdef _POSIX_SOURCE
8049 make an error
8050 #endif
8051   ;
8052   return 0;
8053 }
8054 _ACEOF
8055 rm -f conftest.$ac_objext
8056 if { (eval echo "$as_me:8056: \"$ac_compile\"") >&5
8057   (eval $ac_compile) 2>&5
8058   ac_status=$?
8059   echo "$as_me:8059: \$? = $ac_status" >&5
8060   (exit $ac_status); } &&
8061          { ac_try='test -s conftest.$ac_objext'
8062   { (eval echo "$as_me:8062: \"$ac_try\"") >&5
8063   (eval $ac_try) 2>&5
8064   ac_status=$?
8065   echo "$as_me:8065: \$? = $ac_status" >&5
8066   (exit $ac_status); }; }; then
8067   :
8068 else
8069   echo "$as_me: failed program was:" >&5
8070 cat conftest.$ac_ext >&5
8071 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8072 fi
8073 rm -f conftest.$ac_objext conftest.$ac_ext
8074          fi
8075
8076 echo "${as_me:-configure}:8076: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8077
8078          CFLAGS="$cf_trim_CFLAGS"
8079          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8080
8081 echo "${as_me:-configure}:8081: testing if the second compile does not leave our definition intact error ..." 1>&5
8082
8083          cat >conftest.$ac_ext <<_ACEOF
8084 #line 8084 "configure"
8085 #include "confdefs.h"
8086 #include <sys/types.h>
8087 int
8088 main ()
8089 {
8090
8091 #ifndef _POSIX_C_SOURCE
8092 make an error
8093 #endif
8094   ;
8095   return 0;
8096 }
8097 _ACEOF
8098 rm -f conftest.$ac_objext
8099 if { (eval echo "$as_me:8099: \"$ac_compile\"") >&5
8100   (eval $ac_compile) 2>&5
8101   ac_status=$?
8102   echo "$as_me:8102: \$? = $ac_status" >&5
8103   (exit $ac_status); } &&
8104          { ac_try='test -s conftest.$ac_objext'
8105   { (eval echo "$as_me:8105: \"$ac_try\"") >&5
8106   (eval $ac_try) 2>&5
8107   ac_status=$?
8108   echo "$as_me:8108: \$? = $ac_status" >&5
8109   (exit $ac_status); }; }; then
8110   :
8111 else
8112   echo "$as_me: failed program was:" >&5
8113 cat conftest.$ac_ext >&5
8114 cf_cv_posix_c_source=no
8115 fi
8116 rm -f conftest.$ac_objext conftest.$ac_ext
8117          CFLAGS="$cf_save_CFLAGS"
8118          CPPFLAGS="$cf_save_CPPFLAGS"
8119
8120 fi
8121 rm -f conftest.$ac_objext conftest.$ac_ext
8122
8123 fi
8124 echo "$as_me:8124: result: $cf_cv_posix_c_source" >&5
8125 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8126
8127 if test "$cf_cv_posix_c_source" != no ; then
8128         CFLAGS="$cf_trim_CFLAGS"
8129         CPPFLAGS="$cf_trim_CPPFLAGS"
8130
8131 cf_fix_cppflags=no
8132 cf_new_cflags=
8133 cf_new_cppflags=
8134 cf_new_extra_cppflags=
8135
8136 for cf_add_cflags in $cf_cv_posix_c_source
8137 do
8138 case $cf_fix_cppflags in
8139 no)
8140         case $cf_add_cflags in #(vi
8141         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8142                 case $cf_add_cflags in
8143                 -D*)
8144                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8145
8146                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8147                                 && test -z "${cf_tst_cflags}" \
8148                                 && cf_fix_cppflags=yes
8149
8150                         if test $cf_fix_cppflags = yes ; then
8151                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8152                                 continue
8153                         elif test "${cf_tst_cflags}" = "\"'" ; then
8154                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8155                                 continue
8156                         fi
8157                         ;;
8158                 esac
8159                 case "$CPPFLAGS" in
8160                 *$cf_add_cflags) #(vi
8161                         ;;
8162                 *) #(vi
8163                         case $cf_add_cflags in #(vi
8164                         -D*)
8165                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8166
8167 CPPFLAGS=`echo "$CPPFLAGS" | \
8168         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8169                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8170
8171                                 ;;
8172                         esac
8173                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8174                         ;;
8175                 esac
8176                 ;;
8177         *)
8178                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8179                 ;;
8180         esac
8181         ;;
8182 yes)
8183         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8184
8185         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8186
8187         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8188                 && test -z "${cf_tst_cflags}" \
8189                 && cf_fix_cppflags=no
8190         ;;
8191 esac
8192 done
8193
8194 if test -n "$cf_new_cflags" ; then
8195
8196         CFLAGS="$CFLAGS $cf_new_cflags"
8197 fi
8198
8199 if test -n "$cf_new_cppflags" ; then
8200
8201         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8202 fi
8203
8204 if test -n "$cf_new_extra_cppflags" ; then
8205
8206         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8207 fi
8208
8209 fi
8210
8211         ;;
8212 netbsd*) #(vi
8213         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8214         ;;
8215 openbsd[4-9]*) #(vi
8216         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8217         cf_xopen_source="-D_BSD_SOURCE"
8218         cf_XOPEN_SOURCE=600
8219         ;;
8220 openbsd*) #(vi
8221         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8222         ;;
8223 osf[45]*) #(vi
8224         cf_xopen_source="-D_OSF_SOURCE"
8225         ;;
8226 nto-qnx*) #(vi
8227         cf_xopen_source="-D_QNX_SOURCE"
8228         ;;
8229 sco*) #(vi
8230         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8231         ;;
8232 solaris2.*) #(vi
8233         cf_xopen_source="-D__EXTENSIONS__"
8234         cf_cv_xopen_source=broken
8235         ;;
8236 *)
8237
8238 echo "$as_me:8238: checking if we should define _XOPEN_SOURCE" >&5
8239 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8240 if test "${cf_cv_xopen_source+set}" = set; then
8241   echo $ECHO_N "(cached) $ECHO_C" >&6
8242 else
8243
8244         cat >conftest.$ac_ext <<_ACEOF
8245 #line 8245 "configure"
8246 #include "confdefs.h"
8247
8248 #include <stdlib.h>
8249 #include <string.h>
8250 #include <sys/types.h>
8251
8252 int
8253 main ()
8254 {
8255
8256 #ifndef _XOPEN_SOURCE
8257 make an error
8258 #endif
8259   ;
8260   return 0;
8261 }
8262 _ACEOF
8263 rm -f conftest.$ac_objext
8264 if { (eval echo "$as_me:8264: \"$ac_compile\"") >&5
8265   (eval $ac_compile) 2>&5
8266   ac_status=$?
8267   echo "$as_me:8267: \$? = $ac_status" >&5
8268   (exit $ac_status); } &&
8269          { ac_try='test -s conftest.$ac_objext'
8270   { (eval echo "$as_me:8270: \"$ac_try\"") >&5
8271   (eval $ac_try) 2>&5
8272   ac_status=$?
8273   echo "$as_me:8273: \$? = $ac_status" >&5
8274   (exit $ac_status); }; }; then
8275   cf_cv_xopen_source=no
8276 else
8277   echo "$as_me: failed program was:" >&5
8278 cat conftest.$ac_ext >&5
8279 cf_save="$CPPFLAGS"
8280          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8281          cat >conftest.$ac_ext <<_ACEOF
8282 #line 8282 "configure"
8283 #include "confdefs.h"
8284
8285 #include <stdlib.h>
8286 #include <string.h>
8287 #include <sys/types.h>
8288
8289 int
8290 main ()
8291 {
8292
8293 #ifdef _XOPEN_SOURCE
8294 make an error
8295 #endif
8296   ;
8297   return 0;
8298 }
8299 _ACEOF
8300 rm -f conftest.$ac_objext
8301 if { (eval echo "$as_me:8301: \"$ac_compile\"") >&5
8302   (eval $ac_compile) 2>&5
8303   ac_status=$?
8304   echo "$as_me:8304: \$? = $ac_status" >&5
8305   (exit $ac_status); } &&
8306          { ac_try='test -s conftest.$ac_objext'
8307   { (eval echo "$as_me:8307: \"$ac_try\"") >&5
8308   (eval $ac_try) 2>&5
8309   ac_status=$?
8310   echo "$as_me:8310: \$? = $ac_status" >&5
8311   (exit $ac_status); }; }; then
8312   cf_cv_xopen_source=no
8313 else
8314   echo "$as_me: failed program was:" >&5
8315 cat conftest.$ac_ext >&5
8316 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8317 fi
8318 rm -f conftest.$ac_objext conftest.$ac_ext
8319         CPPFLAGS="$cf_save"
8320
8321 fi
8322 rm -f conftest.$ac_objext conftest.$ac_ext
8323
8324 fi
8325 echo "$as_me:8325: result: $cf_cv_xopen_source" >&5
8326 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8327
8328 if test "$cf_cv_xopen_source" != no ; then
8329
8330 CFLAGS=`echo "$CFLAGS" | \
8331         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8332                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8333
8334 CPPFLAGS=`echo "$CPPFLAGS" | \
8335         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8336                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8337
8338         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8339
8340 cf_fix_cppflags=no
8341 cf_new_cflags=
8342 cf_new_cppflags=
8343 cf_new_extra_cppflags=
8344
8345 for cf_add_cflags in $cf_temp_xopen_source
8346 do
8347 case $cf_fix_cppflags in
8348 no)
8349         case $cf_add_cflags in #(vi
8350         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8351                 case $cf_add_cflags in
8352                 -D*)
8353                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8354
8355                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8356                                 && test -z "${cf_tst_cflags}" \
8357                                 && cf_fix_cppflags=yes
8358
8359                         if test $cf_fix_cppflags = yes ; then
8360                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8361                                 continue
8362                         elif test "${cf_tst_cflags}" = "\"'" ; then
8363                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8364                                 continue
8365                         fi
8366                         ;;
8367                 esac
8368                 case "$CPPFLAGS" in
8369                 *$cf_add_cflags) #(vi
8370                         ;;
8371                 *) #(vi
8372                         case $cf_add_cflags in #(vi
8373                         -D*)
8374                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8375
8376 CPPFLAGS=`echo "$CPPFLAGS" | \
8377         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8378                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8379
8380                                 ;;
8381                         esac
8382                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8383                         ;;
8384                 esac
8385                 ;;
8386         *)
8387                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8388                 ;;
8389         esac
8390         ;;
8391 yes)
8392         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8393
8394         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8395
8396         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8397                 && test -z "${cf_tst_cflags}" \
8398                 && cf_fix_cppflags=no
8399         ;;
8400 esac
8401 done
8402
8403 if test -n "$cf_new_cflags" ; then
8404
8405         CFLAGS="$CFLAGS $cf_new_cflags"
8406 fi
8407
8408 if test -n "$cf_new_cppflags" ; then
8409
8410         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8411 fi
8412
8413 if test -n "$cf_new_extra_cppflags" ; then
8414
8415         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8416 fi
8417
8418 fi
8419
8420 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8421
8422 cf_save_CFLAGS="$CFLAGS"
8423 cf_save_CPPFLAGS="$CPPFLAGS"
8424
8425 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8426         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8427                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8428
8429 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8430         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8431                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8432
8433 echo "$as_me:8433: checking if we should define _POSIX_C_SOURCE" >&5
8434 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8435 if test "${cf_cv_posix_c_source+set}" = set; then
8436   echo $ECHO_N "(cached) $ECHO_C" >&6
8437 else
8438
8439 echo "${as_me:-configure}:8439: testing if the symbol is already defined go no further ..." 1>&5
8440
8441         cat >conftest.$ac_ext <<_ACEOF
8442 #line 8442 "configure"
8443 #include "confdefs.h"
8444 #include <sys/types.h>
8445 int
8446 main ()
8447 {
8448
8449 #ifndef _POSIX_C_SOURCE
8450 make an error
8451 #endif
8452   ;
8453   return 0;
8454 }
8455 _ACEOF
8456 rm -f conftest.$ac_objext
8457 if { (eval echo "$as_me:8457: \"$ac_compile\"") >&5
8458   (eval $ac_compile) 2>&5
8459   ac_status=$?
8460   echo "$as_me:8460: \$? = $ac_status" >&5
8461   (exit $ac_status); } &&
8462          { ac_try='test -s conftest.$ac_objext'
8463   { (eval echo "$as_me:8463: \"$ac_try\"") >&5
8464   (eval $ac_try) 2>&5
8465   ac_status=$?
8466   echo "$as_me:8466: \$? = $ac_status" >&5
8467   (exit $ac_status); }; }; then
8468   cf_cv_posix_c_source=no
8469 else
8470   echo "$as_me: failed program was:" >&5
8471 cat conftest.$ac_ext >&5
8472 cf_want_posix_source=no
8473          case .$cf_POSIX_C_SOURCE in #(vi
8474          .[12]??*) #(vi
8475                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8476                 ;;
8477          .2) #(vi
8478                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8479                 cf_want_posix_source=yes
8480                 ;;
8481          .*)
8482                 cf_want_posix_source=yes
8483                 ;;
8484          esac
8485          if test "$cf_want_posix_source" = yes ; then
8486                 cat >conftest.$ac_ext <<_ACEOF
8487 #line 8487 "configure"
8488 #include "confdefs.h"
8489 #include <sys/types.h>
8490 int
8491 main ()
8492 {
8493
8494 #ifdef _POSIX_SOURCE
8495 make an error
8496 #endif
8497   ;
8498   return 0;
8499 }
8500 _ACEOF
8501 rm -f conftest.$ac_objext
8502 if { (eval echo "$as_me:8502: \"$ac_compile\"") >&5
8503   (eval $ac_compile) 2>&5
8504   ac_status=$?
8505   echo "$as_me:8505: \$? = $ac_status" >&5
8506   (exit $ac_status); } &&
8507          { ac_try='test -s conftest.$ac_objext'
8508   { (eval echo "$as_me:8508: \"$ac_try\"") >&5
8509   (eval $ac_try) 2>&5
8510   ac_status=$?
8511   echo "$as_me:8511: \$? = $ac_status" >&5
8512   (exit $ac_status); }; }; then
8513   :
8514 else
8515   echo "$as_me: failed program was:" >&5
8516 cat conftest.$ac_ext >&5
8517 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8518 fi
8519 rm -f conftest.$ac_objext conftest.$ac_ext
8520          fi
8521
8522 echo "${as_me:-configure}:8522: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8523
8524          CFLAGS="$cf_trim_CFLAGS"
8525          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8526
8527 echo "${as_me:-configure}:8527: testing if the second compile does not leave our definition intact error ..." 1>&5
8528
8529          cat >conftest.$ac_ext <<_ACEOF
8530 #line 8530 "configure"
8531 #include "confdefs.h"
8532 #include <sys/types.h>
8533 int
8534 main ()
8535 {
8536
8537 #ifndef _POSIX_C_SOURCE
8538 make an error
8539 #endif
8540   ;
8541   return 0;
8542 }
8543 _ACEOF
8544 rm -f conftest.$ac_objext
8545 if { (eval echo "$as_me:8545: \"$ac_compile\"") >&5
8546   (eval $ac_compile) 2>&5
8547   ac_status=$?
8548   echo "$as_me:8548: \$? = $ac_status" >&5
8549   (exit $ac_status); } &&
8550          { ac_try='test -s conftest.$ac_objext'
8551   { (eval echo "$as_me:8551: \"$ac_try\"") >&5
8552   (eval $ac_try) 2>&5
8553   ac_status=$?
8554   echo "$as_me:8554: \$? = $ac_status" >&5
8555   (exit $ac_status); }; }; then
8556   :
8557 else
8558   echo "$as_me: failed program was:" >&5
8559 cat conftest.$ac_ext >&5
8560 cf_cv_posix_c_source=no
8561 fi
8562 rm -f conftest.$ac_objext conftest.$ac_ext
8563          CFLAGS="$cf_save_CFLAGS"
8564          CPPFLAGS="$cf_save_CPPFLAGS"
8565
8566 fi
8567 rm -f conftest.$ac_objext conftest.$ac_ext
8568
8569 fi
8570 echo "$as_me:8570: result: $cf_cv_posix_c_source" >&5
8571 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8572
8573 if test "$cf_cv_posix_c_source" != no ; then
8574         CFLAGS="$cf_trim_CFLAGS"
8575         CPPFLAGS="$cf_trim_CPPFLAGS"
8576
8577 cf_fix_cppflags=no
8578 cf_new_cflags=
8579 cf_new_cppflags=
8580 cf_new_extra_cppflags=
8581
8582 for cf_add_cflags in $cf_cv_posix_c_source
8583 do
8584 case $cf_fix_cppflags in
8585 no)
8586         case $cf_add_cflags in #(vi
8587         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8588                 case $cf_add_cflags in
8589                 -D*)
8590                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8591
8592                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8593                                 && test -z "${cf_tst_cflags}" \
8594                                 && cf_fix_cppflags=yes
8595
8596                         if test $cf_fix_cppflags = yes ; then
8597                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8598                                 continue
8599                         elif test "${cf_tst_cflags}" = "\"'" ; then
8600                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8601                                 continue
8602                         fi
8603                         ;;
8604                 esac
8605                 case "$CPPFLAGS" in
8606                 *$cf_add_cflags) #(vi
8607                         ;;
8608                 *) #(vi
8609                         case $cf_add_cflags in #(vi
8610                         -D*)
8611                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8612
8613 CPPFLAGS=`echo "$CPPFLAGS" | \
8614         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8615                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8616
8617                                 ;;
8618                         esac
8619                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8620                         ;;
8621                 esac
8622                 ;;
8623         *)
8624                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8625                 ;;
8626         esac
8627         ;;
8628 yes)
8629         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8630
8631         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8632
8633         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8634                 && test -z "${cf_tst_cflags}" \
8635                 && cf_fix_cppflags=no
8636         ;;
8637 esac
8638 done
8639
8640 if test -n "$cf_new_cflags" ; then
8641
8642         CFLAGS="$CFLAGS $cf_new_cflags"
8643 fi
8644
8645 if test -n "$cf_new_cppflags" ; then
8646
8647         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8648 fi
8649
8650 if test -n "$cf_new_extra_cppflags" ; then
8651
8652         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8653 fi
8654
8655 fi
8656
8657         ;;
8658 esac
8659
8660 if test -n "$cf_xopen_source" ; then
8661
8662 cf_fix_cppflags=no
8663 cf_new_cflags=
8664 cf_new_cppflags=
8665 cf_new_extra_cppflags=
8666
8667 for cf_add_cflags in $cf_xopen_source
8668 do
8669 case $cf_fix_cppflags in
8670 no)
8671         case $cf_add_cflags in #(vi
8672         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8673                 case $cf_add_cflags in
8674                 -D*)
8675                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8676
8677                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8678                                 && test -z "${cf_tst_cflags}" \
8679                                 && cf_fix_cppflags=yes
8680
8681                         if test $cf_fix_cppflags = yes ; then
8682                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8683                                 continue
8684                         elif test "${cf_tst_cflags}" = "\"'" ; then
8685                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8686                                 continue
8687                         fi
8688                         ;;
8689                 esac
8690                 case "$CPPFLAGS" in
8691                 *$cf_add_cflags) #(vi
8692                         ;;
8693                 *) #(vi
8694                         case $cf_add_cflags in #(vi
8695                         -D*)
8696                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8697
8698 CPPFLAGS=`echo "$CPPFLAGS" | \
8699         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8700                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8701
8702                                 ;;
8703                         esac
8704                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8705                         ;;
8706                 esac
8707                 ;;
8708         *)
8709                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8710                 ;;
8711         esac
8712         ;;
8713 yes)
8714         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8715
8716         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8717
8718         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8719                 && test -z "${cf_tst_cflags}" \
8720                 && cf_fix_cppflags=no
8721         ;;
8722 esac
8723 done
8724
8725 if test -n "$cf_new_cflags" ; then
8726
8727         CFLAGS="$CFLAGS $cf_new_cflags"
8728 fi
8729
8730 if test -n "$cf_new_cppflags" ; then
8731
8732         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8733 fi
8734
8735 if test -n "$cf_new_extra_cppflags" ; then
8736
8737         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8738 fi
8739
8740 fi
8741
8742 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8743         echo "$as_me:8743: checking if _XOPEN_SOURCE really is set" >&5
8744 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8745         cat >conftest.$ac_ext <<_ACEOF
8746 #line 8746 "configure"
8747 #include "confdefs.h"
8748 #include <stdlib.h>
8749 int
8750 main ()
8751 {
8752
8753 #ifndef _XOPEN_SOURCE
8754 make an error
8755 #endif
8756   ;
8757   return 0;
8758 }
8759 _ACEOF
8760 rm -f conftest.$ac_objext
8761 if { (eval echo "$as_me:8761: \"$ac_compile\"") >&5
8762   (eval $ac_compile) 2>&5
8763   ac_status=$?
8764   echo "$as_me:8764: \$? = $ac_status" >&5
8765   (exit $ac_status); } &&
8766          { ac_try='test -s conftest.$ac_objext'
8767   { (eval echo "$as_me:8767: \"$ac_try\"") >&5
8768   (eval $ac_try) 2>&5
8769   ac_status=$?
8770   echo "$as_me:8770: \$? = $ac_status" >&5
8771   (exit $ac_status); }; }; then
8772   cf_XOPEN_SOURCE_set=yes
8773 else
8774   echo "$as_me: failed program was:" >&5
8775 cat conftest.$ac_ext >&5
8776 cf_XOPEN_SOURCE_set=no
8777 fi
8778 rm -f conftest.$ac_objext conftest.$ac_ext
8779         echo "$as_me:8779: result: $cf_XOPEN_SOURCE_set" >&5
8780 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8781         if test $cf_XOPEN_SOURCE_set = yes
8782         then
8783                 cat >conftest.$ac_ext <<_ACEOF
8784 #line 8784 "configure"
8785 #include "confdefs.h"
8786 #include <stdlib.h>
8787 int
8788 main ()
8789 {
8790
8791 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8792 make an error
8793 #endif
8794   ;
8795   return 0;
8796 }
8797 _ACEOF
8798 rm -f conftest.$ac_objext
8799 if { (eval echo "$as_me:8799: \"$ac_compile\"") >&5
8800   (eval $ac_compile) 2>&5
8801   ac_status=$?
8802   echo "$as_me:8802: \$? = $ac_status" >&5
8803   (exit $ac_status); } &&
8804          { ac_try='test -s conftest.$ac_objext'
8805   { (eval echo "$as_me:8805: \"$ac_try\"") >&5
8806   (eval $ac_try) 2>&5
8807   ac_status=$?
8808   echo "$as_me:8808: \$? = $ac_status" >&5
8809   (exit $ac_status); }; }; then
8810   cf_XOPEN_SOURCE_set_ok=yes
8811 else
8812   echo "$as_me: failed program was:" >&5
8813 cat conftest.$ac_ext >&5
8814 cf_XOPEN_SOURCE_set_ok=no
8815 fi
8816 rm -f conftest.$ac_objext conftest.$ac_ext
8817                 if test $cf_XOPEN_SOURCE_set_ok = no
8818                 then
8819                         { echo "$as_me:8819: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8820 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8821                 fi
8822         else
8823
8824 echo "$as_me:8824: checking if we should define _XOPEN_SOURCE" >&5
8825 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8826 if test "${cf_cv_xopen_source+set}" = set; then
8827   echo $ECHO_N "(cached) $ECHO_C" >&6
8828 else
8829
8830         cat >conftest.$ac_ext <<_ACEOF
8831 #line 8831 "configure"
8832 #include "confdefs.h"
8833
8834 #include <stdlib.h>
8835 #include <string.h>
8836 #include <sys/types.h>
8837
8838 int
8839 main ()
8840 {
8841
8842 #ifndef _XOPEN_SOURCE
8843 make an error
8844 #endif
8845   ;
8846   return 0;
8847 }
8848 _ACEOF
8849 rm -f conftest.$ac_objext
8850 if { (eval echo "$as_me:8850: \"$ac_compile\"") >&5
8851   (eval $ac_compile) 2>&5
8852   ac_status=$?
8853   echo "$as_me:8853: \$? = $ac_status" >&5
8854   (exit $ac_status); } &&
8855          { ac_try='test -s conftest.$ac_objext'
8856   { (eval echo "$as_me:8856: \"$ac_try\"") >&5
8857   (eval $ac_try) 2>&5
8858   ac_status=$?
8859   echo "$as_me:8859: \$? = $ac_status" >&5
8860   (exit $ac_status); }; }; then
8861   cf_cv_xopen_source=no
8862 else
8863   echo "$as_me: failed program was:" >&5
8864 cat conftest.$ac_ext >&5
8865 cf_save="$CPPFLAGS"
8866          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8867          cat >conftest.$ac_ext <<_ACEOF
8868 #line 8868 "configure"
8869 #include "confdefs.h"
8870
8871 #include <stdlib.h>
8872 #include <string.h>
8873 #include <sys/types.h>
8874
8875 int
8876 main ()
8877 {
8878
8879 #ifdef _XOPEN_SOURCE
8880 make an error
8881 #endif
8882   ;
8883   return 0;
8884 }
8885 _ACEOF
8886 rm -f conftest.$ac_objext
8887 if { (eval echo "$as_me:8887: \"$ac_compile\"") >&5
8888   (eval $ac_compile) 2>&5
8889   ac_status=$?
8890   echo "$as_me:8890: \$? = $ac_status" >&5
8891   (exit $ac_status); } &&
8892          { ac_try='test -s conftest.$ac_objext'
8893   { (eval echo "$as_me:8893: \"$ac_try\"") >&5
8894   (eval $ac_try) 2>&5
8895   ac_status=$?
8896   echo "$as_me:8896: \$? = $ac_status" >&5
8897   (exit $ac_status); }; }; then
8898   cf_cv_xopen_source=no
8899 else
8900   echo "$as_me: failed program was:" >&5
8901 cat conftest.$ac_ext >&5
8902 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8903 fi
8904 rm -f conftest.$ac_objext conftest.$ac_ext
8905         CPPFLAGS="$cf_save"
8906
8907 fi
8908 rm -f conftest.$ac_objext conftest.$ac_ext
8909
8910 fi
8911 echo "$as_me:8911: result: $cf_cv_xopen_source" >&5
8912 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8913
8914 if test "$cf_cv_xopen_source" != no ; then
8915
8916 CFLAGS=`echo "$CFLAGS" | \
8917         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8918                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8919
8920 CPPFLAGS=`echo "$CPPFLAGS" | \
8921         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8922                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8923
8924         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8925
8926 cf_fix_cppflags=no
8927 cf_new_cflags=
8928 cf_new_cppflags=
8929 cf_new_extra_cppflags=
8930
8931 for cf_add_cflags in $cf_temp_xopen_source
8932 do
8933 case $cf_fix_cppflags in
8934 no)
8935         case $cf_add_cflags in #(vi
8936         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8937                 case $cf_add_cflags in
8938                 -D*)
8939                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8940
8941                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8942                                 && test -z "${cf_tst_cflags}" \
8943                                 && cf_fix_cppflags=yes
8944
8945                         if test $cf_fix_cppflags = yes ; then
8946                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8947                                 continue
8948                         elif test "${cf_tst_cflags}" = "\"'" ; then
8949                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8950                                 continue
8951                         fi
8952                         ;;
8953                 esac
8954                 case "$CPPFLAGS" in
8955                 *$cf_add_cflags) #(vi
8956                         ;;
8957                 *) #(vi
8958                         case $cf_add_cflags in #(vi
8959                         -D*)
8960                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8961
8962 CPPFLAGS=`echo "$CPPFLAGS" | \
8963         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8964                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8965
8966                                 ;;
8967                         esac
8968                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8969                         ;;
8970                 esac
8971                 ;;
8972         *)
8973                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8974                 ;;
8975         esac
8976         ;;
8977 yes)
8978         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8979
8980         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8981
8982         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8983                 && test -z "${cf_tst_cflags}" \
8984                 && cf_fix_cppflags=no
8985         ;;
8986 esac
8987 done
8988
8989 if test -n "$cf_new_cflags" ; then
8990
8991         CFLAGS="$CFLAGS $cf_new_cflags"
8992 fi
8993
8994 if test -n "$cf_new_cppflags" ; then
8995
8996         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8997 fi
8998
8999 if test -n "$cf_new_extra_cppflags" ; then
9000
9001         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9002 fi
9003
9004 fi
9005
9006         fi
9007 fi
9008
9009 # Check whether --enable-largefile or --disable-largefile was given.
9010 if test "${enable_largefile+set}" = set; then
9011   enableval="$enable_largefile"
9012
9013 fi;
9014 if test "$enable_largefile" != no; then
9015
9016   echo "$as_me:9016: checking for special C compiler options needed for large files" >&5
9017 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9018 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9019   echo $ECHO_N "(cached) $ECHO_C" >&6
9020 else
9021   ac_cv_sys_largefile_CC=no
9022      if test "$GCC" != yes; then
9023        ac_save_CC=$CC
9024        while :; do
9025          # IRIX 6.2 and later do not support large files by default,
9026          # so use the C compiler's -n32 option if that helps.
9027          cat >conftest.$ac_ext <<_ACEOF
9028 #line 9028 "configure"
9029 #include "confdefs.h"
9030 #include <sys/types.h>
9031  /* Check that off_t can represent 2**63 - 1 correctly.
9032     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9033     since some C++ compilers masquerading as C compilers
9034     incorrectly reject 9223372036854775807.  */
9035 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9036   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9037                        && LARGE_OFF_T % 2147483647 == 1)
9038                       ? 1 : -1];
9039 int
9040 main ()
9041 {
9042
9043   ;
9044   return 0;
9045 }
9046 _ACEOF
9047          rm -f conftest.$ac_objext
9048 if { (eval echo "$as_me:9048: \"$ac_compile\"") >&5
9049   (eval $ac_compile) 2>&5
9050   ac_status=$?
9051   echo "$as_me:9051: \$? = $ac_status" >&5
9052   (exit $ac_status); } &&
9053          { ac_try='test -s conftest.$ac_objext'
9054   { (eval echo "$as_me:9054: \"$ac_try\"") >&5
9055   (eval $ac_try) 2>&5
9056   ac_status=$?
9057   echo "$as_me:9057: \$? = $ac_status" >&5
9058   (exit $ac_status); }; }; then
9059   break
9060 else
9061   echo "$as_me: failed program was:" >&5
9062 cat conftest.$ac_ext >&5
9063 fi
9064 rm -f conftest.$ac_objext
9065          CC="$CC -n32"
9066          rm -f conftest.$ac_objext
9067 if { (eval echo "$as_me:9067: \"$ac_compile\"") >&5
9068   (eval $ac_compile) 2>&5
9069   ac_status=$?
9070   echo "$as_me:9070: \$? = $ac_status" >&5
9071   (exit $ac_status); } &&
9072          { ac_try='test -s conftest.$ac_objext'
9073   { (eval echo "$as_me:9073: \"$ac_try\"") >&5
9074   (eval $ac_try) 2>&5
9075   ac_status=$?
9076   echo "$as_me:9076: \$? = $ac_status" >&5
9077   (exit $ac_status); }; }; then
9078   ac_cv_sys_largefile_CC=' -n32'; break
9079 else
9080   echo "$as_me: failed program was:" >&5
9081 cat conftest.$ac_ext >&5
9082 fi
9083 rm -f conftest.$ac_objext
9084          break
9085        done
9086        CC=$ac_save_CC
9087        rm -f conftest.$ac_ext
9088     fi
9089 fi
9090 echo "$as_me:9090: result: $ac_cv_sys_largefile_CC" >&5
9091 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9092   if test "$ac_cv_sys_largefile_CC" != no; then
9093     CC=$CC$ac_cv_sys_largefile_CC
9094   fi
9095
9096   echo "$as_me:9096: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9097 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9098 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9099   echo $ECHO_N "(cached) $ECHO_C" >&6
9100 else
9101   while :; do
9102   ac_cv_sys_file_offset_bits=no
9103   cat >conftest.$ac_ext <<_ACEOF
9104 #line 9104 "configure"
9105 #include "confdefs.h"
9106 #include <sys/types.h>
9107  /* Check that off_t can represent 2**63 - 1 correctly.
9108     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9109     since some C++ compilers masquerading as C compilers
9110     incorrectly reject 9223372036854775807.  */
9111 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9112   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9113                        && LARGE_OFF_T % 2147483647 == 1)
9114                       ? 1 : -1];
9115 int
9116 main ()
9117 {
9118
9119   ;
9120   return 0;
9121 }
9122 _ACEOF
9123 rm -f conftest.$ac_objext
9124 if { (eval echo "$as_me:9124: \"$ac_compile\"") >&5
9125   (eval $ac_compile) 2>&5
9126   ac_status=$?
9127   echo "$as_me:9127: \$? = $ac_status" >&5
9128   (exit $ac_status); } &&
9129          { ac_try='test -s conftest.$ac_objext'
9130   { (eval echo "$as_me:9130: \"$ac_try\"") >&5
9131   (eval $ac_try) 2>&5
9132   ac_status=$?
9133   echo "$as_me:9133: \$? = $ac_status" >&5
9134   (exit $ac_status); }; }; then
9135   break
9136 else
9137   echo "$as_me: failed program was:" >&5
9138 cat conftest.$ac_ext >&5
9139 fi
9140 rm -f conftest.$ac_objext conftest.$ac_ext
9141   cat >conftest.$ac_ext <<_ACEOF
9142 #line 9142 "configure"
9143 #include "confdefs.h"
9144 #define _FILE_OFFSET_BITS 64
9145 #include <sys/types.h>
9146  /* Check that off_t can represent 2**63 - 1 correctly.
9147     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9148     since some C++ compilers masquerading as C compilers
9149     incorrectly reject 9223372036854775807.  */
9150 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9151   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9152                        && LARGE_OFF_T % 2147483647 == 1)
9153                       ? 1 : -1];
9154 int
9155 main ()
9156 {
9157
9158   ;
9159   return 0;
9160 }
9161 _ACEOF
9162 rm -f conftest.$ac_objext
9163 if { (eval echo "$as_me:9163: \"$ac_compile\"") >&5
9164   (eval $ac_compile) 2>&5
9165   ac_status=$?
9166   echo "$as_me:9166: \$? = $ac_status" >&5
9167   (exit $ac_status); } &&
9168          { ac_try='test -s conftest.$ac_objext'
9169   { (eval echo "$as_me:9169: \"$ac_try\"") >&5
9170   (eval $ac_try) 2>&5
9171   ac_status=$?
9172   echo "$as_me:9172: \$? = $ac_status" >&5
9173   (exit $ac_status); }; }; then
9174   ac_cv_sys_file_offset_bits=64; break
9175 else
9176   echo "$as_me: failed program was:" >&5
9177 cat conftest.$ac_ext >&5
9178 fi
9179 rm -f conftest.$ac_objext conftest.$ac_ext
9180   break
9181 done
9182 fi
9183 echo "$as_me:9183: result: $ac_cv_sys_file_offset_bits" >&5
9184 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9185 if test "$ac_cv_sys_file_offset_bits" != no; then
9186
9187 cat >>confdefs.h <<EOF
9188 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9189 EOF
9190
9191 fi
9192 rm -rf conftest*
9193   echo "$as_me:9193: checking for _LARGE_FILES value needed for large files" >&5
9194 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9195 if test "${ac_cv_sys_large_files+set}" = set; then
9196   echo $ECHO_N "(cached) $ECHO_C" >&6
9197 else
9198   while :; do
9199   ac_cv_sys_large_files=no
9200   cat >conftest.$ac_ext <<_ACEOF
9201 #line 9201 "configure"
9202 #include "confdefs.h"
9203 #include <sys/types.h>
9204  /* Check that off_t can represent 2**63 - 1 correctly.
9205     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9206     since some C++ compilers masquerading as C compilers
9207     incorrectly reject 9223372036854775807.  */
9208 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9209   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9210                        && LARGE_OFF_T % 2147483647 == 1)
9211                       ? 1 : -1];
9212 int
9213 main ()
9214 {
9215
9216   ;
9217   return 0;
9218 }
9219 _ACEOF
9220 rm -f conftest.$ac_objext
9221 if { (eval echo "$as_me:9221: \"$ac_compile\"") >&5
9222   (eval $ac_compile) 2>&5
9223   ac_status=$?
9224   echo "$as_me:9224: \$? = $ac_status" >&5
9225   (exit $ac_status); } &&
9226          { ac_try='test -s conftest.$ac_objext'
9227   { (eval echo "$as_me:9227: \"$ac_try\"") >&5
9228   (eval $ac_try) 2>&5
9229   ac_status=$?
9230   echo "$as_me:9230: \$? = $ac_status" >&5
9231   (exit $ac_status); }; }; then
9232   break
9233 else
9234   echo "$as_me: failed program was:" >&5
9235 cat conftest.$ac_ext >&5
9236 fi
9237 rm -f conftest.$ac_objext conftest.$ac_ext
9238   cat >conftest.$ac_ext <<_ACEOF
9239 #line 9239 "configure"
9240 #include "confdefs.h"
9241 #define _LARGE_FILES 1
9242 #include <sys/types.h>
9243  /* Check that off_t can represent 2**63 - 1 correctly.
9244     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9245     since some C++ compilers masquerading as C compilers
9246     incorrectly reject 9223372036854775807.  */
9247 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9248   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9249                        && LARGE_OFF_T % 2147483647 == 1)
9250                       ? 1 : -1];
9251 int
9252 main ()
9253 {
9254
9255   ;
9256   return 0;
9257 }
9258 _ACEOF
9259 rm -f conftest.$ac_objext
9260 if { (eval echo "$as_me:9260: \"$ac_compile\"") >&5
9261   (eval $ac_compile) 2>&5
9262   ac_status=$?
9263   echo "$as_me:9263: \$? = $ac_status" >&5
9264   (exit $ac_status); } &&
9265          { ac_try='test -s conftest.$ac_objext'
9266   { (eval echo "$as_me:9266: \"$ac_try\"") >&5
9267   (eval $ac_try) 2>&5
9268   ac_status=$?
9269   echo "$as_me:9269: \$? = $ac_status" >&5
9270   (exit $ac_status); }; }; then
9271   ac_cv_sys_large_files=1; break
9272 else
9273   echo "$as_me: failed program was:" >&5
9274 cat conftest.$ac_ext >&5
9275 fi
9276 rm -f conftest.$ac_objext conftest.$ac_ext
9277   break
9278 done
9279 fi
9280 echo "$as_me:9280: result: $ac_cv_sys_large_files" >&5
9281 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9282 if test "$ac_cv_sys_large_files" != no; then
9283
9284 cat >>confdefs.h <<EOF
9285 #define _LARGE_FILES $ac_cv_sys_large_files
9286 EOF
9287
9288 fi
9289 rm -rf conftest*
9290 fi
9291
9292     if test "$enable_largefile" != no ; then
9293         echo "$as_me:9293: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9294 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9295 if test "${ac_cv_sys_largefile_source+set}" = set; then
9296   echo $ECHO_N "(cached) $ECHO_C" >&6
9297 else
9298   while :; do
9299   ac_cv_sys_largefile_source=no
9300   cat >conftest.$ac_ext <<_ACEOF
9301 #line 9301 "configure"
9302 #include "confdefs.h"
9303 #include <stdio.h>
9304 int
9305 main ()
9306 {
9307 return !fseeko;
9308   ;
9309   return 0;
9310 }
9311 _ACEOF
9312 rm -f conftest.$ac_objext
9313 if { (eval echo "$as_me:9313: \"$ac_compile\"") >&5
9314   (eval $ac_compile) 2>&5
9315   ac_status=$?
9316   echo "$as_me:9316: \$? = $ac_status" >&5
9317   (exit $ac_status); } &&
9318          { ac_try='test -s conftest.$ac_objext'
9319   { (eval echo "$as_me:9319: \"$ac_try\"") >&5
9320   (eval $ac_try) 2>&5
9321   ac_status=$?
9322   echo "$as_me:9322: \$? = $ac_status" >&5
9323   (exit $ac_status); }; }; then
9324   break
9325 else
9326   echo "$as_me: failed program was:" >&5
9327 cat conftest.$ac_ext >&5
9328 fi
9329 rm -f conftest.$ac_objext conftest.$ac_ext
9330   cat >conftest.$ac_ext <<_ACEOF
9331 #line 9331 "configure"
9332 #include "confdefs.h"
9333 #define _LARGEFILE_SOURCE 1
9334 #include <stdio.h>
9335 int
9336 main ()
9337 {
9338 return !fseeko;
9339   ;
9340   return 0;
9341 }
9342 _ACEOF
9343 rm -f conftest.$ac_objext
9344 if { (eval echo "$as_me:9344: \"$ac_compile\"") >&5
9345   (eval $ac_compile) 2>&5
9346   ac_status=$?
9347   echo "$as_me:9347: \$? = $ac_status" >&5
9348   (exit $ac_status); } &&
9349          { ac_try='test -s conftest.$ac_objext'
9350   { (eval echo "$as_me:9350: \"$ac_try\"") >&5
9351   (eval $ac_try) 2>&5
9352   ac_status=$?
9353   echo "$as_me:9353: \$? = $ac_status" >&5
9354   (exit $ac_status); }; }; then
9355   ac_cv_sys_largefile_source=1; break
9356 else
9357   echo "$as_me: failed program was:" >&5
9358 cat conftest.$ac_ext >&5
9359 fi
9360 rm -f conftest.$ac_objext conftest.$ac_ext
9361   break
9362 done
9363 fi
9364 echo "$as_me:9364: result: $ac_cv_sys_largefile_source" >&5
9365 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9366 if test "$ac_cv_sys_largefile_source" != no; then
9367
9368 cat >>confdefs.h <<EOF
9369 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9370 EOF
9371
9372 fi
9373 rm -rf conftest*
9374
9375 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9376 # in glibc 2.1.3, but that breaks too many other things.
9377 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9378 echo "$as_me:9378: checking for fseeko" >&5
9379 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9380 if test "${ac_cv_func_fseeko+set}" = set; then
9381   echo $ECHO_N "(cached) $ECHO_C" >&6
9382 else
9383   cat >conftest.$ac_ext <<_ACEOF
9384 #line 9384 "configure"
9385 #include "confdefs.h"
9386 #include <stdio.h>
9387 int
9388 main ()
9389 {
9390 return fseeko && fseeko (stdin, 0, 0);
9391   ;
9392   return 0;
9393 }
9394 _ACEOF
9395 rm -f conftest.$ac_objext conftest$ac_exeext
9396 if { (eval echo "$as_me:9396: \"$ac_link\"") >&5
9397   (eval $ac_link) 2>&5
9398   ac_status=$?
9399   echo "$as_me:9399: \$? = $ac_status" >&5
9400   (exit $ac_status); } &&
9401          { ac_try='test -s conftest$ac_exeext'
9402   { (eval echo "$as_me:9402: \"$ac_try\"") >&5
9403   (eval $ac_try) 2>&5
9404   ac_status=$?
9405   echo "$as_me:9405: \$? = $ac_status" >&5
9406   (exit $ac_status); }; }; then
9407   ac_cv_func_fseeko=yes
9408 else
9409   echo "$as_me: failed program was:" >&5
9410 cat conftest.$ac_ext >&5
9411 ac_cv_func_fseeko=no
9412 fi
9413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9414 fi
9415 echo "$as_me:9415: result: $ac_cv_func_fseeko" >&5
9416 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9417 if test $ac_cv_func_fseeko = yes; then
9418
9419 cat >>confdefs.h <<\EOF
9420 #define HAVE_FSEEKO 1
9421 EOF
9422
9423 fi
9424
9425         # Normally we would collect these definitions in the config.h,
9426         # but (like _XOPEN_SOURCE), some environments rely on having these
9427         # defined before any of the system headers are included.  Another
9428         # case comes up with C++, e.g., on AIX the compiler compiles the
9429         # header files by themselves before looking at the body files it is
9430         # told to compile.  For ncurses, those header files do not include
9431         # the config.h
9432         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9433         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9434         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9435
9436         echo "$as_me:9436: checking whether to use struct dirent64" >&5
9437 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9438 if test "${cf_cv_struct_dirent64+set}" = set; then
9439   echo $ECHO_N "(cached) $ECHO_C" >&6
9440 else
9441
9442                 cat >conftest.$ac_ext <<_ACEOF
9443 #line 9443 "configure"
9444 #include "confdefs.h"
9445
9446 #include <sys/types.h>
9447 #include <dirent.h>
9448
9449 int
9450 main ()
9451 {
9452
9453                 /* if transitional largefile support is setup, this is true */
9454                 extern struct dirent64 * readdir(DIR *);
9455                 struct dirent64 *x = readdir((DIR *)0);
9456                 struct dirent *y = readdir((DIR *)0);
9457                 int z = x - y;
9458
9459   ;
9460   return 0;
9461 }
9462 _ACEOF
9463 rm -f conftest.$ac_objext
9464 if { (eval echo "$as_me:9464: \"$ac_compile\"") >&5
9465   (eval $ac_compile) 2>&5
9466   ac_status=$?
9467   echo "$as_me:9467: \$? = $ac_status" >&5
9468   (exit $ac_status); } &&
9469          { ac_try='test -s conftest.$ac_objext'
9470   { (eval echo "$as_me:9470: \"$ac_try\"") >&5
9471   (eval $ac_try) 2>&5
9472   ac_status=$?
9473   echo "$as_me:9473: \$? = $ac_status" >&5
9474   (exit $ac_status); }; }; then
9475   cf_cv_struct_dirent64=yes
9476 else
9477   echo "$as_me: failed program was:" >&5
9478 cat conftest.$ac_ext >&5
9479 cf_cv_struct_dirent64=no
9480 fi
9481 rm -f conftest.$ac_objext conftest.$ac_ext
9482
9483 fi
9484 echo "$as_me:9484: result: $cf_cv_struct_dirent64" >&5
9485 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9486         test "$cf_cv_struct_dirent64" = yes &&
9487 cat >>confdefs.h <<\EOF
9488 #define HAVE_STRUCT_DIRENT64 1
9489 EOF
9490
9491     fi
9492
9493 ### Enable compiling-in rcs id's
9494 echo "$as_me:9494: checking if RCS identifiers should be compiled-in" >&5
9495 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9496
9497 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9498 if test "${with_rcs_ids+set}" = set; then
9499   withval="$with_rcs_ids"
9500   with_rcs_ids=$withval
9501 else
9502   with_rcs_ids=no
9503 fi;
9504 echo "$as_me:9504: result: $with_rcs_ids" >&5
9505 echo "${ECHO_T}$with_rcs_ids" >&6
9506 test "$with_rcs_ids" = yes &&
9507 cat >>confdefs.h <<\EOF
9508 #define USE_RCS_IDS 1
9509 EOF
9510
9511 ###############################################################################
9512
9513 ### Note that some functions (such as const) are normally disabled anyway.
9514 echo "$as_me:9514: checking if you want to build with function extensions" >&5
9515 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9516
9517 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9518 if test "${enable_ext_funcs+set}" = set; then
9519   enableval="$enable_ext_funcs"
9520   with_ext_funcs=$enableval
9521 else
9522   with_ext_funcs=yes
9523 fi;
9524 echo "$as_me:9524: result: $with_ext_funcs" >&5
9525 echo "${ECHO_T}$with_ext_funcs" >&6
9526 if test "$with_ext_funcs" = yes ; then
9527         NCURSES_EXT_FUNCS=1
9528
9529 cat >>confdefs.h <<\EOF
9530 #define HAVE_USE_DEFAULT_COLORS 1
9531 EOF
9532
9533 cat >>confdefs.h <<\EOF
9534 #define NCURSES_EXT_FUNCS 1
9535 EOF
9536
9537 else
9538         NCURSES_EXT_FUNCS=0
9539 fi
9540
9541 ###   use option --enable-const to turn on use of const beyond that in XSI.
9542 echo "$as_me:9542: checking for extended use of const keyword" >&5
9543 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9544
9545 # Check whether --enable-const or --disable-const was given.
9546 if test "${enable_const+set}" = set; then
9547   enableval="$enable_const"
9548   with_ext_const=$enableval
9549 else
9550   with_ext_const=no
9551 fi;
9552 echo "$as_me:9552: result: $with_ext_const" >&5
9553 echo "${ECHO_T}$with_ext_const" >&6
9554 NCURSES_CONST='/*nothing*/'
9555 if test "$with_ext_const" = yes ; then
9556         NCURSES_CONST=const
9557 fi
9558
9559 ###############################################################################
9560 # These options are relatively safe to experiment with.
9561
9562 echo "$as_me:9562: checking if you want all development code" >&5
9563 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9564
9565 # Check whether --with-develop or --without-develop was given.
9566 if test "${with_develop+set}" = set; then
9567   withval="$with_develop"
9568   with_develop=$withval
9569 else
9570   with_develop=no
9571 fi;
9572 echo "$as_me:9572: result: $with_develop" >&5
9573 echo "${ECHO_T}$with_develop" >&6
9574
9575 ###############################################################################
9576 # These are just experimental, probably should not be in a package:
9577
9578 # This is still experimental (20080329), but should ultimately be moved to
9579 # the script-block --with-normal, etc.
9580
9581 echo "$as_me:9581: checking if you want to link with the pthread library" >&5
9582 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9583
9584 # Check whether --with-pthread or --without-pthread was given.
9585 if test "${with_pthread+set}" = set; then
9586   withval="$with_pthread"
9587   with_pthread=$withval
9588 else
9589   with_pthread=no
9590 fi;
9591 echo "$as_me:9591: result: $with_pthread" >&5
9592 echo "${ECHO_T}$with_pthread" >&6
9593
9594 if test "$with_pthread" != no ; then
9595     echo "$as_me:9595: checking for pthread.h" >&5
9596 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9597 if test "${ac_cv_header_pthread_h+set}" = set; then
9598   echo $ECHO_N "(cached) $ECHO_C" >&6
9599 else
9600   cat >conftest.$ac_ext <<_ACEOF
9601 #line 9601 "configure"
9602 #include "confdefs.h"
9603 #include <pthread.h>
9604 _ACEOF
9605 if { (eval echo "$as_me:9605: \"$ac_cpp conftest.$ac_ext\"") >&5
9606   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9607   ac_status=$?
9608   egrep -v '^ *\+' conftest.er1 >conftest.err
9609   rm -f conftest.er1
9610   cat conftest.err >&5
9611   echo "$as_me:9611: \$? = $ac_status" >&5
9612   (exit $ac_status); } >/dev/null; then
9613   if test -s conftest.err; then
9614     ac_cpp_err=$ac_c_preproc_warn_flag
9615   else
9616     ac_cpp_err=
9617   fi
9618 else
9619   ac_cpp_err=yes
9620 fi
9621 if test -z "$ac_cpp_err"; then
9622   ac_cv_header_pthread_h=yes
9623 else
9624   echo "$as_me: failed program was:" >&5
9625   cat conftest.$ac_ext >&5
9626   ac_cv_header_pthread_h=no
9627 fi
9628 rm -f conftest.err conftest.$ac_ext
9629 fi
9630 echo "$as_me:9630: result: $ac_cv_header_pthread_h" >&5
9631 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9632 if test $ac_cv_header_pthread_h = yes; then
9633
9634 cat >>confdefs.h <<\EOF
9635 #define HAVE_PTHREADS_H 1
9636 EOF
9637
9638         for cf_lib_pthread in pthread c_r
9639         do
9640             echo "$as_me:9640: checking if we can link with the $cf_lib_pthread library" >&5
9641 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
9642             cf_save_LIBS="$LIBS"
9643             LIBS="-l$cf_lib_pthread $LIBS"
9644             cat >conftest.$ac_ext <<_ACEOF
9645 #line 9645 "configure"
9646 #include "confdefs.h"
9647
9648 #include <pthread.h>
9649
9650 int
9651 main ()
9652 {
9653
9654                 int rc = pthread_create(0,0,0,0);
9655                 int r2 = pthread_mutexattr_settype(0, 0);
9656
9657   ;
9658   return 0;
9659 }
9660 _ACEOF
9661 rm -f conftest.$ac_objext conftest$ac_exeext
9662 if { (eval echo "$as_me:9662: \"$ac_link\"") >&5
9663   (eval $ac_link) 2>&5
9664   ac_status=$?
9665   echo "$as_me:9665: \$? = $ac_status" >&5
9666   (exit $ac_status); } &&
9667          { ac_try='test -s conftest$ac_exeext'
9668   { (eval echo "$as_me:9668: \"$ac_try\"") >&5
9669   (eval $ac_try) 2>&5
9670   ac_status=$?
9671   echo "$as_me:9671: \$? = $ac_status" >&5
9672   (exit $ac_status); }; }; then
9673   with_pthread=yes
9674 else
9675   echo "$as_me: failed program was:" >&5
9676 cat conftest.$ac_ext >&5
9677 with_pthread=no
9678 fi
9679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9680             LIBS="$cf_save_LIBS"
9681             echo "$as_me:9681: result: $with_pthread" >&5
9682 echo "${ECHO_T}$with_pthread" >&6
9683             test "$with_pthread" = yes && break
9684         done
9685
9686         if test "$with_pthread" = yes ; then
9687             LIBS="-l$cf_lib_pthread $LIBS"
9688
9689 cat >>confdefs.h <<\EOF
9690 #define HAVE_LIBPTHREADS 1
9691 EOF
9692
9693         else
9694             { { echo "$as_me:9694: error: Cannot link with pthread library" >&5
9695 echo "$as_me: error: Cannot link with pthread library" >&2;}
9696    { (exit 1); exit 1; }; }
9697         fi
9698
9699 fi
9700
9701 fi
9702
9703 echo "$as_me:9703: checking if you want to use weak-symbols for pthreads" >&5
9704 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9705
9706 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9707 if test "${enable_weak_symbols+set}" = set; then
9708   enableval="$enable_weak_symbols"
9709   use_weak_symbols=$withval
9710 else
9711   use_weak_symbols=no
9712 fi;
9713 echo "$as_me:9713: result: $use_weak_symbols" >&5
9714 echo "${ECHO_T}$use_weak_symbols" >&6
9715 if test "$use_weak_symbols" = yes ; then
9716
9717 echo "$as_me:9717: checking if $CC supports weak symbols" >&5
9718 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9719 if test "${cf_cv_weak_symbols+set}" = set; then
9720   echo $ECHO_N "(cached) $ECHO_C" >&6
9721 else
9722
9723 cat >conftest.$ac_ext <<_ACEOF
9724 #line 9724 "configure"
9725 #include "confdefs.h"
9726
9727 #include <stdio.h>
9728 int
9729 main ()
9730 {
9731
9732 #if defined(__GNUC__)
9733 #  if defined __USE_ISOC99
9734 #    define _cat_pragma(exp)    _Pragma(#exp)
9735 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9736 #  else
9737 #    define _weak_pragma(exp)
9738 #  endif
9739 #  define _declare(name)        __extension__ extern __typeof__(name) name
9740 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9741 #endif
9742
9743 weak_symbol(fopen);
9744
9745   ;
9746   return 0;
9747 }
9748 _ACEOF
9749 rm -f conftest.$ac_objext
9750 if { (eval echo "$as_me:9750: \"$ac_compile\"") >&5
9751   (eval $ac_compile) 2>&5
9752   ac_status=$?
9753   echo "$as_me:9753: \$? = $ac_status" >&5
9754   (exit $ac_status); } &&
9755          { ac_try='test -s conftest.$ac_objext'
9756   { (eval echo "$as_me:9756: \"$ac_try\"") >&5
9757   (eval $ac_try) 2>&5
9758   ac_status=$?
9759   echo "$as_me:9759: \$? = $ac_status" >&5
9760   (exit $ac_status); }; }; then
9761   cf_cv_weak_symbols=yes
9762 else
9763   echo "$as_me: failed program was:" >&5
9764 cat conftest.$ac_ext >&5
9765 cf_cv_weak_symbols=no
9766 fi
9767 rm -f conftest.$ac_objext conftest.$ac_ext
9768
9769 fi
9770 echo "$as_me:9770: result: $cf_cv_weak_symbols" >&5
9771 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9772
9773 else
9774     cf_cv_weak_symbols=no
9775 fi
9776
9777 if test $cf_cv_weak_symbols = yes ; then
9778
9779 cat >>confdefs.h <<\EOF
9780 #define USE_WEAK_SYMBOLS 1
9781 EOF
9782
9783 fi
9784
9785 PTHREAD=
9786 if test "$with_pthread" = "yes" ; then
9787
9788 cat >>confdefs.h <<\EOF
9789 #define USE_PTHREADS 1
9790 EOF
9791
9792     enable_reentrant=yes
9793     if test $cf_cv_weak_symbols = yes ; then
9794         PTHREAD=-lpthread
9795     fi
9796 fi
9797
9798 # OpenSUSE is installing ncurses6, using reentrant option.
9799 echo "$as_me:9799: checking for _nc_TABSIZE" >&5
9800 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
9801 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
9802   echo $ECHO_N "(cached) $ECHO_C" >&6
9803 else
9804   cat >conftest.$ac_ext <<_ACEOF
9805 #line 9805 "configure"
9806 #include "confdefs.h"
9807 /* System header to define __stub macros and hopefully few prototypes,
9808     which can conflict with char _nc_TABSIZE (); below.  */
9809 #include <assert.h>
9810 /* Override any gcc2 internal prototype to avoid an error.  */
9811 #ifdef __cplusplus
9812 extern "C"
9813 #endif
9814 /* We use char because int might match the return type of a gcc2
9815    builtin and then its argument prototype would still apply.  */
9816 char _nc_TABSIZE ();
9817 char (*f) ();
9818
9819 int
9820 main ()
9821 {
9822 /* The GNU C library defines this for functions which it implements
9823     to always fail with ENOSYS.  Some functions are actually named
9824     something starting with __ and the normal name is an alias.  */
9825 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
9826 choke me
9827 #else
9828 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9829 #endif
9830
9831   ;
9832   return 0;
9833 }
9834 _ACEOF
9835 rm -f conftest.$ac_objext conftest$ac_exeext
9836 if { (eval echo "$as_me:9836: \"$ac_link\"") >&5
9837   (eval $ac_link) 2>&5
9838   ac_status=$?
9839   echo "$as_me:9839: \$? = $ac_status" >&5
9840   (exit $ac_status); } &&
9841          { ac_try='test -s conftest$ac_exeext'
9842   { (eval echo "$as_me:9842: \"$ac_try\"") >&5
9843   (eval $ac_try) 2>&5
9844   ac_status=$?
9845   echo "$as_me:9845: \$? = $ac_status" >&5
9846   (exit $ac_status); }; }; then
9847   ac_cv_func__nc_TABSIZE=yes
9848 else
9849   echo "$as_me: failed program was:" >&5
9850 cat conftest.$ac_ext >&5
9851 ac_cv_func__nc_TABSIZE=no
9852 fi
9853 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9854 fi
9855 echo "$as_me:9855: result: $ac_cv_func__nc_TABSIZE" >&5
9856 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
9857 if test $ac_cv_func__nc_TABSIZE = yes; then
9858   assume_reentrant=yes
9859 else
9860   assume_reentrant=no
9861 fi
9862
9863 # Reentrant code has to be opaque; there's little advantage to making ncurses
9864 # opaque outside of that, so there is no --enable-opaque option.  We can use
9865 # this option without --with-pthreads, but this will be always set for
9866 # pthreads.
9867 echo "$as_me:9867: checking if you want experimental reentrant code" >&5
9868 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9869
9870 # Check whether --enable-reentrant or --disable-reentrant was given.
9871 if test "${enable_reentrant+set}" = set; then
9872   enableval="$enable_reentrant"
9873   with_reentrant=$enableval
9874 else
9875   with_reentrant=$assume_reentrant
9876 fi;
9877 echo "$as_me:9877: result: $with_reentrant" >&5
9878 echo "${ECHO_T}$with_reentrant" >&6
9879 if test "$with_reentrant" = yes ; then
9880         cf_cv_enable_reentrant=1
9881         if test $cf_cv_weak_symbols = yes ; then
9882
9883 # remove pthread library from $LIBS
9884 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9885
9886         elif test "$assume_reentrant" = no ; then
9887                 LIB_SUFFIX="t${LIB_SUFFIX}"
9888         fi
9889
9890 cat >>confdefs.h <<\EOF
9891 #define USE_REENTRANT 1
9892 EOF
9893
9894 else
9895         cf_cv_enable_reentrant=0
9896 fi
9897
9898 ### Allow using a different wrap-prefix
9899 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9900         echo "$as_me:9900: checking for prefix used to wrap public variables" >&5
9901 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9902
9903 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9904 if test "${with_wrap_prefix+set}" = set; then
9905   withval="$with_wrap_prefix"
9906   NCURSES_WRAP_PREFIX=$withval
9907 else
9908   NCURSES_WRAP_PREFIX=_nc_
9909 fi;
9910         echo "$as_me:9910: result: $NCURSES_WRAP_PREFIX" >&5
9911 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9912 else
9913         NCURSES_WRAP_PREFIX=_nc_
9914 fi
9915
9916 cat >>confdefs.h <<EOF
9917 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
9918 EOF
9919
9920 ###############################################################################
9921
9922 ###     use option --disable-echo to suppress full display compiling commands
9923
9924 echo "$as_me:9924: checking if you want to see long compiling messages" >&5
9925 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
9926
9927 # Check whether --enable-echo or --disable-echo was given.
9928 if test "${enable_echo+set}" = set; then
9929   enableval="$enable_echo"
9930   test "$enableval" != no && enableval=yes
9931   if test "$enableval" != "yes" ; then
9932
9933     ECHO_LT='--silent'
9934     ECHO_LD='@echo linking $@;'
9935     RULE_CC='@echo compiling $<'
9936     SHOW_CC='@echo compiling $@'
9937     ECHO_CC='@'
9938
9939   else
9940
9941     ECHO_LT=''
9942     ECHO_LD=''
9943     RULE_CC=''
9944     SHOW_CC=''
9945     ECHO_CC=''
9946
9947   fi
9948 else
9949   enableval=yes
9950
9951     ECHO_LT=''
9952     ECHO_LD=''
9953     RULE_CC=''
9954     SHOW_CC=''
9955     ECHO_CC=''
9956
9957 fi;
9958 echo "$as_me:9958: result: $enableval" >&5
9959 echo "${ECHO_T}$enableval" >&6
9960
9961 ###     use option --enable-warnings to turn on all gcc warnings
9962 echo "$as_me:9962: checking if you want to see compiler warnings" >&5
9963 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9964
9965 # Check whether --enable-warnings or --disable-warnings was given.
9966 if test "${enable_warnings+set}" = set; then
9967   enableval="$enable_warnings"
9968   with_warnings=$enableval
9969 fi;
9970 echo "$as_me:9970: result: $with_warnings" >&5
9971 echo "${ECHO_T}$with_warnings" >&6
9972
9973 if test "x$with_warnings" = "xyes"; then
9974
9975         ADAFLAGS="$ADAFLAGS -gnatg"
9976
9977 INTEL_COMPILER=no
9978
9979 if test "$GCC" = yes ; then
9980         case $host_os in
9981         linux*|gnu*)
9982                 echo "$as_me:9982: checking if this is really Intel C compiler" >&5
9983 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9984                 cf_save_CFLAGS="$CFLAGS"
9985                 CFLAGS="$CFLAGS -no-gcc"
9986                 cat >conftest.$ac_ext <<_ACEOF
9987 #line 9987 "configure"
9988 #include "confdefs.h"
9989
9990 int
9991 main ()
9992 {
9993
9994 #ifdef __INTEL_COMPILER
9995 #else
9996 make an error
9997 #endif
9998
9999   ;
10000   return 0;
10001 }
10002 _ACEOF
10003 rm -f conftest.$ac_objext
10004 if { (eval echo "$as_me:10004: \"$ac_compile\"") >&5
10005   (eval $ac_compile) 2>&5
10006   ac_status=$?
10007   echo "$as_me:10007: \$? = $ac_status" >&5
10008   (exit $ac_status); } &&
10009          { ac_try='test -s conftest.$ac_objext'
10010   { (eval echo "$as_me:10010: \"$ac_try\"") >&5
10011   (eval $ac_try) 2>&5
10012   ac_status=$?
10013   echo "$as_me:10013: \$? = $ac_status" >&5
10014   (exit $ac_status); }; }; then
10015   INTEL_COMPILER=yes
10016 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
10017
10018 else
10019   echo "$as_me: failed program was:" >&5
10020 cat conftest.$ac_ext >&5
10021 fi
10022 rm -f conftest.$ac_objext conftest.$ac_ext
10023                 CFLAGS="$cf_save_CFLAGS"
10024                 echo "$as_me:10024: result: $INTEL_COMPILER" >&5
10025 echo "${ECHO_T}$INTEL_COMPILER" >&6
10026                 ;;
10027         esac
10028 fi
10029
10030 CLANG_COMPILER=no
10031
10032 if test "$GCC" = yes ; then
10033         echo "$as_me:10033: checking if this is really Clang C compiler" >&5
10034 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
10035         cf_save_CFLAGS="$CFLAGS"
10036         CFLAGS="$CFLAGS -Qunused-arguments"
10037         cat >conftest.$ac_ext <<_ACEOF
10038 #line 10038 "configure"
10039 #include "confdefs.h"
10040
10041 int
10042 main ()
10043 {
10044
10045 #ifdef __clang__
10046 #else
10047 make an error
10048 #endif
10049
10050   ;
10051   return 0;
10052 }
10053 _ACEOF
10054 rm -f conftest.$ac_objext
10055 if { (eval echo "$as_me:10055: \"$ac_compile\"") >&5
10056   (eval $ac_compile) 2>&5
10057   ac_status=$?
10058   echo "$as_me:10058: \$? = $ac_status" >&5
10059   (exit $ac_status); } &&
10060          { ac_try='test -s conftest.$ac_objext'
10061   { (eval echo "$as_me:10061: \"$ac_try\"") >&5
10062   (eval $ac_try) 2>&5
10063   ac_status=$?
10064   echo "$as_me:10064: \$? = $ac_status" >&5
10065   (exit $ac_status); }; }; then
10066   CLANG_COMPILER=yes
10067 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
10068
10069 else
10070   echo "$as_me: failed program was:" >&5
10071 cat conftest.$ac_ext >&5
10072 fi
10073 rm -f conftest.$ac_objext conftest.$ac_ext
10074         CFLAGS="$cf_save_CFLAGS"
10075         echo "$as_me:10075: result: $CLANG_COMPILER" >&5
10076 echo "${ECHO_T}$CLANG_COMPILER" >&6
10077 fi
10078
10079 cat > conftest.$ac_ext <<EOF
10080 #line 10080 "${as_me:-configure}"
10081 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10082 EOF
10083
10084 if test "$INTEL_COMPILER" = yes
10085 then
10086 # The "-wdXXX" options suppress warnings:
10087 # remark #1419: external declaration in primary source file
10088 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10089 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10090 # remark #193: zero used for undefined preprocessing identifier
10091 # remark #593: variable "curs_sb_left_arrow" was set but never used
10092 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10093 # remark #869: parameter "tw" was never referenced
10094 # remark #981: operands are evaluated in unspecified order
10095 # warning #279: controlling expression is constant
10096
10097         { echo "$as_me:10097: checking for $CC warning options..." >&5
10098 echo "$as_me: checking for $CC warning options..." >&6;}
10099         cf_save_CFLAGS="$CFLAGS"
10100         EXTRA_CFLAGS="-Wall"
10101         for cf_opt in \
10102                 wd1419 \
10103                 wd1683 \
10104                 wd1684 \
10105                 wd193 \
10106                 wd593 \
10107                 wd279 \
10108                 wd810 \
10109                 wd869 \
10110                 wd981
10111         do
10112                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10113                 if { (eval echo "$as_me:10113: \"$ac_compile\"") >&5
10114   (eval $ac_compile) 2>&5
10115   ac_status=$?
10116   echo "$as_me:10116: \$? = $ac_status" >&5
10117   (exit $ac_status); }; then
10118                         test -n "$verbose" && echo "$as_me:10118: result: ... -$cf_opt" >&5
10119 echo "${ECHO_T}... -$cf_opt" >&6
10120                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10121                 fi
10122         done
10123         CFLAGS="$cf_save_CFLAGS"
10124
10125 elif test "$GCC" = yes
10126 then
10127         { echo "$as_me:10127: checking for $CC warning options..." >&5
10128 echo "$as_me: checking for $CC warning options..." >&6;}
10129         cf_save_CFLAGS="$CFLAGS"
10130         EXTRA_CFLAGS=
10131         cf_warn_CONST=""
10132         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10133         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
10134         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
10135         for cf_opt in W Wall \
10136                 Wbad-function-cast \
10137                 Wcast-align \
10138                 Wcast-qual \
10139                 Wdeclaration-after-statement \
10140                 Wextra \
10141                 Winline \
10142                 Wmissing-declarations \
10143                 Wmissing-prototypes \
10144                 Wnested-externs \
10145                 Wpointer-arith \
10146                 Wshadow \
10147                 Wstrict-prototypes \
10148                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
10149         do
10150                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10151                 if { (eval echo "$as_me:10151: \"$ac_compile\"") >&5
10152   (eval $ac_compile) 2>&5
10153   ac_status=$?
10154   echo "$as_me:10154: \$? = $ac_status" >&5
10155   (exit $ac_status); }; then
10156                         test -n "$verbose" && echo "$as_me:10156: result: ... -$cf_opt" >&5
10157 echo "${ECHO_T}... -$cf_opt" >&6
10158                         case $cf_opt in #(vi
10159                         Wcast-qual) #(vi
10160                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10161                                 ;;
10162                         Winline) #(vi
10163                                 case $GCC_VERSION in
10164                                 [34].*)
10165                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10166
10167 echo "${as_me:-configure}:10167: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10168
10169                                         continue;;
10170                                 esac
10171                                 ;;
10172                         Wpointer-arith) #(vi
10173                                 case $GCC_VERSION in
10174                                 [12].*)
10175                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10176
10177 echo "${as_me:-configure}:10177: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10178
10179                                         continue;;
10180                                 esac
10181                                 ;;
10182                         esac
10183                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10184                 fi
10185         done
10186         CFLAGS="$cf_save_CFLAGS"
10187 fi
10188 rm -rf conftest*
10189
10190 fi
10191
10192 if test "$GCC" = yes
10193 then
10194 cat > conftest.i <<EOF
10195 #ifndef GCC_PRINTF
10196 #define GCC_PRINTF 0
10197 #endif
10198 #ifndef GCC_SCANF
10199 #define GCC_SCANF 0
10200 #endif
10201 #ifndef GCC_NORETURN
10202 #define GCC_NORETURN /* nothing */
10203 #endif
10204 #ifndef GCC_UNUSED
10205 #define GCC_UNUSED /* nothing */
10206 #endif
10207 EOF
10208 if test "$GCC" = yes
10209 then
10210         { echo "$as_me:10210: checking for $CC __attribute__ directives..." >&5
10211 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10212 cat > conftest.$ac_ext <<EOF
10213 #line 10213 "${as_me:-configure}"
10214 #include "confdefs.h"
10215 #include "conftest.h"
10216 #include "conftest.i"
10217 #if     GCC_PRINTF
10218 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10219 #else
10220 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10221 #endif
10222 #if     GCC_SCANF
10223 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10224 #else
10225 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10226 #endif
10227 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10228 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10229 extern void foo(void) GCC_NORETURN;
10230 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10231 EOF
10232         cf_printf_attribute=no
10233         cf_scanf_attribute=no
10234         for cf_attribute in scanf printf unused noreturn
10235         do
10236
10237 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10238
10239                 cf_directive="__attribute__(($cf_attribute))"
10240                 echo "checking for $CC $cf_directive" 1>&5
10241
10242                 case $cf_attribute in #(vi
10243                 printf) #(vi
10244                         cf_printf_attribute=yes
10245                         cat >conftest.h <<EOF
10246 #define GCC_$cf_ATTRIBUTE 1
10247 EOF
10248                         ;;
10249                 scanf) #(vi
10250                         cf_scanf_attribute=yes
10251                         cat >conftest.h <<EOF
10252 #define GCC_$cf_ATTRIBUTE 1
10253 EOF
10254                         ;;
10255                 *) #(vi
10256                         cat >conftest.h <<EOF
10257 #define GCC_$cf_ATTRIBUTE $cf_directive
10258 EOF
10259                         ;;
10260                 esac
10261
10262                 if { (eval echo "$as_me:10262: \"$ac_compile\"") >&5
10263   (eval $ac_compile) 2>&5
10264   ac_status=$?
10265   echo "$as_me:10265: \$? = $ac_status" >&5
10266   (exit $ac_status); }; then
10267                         test -n "$verbose" && echo "$as_me:10267: result: ... $cf_attribute" >&5
10268 echo "${ECHO_T}... $cf_attribute" >&6
10269                         cat conftest.h >>confdefs.h
10270                         case $cf_attribute in #(vi
10271                         noreturn) #(vi
10272
10273 cat >>confdefs.h <<EOF
10274 #define GCC_NORETURN $cf_directive
10275 EOF
10276
10277                                 ;;
10278                         printf) #(vi
10279                                 cf_value='/* nothing */'
10280                                 if test "$cf_printf_attribute" != no ; then
10281                                         cf_value='__attribute__((format(printf,fmt,var)))'
10282
10283 cat >>confdefs.h <<\EOF
10284 #define GCC_PRINTF 1
10285 EOF
10286
10287                                 fi
10288
10289 cat >>confdefs.h <<EOF
10290 #define GCC_PRINTFLIKE(fmt,var) $cf_value
10291 EOF
10292
10293                                 ;;
10294                         scanf) #(vi
10295                                 cf_value='/* nothing */'
10296                                 if test "$cf_scanf_attribute" != no ; then
10297                                         cf_value='__attribute__((format(scanf,fmt,var)))'
10298
10299 cat >>confdefs.h <<\EOF
10300 #define GCC_SCANF 1
10301 EOF
10302
10303                                 fi
10304
10305 cat >>confdefs.h <<EOF
10306 #define GCC_SCANFLIKE(fmt,var) $cf_value
10307 EOF
10308
10309                                 ;;
10310                         unused) #(vi
10311
10312 cat >>confdefs.h <<EOF
10313 #define GCC_UNUSED $cf_directive
10314 EOF
10315
10316                                 ;;
10317                         esac
10318                 fi
10319         done
10320 else
10321         fgrep define conftest.i >>confdefs.h
10322 fi
10323 rm -rf conftest*
10324 fi
10325
10326 ###     use option --enable-assertions to turn on generation of assertion code
10327 echo "$as_me:10327: checking if you want to enable runtime assertions" >&5
10328 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10329
10330 # Check whether --enable-assertions or --disable-assertions was given.
10331 if test "${enable_assertions+set}" = set; then
10332   enableval="$enable_assertions"
10333   with_assertions=$enableval
10334 else
10335   with_assertions=no
10336 fi;
10337 echo "$as_me:10337: result: $with_assertions" >&5
10338 echo "${ECHO_T}$with_assertions" >&6
10339 if test -n "$GCC"
10340 then
10341         if test "$with_assertions" = no
10342         then
10343                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10344         else
10345
10346         ADAFLAGS="$ADAFLAGS -gnata"
10347
10348         fi
10349 fi
10350
10351 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10352
10353 cat >>confdefs.h <<\EOF
10354 #define HAVE_NC_ALLOC_H 1
10355 EOF
10356
10357 ###     use option --enable-expanded to generate certain macros as functions
10358
10359 # Check whether --enable-expanded or --disable-expanded was given.
10360 if test "${enable_expanded+set}" = set; then
10361   enableval="$enable_expanded"
10362   test "$enableval" = yes &&
10363 cat >>confdefs.h <<\EOF
10364 #define NCURSES_EXPANDED 1
10365 EOF
10366
10367 fi;
10368
10369 ###     use option --disable-macros to suppress macros in favor of functions
10370
10371 # Check whether --enable-macros or --disable-macros was given.
10372 if test "${enable_macros+set}" = set; then
10373   enableval="$enable_macros"
10374   test "$enableval" = no &&
10375 cat >>confdefs.h <<\EOF
10376 #define NCURSES_NOMACROS 1
10377 EOF
10378
10379 fi;
10380
10381 # Normally we only add trace() to the debug-library.  Allow this to be
10382 # extended to all models of the ncurses library:
10383 cf_all_traces=no
10384 case "$CFLAGS $CPPFLAGS" in
10385 *-DTRACE*)
10386         cf_all_traces=yes
10387         ;;
10388 esac
10389
10390 echo "$as_me:10390: checking whether to add trace feature to all models" >&5
10391 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10392
10393 # Check whether --with-trace or --without-trace was given.
10394 if test "${with_trace+set}" = set; then
10395   withval="$with_trace"
10396   cf_with_trace=$withval
10397 else
10398   cf_with_trace=$cf_all_traces
10399 fi;
10400 echo "$as_me:10400: result: $cf_with_trace" >&5
10401 echo "${ECHO_T}$cf_with_trace" >&6
10402
10403 if test "$cf_with_trace" = yes ; then
10404         ADA_TRACE=TRUE
10405
10406 cf_fix_cppflags=no
10407 cf_new_cflags=
10408 cf_new_cppflags=
10409 cf_new_extra_cppflags=
10410
10411 for cf_add_cflags in -DTRACE
10412 do
10413 case $cf_fix_cppflags in
10414 no)
10415         case $cf_add_cflags in #(vi
10416         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10417                 case $cf_add_cflags in
10418                 -D*)
10419                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10420
10421                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10422                                 && test -z "${cf_tst_cflags}" \
10423                                 && cf_fix_cppflags=yes
10424
10425                         if test $cf_fix_cppflags = yes ; then
10426                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10427                                 continue
10428                         elif test "${cf_tst_cflags}" = "\"'" ; then
10429                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10430                                 continue
10431                         fi
10432                         ;;
10433                 esac
10434                 case "$CPPFLAGS" in
10435                 *$cf_add_cflags) #(vi
10436                         ;;
10437                 *) #(vi
10438                         case $cf_add_cflags in #(vi
10439                         -D*)
10440                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10441
10442 CPPFLAGS=`echo "$CPPFLAGS" | \
10443         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10444                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10445
10446                                 ;;
10447                         esac
10448                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10449                         ;;
10450                 esac
10451                 ;;
10452         *)
10453                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10454                 ;;
10455         esac
10456         ;;
10457 yes)
10458         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10459
10460         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10461
10462         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10463                 && test -z "${cf_tst_cflags}" \
10464                 && cf_fix_cppflags=no
10465         ;;
10466 esac
10467 done
10468
10469 if test -n "$cf_new_cflags" ; then
10470
10471         CFLAGS="$CFLAGS $cf_new_cflags"
10472 fi
10473
10474 if test -n "$cf_new_cppflags" ; then
10475
10476         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10477 fi
10478
10479 if test -n "$cf_new_extra_cppflags" ; then
10480
10481         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10482 fi
10483
10484 else
10485         ADA_TRACE=FALSE
10486 fi
10487
10488 echo "$as_me:10488: checking if we want to use GNAT projects" >&5
10489 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
10490
10491 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
10492 if test "${enable_gnat_projects+set}" = set; then
10493   enableval="$enable_gnat_projects"
10494   test "$enableval" != no && enableval=yes
10495   if test "$enableval" != "yes" ; then
10496     enable_gnat_projects=no
10497   else
10498     enable_gnat_projects=yes
10499   fi
10500 else
10501   enableval=yes
10502   enable_gnat_projects=yes
10503
10504 fi;
10505 echo "$as_me:10505: result: $enable_gnat_projects" >&5
10506 echo "${ECHO_T}$enable_gnat_projects" >&6
10507
10508 ###     Checks for libraries.
10509 case $cf_cv_system_name in #(vi
10510 *mingw32*) #(vi
10511         ;;
10512 *)
10513 echo "$as_me:10513: checking for gettimeofday" >&5
10514 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10515 if test "${ac_cv_func_gettimeofday+set}" = set; then
10516   echo $ECHO_N "(cached) $ECHO_C" >&6
10517 else
10518   cat >conftest.$ac_ext <<_ACEOF
10519 #line 10519 "configure"
10520 #include "confdefs.h"
10521 /* System header to define __stub macros and hopefully few prototypes,
10522     which can conflict with char gettimeofday (); below.  */
10523 #include <assert.h>
10524 /* Override any gcc2 internal prototype to avoid an error.  */
10525 #ifdef __cplusplus
10526 extern "C"
10527 #endif
10528 /* We use char because int might match the return type of a gcc2
10529    builtin and then its argument prototype would still apply.  */
10530 char gettimeofday ();
10531 char (*f) ();
10532
10533 int
10534 main ()
10535 {
10536 /* The GNU C library defines this for functions which it implements
10537     to always fail with ENOSYS.  Some functions are actually named
10538     something starting with __ and the normal name is an alias.  */
10539 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10540 choke me
10541 #else
10542 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10543 #endif
10544
10545   ;
10546   return 0;
10547 }
10548 _ACEOF
10549 rm -f conftest.$ac_objext conftest$ac_exeext
10550 if { (eval echo "$as_me:10550: \"$ac_link\"") >&5
10551   (eval $ac_link) 2>&5
10552   ac_status=$?
10553   echo "$as_me:10553: \$? = $ac_status" >&5
10554   (exit $ac_status); } &&
10555          { ac_try='test -s conftest$ac_exeext'
10556   { (eval echo "$as_me:10556: \"$ac_try\"") >&5
10557   (eval $ac_try) 2>&5
10558   ac_status=$?
10559   echo "$as_me:10559: \$? = $ac_status" >&5
10560   (exit $ac_status); }; }; then
10561   ac_cv_func_gettimeofday=yes
10562 else
10563   echo "$as_me: failed program was:" >&5
10564 cat conftest.$ac_ext >&5
10565 ac_cv_func_gettimeofday=no
10566 fi
10567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10568 fi
10569 echo "$as_me:10569: result: $ac_cv_func_gettimeofday" >&5
10570 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10571 if test $ac_cv_func_gettimeofday = yes; then
10572   cat >>confdefs.h <<\EOF
10573 #define HAVE_GETTIMEOFDAY 1
10574 EOF
10575
10576 else
10577
10578 echo "$as_me:10578: checking for gettimeofday in -lbsd" >&5
10579 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10580 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10581   echo $ECHO_N "(cached) $ECHO_C" >&6
10582 else
10583   ac_check_lib_save_LIBS=$LIBS
10584 LIBS="-lbsd  $LIBS"
10585 cat >conftest.$ac_ext <<_ACEOF
10586 #line 10586 "configure"
10587 #include "confdefs.h"
10588
10589 /* Override any gcc2 internal prototype to avoid an error.  */
10590 #ifdef __cplusplus
10591 extern "C"
10592 #endif
10593 /* We use char because int might match the return type of a gcc2
10594    builtin and then its argument prototype would still apply.  */
10595 char gettimeofday ();
10596 int
10597 main ()
10598 {
10599 gettimeofday ();
10600   ;
10601   return 0;
10602 }
10603 _ACEOF
10604 rm -f conftest.$ac_objext conftest$ac_exeext
10605 if { (eval echo "$as_me:10605: \"$ac_link\"") >&5
10606   (eval $ac_link) 2>&5
10607   ac_status=$?
10608   echo "$as_me:10608: \$? = $ac_status" >&5
10609   (exit $ac_status); } &&
10610          { ac_try='test -s conftest$ac_exeext'
10611   { (eval echo "$as_me:10611: \"$ac_try\"") >&5
10612   (eval $ac_try) 2>&5
10613   ac_status=$?
10614   echo "$as_me:10614: \$? = $ac_status" >&5
10615   (exit $ac_status); }; }; then
10616   ac_cv_lib_bsd_gettimeofday=yes
10617 else
10618   echo "$as_me: failed program was:" >&5
10619 cat conftest.$ac_ext >&5
10620 ac_cv_lib_bsd_gettimeofday=no
10621 fi
10622 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10623 LIBS=$ac_check_lib_save_LIBS
10624 fi
10625 echo "$as_me:10625: result: $ac_cv_lib_bsd_gettimeofday" >&5
10626 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10627 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10628
10629 cat >>confdefs.h <<\EOF
10630 #define HAVE_GETTIMEOFDAY 1
10631 EOF
10632
10633         LIBS="$LIBS -lbsd"
10634 fi
10635
10636 fi
10637         ;;
10638 esac
10639
10640 ###     Checks for header files.
10641 echo "$as_me:10641: checking for ANSI C header files" >&5
10642 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10643 if test "${ac_cv_header_stdc+set}" = set; then
10644   echo $ECHO_N "(cached) $ECHO_C" >&6
10645 else
10646   cat >conftest.$ac_ext <<_ACEOF
10647 #line 10647 "configure"
10648 #include "confdefs.h"
10649 #include <stdlib.h>
10650 #include <stdarg.h>
10651 #include <string.h>
10652 #include <float.h>
10653
10654 _ACEOF
10655 if { (eval echo "$as_me:10655: \"$ac_cpp conftest.$ac_ext\"") >&5
10656   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10657   ac_status=$?
10658   egrep -v '^ *\+' conftest.er1 >conftest.err
10659   rm -f conftest.er1
10660   cat conftest.err >&5
10661   echo "$as_me:10661: \$? = $ac_status" >&5
10662   (exit $ac_status); } >/dev/null; then
10663   if test -s conftest.err; then
10664     ac_cpp_err=$ac_c_preproc_warn_flag
10665   else
10666     ac_cpp_err=
10667   fi
10668 else
10669   ac_cpp_err=yes
10670 fi
10671 if test -z "$ac_cpp_err"; then
10672   ac_cv_header_stdc=yes
10673 else
10674   echo "$as_me: failed program was:" >&5
10675   cat conftest.$ac_ext >&5
10676   ac_cv_header_stdc=no
10677 fi
10678 rm -f conftest.err conftest.$ac_ext
10679
10680 if test $ac_cv_header_stdc = yes; then
10681   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10682   cat >conftest.$ac_ext <<_ACEOF
10683 #line 10683 "configure"
10684 #include "confdefs.h"
10685 #include <string.h>
10686
10687 _ACEOF
10688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10689   egrep "memchr" >/dev/null 2>&1; then
10690   :
10691 else
10692   ac_cv_header_stdc=no
10693 fi
10694 rm -rf conftest*
10695
10696 fi
10697
10698 if test $ac_cv_header_stdc = yes; then
10699   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10700   cat >conftest.$ac_ext <<_ACEOF
10701 #line 10701 "configure"
10702 #include "confdefs.h"
10703 #include <stdlib.h>
10704
10705 _ACEOF
10706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10707   egrep "free" >/dev/null 2>&1; then
10708   :
10709 else
10710   ac_cv_header_stdc=no
10711 fi
10712 rm -rf conftest*
10713
10714 fi
10715
10716 if test $ac_cv_header_stdc = yes; then
10717   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10718   if test "$cross_compiling" = yes; then
10719   :
10720 else
10721   cat >conftest.$ac_ext <<_ACEOF
10722 #line 10722 "configure"
10723 #include "confdefs.h"
10724 #include <ctype.h>
10725 #if ((' ' & 0x0FF) == 0x020)
10726 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10727 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10728 #else
10729 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10730                      || ('j' <= (c) && (c) <= 'r') \
10731                      || ('s' <= (c) && (c) <= 'z'))
10732 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10733 #endif
10734
10735 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10736 int
10737 main ()
10738 {
10739   int i;
10740   for (i = 0; i < 256; i++)
10741     if (XOR (islower (i), ISLOWER (i))
10742         || toupper (i) != TOUPPER (i))
10743       $ac_main_return(2);
10744   $ac_main_return (0);
10745 }
10746 _ACEOF
10747 rm -f conftest$ac_exeext
10748 if { (eval echo "$as_me:10748: \"$ac_link\"") >&5
10749   (eval $ac_link) 2>&5
10750   ac_status=$?
10751   echo "$as_me:10751: \$? = $ac_status" >&5
10752   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10753   { (eval echo "$as_me:10753: \"$ac_try\"") >&5
10754   (eval $ac_try) 2>&5
10755   ac_status=$?
10756   echo "$as_me:10756: \$? = $ac_status" >&5
10757   (exit $ac_status); }; }; then
10758   :
10759 else
10760   echo "$as_me: program exited with status $ac_status" >&5
10761 echo "$as_me: failed program was:" >&5
10762 cat conftest.$ac_ext >&5
10763 ac_cv_header_stdc=no
10764 fi
10765 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10766 fi
10767 fi
10768 fi
10769 echo "$as_me:10769: result: $ac_cv_header_stdc" >&5
10770 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10771 if test $ac_cv_header_stdc = yes; then
10772
10773 cat >>confdefs.h <<\EOF
10774 #define STDC_HEADERS 1
10775 EOF
10776
10777 fi
10778
10779 ac_header_dirent=no
10780 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10781   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10782 echo "$as_me:10782: checking for $ac_hdr that defines DIR" >&5
10783 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10784 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10785   echo $ECHO_N "(cached) $ECHO_C" >&6
10786 else
10787   cat >conftest.$ac_ext <<_ACEOF
10788 #line 10788 "configure"
10789 #include "confdefs.h"
10790 #include <sys/types.h>
10791 #include <$ac_hdr>
10792
10793 int
10794 main ()
10795 {
10796 if ((DIR *) 0)
10797 return 0;
10798   ;
10799   return 0;
10800 }
10801 _ACEOF
10802 rm -f conftest.$ac_objext
10803 if { (eval echo "$as_me:10803: \"$ac_compile\"") >&5
10804   (eval $ac_compile) 2>&5
10805   ac_status=$?
10806   echo "$as_me:10806: \$? = $ac_status" >&5
10807   (exit $ac_status); } &&
10808          { ac_try='test -s conftest.$ac_objext'
10809   { (eval echo "$as_me:10809: \"$ac_try\"") >&5
10810   (eval $ac_try) 2>&5
10811   ac_status=$?
10812   echo "$as_me:10812: \$? = $ac_status" >&5
10813   (exit $ac_status); }; }; then
10814   eval "$as_ac_Header=yes"
10815 else
10816   echo "$as_me: failed program was:" >&5
10817 cat conftest.$ac_ext >&5
10818 eval "$as_ac_Header=no"
10819 fi
10820 rm -f conftest.$ac_objext conftest.$ac_ext
10821 fi
10822 echo "$as_me:10822: result: `eval echo '${'$as_ac_Header'}'`" >&5
10823 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10824 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10825   cat >>confdefs.h <<EOF
10826 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10827 EOF
10828
10829 ac_header_dirent=$ac_hdr; break
10830 fi
10831
10832 done
10833 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10834 if test $ac_header_dirent = dirent.h; then
10835   echo "$as_me:10835: checking for opendir in -ldir" >&5
10836 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10837 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10838   echo $ECHO_N "(cached) $ECHO_C" >&6
10839 else
10840   ac_check_lib_save_LIBS=$LIBS
10841 LIBS="-ldir  $LIBS"
10842 cat >conftest.$ac_ext <<_ACEOF
10843 #line 10843 "configure"
10844 #include "confdefs.h"
10845
10846 /* Override any gcc2 internal prototype to avoid an error.  */
10847 #ifdef __cplusplus
10848 extern "C"
10849 #endif
10850 /* We use char because int might match the return type of a gcc2
10851    builtin and then its argument prototype would still apply.  */
10852 char opendir ();
10853 int
10854 main ()
10855 {
10856 opendir ();
10857   ;
10858   return 0;
10859 }
10860 _ACEOF
10861 rm -f conftest.$ac_objext 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); } &&
10867          { ac_try='test -s conftest$ac_exeext'
10868   { (eval echo "$as_me:10868: \"$ac_try\"") >&5
10869   (eval $ac_try) 2>&5
10870   ac_status=$?
10871   echo "$as_me:10871: \$? = $ac_status" >&5
10872   (exit $ac_status); }; }; then
10873   ac_cv_lib_dir_opendir=yes
10874 else
10875   echo "$as_me: failed program was:" >&5
10876 cat conftest.$ac_ext >&5
10877 ac_cv_lib_dir_opendir=no
10878 fi
10879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10880 LIBS=$ac_check_lib_save_LIBS
10881 fi
10882 echo "$as_me:10882: result: $ac_cv_lib_dir_opendir" >&5
10883 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10884 if test $ac_cv_lib_dir_opendir = yes; then
10885   LIBS="$LIBS -ldir"
10886 fi
10887
10888 else
10889   echo "$as_me:10889: checking for opendir in -lx" >&5
10890 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10891 if test "${ac_cv_lib_x_opendir+set}" = set; then
10892   echo $ECHO_N "(cached) $ECHO_C" >&6
10893 else
10894   ac_check_lib_save_LIBS=$LIBS
10895 LIBS="-lx  $LIBS"
10896 cat >conftest.$ac_ext <<_ACEOF
10897 #line 10897 "configure"
10898 #include "confdefs.h"
10899
10900 /* Override any gcc2 internal prototype to avoid an error.  */
10901 #ifdef __cplusplus
10902 extern "C"
10903 #endif
10904 /* We use char because int might match the return type of a gcc2
10905    builtin and then its argument prototype would still apply.  */
10906 char opendir ();
10907 int
10908 main ()
10909 {
10910 opendir ();
10911   ;
10912   return 0;
10913 }
10914 _ACEOF
10915 rm -f conftest.$ac_objext conftest$ac_exeext
10916 if { (eval echo "$as_me:10916: \"$ac_link\"") >&5
10917   (eval $ac_link) 2>&5
10918   ac_status=$?
10919   echo "$as_me:10919: \$? = $ac_status" >&5
10920   (exit $ac_status); } &&
10921          { ac_try='test -s conftest$ac_exeext'
10922   { (eval echo "$as_me:10922: \"$ac_try\"") >&5
10923   (eval $ac_try) 2>&5
10924   ac_status=$?
10925   echo "$as_me:10925: \$? = $ac_status" >&5
10926   (exit $ac_status); }; }; then
10927   ac_cv_lib_x_opendir=yes
10928 else
10929   echo "$as_me: failed program was:" >&5
10930 cat conftest.$ac_ext >&5
10931 ac_cv_lib_x_opendir=no
10932 fi
10933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10934 LIBS=$ac_check_lib_save_LIBS
10935 fi
10936 echo "$as_me:10936: result: $ac_cv_lib_x_opendir" >&5
10937 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10938 if test $ac_cv_lib_x_opendir = yes; then
10939   LIBS="$LIBS -lx"
10940 fi
10941
10942 fi
10943
10944 echo "$as_me:10944: checking whether time.h and sys/time.h may both be included" >&5
10945 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10946 if test "${ac_cv_header_time+set}" = set; then
10947   echo $ECHO_N "(cached) $ECHO_C" >&6
10948 else
10949   cat >conftest.$ac_ext <<_ACEOF
10950 #line 10950 "configure"
10951 #include "confdefs.h"
10952 #include <sys/types.h>
10953 #include <sys/time.h>
10954 #include <time.h>
10955
10956 int
10957 main ()
10958 {
10959 if ((struct tm *) 0)
10960 return 0;
10961   ;
10962   return 0;
10963 }
10964 _ACEOF
10965 rm -f conftest.$ac_objext
10966 if { (eval echo "$as_me:10966: \"$ac_compile\"") >&5
10967   (eval $ac_compile) 2>&5
10968   ac_status=$?
10969   echo "$as_me:10969: \$? = $ac_status" >&5
10970   (exit $ac_status); } &&
10971          { ac_try='test -s conftest.$ac_objext'
10972   { (eval echo "$as_me:10972: \"$ac_try\"") >&5
10973   (eval $ac_try) 2>&5
10974   ac_status=$?
10975   echo "$as_me:10975: \$? = $ac_status" >&5
10976   (exit $ac_status); }; }; then
10977   ac_cv_header_time=yes
10978 else
10979   echo "$as_me: failed program was:" >&5
10980 cat conftest.$ac_ext >&5
10981 ac_cv_header_time=no
10982 fi
10983 rm -f conftest.$ac_objext conftest.$ac_ext
10984 fi
10985 echo "$as_me:10985: result: $ac_cv_header_time" >&5
10986 echo "${ECHO_T}$ac_cv_header_time" >&6
10987 if test $ac_cv_header_time = yes; then
10988
10989 cat >>confdefs.h <<\EOF
10990 #define TIME_WITH_SYS_TIME 1
10991 EOF
10992
10993 fi
10994
10995 ###     checks for compiler characteristics
10996 ac_ext=c
10997 ac_cpp='$CPP $CPPFLAGS'
10998 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10999 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11000 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11001 ac_main_return=return
11002
11003 echo "$as_me:11003: checking for an ANSI C-conforming const" >&5
11004 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11005 if test "${ac_cv_c_const+set}" = set; then
11006   echo $ECHO_N "(cached) $ECHO_C" >&6
11007 else
11008   cat >conftest.$ac_ext <<_ACEOF
11009 #line 11009 "configure"
11010 #include "confdefs.h"
11011
11012 int
11013 main ()
11014 {
11015 /* FIXME: Include the comments suggested by Paul. */
11016 #ifndef __cplusplus
11017   /* Ultrix mips cc rejects this.  */
11018   typedef int charset[2];
11019   const charset x;
11020   /* SunOS 4.1.1 cc rejects this.  */
11021   char const *const *ccp;
11022   char **p;
11023   /* NEC SVR4.0.2 mips cc rejects this.  */
11024   struct point {int x, y;};
11025   static struct point const zero = {0,0};
11026   /* AIX XL C 1.02.0.0 rejects this.
11027      It does not let you subtract one const X* pointer from another in
11028      an arm of an if-expression whose if-part is not a constant
11029      expression */
11030   const char *g = "string";
11031   ccp = &g + (g ? g-g : 0);
11032   /* HPUX 7.0 cc rejects these. */
11033   ++ccp;
11034   p = (char**) ccp;
11035   ccp = (char const *const *) p;
11036   { /* SCO 3.2v4 cc rejects this.  */
11037     char *t;
11038     char const *s = 0 ? (char *) 0 : (char const *) 0;
11039
11040     *t++ = 0;
11041   }
11042   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11043     int x[] = {25, 17};
11044     const int *foo = &x[0];
11045     ++foo;
11046   }
11047   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11048     typedef const int *iptr;
11049     iptr p = 0;
11050     ++p;
11051   }
11052   { /* AIX XL C 1.02.0.0 rejects this saying
11053        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11054     struct s { int j; const int *ap[3]; };
11055     struct s *b; b->j = 5;
11056   }
11057   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11058     const int foo = 10;
11059   }
11060 #endif
11061
11062   ;
11063   return 0;
11064 }
11065 _ACEOF
11066 rm -f conftest.$ac_objext
11067 if { (eval echo "$as_me:11067: \"$ac_compile\"") >&5
11068   (eval $ac_compile) 2>&5
11069   ac_status=$?
11070   echo "$as_me:11070: \$? = $ac_status" >&5
11071   (exit $ac_status); } &&
11072          { ac_try='test -s conftest.$ac_objext'
11073   { (eval echo "$as_me:11073: \"$ac_try\"") >&5
11074   (eval $ac_try) 2>&5
11075   ac_status=$?
11076   echo "$as_me:11076: \$? = $ac_status" >&5
11077   (exit $ac_status); }; }; then
11078   ac_cv_c_const=yes
11079 else
11080   echo "$as_me: failed program was:" >&5
11081 cat conftest.$ac_ext >&5
11082 ac_cv_c_const=no
11083 fi
11084 rm -f conftest.$ac_objext conftest.$ac_ext
11085 fi
11086 echo "$as_me:11086: result: $ac_cv_c_const" >&5
11087 echo "${ECHO_T}$ac_cv_c_const" >&6
11088 if test $ac_cv_c_const = no; then
11089
11090 cat >>confdefs.h <<\EOF
11091 #define const
11092 EOF
11093
11094 fi
11095
11096 ###     Checks for external-data
11097
11098 echo "$as_me:11098: checking if data-only library module links" >&5
11099 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11100 if test "${cf_cv_link_dataonly+set}" = set; then
11101   echo $ECHO_N "(cached) $ECHO_C" >&6
11102 else
11103
11104         rm -f conftest.a
11105         cat >conftest.$ac_ext <<EOF
11106 #line 11106 "configure"
11107 int     testdata[3] = { 123, 456, 789 };
11108 EOF
11109         if { (eval echo "$as_me:11109: \"$ac_compile\"") >&5
11110   (eval $ac_compile) 2>&5
11111   ac_status=$?
11112   echo "$as_me:11112: \$? = $ac_status" >&5
11113   (exit $ac_status); } ; then
11114                 mv conftest.o data.o && \
11115                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
11116         fi
11117         rm -f conftest.$ac_ext data.o
11118         cat >conftest.$ac_ext <<EOF
11119 #line 11119 "configure"
11120 int     testfunc()
11121 {
11122 #if defined(NeXT)
11123         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11124 #else
11125         extern int testdata[3];
11126         return testdata[0] == 123
11127            &&  testdata[1] == 456
11128            &&  testdata[2] == 789;
11129 #endif
11130 }
11131 EOF
11132         if { (eval echo "$as_me:11132: \"$ac_compile\"") >&5
11133   (eval $ac_compile) 2>&5
11134   ac_status=$?
11135   echo "$as_me:11135: \$? = $ac_status" >&5
11136   (exit $ac_status); }; then
11137                 mv conftest.o func.o && \
11138                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
11139         fi
11140         rm -f conftest.$ac_ext func.o
11141         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11142         cf_saveLIBS="$LIBS"
11143         LIBS="conftest.a $LIBS"
11144         if test "$cross_compiling" = yes; then
11145   cf_cv_link_dataonly=unknown
11146 else
11147   cat >conftest.$ac_ext <<_ACEOF
11148 #line 11148 "configure"
11149 #include "confdefs.h"
11150
11151         int main()
11152         {
11153                 extern int testfunc();
11154                 ${cf_cv_main_return:-return} (!testfunc());
11155         }
11156
11157 _ACEOF
11158 rm -f conftest$ac_exeext
11159 if { (eval echo "$as_me:11159: \"$ac_link\"") >&5
11160   (eval $ac_link) 2>&5
11161   ac_status=$?
11162   echo "$as_me:11162: \$? = $ac_status" >&5
11163   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11164   { (eval echo "$as_me:11164: \"$ac_try\"") >&5
11165   (eval $ac_try) 2>&5
11166   ac_status=$?
11167   echo "$as_me:11167: \$? = $ac_status" >&5
11168   (exit $ac_status); }; }; then
11169   cf_cv_link_dataonly=yes
11170 else
11171   echo "$as_me: program exited with status $ac_status" >&5
11172 echo "$as_me: failed program was:" >&5
11173 cat conftest.$ac_ext >&5
11174 cf_cv_link_dataonly=no
11175 fi
11176 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11177 fi
11178         LIBS="$cf_saveLIBS"
11179
11180 fi
11181
11182 echo "$as_me:11182: result: $cf_cv_link_dataonly" >&5
11183 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11184
11185 if test "$cf_cv_link_dataonly" = no ; then
11186
11187 cat >>confdefs.h <<\EOF
11188 #define BROKEN_LINKER 1
11189 EOF
11190
11191         BROKEN_LINKER=1
11192 fi
11193
11194 ###     Checks for library functions.
11195
11196 echo "$as_me:11196: checking for working mkstemp" >&5
11197 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
11198 if test "${cf_cv_func_mkstemp+set}" = set; then
11199   echo $ECHO_N "(cached) $ECHO_C" >&6
11200 else
11201
11202 rm -rf conftest*
11203 if test "$cross_compiling" = yes; then
11204   cf_cv_func_mkstemp=maybe
11205 else
11206   cat >conftest.$ac_ext <<_ACEOF
11207 #line 11207 "configure"
11208 #include "confdefs.h"
11209
11210 #include <sys/types.h>
11211 #include <stdlib.h>
11212 #include <stdio.h>
11213 #include <string.h>
11214 #include <sys/stat.h>
11215 int main()
11216 {
11217         char *tmpl = "conftestXXXXXX";
11218         char name[2][80];
11219         int n;
11220         int result = 0;
11221         int fd;
11222         struct stat sb;
11223
11224         umask(077);
11225         for (n = 0; n < 2; ++n) {
11226                 strcpy(name[n], tmpl);
11227                 if ((fd = mkstemp(name[n])) >= 0) {
11228                         if (!strcmp(name[n], tmpl)
11229                          || stat(name[n], &sb) != 0
11230                          || (sb.st_mode & S_IFMT) != S_IFREG
11231                          || (sb.st_mode & 077) != 0) {
11232                                 result = 1;
11233                         }
11234                         close(fd);
11235                 }
11236         }
11237         if (result == 0
11238          && !strcmp(name[0], name[1]))
11239                 result = 1;
11240         ${cf_cv_main_return:-return}(result);
11241 }
11242
11243 _ACEOF
11244 rm -f conftest$ac_exeext
11245 if { (eval echo "$as_me:11245: \"$ac_link\"") >&5
11246   (eval $ac_link) 2>&5
11247   ac_status=$?
11248   echo "$as_me:11248: \$? = $ac_status" >&5
11249   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11250   { (eval echo "$as_me:11250: \"$ac_try\"") >&5
11251   (eval $ac_try) 2>&5
11252   ac_status=$?
11253   echo "$as_me:11253: \$? = $ac_status" >&5
11254   (exit $ac_status); }; }; then
11255   cf_cv_func_mkstemp=yes
11256
11257 else
11258   echo "$as_me: program exited with status $ac_status" >&5
11259 echo "$as_me: failed program was:" >&5
11260 cat conftest.$ac_ext >&5
11261 cf_cv_func_mkstemp=no
11262
11263 fi
11264 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11265 fi
11266
11267 fi
11268 echo "$as_me:11268: result: $cf_cv_func_mkstemp" >&5
11269 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
11270 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
11271         echo "$as_me:11271: checking for mkstemp" >&5
11272 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
11273 if test "${ac_cv_func_mkstemp+set}" = set; then
11274   echo $ECHO_N "(cached) $ECHO_C" >&6
11275 else
11276   cat >conftest.$ac_ext <<_ACEOF
11277 #line 11277 "configure"
11278 #include "confdefs.h"
11279 /* System header to define __stub macros and hopefully few prototypes,
11280     which can conflict with char mkstemp (); below.  */
11281 #include <assert.h>
11282 /* Override any gcc2 internal prototype to avoid an error.  */
11283 #ifdef __cplusplus
11284 extern "C"
11285 #endif
11286 /* We use char because int might match the return type of a gcc2
11287    builtin and then its argument prototype would still apply.  */
11288 char mkstemp ();
11289 char (*f) ();
11290
11291 int
11292 main ()
11293 {
11294 /* The GNU C library defines this for functions which it implements
11295     to always fail with ENOSYS.  Some functions are actually named
11296     something starting with __ and the normal name is an alias.  */
11297 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
11298 choke me
11299 #else
11300 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11301 #endif
11302
11303   ;
11304   return 0;
11305 }
11306 _ACEOF
11307 rm -f conftest.$ac_objext conftest$ac_exeext
11308 if { (eval echo "$as_me:11308: \"$ac_link\"") >&5
11309   (eval $ac_link) 2>&5
11310   ac_status=$?
11311   echo "$as_me:11311: \$? = $ac_status" >&5
11312   (exit $ac_status); } &&
11313          { ac_try='test -s conftest$ac_exeext'
11314   { (eval echo "$as_me:11314: \"$ac_try\"") >&5
11315   (eval $ac_try) 2>&5
11316   ac_status=$?
11317   echo "$as_me:11317: \$? = $ac_status" >&5
11318   (exit $ac_status); }; }; then
11319   ac_cv_func_mkstemp=yes
11320 else
11321   echo "$as_me: failed program was:" >&5
11322 cat conftest.$ac_ext >&5
11323 ac_cv_func_mkstemp=no
11324 fi
11325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11326 fi
11327 echo "$as_me:11327: result: $ac_cv_func_mkstemp" >&5
11328 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
11329
11330 fi
11331 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
11332
11333 cat >>confdefs.h <<\EOF
11334 #define HAVE_MKSTEMP 1
11335 EOF
11336
11337 fi
11338
11339 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
11340         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11341         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11342 fi
11343
11344 cf_with_ada=yes
11345 if test "$cf_with_ada" != "no" ; then
11346
11347 cf_ada_make=gnatmake
11348 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
11349 set dummy $cf_ada_make; ac_word=$2
11350 echo "$as_me:11350: checking for $ac_word" >&5
11351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11352 if test "${ac_cv_prog_gnat_exists+set}" = set; then
11353   echo $ECHO_N "(cached) $ECHO_C" >&6
11354 else
11355   if test -n "$gnat_exists"; then
11356   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
11357 else
11358   ac_save_IFS=$IFS; IFS=$ac_path_separator
11359 ac_dummy="$PATH"
11360 for ac_dir in $ac_dummy; do
11361   IFS=$ac_save_IFS
11362   test -z "$ac_dir" && ac_dir=.
11363   $as_executable_p "$ac_dir/$ac_word" || continue
11364 ac_cv_prog_gnat_exists="yes"
11365 echo "$as_me:11365: found $ac_dir/$ac_word" >&5
11366 break
11367 done
11368
11369   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
11370 fi
11371 fi
11372 gnat_exists=$ac_cv_prog_gnat_exists
11373 if test -n "$gnat_exists"; then
11374   echo "$as_me:11374: result: $gnat_exists" >&5
11375 echo "${ECHO_T}$gnat_exists" >&6
11376 else
11377   echo "$as_me:11377: result: no" >&5
11378 echo "${ECHO_T}no" >&6
11379 fi
11380
11381 if test "$ac_cv_prog_gnat_exists" = no; then
11382    cf_ada_make=
11383    cf_cv_prog_gnat_correct=no
11384 else
11385
11386 echo "$as_me:11386: checking for gnat version" >&5
11387 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
11388 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
11389         grep '[0-9].[0-9][0-9]*' |\
11390     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
11391 echo "$as_me:11391: result: $cf_gnat_version" >&5
11392 echo "${ECHO_T}$cf_gnat_version" >&6
11393
11394 case $cf_gnat_version in #(vi
11395 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
11396         cf_cv_prog_gnat_correct=yes
11397         ;;
11398 *)
11399         { echo "$as_me:11399: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
11400 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
11401         cf_cv_prog_gnat_correct=no
11402         ;;
11403 esac
11404
11405    # Extract the first word of "m4", so it can be a program name with args.
11406 set dummy m4; ac_word=$2
11407 echo "$as_me:11407: checking for $ac_word" >&5
11408 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11409 if test "${ac_cv_prog_M4_exists+set}" = set; then
11410   echo $ECHO_N "(cached) $ECHO_C" >&6
11411 else
11412   if test -n "$M4_exists"; then
11413   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
11414 else
11415   ac_save_IFS=$IFS; IFS=$ac_path_separator
11416 ac_dummy="$PATH"
11417 for ac_dir in $ac_dummy; do
11418   IFS=$ac_save_IFS
11419   test -z "$ac_dir" && ac_dir=.
11420   $as_executable_p "$ac_dir/$ac_word" || continue
11421 ac_cv_prog_M4_exists="yes"
11422 echo "$as_me:11422: found $ac_dir/$ac_word" >&5
11423 break
11424 done
11425
11426   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
11427 fi
11428 fi
11429 M4_exists=$ac_cv_prog_M4_exists
11430 if test -n "$M4_exists"; then
11431   echo "$as_me:11431: result: $M4_exists" >&5
11432 echo "${ECHO_T}$M4_exists" >&6
11433 else
11434   echo "$as_me:11434: result: no" >&5
11435 echo "${ECHO_T}no" >&6
11436 fi
11437
11438    if test "$ac_cv_prog_M4_exists" = no; then
11439       cf_cv_prog_gnat_correct=no
11440       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
11441    fi
11442    if test "$cf_cv_prog_gnat_correct" = yes; then
11443       echo "$as_me:11443: checking if GNAT works" >&5
11444 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
11445
11446 rm -rf conftest* *~conftest*
11447 cat >>conftest.ads <<CF_EOF
11448 procedure conftest;
11449 CF_EOF
11450 cat >>conftest.adb <<CF_EOF
11451 with Text_IO;
11452 with GNAT.OS_Lib;
11453 procedure conftest is
11454 begin
11455    Text_IO.Put ("Hello World");
11456    Text_IO.New_Line;
11457    GNAT.OS_Lib.OS_Exit (0);
11458 end conftest;
11459 CF_EOF
11460 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11461    if ( ./conftest 1>&5 2>&1 ) ; then
11462       cf_cv_prog_gnat_correct=yes
11463    else
11464       cf_cv_prog_gnat_correct=no
11465    fi
11466 else
11467    cf_cv_prog_gnat_correct=no
11468 fi
11469 rm -rf conftest* *~conftest*
11470
11471       echo "$as_me:11471: result: $cf_cv_prog_gnat_correct" >&5
11472 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
11473    fi
11474 fi
11475
11476         if test "$cf_cv_prog_gnat_correct" = yes; then
11477
11478         echo "$as_me:11478: checking optimization options for ADAFLAGS" >&5
11479 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
11480         case "$CFLAGS" in
11481         *-g*)
11482
11483         ADAFLAGS="$ADAFLAGS -g"
11484
11485                 ;;
11486         esac
11487         case "$CFLAGS" in
11488         *-O*)
11489                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
11490
11491         ADAFLAGS="$ADAFLAGS $cf_O_flag"
11492
11493                 ;;
11494         esac
11495         echo "$as_me:11495: result: $ADAFLAGS" >&5
11496 echo "${ECHO_T}$ADAFLAGS" >&6
11497
11498 echo "$as_me:11498: checking if GNAT supports generics" >&5
11499 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
11500 case $cf_gnat_version in #(vi
11501 3.[1-9]*|[4-9].*) #(vi
11502         cf_gnat_generics=yes
11503         ;;
11504 *)
11505         cf_gnat_generics=no
11506         ;;
11507 esac
11508 echo "$as_me:11508: result: $cf_gnat_generics" >&5
11509 echo "${ECHO_T}$cf_gnat_generics" >&6
11510
11511 if test "$cf_gnat_generics" = yes
11512 then
11513         cf_compile_generics=generics
11514         cf_generic_objects="\${GENOBJS}"
11515 else
11516         cf_compile_generics=
11517         cf_generic_objects=
11518 fi
11519
11520 echo "$as_me:11520: checking if GNAT supports SIGINT" >&5
11521 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
11522 if test "${cf_cv_gnat_sigint+set}" = set; then
11523   echo $ECHO_N "(cached) $ECHO_C" >&6
11524 else
11525
11526 rm -rf conftest* *~conftest*
11527 cat >>conftest.ads <<CF_EOF
11528 with Ada.Interrupts.Names;
11529
11530 package ConfTest is
11531
11532    pragma Warnings (Off);  --  the next pragma exists since 3.11p
11533    pragma Unreserve_All_Interrupts;
11534    pragma Warnings (On);
11535
11536    protected Process is
11537       procedure Stop;
11538       function Continue return Boolean;
11539       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
11540    private
11541       Done : Boolean := False;
11542    end Process;
11543
11544 end ConfTest;
11545 CF_EOF
11546 cat >>conftest.adb <<CF_EOF
11547 package body ConfTest is
11548    protected body Process is
11549       procedure Stop is
11550       begin
11551          Done := True;
11552       end Stop;
11553       function Continue return Boolean is
11554       begin
11555          return not Done;
11556       end Continue;
11557    end Process;
11558 end ConfTest;
11559 CF_EOF
11560 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11561       cf_cv_gnat_sigint=yes
11562 else
11563    cf_cv_gnat_sigint=no
11564 fi
11565 rm -rf conftest* *~conftest*
11566
11567 fi
11568 echo "$as_me:11568: result: $cf_cv_gnat_sigint" >&5
11569 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11570
11571 if test $cf_cv_gnat_sigint = yes ; then
11572         USE_GNAT_SIGINT=""
11573 else
11574         USE_GNAT_SIGINT="#"
11575 fi
11576
11577 cf_gnat_libraries=no
11578 cf_gnat_projects=no
11579
11580 if test "$enable_gnat_projects" != no ; then
11581 echo "$as_me:11581: checking if GNAT supports project files" >&5
11582 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11583 case $cf_gnat_version in #(vi
11584 3.[0-9]*) #(vi
11585         ;;
11586 *)
11587         case $cf_cv_system_name in #(vi
11588         cygwin*|msys*) #(vi
11589                 ;;
11590         *)
11591                 mkdir conftest.src conftest.bin conftest.lib
11592                 cd conftest.src
11593                 rm -rf conftest* *~conftest*
11594                 cat >>library.gpr <<CF_EOF
11595 project Library is
11596   Kind := External ("LIB_KIND");
11597   for Library_Name use "ConfTest";
11598   for Object_Dir use ".";
11599   for Library_ALI_Dir use External("LIBRARY_DIR");
11600   for Library_Version use External ("SONAME");
11601   for Library_Kind use Kind;
11602   for Library_Dir use External("BUILD_DIR");
11603   Source_Dir := External ("SOURCE_DIR");
11604   for Source_Dirs use (Source_Dir);
11605 end Library;
11606 CF_EOF
11607                 cat >>confpackage.ads <<CF_EOF
11608 package ConfPackage is
11609    procedure conftest;
11610 end ConfPackage;
11611 CF_EOF
11612                 cat >>confpackage.adb <<CF_EOF
11613 with Text_IO;
11614 package body ConfPackage is
11615    procedure conftest is
11616    begin
11617       Text_IO.Put ("Hello World");
11618       Text_IO.New_Line;
11619    end conftest;
11620 end ConfPackage;
11621 CF_EOF
11622                 if ( $cf_ada_make $ADAFLAGS \
11623                                 -Plibrary.gpr \
11624                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11625                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11626                                 -XSOURCE_DIR=`pwd` \
11627                                 -XSONAME=libConfTest.so.1 \
11628                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11629                         cf_gnat_projects=yes
11630                 fi
11631                 cd ..
11632                 if test -f conftest.lib/confpackage.ali
11633                 then
11634                         cf_gnat_libraries=yes
11635                 fi
11636                 rm -rf conftest* *~conftest*
11637                 ;;
11638         esac
11639         ;;
11640 esac
11641 echo "$as_me:11641: result: $cf_gnat_projects" >&5
11642 echo "${ECHO_T}$cf_gnat_projects" >&6
11643 fi # enable_gnat_projects
11644
11645 if test $cf_gnat_projects = yes
11646 then
11647         echo "$as_me:11647: checking if GNAT supports libraries" >&5
11648 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11649         echo "$as_me:11649: result: $cf_gnat_libraries" >&5
11650 echo "${ECHO_T}$cf_gnat_libraries" >&6
11651 fi
11652
11653 if test "$cf_gnat_projects" = yes
11654 then
11655         USE_OLD_MAKERULES="#"
11656         USE_GNAT_PROJECTS=""
11657 else
11658         USE_OLD_MAKERULES=""
11659         USE_GNAT_PROJECTS="#"
11660 fi
11661
11662 if test "$cf_gnat_libraries" = yes
11663 then
11664         USE_GNAT_LIBRARIES=""
11665 else
11666         USE_GNAT_LIBRARIES="#"
11667 fi
11668
11669 echo "$as_me:11669: checking for ada-compiler" >&5
11670 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11671
11672 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11673 if test "${with_ada_compiler+set}" = set; then
11674   withval="$with_ada_compiler"
11675   cf_ada_compiler=$withval
11676 else
11677   cf_ada_compiler=gnatmake
11678 fi;
11679
11680 echo "$as_me:11680: result: $cf_ada_compiler" >&5
11681 echo "${ECHO_T}$cf_ada_compiler" >&6
11682
11683                 cf_ada_package=terminal_interface
11684
11685 echo "$as_me:11685: checking for ada-include" >&5
11686 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11687
11688 # Check whether --with-ada-include or --without-ada-include was given.
11689 if test "${with_ada_include+set}" = set; then
11690   withval="$with_ada_include"
11691
11692 else
11693   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
11694 fi; if test -n "$prefix/share/ada/adainclude" ; then
11695
11696 if test "x$prefix" != xNONE; then
11697   cf_path_syntax="$prefix"
11698 else
11699   cf_path_syntax="$ac_default_prefix"
11700 fi
11701
11702 case ".$withval" in #(vi
11703 .\$\(*\)*|.\'*\'*) #(vi
11704   ;;
11705 ..|./*|.\\*) #(vi
11706   ;;
11707 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11708   ;;
11709 .\${*prefix}*|.\${*dir}*) #(vi
11710   eval withval="$withval"
11711   case ".$withval" in #(vi
11712   .NONE/*)
11713     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11714     ;;
11715   esac
11716   ;; #(vi
11717 .no|.NONE/*)
11718   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11719   ;;
11720 *)
11721   { { echo "$as_me:11721: error: expected a pathname, not \"$withval\"" >&5
11722 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11723    { (exit 1); exit 1; }; }
11724   ;;
11725 esac
11726
11727 fi
11728 eval ADA_INCLUDE="$withval"
11729
11730 echo "$as_me:11730: result: $ADA_INCLUDE" >&5
11731 echo "${ECHO_T}$ADA_INCLUDE" >&6
11732
11733 echo "$as_me:11733: checking for ada-objects" >&5
11734 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
11735
11736 # Check whether --with-ada-objects or --without-ada-objects was given.
11737 if test "${with_ada_objects+set}" = set; then
11738   withval="$with_ada_objects"
11739
11740 else
11741   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
11742 fi; if test -n "$prefix/lib/ada/adalib" ; then
11743
11744 if test "x$prefix" != xNONE; then
11745   cf_path_syntax="$prefix"
11746 else
11747   cf_path_syntax="$ac_default_prefix"
11748 fi
11749
11750 case ".$withval" in #(vi
11751 .\$\(*\)*|.\'*\'*) #(vi
11752   ;;
11753 ..|./*|.\\*) #(vi
11754   ;;
11755 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11756   ;;
11757 .\${*prefix}*|.\${*dir}*) #(vi
11758   eval withval="$withval"
11759   case ".$withval" in #(vi
11760   .NONE/*)
11761     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11762     ;;
11763   esac
11764   ;; #(vi
11765 .no|.NONE/*)
11766   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11767   ;;
11768 *)
11769   { { echo "$as_me:11769: error: expected a pathname, not \"$withval\"" >&5
11770 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11771    { (exit 1); exit 1; }; }
11772   ;;
11773 esac
11774
11775 fi
11776 eval ADA_OBJECTS="$withval"
11777
11778 echo "$as_me:11778: result: $ADA_OBJECTS" >&5
11779 echo "${ECHO_T}$ADA_OBJECTS" >&6
11780
11781 echo "$as_me:11781: checking if an Ada95 shared-library should be built" >&5
11782 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
11783
11784 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
11785 if test "${with_ada_sharedlib+set}" = set; then
11786   withval="$with_ada_sharedlib"
11787   with_ada_sharedlib=$withval
11788 else
11789   with_ada_sharedlib=no
11790 fi;
11791 echo "$as_me:11791: result: $with_ada_sharedlib" >&5
11792 echo "${ECHO_T}$with_ada_sharedlib" >&6
11793
11794 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
11795 MAKE_ADA_SHAREDLIB="#"
11796
11797 if test "x$with_ada_sharedlib" != xno
11798 then
11799         MAKE_ADA_SHAREDLIB=
11800         if test "x$with_ada_sharedlib" != xyes
11801         then
11802                 ADA_SHAREDLIB="$with_ada_sharedlib"
11803         fi
11804 fi
11805
11806         else
11807                 { { echo "$as_me:11807: error: No usable Ada compiler found" >&5
11808 echo "$as_me: error: No usable Ada compiler found" >&2;}
11809    { (exit 1); exit 1; }; }
11810         fi
11811 else
11812         { { echo "$as_me:11812: error: The Ada compiler is needed for this package" >&5
11813 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
11814    { (exit 1); exit 1; }; }
11815 fi
11816
11817 ################################################################################
11818
11819 # not needed
11820 TINFO_LDFLAGS2=
11821
11822 TINFO_LIBS=
11823
11824 ### Construct the list of include-directories to be generated
11825
11826 if test "$GCC" != yes; then
11827         CPPFLAGS="-I\${includedir} $CPPFLAGS"
11828 elif test "$includedir" != "/usr/include"; then
11829         if test "$includedir" = '${prefix}/include' ; then
11830                 if test x$prefix != x/usr ; then
11831                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
11832                 fi
11833         else
11834                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
11835         fi
11836 fi
11837 if test "$srcdir" != "."; then
11838         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
11839 fi
11840 CPPFLAGS="-I. -I../include $CPPFLAGS"
11841
11842 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
11843 if test "$srcdir" != "."; then
11844         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
11845 fi
11846 if test "$GCC" != yes; then
11847         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11848 elif test "$includedir" != "/usr/include"; then
11849         if test "$includedir" = '${prefix}/include' ; then
11850                 if test x$prefix != x/usr ; then
11851                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11852                 fi
11853         else
11854                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11855         fi
11856 fi
11857
11858 ### Build up pieces for makefile rules
11859 echo "$as_me:11859: checking default library suffix" >&5
11860 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
11861
11862         case $DFT_LWR_MODEL in
11863         libtool) DFT_ARG_SUFFIX=''   ;;
11864         normal)  DFT_ARG_SUFFIX=''   ;;
11865         debug)   DFT_ARG_SUFFIX='_g' ;;
11866         profile) DFT_ARG_SUFFIX='_p' ;;
11867         shared)  DFT_ARG_SUFFIX=''   ;;
11868         esac
11869         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
11870 echo "$as_me:11870: result: $DFT_ARG_SUFFIX" >&5
11871 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
11872
11873 echo "$as_me:11873: checking default library-dependency suffix" >&5
11874 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
11875
11876         case X$DFT_LWR_MODEL in #(vi
11877         Xlibtool) #(vi
11878                 DFT_LIB_SUFFIX='.la'
11879                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11880                 ;;
11881         Xdebug) #(vi
11882                 DFT_LIB_SUFFIX='_g.a'
11883                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11884                 ;;
11885         Xprofile) #(vi
11886                 DFT_LIB_SUFFIX='_p.a'
11887                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11888                 ;;
11889         Xshared) #(vi
11890                 case $cf_cv_system_name in
11891                 aix[5-7]*) #(vi
11892                         DFT_LIB_SUFFIX='.a'
11893                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11894                         ;;
11895                 cygwin*|msys*|mingw*) #(vi
11896                         DFT_LIB_SUFFIX='.dll'
11897                         DFT_DEP_SUFFIX='.dll.a'
11898                         ;;
11899                 darwin*) #(vi
11900                         DFT_LIB_SUFFIX='.dylib'
11901                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11902                         ;;
11903                 hpux*) #(vi
11904                         case $target in
11905                         ia64*) #(vi
11906                                 DFT_LIB_SUFFIX='.so'
11907                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11908                                 ;;
11909                         *) #(vi
11910                                 DFT_LIB_SUFFIX='.sl'
11911                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11912                                 ;;
11913                         esac
11914                         ;;
11915                 *) #(vi
11916                         DFT_LIB_SUFFIX='.so'
11917                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11918                         ;;
11919                 esac
11920                 ;;
11921         *)
11922                 DFT_LIB_SUFFIX='.a'
11923                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11924                 ;;
11925         esac
11926         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
11927         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
11928 echo "$as_me:11928: result: $DFT_DEP_SUFFIX" >&5
11929 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
11930
11931 echo "$as_me:11931: checking default object directory" >&5
11932 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
11933
11934         case $DFT_LWR_MODEL in
11935         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
11936         normal)  DFT_OBJ_SUBDIR='objects' ;;
11937         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
11938         profile) DFT_OBJ_SUBDIR='obj_p' ;;
11939         shared)
11940                 case $cf_cv_system_name in #(vi
11941                 cygwin|msys) #(vi
11942                         DFT_OBJ_SUBDIR='objects' ;;
11943                 *)
11944                         DFT_OBJ_SUBDIR='obj_s' ;;
11945                 esac
11946         esac
11947 echo "$as_me:11947: result: $DFT_OBJ_SUBDIR" >&5
11948 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
11949
11950 ### Set up low-level terminfo dependencies for makefiles.
11951
11952 if test "$DFT_LWR_MODEL" = shared ; then
11953         case $cf_cv_system_name in #(vi
11954         cygwin*)
11955                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
11956                 ;;
11957         msys*)
11958                 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
11959                 ;;
11960         esac
11961 fi
11962
11963 ### Construct the list of subdirectories for which we'll customize makefiles
11964 ### with the appropriate compile-rules.
11965
11966 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
11967
11968 cat >>confdefs.h <<EOF
11969 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
11970 EOF
11971
11972 ### Now that we're done running tests, add the compiler-warnings, if any
11973
11974 cf_fix_cppflags=no
11975 cf_new_cflags=
11976 cf_new_cppflags=
11977 cf_new_extra_cppflags=
11978
11979 for cf_add_cflags in $EXTRA_CFLAGS
11980 do
11981 case $cf_fix_cppflags in
11982 no)
11983         case $cf_add_cflags in #(vi
11984         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11985                 case $cf_add_cflags in
11986                 -D*)
11987                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11988
11989                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11990                                 && test -z "${cf_tst_cflags}" \
11991                                 && cf_fix_cppflags=yes
11992
11993                         if test $cf_fix_cppflags = yes ; then
11994                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11995                                 continue
11996                         elif test "${cf_tst_cflags}" = "\"'" ; then
11997                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11998                                 continue
11999                         fi
12000                         ;;
12001                 esac
12002                 case "$CPPFLAGS" in
12003                 *$cf_add_cflags) #(vi
12004                         ;;
12005                 *) #(vi
12006                         case $cf_add_cflags in #(vi
12007                         -D*)
12008                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12009
12010 CPPFLAGS=`echo "$CPPFLAGS" | \
12011         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12012                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12013
12014                                 ;;
12015                         esac
12016                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12017                         ;;
12018                 esac
12019                 ;;
12020         *)
12021                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12022                 ;;
12023         esac
12024         ;;
12025 yes)
12026         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12027
12028         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12029
12030         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12031                 && test -z "${cf_tst_cflags}" \
12032                 && cf_fix_cppflags=no
12033         ;;
12034 esac
12035 done
12036
12037 if test -n "$cf_new_cflags" ; then
12038
12039         CFLAGS="$CFLAGS $cf_new_cflags"
12040 fi
12041
12042 if test -n "$cf_new_cppflags" ; then
12043
12044         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12045 fi
12046
12047 if test -n "$cf_new_extra_cppflags" ; then
12048
12049         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12050 fi
12051
12052 ################################################################################
12053
12054 if test x"$enable_pc_files" = xyes ; then \
12055 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
12056 MAKE_PC_FILES=
12057 else
12058 MAKE_PC_FILES="#"
12059 fi
12060
12061 ################################################################################
12062
12063 TEST_ARG2=
12064
12065 TEST_LIBS2=
12066
12067 NCURSES_SHLIB2="sh -c"
12068
12069 ADA_SUBDIRS="include gen src doc"
12070 if test "x$cf_with_tests" != "xno" ; then
12071         ADA_SUBDIRS="$ADA_SUBDIRS samples"
12072 fi
12073 for cf_dir in $ADA_SUBDIRS
12074 do
12075         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
12076 done
12077
12078 NCURSES_TREE="#"
12079
12080 EXTERNAL_TREE=
12081
12082 # match layout used by make-tar.sh
12083 ADAHTML_DIR=../doc/ada
12084
12085 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
12086 ac_config_commands="$ac_config_commands default"
12087 cat >confcache <<\_ACEOF
12088 # This file is a shell script that caches the results of configure
12089 # tests run on this system so they can be shared between configure
12090 # scripts and configure runs, see configure's option --config-cache.
12091 # It is not useful on other systems.  If it contains results you don't
12092 # want to keep, you may remove or edit it.
12093 #
12094 # config.status only pays attention to the cache file if you give it
12095 # the --recheck option to rerun configure.
12096 #
12097 # `ac_cv_env_foo' variables (set or unset) will be overriden when
12098 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12099 # following values.
12100
12101 _ACEOF
12102
12103 # The following way of writing the cache mishandles newlines in values,
12104 # but we know of no workaround that is simple, portable, and efficient.
12105 # So, don't put newlines in cache variables' values.
12106 # Ultrix sh set writes to stderr and can't be redirected directly,
12107 # and sets the high bit in the cache file unless we assign to the vars.
12108 {
12109   (set) 2>&1 |
12110     case `(ac_space=' '; set | grep ac_space) 2>&1` in
12111     *ac_space=\ *)
12112       # `set' does not quote correctly, so add quotes (double-quote
12113       # substitution turns \\\\ into \\, and sed turns \\ into \).
12114       sed -n \
12115         "s/'/'\\\\''/g;
12116           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12117       ;;
12118     *)
12119       # `set' quotes correctly as required by POSIX, so do not add quotes.
12120       sed -n \
12121         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12122       ;;
12123     esac;
12124 } |
12125   sed '
12126      t clear
12127      : clear
12128      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12129      t end
12130      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12131      : end' >>confcache
12132 if cmp -s $cache_file confcache; then :; else
12133   if test -w $cache_file; then
12134     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12135     cat confcache >$cache_file
12136   else
12137     echo "not updating unwritable cache $cache_file"
12138   fi
12139 fi
12140 rm -f confcache
12141
12142 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12143 # Let make expand exec_prefix.
12144 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12145
12146 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12147 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12148 # trailing colons and then remove the whole line if VPATH becomes empty
12149 # (actually we leave an empty line to preserve line numbers).
12150 if test "x$srcdir" = x.; then
12151   ac_vpsub='/^[         ]*VPATH[        ]*=/{
12152 s/:*\$(srcdir):*/:/;
12153 s/:*\${srcdir}:*/:/;
12154 s/:*@srcdir@:*/:/;
12155 s/^\([^=]*=[    ]*\):*/\1/;
12156 s/:*$//;
12157 s/^[^=]*=[      ]*$//;
12158 }'
12159 fi
12160
12161 DEFS=-DHAVE_CONFIG_H
12162
12163 : ${CONFIG_STATUS=./config.status}
12164 ac_clean_files_save=$ac_clean_files
12165 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12166 { echo "$as_me:12166: creating $CONFIG_STATUS" >&5
12167 echo "$as_me: creating $CONFIG_STATUS" >&6;}
12168 cat >$CONFIG_STATUS <<_ACEOF
12169 #! $SHELL
12170 # Generated automatically by configure.
12171 # Run this file to recreate the current configuration.
12172 # Compiler output produced by configure, useful for debugging
12173 # configure, is in config.log if it exists.
12174
12175 debug=false
12176 SHELL=\${CONFIG_SHELL-$SHELL}
12177 ac_cs_invocation="\$0 \$@"
12178
12179 _ACEOF
12180
12181 cat >>$CONFIG_STATUS <<\_ACEOF
12182 # Be Bourne compatible
12183 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12184   emulate sh
12185   NULLCMD=:
12186 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12187   set -o posix
12188 fi
12189
12190 # Name of the executable.
12191 as_me=`echo "$0" |sed 's,.*[\\/],,'`
12192
12193 if expr a : '\(a\)' >/dev/null 2>&1; then
12194   as_expr=expr
12195 else
12196   as_expr=false
12197 fi
12198
12199 rm -f conf$$ conf$$.exe conf$$.file
12200 echo >conf$$.file
12201 if ln -s conf$$.file conf$$ 2>/dev/null; then
12202   # We could just check for DJGPP; but this test a) works b) is more generic
12203   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12204   if test -f conf$$.exe; then
12205     # Don't use ln at all; we don't have any links
12206     as_ln_s='cp -p'
12207   else
12208     as_ln_s='ln -s'
12209   fi
12210 elif ln conf$$.file conf$$ 2>/dev/null; then
12211   as_ln_s=ln
12212 else
12213   as_ln_s='cp -p'
12214 fi
12215 rm -f conf$$ conf$$.exe conf$$.file
12216
12217 as_executable_p="test -f"
12218
12219 # Support unset when possible.
12220 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
12221   as_unset=unset
12222 else
12223   as_unset=false
12224 fi
12225
12226 # NLS nuisances.
12227 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
12228 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
12229 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
12230 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
12231 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
12232 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
12233 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
12234 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
12235
12236 # IFS
12237 # We need space, tab and new line, in precisely that order.
12238 as_nl='
12239 '
12240 IFS="   $as_nl"
12241
12242 # CDPATH.
12243 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
12244
12245 exec 6>&1
12246
12247 _ACEOF
12248
12249 # Files that config.status was made for.
12250 if test -n "$ac_config_files"; then
12251   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12252 fi
12253
12254 if test -n "$ac_config_headers"; then
12255   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12256 fi
12257
12258 if test -n "$ac_config_links"; then
12259   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12260 fi
12261
12262 if test -n "$ac_config_commands"; then
12263   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12264 fi
12265
12266 cat >>$CONFIG_STATUS <<\EOF
12267
12268 ac_cs_usage="\
12269 \`$as_me' instantiates files from templates according to the
12270 current configuration.
12271
12272 Usage: $0 [OPTIONS] [FILE]...
12273
12274   -h, --help       print this help, then exit
12275   -V, --version    print version number, then exit
12276   -d, --debug      don't remove temporary files
12277       --recheck    update $as_me by reconfiguring in the same conditions
12278   --file=FILE[:TEMPLATE]
12279                    instantiate the configuration file FILE
12280   --header=FILE[:TEMPLATE]
12281                    instantiate the configuration header FILE
12282
12283 Configuration files:
12284 $config_files
12285
12286 Configuration headers:
12287 $config_headers
12288
12289 Configuration commands:
12290 $config_commands
12291
12292 Report bugs to <dickey@invisible-island.net>."
12293 EOF
12294
12295 cat >>$CONFIG_STATUS <<EOF
12296 ac_cs_version="\\
12297 config.status
12298 configured by $0, generated by GNU Autoconf 2.52.20121002,
12299   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12300
12301 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12302 Free Software Foundation, Inc.
12303 This config.status script is free software; the Free Software Foundation
12304 gives unlimited permission to copy, distribute and modify it."
12305 srcdir=$srcdir
12306 INSTALL="$INSTALL"
12307 EOF
12308
12309 cat >>$CONFIG_STATUS <<\EOF
12310 # If no file are specified by the user, then we need to provide default
12311 # value.  By we need to know if files were specified by the user.
12312 ac_need_defaults=:
12313 while test $# != 0
12314 do
12315   case $1 in
12316   --*=*)
12317     ac_option=`expr "x$1" : 'x\([^=]*\)='`
12318     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12319     shift
12320     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
12321     shift
12322     ;;
12323   -*);;
12324   *) # This is not an option, so the user has probably given explicit
12325      # arguments.
12326      ac_need_defaults=false;;
12327   esac
12328
12329   case $1 in
12330   # Handling of the options.
12331 EOF
12332 cat >>$CONFIG_STATUS <<EOF
12333   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12334     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
12335     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
12336 EOF
12337 cat >>$CONFIG_STATUS <<\EOF
12338   --version | --vers* | -V )
12339     echo "$ac_cs_version"; exit 0 ;;
12340   --he | --h)
12341     # Conflict between --help and --header
12342     { { echo "$as_me:12342: error: ambiguous option: $1
12343 Try \`$0 --help' for more information." >&5
12344 echo "$as_me: error: ambiguous option: $1
12345 Try \`$0 --help' for more information." >&2;}
12346    { (exit 1); exit 1; }; };;
12347   --help | --hel | -h )
12348     echo "$ac_cs_usage"; exit 0 ;;
12349   --debug | --d* | -d )
12350     debug=: ;;
12351   --file | --fil | --fi | --f )
12352     shift
12353     CONFIG_FILES="$CONFIG_FILES $1"
12354     ac_need_defaults=false;;
12355   --header | --heade | --head | --hea )
12356     shift
12357     CONFIG_HEADERS="$CONFIG_HEADERS $1"
12358     ac_need_defaults=false;;
12359
12360   # This is an error.
12361   -*) { { echo "$as_me:12361: error: unrecognized option: $1
12362 Try \`$0 --help' for more information." >&5
12363 echo "$as_me: error: unrecognized option: $1
12364 Try \`$0 --help' for more information." >&2;}
12365    { (exit 1); exit 1; }; } ;;
12366
12367   *) ac_config_targets="$ac_config_targets $1" ;;
12368
12369   esac
12370   shift
12371 done
12372
12373 exec 5>>config.log
12374 cat >&5 << _ACEOF
12375
12376 ## ----------------------- ##
12377 ## Running config.status.  ##
12378 ## ----------------------- ##
12379
12380 This file was extended by $as_me 2.52.20121002, executed with
12381   CONFIG_FILES    = $CONFIG_FILES
12382   CONFIG_HEADERS  = $CONFIG_HEADERS
12383   CONFIG_LINKS    = $CONFIG_LINKS
12384   CONFIG_COMMANDS = $CONFIG_COMMANDS
12385   > $ac_cs_invocation
12386 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12387
12388 _ACEOF
12389 EOF
12390
12391 cat >>$CONFIG_STATUS <<EOF
12392 #
12393 # INIT-COMMANDS section.
12394 #
12395
12396 ### Special initialization commands, used to pass information from the
12397 ### configuration-run into config.status
12398
12399 AWK="$AWK"
12400 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
12401 DFT_LWR_MODEL="$DFT_LWR_MODEL"
12402 LIB_NAME="$LIB_NAME"
12403 LIB_PREFIX="$LIB_PREFIX"
12404 LIB_SUFFIX="$LIB_SUFFIX"
12405 LN_S="$LN_S"
12406 NCURSES_MAJOR="$NCURSES_MAJOR"
12407 NCURSES_MINOR="$NCURSES_MINOR"
12408 NCURSES_PATCH="$NCURSES_PATCH"
12409 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
12410 cf_cv_abi_version="$cf_cv_abi_version"
12411 cf_cv_rel_version="$cf_cv_rel_version"
12412 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
12413 cf_cv_shared_soname='$cf_cv_shared_soname'
12414 cf_cv_shlib_version="$cf_cv_shlib_version"
12415 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
12416 cf_cv_system_name="$cf_cv_system_name"
12417 host="$host"
12418 target="$target"
12419
12420 EOF
12421
12422 cat >>$CONFIG_STATUS <<\EOF
12423 for ac_config_target in $ac_config_targets
12424 do
12425   case "$ac_config_target" in
12426   # Handling of arguments.
12427   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
12428   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
12429   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12430   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12431   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
12432   *) { { echo "$as_me:12432: error: invalid argument: $ac_config_target" >&5
12433 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12434    { (exit 1); exit 1; }; };;
12435   esac
12436 done
12437
12438 # If the user did not use the arguments to specify the items to instantiate,
12439 # then the envvar interface is used.  Set only those that are not.
12440 # We use the long form for the default assignment because of an extremely
12441 # bizarre bug on SunOS 4.1.3.
12442 if $ac_need_defaults; then
12443   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12444   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12445   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12446 fi
12447
12448 # Create a temporary directory, and hook for its removal unless debugging.
12449 $debug ||
12450 {
12451   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12452   trap '{ (exit 1); exit 1; }' 1 2 13 15
12453 }
12454
12455 # Create a (secure) tmp directory for tmp files.
12456 : ${TMPDIR=/tmp}
12457 {
12458   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12459   test -n "$tmp" && test -d "$tmp"
12460 }  ||
12461 {
12462   tmp=$TMPDIR/cs$$-$RANDOM
12463   (umask 077 && mkdir $tmp)
12464 } ||
12465 {
12466    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12467    { (exit 1); exit 1; }
12468 }
12469
12470 EOF
12471
12472 cat >>$CONFIG_STATUS <<EOF
12473
12474 #
12475 # CONFIG_FILES section.
12476 #
12477
12478 # No need to generate the scripts if there are no CONFIG_FILES.
12479 # This happens for instance when ./config.status config.h
12480 if test -n "\$CONFIG_FILES"; then
12481   # Protect against being on the right side of a sed subst in config.status.
12482   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12483    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12484 s,@SHELL@,$SHELL,;t t
12485 s,@exec_prefix@,$exec_prefix,;t t
12486 s,@prefix@,$prefix,;t t
12487 s,@program_transform_name@,$program_transform_name,;t t
12488 s,@bindir@,$bindir,;t t
12489 s,@sbindir@,$sbindir,;t t
12490 s,@libexecdir@,$libexecdir,;t t
12491 s,@datarootdir@,$datarootdir,;t t
12492 s,@datadir@,$datadir,;t t
12493 s,@sysconfdir@,$sysconfdir,;t t
12494 s,@sharedstatedir@,$sharedstatedir,;t t
12495 s,@localstatedir@,$localstatedir,;t t
12496 s,@libdir@,$libdir,;t t
12497 s,@includedir@,$includedir,;t t
12498 s,@oldincludedir@,$oldincludedir,;t t
12499 s,@infodir@,$infodir,;t t
12500 s,@mandir@,$mandir,;t t
12501 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12502 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12503 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12504 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12505 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12506 s,@build_alias@,$build_alias,;t t
12507 s,@host_alias@,$host_alias,;t t
12508 s,@target_alias@,$target_alias,;t t
12509 s,@ECHO_C@,$ECHO_C,;t t
12510 s,@ECHO_N@,$ECHO_N,;t t
12511 s,@ECHO_T@,$ECHO_T,;t t
12512 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12513 s,@DEFS@,$DEFS,;t t
12514 s,@LIBS@,$LIBS,;t t
12515 s,@top_builddir@,$top_builddir,;t t
12516 s,@build@,$build,;t t
12517 s,@build_cpu@,$build_cpu,;t t
12518 s,@build_vendor@,$build_vendor,;t t
12519 s,@build_os@,$build_os,;t t
12520 s,@host@,$host,;t t
12521 s,@host_cpu@,$host_cpu,;t t
12522 s,@host_vendor@,$host_vendor,;t t
12523 s,@host_os@,$host_os,;t t
12524 s,@target@,$target,;t t
12525 s,@target_cpu@,$target_cpu,;t t
12526 s,@target_vendor@,$target_vendor,;t t
12527 s,@target_os@,$target_os,;t t
12528 s,@CC@,$CC,;t t
12529 s,@CFLAGS@,$CFLAGS,;t t
12530 s,@LDFLAGS@,$LDFLAGS,;t t
12531 s,@CPPFLAGS@,$CPPFLAGS,;t t
12532 s,@ac_ct_CC@,$ac_ct_CC,;t t
12533 s,@EXEEXT@,$EXEEXT,;t t
12534 s,@OBJEXT@,$OBJEXT,;t t
12535 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12536 s,@CPP@,$CPP,;t t
12537 s,@AWK@,$AWK,;t t
12538 s,@EGREP@,$EGREP,;t t
12539 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12540 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12541 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12542 s,@LN_S@,$LN_S,;t t
12543 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12544 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12545 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12546 s,@SET_MAKE@,$SET_MAKE,;t t
12547 s,@CTAGS@,$CTAGS,;t t
12548 s,@ETAGS@,$ETAGS,;t t
12549 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12550 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12551 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12552 s,@RANLIB@,$RANLIB,;t t
12553 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12554 s,@LD@,$LD,;t t
12555 s,@ac_ct_LD@,$ac_ct_LD,;t t
12556 s,@AR@,$AR,;t t
12557 s,@ac_ct_AR@,$ac_ct_AR,;t t
12558 s,@ARFLAGS@,$ARFLAGS,;t t
12559 s,@DESTDIR@,$DESTDIR,;t t
12560 s,@BUILD_CC@,$BUILD_CC,;t t
12561 s,@BUILD_CPP@,$BUILD_CPP,;t t
12562 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12563 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12564 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12565 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12566 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12567 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12568 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12569 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12570 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12571 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
12572 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12573 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12574 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12575 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12576 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12577 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12578 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12579 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12580 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12581 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12582 s,@CC_G_OPT@,$CC_G_OPT,;t t
12583 s,@LD_MODEL@,$LD_MODEL,;t t
12584 s,@shlibdir@,$shlibdir,;t t
12585 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
12586 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12587 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12588 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12589 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12590 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
12591 s,@LINK_PROGS@,$LINK_PROGS,;t t
12592 s,@LINK_TESTS@,$LINK_TESTS,;t t
12593 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12594 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12595 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12596 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12597 s,@RPATH_LIST@,$RPATH_LIST,;t t
12598 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12599 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12600 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12601 s,@PTHREAD@,$PTHREAD,;t t
12602 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12603 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12604 s,@ECHO_LT@,$ECHO_LT,;t t
12605 s,@ECHO_LD@,$ECHO_LD,;t t
12606 s,@RULE_CC@,$RULE_CC,;t t
12607 s,@SHOW_CC@,$SHOW_CC,;t t
12608 s,@ECHO_CC@,$ECHO_CC,;t t
12609 s,@ADAFLAGS@,$ADAFLAGS,;t t
12610 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12611 s,@ADA_TRACE@,$ADA_TRACE,;t t
12612 s,@gnat_exists@,$gnat_exists,;t t
12613 s,@M4_exists@,$M4_exists,;t t
12614 s,@cf_ada_make@,$cf_ada_make,;t t
12615 s,@cf_compile_generics@,$cf_compile_generics,;t t
12616 s,@cf_generic_objects@,$cf_generic_objects,;t t
12617 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12618 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12619 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12620 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12621 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12622 s,@cf_ada_package@,$cf_ada_package,;t t
12623 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12624 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12625 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12626 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12627 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
12628 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
12629 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12630 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12631 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12632 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12633 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
12634 s,@cross_compiling@,$cross_compiling,;t t
12635 s,@TEST_ARG2@,$TEST_ARG2,;t t
12636 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12637 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12638 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12639 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12640 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12641 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12642 CEOF
12643
12644 EOF
12645
12646   cat >>$CONFIG_STATUS <<\EOF
12647   # Split the substitutions into bite-sized pieces for seds with
12648   # small command number limits, like on Digital OSF/1 and HP-UX.
12649   ac_max_sed_lines=48
12650   ac_sed_frag=1 # Number of current file.
12651   ac_beg=1 # First line for current file.
12652   ac_end=$ac_max_sed_lines # Line after last line for current file.
12653   ac_more_lines=:
12654   ac_sed_cmds=
12655   while $ac_more_lines; do
12656     if test $ac_beg -gt 1; then
12657       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12658     else
12659       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12660     fi
12661     if test ! -s $tmp/subs.frag; then
12662       ac_more_lines=false
12663     else
12664       # The purpose of the label and of the branching condition is to
12665       # speed up the sed processing (if there are no `@' at all, there
12666       # is no need to browse any of the substitutions).
12667       # These are the two extra sed commands mentioned above.
12668       (echo ':t
12669   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12670       if test -z "$ac_sed_cmds"; then
12671         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12672       else
12673         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12674       fi
12675       ac_sed_frag=`expr $ac_sed_frag + 1`
12676       ac_beg=$ac_end
12677       ac_end=`expr $ac_end + $ac_max_sed_lines`
12678     fi
12679   done
12680   if test -z "$ac_sed_cmds"; then
12681     ac_sed_cmds=cat
12682   fi
12683 fi # test -n "$CONFIG_FILES"
12684
12685 EOF
12686 cat >>$CONFIG_STATUS <<\EOF
12687 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12688   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12689   case $ac_file in
12690   - | *:- | *:-:* ) # input from stdin
12691         cat >$tmp/stdin
12692         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12693         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12694   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12695         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12696   * )   ac_file_in=$ac_file.in ;;
12697   esac
12698
12699   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12700   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12701          X"$ac_file" : 'X\(//\)[^/]' \| \
12702          X"$ac_file" : 'X\(//\)$' \| \
12703          X"$ac_file" : 'X\(/\)' \| \
12704          .     : '\(.\)' 2>/dev/null ||
12705 echo X"$ac_file" |
12706     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12707           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12708           /^X\(\/\/\)$/{ s//\1/; q; }
12709           /^X\(\/\).*/{ s//\1/; q; }
12710           s/.*/./; q'`
12711   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12712     { case "$ac_dir" in
12713   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12714   *)                      as_incr_dir=.;;
12715 esac
12716 as_dummy="$ac_dir"
12717 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12718   case $as_mkdir_dir in
12719     # Skip DOS drivespec
12720     ?:) as_incr_dir=$as_mkdir_dir ;;
12721     *)
12722       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12723       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12724     ;;
12725   esac
12726 done; }
12727
12728     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12729     # A "../" for each directory in $ac_dir_suffix.
12730     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12731   else
12732     ac_dir_suffix= ac_dots=
12733   fi
12734
12735   case $srcdir in
12736   .)  ac_srcdir=.
12737       if test -z "$ac_dots"; then
12738          ac_top_srcdir=.
12739       else
12740          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12741       fi ;;
12742   [\\/]* | ?:[\\/]* )
12743       ac_srcdir=$srcdir$ac_dir_suffix;
12744       ac_top_srcdir=$srcdir ;;
12745   *) # Relative path.
12746     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12747     ac_top_srcdir=$ac_dots$srcdir ;;
12748   esac
12749
12750   case $INSTALL in
12751   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12752   *) ac_INSTALL=$ac_dots$INSTALL ;;
12753   esac
12754
12755   if test x"$ac_file" != x-; then
12756     { echo "$as_me:12756: creating $ac_file" >&5
12757 echo "$as_me: creating $ac_file" >&6;}
12758     rm -f "$ac_file"
12759   fi
12760   # Let's still pretend it is `configure' which instantiates (i.e., don't
12761   # use $as_me), people would be surprised to read:
12762   #    /* config.h.  Generated automatically by config.status.  */
12763   configure_input="Generated automatically from `echo $ac_file_in |
12764                                                  sed 's,.*/,,'` by configure."
12765
12766   # First look for the input files in the build tree, otherwise in the
12767   # src tree.
12768   ac_file_inputs=`IFS=:
12769     for f in $ac_file_in; do
12770       case $f in
12771       -) echo $tmp/stdin ;;
12772       [\\/$]*)
12773          # Absolute (can't be DOS-style, as IFS=:)
12774          test -f "$f" || { { echo "$as_me:12774: error: cannot find input file: $f" >&5
12775 echo "$as_me: error: cannot find input file: $f" >&2;}
12776    { (exit 1); exit 1; }; }
12777          echo $f;;
12778       *) # Relative
12779          if test -f "$f"; then
12780            # Build tree
12781            echo $f
12782          elif test -f "$srcdir/$f"; then
12783            # Source tree
12784            echo $srcdir/$f
12785          else
12786            # /dev/null tree
12787            { { echo "$as_me:12787: error: cannot find input file: $f" >&5
12788 echo "$as_me: error: cannot find input file: $f" >&2;}
12789    { (exit 1); exit 1; }; }
12790          fi;;
12791       esac
12792     done` || { (exit 1); exit 1; }
12793 EOF
12794 cat >>$CONFIG_STATUS <<\EOF
12795   ac_warn_datarootdir=no
12796   if test x"$ac_file" != x-; then
12797     for ac_item in $ac_file_inputs
12798     do
12799       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
12800       if test -n "$ac_seen"; then
12801         ac_used=`grep '@datarootdir@' $ac_item`
12802         if test -z "$ac_used"; then
12803           { echo "$as_me:12803: WARNING: datarootdir was used implicitly but not set:
12804 $ac_seen" >&5
12805 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
12806 $ac_seen" >&2;}
12807           ac_warn_datarootdir=yes
12808         fi
12809       fi
12810       ac_seen=`grep '${datarootdir}' $ac_item`
12811       if test -n "$ac_seen"; then
12812         { echo "$as_me:12812: WARNING: datarootdir was used explicitly but not set:
12813 $ac_seen" >&5
12814 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
12815 $ac_seen" >&2;}
12816         ac_warn_datarootdir=yes
12817       fi
12818     done
12819   fi
12820
12821 if test "x$ac_warn_datarootdir" = xyes; then
12822   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
12823 fi
12824
12825 EOF
12826 cat >>$CONFIG_STATUS <<EOF
12827   sed "$ac_vpsub
12828 $extrasub
12829 EOF
12830 cat >>$CONFIG_STATUS <<\EOF
12831 :t
12832 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12833 s,@configure_input@,$configure_input,;t t
12834 s,@srcdir@,$ac_srcdir,;t t
12835 s,@top_srcdir@,$ac_top_srcdir,;t t
12836 s,@INSTALL@,$ac_INSTALL,;t t
12837 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12838   rm -f $tmp/stdin
12839   if test x"$ac_file" != x-; then
12840     cp $tmp/out $ac_file
12841
12842     for ac_name in prefix exec_prefix datarootdir
12843     do
12844         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
12845         if test -n "$ac_seen"; then
12846             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
12847             if test -z "$ac_init"; then
12848               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
12849               { echo "$as_me:12849: WARNING: Variable $ac_name is used but was not set:
12850 $ac_seen" >&5
12851 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
12852 $ac_seen" >&2;}
12853             fi
12854         fi
12855     done
12856     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
12857     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
12858     if test -s $tmp/out; then
12859       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
12860       { echo "$as_me:12860: WARNING: Some variables may not be substituted:
12861 $ac_seen" >&5
12862 echo "$as_me: WARNING: Some variables may not be substituted:
12863 $ac_seen" >&2;}
12864     fi
12865   else
12866     cat $tmp/out
12867   fi
12868   rm -f $tmp/out
12869
12870 done
12871 EOF
12872 cat >>$CONFIG_STATUS <<\EOF
12873
12874 #
12875 # CONFIG_HEADER section.
12876 #
12877
12878 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12879 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12880 #
12881 # ac_d sets the value in "#define NAME VALUE" lines.
12882 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12883 ac_dB='[        ].*$,\1#\2'
12884 ac_dC=' '
12885 ac_dD=',;t'
12886 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12887 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12888 ac_iB='\([      ]\),\1#\2define\3'
12889 ac_iC=' '
12890 ac_iD='\4,;t'
12891 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12892 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12893 ac_uB='$,\1#\2define\3'
12894 ac_uC=' '
12895 ac_uD=',;t'
12896
12897 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
12898   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12899   case $ac_file in
12900   - | *:- | *:-:* ) # input from stdin
12901         cat >$tmp/stdin
12902         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12903         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12904   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12905         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12906   * )   ac_file_in=$ac_file.in ;;
12907   esac
12908
12909   test x"$ac_file" != x- && { echo "$as_me:12909: creating $ac_file" >&5
12910 echo "$as_me: creating $ac_file" >&6;}
12911
12912   # First look for the input files in the build tree, otherwise in the
12913   # src tree.
12914   ac_file_inputs=`IFS=:
12915     for f in $ac_file_in; do
12916       case $f in
12917       -) echo $tmp/stdin ;;
12918       [\\/$]*)
12919          # Absolute (can't be DOS-style, as IFS=:)
12920          test -f "$f" || { { echo "$as_me:12920: error: cannot find input file: $f" >&5
12921 echo "$as_me: error: cannot find input file: $f" >&2;}
12922    { (exit 1); exit 1; }; }
12923          echo $f;;
12924       *) # Relative
12925          if test -f "$f"; then
12926            # Build tree
12927            echo $f
12928          elif test -f "$srcdir/$f"; then
12929            # Source tree
12930            echo $srcdir/$f
12931          else
12932            # /dev/null tree
12933            { { echo "$as_me:12933: error: cannot find input file: $f" >&5
12934 echo "$as_me: error: cannot find input file: $f" >&2;}
12935    { (exit 1); exit 1; }; }
12936          fi;;
12937       esac
12938     done` || { (exit 1); exit 1; }
12939   # Remove the trailing spaces.
12940   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
12941
12942 EOF
12943
12944 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
12945 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
12946 # be either 'cat' or 'sort'.
12947 cat confdefs.h | uniq >conftest.vals
12948
12949 # Break up conftest.vals because some shells have a limit on
12950 # the size of here documents, and old seds have small limits too.
12951
12952 rm -f conftest.tail
12953 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
12954 while grep . conftest.vals >/dev/null
12955 do
12956   # Write chunks of a limited-size here document to conftest.frag.
12957   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
12958   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
12959   echo 'CEOF' >> $CONFIG_STATUS
12960   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12961   rm -f conftest.vals
12962   mv conftest.tail conftest.vals
12963 done
12964 rm -f conftest.vals
12965
12966 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
12967 # marker @DEFS@.
12968 echo '  cat >> conftest.edit <<CEOF
12969 /@DEFS@/r conftest.frag
12970 /@DEFS@/d
12971 CEOF
12972 sed -f conftest.edit $tmp/in > $tmp/out
12973 rm -f $tmp/in
12974 mv $tmp/out $tmp/in
12975 rm -f conftest.edit conftest.frag
12976 ' >> $CONFIG_STATUS
12977
12978 cat >>$CONFIG_STATUS <<\EOF
12979   # Let's still pretend it is `configure' which instantiates (i.e., don't
12980   # use $as_me), people would be surprised to read:
12981   #    /* config.h.  Generated automatically by config.status.  */
12982   if test x"$ac_file" = x-; then
12983     echo "/* Generated automatically by configure.  */" >$tmp/config.h
12984   else
12985     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
12986   fi
12987   cat $tmp/in >>$tmp/config.h
12988   rm -f $tmp/in
12989   if test x"$ac_file" != x-; then
12990     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
12991       { echo "$as_me:12991: $ac_file is unchanged" >&5
12992 echo "$as_me: $ac_file is unchanged" >&6;}
12993     else
12994       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12995          X"$ac_file" : 'X\(//\)[^/]' \| \
12996          X"$ac_file" : 'X\(//\)$' \| \
12997          X"$ac_file" : 'X\(/\)' \| \
12998          .     : '\(.\)' 2>/dev/null ||
12999 echo X"$ac_file" |
13000     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13001           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13002           /^X\(\/\/\)$/{ s//\1/; q; }
13003           /^X\(\/\).*/{ s//\1/; q; }
13004           s/.*/./; q'`
13005       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13006         { case "$ac_dir" in
13007   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
13008   *)                      as_incr_dir=.;;
13009 esac
13010 as_dummy="$ac_dir"
13011 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
13012   case $as_mkdir_dir in
13013     # Skip DOS drivespec
13014     ?:) as_incr_dir=$as_mkdir_dir ;;
13015     *)
13016       as_incr_dir=$as_incr_dir/$as_mkdir_dir
13017       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
13018     ;;
13019   esac
13020 done; }
13021
13022       fi
13023       rm -f $ac_file
13024       mv $tmp/config.h $ac_file
13025     fi
13026   else
13027     cat $tmp/config.h
13028     rm -f $tmp/config.h
13029   fi
13030 done
13031 EOF
13032 cat >>$CONFIG_STATUS <<\EOF
13033 #
13034 # CONFIG_COMMANDS section.
13035 #
13036 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
13037   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
13038   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
13039
13040   case $ac_dest in
13041     default )
13042 if test -z "$USE_OLD_MAKERULES" ; then
13043         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
13044 fi
13045  ;;
13046   esac
13047 done
13048 EOF
13049
13050 cat >>$CONFIG_STATUS <<\EOF
13051
13052 { (exit 0); exit 0; }
13053 EOF
13054 chmod +x $CONFIG_STATUS
13055 ac_clean_files=$ac_clean_files_save
13056
13057 # configure is writing to config.log, and then calls config.status.
13058 # config.status does its own redirection, appending to config.log.
13059 # Unfortunately, on DOS this fails, as config.log is still kept open
13060 # by configure, so config.status won't be able to write to it; its
13061 # output is simply discarded.  So we exec the FD to /dev/null,
13062 # effectively closing config.log, so it can be properly (re)opened and
13063 # appended to by config.status.  When coming back to configure, we
13064 # need to make the FD available again.
13065 if test "$no_create" != yes; then
13066   ac_cs_success=:
13067   exec 5>/dev/null
13068   $SHELL $CONFIG_STATUS || ac_cs_success=false
13069   exec 5>>config.log
13070   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13071   # would make configure fail if this is the last instruction.
13072   $ac_cs_success || { (exit 1); exit 1; }
13073 fi
13074 ${MAKE:-make} preinstall